Transfer

@Serializable
@SerialName(value = "transfer")
data class Transfer(val asset: Asset, val amount: BigInteger, val to: String, val isMax: Boolean = false, val memo: String? = null) : Transaction

Represents a simple asset transfer transaction.

A Transfer moves assets from one address to another. It supports:

  • Native coin transfers (ETH, BTC, etc.)

  • Token transfers (ERC-20, etc.)

  • Optional memo/data field for additional transaction data

  • An isMax hint for "send max" UX flows.

The amount field is always the concrete value that will be used by the SDK when calculating fees, building pre-image hashes and compiling signed transactions. When isMax is true, callers are responsible for precomputing the correct max-transfer amount (for example balance - fee.maxFeeWei for native coins) and passing that value here. The SDK does not derive or adjust amount based on isMax.

See also

Constructors

Link copied to clipboard
constructor(asset: Asset, amount: BigInteger, to: String, isMax: Boolean = false, memo: String? = null)

Properties

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
open override val amount: BigInteger

The amount in the asset's smallest unit

Link copied to clipboard
open override val asset: Asset

The asset being transferred

Link copied to clipboard

Hint that this transfer was created from a "send max" flow. It is informational only and does not change how amount is processed.

Link copied to clipboard
val memo: String?

Optional memo or data field (e.g., for exchange deposits)

Link copied to clipboard
val to: String

The recipient's address