Skip to main content

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
}
FieldRequiredDescription
Data-ProtocolYEShymx: Hymx network name, can be queried via the info interface.
VariantYESv0.1.0: Hymx version, can be queried via the info interface.
TypeYESMessage: Hymx transaction type, can be queried via the info interface.
ActionYESTransfer: Transaction action.
RecipientYESaddr: Recipient address.
QuantityYES100: Transfer amount.
processIdYESaddr: processId of the token to send, must first get the corresponding node via getNodesByProcess
dataYES'': Signature data.

Parameters

POST https://hymatrix.ai/
FieldRequiredDescription
dataYESdata.bin: Binary file generated based on the signature parameters above. Can be generated using the js-sdk or the upcoming golang-sdk.

Response Fields

FieldDescription
idmessageId 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":""
}