Skip to content

@liquality.evm.EvmBaseSwapProvider

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

Class: EvmBaseSwapProvider

@liquality/evm.EvmBaseSwapProvider

Hierarchy

  • default<BaseProvider, Signer>

    EvmBaseSwapProvider

    ↳↳ EvmSwapProvider

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new EvmBaseSwapProvider(swapOptions, walletProvider?)

Parameters

Name Type
swapOptions EvmSwapOptions
walletProvider? EvmBaseWalletProvider<BaseProvider, Signer>

Overrides

Swap<BaseProvider, Signer&gt;.constructor

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:19

Properties

contract

Protected contract: LiqualityHTLC

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:16


swapOptions

Protected swapOptions: EvmSwapOptions

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:17


walletProvider

Protected walletProvider: EvmBaseWalletProvider<BaseProvider, Signer>

Overrides

Swap.walletProvider

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:15

Methods

canUpdateFee

canUpdateFee(): boolean

Returns

boolean

Overrides

Swap.canUpdateFee

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:136


claimSwap

claimSwap(swapParams, initTxHash, secret, fee): Promise<Transaction<TransactionResponse>>

Parameters

Name Type
swapParams SwapParams
initTxHash string
secret string
fee FeeType

Returns

Promise<Transaction<TransactionResponse>>

Overrides

Swap.claimSwap

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:50


doesTransactionMatchInitiation

Protected doesTransactionMatchInitiation(swapParams, transaction): boolean

Parameters

Name Type
swapParams SwapParams
transaction Transaction<InitiateEvent>

Returns

boolean

Overrides

Swap.doesTransactionMatchInitiation

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:93


findClaimSwapTransaction

Abstract findClaimSwapTransaction(swapParams, initTxHash, _blockNumber?): Promise<Transaction<ClaimEvent>>

Parameters

Name Type
swapParams SwapParams
initTxHash string
_blockNumber? number

Returns

Promise<Transaction<ClaimEvent>>

Overrides

Swap.findClaimSwapTransaction

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:160


findInitiateSwapTransaction

Abstract findInitiateSwapTransaction(swapParams, _blockNumber?): Promise<Transaction<InitiateEvent>>

Parameters

Name Type
swapParams SwapParams
_blockNumber? number

Returns

Promise<Transaction<InitiateEvent>>

Overrides

Swap.findInitiateSwapTransaction

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:156


findRefundSwapTransaction

Abstract findRefundSwapTransaction(swapParams, initTxHash, blockNumber?): Promise<Transaction<RefundEvent>>

Parameters

Name Type
swapParams SwapParams
initTxHash string
blockNumber? number

Returns

Promise<Transaction<RefundEvent>>

Overrides

Swap.findRefundSwapTransaction

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:158


generateSecret

generateSecret(message): Promise<string>

Parameters

Name Type
message string

Returns

Promise<string>

Inherited from

Swap.generateSecret

Defined in

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


getSwapSecret

getSwapSecret(claimTx): Promise<string>

Parameters

Name Type
claimTx string

Returns

Promise<string>

Overrides

Swap.getSwapSecret

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:119


getWallet

getWallet(): any

Returns

any

Inherited from

Swap.getWallet

Defined in

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


initiateSwap

initiateSwap(swapParams, fee): Promise<Transaction<TransactionResponse>>

Parameters

Name Type
swapParams SwapParams
fee FeeType

Returns

Promise<Transaction<TransactionResponse>>

Overrides

Swap.initiateSwap

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:29


refundSwap

refundSwap(swapParams, initTxHash, fee): Promise<Transaction<TransactionResponse>>

Parameters

Name Type
swapParams SwapParams
initTxHash string
fee FeeType

Returns

Promise<Transaction<TransactionResponse>>

Overrides

Swap.refundSwap

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:75


setWallet

setWallet(wallet): void

Parameters

Name Type
wallet any

Returns

void

Inherited from

Swap.setWallet

Defined in

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


tryParseLog

Protected tryParseLog(log): LogDescription

Parameters

Name Type
log Log

Returns

LogDescription

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:144


updateTransactionFee

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

Parameters

Name Type
_tx string | Transaction<any>
_newFee FeeType

Returns

Promise<Transaction<any>>

Overrides

Swap.updateTransactionFee

Defined in

evm/lib/swap/EvmBaseSwapProvider.ts:140


validateSwapParams

validateSwapParams(swapParams): void

Parameters

Name Type
swapParams SwapParams

Returns

void

Inherited from

Swap.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

Swap.verifyInitiateSwapTransaction

Defined in

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

Clone this wiki locally