Skip to main content

Send Native Tokens

After you have created a native token, you can easily send it by calling the Account.send_native_tokens(params, options) function.

As with any output, you can set output unlock conditions. Keep in mind that if you set unlock conditions, whoever you send the native tokens to may need to claim them.

Code Example

The following example will:

  1. Create an account manager.
  2. Get Alice's account which was created in the first guide.
  3. Define the type of native token and amount to send.
  4. Send the native tokens calling the Account.send_native_tokens(params, options) function.
sdk/examples/how_tos/native_tokens/send.rs
loading...

Expected Output

Balance before sending: 50
Transaction sent: 0x9a1ea93962b5d4ba3a27053f4727dcc95b29ee35dc85c43d9d6be4635ab10463
Block included: https://explorer.shimmer.network/testnet/block/0xb22cba455a3176ef62352f907b0fc5e5e49b4797563826141f8057cfa960a640
Balance after sending: 40