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:155
Parameters:
Name | Type |
---|---|
transactionHex | string |
network | string |
Returns: Promise‹string›
getAddress
▸ getAddress(): Promise‹string›
Implementation of BitcoinWallet
Defined in src/wallet/bitcoin.ts:129
Returns: Promise‹string›
getBalance
▸ getBalance(): Promise‹number›
Implementation of BitcoinWallet
Defined in src/wallet/bitcoin.ts:122
Returns: Promise‹number›
getFee
▸ getFee(): string
Implementation of BitcoinWallet
Defined in src/wallet/bitcoin.ts:168
Returns: string
sendToAddress
▸ sendToAddress(address
: string, satoshis
: number, network
: string): Promise‹string›
Implementation of BitcoinWallet
Defined in src/wallet/bitcoin.ts:134
Parameters:
Name | Type |
---|---|
address | string |
satoshis | number |
network | string |
Returns: Promise‹string›
Static
newInstance
▸ newInstance(network
: string, peerUri
: string, hdKey
: string): Promise‹InMemoryBitcoinWallet›
Defined in src/wallet/bitcoin.ts:37
Parameters:
Name | Type |
---|---|
network | string |
peerUri | string |
hdKey | string |
Returns: Promise‹InMemoryBitcoinWallet›