Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 2.12 KB

DepositorProxy.md

File metadata and controls

64 lines (39 loc) · 2.12 KB

Interface: DepositorProxy

Interface representing a depositor proxy contract. A depositor proxy is used to reveal deposits to the Bridge, on behalf of the user (i.e. original depositor). It receives minted TBTC tokens and can provide additional services to the user, such as routing the minted TBTC tokens to another protocols, in an automated way. Depositor proxy is responsible for attributing the deposit and minted TBTC tokens to the user (e.g. using the optional 32-byte extra data field of the deposit script).

Implemented by

Table of contents

Methods

Methods

getChainIdentifier

getChainIdentifier(): ChainIdentifier

Gets the chain-specific identifier of this contract.

Returns

ChainIdentifier

Defined in

src/lib/contracts/depositor-proxy.ts:19


revealDeposit

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

Reveals a given deposit to the on-chain Bridge contract.

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/depositor-proxy.ts:31