Transfers
Transfers create transactions in one or more Wallets simultaneously to move funds from one source wallet to one or more destination wallets. The currencyCodes must be identical across all target balances. To transfer between different types of balances in the same Wallet, use an Exchange.
Transfer Funds
- TypeScript / JavaScript
let transfer = await solidtx.transfers.create({
sourceWalletId: 'wallet_yxeh6q5mmpik8w6cyvc9zcnn',
sourceBalanceId: 'gems',
destinations: [
{
walletId: 'wallet_cm8ozy99j00000cl7es122svt',
balanceId: 'gems',
amount: '10'
},
// Optionally, more destinations
]
})
Parameters
destinations TransferDestinationInput[]
amount stringRequired
The amount of the transfer. Must be a positive number.
Returns
Creates and returns the resulting transactions.
{
"sourceTransaction": {
"id": "transaction_cm8p6lhob00060cl6duzk7kxt",
"walletId": "wallet_yxeh6q5mmpik8w6cyvc9zcnn",
"balanceId": "gems",
"type": "TRANSFER",
"amount": "-10"
},
"destinationTransactions": [
{
"id": "transaction_cm8p6lq2e00070cl63sac8lbk",
"walletId": "wallet_cm8ozy99j00000cl7es122svt",
"balanceId": "gems",
"type": "Transfer",
"amount": "10"
}
]
}