docs(rust): add an end-to-end NFT mint and transfer recipe
- Lingua principale
- Rust
- Stelle
- 18
- Fork
- 34
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Goal
Add a focused Rust recipe showing the complete v0.16 NFT flow:
1. Create authenticated Alice and Bob wallets.
2. Create a user `NonFungibleFaucet`.
3. Compute an NFT asset commitment from metadata and a salt.
4. Mint the NFT to Alice through the production `MintNote` / `MintNoteStorage` flow.
5. Have Alice consume and transfer the NFT to Bob.
6. Have Bob consume it and verify final ownership.
## Dependency
Blocked until the tutorials Rust client is migrated from v0.15 to v0.16. Philipp is working on that migration. Implement this from updated `main` after it lands; do not introduce a second temporary dependency stack.
## Deliverables
- A concise page under `docs/src/rust-client/`.
- A matching runnable binary under `rust-client/src/bin/`.
- Registration in `docs/src/lib.rs` and the Rust tutorial runner.
- The documentation and runnable example use the same flow.
- The recipe explains that `compute_asset_commitment(metadata, salt)` is an off-chain convention. The faucet does not validate the metadata, salt, or knowledge of the preimage.
## Acceptance criteria
- [ ] Creates a non-fungible faucet using the v0.16 standard APIs.
- [ ] Mints one NFT to Alice using `MintNote` / `MintNoteStorage`.
- [ ] Alice consumes and transfers the NFT to Bob using `PaymentNoteDescription` and `build_pay_to_id`.
- [ ] Bob consumes the transfer note.
- [ ] The example verifies Alice no longer owns the NFT and Bob does.
- [ ] Rust checks and documentation tests pass.
- [ ] `yarn tutorials --rust=nft_mint_transfer` passes.
- [ ] The ingested page renders and the Docs build passes.
## Out of scope
Fees, burning, Web/React SDKs, marketplace behavior, and metadata hosting. Reuse the canonical v0.16 network and fee bootstrap established by the migration without teaching fees in this recipe.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
The recipe will be a new page under docs/src/rust-client/ and a runnable binary under rust-client/src/bin/. Start by examining the existing Rust client structure after the v0.16 migration lands. Look for similar examples to understand the pattern for creating a faucet, minting notes, and transferring assets. The acceptance criteria list the specific API calls to use. Run yarn tutorials --rust=nft_mint_transfer to test the integration.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 65/100