Explore More Node Operations

Note: We are in the Alpha Testnet stage, so the API may undergo incompatible changes in the future. If you encounter any issues, please join our Discord to get in touch with the Nubit Team.


Following command could be helpful to your interaction with Nubit DA Alpha Testnet.

Address

Get Account Address

Get your Account Address by entering the following command in terminal.

Parameters

None

Command

$HOME/nubit-node/bin/nubit state account-address  --node.store $HOME/.nubit-light-nubit-alphatestnet-1

Returns

{
  "result": ""
}
Check Address Balance

Get the balance of your account by entering the following command in terminal.

Parameters

None

Command

$HOME/nubit-node/bin/nubit state balance --node.store $HOME/.nubit-light-nubit-alphatestnet-1

Returns

{
  "result": {
    "denom": "unub"
    "amount": "" 
  }
}

Transaction

Initiate a Transaction

Send a given amount of unub from node wallet to the account address provided.

Parameters

address: Account address receiving Unub, starting in nubit....

amount -[Integer]: Amount of Unub transfered.

fee-[Integer]: Gas Price.

gasLimit -[Integer]: Gas Limit of this transaction.

Command

$HOME/nubit-node/bin/nubit state transfer [address] [amount] [fee] [gasLimit]  --node.store $HOME/.nubit-light-nubit-alphatestnet-1

Returns

{
  "result": {
    "height":
    "txhash":
    "data":
    "raw_log":
    "logs":[]
    "gas_wanted":
    "gas_used":
    "events":[]
  }
}

Submit Blob

Initiate a Blob Transaction

Submit the blob at the given namespace by following command below.

Parameters

namespace -[hexadecimal]: Namespace chosen, starting in 0x.

blobData-[string]: Data uploaded and broadcasted.

Command

$HOME/nubit-node/bin/nubit blob submit [namespace] [blobData] --node.store $HOME/.nubit-light-nubit-alphatestnet-1

Returns

// Some code{
  "result": {
    "height":
    "commitments": []
  }
}
Inquire about Blob Transaction

Get the blob for the given namespace by commitment at a particular height.

Parameters

height-[Integer]: Height blobs of data was uploaded.

namespace -[hexadecimal]: Namespace chosen, starting in 0x.

commitment-[string]: Commitment provided as response when submitting blobs.

Command

$HOME/nubit-node/bin/nubit blob get [height] [namespace] [commitment] --node.store $HOME/.nubit-light-nubit-alphatestnet-1

Returns

{
  "result": {
    "namespace": 
    "data":
    "share_version":
    "commitment":
    "index":
  }
}

For more interaction with Nubit DA Alpha Testnet, please refer to Nubit DA Node APIs.

Last updated