⚠️ This project is under heavy development. Expect bugs & breaking changes.
Query different blockchains with account management using a single and simple interface.
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.
bitcoin-cfd-provider bitcoin-dlc-provider bitcoin-wallet-provider
@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
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-networks'
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(...)
yarn install
yarn bootstrap
yarn watch
We use changesets to manage versioning and changelogs. When creating a pull request, include a summary of your changes in a changeset by running:
yarn changeset
To bump the packages to the proper semantic version and publish:
yarn version
yarn publish
yarn build