Skip to main content

Build an NFT Output

The following code example will:

  1. Create a Client which will connect to the Shimmer Testnet.
  2. Create a SecretManager from a mnemonic.
  3. Build an NFT output.
  4. Build and post a block with the NFT output created in step 3.
Iota.js

You can also find this guide in the native iota.js library

Code Example

Dotenv

This example uses dotenv, which is not safe to use in production environments.

client/examples/output/nft.rs
loading...

Run the Example

Run the example by running the following command:

cargo run --example nft --release

Expected Output

Transaction with new NFT output sent: https://api.testnet.shimmer.network/api/core/v2/blocks/0xcfc8599956396ec01a0f4fed2f218f10f43876df28b3e9115d3695f99a536a4b
bech32_nft_address rms1zzke7q909dzj95v6nlcdlafz0ylc6dux5a2qwenq0xfuc9hcr8h76spvz3f