Builder

class Builder
Input for a swap between source and destination chains; for creating a TX on the source chain.
Protobuf type TW.THORChainSwap.Proto.SwapInput

Functions

Link copied to clipboard
Optional affiliate fee destination address.  A Rune address.
string affiliate_fee_address = 9;
Link copied to clipboard
Optional affiliate fee, percentage base points, e.g. 100 means 1%, 0 - 1000, as string. Empty means to ignore it.
string affiliate_fee_rate_bp = 10;
Link copied to clipboard
Optional expirationTime, will be now() + 15 min if not set
uint64 expiration_time = 12;
Link copied to clipboard
Optional extra custom memo, reserved for later use.
string extra_memo = 11;
Link copied to clipboard
Source address, on source chain
string from_address = 2;
Link copied to clipboard
The source amount, integer as string, in the smallest native unit of the chain
string from_amount = 7;
Link copied to clipboard
Source chain
.TW.THORChainSwap.Proto.Asset from_asset = 1;
Link copied to clipboard
ThorChain router, only in case of Ethereum source network
string router_address = 6;
Link copied to clipboard
Destination address, on destination chain
string to_address = 4;
Link copied to clipboard
The minimum accepted destination amount.  Actual destination amount will depend on current rates, limit amount can be used to prevent using very unfavorable rates.
string to_amount_limit = 8;
Link copied to clipboard
Destination chain+asset, on destination chain
.TW.THORChainSwap.Proto.Asset to_asset = 3;
Link copied to clipboard
ThorChainSwap vault, on the source chain. Should be queried afresh, as it may change
string vault_address = 5;
Link copied to clipboard
Optional affiliate fee destination address.  A Rune address.
string affiliate_fee_address = 9;
Link copied to clipboard
open fun getAffiliateFeeAddressBytes(): ByteString
Optional affiliate fee destination address.  A Rune address.
string affiliate_fee_address = 9;
Link copied to clipboard
Optional affiliate fee, percentage base points, e.g. 100 means 1%, 0 - 1000, as string. Empty means to ignore it.
string affiliate_fee_rate_bp = 10;
Link copied to clipboard
open fun getAffiliateFeeRateBpBytes(): ByteString
Optional affiliate fee, percentage base points, e.g. 100 means 1%, 0 - 1000, as string. Empty means to ignore it.
string affiliate_fee_rate_bp = 10;
Link copied to clipboard
Optional expirationTime, will be now() + 15 min if not set
uint64 expiration_time = 12;
Link copied to clipboard
open fun getExtraMemo(): String
Optional extra custom memo, reserved for later use.
string extra_memo = 11;
Link copied to clipboard
open fun getExtraMemoBytes(): ByteString
Optional extra custom memo, reserved for later use.
string extra_memo = 11;
Link copied to clipboard
Source address, on source chain
string from_address = 2;
Link copied to clipboard
open fun getFromAddressBytes(): ByteString
Source address, on source chain
string from_address = 2;
Link copied to clipboard
open fun getFromAmount(): String
The source amount, integer as string, in the smallest native unit of the chain
string from_amount = 7;
Link copied to clipboard
open fun getFromAmountBytes(): ByteString
The source amount, integer as string, in the smallest native unit of the chain
string from_amount = 7;
Link copied to clipboard
open fun getFromAsset(): Asset
Source chain
.TW.THORChainSwap.Proto.Asset from_asset = 1;
Link copied to clipboard
ThorChain router, only in case of Ethereum source network
string router_address = 6;
Link copied to clipboard
open fun getRouterAddressBytes(): ByteString
ThorChain router, only in case of Ethereum source network
string router_address = 6;
Link copied to clipboard
open fun getToAddress(): String
Destination address, on destination chain
string to_address = 4;
Link copied to clipboard
open fun getToAddressBytes(): ByteString
Destination address, on destination chain
string to_address = 4;
Link copied to clipboard
The minimum accepted destination amount.  Actual destination amount will depend on current rates, limit amount can be used to prevent using very unfavorable rates.
string to_amount_limit = 8;
Link copied to clipboard
open fun getToAmountLimitBytes(): ByteString
The minimum accepted destination amount.  Actual destination amount will depend on current rates, limit amount can be used to prevent using very unfavorable rates.
string to_amount_limit = 8;
Link copied to clipboard
open fun getToAsset(): Asset
Destination chain+asset, on destination chain
.TW.THORChainSwap.Proto.Asset to_asset = 3;
Link copied to clipboard
ThorChainSwap vault, on the source chain. Should be queried afresh, as it may change
string vault_address = 5;
Link copied to clipboard
open fun getVaultAddressBytes(): ByteString
ThorChainSwap vault, on the source chain. Should be queried afresh, as it may change
string vault_address = 5;
Link copied to clipboard
open fun hasFromAsset(): Boolean
Source chain
.TW.THORChainSwap.Proto.Asset from_asset = 1;
Link copied to clipboard
open fun hasToAsset(): Boolean
Destination chain+asset, on destination chain
.TW.THORChainSwap.Proto.Asset to_asset = 3;
Link copied to clipboard
Source chain
.TW.THORChainSwap.Proto.Asset from_asset = 1;
Link copied to clipboard
Destination chain+asset, on destination chain
.TW.THORChainSwap.Proto.Asset to_asset = 3;
Link copied to clipboard
Optional affiliate fee destination address.  A Rune address.
string affiliate_fee_address = 9;
Link copied to clipboard
Optional affiliate fee destination address.  A Rune address.
string affiliate_fee_address = 9;
Link copied to clipboard
Optional affiliate fee, percentage base points, e.g. 100 means 1%, 0 - 1000, as string. Empty means to ignore it.
string affiliate_fee_rate_bp = 10;
Link copied to clipboard
Optional affiliate fee, percentage base points, e.g. 100 means 1%, 0 - 1000, as string. Empty means to ignore it.
string affiliate_fee_rate_bp = 10;
Link copied to clipboard
Optional expirationTime, will be now() + 15 min if not set
uint64 expiration_time = 12;
Link copied to clipboard
Optional extra custom memo, reserved for later use.
string extra_memo = 11;
Link copied to clipboard
Optional extra custom memo, reserved for later use.
string extra_memo = 11;
Link copied to clipboard
Source address, on source chain
string from_address = 2;
Link copied to clipboard
Source address, on source chain
string from_address = 2;
Link copied to clipboard
The source amount, integer as string, in the smallest native unit of the chain
string from_amount = 7;
Link copied to clipboard
The source amount, integer as string, in the smallest native unit of the chain
string from_amount = 7;
Link copied to clipboard
open fun setFromAsset(builderForValue: Builder): THORChainSwap.SwapInput.Builder
Source chain
.TW.THORChainSwap.Proto.Asset from_asset = 1;
Link copied to clipboard
ThorChain router, only in case of Ethereum source network
string router_address = 6;
Link copied to clipboard
ThorChain router, only in case of Ethereum source network
string router_address = 6;
Link copied to clipboard
Destination address, on destination chain
string to_address = 4;
Link copied to clipboard
Destination address, on destination chain
string to_address = 4;
Link copied to clipboard
The minimum accepted destination amount.  Actual destination amount will depend on current rates, limit amount can be used to prevent using very unfavorable rates.
string to_amount_limit = 8;
Link copied to clipboard
The minimum accepted destination amount.  Actual destination amount will depend on current rates, limit amount can be used to prevent using very unfavorable rates.
string to_amount_limit = 8;
Link copied to clipboard
open fun setToAsset(builderForValue: Builder): THORChainSwap.SwapInput.Builder
Destination chain+asset, on destination chain
.TW.THORChainSwap.Proto.Asset to_asset = 3;
Link copied to clipboard
ThorChainSwap vault, on the source chain. Should be queried afresh, as it may change
string vault_address = 5;
Link copied to clipboard
ThorChainSwap vault, on the source chain. Should be queried afresh, as it may change
string vault_address = 5;