11"""
2- This example demonstrates approving an NFT allowance and transferring the NFT using it.
2+ Example: Approving an NFT allowance and transferring the NFT using it.
33
4- - Creates an owner, spender, and receiver account.
5- - Creates an NFT.
6- - Mints the NFT to the owner's account.
7- - Associates the NFT with the receiver's account.
8- - Approves the spender to spend the owner's NFT.
9- - Spender (as payer) transfers the NFT from the owner to the receiver.
4+ Why:
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.
7+
8+ Key Concepts:
9+ - Owner: The account that owns the NFT and grants the allowance.
10+ - Spender: The account approved to transfer the Owner's NFT.
11+ - Receiver: The account that will receive the NFT.
12+ - NFT Allowance: Permission granted by the Owner to the Spender to transfer NFTs.
13+
14+ High-Level Steps:
15+ Pre-requisites:
16+ 1. Create Owner, Spender, and Receiver accounts.
17+ 2. Create and mint an NFT to the Owner.
18+
19+ Required:
20+ 3. Approve the Spender to transfer the Owner's NFT.
21+
22+ Demonstration:
23+ 4. Associate the NFT with the Receiver account.
24+ 5. Transfer the NFT using the approved allowance.
1025
1126Usage:
1227 uv run examples/account/account_allowance_approve_transaction_nft.py
1328"""
1429
30+
1531import os
1632import sys
1733from dotenv import load_dotenv
@@ -212,4 +228,4 @@ def main():
212228 owner_client .close ()
213229
214230if __name__ == "__main__" :
215- main ()
231+ main ()
0 commit comments