Version: 0.15.2

BitcoinWallet

Interface defining the Bitcoin wallet functionalities needed by the SDK to execute a swap involving Bitcoin. It is expected from a COMIT App developer to write their own class that would implement this interface. Depending on the use case and platform, such class could interact with a hardware wallet API, display QR codes, take input via text fields, etc.

Hierarchy

  • BitcoinWallet

Implemented by

Index

Methods

Methods

broadcastTransaction

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

Defined in src/wallet/bitcoin.ts:21

Parameters:

NameType
transactionHexstring
networkstring

Returns: Promise‹string›


getAddress

getAddress(): Promise‹string›

Defined in src/wallet/bitcoin.ts:11

Returns: Promise‹string›


getBalance

getBalance(): Promise‹number›

Defined in src/wallet/bitcoin.ts:13

Returns: Promise‹number›


getFee

getFee(): string

Defined in src/wallet/bitcoin.ts:26

Returns: string


sendToAddress

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

Defined in src/wallet/bitcoin.ts:15

Parameters:

NameType
addressstring
satoshisnumber
networkstring

Returns: Promise‹string›