Skip to content

Latest commit

 

History

History
225 lines (144 loc) · 4.3 KB

TransferInput.md

File metadata and controls

225 lines (144 loc) · 4.3 KB

TransferInput

data class TransferInput(
 val type: TransferType?,
 val size: TransferInputSize?,
 val fastSpeed: Boolean,
 val fee: Double?,  val chain: String?,  val address: String?,  val memo: String?,  val depositOptions: DepositInputOptions?,
 val withdrawalOptions: WithdrawalInputOptions?,
 val transferOutOptions: TransferOutInputOptions?,  val summary: TransferInputSummary?,  val resources: TransferInputResources?,  val requestPayload: TransferInputRequestPayload? )

type

deposit, withdrawal, transferOut;

size

Size of the transfer

fastSpeed

Only for v3 withdrawal, option to use fast withdrawal

fee

Total amount of fee, deducted from the size

chain

Selected chain to perform the transfer

address

Selected token address of the chain to perform the transfer

memo

Memo for transfer

depositOptions

structure of DepositInputOptions

withdrawalOptions

structure of WithdrawalInputOptions

transferOutOptions

structure of TransferOutInputOptions

summary

structure of TransferInputSummary

resources

structure of TransferInputResources

requestPayload

structure of TransferInputRequestPayload

DepositInputOptions

data class DepositInputOptions(
 val needsSize: Boolean?,
 val needsAddress: Boolean?,
 val needsFastSpeed: Boolean?,
 val assets: Array?
)

needsSize

UX should let user enter the size

needsAddress

UX should let user enter a wallet address

needsFastSpeed

UX should let the user choose whether to use fast speed

assets

Option of assets to choose from

WithdrawalInputOptions

data class DepositInputOptions(
 val needsSize: Boolean?,
 val needsAddress: Boolean?,
 val needsFastSpeed: Boolean?,
 val exchanges: Array?
 val chains: Array?
 val assets: Array?
)

needsSize

UX should let user enter the size

needsAddress

UX should let user enter a wallet address

needsFastSpeed

UX should let the user choose whether to use fast speed

exchanges

Option of exchanges to choose from

chains

Option of chains to choose from

assets

Option of assets to choose from

TransferOutInputOptions

data class TransferOutInputOptions(
 val needsSize: Boolean?,
 val needsAddress: Boolean?,
 val chains: Array?,  val assets: Array?
)

needsSize

UX should let user enter the size

needsAddress

UX should let user enter a wallet address

chains

Option of chains to choose from

assets

Option of assets to choose from

TransferInputSummary

data class TransferInputSummary(
 val usdcSize: Double?,
 val fee: Double?,
 val filled: Boolean
)

usdcSize

Amount of USDC

fee

Fee in USDC

filled

Whether the transfer transaction can be filled

TransferInputResources

The chain and token resources of the selected chain and its associated tokens. Use the chainId and token address of the key to the maps, respectively, to get the resource.

data class TransferInputResources(  var chainResources: Map<String, TransferInputChainResource>?,  var tokenResources: Map<String, TransferInputTokenResource>? )

TransferInputChainResource

The chain resource of the selected chain

data class TransferInputChainResource(  val chainName: String?,  val rpc: String?,  val networkName: String?,  val chainId: Int?,  val iconUrl: String? )

TransferInputTokenResource

The token resource of the selected token

data class TransferInputTokenResource(  var name: String?,  var address: String?,  var symbol: String?,  var decimals: Int?,  var iconUrl: String? )

TransferInputRequestPayload

Payload needed for the client to sign call sendTransaction()

data class TransferInputRequestPayload(  val routeType: String?,  val targetAddress: String?,  val data: String?,  val value: String?,  val gasLimit: String?,  val gasPrice: String?,  val maxFeePerGas: String?,  val maxPriorityFeePerGas: String? )