Simple Transaction
Once you have created your account and requested funds from the faucet you are ready to send your first transaction.
Online Faucet
You can request test funds from the Shimmer Testnet Faucet.
Example Code
The following example will:
- Create a wallet.
- Get Alice's account which was created in the first guide.
- Send 1 SMR to an address using the
Account.send_amount(addresses_with_amount, options)
function. Make sure to update the code sample to send to the address of your choice.
- Rust
- Typescript (Node.js)
- Python
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Sync the account with the node to get the latest transactions by calling the
Account.sync()
function. - Send 1 SMR to an address using the
Account.send()
function. Make sure to update the code sample to send to the address of your choice.
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Send 1 SMR to an address using the
Account.send()
function. Make sure to update the code sample to send to the address of your choice.
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Send 1 SMR to an address using the
Account.send_with_params()
function. Make sure to update the code sample to send to the address of your choice.
Expected Output
Block sent: https://explorer.shimmer.network/testnet/block/0x47ec97658791954b9bcd5e47e6791396e3f340b82e81fe2cc7218f52ebec3804
Full Example Code
- Rust
- Typescript (Node.js)
- Python
sdk/examples/how_tos/simple_transaction/simple_transaction.rs
loading...
bindings/nodejs/examples/how_tos/simple_transaction/simple-transaction.ts
loading...
bindings/python/examples/how_tos/simple_transaction/simple_transaction.py
loading...