Skip to content

Latest commit

 

History

History
116 lines (66 loc) · 3.07 KB

File metadata and controls

116 lines (66 loc) · 3.07 KB

Class: Spv

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Spv(tbtcContracts, bitcoinClient): Spv

Parameters

Name Type
tbtcContracts TBTCContracts
bitcoinClient BitcoinClient

Returns

Spv

Defined in

src/services/maintenance/spv.ts:21

Properties

bitcoinClient

Private Readonly bitcoinClient: BitcoinClient

Bitcoin client handle.

Defined in

src/services/maintenance/spv.ts:19


tbtcContracts

Private Readonly tbtcContracts: TBTCContracts

Handle to tBTC contracts.

Defined in

src/services/maintenance/spv.ts:15

Methods

submitDepositSweepProof

submitDepositSweepProof(transactionHash, mainUtxo, vault?): Promise<void>

Prepares the proof of a deposit sweep transaction and submits it to the Bridge on-chain contract.

Parameters

Name Type Description
transactionHash BitcoinTxHash Hash of the transaction being proven.
mainUtxo BitcoinUtxo Recent main UTXO of the wallet as currently known on-chain.
vault? ChainIdentifier (Optional) The vault pointed by swept deposits.

Returns

Promise<void>

Empty promise.

Defined in

src/services/maintenance/spv.ts:34


submitRedemptionProof

submitRedemptionProof(transactionHash, mainUtxo, walletPublicKey): Promise<void>

Prepares the proof of a redemption transaction and submits it to the Bridge on-chain contract.

Parameters

Name Type Description
transactionHash BitcoinTxHash Hash of the transaction being proven.
mainUtxo BitcoinUtxo Recent main UTXO of the wallet as currently known on-chain.
walletPublicKey Hex Bitcoin public key of the wallet. Must be in the compressed form (33 bytes long with 02 or 03 prefix).

Returns

Promise<void>

Empty promise.

Defined in

src/services/maintenance/spv.ts:67