Page cover

RPC API

RPC Endpoints

You can make JSON RPC calls to GlitchD DA endpoints at https://da.glitchd.network.

DA RPC API Interface

Method
Params
Return
Description

commit

blobs []Blob, namespace Namespace

[]Commitment

Returns Commitment for each given Blob

get

ids []Id, namespace Namespace

[]Blob

Returns Blob for each given Id

get_proofs

ids []Id, namespace Namespace

[]Proof

Returns proofs for each given Id

submit

blobs []Blob, namespace Namespace

[][]Id,Commitment

Returns tuple of Id and Commitment for each given Blob

validate

ids []Id, commitments []Commitment, proofs []Proof, namespace Namespace

[]bool

Returns array of validation results for set of given ids, commitments and proofs

Where:

  • Id - []bytes

  • Blob - []bytes

  • Commitment - []bytes

  • Proof - []bytes

RPC API Request/Response examples:

Service provided all requests and responses in RPC 2.0 format

commit Request body The argument is byte array

   {
    "jsonrpc":"2.0",
    "id": 128,
    "method": "commit",
    "params": [
        [[104,101,108,108,111]],
        "namespace"
    ]
}

Success response should return an array of commitments of the byte array

get Request body

Success response

!!! In case there is no data in storage(means nothing was submitted before) it returns empty bytes array

get_proofs Request body

Success response

!!! In case there is no data in storage(means nothing was submitted before) it returns empty string Proof

submit Request body

Success response

validate Request body 1st params argument is a "hello" string Id and Commitment("${Id}-{Commitment}"), see Submit example 2nd onw is a data with corrupted proof byte array

Success response should return true and false

!!! In case there is no data in storage(means nothing was submitted before) it returns false validation result

ERROR RESPONSE In case the request has invalid params

it returns params validation error:

Last updated