API reference
Submit data to Avail DA

Submit data to Avail DA

Submits application data to the avail network.
In case of data transaction, data transaction is created, signed and submitted.
In case of extrinsic, externaly created and signed transaction is submitted.

Only one field is allowed per request.
Both data and extrinsic has to be encoded using base64 encoding.

Params:

  • base64 encoded data or extrinsic

Response:

  • block_number - block number where transaction is included
  • block_hash - block hash where transaction is included
  • hash - transaction hash
  • index - transaction index in the block
curl -XPOST 127.0.0.1:7000/v2/submit --header "Content-Type: application/json" --data '{"data":"dGVzdAo="}'
Sample Response:
{
  "block_number": {block-number},
  "block_hash": "{block-hash}",
  "hash": "{transaction-hash}",
  "index": {transaction-index}
}

If app mode is not active (or signing key is not configured and data is submitted) response is:

Not found