Operation API
URL
This URL is the default node URL. To operate on other nodes, simply replace it.
https://hymatrix.ai
tip
Each process has fixed nodes. Transactions must be sent on these fixed nodes to succeed. You can obtain the corresponding nodes via getNodesByProcess.
sendMessage
Initiate a transaction on the corresponding node.
Signature Parameters
{
tags: [
{ name: 'Data-Protocol', value: 'hymx' }, // hymx network, can be queried via the info interface.
{ name: 'Variant', value: 'v0.1.0' }, // hymx version
{ name: 'Type', value: 'Message' }, // hymx transaction type
{ name: 'Action', value: 'Transfer' }, // transaction action
{
name: 'Recipient',
value: 'addr' // recipient address
},
{ name: 'Quantity', value: '100' } // transfer amount
],
processId: 'SGupY0qPOrrh1JXRNGRSoX5NxNfuinJQqgOXlbiOHU0', // token to send
data: '' // signature data
}
| Field | Required | Description |
|---|---|---|
Data-Protocol | YES | hymx: Hymx network name, can be queried via the info interface. |
Variant | YES | v0.1.0: Hymx version, can be queried via the info interface. |
Type | YES | Message: Hymx transaction type, can be queried via the info interface. |
Action | YES | Transfer: Transaction action. |
Recipient | YES | addr: Recipient address. |
Quantity | YES | 100: Transfer amount. |
processId | YES | addr: processId of the token to send, must first get the corresponding node via getNodesByProcess |
data | YES | '': Signature data. |
Parameters
POST https://hymatrix.ai/
| Field | Required | Description |
|---|---|---|
| data | YES | data.bin: Binary file generated based on the signature parameters above. Can be generated using the js-sdk or the upcoming golang-sdk. |
Response Fields
| Field | Description |
|---|---|
id | messageId generated after sending the transaction. |
Example
curl -X POST https://hymx.permadao.io/ \
-H "Content-Type: application/octet-stream" \
--data-binary @data.bin
Return
{
"id":"MCPViI-PoApCqRfjHtxAiryq9pM_7zk1MkbjSSCZSqI",
"message":""
}