Version: next

InMemoryBitcoinWallet

Dummy Bitcoin wallet based on bcoin.

This is to be used for demos, examples and dev environment only. No safeguards are applied, no data is written on the disk. This is not to be used for mainnet, instead, implement your own BitcoinWallet

Hierarchy

  • InMemoryBitcoinWallet

Implements

Index

Methods

Methods

broadcastTransaction

broadcastTransaction(transactionHex: string, network: string): Promise‹string›

Implementation of BitcoinWallet

Defined in src/wallet/bitcoin.ts:153

Parameters:

NameType
transactionHexstring
networkstring

Returns: Promise‹string›


close

close(): Promise‹void›

Defined in src/wallet/bitcoin.ts:171

Returns: Promise‹void›


getAddress

getAddress(): Promise‹string›

Implementation of BitcoinWallet

Defined in src/wallet/bitcoin.ts:127

Returns: Promise‹string›


getBalance

getBalance(): Promise‹number›

Implementation of BitcoinWallet

Defined in src/wallet/bitcoin.ts:120

Returns: Promise‹number›


getFee

getFee(): string

Implementation of BitcoinWallet

Defined in src/wallet/bitcoin.ts:166

Returns: string


sendToAddress

sendToAddress(address: string, satoshis: number, network: string): Promise‹string›

Implementation of BitcoinWallet

Defined in src/wallet/bitcoin.ts:132

Parameters:

NameType
addressstring
satoshisnumber
networkstring

Returns: Promise‹string›


Static newInstance

newInstance(network: string, peerUri: string, hdKey: string): Promise‹InMemoryBitcoinWallet

Defined in src/wallet/bitcoin.ts:37

Parameters:

NameType
networkstring
peerUristring
hdKeystring

Returns: Promise‹InMemoryBitcoinWallet