Last updated
Was this helpful?
Last updated
Was this helpful?
Check out the "Getting Started with the Hedera Token Service" video tutorial in JavaScript .
Create a new fungible or non-fungible token (NFT) on the Hedera network. After you submit the transaction to the Hedera network, you can obtain the new token ID by requesting the receipt.
You can also create, access, or transfer HTS tokens using smart contracts - see and .
If any of the token key types (KYC key, Wipe key, Metadata key, etc) are not set during the creation of the token, you will not be able to update the token and add them in the future
If any of the token key types (KYC key, Wipe key, Metadata key, etc) are set during the creation of the token, you will not be able to remove them in the future
For non-fungible tokens, the token ID represents an NFT class. Once the token is created, you must mint each NFT using the operation.
Note: The initial supply for an NFT is required to be set to 0.
Transaction Signing Requirements
Treasury key is required to sign
Admin key, if specified
Transaction fee payer key
Transaction Fees
Note: Where the Admin, Pause, Freeze, and Wipe keys are left blank, the Supply key will be required as a minimum.
For fungible tokens, a fee is added to transfer the newly created token to the treasury account
Please see the transaction and query table for the base transaction fee
Please use the to estimate your transaction fee cost
setTokenName(<name>)
String
Required
setTokenType(<tokenType>)
Optional
setTokenSymbol(<symbol>)
String
Required
setDecimals(<decimal>)
int
Optional
setInitialSupply(<initialSupply>)
int
Optional
setTreasuryAccountId(<treasury>)
Required
setAdminKey(<key>)
Key
Optional
setKycKey(<key>)
Key
Optional
setFreezeKey(<key>)
Key
Optional
setWipeKey(<key>)
Key
Optional
setSupplyKey(<key>)
Key
Optional
setPauseKey(<key>)
Key
Optional
setFreezeDefault(<freeze>
)
boolean
Optional
setExpirationTime(<expirationTime>)
Instant
Optional
setFeeScheduleKey(<key>)
Key
Optional
setCustomFees(<customFees>)
List<CustomFee>
Optional
setSupplyType(<supplyType>)
TokenSupplyType
Optional
setMaxSupply(<maxSupply>)
long
Optional
setTokenMemo(<memo>)
String
Optional
setAutoRenewAccountId(<account>)
Optional
setAutoRenewPeriod(<period>)
Duration
Optional
setMetadataKey(<key>)
Key
Optional
setMetadata(<bytes>)
bytes
Optional