Submit data to Avail DA
Submit base64-encoded application data to Avail DA using the v2/submit HTTP endpoint.
Note
LOOKING FOR INSTRUCTIONS ON HOW TO RUN YOUR OWN LIGHT CLIENT?
You can check out our docs here for instructions on how to run your own light client.
You can check out our docs here for instructions on how to run your own light client.
Warning
Note:
Light client must be running in
Light client must be running in
app-modeto retrieve data. Click here for instructions on how to run an Avail Light Client in app-mode.Submits application data to the avail networkIn case of
data transaction, data transaction is created, signed and submitted.In case of
extrinsic, externally 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:
base64encoded data or extrinsic
Note
HOW TO SUBMIT DATA USING THE LIGHT CLIENT?
-
To use this method you need to run your Light Client in the
app-clientmode. You can then submit data directly to theappIDyou configured while booting up the Light Client. -
You can only pass
Base64encoded data to be submitted via the Light Client. You can use this website to encode & decode your data into the required formats.
- 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:7007/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}"
}data is submitted) response is:Not foundHow is this guide?