An open API service indexing awesome lists of open source software.

https://github.com/tradle/bitcoin-adapter


https://github.com/tradle/bitcoin-adapter

Last synced: 12 months ago
JSON representation

Awesome Lists containing this project

README

          

# @tradle/bitcoin-adapter

Bitcoin network adapter for [@tradle/engine](https://github.com/tradle/engine)

See adapter [API spec](https://github.com/tradle/engine/blob/eth/adapter.md)

## Usage

```js
const { testnet /*,bitcoin*/ } = require('@tradle/bitcoin-adapter')
const tradle = require('@tradle/engine')
const blockchain = testnet.createBlockchainAPI()
const privateKey = '..' // WIF private key
const transactor = testnet.createTransactor({ privateKey, blockchain })
const node = tradle.node({
// ...
network: testnet,
blockchain,
transactor
// ...
})

```