- Ensure the IOTA Gas Station is up and running. To learn how to set up the Gas Station, please follow this link.
- The expected address of the Gas Station is
http://localhost:9527. Modify this if necessary. - Set
USER_PRIVATE_KEYto a bech32-encoded (iotaprivkey1...) ed25519 private key for the account that will act as the transaction sender -- e.g. one printed byiota keytool generate ed25519. These examples have no keystore/wallet-config support (the newiota-rust-sdkdoesn't provide one), so a private key must be supplied this way. The sender address needs to own at least one IOTA coin on testnet.
USER_PRIVATE_KEY='iotaprivkey1...' GAS_STATION_AUTH='your-bearer-token' cargo run --example sponsored_transactionIf you encounter any problems please check Common Issues section.