Transfer API
Last updated
Last updated
In order to transfer assets from one wallet to another you will need to...
calculate whether the user has enough funds after fees
check any restrictions on transfer
actually trigger the transfer
In order to ensure the transaction goes through successfully, check the user's balance as close as possible to the actual point in which the transaction is triggered. With the latest balance determine how much the user intends to send, estimate the fee amount, and then validate whether the user has enough balance to cover both.
The fee is always estimated in the the native blockchain currency. So for example, a USDC transfer will have an ETH fee so the balance for both need to be c
Some asset types have unique restrictions. In these cases, we give you the option to check these restrictions BEFORE sending the transaction which will prevent your end user from submitting failed transactions and losing out on fee money.
Every Algorand Standard Asset (any asset other than Algo itself) requires the user to opt in before it is received. You can check if the end recipient of the transfer is opted in. If they are not and that recipient is in your ecosystem, you could inform them that they are not opted in and allow them to do so as described in Algorand Opt In.
ERC-1404s and their equivalents on other chains are customized to have their own transfer restrictions. For example, an address may be restricted from sending until a certain date or limited to a certain group of addresses. You can preemptively detect any restrictions on the current inputs and show what those restrictions actually are using the endpoints below.
Once all checks are confirmed you can trigger the transfer by sending along the seed phrase with transaction details as described in
Asset valid address
0x9bf4001d307dfd62b26a2f1307ee0c0307632d59
Asset symbol, for instance: USDT, ETH, ALGO, etc, ...
USDT
Optional value only used when dealing with non native assets (aka tokens), it can be ERC_20, BEP_20, ALGO_STANDARD, ALGO_APP. If native asset, keep the field empty
ERC_20
Available options: Optional value only used when querying non native assets(tokens), it can be ERC_20, BEP_20, ALGO_STANDARD. If native asset, keep the field empty
ERC_20
Asset symbol
ETH
The nature of the transaction on which a fee should be estimated for. By default TRANSFER_TX is used
TRANSFER_TX
Available options: Optional value only used when dealing with non native assets (aka tokens), it can be ERC_20, BEP_20, ALGO_STANDARD, ALGO_APP. If native asset, keep the field empty
ERC_20
Available options: Origin or spender address
0x6127DCB35b4625C2559526EEc22300c2Df804B5c
Recipient address
0x7cBc2e807d0191c5b9EA332CCec2423f8d72D626
Transfer or allowance amount
100
Fee estimate value was returned successfully
The address of the account that is being checked for optin status on particular assets or apps
KFMRQHJVVONKOLXTEQ33CNUQZ4NBGU2EDCE25KNKVMRYPRKLKCNQDAWWTM
Returns list of assets opted into
No content
Origin address
0x9bf4001d307dfd62b26a2f1307ee0c0307632d59
Recipient address
0xb44e88ff3c67de6e6548a6caf006bf6e1cb84111
value being sent
109203.1281
Asset ID inside wallaby system
ed378076-80c0-43ed-9914-5988e1abd748
Optional ERC1404 token contract address on chain, when this is supplied, the assetId field will be ignored
0x28aef3b18daec312860dd030102a427ed43dac71
Restriction info returned successfully
Restriction code to be interpreted by the API, by reading data from the contract
0
Asset ID inside wallaby system
ed378076-80c0-43ed-9914-5988e1abd748
Optional ERC1404 token contract address on chain, when this is supplied, the assetId field will be ignored
0x28aef3b18daec312860dd030102a427ed43dac71
Restriction message info returned successfully
Message retrieved from the backend
717ea458b62a430cb37ced7c22ebec97
e3421d7f9d6888ea83bef6b28ce0a2ab6eb6fe8a8fbfa3743240992590816b08f9a62edcc63296d056c552054d583fec36d23ef11dffb24c95aaf4a47d50dccc
Signature generated after signing the provided data field
0xb44e88ff3c67de6e6548a6caf006bf6e1cb841119d0b9ea1b7e9b2d36a5e0ed42fd9f5e543243d1d73dc4b7800cc2026f74961f4edc769699678a316abb34e661c
Origin address
0x6127DCB35b4625C2559526EEc22300c2Df804B5c
Recipient address
0x7cBc2e807d0191c5b9EA332CCec2423f8d72D626
Asset Wallaby UUID
a4dedb83-4d59-41ca-84b5-4b24a98878d8
Transfer amount
100
Transaction reference
a4dedb83-4d59-41ca-84b5-4b24a98878d8
Seed encrypted asymmetrically by current user corresponding wallaby auth public key, to be decrypted inside the secure code execution environment
{"iv":"b7b643ebccf35c262aa2d5c2729c5f3d","ephemPublicKey":"040cff71ed16f1105c45c2214c9e72d3eabde48efe3759c6f150352b19aa8054c302dc1fd8b4f3927bd7d74ae0186854b3a13de7673be4f8424a6ba3702c239729","ciphertext":"736bc1881a02fa08df4a3f1e35d426660e3c35471facba2866e960f8a19b783bac30d037b07dc9e6406e258d09a4a7e4a7cf58d20cf7b8b7201db0f80849a48d20389039e3fc196f42796fe6d501f47afb030f9946ecbc148d8da1e46c3793a4","mac":"b6cbbdbbc3a311d919340fc3ec9ee1911d9ead6d989efa73e0ac3303c51a353e"}
Transaction memo or note
Hello 1282991
Transfer transaction was broad-casted successfully