Restful APIs Documentation
Last updated
Last updated
This documentation covers the Restful APIs available in the Smart Node system. The APIs are organized into several main categories.
Built with ❤️ by the HbarSuite Team Copyright © 2024 HbarSuite. All rights reserved.
Validators.Consensus.Add.Description
/validators/consensus
Level of Smart Node security for the token's keys
partial
none
, partial
, full
The token gating configuration for both fungible and non-fungible tokens.
{"fungibleTokens":[],"nonFungibleTokens":[]}
The conditions for the actions property.
{"create":[],"update":[],"delete":[]}
The conditions for updatable fields in the consensus topic.
The custom parameters for the consensus topic.
{"conditions":[],"parameters":{}}
Validators.Token.Add.Description
/validators/tokens
Level of Smart Node security for the token's keys
partial
none
, partial
, full
Conditions for the updatable property of the token.
{"values":["condition1","condition2"],"controller":{"type":"standard"}}
Conditions for the actions property.
{"values":["action1","action2"],"controller":{"type":"advanced"}}
Conditions for the fees property.
{"values":["fee1","fee2"],"controller":{"type":"basic"}}
Conditions for the keys property.
{"values":["key1","key2"],"controller":{"type":"secure"}}
Validators.Account.Add.Description
/validators/accounts
Level of Smart Node security for the account's keys
partial
none
, partial
, full
Conditions for the updatable property.
{"fields":["key","maxTokenAssociations"],"conditions":[]}
Conditions for the Actions property.
{"actions":["transfer","delete"],"conditions":[]}
Token gating configuration for both fungible and non-fungible tokens.
{"fungible":[],"nonFungible":[]}
Swap conditions.
{"prices":[]}
This endpoint will return a payload to be signed offline with your web3 wallet. The signed payload will then be sent to the login endpoint to authenticate the user.
/auth/web3/request
This endpoint will create a user session from a web3 signed payload. The payload must be signed offline with your web3 wallet.
/auth/web3/login
The operator information for the login request
The signed data for the login request
Creates a new Hashgraph.Ledger.HCS.Topic
/hcs
The key for the topic. Can be a single PublicKey or a KeyList.
Optional memo or description for the topic
The consensus timestamp for the validator.
Updates an existing Hashgraph.Ledger.HCS.Topic
/hcs/{topic}
Hashgraph.Ledger.HCS.Topic ID
A short description or note about the topic update
Updated topic description
Configuration for the topic sender
Configuration settings for the DAO
Deletes an existing Hashgraph.Ledger.HCS.Topic
/hcs/{topic}
Hashgraph.Ledger.HCS.Topic ID
Configuration settings for the DAO associated with this topic
Configuration for the topic's sender
{"key":"PublicKey or KeyList object","id":"AccountId object"}
Submits a Hashgraph.Ledger.HCS.Topic.Message
/hcs/{topic}/message
Hashgraph.Ledger.HCS.Topic ID
The content of the message to be submitted to the Hashgraph Consensus Service topic
Configuration for the topic sender
Configuration settings for the DAO
The signature of the message to be submitted to the Hashgraph Consensus Service topic
Gets messages from a Hashgraph.Ledger.HCS.Topic
/hcs/{topic}/messages
Hashgraph.Ledger.HCS.Topic ID
Callback for successful message retrieval
Start sequence number for message retrieval
End sequence number for message retrieval
Maximum number of messages to retrieve
Callback for message retrieval error
Callback for successful message retrieval
Start sequence number for message retrieval
End sequence number for message retrieval
Maximum number of messages to retrieve
Callback for message retrieval error
Creates a new Hashgraph.Ledger.HTS token
/hts/create/token
The name of the token
My Token
The account ID that will act as the treasury for the token
0.0.12345
The symbol of the token
MTK
The number of decimal places a token is divisible by
8
The initial supply of tokens to be put in circulation
1000000
The maximum number of tokens that can be in circulation
10000000
The maximum transaction fee the client is willing to pay
1000000
Whether to include a freeze key
true
Whether to include a pause key
true
Whether to include an admin key
true
Whether to include a KYC key
true
Whether to include a wipe key
true
Whether to include a supply key
true
Whether to include a fee schedule key
true
Whether accounts should be frozen by default when they receive the token
false
The validator consensus timestamp
1718800000000000
The memo for the token
My Token
Optional DAO configuration for the token creation
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
The supply type of the token
{"_code":1}
The type of token
{"_code":0}
Optional sender information
Custom fees to apply to the token
[{"feeType":"royalty","numerator":5,"denominator":100,"feeCollectorAccountId":"0.0.12345","fallbackFee":{"hbarAmount":1}}]
Updates an existing Hashgraph.Ledger.HTS token
/hts/update/{token}
Hashgraph.Ledger.HTS token ID
Current Treasury account ID
0.0.12345
New token name
Updated Token Name
New token symbol
UTN
New memo for the token
Updated token description
New Treasury account ID
0.0.67890
New Treasury key
302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777
Optional DAO configuration for the token update
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information
Updates custom fees for a Hashgraph.Ledger.HTS token
/hts/update/{token}/fees
Hashgraph.Ledger.HTS token ID
Optional DAO configuration for the fee update
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Optional sender information
Array of custom fees to be updated for the token
Mints additional supply of a Hashgraph.Ledger.HTS fungible token
/hts/mint/token
The unique identifier of the token to be minted
0.0.12345
The quantity of tokens to be minted
100
Optional DAO configuration for the token minting
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information for the mint operation
{"key":"PublicKey or KeyList","id":"AccountId"}
Burns Hashgraph.Ledger.HTS fungible tokens from treasury
/hts/burn/token
The unique identifier of the token to be burned
0.0.12345
The quantity of tokens to be burned
100
Optional DAO configuration for the token burning
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information for the burn operation
{"key":"PublicKey or KeyList","id":"AccountId"}
This endpoint allows you to mint an NFT.
/hts/mint/nft
The unique identifier of the token to be minted
0.0.12345
The Content Identifier (CID) associated with the NFT
QmX5NLKeso6xVxTeP3ycB1RQ5Ir3q7C84oSqQyaCzB7q8g
Sender information for the minting operation
{"key":"PublicKey or KeyList","id":"AccountId"}
Optional DAO configuration for the NFT minting
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
This endpoint allows you to burn an NFT.
/hts/burn/nft
The unique identifier of the NFT token to be burned
0.0.12345
The unique serial number of the specific NFT to be burned
1
Optional DAO configuration for the NFT burning
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information for the burn operation
{"key":"PublicKey or KeyList","id":"AccountId"}
This endpoint allows you to wipe an NFT.
/hts/wipe/nft
The unique identifier of the NFT token to be wiped
0.0.12345
The unique serial number of the specific NFT to be wiped
1
The account identifier from which the NFT will be wiped
0.0.67890
Sender information for the wipe operation
{"key":"PublicKey or KeyList","id":"AccountId"}
Optional DAO configuration for the NFT wiping
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
This endpoint returns theinfo of a given NFT serial number.
/hts/nft/{token}//{serialNumber}
the token id of the NFT we want to get theinfo.
the serial number of the NFT we want to get theinfo.
Transfer HBAR from one account to another. Requires sender, receiver, and amount details.
/accounts/transfer/hbar
The amount of HBAR to transfer
100
The account ID of the sender
0.0.12345
The account ID of the receiver
0.0.67890
An optional memo to include with the transfer
Payment for services
The sender account details
Optional DAO configuration for the HBAR transfer
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Transfer a specific amount of tokens from one account to another. Requires token ID, sender, receiver, amount, and token decimals.
/accounts/transfer/token
The unique identifier of the fungible token to be transferred
0.0.12345
The account ID of the sender
0.0.67890
The account ID of the receiver
0.0.11111
The amount of tokens to transfer
100
The number of decimal places for the token
2
An optional memo to include with the transfer
Transfer memo
Optional DAO configuration for the fungible token transfer
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Transfer a specific NFT from one account to another. Requires NFT ID, sender, receiver, and serial number.
/accounts/transfer/nft
The unique identifier of the NFT token to be transferred
0.0.12345
The account ID of the sender
0.0.67890
The account ID of the receiver
0.0.11111
The unique serial number of the specific NFT to be transferred
1
An optional memo to include with the transfer
NFT transfer memo
Optional sender configuration
Optional DAO configuration for the NFT transfer
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Perform an atomic swap of tokens and/or HBAR between accounts. The swap either succeeds or fails atomically.
/accounts/transfer/atomic-swap
The account ID of the sender initiating the atomic swap
0.0.123456
The account ID of the receiver in the atomic swap
0.0.789012
The unique identifier of the token being swapped
0.0.345678
The number of decimal places for the token being swapped
8
The amount of tokens to be swapped
100
An optional memo to include with the atomic swap
Atomic swap for Project X
The sender account details
Optional DAO configuration for the atomic swap
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}