Skip to main content

EVMSpvWithdrawalData

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:13

Represents parsed withdrawal data used for claiming assets from the EVM SPV vault (UTXO-controlled vault).

Extends​

Constructors​

Constructor​

new EVMSpvWithdrawalData(btcTx): EVMSpvWithdrawalData;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:69

Parses and creates a withdrawal data from the bitcoin transaction

Parameters​

ParameterType
btcTxBtcTx

Returns​

EVMSpvWithdrawalData

Throws​

If the bitcoin transaction has invalid formatting

Inherited from​

SpvWithdrawalTransactionData.constructor

Properties​

btcTx​

readonly btcTx: BtcTx;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:62

A bitcoin transaction which contains this vault withdrawal data

Inherited from​

SpvWithdrawalTransactionData.btcTx


callerFeeRate​

readonly callerFeeRate: bigint;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:52

Inherited from​

SpvWithdrawalTransactionData.callerFeeRate


deserializers​

static deserializers: object = {};

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:25

A mapping of deserializers for different spv vault withdrawal data types coming from different smart chain implementations

Index Signature​

[type: string]: (serialized) => any

Inherited from​

SpvWithdrawalTransactionData.deserializers


executionExpiry​

readonly executionExpiry: number;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:57

Inherited from​

SpvWithdrawalTransactionData.executionExpiry


executionFeeRate​

readonly executionFeeRate: bigint;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:53

Inherited from​

SpvWithdrawalTransactionData.executionFeeRate


executionHash?​

readonly optional executionHash: string;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:56

Inherited from​

SpvWithdrawalTransactionData.executionHash


frontingFeeRate​

readonly frontingFeeRate: bigint;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:54

Inherited from​

SpvWithdrawalTransactionData.frontingFeeRate


rawAmounts​

readonly rawAmounts: bigint[];

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:50

Inherited from​

SpvWithdrawalTransactionData.rawAmounts


recipient​

readonly recipient: string;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:49

Inherited from​

SpvWithdrawalTransactionData.recipient

Methods​

deserialize()​

static deserialize<T>(data): T;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:34

Deserializer parsing the chain-specific spv vault withdrawal data from a JSON-compatible object representation

Type Parameters​

Type Parameter
T extends SpvWithdrawalTransactionData

Parameters​

ParameterTypeDescription
dataany

Returns​

T

Inherited from​

SpvWithdrawalTransactionData.deserialize


getCallerFee()​

getCallerFee(): bigint[];

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:164

Returns the fee paid out to the caller which submits the withdrawal transaction data on the smart chain, the fee is paid out from all the respective tokens being withdrawn from the vault (NOTE: This returns raw token amounts, which must be scaled by their respective vault configured multiplier to represent the actual amount of tokens)

Returns​

bigint[]

Inherited from​

SpvWithdrawalTransactionData.getCallerFee


getCreatedVaultUtxo()​

getCreatedVaultUtxo(): string;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:249

Gets the new vault ownership UTXO created by this transaction

Returns​

string

Inherited from​

SpvWithdrawalTransactionData.getCreatedVaultUtxo


getExecutionData()​

getExecutionData(): ExecutionData;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:223

Returns the execution action to be scheduled via the execution contract (swap+) or null if none specified

Returns​

ExecutionData

Inherited from​

SpvWithdrawalTransactionData.getExecutionData


getExecutionFee()​

getExecutionFee(): bigint[];

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:183

Returns the fee that is transferred to the execution contract if swap+ execution action is assigned, (NOTE: This returns raw token amounts, which must be scaled by their respective vault configured multiplier to represent the actual amount of tokens)

Returns​

bigint[]

Inherited from​

SpvWithdrawalTransactionData.getExecutionFee


getFrontingAmount()​

getFrontingAmount(): bigint[];

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:59

Returns​

bigint[]

Inherit Doc​


getFrontingFee()​

getFrontingFee(): bigint[];

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:174

Returns the fee paid out to the fronter which fronts the actual withdrawal on the smart chain, the fee is paid out from all the respective tokens being withdrawn from the vault (NOTE: This returns raw token amounts, which must be scaled by their respective vault configured multiplier to represent the actual amount of tokens)

Returns​

bigint[]

Inherited from​

SpvWithdrawalTransactionData.getFrontingFee


getFrontingId()​

getFrontingId(): string;

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:36

Computes a unique withdrawal fronting ID that is to be used when fronting the withdrawal

Returns​

string

Overrides​

SpvWithdrawalTransactionData.getFrontingId


getNewVaultBtcAmount()​

getNewVaultBtcAmount(): number;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:263

Gets the output btc amount (in satoshis) assigned to the new vault ownership UTXO

Returns​

number

Inherited from​

SpvWithdrawalTransactionData.getNewVaultBtcAmount


getNewVaultScript()​

getNewVaultScript(): Buffer;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:256

Gets the output locking script used for the new vault ownership UTXO

Returns​

Buffer

Inherited from​

SpvWithdrawalTransactionData.getNewVaultScript


getOutputWithoutFees()​

getOutputWithoutFees(): bigint[];

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:154

Returns the amounts of tokens that the recipient is gonna receive (NOTE: This returns raw token amounts, which must be scaled by their respective vault configured multiplier to represent the actual amount of tokens)

Returns​

bigint[]

Inherited from​

SpvWithdrawalTransactionData.getOutputWithoutFees


getRecipient()​

getRecipient(): string;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:133

Gets the recipient of the funds for this withdrawal

Returns​

string

Inherited from​

SpvWithdrawalTransactionData.getRecipient


getSpentVaultUtxo()​

getSpentVaultUtxo(): string;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:241

Gets the vault ownership UTXO that the bitcoin transaction spends

Returns​

string

Inherited from​

SpvWithdrawalTransactionData.getSpentVaultUtxo


getTotalOutput()​

getTotalOutput(): bigint[];

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:194

Returns the total amount of tokens withdrawn from the vault (including all the fees) (NOTE: This returns raw token amounts, which must be scaled by their respective vault configured multiplier to represent the actual amount of tokens)

Returns​

bigint[]

Throws​

In case the amounts overflow

Inherited from​

SpvWithdrawalTransactionData.getTotalOutput


getTxHash()​

getTxHash(): string;

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:52

Returns​

string

Inherit Doc​


getTxId()​

getTxId(): string;

Defined in: atomiq-base/src/spv_swap/SpvWithdrawalTransactionData.ts:234

Gets the transaction ID of the bitcoin transaction authorizing the withdrawal

Returns​

string

Inherited from​

SpvWithdrawalTransactionData.getTxId


isRecipient()​

isRecipient(address): boolean;

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:29

Checks if the provided recipient is the actual recipient of the funds in this withdrawal

Parameters​

ParameterTypeDescription
addressstring

Returns​

boolean

Overrides​

SpvWithdrawalTransactionData.isRecipient


serialize()​

serialize(): any;

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:66

Serializes the object to a JSON-compatible object (i.e. no bigints, functions, etc.)

Returns​

any

Overrides​

SpvWithdrawalTransactionData.serialize


serializeToStruct()​

serializeToStruct(): BitcoinVaultTransactionDataStruct;

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:76

Serializes the withdrawal data to the EVM contract struct representation.

Returns​

BitcoinVaultTransactionDataStruct


fromOpReturnData()​

protected fromOpReturnData(data): object;

Defined in: atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:22

Parses the data from the OP_RETURN script for a specific underlying chain

Parameters​

ParameterTypeDescription
dataBuffer

Returns​

object

NameTypeDefined in
executionHash?stringatomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:22
rawAmountsbigint[]atomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:22
recipientstringatomiq-chain-evm/src/evm/spv_swap/EVMSpvWithdrawalData.ts:22

Overrides​

SpvWithdrawalTransactionData.fromOpReturnData