Skip to content

Latest commit

 

History

History
120 lines (68 loc) · 3.38 KB

L2BitcoinDepositor.md

File metadata and controls

120 lines (68 loc) · 3.38 KB

Interface: L2BitcoinDepositor

Interface for communication with the L2BitcoinDepositor on-chain contract deployed on the given L2 chain.

Implemented by

Table of contents

Methods

Methods

extraDataEncoder

extraDataEncoder(): CrossChainExtraDataEncoder

Returns

CrossChainExtraDataEncoder

Extra data encoder for this contract. The encoder is used to encode and decode the extra data included in the cross-chain deposit script.

Defined in

src/lib/contracts/cross-chain.ts:92


getChainIdentifier

getChainIdentifier(): ChainIdentifier

Gets the chain-specific identifier of this contract.

Returns

ChainIdentifier

Defined in

src/lib/contracts/cross-chain.ts:72


getDepositOwner

getDepositOwner(): undefined | ChainIdentifier

Gets the identifier that should be used as the owner of the deposits issued by this contract.

Returns

undefined | ChainIdentifier

The identifier of the deposit owner or undefined if not set.

Defined in

src/lib/contracts/cross-chain.ts:79


initializeDeposit

initializeDeposit(depositTx, depositOutputIndex, deposit, vault?): Promise<Hex>

Initializes the cross-chain deposit indirectly through the given L2 chain.

Parameters

Name Type Description
depositTx BitcoinRawTxVectors Deposit transaction data
depositOutputIndex number Index of the deposit transaction output that funds the revealed deposit
deposit DepositReceipt Data of the revealed deposit
vault? ChainIdentifier Optional parameter denoting the vault the given deposit should be routed to

Returns

Promise<Hex>

Transaction hash of the reveal deposit transaction.

Defined in

src/lib/contracts/cross-chain.ts:104


setDepositOwner

setDepositOwner(depositOwner): void

Sets the identifier that should be used as the owner of the deposits issued by this contract.

Parameters

Name Type Description
depositOwner ChainIdentifier Identifier of the deposit owner or undefined to clear.

Returns

void

Defined in

src/lib/contracts/cross-chain.ts:86