-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.terra.TerraSwapProvider
@liquality/terra.TerraSwapProvider
-
↳
TerraSwapProvider
- canUpdateFee
- claimSwap
- doesTransactionMatchInitiation
- findClaimSwapTransaction
- findInitiateSwapTransaction
- findRefundSwapTransaction
- generateSecret
- getSwapSecret
- getWallet
- initiateSwap
- refundSwap
- setWallet
- updateTransactionFee
- validateSwapParams
- verifyInitiateSwapTransaction
• new TerraSwapProvider(walletProvider
, helperUrl
)
Name | Type |
---|---|
walletProvider |
TerraWalletProvider |
helperUrl |
string |
TerraSwapBaseProvider.constructor
terra/lib/swap/TerraSwapProvider.ts:19
• Protected
walletProvider: TerraWalletProvider
TerraSwapBaseProvider.walletProvider
client/dist/lib/Swap.d.ts:4
▸ canUpdateFee(): boolean
boolean
TerraSwapBaseProvider.canUpdateFee
terra/lib/swap/TerraSwapBaseProvider.ts:87
▸ claimSwap(swapParams
, initiationTxHash
, secret
, fee?
): Promise
<Transaction
<TerraTxInfo
>>
Name | Type |
---|---|
swapParams |
SwapParams |
initiationTxHash |
string |
secret |
string |
fee? |
FeeType |
Promise
<Transaction
<TerraTxInfo
>>
TerraSwapBaseProvider.claimSwap
terra/lib/swap/TerraSwapBaseProvider.ts:42
▸ Protected
doesTransactionMatchInitiation(swapParams
, initTx
): Promise
<boolean
>
Name | Type |
---|---|
swapParams |
SwapParams |
initTx |
Transaction <TerraTxInfo > |
Promise
<boolean
>
TerraSwapBaseProvider.doesTransactionMatchInitiation
terra/lib/swap/TerraSwapBaseProvider.ts:73
▸ findClaimSwapTransaction(swapParams
, initTxHash
): Promise
<Transaction
<TerraTxInfo
>>
Name | Type |
---|---|
swapParams |
SwapParams |
initTxHash |
string |
Promise
<Transaction
<TerraTxInfo
>>
TerraSwapBaseProvider.findClaimSwapTransaction
terra/lib/swap/TerraSwapProvider.ts:33
▸ findInitiateSwapTransaction(swapParams
): Promise
<Transaction
<TerraTxInfo
>>
Name | Type |
---|---|
swapParams |
SwapParams |
Promise
<Transaction
<TerraTxInfo
>>
TerraSwapBaseProvider.findInitiateSwapTransaction
terra/lib/swap/TerraSwapProvider.ts:24
▸ findRefundSwapTransaction(swapParams
, initTxHash
): Promise
<Transaction
<TerraTxInfo
>>
Name | Type |
---|---|
swapParams |
SwapParams |
initTxHash |
string |
Promise
<Transaction
<TerraTxInfo
>>
TerraSwapBaseProvider.findRefundSwapTransaction
terra/lib/swap/TerraSwapProvider.ts:45
▸ generateSecret(message
): Promise
<string
>
Name | Type |
---|---|
message |
string |
Promise
<string
>
TerraSwapBaseProvider.generateSecret
client/dist/lib/Swap.d.ts:10
▸ getSwapSecret(claimTxHash
, _initTxHash?
): Promise
<string
>
Name | Type |
---|---|
claimTxHash |
string |
_initTxHash? |
string |
Promise
<string
>
TerraSwapBaseProvider.getSwapSecret
terra/lib/swap/TerraSwapBaseProvider.ts:68
▸ getWallet(): TerraWalletProvider
TerraSwapBaseProvider.getWallet
client/dist/lib/Swap.d.ts:7
▸ initiateSwap(swapParams
, fee?
): Promise
<Transaction
<TerraTxInfo
>>
Name | Type |
---|---|
swapParams |
SwapParams |
fee? |
FeeType |
Promise
<Transaction
<TerraTxInfo
>>
TerraSwapBaseProvider.initiateSwap
terra/lib/swap/TerraSwapBaseProvider.ts:11
▸ refundSwap(swapParams
, initTx
, fee?
): Promise
<Transaction
<TerraTxInfo
>>
Name | Type |
---|---|
swapParams |
SwapParams |
initTx |
string |
fee? |
FeeType |
Promise
<Transaction
<TerraTxInfo
>>
TerraSwapBaseProvider.refundSwap
terra/lib/swap/TerraSwapBaseProvider.ts:59
▸ setWallet(wallet
): void
Name | Type |
---|---|
wallet |
TerraWalletProvider |
void
TerraSwapBaseProvider.setWallet
client/dist/lib/Swap.d.ts:6
▸ updateTransactionFee(_tx
, _newFee
): Promise
<Transaction
<TerraTxInfo
>>
Name | Type |
---|---|
_tx |
string | Transaction <TerraTxInfo > |
_newFee |
FeeType |
Promise
<Transaction
<TerraTxInfo
>>
TerraSwapBaseProvider.updateTransactionFee
terra/lib/swap/TerraSwapBaseProvider.ts:91
▸ validateSwapParams(swapParams
): void
Name | Type |
---|---|
swapParams |
SwapParams |
void
TerraSwapBaseProvider.validateSwapParams
client/dist/lib/Swap.d.ts:9
▸ verifyInitiateSwapTransaction(swapParams
, initTx
): Promise
<boolean
>
Name | Type |
---|---|
swapParams |
SwapParams |
initTx |
string | Transaction <any > |
Promise
<boolean
>
TerraSwapBaseProvider.verifyInitiateSwapTransaction
client/dist/lib/Swap.d.ts:8