22Example: Approving an NFT allowance and transferring the NFT using it.
33
44Why:
5- This example demonstrates how NFT allowances work on the Hedera network.
6- It shows how an owner can approve another account (the spender) to transfer
7- their NFT to a receiver. This is useful for understanding NFT permissions
8- and automated transfers in decentralized applications.
5+ This example demonstrates how to use the Hiero Python SDK to approve and
6+ execute an NFT allowance when interacting with the Hedera network.
97
108Key Concepts:
11- - Owner: The account that owns the NFT and grants allowance.
9+ - Owner: The account that owns the NFT and grants the allowance.
1210 - Spender: The account approved to transfer the Owner's NFT.
1311 - Receiver: The account that will receive the NFT.
14- - NFT Allowance: Permission given by the Owner to the Spender to transfer NFT(s) .
12+ - NFT Allowance: Permission granted by the Owner to the Spender to transfer NFTs .
1513
1614High-Level Steps:
17- Required :
15+ Pre-requisites :
1816 1. Create Owner, Spender, and Receiver accounts.
1917 2. Create and mint an NFT to the Owner.
18+
19+ Required:
2020 3. Approve the Spender to transfer the Owner's NFT.
21- 4. Transfer the NFT using the approved allowance.
22- Optional:
23- - Associate the NFT with the Receiver account (depends on network/account setup).
21+
22+ Demonstration:
23+ 4. Associate the NFT with the Receiver account.
24+ 5. Transfer the NFT using the approved allowance.
2425
2526Usage:
2627 uv run examples/account/account_allowance_approve_transaction_nft.py
@@ -227,4 +228,4 @@ def main():
227228 owner_client .close ()
228229
229230if __name__ == "__main__" :
230- main ()
231+ main ()
0 commit comments