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
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
@@ -153,6 +153,103 @@ hcli token create-ft \
153
153
154
154
**Batch support:** Pass `--batch <batch-name>` to add token creation to a batch instead of executing immediately. See the [Batch Support](#-batch-support) section.
155
155
156
+
### Token Create NFT
157
+
158
+
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
246
+
- No decimals field applies to NFTs
247
+
- Use `mint-nft` command to mint individual NFTs to the collection
248
+
- Token name is automatically registered as an alias after successful creation
249
+
- Freeze default requires freeze key to be set
250
+
251
+
**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.
252
+
156
253
### Token Mint FT
157
254
158
255
Mint additional fungible tokens to increase supply. Tokens are minted to the token's treasury account.
@@ -433,6 +530,11 @@ The token file supports aliases and raw keys with optional key type prefixes:
433
530
"freezeKey": "<alias or accountId:privateKey>",
434
531
"pauseKey": "<alias or accountId:privateKey>",
435
532
"feeScheduleKey": "<alias or accountId:privateKey>",
533
+
"metadataKey": "<alias or accountId:privateKey>",
534
+
"freezeDefault": false,
535
+
"autoRenewPeriod": 7776000,
536
+
"autoRenewAccountId": "<accountId>",
537
+
"expirationTime": "2027-01-01T00:00:00Z",
436
538
"memo": "Optional token memo",
437
539
"associations": ["<alias or accountId:privateKey>", "..."],
438
540
"customFees": [
@@ -491,6 +593,11 @@ The NFT file supports aliases and raw keys with optional key type prefixes:
491
593
"freezeKey": "<alias or accountId:privateKey>",
492
594
"pauseKey": "<alias or accountId:privateKey>",
493
595
"feeScheduleKey": "<alias or accountId:privateKey>",
596
+
"metadataKey": "<alias or accountId:privateKey>",
597
+
"freezeDefault": false,
598
+
"autoRenewPeriod": 7776000,
599
+
"autoRenewAccountId": "<accountId>",
600
+
"expirationTime": "2027-01-01T00:00:00Z",
494
601
"memo": "Optional NFT collection memo",
495
602
"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.
743
+
**Field Descriptions:**
744
+
745
+
-`tokenType`: Discriminates fungible tokens (`FUNGIBLE_COMMON`) from NFT collections (`NON_FUNGIBLE_UNIQUE`)
746
+
-`decimals`: Number of decimal places for fungible tokens; zero for NFTs
747
+
-`initialSupply`: Initial supply amount; zero for NFTs
748
+
-`adminPublicKey`: Public key with admin privileges for token operations
749
+
-`supplyPublicKey`: Public key authorized to mint/burn tokens
750
+
-`wipePublicKey`: Public key authorized to wipe token balances
751
+
-`kycPublicKey`: Public key authorized to grant/revoke KYC status
752
+
-`freezePublicKey`: Public key authorized to freeze token transfers
753
+
-`pausePublicKey`: Public key authorized to pause all token transfers
754
+
-`feeSchedulePublicKey`: Public key authorized to update custom fees
755
+
-`metadataPublicKey`: Public key authorized to update token metadata
756
+
757
+
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.
629
758
630
759
## 🧪 Testing
631
760
@@ -664,7 +793,7 @@ All commands support multiple output formats:
664
793
665
794
### Human-Readable (Default)
666
795
667
-
**Token Create:**
796
+
**Fungible Token Create:**
668
797
669
798
```
670
799
✅ Token created successfully: 0.0.12345
@@ -677,6 +806,17 @@ All commands support multiple output formats:
677
806
Transaction ID: 0.0.123@1700000000.123456789
678
807
```
679
808
809
+
**Non-Fungible Token Create:**
810
+
811
+
```
812
+
✅ NFT created successfully: 0.0.123456
813
+
Name: My NFT Collection (MNFT)
814
+
Treasury: 0.0.111
815
+
Supply Type: FINITE
816
+
Network: testnet
817
+
Transaction ID: 0.0.123@1700000000.123456789
818
+
```
819
+
680
820
**FT Mint:**
681
821
682
822
```
@@ -713,6 +853,28 @@ All commands support multiple output formats:
0 commit comments