blockchain-driver
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

blockchain-driver

Cycle.js driver for following blockchain clients

Examples

Example: bitcoind driver

import { makeTrustedBitcoindDriver } from 'blockchain-driver'
import { run } from '@cycle/run'
 
const blockchainDriver = makeTrustedBitcoindDriver({username: "foo", password: "bar", port: 18332})
 
run(main, {Blockchain: blockchainDriver})

Example: bcoin driver

import {makeTrustedBcoinNodeDriver, makeTrustedBcoinWalletDriver} from 'blockchain-driver
import { run } from '@cycle/run
 
const blockchainDriver = makeTrustedBcoinNodeDriver({apiKey: "my-secret-api-key", port: 18556, host: "localhost"})
const walletDriver = makeTrustedBcoinWalletDriver({/* same option with the above */})
 
run(main, {Blockchain: blockchainDriver, Wallet: walletDriver})

contributing

To run integration test, you must first run docker-compose up and yarn integration

bws test suite creates new wallet (and puts its pubkey onto the server) each time it runs. But since a bws has a cap for its wallet number able to create from same ip, you may have to re-run docker by docker-compose down && docker-compose up

Readme

Keywords

Package Sidebar

Install

npm i blockchain-driver

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

43.2 kB

Total Files

44

Last publish

Collaborators

  • joemphilips