You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All key fields (`adminPublicKey`, `supplyPublicKey`, `freezePublicKey`, `wipePublicKey`, `pausePublicKey`, `kycPublicKey`, `feeSchedulePublicKey`, `metadataPublicKey`) are optional and only appear when the corresponding key was provided.
Copy file name to clipboardExpand all lines: src/plugins/token/README.md
+164-2Lines changed: 164 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,6 +182,103 @@ hcli token create-ft \
182
182
183
183
**Batch support:** Pass `--batch <batch-name>` to add token creation to a batch instead of executing immediately. See the [Batch Support](#-batch-support) section.
184
184
185
+
### Token Create NFT
186
+
187
+
Create a new non-fungible token (NFT) collection with specified properties.
- NFTs are non-fungible, meaning each NFT is unique and tracked by serial number
275
+
- No decimals field applies to NFTs
276
+
- Use `mint-nft` command to mint individual NFTs to the collection
277
+
- Token name is automatically registered as an alias after successful creation
278
+
- Freeze default requires freeze key to be set
279
+
280
+
**Batch support:** Pass `--batch <batch-name>` to add NFT collection creation to a batch instead of executing immediately. See the [Batch Support](#-batch-support) section.
281
+
185
282
### Token Mint FT
186
283
187
284
Mint additional fungible tokens to increase supply. Tokens are minted to the token's treasury account.
@@ -609,6 +706,11 @@ The token file supports aliases and raw keys with optional key type prefixes:
609
706
"freezeKey": "<alias or accountId:privateKey>",
610
707
"pauseKey": "<alias or accountId:privateKey>",
611
708
"feeScheduleKey": "<alias or accountId:privateKey>",
709
+
"metadataKey": "<alias or accountId:privateKey>",
710
+
"freezeDefault": false,
711
+
"autoRenewPeriod": 7776000,
712
+
"autoRenewAccountId": "<accountId>",
713
+
"expirationTime": "2027-01-01T00:00:00Z",
612
714
"memo": "Optional token memo",
613
715
"autoRenewPeriod": "86400",
614
716
"autoRenewAccount": "<alias or accountId:privateKey>",
@@ -676,6 +778,11 @@ The NFT file supports aliases and raw keys with optional key type prefixes:
676
778
"freezeKey": "<alias or accountId:privateKey>",
677
779
"pauseKey": "<alias or accountId:privateKey>",
678
780
"feeScheduleKey": "<alias or accountId:privateKey>",
781
+
"metadataKey": "<alias or accountId:privateKey>",
782
+
"freezeDefault": false,
783
+
"autoRenewPeriod": 7776000,
784
+
"autoRenewAccountId": "<accountId>",
785
+
"expirationTime": "2027-01-01T00:00:00Z",
679
786
"memo": "Optional NFT collection memo",
680
787
"associations": ["<alias or accountId:privateKey>", "..."]
The `tokenType` field discriminates fungible tokens (`FUNGIBLE_COMMON`) from NFT collections (`NON_FUNGIBLE_UNIQUE`). NFT tokens use zero for `decimals` and `initialSupply`; minted NFTs are tracked by serial number on the ledger. The schema is validated using Zod (`TokenDataSchema`) and stored as JSON Schema in the plugin manifest for runtime validation.
928
+
**Field Descriptions:**
929
+
930
+
-`tokenType`: Discriminates fungible tokens (`FUNGIBLE_COMMON`) from NFT collections (`NON_FUNGIBLE_UNIQUE`)
931
+
-`decimals`: Number of decimal places for fungible tokens; zero for NFTs
932
+
-`initialSupply`: Initial supply amount; zero for NFTs
933
+
-`adminPublicKey`: Public key with admin privileges for token operations
934
+
-`supplyPublicKey`: Public key authorized to mint/burn tokens
935
+
-`wipePublicKey`: Public key authorized to wipe token balances
936
+
-`kycPublicKey`: Public key authorized to grant/revoke KYC status
937
+
-`freezePublicKey`: Public key authorized to freeze token transfers
938
+
-`pausePublicKey`: Public key authorized to pause all token transfers
939
+
-`feeSchedulePublicKey`: Public key authorized to update custom fees
940
+
-`metadataPublicKey`: Public key authorized to update token metadata
941
+
942
+
NFT tokens use zero for `decimals` and `initialSupply`; minted NFTs are tracked by serial number on the ledger. The schema is validated using Zod (`TokenDataSchema`) and stored as JSON Schema in the plugin manifest for runtime validation.
814
943
815
944
## 🧪 Testing
816
945
@@ -849,7 +978,7 @@ All commands support multiple output formats:
849
978
850
979
### Human-Readable (Default)
851
980
852
-
**Token Create:**
981
+
**Fungible Token Create:**
853
982
854
983
```
855
984
✅ Token created successfully: 0.0.12345
@@ -862,6 +991,17 @@ All commands support multiple output formats:
862
991
Transaction ID: 0.0.123@1700000000.123456789
863
992
```
864
993
994
+
**Non-Fungible Token Create:**
995
+
996
+
```
997
+
✅ NFT created successfully: 0.0.123456
998
+
Name: My NFT Collection (MNFT)
999
+
Treasury: 0.0.111
1000
+
Supply Type: FINITE
1001
+
Network: testnet
1002
+
Transaction ID: 0.0.123@1700000000.123456789
1003
+
```
1004
+
865
1005
**FT Mint:**
866
1006
867
1007
```
@@ -898,6 +1038,28 @@ All commands support multiple output formats:
0 commit comments