Skip to main content

JSON RPC Documentation

For an end user or application to interact with MOI Network, either to submit Interactions or read state information, it must connect to MOI Node that exposes its JSON-RPC endpoint. The JSON-RPC API of MOI is transport agnostic and uses JSON for data exchange. Interactions are serialized with POLO before signing.

Client Libraries

While it is acceptable to directly communicate with MOI Nodes with the JSON-RPC API, an easier option is to use a client library or wrapper SDK to handle the heavy lifting. Some available SDKs are:

  • JS-MOI-SDK (Javascript & Typescript SDK)

Conventions

TesseractOptions Parameter

Some JSON-RPC methods have an additional parameter to specify some TesseractOptions to define the default Tesseract. It is represented as an object with the following fields for either a Tesseract Number or Hash:

Field NameTypeDescription
tesseract_numberNUMBERTesseract Number
tesseract_hashHEXTesseract Hash
note

If both tesseract_number and tesseract_hash are provided, an error is returned.

To indicate the earliest or latest Tesseract, use the following values for tesseract_number:

  • 0 for the earliest Tesseract
  • -1 for the latest Tesseract

Hex Value Encoding

There are two main types of data that are passed over JSON:

  1. Unformatted byte arrays
  2. Quantities (like integers and numbers)

These are both passed with a hex encoding, but they have different formatting requirements.

Quantities Formatting Rules

When we encode quantities such as integers and numbers, we use the following rules:

  1. Encode as hex.
  2. Prefix with "0x".
  3. Use the most compact representation.
  4. Zero should be represented as "0x0" (slight exception to rule 3).

Examples

Hex ValueDecimal EquivalentIs it Correct?
0x4165Yes
0x4001024Yes
0xN/ANo (should always have at least one digit - zero is "0x0")
0x04001024No (no leading zeroes allowed)
ff255No (must be prefixed with 0x)

Interactions

The Interaction methods allow you to submit various Interactions to the network. A call to these below RPC endpoints returns an Interaction Hash which can be used to query for the receipt of the interaction using the moi.InteractionReceipt API. Each Interaction type have different payload structure held within the extra_data field of the Interaction Receipt.

The supported interaction types are:

Interaction TypeType of InteractionPayloadReceipt
1AssetTransfertransfer_values field of Interactionn/a
3AssetCreateAssetCreatePayloadAssetCreateReceipt
6AssetMintAssetMintPayloadAssetMintReceipt
7AssetBurnAsseBurnPayloadAssetBurnReceipt
8LogicDeployLogicDeployPayloadLogicDeployReceipt
9LogicInvokeLogicInvokePayloadLogicInvokeReceipt

IxAssetTransfer

This type of interaction is used to transfer assets between sender and receiver addresses. It returns an interaction hash, which can be used to retrieve the interaction receipt.

Parameters:

ParameterTypeDescription
typeNUMBERType of interaction (1 for AssetTransfer)
senderHEX (32 Bytes)Sender's address
receiverHEX (32 Bytes)Receiver's address
transfer_valuesMAP [ AssetID -> HEX ]ID of the asset and the hex value of the amount intended for transfer
fuel_priceHEXFuel price for the interaction
fuel_limitHEXFuel limit for the interaction

Returns:

TypeDescription
HEX (32 Bytes)Interaction hash of the ValueTransfer
{
"params": [
{
"type": 1,
"sender": "0x9c6cc5cccfe2a3dc447bce25f88cb28ce142459057e6c04b59911b6d3f10930a",
"receiver": "0x6ef7715969a7a99edf06957e94494e40203b4be2b0ffb325196677a82de6fcb6",
"transfer_values": {
"0x00000000778549058becea5d34d6554ace488a9f63707c38f39e3d24b42f43453f3d83b9": "0x2fAf080"
},
"fuel_price": "0x130D41",
"fuel_limit": "0x130D41"
}
]
}

IxAssetCreate

This type of interaction is used to create a new asset on the Tesseract Lattice. It returns the interaction hash which can be used to retrieve the receipt.

Parameters:

ParametersTypeDescription
typeNUMBERType of interaction (3 for AssetCreate)
senderHEX (32 Bytes)Sender address
fuel_priceHEXFuel price of the asset
fuel_limitHEXFuel limit of the asset
payloadAssetCreatePayloadContains the information about the asset to be created

AssetCreatePayload

ParametersTypeDescription
symbolSTRINGSymbol of the asset
supplyHEXSupply of the asset
dimensionHEXMultidimensional value of the asset
standardHEXStandard of the asset

AssetCreateReceipt

ParametersTypeDescription
asset_idAssetIDAsset ID of created asset
addressHEXAccount address of asset

Returns:

TypeDescription
HEX (32 Bytes)Interaction hash of the AssetCreate
{
"params": [
{
"type": 3,
"fuel_price": "0x130D41",
"fuel_limit": "0x130D41",
"sender": "0x9c6cc5cccfe2a3dc447bce25f88cb28ce142459057e6c04b59911b6d3f10930a",
"payload": {
"symbol": "RMOI",
"dimension": "0x0",
"standard": "0x0",
"supply": "0x5F5E100"
}
}
]
}

IxAssetMint

This type of interaction is used to mint additional supply from the already existing total supply of an asset. It returns the interaction hash which can be used to retrieve the receipt.

ParametersTypeDescription
typeNUMBERType of interaction (6 for AssetMint)
fuel_priceHEXFuel price for the interaction
fuel_limitHEXFuel limit for the interaction
senderHEX (32 Bytes)Sender address
payloadAssetMintPayloadContains the information about the asset to be minted

AssetMintPayload

ParametersTypeDescription
asset_idAssetIDID of the asset to be minted
amountHEXsupply of the asset to be minted

AssetMintReceipt

ParametersTypeDescription
total_supplyHEXsupply of the asset after minting

Returns:

TypeDescription
HEX (32 Bytes)Interaction hash of the AssetMint
{
"params": [
{
"type": 6,
"fuel_price": "0x1",
"fuel_limit": "0xc8",
"sender": "0x9c6cc5cccfe2a3dc447bce25f88cb28ce142459057e6c04b59911b6d3f10930a",
"payload": {
"asset_id": "0x00000000778549058becea5d34d6554ace488a9f63707c38f39e3d24b42f43453f3d83b9",
"amount": "0x4c4b40"
}
}
]
}

IxAssetBurn

This type of interaction is used to burn a certain amount of supply of an asset on the network. It returns the interaction hash which can be used to retrieve the receipt.

ParametersTypeDescription
typeNUMBERType of interaction (7 for AssetBurn)
fuel_priceHEXFuel price for the interaction
fuel_limitHEXFuel limit for the interaction
senderHEX (32 Bytes)Sender address
payloadAssetBurnPayloadContains the information about the asset to be burned

AssetBurnPayload

ParametersTypeDescription
asset_idAssetIDID of the asset to be burned
amountHEXsupply of the asset to be burned

AssetBurnReceipt

ParametersTypeDescription
total_supplyHEXsupply of the asset after burning

Returns:

TypeDescription
HEX (32 Bytes)Interaction hash of the AssetBurn
{
"params": [
{
"type": 7,
"fuel_price": "0x1",
"fuel_limit": "0xc8",
"sender": "0x9c6cc5cccfe2a3dc447bce25f88cb28ce142459057e6c04b59911b6d3f10930a",
"payload": {
"asset_id": "0x00000000778549058becea5d34d6554ace488a9f63707c38f39e3d24b42f43453f3d83b9",
"amount": "0x4c4b40"
}
}
]
}

IxLogicDeploy

The type of interaction allows users to deploy a new logic on the network. It returns the interaction hash which can be used to retrieve the receipt.

Parameters:

ParameterTypeDescription
typeNUMBERType of interaction (8 for LogicDeploy)
senderHEX (32 Bytes)Sender address
fuel_priceHEXFuel price for the deployment
fuel_limitHEXFuel limit for the deployment
payloadLogicDeployPayloadContains the information

LogicDeployPayload

ParametersTypeDescription
manifestHEXserialized manifest
callsiteSTRINGroutine to be executed
calldataHEXserialized input for logic deploy

LogicDeployReceipt

ParametersTypeDescription
logic_idLogicIDLogic ID of deployed Logic
errorHEXserialised error data if deployer execution fails

Returns:

TypeDescription
HEX (32 Bytes)Interaction hash of the LogicDeploy
{
"params": [
{
"type": 8,
"fuel_price": "0x130D41",
"fuel_limit": "0x130D41",
"sender": "0x9c6cc5cccfe2a3dc447bce25f88cb28ce142459057e6c04b59911b6d3f10930a",
"payload": {
"manifest": "0x7b2273796e746178223a22302e312e30222c22656e67696e65223a7b226b696e64223a2250495341222c22666c616773223a5b5d7d2c22656c656d656e7473223a5b7b22707472223a302c2264657073223a6e756c6c2c226b696e64223a227374617465222c2264617461223a7b226b696e64223a2270657273697374656e74222c226669656c6473223a5b7b22736c6f74223a302c226c6162656c223a226e616d65222c2274797065223a22737472696e67227d2c7b22736c6f74223a312c226c6162656c223a2273796d626f6c222c2274797065223a22737472696e67227d2c7b22736c6f74223a322c226c6162656c223a22737570706c79222c2274797065223a22753634227d2c7b22736c6f74223a332c226c6162656c223a2262616c616e636573222c2274797065223a226d61705b616464726573735d753634227d2c7b22736c6f74223a342c226c6162656c223a22616c6c6f77616e636573222c2274797065223a226d61705b616464726573735d6d61705b616464726573735d753634227d5d7d7d2c7b22707472223a312c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a2253656564657221222c226b696e64223a226465706c6f796572222c2261636365707473223a5b7b22736c6f74223a302c226c6162656c223a226e616d65222c2274797065223a22737472696e67227d2c7b22736c6f74223a312c226c6162656c223a2273796d626f6c222c2274797065223a22737472696e67227d2c7b22736c6f74223a322c226c6162656c223a22737570706c79222c2274797065223a22753634227d2c7b22736c6f74223a332c226c6162656c223a22736565646572222c2274797065223a2261646472657373227d5d2c2272657475726e73223a6e756c6c2c226578656375746573223a7b2262696e223a5b342c302c302c3132392c302c302c342c302c312c3132392c302c312c342c302c322c3132392c302c322c3132382c312c332c342c322c332c38342c312c322c302c3132392c312c335d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a322c2264657073223a6e756c6c2c226b696e64223a22636f6e7374616e74222c2264617461223a7b2274797065223a22753634222c2276616c7565223a22307830333061227d7d2c7b22707472223a332c2264657073223a6e756c6c2c226b696e64223a2274797065646566222c2264617461223a226d61705b616464726573735d753634227d2c7b22707472223a342c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a224e616d65222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a6e756c6c2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a226e616d65222c2274797065223a22737472696e67227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c302c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a352c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a2253796d626f6c222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a6e756c6c2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a2273796d626f6c222c2274797065223a22737472696e67227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c312c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a362c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a22446563696d616c73222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a6e756c6c2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a22646563696d616c73222c2274797065223a22753634227d5d2c226578656375746573223a7b2262696e223a5b31372c302c322c31362c302c302c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a372c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a22546f74616c537570706c79222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a6e756c6c2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a22737570706c79222c2274797065223a22753634227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c322c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a382c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a2242616c616e63654f66222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a5b7b22736c6f74223a302c226c6162656c223a2261646472222c2274797065223a2261646472657373227d5d2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a2262616c616e6365222c2274797065223a22753634227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c332c342c312c302c38332c322c302c312c352c322c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a392c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a22416c6c6f77616e6365222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a5b7b22736c6f74223a302c226c6162656c223a226f776e6572222c2274797065223a2261646472657373227d2c7b22736c6f74223a312c226c6162656c223a227370656e646572222c2274797065223a2261646472657373227d5d2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a22616c6c6f77616e6365222c2274797065223a22753634227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c342c342c312c302c38332c322c302c312c342c332c312c38332c342c322c332c352c342c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a31302c2264657073223a5b302c335d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a22417070726f766521222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a5b7b22736c6f74223a302c226c6162656c223a226f776e6572222c2274797065223a2261646472657373227d2c7b22736c6f74223a312c226c6162656c223a227370656e646572222c2274797065223a2261646472657373227d2c7b22736c6f74223a322c226c6162656c223a22616d6f756e74222c2274797065223a22753634227d5d2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a226f6b222c2274797065223a22626f6f6c227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c342c342c312c302c38332c322c302c312c33322c332c322c39382c332c332c31372c342c31302c332c342c332c31372c342c302c34302c342c342c33362c322c342c312c342c332c312c342c342c322c38342c322c332c342c38342c302c312c322c3132392c302c342c34312c302c312c39382c302c302c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a31312c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a225472616e7366657221222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a5b7b22736c6f74223a302c226c6162656c223a2266726f6d222c2274797065223a2261646472657373227d2c7b22736c6f74223a312c226c6162656c223a22746f222c2274797065223a2261646472657373227d2c7b22736c6f74223a322c226c6162656c223a22616d6f756e74222c2274797065223a22753634227d5d2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a226f6b222c2274797065223a22626f6f6c227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c332c342c312c302c38332c322c302c312c342c332c322c36382c342c332c322c31372c352c31302c332c352c342c34312c302c312c352c302c302c302c312c3130322c342c322c332c38342c302c312c342c342c352c312c38332c342c302c352c3130312c362c342c332c38342c302c352c362c3132392c302c332c34312c302c312c39382c302c302c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a31322c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a224d696e7421222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a5b7b22736c6f74223a302c226c6162656c223a22616d6f756e74222c2274797065223a22753634227d2c7b22736c6f74223a312c226c6162656c223a2261646472222c2274797065223a2261646472657373227d5d2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a226f6b222c2274797065223a22626f6f6c227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c322c342c312c302c3130312c302c302c312c3132392c302c322c3132382c302c332c342c322c312c38332c332c302c322c3130312c332c332c312c38342c302c322c332c3132392c302c332c34312c302c312c39382c302c302c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d2c7b22707472223a31332c2264657073223a5b305d2c226b696e64223a22726f7574696e65222c2264617461223a7b226e616d65223a224275726e21222c226b696e64223a22696e766f6b61626c65222c2261636365707473223a5b7b22736c6f74223a302c226c6162656c223a22616d6f756e74222c2274797065223a22753634227d2c7b22736c6f74223a312c226c6162656c223a2261646472222c2274797065223a2261646472657373227d5d2c2272657475726e73223a5b7b22736c6f74223a302c226c6162656c223a226f6b222c2274797065223a22626f6f6c227d5d2c226578656375746573223a7b2262696e223a5b3132382c302c332c342c312c312c38332c322c302c312c342c332c302c36382c342c332c322c31372c352c31302c332c352c342c34312c302c312c352c302c302c302c312c3130322c342c322c332c38342c302c312c342c3132392c302c332c3132382c302c322c3130322c302c302c332c3132392c302c322c34312c302c312c39382c302c302c352c302c305d2c22686578223a22222c2261736d223a6e756c6c7d2c2263617463686573223a6e756c6c7d7d5d7d",
"callsite": "Seeder!",
"calldata": "0x0def0106458601e501f605d506a60785086e616d65064d4f497365656465720652fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649737570706c790301312d0073796d626f6c064d4f49"
}
}
]
}

IxLogicInvoke

The type of interaction is responsible for invoking a specific routine within a deployed logic. This returns the interaction hash, which can be used to retrieve the receipt.

Parameters:

ParameterTypeDescription
typeNUMBERType of interaction (9 for LogicInvoke)
senderHEX (32 Bytes)Sender address
fuel_priceHEXFuel price
fuel_limitHEXFuel limit
payloadLogicInvokePayloadContains the information about the specific routine to be invoked

LogicInvokePayload

ParametersTypeDescription
logic_idLogicIDThe unique identifier of the logic for that needs to be invoked.
callsiteSTRINGroutine to be executed
calldataHEXserialised input for logic execution

LogicInvokeReceipt

ParametersTypeDescription
outputsHEXserialised output of logic execution
errorHEXserialised error data if logic execution failed

Returns:

TypeDescription
HEX (32 Bytes)Interaction hash of the LogicInvoke
{
"params": [
{
"type": 9,
"fuel_price": "0x130D41",
"fuel_limit": "0x130D41",
"sender": "0x9c6cc5cccfe2a3dc447bce25f88cb28ce142459057e6c04b59911b6d3f10930a",
"payload": {
"logic_id": "0x0800008d898ef91ebd8a208855d6d1c98939202cfcb6a067530845993fe6975de1eb84",
"callsite": "BalanceOf",
"calldata": "0x0d2f0645616464720652fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649"
}
}
]
}

MOI Core APIs

moi.Call

The moi.Call method enables users to perform a stateless simulation of submitting an interaction. This means that it executes the interaction without permanently recording it on the blockchain. It operates similarly to moi.SendInteractions, but with the key difference that the user is not required to sign the interaction.

Parameters:

ParameterTypeDescription
typeNUMBERType of interaction
senderHEX (32 Bytes)Sender address.
receiverHEX (32 Bytes)Receiver address.
transfer_valuesMAP [ AssetID -> HEX ]ID of the asset and the hex value of the amount intended for transfer.
fuel_priceHEXFuel price for the interaction (optional).
fuel_limitHEXFuel limit for the interaction (optional).
payloadHEXDepending on interaction type (refer here).
optionsMAP [ [Address] -> TesseractOptions ]Options for querying the tesseract.

Returns:

ReturnTypeDescription
ix_typeHEXType of interaction (3 for Asset Create).
ix_hashHEX (32 Bytes)The interaction hash.
statusNUMBERThe status of the interaction.
fuel_usedHEXThe amount of fuel used by this specific interaction alone.
extra_dataOBJECTThe payload data obtained from the output receipt.
fromHEX (32 Bytes)The address of the sender who sent the interaction.
toHEX (32 Bytes)The address of the receiver.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Call",
"params": [
{
"ix_args": {
"type": 3,
"sender": "0x3a2dd68422dc24e3459fc93aee0971ce0e0208e1791574653f9153c70580c107",
"payload": "0x0ecf01066383019301910191019001434845544e41271001"
},
"options": {
"0x3231da4e027482e9a6f58bab06ec6597d765ae2a7c0338615e1b281ecb2b5458": {
"tesseract_hash": "0x9edb727d4667f6ec0cb6bc2e7cd11ec80877e8f769cc984b58952ee1c24156e5"
},
"0x82e0bf20d9ba64df7a48fd98c86221d599c243110f26bc9e050a50f794cdfc31": {
"tesseract_number": -1
}
}
}
],
"jsonrpc": "2.0",
"id": 1
}'
 curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Call",
"params": [
{
"ix_args": {
"type": 3,
"fuel_price": "0x1",
"fuel_limit": "0x32",
"sender": "0x3a2dd68422dc24e3459fc93aee0971ce0e0208e1791574653f9153c70580c107",
"payload": "0x0ecf01066383019301910191019001434845544e41271001"
},
"options": {
"0x3231da4e027482e9a6f58bab06ec6597d765ae2a7c0338615e1b281ecb2b5458": {
"tesseract_hash": "0x9edb727d4667f6ec0cb6bc2e7cd11ec80877e8f769cc984b58952ee1c24156e5"
},
"0x82e0bf20d9ba64df7a48fd98c86221d599c243110f26bc9e050a50f794cdfc31": {
"tesseract_number": -1
}
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.SendInteractions

The moi.SendInteractions method is employed to send an interaction to the network. This involves the ix_args field, which holds the encoded interaction object, and the signature field, which represents the user's signature of the interaction using their private key.

In simple terms, it's a way for the user to securely transmit and validate interactions on the blockchain.

{
"ix_args": "0e9f0203131696049608900c900c930ca30cb60c03f350520ebca8c09efa19f2ed13012ceb70b2e710241748f4ac11bd4a9b43949b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c80edf01031653830183018101810180010354455354130d41",
"signature": "01473045022100e64317f1a0e16ed6b6280ca08881196f7be64a88367a4021f0708b7c3e19528702203d400c1cd5977205d949d00c87700f920c81bc6a5769d8caa8a0829f6965121b02"
}

moi.Tesseract

This method retrieves the tesseract by the provided options. The tesseract details can be fetched by either providing the address along with the tesseract number or by providing the tesseract hash alone.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the sender requesting the tesseract.
with_interactionsBOOLEANIf true, it returns the interactions list as part of the tesseract.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

ReturnTypeDescription
participantsARRAYAn array of participants involved in the interaction and their details.
interactions_hashHEX (32 Bytes)The hash of all the interactions in the tesseract.
receipts_hashHEX (32 Bytes)The hash of all the receipts.
hashHEX (32 Bytes)The hash of the tesseract.
sealHEXThe signature of node which executed the tesseract.
epochHEXEpoch denotes the fixed time slot.
time_stampHEXThe ICS request time.
operatorSTRINGThe krama ID of the operator node.
consensus_infoOBJECTAn object containing consensus related information.
fuel_usedHEXThe amount of fuel used until the tesseract formation.
fuel_limitHEXFuel limit.
ixnsARRAYIf with_interactions is set to true, an array of interactions is returned.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Tesseract",
"params": [
{
"address": "0x62b8342797343fd95a2b5abe65dd74034bedd6248d91098f759d3d8408004fc3",
"with_interactions": true,
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'
  curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Tesseract",
"params": [
{
"with_interactions": true,
"options": {
"tesseract_hash": "0xccb8d5c80f78ba3f2cf305f7be5fba95a5cdb0c0ede724c66f91948bba25945a"
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.InteractionByTesseract

This method allows users to retrieve an interaction based on a given tesseract hash and interaction index. If the interaction index is not found, the function will throw an error.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the sender.
optionsTesseractOptionsOptions for querying the tesseract.
ix_indexHEXRepresents the index of the interaction within the tesseract.

Returns:

ReturnTypeDescription
typeNUMBERType of the interaction.
nonceHEXThe nonce of the tesseract.
senderHEX (32 Bytes)Sender address.
receiverHEX (32 Bytes)Receiver address.
payerHEX (32 Bytes)Payer address.
transfer_valuesMAP [ AssetID -> HEX ]ID of the asset and the hex value of the amount intended for transfer.
perceived_valuesMAP [ AssetID -> HEX ]ID of the asset and the hex value of the amount perceived.
perceived_proofsHEXAn array of bytes representing perceived proof of the interaction.
fuel_priceHEXThe fuel price for the interaction.
fuel_limitHEXThe fuel limit of the interaction.
payloadOBJECTDepending on interaction type (refer here).
modeHEXThe mode of the interaction.
compute_hashHEX (32 Bytes)The computational hash of the interaction.
compute_nodesARRAYA list of computational nodes for the interaction.
mtqHEXAn integer representing the trust of the interaction.
trust_nodesARRAYA list of trustable nodes.
hashHEX (32 Bytes)The hash of the interaction.
ts_hashHEX (32 Bytes)The hash of the tesseract.
signatureARRAYAn array of signature bytes associated with the interaction.
participantsARRAYAn array of participants involved in the interaction and their details.
ix_indexHEXAn integer representing the interaction index in the tesseract.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.InteractionByTesseract",
"params": [
{
"address": "0x62b8342797343fd95a2b5abe65dd74034bedd6248d91098f759d3d8408004fc3",
"options": {
"tesseract_number": -1
},
"ix_index": "0x0"
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.InteractionByHash

This method retrieves the interaction details for a given interaction hash.

Parameters:

ParameterTypeDescription
hashHEX (32 Bytes)Interaction hash for which you want to fetch interaction details.

Returns:

ReturnTypeDescription
typeNUMBERType of the interaction.
nonceHEXThe nonce of the tesseract.
senderHEX (32 Bytes)Sender address.
receiverHEX (32 Bytes)Receiver address.
payerHEX (32 Bytes)Payer address.
transfer_valuesMAP [ AssetID -> HEX ]ID of the asset and the hex value of the amount intended for transfer.
perceived_valuesMAP [ AssetID -> HEX ]ID of the asset and the hex value of the amount perceived.
perceived_proofsHEXAn array of bytes representing perceived proof of the interaction.
fuel_priceHEXThe fuel price for the interaction.
fuel_limitHEXThe fuel limit of the interaction.
payloadOBJECTDepending on interaction type (refer here).
modeHEXThe mode of the interaction.
compute_hashHEX (32 Bytes)The computational hash of the interaction.
compute_nodesARRAYA list of computational nodes for the interaction.
mtqHEXAn integer representing the trust of the interaction.
trust_nodesARRAYA list of trustable nodes.
hashHEX (32 Bytes)The hash of the interaction.
ts_hashHEX (32 Bytes)The hash of the tesseract.
signatureARRAYAn array of signature bytes associated with the interaction.
participantsARRAYAn array of participants involved in the interaction and their details.
ix_indexHEXAn integer representing the interaction index in the tesseract.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.InteractionByHash",
"params": [
{
"hash": "0xf4da87b4c01a997b8aebde74560420204b1de0f22b7157a6b1d89f14f34704ce"
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.InteractionReceipt

This method retrieves the receipt of a specific interaction in the system. The interaction is identified by its unique hash. The receipt provides detailed information about the interaction.

Parameters:

ParameterTypeDescription
hashHEX (32 Bytes)The unique hash that identifies the interaction.

Returns:

ReturnTypeDescription
ix_typeHEXThe type of the interaction in hex.
ix_hashHEX (32 Bytes)The unique hash of the interaction.
statusNUMBERThe status of the interaction.
fuel_usedHEXThe amount of fuel used by this specific interaction alone.
extra_dataOBJECTAn object containing asset_id.
fromHEX (32 Bytes)The address of the sender.
toHEX (32 Bytes)The address of the receiver.
ts_hashHEX (32 Bytes)The hash of the tesseract.
ix_indexHEXThe integer representing the interaction index in the tesseract.
participantsARRAYAn array of participants involved in the interaction and their details.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.InteractionReceipt",
"params": [
{
"hash": "0x2ccd935031bab60870b11a8fc0cae44303e6e3a922d0eb4d5353a6ecf6fb9968"
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.InteractionCount

This method helps to fetch the total number of interactions performed by a particular account.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the account for which the total interaction count is queried.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
HEXThe total number of interactions that have been made by the queried account.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.InteractionCount",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.PendingInteractionCount

This method provides the total number of interactions for a given address, inclusive of both the completed and pending interactions in IxPool.

Parameters:

NameTypeDescription
addressHEX (32 Bytes)The address of the account for which the total number interaction count is queried.

Returns:

Returns TypeDescription
HEXThe total number of interactions made by the queried account, including the pending interactions in IxPool.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.PendingInteractionCount",
"params": [
{
"address": "0x81855ad8681d0d86d1e91e00167939cb6694d2c422acd208a0072939487f6999"
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.AccountMetaInfo

This method provides metadata information about a specific account based on the provided account's address.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The account address for which metadata information is to be retrieved.

Returns:

Return TypeDescription
OBJECTThe object contains meta information about the queried account.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.AccountMetaInfo",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.AccountState

This method returns the account for a provided address.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the sender whose account state is to be retrieved.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
OBJECTThe object contains detailed information about the queried account.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.AccountState",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.ContextInfo

This method provides information the context information that is associated with the provided address. It includes the krama id's of the behaviour nodes, random nodes, and storage nodes that are part of this interaction.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the sender.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

ReturnsTypeDescription
behaviour_nodesARRAYA list of the krama id's of behaviour nodes that are part of the latest interaction.
random_nodesARRAYA list of the krama id's of random nodes that are part of the latest interaction.
storage_nodesARRAYA list of the krama id's of storage nodes that are part of the latest interaction.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.ContextInfo",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.TDU

This method is used to retrieve the Total Digital Utility (TDU) of a specific address. It is a method to get a list of all asset IDs associated with a given address and their total supply.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)the address of the sender for which TDU is required.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
ARRAYA list of asset IDs and their respective total supply.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.TDU",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.Balance

This method is used to retrieve the current balance of a specified asset associated with a given account.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address for which the balance needs to be retrieved.
asset_idAssetIDThe ID of the asset for which the balance is to be retrieved.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
NUMBERAn integer representing the current balance of the queried asset.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Balance",
"params": [
{
"address": "0x81855ad8681d0d86d1e91e00167939cb6694d2c422acd208a0072939487f6999",
"asset_id": "0000ed517b0e68a54bf19fa0a1f88130a0503b18b258f7f7042e03f1518e4ab015bc",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.Registry

This method is used to obtain a list of registries that store asset IDs and their corresponding asset descriptions.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address for which the registries need to be retrieved.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
ARRAYA list of registries that store asset IDs and their corresponding asset descriptions.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Registry",
"params": [
{
"address": "0x81855ad8681d0d86d1e91e00167939cb6694d2c422acd208a0072939487f6999",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.Syncing

This method returns the sync status of an account if address is given else returns the node sync status. If the pending accounts variable is set to true, it returns the node sync status with a list of accounts awaiting synchronization.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the account for which the sync status is to be determined
pending_accountsBOOLEANIf true, it provides a list of accounts awaiting synchronization as part of the node sync status.

Returns:

ReturnTypeDescription
account_sync_statusOBJECTThe sync status of the account for which address is given
node_sync_statusOBJECTThe sync status of the node
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Syncing",
"params": [
{
"address": "0xa6ba9853f131679d00da0f033516a2efe9cd53c3d54e1f9a6e60e9077e9f9384"
}
],
"jsonrpc": "2.0",
"id": 1
}'
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.Syncing",
"params": [
{
"pending_accounts": true
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.FuelEstimate

This method returns an estimate of the fuel that is required for executing an interaction.

Parameters:

ParameterTypeDescription
typeNUMBERType of interaction (1 for AssetTransfer)
senderHEX (32 Bytes)Sender's address
receiverHEX (32 Bytes)Receiver's address
transfer_valuesMAP [ AssetID -> HEX ]ID of the asset and the hex value of the amount intended for transfer
fuel_priceHEXFuel price for the interaction (optional)
fuel_limitHEXFuel limit for the interaction (optional)
payloadHEXDepending on interaction type (refer here)
optionsMAP [ [Address] -> TesseractOptions ]Options for querying the tesseract.

Returns:

Return TypeDescription
fuel_usedAn estimate of the amount of fuel used by this specific interaction alone.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.FuelEstimate",
"params": [
{
"ix_args": {
"type": 3,
"sender": "0x3a2dd68422dc24e3459fc93aee0971ce0e0208e1791574653f9153c70580c107",
"payload": "0x0ecf01066383019301910191019001434845544e41271001"
},
"options": {
"0x3231da4e027482e9a6f58bab06ec6597d765ae2a7c0338615e1b281ecb2b5458": {
"tesseract_hash": "0x9edb727d4667f6ec0cb6bc2e7cd11ec80877e8f769cc984b58952ee1c24156e5"
},
"0x82e0bf20d9ba64df7a48fd98c86221d599c243110f26bc9e050a50f794cdfc31": {
"tesseract_number": -1
}
}
}
],
"jsonrpc": "2.0",
"id": 1
}'
  curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.FuelEstimate",
"params": [
{
"ix_args": {
"type": 3,
"fuel_price": "0x1",
"fuel_limit": "0x32",
"sender": "0x3a2dd68422dc24e3459fc93aee0971ce0e0208e1791574653f9153c70580c107",
"payload": "0x0ecf01066383019301910191019001434845544e41271001"
},
"options": {
"0x3231da4e027482e9a6f58bab06ec6597d765ae2a7c0338615e1b281ecb2b5458": {
"tesseract_hash": "0x9edb727d4667f6ec0cb6bc2e7cd11ec80877e8f769cc984b58952ee1c24156e5"
},
"0x82e0bf20d9ba64df7a48fd98c86221d599c243110f26bc9e050a50f794cdfc31": {
"tesseract_number": -1
}
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.AssetInfoByAssetID

This method provides detailed information about a specific asset identified by the provided asset ID.

Parameters:

ParameterTypeDescription
asset_idAssetIDThe asset ID for which the information is to be retrieved.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

ReturnTypeDescription
symbolSTRINGThe symbolic representation of the asset.
operatorHEX (32 Bytes)The address of the operator of the asset.
supplyHEXThe total supply of the asset.
dimensionHEXThe dimensions of the asset.
standardHEXIndicates the asset standard.
is_logicalBOOLEANIndicates whether the asset is logical or not.
is_statefulBOOLEANIndicates whether the asset is stateful or not.
logic_idLogicIDThe logic id associated with the asset.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.AssetInfoByAssetID",
"params": [
{
"asset_id":"0x000000009d8810a510ec135b73848a9de05ed747fbbeedfbf689583f59e50dca0089b7c4",
"options":{
"tesseract_number":-1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.LogicIDs

This method is used to retrieve a list of all the logic IDs associated with a specific logic address.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the sender for which the logic IDs are required.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
ARRAYA list of logic IDs.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.LogicID",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.LogicManifest

This method retrieves the manifest associated with a specific logicID.

Parameters:

ParameterTypeDescription
logic_idLogicIDThe unique identifier of the logic for which the manifest is to be returned.
encodingSTRINGSpecifies the encoding type of the manifest. It should be JSON, POLO, or YAML.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
HEXContains the manifest associated with the given logic ID, encoded in the requested format.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.LogicManifest",
"params": [
{
"logic_id": "0800009259ee349d92e578e7ae0150d8f8ffa1aa73535baecf3ae18c3e7ea8e305b3f5",
"encoding": "JSON",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.LogicStorage

This method is used to retrieve the data associated with a particular storage slot and Logic ID. This can be useful when you want to inspect or read the data that is stored in a specific slot of a logic entity.

Parameters:

ParameterTypeDescription
logic_idLogicIDThe id of the logic whose associated data is to be accessed.
storage-keyStorageKeyThe key of the storage slot hash whose data is to be accessed. It's represented as hexadecimal of 32 bytes long.
optionsTesseractOptionsOptions for querying the tesseract.

Returns:

Return TypeDescription
HEXThe data associated with the given logic id and storage slot within the tesseract.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "moi.LogicStorage",
"params": [
{
"logic_id": "0800009259ee349d92e578e7ae0150d8f8ffa1aa73535baecf3ae18c3e7ea8e305b3f5",
"storage_key": "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314",
"options": {
"tesseract_number": -1
}
}
],
"jsonrpc": "2.0",
"id": 1
}'

moi.NewTesseractFilter

This method is used to set up a filter to get all new terreracts since filter is set up. The method has a timeout period of 1 minute. Each time we query, the timeout is reset to 1 minute.

Parameters:

This method does not require any parameters.

Returns:

ReturnTypeDescription
idSTRINGThe object containing the Filter ID for NewTesseractFilter
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method":"moi.NewTesseractFilter",
"jsonrpc":"2.0",
"id":1
}'

moi.NewTesseractsByAccountFilter

This method is used to set up a filter to get all new terreracts for the given account since filter is set up. The method has a timeout period of 1 minute. Each time we query, the timeout is reset to 1 minute.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the account you want to get new tesseracts for

Returns:

ReturnTypeDescription
idSTRINGThe object containing the Filter ID for NewTesseractsByAccountFilter
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method":"moi.NewTesseractsByAccountFilter",
"params":[
{
"address":"0x9673f1882112b218e5be9f2e0c8a65ce2b3f35ecd4e056dde4d9084229ddaa4e"
}
],
"jsonrpc":"2.0",
"id":1
}'

moi.PendingIxnsFilter

This method is used to set up a filter to get all new interactions in ixpool since filter is set up. The method has a timeout period of 1 minute. Each time we query, the timeout is reset to 1 minute.

Parameters:

This method does not require any parameters.

Returns:

ReturnTypeDescription
idSTRINGThe object containing the Filter ID for PendingIxnsFilter
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method":"moi.PendingIxnsFilter",
"jsonrpc":"2.0",
"id":1
}'

moi.RemoveFilter

This method is used to remove a filter.

Parameters:

ParameterTypeDescription
idSTRINGThe object containing the Filter ID of the filter you want to remove

Returns:

ReturnTypeDescription
statusBOOLReturns true on successful removal of filter, else false
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method":"moi.RemoveFilter",
"params":[
{
"id": "4155a053-7b74-46ac-98b6-9f440e27e2e5"
}
],
"jsonrpc":"2.0",
"id":1
}'

moi.GetFilterChanges

This method is used to get all filter changes since the last poll. The result varies based on filter.

Parameters:

ParameterTypeDescription
idSTRINGThe object containing the Filter ID of the filter you want changes for

Returns:

ReturnTypeDescription
dataJSONThe object data varies based on filter. Example used: moi.NewTesseractFilter
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method":"moi.GetFilterChanges",
"params":[
{
"id": "4ef7b0b7-6a21-4522-a8d6-78296cc2d028"
}
],
"jsonrpc":"2.0",
"id":1
}'

IxPool APIs

ixpool.ContentFrom

This method is used to fetch detailed information about the interactions that are pending for inclusion in the next Tesseract(s) or are scheduled for future execution. This information is fetched based on the address provided as a parameter.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the sender.

Returns:

ReturnTypeDescription
pendingOBJECTThe object containing details of pending interactions for the given address.
queuedOBJECTThe object containing details of queued interactions for the given address.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "ixpool.ContentFrom",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649"
}
],
"jsonrpc": "2.0",
"id": 1
}'

ixpool.WaitTime

This method is used to retrieve the waiting time for an account in ixpool. It's a way to check how long an account has to wait in the queue to get processed.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the account for which the wait time has to be retrieved.

Returns:

ReturnTypeDescription
expiredBOOLEANIndicates whether if it has exceeded the wait time
timeDURATIONThe amount of time the account will have to wait in the queue to get processed (expressed in milliseconds)
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "ixpool.WaitTime",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649"
}
],
"jsonrpc": "2.0",
"id": 1
}'

ixpool.Content

This method is used to retrieve a comprehensive list of all interactions that are awaiting inclusion in the upcoming Tesseract(s). It also retrieves all the interactions that are scheduled for execution in the future.

Parameters:

This method does not require any parameters.

Returns:

Return TypeDescription
OBJECTThe object contains a list of all pending and queued interactions
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "ixpool.Content",
"jsonrpc": "2.0",
"id": 1
}'

ixpool.Inspect

This method provides a summary of all the interactions that are currently waiting to be included in the next Tesseract(s), as well as interactions scheduled for future execution. Additionally, it provides a list of all the accounts in the ixpool with their respective wait times. This method is particularly useful for developers, as it can help them quickly review interactions in the pool and identify any potential issues.

Parameters:

This method does not require any parameters.

Returns:

Return TypeDescription
OBJECTThe object contains a simplified, readable list of all interactions that are waiting for inclusion in the next Tesseract and are scheduled for future execution. It also includes a list of accounts with their respective wait times.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "ixpool.Inspect",
"jsonrpc": "2.0",
"id": 1
}'

ixpool.Status

This method provides a summary of all the interactions that are currently pending for inclusion in the next Tesseract(s) and interactions that are scheduled for future execution. This method is particularly useful for developers, as it can help them quickly review interactions and identify any potential issues.

Parameters:

This method does not require any parameters.

Returns:

Return TypeDescription
OBJECTAn object containing the number of pending and queued interactions.
curl --location 'https://voyage-rpc.moi.technology/babylon/ \
--header 'Content-Type: application/json' \
--data '{
"method": "ixpool.Status",
"jsonrpc": "2.0",
"id": 1
}'

Net APIs

net.Peers

This method allows you to retrieve a list of peers in the network. Peers are represented by their unique Krama IDs.

Parameters:

This method doesn't require any parameters.

Returns:

Return TypeDescription
ARRAYA list of Krama IDs, each representing a unique peer in the network.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "net.Peers",
"jsonrpc": "2.0",
"id": 1
}'

net.Version

This method is used to get the version of the software running.

Parameters:

This method does not require any parameters.

Returns:

Return TypeDescription
STRINGThe version of the software running.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "net.Version",
"jsonrpc": "2.0",
"id": 1
}'

net.Info

This method is used to get the Krama ID of the node.

Parameters:

This method does not require any parameters.

Returns:

Return TypeDescription
OBJECTKrama ID of the node.
curl --location 'https://voyage-rpc.moi.technology/babylon/' \
--header 'Content-Type: application/json' \
--data '{
"method": "net.Info",
"jsonrpc": "2.0",
"id": 1
}'

Debug APIs

debug.DBGet

This method is used to retrieve raw value of a particular key stored in the database.

Parameters:

ParameterTypeDescription
storage_keyDBkeyThis is the unique identifier for the stored data you want to retrieve. This is represented as hexadecimal of 65 bytes long.

Returns:

Return TypeDescription
OBJECTThis is the raw value that is stored in the database corresponding to the provided storage key.
curl --location --request POST 'http://localhost:1600/' \
--header 'Content-Type: application/json' \
--data-raw '{
"method": "debug.DBGet",
"params": [
{
"storage_key":"6275636b657400000384a6ba9853f131679d00da0f033516a2efe9cd53c3d54e1f9a6e60e9077e9f9384"
}
],
"jsonrpc": "2.0",
"id": 1
}'

debug.NodeMetaInfo

This method retrieves the metadata for a specific peer based on the provided parameters. If no parameters are provided, it returns metadata for all peers available in the database.

Parameters:

ParameterTypeDescription
peer_idSTRINGThe peer id of the node for which metadata is requested (optional).
krama_idSTRINGThe krama id of the node for which metadata is requested (optional).

Returns:

Return TypeDescription
OBJECTThe object contains node meta info for the specific node or all nodes in the database.
curl --location --request POST 'http://localhost:1600/' \
--header 'Content-Type: application/json' \
--data-raw '{
"method": "debug.NodeMetaInfo",
"params": [{}],
"jsonrpc": "2.0",
"id": 1
}'

debug.Accounts

This method is used to fetch a list of all registered account addresses.

Parameters:

This method does not require any parameters.

Returns:

Return TypeDescription
ARRAYThis contains a list of addresses of all registered accounts.
curl --location 'http://localhost:1600/' \
--header 'Content-Type: application/json' \
--data '{
"method": "debug.Accounts",
"jsonrpc": "2.0",
"id": 1
}'

debug.Connections

This method is used to fetch a list of active connections and connection stats.

Parameters:

This method does not require any parameters.

Returns:

ReturnTypeDescription
connsARRAYAn array of active connections.
inbound_conn_countINTThe number of in-bound connections.
outbound_conn_countINTThe number of out-bound connections.
active_pub_sub_topicsMAP [ [STRING] -> INT ]Active pub-sub topics.
curl --location 'http://localhost:1601/' \
--header 'Content-Type: application/json' \
--data '{
"method": "debug.Connections",
"jsonrpc": "2.0",
"id": 1
}'

debug.Diagnosis

This method initiates a diagnosis process with the provided parameters, collects various diagnostic information for the moipod.

Parameters:

ParameterTypeDescription
output_pathSTRINGThe path where diagnostic information will be stored.
collectorsSTRINGAn array of specific diagnostic data collectors to include in the diagnosis. Options include: goroutines-stack, goroutines-pprof, version, heap, allocs, cpu, mutex, block.
profile_timeSTRINGThe duration for which profiling data should be collected (e.g., "2m" for 2 minutes).
mutex_profile_fractionNUMBERFractional sampling rate for mutex profiling.
block_profile_rateSTRINGThe rate at which block (contention) profiling data should be collected (e.g., "5s" for every 5 seconds).

Returns:

Return TypeDescription
OBJECTAn empty object.
curl --location --request POST 'http://localhost:1600/' \
--header 'Content-Type: application/json' \
--data-raw '{
"method": "debug.Diagnosis",
"params": [
{
"output_path": "/path/go-moi",
"collectors": [],
"profile_time": "2m",
"mutex_profile_fraction": 4,
"block_profile_rate": "5s"
}
],
"jsonrpc": "2.0",
"id": 1
}'

debug.GetSyncJob

This method returns the sync job meta info for a given address.

Parameters:

ParameterTypeDescription
addressHEX (32 Bytes)The address of the account for which the sync job meta info has to be retrieved.

Returns:

Return TypeDescription
OBJECTThe object contains the sync job meta info for given address
  curl --location 'http://localhost:1600/' \
--header 'Content-Type: application/json' \
--data '{
"method": "debug.GetSyncJob",
"params": [
{
"address": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649"
}
],
"jsonrpc": "2.0",
"id": 1
}'