HbarSuite Docs
  • Welcome to HbarSuite
  • HbarSuite Developer Documentation
    • HbarSuite Smart Engine Applications
      • @hsuite/cross-chain-exchange
      • @hsuite/dao
      • @hsuite/exchange
      • @hsuite/launchpad
      • @hsuite/multisig
      • @hsuite/nft-exchange
    • HSuite Libraries
      • @hsuite/api-key
      • @hsuite/auth-types
      • @hsuite/auth
      • @hsuite/client-types
      • @hsuite/client
      • @hsuite/dkg-types
      • @hsuite/hashgraph-types
      • @hsuite/health
      • @hsuite/helpers
      • @hsuite/ipfs
      • @hsuite/smart-config
      • @hsuite/smart-network-types
      • @hsuite/smart-transaction-types
      • @hsuite/smartnode-sdk
      • @hsuite/snapshots
      • @hsuite/subscriptions-types
      • @hsuite/subscriptions
      • @hsuite/throttler-types
      • @hsuite/throttler
      • @hsuite/users-types
      • @hsuite/users
      • @hsuite/validators-types
  • General Documentation
    • Tokenomics
      • Tokenomics v1
      • Tokenomics V2
    • Smart Apps and Interaction
      • Subscription-Based Model
      • Token-Gate Model
    • The Smart Node Network
      • security-layer
        • Security Layer Integration
        • Setting Up Secure Clusters
        • Generating and Sharing Keys Collaboratively
        • Protecting Secrets with Shamir's Method
        • Managing Cluster Membership
        • Handling Node Expulsion and Replacement
        • Automating Responses to Network Changes & Key Rotation
        • Ensuring Continuous Operation and Recovery
      • Understanding Validators in Our System
        • Type of Validators Explained
    • What is a Smart Node?
  • Restful APIs Documentation
Powered by GitBook
On this page

Restful APIs Documentation

PreviousWhat is a Smart Node?

Last updated 3 months ago

This documentation covers the Restful APIs available in the Smart Node system. The APIs are organized into several main categories.

Smart Node Management

Health & Metrics

IPFS Operations

Validator Operations

Authentication Services

Hashgraph Consensus Service (HCS) Operations

Hashgraph HCS RESTful Operations

Hashgraph HTS (Token Service) Operations

Hashgraph HTS RESTful Operations

Hashgraph Accounts


Built with ❤️ by the HbarSuite Team Copyright © 2024 HbarSuite. All rights reserved.

Smart Node Management
#health--metrics
IPFS Operations
Validator Operations
Authentication Services
Hashgraph Consensus Service (HCS) Operations
Hashgraph HCS RESTful Operations
Hashgraph HTS (Token Service) Operations
Hashgraph HTS RESTful Operations
Hashgraph Accounts

Get SmartNetwork.Operator.Entity identifier

get

Returns the SmartNetwork.Operator.Entity identifier details

Responses
200
Returns SmartNetwork.Operator.Entity
application/json
400Error
404Error
get
GET /smart-node/identifier HTTP/1.1
Host: 
Accept: */*
{
  "accountId": "0.0.1234567",
  "publicKey": "302a300506032b6570032100a6e3161d0db8e3c629e4d1d2a3a4e4b6e1f1c1d8c7b5b4a3c2d1f0e9d8c7b5",
  "url": "https://operator.smartnetwork.com",
  "nft": {
    "id": "0.0.123456",
    "serialNumber": 1,
    "name": "Premium Operator",
    "description": "High-capacity network operator",
    "attributes": {
      "tier": "premium",
      "region": "us-east",
      "permissions": [
        "read",
        "write",
        "execute"
      ]
    }
  }
}

Get SmartNetwork.SmartNode.State status

get

Returns the SmartNetwork.SmartNode.State details

Responses
200
Returns SmartNetwork.SmartNode.State
application/json
400Error
404Error
get
GET /smart-node/status HTTP/1.1
Host: 
Accept: */*
{
  "node": {
    "status": "active",
    "lastSeen": "2023-12-01T10:00:00Z",
    "metrics": {
      "cpu": "45%",
      "memory": "60%",
      "network": "120Mbps"
    }
  },
  "ipfs": {
    "connected": true,
    "peers": 25,
    "storage": {
      "pinned": 1500,
      "available": "2TB"
    }
  }
}

Get array of SmartNetwork.Network.Entity nodes

get

Returns array of SmartNetwork.Network.Entity whitelisted nodes

Responses
200
Returns array of SmartNetwork.Network.Entity
application/json
400Error
404Error
get
GET /smart-node/network HTTP/1.1
Host: 
Accept: */*
[
  {
    "membership": {
      "walletId": "0x1234567890abcdef",
      "operator": {
        "id": "op123",
        "name": "MainOperator"
      },
      "status": "ACTIVE",
      "details": {
        "metadata": {
          "name": "Premium Operator",
          "description": "High-performance network operator"
        }
      }
    },
    "type": "operator",
    "clusters": [
      {
        "id": "cluster1",
        "name": "Primary Cluster",
        "nodes": [
          "node1",
          "node2"
        ]
      }
    ],
    "dkgId": "dkg123456"
  }
]

Get array of SmartNetwork.Network.Utility tokens

get

Returns array of SmartNetwork.Network.Utility token details

Responses
200
Returns array of SmartNetwork.Network.Utility
application/json
400Error
404Error
get
GET /smart-node/utilities HTTP/1.1
Host: 
Accept: */*
[
  {
    "name": "GovernanceToken",
    "id": "0x1234567890abcdef",
    "treasury": "0xabcdef1234567890",
    "decimals": "18"
  }
]

GET /health/check - Perform system health check

get
Responses
200
The Health Check is successful
application/json
400
BadRequestException - Health check failed or encountered errors
application/json
503
The Health Check is not successful
application/json
get
GET /health/check HTTP/1.1
Host: 
Accept: */*
{
  "status": "ok",
  "info": {
    "database": {
      "status": "up"
    }
  },
  "error": {},
  "details": {
    "database": {
      "status": "up"
    }
  }
}

GET /health/infos - Retrieve detailed system health metrics

get
Responses
200
HealthInfos - Contains detailed metrics about CPU, memory, disk and network usage
application/json
400
BadRequestException - Failed to retrieve system metrics
application/json
get
GET /health/infos HTTP/1.1
Host: 
Accept: */*
{
  "platform": "text",
  "release": "text",
  "machine": "text",
  "arch": "text",
  "uptime": 1,
  "cpu": {
    "usage": 1,
    "cpus": 1,
    "speed": 1
  },
  "memory": {
    "totalMemMb": 1,
    "usedMemMb": 1,
    "freeMemMb": 1,
    "usedMemPercentage": 1,
    "freeMemPercentage": 1
  },
  "drive": {
    "totalGb": "text",
    "usedGb": "text",
    "freeGb": "text",
    "usedPercentage": "text",
    "freePercentage": "text"
  },
  "network": {
    "inputBytes": 1,
    "outputBytes": 1
  }
}

IPFS.Pin.Content

post
Path parameters
cidstringRequired
Responses
200
IPFS.Pin.Content.Success
400
IPFS.Pin.Content.Error.InvalidInput
401
IPFS.Pin.Content.Error.Unauthorized
post
POST /ipfs/pin/{cid} HTTP/1.1
Host: 
Accept: */*

No content

IPFS.Unpin.Content

delete
Path parameters
cidstringRequired
Responses
200
IPFS.Unpin.Content.Success
400
IPFS.Unpin.Content.Error.InvalidInput
401
IPFS.Unpin.Content.Error.Unauthorized
403
IPFS.Unpin.Content.Error.Forbidden
delete
DELETE /ipfs/unpin/{cid} HTTP/1.1
Host: 
Accept: */*

No content

Validators.Consensus.Read

get

Validators.Consensus.Read.Description

Path parameters
timestampstringRequired

Validators.Consensus.Read.Param.Timestamp.Description

Responses
200
Validators.Consensus.Read.Response.Success
application/json
400
Validators.Consensus.Read.Response.BadRequest
get
GET /validators/consensus/{timestamp} HTTP/1.1
Host: 
Accept: */*
{
  "smartNodeSecurity": "partial",
  "tokenGates": {
    "fungibleTokens": [],
    "nonFungibleTokens": []
  },
  "customInterface": {
    "parameters": {},
    "conditions": []
  },
  "actionConditions": {
    "create": [],
    "update": [],
    "delete": []
  },
  "updateConditions": {}
}

Validators.Token.Read

get

Validators.Token.Read.Description

Path parameters
timestampstringRequired

Validators.Token.Read.Param.Timestamp.Description

Responses
200
Validators.Token.Read.Response.Success
application/json
400
Validators.Token.Read.Response.BadRequest
get
GET /validators/tokens/{timestamp} HTTP/1.1
Host: 
Accept: */*
{
  "smartNodeSecurity": "partial",
  "updateConditions": {
    "values": [
      "condition1",
      "condition2"
    ],
    "controller": {
      "type": "standard"
    }
  },
  "actionsConditions": {
    "values": [
      "action1",
      "action2"
    ],
    "controller": {
      "type": "advanced"
    }
  },
  "feesConditions": {
    "values": [
      "fee1",
      "fee2"
    ],
    "controller": {
      "type": "basic"
    }
  },
  "keysConditions": {
    "values": [
      "key1",
      "key2"
    ],
    "controller": {
      "type": "secure"
    }
  }
}

Validators.Account.Read

get

Validators.Account.Read.Description

Path parameters
timestampstringRequired

Validators.Account.Read.Param.Timestamp.Description

Responses
200
Validators.Account.Read.Response.Success
application/json
400
Validators.Account.Read.Response.BadRequest
get
GET /validators/accounts/{timestamp} HTTP/1.1
Host: 
Accept: */*
{
  "smartNodeSecurity": "partial",
  "updateConditions": {
    "fields": [
      "key",
      "maxTokenAssociations"
    ],
    "conditions": []
  },
  "actionConditions": {
    "actions": [
      "transfer",
      "delete"
    ],
    "conditions": []
  },
  "tokenGates": {
    "fungible": [],
    "nonFungible": []
  },
  "swapConditions": {
    "prices": []
  }
}

Get authenticated user profile from session

get

Returns the profile of the authenticated user from their active session. Requires valid authentication.

Responses
200
Returns the user's safe profile data
application/json
400
Invalid request or authentication failure
404
User profile not found
get
GET /auth/profile HTTP/1.1
Host: 
Accept: */*
{
  "email": "[email protected]",
  "username": "johndoe",
  "created_at": 1634567890,
  "updated_at": 1634567890,
  "confirmed": true,
  "type": "standard",
  "role": "user",
  "tags": [
    "premium",
    "beta"
  ],
  "banned": false,
  "twoFactorAuth": {
    "status": "PENDING",
    "factorSid": "YF1234567890abcdef1234567890abcdef",
    "identity": "[email protected]",
    "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA..."
  }
}

trigger a request to be signed offline with your web3 wallet.

get

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.

Responses
200
Returns a Web3AuthRequestDto.
application/json
400Error
404Error
get
GET /auth/web3/request HTTP/1.1
Host: 
Accept: */*
{
  "signedData": {
    "signature": {
      "0": 1,
      "1": 2,
      "2": 3,
      "3": 4,
      "4": 5
    },
    "serverSigningAccount": "0x1234567890abcdef"
  },
  "payload": {
    "url": "https://example.com/auth",
    "node": "node-1",
    "data": {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    }
  }
}

allow a user to logout and destroy the session.

get

This endpoint will destroy the session and the user will be logged out. This endpoint is protected and requires authentication.

Responses
200
Returns a CredentialsLogoutResponse.
application/json
400Error
404Error
get
GET /auth/web3/logout HTTP/1.1
Host: 
Accept: */*
{
  "logout": true,
  "message": "Logout successful"
}

Hashgraph.Ledger.HCS.Topic.Info

get

Gets information about a Hashgraph.Ledger.HCS.Topic

Path parameters
topicstringRequired

Hashgraph.Ledger.HCS.Topic ID

Responses
200
Returns Hashgraph.Ledger.HCS.Topic.Info
application/json
400
Invalid Hashgraph.Ledger.HCS.Topic ID
404
Topic not found
get
GET /hcs/{topic} HTTP/1.1
Host: 
Accept: */*
{
  "topicId": "text",
  "topicMemo": "text",
  "sequenceNumber": "text",
  "expirationTime": "text",
  "adminKey": [
    "text"
  ],
  "submitKey": [
    "text"
  ],
  "autoRenewAccountId": "text",
  "ledgerId": "text"
}

Hashgraph.Ledger.HCS.Topic.Message.Info

get

Gets messages from a Hashgraph.Ledger.HCS.Topic

Path parameters
topicstringRequired

Hashgraph.Ledger.HCS.Topic ID

Query parameters
callbackSuccessfunctionRequired

Callback for successful message retrieval

startnumberRequired

Start sequence number for message retrieval

endnumberRequired

End sequence number for message retrieval

limitnumberRequired

Maximum number of messages to retrieve

callbackErrorfunctionRequired

Callback for message retrieval error

callbackSuccessfunctionRequired

Callback for successful message retrieval

startnumberRequired

Start sequence number for message retrieval

endnumberRequired

End sequence number for message retrieval

limitnumberRequired

Maximum number of messages to retrieve

callbackErrorfunctionRequired

Callback for message retrieval error

Responses
200
Returns SubscriptionHandle for message stream
application/json
Responseobject
400
Invalid Hashgraph.Ledger.HCS.Topic.Message.Info parameters
404
Topic not found
get
GET /hcs/{topic}/messages?callbackSuccess=null&start=1&end=1&limit=1&callbackError=null&callbackSuccess=null&start=1&end=1&limit=1&callbackError=null HTTP/1.1
Host: 
Accept: */*
{}

Hashgraph.Ledger.HTS.Delete

delete

Deletes a Hashgraph.Ledger.HTS token

Path parameters
tokenstringRequired

Hashgraph.Ledger.HTS token ID

Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid deletion details
404
Token not found
delete
DELETE /hts/delete/{token} HTTP/1.1
Host: 
Accept: */*
{}

Hashgraph.Ledger.HTS.Pause

post

Pauses a Hashgraph.Ledger.HTS token

Path parameters
tokenstringRequired

Hashgraph.Ledger.HTS token ID

Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid pause operation
404
Token not found
post
POST /hts/pause/{token} HTTP/1.1
Host: 
Accept: */*
{}

Hashgraph.Ledger.HTS.Unpause

post

Unpauses a Hashgraph.Ledger.HTS token

Path parameters
tokenstringRequired

Hashgraph.Ledger.HTS token ID

Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid unpause operation
404
Token not found
post
POST /hts/unpause/{token} HTTP/1.1
Host: 
Accept: */*
{}

get info of a given token id

get

This endpoint returns the info of a given token id.

Path parameters
tokenstringRequired

the token id of the token we want to get theinfo.

Responses
200
Returns a TokenInfo object.
application/json
Responseobject
400Error
404Error
get
GET /hts/token/{token} HTTP/1.1
Host: 
Accept: */*
{}

get info of a given NFT id and serial number

get

This endpoint returns theinfo of a given NFT serial number.

Path parameters
tokenstringRequired

the token id of the NFT we want to get theinfo.

serialNumbernumberRequired

the serial number of the NFT we want to get theinfo.

Responses
200
Returns an array of TokenNftInfo.
application/json
Responseobject[]
400Error
404Error
get
GET /hts/nft/{token}/{serialNumber} HTTP/1.1
Host: 
Accept: */*
[
  {}
]
  • Smart Node Management
  • GETGet SmartNetwork.Operator.Entity identifier
  • GETGet SmartNetwork.SmartNode.State status
  • GETGet array of SmartNetwork.Network.Entity nodes
  • GETGet array of SmartNetwork.Network.Utility tokens
  • Health & Metrics
  • GETGET /health/check - Perform system health check
  • GETGET /health/infos - Retrieve detailed system health metrics
  • IPFS Operations
  • POSTIPFS.Pin.Content
  • DELETEIPFS.Unpin.Content
  • POSTIPFS.Upload.File
  • Validator Operations
  • POSTValidators.Consensus.Add
  • GETValidators.Consensus.Read
  • POSTValidators.Token.Add
  • GETValidators.Token.Read
  • POSTValidators.Account.Add
  • GETValidators.Account.Read
  • Authentication Services
  • GETGet authenticated user profile from session
  • GETtrigger a request to be signed offline with your web3 wallet.
  • POSTcreate a user session from a web3 signed payload.
  • GETallow a user to logout and destroy the session.
  • Hashgraph Consensus Service (HCS) Operations
  • POSTHashgraph.Ledger.HCS.Topic.Create
  • PUTHashgraph.Ledger.HCS.Topic.Update
  • DELETEHashgraph.Ledger.HCS.Topic.Delete
  • GETHashgraph.Ledger.HCS.Topic.Info
  • POSTHashgraph.Ledger.HCS.Topic.Message.Submit
  • GETHashgraph.Ledger.HCS.Topic.Message.Info
  • Hashgraph HCS RESTful Operations
  • Hashgraph HTS (Token Service) Operations
  • POSTHashgraph.Ledger.HTS.Create
  • PATCHHashgraph.Ledger.HTS.Update
  • PATCHHashgraph.Ledger.HTS.UpdateFees
  • DELETEHashgraph.Ledger.HTS.Delete
  • POSTHashgraph.Ledger.HTS.Pause
  • POSTHashgraph.Ledger.HTS.Unpause
  • POSTHashgraph.Ledger.HTS.FungibleToken.Mint
  • POSTHashgraph.Ledger.HTS.FungibleToken.Burn
  • POSTMint an NFT
  • POSTBurn an NFT
  • POSTWipe an NFT
  • GETget info of a given token id
  • GETget info of a given NFT id and serial number
  • Hashgraph HTS RESTful Operations
  • Hashgraph Accounts
  • POSTTransfer HBAR
  • POSTTransfer Token
  • POSTTransfer NFT
  • POSTAtomic Swap

IPFS.Upload.File

post
Body
filestring · binaryOptional

File to upload (max 100MB)

Responses
201
IPFS.Upload.File.Success
400
IPFS.Upload.File.Error.InvalidInput
401
IPFS.Upload.File.Error.Unauthorized
post
POST /ipfs/upload HTTP/1.1
Host: 
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}

No content

Validators.Consensus.Add

post

Validators.Consensus.Add.Description

Body
smartNodeSecuritystring · enumOptional

Level of Smart Node security for the token's keys

Example: partialPossible values:
tokenGatesall ofRequired

The token gating configuration for both fungible and non-fungible tokens.

Example: {"fungibleTokens":[],"nonFungibleTokens":[]}
customInterfaceall ofOptional

The custom parameters for the consensus topic.

Example: {"parameters":{},"conditions":[]}
actionConditionsall ofRequired

The conditions for the actions property.

Example: {"create":[],"update":[],"delete":[]}
updateConditionsall ofRequired

The conditions for updatable fields in the consensus topic.

Responses
200
Validators.Consensus.Add.Response.Success
application/json
Responsestring
400
Validators.Consensus.Add.Response.BadRequest
post
POST /validators/consensus HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 220

{
  "smartNodeSecurity": "partial",
  "tokenGates": {
    "fungibleTokens": [],
    "nonFungibleTokens": []
  },
  "customInterface": {
    "parameters": {},
    "conditions": []
  },
  "actionConditions": {
    "create": [],
    "update": [],
    "delete": []
  },
  "updateConditions": {}
}
text

Validators.Token.Add

post

Validators.Token.Add.Description

Body
smartNodeSecuritystring · enumRequired

Level of Smart Node security for the token's keys

Example: partialPossible values:
updateConditionsall ofRequired

Conditions for the updatable property of the token.

Example: {"values":["condition1","condition2"],"controller":{"type":"standard"}}
actionsConditionsall ofRequired

Conditions for the actions property.

Example: {"values":["action1","action2"],"controller":{"type":"advanced"}}
feesConditionsall ofRequired

Conditions for the fees property.

Example: {"values":["fee1","fee2"],"controller":{"type":"basic"}}
keysConditionsall ofRequired

Conditions for the keys property.

Example: {"values":["key1","key2"],"controller":{"type":"secure"}}
Responses
200
Validators.Token.Add.Response.Success
application/json
Responsestring
400
Validators.Token.Add.Response.BadRequest
post
POST /validators/tokens HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 357

{
  "smartNodeSecurity": "partial",
  "updateConditions": {
    "values": [
      "condition1",
      "condition2"
    ],
    "controller": {
      "type": "standard"
    }
  },
  "actionsConditions": {
    "values": [
      "action1",
      "action2"
    ],
    "controller": {
      "type": "advanced"
    }
  },
  "feesConditions": {
    "values": [
      "fee1",
      "fee2"
    ],
    "controller": {
      "type": "basic"
    }
  },
  "keysConditions": {
    "values": [
      "key1",
      "key2"
    ],
    "controller": {
      "type": "secure"
    }
  }
}
text

Validators.Account.Add

post

Validators.Account.Add.Description

Body
smartNodeSecuritystring · enumRequired

Level of Smart Node security for the account's keys

Example: partialPossible values:
updateConditionsall ofRequired

Conditions for the updatable property.

Example: {"fields":["key","maxTokenAssociations"],"conditions":[]}
actionConditionsall ofRequired

Conditions for the Actions property.

Example: {"actions":["transfer","delete"],"conditions":[]}
tokenGatesall ofRequired

Token gating configuration for both fungible and non-fungible tokens.

Example: {"fungible":[],"nonFungible":[]}
swapConditionsall ofRequired

Swap conditions.

Example: {"prices":[]}
Responses
200
Validators.Account.Add.Response.Success
application/json
Responsestring
400
Validators.Account.Add.Response.BadRequest
post
POST /validators/accounts HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 254

{
  "smartNodeSecurity": "partial",
  "updateConditions": {
    "fields": [
      "key",
      "maxTokenAssociations"
    ],
    "conditions": []
  },
  "actionConditions": {
    "actions": [
      "transfer",
      "delete"
    ],
    "conditions": []
  },
  "tokenGates": {
    "fungible": [],
    "nonFungible": []
  },
  "swapConditions": {
    "prices": []
  }
}
text

create a user session from a web3 signed payload.

post

This endpoint will create a user session from a web3 signed payload. The payload must be signed offline with your web3 wallet.

Body
operatorobjectRequired

The operator information for the login request

signedDataall ofRequired

The signed data for the login request

Responses
200
Returns a Auth.Credentials.Web3.Request.Signin.Login.
application/json
400Error
404Error
post
POST /auth/web3/login HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 118

{
  "operator": {},
  "signedData": {
    "signature": {
      "0": 1,
      "1": 2,
      "2": 3,
      "3": 4,
      "4": 5
    },
    "serverSigningAccount": "0x1234567890abcdef"
  }
}
{
  "operator": {},
  "signedData": {
    "signature": {
      "0": 1,
      "1": 2,
      "2": 3,
      "3": 4,
      "4": 5
    },
    "serverSigningAccount": "0x1234567890abcdef"
  }
}

Hashgraph.Ledger.HCS.Topic.Create

post

Creates a new Hashgraph.Ledger.HCS.Topic

Body
keyobjectOptional

The key for the topic. Can be a single PublicKey or a KeyList.

memostringOptional

Optional memo or description for the topic

validatorConsensusTimestampstringOptional

The consensus timestamp for the validator.

Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid Hashgraph.Ledger.HCS.Topic.Create parameters
404
Topic creation failed
post
POST /hcs HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 61

{
  "key": {},
  "memo": "text",
  "validatorConsensusTimestamp": "text"
}
{}

Hashgraph.Ledger.HCS.Topic.Update

put

Updates an existing Hashgraph.Ledger.HCS.Topic

Path parameters
topicstringRequired

Hashgraph.Ledger.HCS.Topic ID

Body
memostringRequired

A short description or note about the topic update

Example: Updated topic description
senderobjectOptional

Configuration for the topic sender

daoobjectOptional

Configuration settings for the DAO

Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid Hashgraph.Ledger.HCS.Topic.Update parameters
404
Topic not found
put
PUT /hcs/{topic} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "memo": "Updated topic description",
  "sender": {},
  "dao": {}
}
{}

Hashgraph.Ledger.HCS.Topic.Delete

delete

Deletes an existing Hashgraph.Ledger.HCS.Topic

Path parameters
topicstringRequired

Hashgraph.Ledger.HCS.Topic ID

Body
senderobjectOptional

Configuration for the topic's sender

Example: {"key":"PublicKey or KeyList object","id":"AccountId object"}
daoobjectOptional

Configuration settings for the DAO associated with this topic

Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid Hashgraph.Ledger.HCS.Topic.Delete parameters
404
Topic not found
delete
DELETE /hcs/{topic} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 81

{
  "sender": {
    "key": "PublicKey or KeyList object",
    "id": "AccountId object"
  },
  "dao": {}
}
{}

Hashgraph.Ledger.HCS.Topic.Message.Submit

post

Submits a Hashgraph.Ledger.HCS.Topic.Message

Path parameters
topicstringRequired

Hashgraph.Ledger.HCS.Topic ID

Body
messagestringRequired

The content of the message to be submitted to the Hashgraph Consensus Service topic

signatureall ofRequired

The signature of the message to be submitted to the Hashgraph Consensus Service topic

objectOptional
senderobjectOptional

Configuration for the topic sender

daoobjectOptional

Configuration settings for the DAO

Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid Hashgraph.Ledger.HCS.Topic.Message.Submit parameters
404
Topic not found
post
POST /hcs/{topic}/message HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "message": "text",
  "signature": {},
  "sender": {},
  "dao": {}
}
{}

Hashgraph.Ledger.HTS.Create

post

Creates a new Hashgraph.Ledger.HTS token

Body
namestringRequired

The name of the token

Example: My Token
treasuryAccountIdstringOptional

The account ID that will act as the treasury for the token

Example: 0.0.12345
symbolstringRequired

The symbol of the token

Example: MTK
decimalsnumber · max: 18Required

The number of decimal places a token is divisible by

Example: 8
initialSupplynumberOptional

The initial supply of tokens to be put in circulation

Example: 1000000
supplyTypeall ofRequired

The supply type of the token

Example: {"_code":1}
objectOptional
maxSupplynumberOptional

The maximum number of tokens that can be in circulation

Example: 10000000
maxTransactionFeenumberRequired

The maximum transaction fee the client is willing to pay

Example: 1000000
tokenTypeall ofRequired

The type of token

Example: {"_code":0}
objectOptional
freezeKeybooleanOptional

Whether to include a freeze key

Example: true
pauseKeybooleanOptional

Whether to include a pause key

Example: true
adminKeybooleanOptional

Whether to include an admin key

Example: true
kycKeybooleanOptional

Whether to include a KYC key

Example: true
wipeKeybooleanOptional

Whether to include a wipe key

Example: true
supplyKeybooleanOptional

Whether to include a supply key

Example: true
feeScheduleKeybooleanOptional

Whether to include a fee schedule key

Example: true
customFeesobject[]Optional

Custom fees to apply to the token

Example: [{"feeType":"royalty","numerator":5,"denominator":100,"fallbackFee":{"hbarAmount":1},"feeCollectorAccountId":"0.0.12345"}]
freezeDefaultbooleanRequired

Whether accounts should be frozen by default when they receive the token

Example: false
validatorConsensusTimestampstringRequired

The validator consensus timestamp

Example: 1718800000000000
memostringOptional

The memo for the token

Example: My Token
daoobjectOptional

Optional DAO configuration for the token creation

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid token creation details
404
Account not found
post
POST /hts/create/token HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 645

{
  "sender": {
    "key": {},
    "id": {}
  },
  "name": "My Token",
  "treasuryAccountId": "0.0.12345",
  "symbol": "MTK",
  "decimals": 8,
  "initialSupply": 1000000,
  "supplyType": {
    "_code": 1
  },
  "maxSupply": 10000000,
  "maxTransactionFee": 1000000,
  "tokenType": {
    "_code": 0
  },
  "freezeKey": true,
  "pauseKey": true,
  "adminKey": true,
  "kycKey": true,
  "wipeKey": true,
  "supplyKey": true,
  "feeScheduleKey": true,
  "customFees": [
    {
      "feeType": "royalty",
      "numerator": 5,
      "denominator": 100,
      "fallbackFee": {
        "hbarAmount": 1
      },
      "feeCollectorAccountId": "0.0.12345"
    }
  ],
  "freezeDefault": false,
  "validatorConsensusTimestamp": "1718800000000000",
  "memo": "My Token",
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  }
}
{}

Hashgraph.Ledger.HTS.Update

patch

Updates an existing Hashgraph.Ledger.HTS token

Path parameters
tokenstringRequired

Hashgraph.Ledger.HTS token ID

Body
currentTreasurystringOptional

Current Treasury account ID

Example: 0.0.12345
namestringOptional

New token name

Example: Updated Token Name
symbolstringOptional

New token symbol

Example: UTN
memostringOptional

New memo for the token

Example: Updated token description
newTreasuryAccountIdstringOptional

New Treasury account ID

Example: 0.0.67890
newTreasuryKeyobjectOptional

New Treasury key

Example: 302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777
daoobjectOptional

Optional DAO configuration for the token update

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid token update details
404
Token not found
patch
PATCH /hts/update/{token} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 354

{
  "currentTreasury": "0.0.12345",
  "name": "Updated Token Name",
  "symbol": "UTN",
  "memo": "Updated token description",
  "newTreasuryAccountId": "0.0.67890",
  "newTreasuryKey": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777",
  "sender": {
    "key": {},
    "id": {}
  },
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  }
}
{}

Hashgraph.Ledger.HTS.UpdateFees

patch

Updates custom fees for a Hashgraph.Ledger.HTS token

Path parameters
tokenstringRequired

Hashgraph.Ledger.HTS token ID

Body
daoobjectOptional

Optional DAO configuration for the fee update

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid fee update details
404
Token not found
patch
PATCH /hts/update/{token}/fees HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 123

{
  "sender": {
    "key": {},
    "id": {}
  },
  "customFees": [
    null
  ],
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  }
}
{}

Hashgraph.Ledger.HTS.FungibleToken.Mint

post

Mints additional supply of a Hashgraph.Ledger.HTS fungible token

Body
token_idstringRequired

The unique identifier of the token to be minted

Example: 0.0.12345
amountnumberRequired

The quantity of tokens to be minted

Example: 100
daoobjectOptional

Optional DAO configuration for the token minting

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
senderobjectRequired

Sender information for the mint operation

Example: {"key":"PublicKey or KeyList","id":"AccountId"}
Responses
200
Returns Uint8Array transaction bytes
application/json
Responseobject
400
Invalid mint operation
404
Token not found
post
POST /hts/mint/token HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 168

{
  "token_id": "0.0.12345",
  "amount": 100,
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  },
  "sender": {
    "key": "PublicKey or KeyList",
    "id": "AccountId"
  }
}
{}

Hashgraph.Ledger.HTS.FungibleToken.Burn

post

Burns Hashgraph.Ledger.HTS fungible tokens from treasury

Body
token_idstringRequired

The unique identifier of the token to be burned

Example: 0.0.12345
amountnumberRequired

The quantity of tokens to be burned

Example: 100
daoobjectOptional

Optional DAO configuration for the token burning

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
senderobjectRequired

Sender information for the burn operation

Example: {"key":"PublicKey or KeyList","id":"AccountId"}
Responses
200
Returns a Uint8Array.
application/json
Responseobject
400Error
404Error
post
POST /hts/burn/token HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 168

{
  "token_id": "0.0.12345",
  "amount": 100,
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  },
  "sender": {
    "key": "PublicKey or KeyList",
    "id": "AccountId"
  }
}
{}

Mint an NFT

post

This endpoint allows you to mint an NFT.

Body
token_idstringRequired

The unique identifier of the token to be minted

Example: 0.0.12345
cidstringRequired

The Content Identifier (CID) associated with the NFT

Example: QmX5NLKeso6xVxTeP3ycB1RQ5Ir3q7C84oSqQyaCzB7q8g
senderobjectRequired

Sender information for the minting operation

Example: {"key":"PublicKey or KeyList","id":"AccountId"}
daoobjectOptional

Optional DAO configuration for the NFT minting

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Responses
200
Returns a Uint8Array.
application/json
Responseobject
400Error
404Error
post
POST /hts/mint/nft HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 210

{
  "token_id": "0.0.12345",
  "cid": "QmX5NLKeso6xVxTeP3ycB1RQ5Ir3q7C84oSqQyaCzB7q8g",
  "sender": {
    "key": "PublicKey or KeyList",
    "id": "AccountId"
  },
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  }
}
{}

Burn an NFT

post

This endpoint allows you to burn an NFT.

Body
token_idstringRequired

The unique identifier of the NFT token to be burned

Example: 0.0.12345
serial_numbernumberRequired

The unique serial number of the specific NFT to be burned

Example: 1
daoobjectOptional

Optional DAO configuration for the NFT burning

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
senderobjectRequired

Sender information for the burn operation

Example: {"key":"PublicKey or KeyList","id":"AccountId"}
Responses
200
Returns a Uint8Array.
application/json
Responseobject
400Error
404Error
post
POST /hts/burn/nft HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 173

{
  "token_id": "0.0.12345",
  "serial_number": 1,
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  },
  "sender": {
    "key": "PublicKey or KeyList",
    "id": "AccountId"
  }
}
{}

Wipe an NFT

post

This endpoint allows you to wipe an NFT.

Body
token_idstringRequired

The unique identifier of the NFT token to be wiped

Example: 0.0.12345
serial_numbernumberRequired

The unique serial number of the specific NFT to be wiped

Example: 1
account_idstringRequired

The account identifier from which the NFT will be wiped

Example: 0.0.67890
senderobjectRequired

Sender information for the wipe operation

Example: {"key":"PublicKey or KeyList","id":"AccountId"}
daoobjectOptional

Optional DAO configuration for the NFT wiping

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Responses
200
Returns a Uint8Array.
application/json
Responseobject
400Error
404Error
post
POST /hts/wipe/nft HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 198

{
  "token_id": "0.0.12345",
  "serial_number": 1,
  "account_id": "0.0.67890",
  "sender": {
    "key": "PublicKey or KeyList",
    "id": "AccountId"
  },
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  }
}
{}

Transfer HBAR

post

Transfer HBAR from one account to another. Requires sender, receiver, and amount details.

Body
amountnumberRequired

The amount of HBAR to transfer

Example: 100
fromstringRequired

The account ID of the sender

Example: 0.0.12345
tostringRequired

The account ID of the receiver

Example: 0.0.67890
memostringOptional

An optional memo to include with the transfer

Example: Payment for services
senderobjectOptional

The sender account details

daoobjectOptional

Optional DAO configuration for the HBAR transfer

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Responses
200
Returns a Uint8Array representing the transaction.
application/json
Responseobject
400
Invalid transfer details
404
Account not found
post
POST /accounts/transfer/hbar HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 166

{
  "amount": 100,
  "from": "0.0.12345",
  "to": "0.0.67890",
  "memo": "Payment for services",
  "sender": {},
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  }
}
{}

Transfer Token

post

Transfer a specific amount of tokens from one account to another. Requires token ID, sender, receiver, amount, and token decimals.

Body
token_idstringRequired

The unique identifier of the fungible token to be transferred

Example: 0.0.12345
fromstringRequired

The account ID of the sender

Example: 0.0.67890
tostringRequired

The account ID of the receiver

Example: 0.0.11111
amountnumberRequired

The amount of tokens to transfer

Example: 100
decimalsnumberRequired

The number of decimal places for the token

Example: 2
memostringOptional

An optional memo to include with the transfer

Example: Transfer memo
daoobjectOptional

Optional DAO configuration for the fungible token transfer

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Responses
200
Returns a Uint8Array representing the transaction.
application/json
Responseobject
400
Invalid transfer details
404
Token or account not found
post
POST /accounts/transfer/token HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 183

{
  "token_id": "0.0.12345",
  "from": "0.0.67890",
  "to": "0.0.11111",
  "amount": 100,
  "decimals": 2,
  "memo": "Transfer memo",
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  }
}
{}

Transfer NFT

post

Transfer a specific NFT from one account to another. Requires NFT ID, sender, receiver, and serial number.

Body
nftstringRequired

The unique identifier of the NFT token to be transferred

Example: 0.0.12345
fromstringRequired

The account ID of the sender

Example: 0.0.67890
tostringRequired

The account ID of the receiver

Example: 0.0.11111
serial_numbernumberRequired

The unique serial number of the specific NFT to be transferred

Example: 1
memostringOptional

An optional memo to include with the transfer

Example: NFT transfer memo
daoobjectOptional

Optional DAO configuration for the NFT transfer

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
senderobjectOptional

Optional sender configuration

Responses
200
Returns a Uint8Array representing the transaction.
application/json
Responseobject
400
Invalid transfer details
404
NFT or account not found
post
POST /accounts/transfer/nft HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 186

{
  "nft": "0.0.12345",
  "from": "0.0.67890",
  "to": "0.0.11111",
  "serial_number": 1,
  "memo": "NFT transfer memo",
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  },
  "sender": {}
}
{}

Atomic Swap

post

Perform an atomic swap of tokens and/or HBAR between accounts. The swap either succeeds or fails atomically.

Body
fromstringRequired

The account ID of the sender initiating the atomic swap

Example: 0.0.123456
tostringRequired

The account ID of the receiver in the atomic swap

Example: 0.0.789012
token_idstringRequired

The unique identifier of the token being swapped

Example: 0.0.345678
decimalsnumberRequired

The number of decimal places for the token being swapped

Example: 8
amountnumberRequired

The amount of tokens to be swapped

Example: 100
memostringOptional

An optional memo to include with the atomic swap

Example: Atomic swap for Project X
daoobjectOptional

Optional DAO configuration for the atomic swap

Example: {"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
senderobjectOptional

The sender account details

Responses
200
Returns a Uint8Array representing the signed transaction.
application/json
Responseobject
400
Invalid swap details
404
Token or account not found
post
POST /accounts/transfer/atomic-swap HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 210

{
  "from": "0.0.123456",
  "to": "0.0.789012",
  "token_id": "0.0.345678",
  "decimals": 8,
  "amount": 100,
  "memo": "Atomic swap for Project X",
  "dao": {
    "topicId": "0.0.12345",
    "consensusTimestamp": "1234567890.123456789"
  },
  "sender": {}
}
{}