Skip to content

Transfer

Cryptocurrency coin transfers involve the movement of digital assets from one wallet address to another on a blockchain network. To initiate a transfer, the sender specifies the recipient's wallet address and the amount of cryptocurrency to be sent. The transaction details are then broadcasted to the network, where they are verified by block producers through a process called consensus. Once confirmed, the transaction is added to a block on the blockchain, which serves as a permanent and transparent record of the transfer. Users can track the progress of their transactions using block explorers, which provide real-time visibility into transaction status and details. It's important to double-check the recipient's wallet address before confirming a transfer, as cryptocurrency transactions are irreversible once executed.

Below you can find examples of how to transfer your KOIN using a variety of supported tools.

You can use the KOIN contract entry point transfer to transfer KOIN. This operation requires an open wallet to perform.

If you have not registered the KOIN contract in your CLI and therefore do not have the koin.transfer command, visit the documentation on Koinos CLI under the .koinosrc section to set it up.

Using the help command we can see the arguments for the method.

🔓 > help koin.transfer
Transfers the token
Usage: koin.transfer <to:address> <amount:amount>

With your wallet is already opened, the command is as follows:

koin.transfer 163m4hKj1QHLCyHgnyNPw8TZU5ov25QGQX 0.00000001
Transferring 0.00000001 tKOIN to 163m4hKj1QHLCyHgnyNPw8TZU5ov25QGQX
Transaction with ID 0x122060b2a3311a0daf4d604d846f4380aac01d2c35598ac8913cc419a09b2c86c1e3 containing 1 operations submitted.
Mana cost: 0.03383501 (Disk: 35, Network: 309, Compute: 574723)

When using the register_token command as indicated by the documentation on Koinos CLI under the .koinosrc section, the decimals of the token are taken into consideration. As demonstrated above, we are sending 0.00000001 KOIN as indicated by the 8 decimal places. If you want to use register_token with an offline wallet, you need to provide the precision and symbol manually.

register_token koin 19GYjDBVXU7keLbYvMLazsGQn3GTWHjHkK KOIN 8

The example below safely prepares a testnet transfer to an exchange deposit address. Verify that the exchange supports the same network before sending.

export async function exchangeTransferPreview(from, depositAddress, amount) {
  if (from === depositAddress) throw new Error("Addresses must be different");
  return previewTransfer({ from, to: depositAddress, amount });
}

View complete file · Run example

The online runner is dry-run only. Do not enter a WIF in an online environment. The complete source requires explicit local configuration before any testnet broadcast.