These code examples are designed to demonstrate how to integrate bcoin modules with minimal configuration.
- Simple fullnode - Creates a
FullNode
object and connects totestnet
. - Connect to peer - Connects to a user-defined
peer in
regtest
mode. - Connecting to the P2P network -
Creates
chain
,pool
, andmempool
objects for both main and testnet networks. - Creating a blockchain and mempool - Mines a block from the mempool to the chain.
- Wallet with dummy TX - Adds a "dummy" transaction to
the wallet and
tx
event is handled. - SPV sync - A transaction matching the SPV node's bloom filter is broadcast by a minimal full node to the SPV node.
- Plugin example - Demonstrates the
plugin
feature of bcoin'snode
object. - Client API usage - Demonstrates usage of the node and wallet API.
- Create and sign TX - Demonstrates how to use
mtx
andkeyring
modules to sign a transaction. - Get transaction from chain - Connects to live testnet network and syncs the first 1000 blocks with tx indexing active.
- Create watch only wallet - Imports an
xpub
into a new watch-only wallet that can derive addresses.