Bitcoin Abstraction Layer
August 28, 2025 ยท View on GitHub
:warning: This project is under heavy development. Expect bugs & breaking changes.
Query different blockchains with account management using a single and simple interface.
Dependencies
This repository is a standalone project based off of Chainify, with heavy modifications to the core Bitcoin wallet libaries. There are no dependencies on the upstream project.
Chain Support
Bitcoin:
bitcoin-cfd-provider bitcoin-dlc-provider bitcoin-wallet-provider
Packages
DLC Spec Compliance
@atomicfinance/bitcoin-dlc-provider builds on @node-dlc/messaging, @node-dlc/core and cfd-dlc-js and adds wallet support for some parts of the Dlc Specification.
Implemented features:
- Dlc Offer, Accept, Sign message generation support, including utxo selection and validation
- Finalize and broadcast Dlc Sign message support
- Execute and Refund support
- Mutual Close support
- HyperbolaPayoutCurve payout generation support
- DigitDecompositionEventDescriptor support
- ContractInfo V0 and V1 support
- ContractDescriptorV1 support
Missing features:
- PolynomialPayoutCurve payout generation support
- EnumEventDescriptor support
- ContractInfoV1 support
- ContractDescriptorV0 support
Usage
import Client from '@atomicfinance/client'
import BitcoinCfdProvider from '@atomicfinance/bitcoin-cfd-provider'
import BitcoinDlcProvider from '@atomicfinance/bitcoin-dlc-provider'
import BitcoinWalletProvider from '@atomicfinance/bitcoin-wallet-provider'
import BitcoinJsWalletProvider from '@atomicfinance/bitcoin-js-wallet-provider'
import BitcoinNetworks from 'bitcoin-network'
const network = BitcoinNetworks.bitcoin_testnet
const bitcoin = new Client()
bitcoin.addProvider(new BitcoinJsWalletProvider({
network,
mnemonic: 'mnemonic_here',
baseDerivationPath: `m/84'/${network.coinType}'/0'`,
addressType: 'bech32',
}))
bitcoin.addProvider(new BitcoinCfdProvider(network));
bitcoin.addProvider(new BitcoinDlcProvider(network));
bitcoin.addProvider(new BitcoinWalletProvider(network));
const offerMessage = await alice.dlc.createDlcOffer(...)
Development
pnpm install
pnpm run build
Changeset Versioning
We use changesets to manage versioning and changelogs. When creating a pull request, include a summary of your changes in a changeset by running:
pnpm changeset
To bump the packages to the proper semantic version and publish:
pnpm version
pnpm publish
Production
pnpm build