@yac-swap/yacoin-js-wallet-provider
v4.0.0
Published
[![Build Status](https://travis-ci.com/liquality/chainabstractionlayer.svg?branch=master)](https://travis-ci.com/liquality/chainabstractionlayer) [![Coverage Status](https://coveralls.io/repos/github/liquality/chainabstractionlayer/badge.svg?branch=master
Downloads
8
Readme
@yac-swap/bitcoin-js-wallet-provider
:warning: This project is under heavy development. Expect bugs & breaking changes.
:pencil: Introductory Blog Post: The Missing Tool to Cross-Chain Development
Query different blockchains with account management using a single and simple interface.
Installation
npm i @yac-swap/bitcoin-js-wallet-provider
or
<script src="https://cdn.jsdelivr.net/npm/@yac-swap/[email protected]/dist/bitcoin-ledger-provider.min.js"></script>
<!-- sourceMap at https://cdn.jsdelivr.net/npm/@yac-swap/[email protected]/dist/bitcoin-ledger-provider.min.js.map -->
<!-- available as window.BitcoinLedgerProvider -->
Usage
import { BitcoinJsWalletProvider } from '@yac-swap/bitcoin-js-wallet-provider'
import { BitcoinNetworks } from '@yac-swap/bitcoin-network'
import { generateMnemonic } from 'bip39'
const jsWallet = new BitcoinJsWalletProvider(
bitcoinNetworks[config.bitcoin.network],
config.bitcoin.rpc.host,
config.bitcoin.rpc.username,
config.bitcoin.rpc.password,
generateMnemonic(256),
'bech32'
)
await jsWallet.getAddresses(0, 1)