Request Funds to Alias/NFT wallet
Alias and NFT outputs have their own address and therefore can hold their own base token or any other native asset.
Alias or NFT as wallet
Although this How-To shows how to use an Alias as wallet, the same code can be applied for NFTs with minor changes
Online Faucet
You can request test funds from the Shimmer Testnet Faucet.
Code Example
The following example will:
- Create a wallet.
- Get Alice's account which was created in the first guide.
- Retrieve the address of the first Alias output.
- Request funds to the
FAUCET_URL
you defined in the.env
file.
- Rust
- Nodejs
- Python
sdk/examples/how_tos/alias_wallet/request_funds.rs
loading...
bindings/nodejs/examples/how_tos/alias_wallet/request-funds.ts
loading...
bindings/python/examples/how_tos/alias_wallet/request_funds.py
loading...
Expected Output
Balance before requesting funds on alias address: 1000000000
Alias Id: 0x60ad63a97179af7012809279140aabe34eafe37ef912b9a5a33fc7f8c58a20a7
{"address":"rms1pps26cafw9u67uqjszf8j9q24035atlr0mu39wd95vlu07x93gs2wf8n29a","waitingRequests":1}
Balance after requesting funds on alias address: 2300000000