Skip to content

@liquality.terra.TerraSwapProvider

Krasimir Raykov edited this page Mar 29, 2022 · 3 revisions

Class: TerraSwapProvider

@liquality/terra.TerraSwapProvider

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TerraSwapProvider(walletProvider, helperUrl)

Parameters

Name Type
walletProvider TerraWalletProvider
helperUrl string

Overrides

TerraSwapBaseProvider.constructor

Defined in

terra/lib/swap/TerraSwapProvider.ts:19

Properties

walletProvider

Protected walletProvider: TerraWalletProvider

Inherited from

TerraSwapBaseProvider.walletProvider

Defined in

client/dist/lib/Swap.d.ts:4

Methods

canUpdateFee

canUpdateFee(): boolean

Returns

boolean

Inherited from

TerraSwapBaseProvider.canUpdateFee

Defined in

terra/lib/swap/TerraSwapBaseProvider.ts:87


claimSwap

claimSwap(swapParams, initiationTxHash, secret, fee?): Promise<Transaction<TerraTxInfo>>

Parameters

Name Type
swapParams SwapParams
initiationTxHash string
secret string
fee? FeeType

Returns

Promise<Transaction<TerraTxInfo>>

Inherited from

TerraSwapBaseProvider.claimSwap

Defined in

terra/lib/swap/TerraSwapBaseProvider.ts:42


doesTransactionMatchInitiation

Protected doesTransactionMatchInitiation(swapParams, initTx): Promise<boolean>

Parameters

Name Type
swapParams SwapParams
initTx Transaction<TerraTxInfo>

Returns

Promise<boolean>

Inherited from

TerraSwapBaseProvider.doesTransactionMatchInitiation

Defined in

terra/lib/swap/TerraSwapBaseProvider.ts:73


findClaimSwapTransaction

findClaimSwapTransaction(swapParams, initTxHash): Promise<Transaction<TerraTxInfo>>

Parameters

Name Type
swapParams SwapParams
initTxHash string

Returns

Promise<Transaction<TerraTxInfo>>

Overrides

TerraSwapBaseProvider.findClaimSwapTransaction

Defined in

terra/lib/swap/TerraSwapProvider.ts:33


findInitiateSwapTransaction

findInitiateSwapTransaction(swapParams): Promise<Transaction<TerraTxInfo>>

Parameters

Name Type
swapParams SwapParams

Returns

Promise<Transaction<TerraTxInfo>>

Overrides

TerraSwapBaseProvider.findInitiateSwapTransaction

Defined in

terra/lib/swap/TerraSwapProvider.ts:24


findRefundSwapTransaction

findRefundSwapTransaction(swapParams, initTxHash): Promise<Transaction<TerraTxInfo>>

Parameters

Name Type
swapParams SwapParams
initTxHash string

Returns

Promise<Transaction<TerraTxInfo>>

Overrides

TerraSwapBaseProvider.findRefundSwapTransaction

Defined in

terra/lib/swap/TerraSwapProvider.ts:45


generateSecret

generateSecret(message): Promise<string>

Parameters

Name Type
message string

Returns

Promise<string>

Inherited from

TerraSwapBaseProvider.generateSecret

Defined in

client/dist/lib/Swap.d.ts:10


getSwapSecret

getSwapSecret(claimTxHash, _initTxHash?): Promise<string>

Parameters

Name Type
claimTxHash string
_initTxHash? string

Returns

Promise<string>

Inherited from

TerraSwapBaseProvider.getSwapSecret

Defined in

terra/lib/swap/TerraSwapBaseProvider.ts:68


getWallet

getWallet(): TerraWalletProvider

Returns

TerraWalletProvider

Inherited from

TerraSwapBaseProvider.getWallet

Defined in

client/dist/lib/Swap.d.ts:7


initiateSwap

initiateSwap(swapParams, fee?): Promise<Transaction<TerraTxInfo>>

Parameters

Name Type
swapParams SwapParams
fee? FeeType

Returns

Promise<Transaction<TerraTxInfo>>

Inherited from

TerraSwapBaseProvider.initiateSwap

Defined in

terra/lib/swap/TerraSwapBaseProvider.ts:11


refundSwap

refundSwap(swapParams, initTx, fee?): Promise<Transaction<TerraTxInfo>>

Parameters

Name Type
swapParams SwapParams
initTx string
fee? FeeType

Returns

Promise<Transaction<TerraTxInfo>>

Inherited from

TerraSwapBaseProvider.refundSwap

Defined in

terra/lib/swap/TerraSwapBaseProvider.ts:59


setWallet

setWallet(wallet): void

Parameters

Name Type
wallet TerraWalletProvider

Returns

void

Inherited from

TerraSwapBaseProvider.setWallet

Defined in

client/dist/lib/Swap.d.ts:6


updateTransactionFee

updateTransactionFee(_tx, _newFee): Promise<Transaction<TerraTxInfo>>

Parameters

Name Type
_tx string | Transaction<TerraTxInfo>
_newFee FeeType

Returns

Promise<Transaction<TerraTxInfo>>

Inherited from

TerraSwapBaseProvider.updateTransactionFee

Defined in

terra/lib/swap/TerraSwapBaseProvider.ts:91


validateSwapParams

validateSwapParams(swapParams): void

Parameters

Name Type
swapParams SwapParams

Returns

void

Inherited from

TerraSwapBaseProvider.validateSwapParams

Defined in

client/dist/lib/Swap.d.ts:9


verifyInitiateSwapTransaction

verifyInitiateSwapTransaction(swapParams, initTx): Promise<boolean>

Parameters

Name Type
swapParams SwapParams
initTx string | Transaction<any>

Returns

Promise<boolean>

Inherited from

TerraSwapBaseProvider.verifyInitiateSwapTransaction

Defined in

client/dist/lib/Swap.d.ts:8

Clone this wiki locally