4 releases
| 0.1.7 | May 30, 2025 |
|---|---|
| 0.1.6 | May 28, 2025 |
| 0.1.5 | May 5, 2025 |
| 0.1.4 | Apr 25, 2025 |
#3 in #blober
242 downloads per month
340KB
7K
SLoC
Nitro Da CLI
This crate allows users to interact with the blober program in order to register new blober PDA accounts, upload
blobs and retrieve data from the indexer.
The mandatory parameters for this tool are the address of the blober program (--program-id or -p) and the
namespace of the blober PDA to interact with (--namespace or -n).
Optional global parameters are:
- payer (
-s,--payer): The payer account to use for transactions - output (
-o,--output): The output format to use [default: text] [possible values: text, json, json-pretty, csv] - falls back to text output if a format is not supported for a command - indexer url (
-i,--indexer-url): The URL of the indexer to use - config file (
-c,--config-file): The path to the SolanaConfigfile [default: ~/.config/solana/cli/config.yml]
The CLI has a help command (available for each subcommand as well) which you can use to check the usage.
Here is a high level overview of the available commands.
nitro-da-cli blober or nitro-da-cli br
This subcommand allows you to initialize and close blober PDA accounts with the followign commands:
nitro-da-cli br initializeornitro-da-cli br ito initialize a newbloberPDA account
# Initialize a new namespace with the seed "some-namespace"
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" br i
nitro-da-cli br closeornitro-da-cli br cto close an existingbloberPDA account
# Close a existing namespace with the seed "some-namespace"
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" br c
nitro-da-cli blob or nitro-da-cli b
This subcommand allows you to upload and discard blobs of data with the following commands:
nitro-da-cli b uploadornitro-da-cli b uto upload data read from a file at the given--data-path(or-d)
# Upload a blob of data read from a file
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" b u -d "./data.txt"
nitro-da-cli b discardornitro-da-cli b dto discard a blob upload with the givenblobPDA (--blobor-b) before it is finalized
# Discard a failed or stale blob upload with the given PDA ID
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" b d -b "<some-blob-pda-id>"
nitro-da-cli b fetchornitro-da-cli b fto fetch blob data from the ledger given a list of transaction signatures
# Fetch blob data from the ledger given a list of transactions
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" b f "<some-tx-signature>" "<some-other-tx-signature>"
nitro-da-cli b getornitro-da-cli b gto retrieve all blobs finalized at a given slot
# Get all blobs which were finalized at the given slot
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" b g 54321
nitro-da-cli indexer or nitro-da-cli i
This subcommand allows you to fetch blobs and proofs for a given blober PDA and slot using the following commands:
nitro-da-cli i blobsornitro-da-cli i bto fetch blobs
# Retrieve all blobs finalized at the given slot
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" i b 54321
nitro-da-cli i proofsornitro-da-cli i pto fetch proofs
# Fetch a compound proof (inclusion or completness) for a given slot
nitro-da-cli -p "<program-id-of-blober>" -n "some-namespace" i p 54321
nitro-da-cli measure or nitro-da-cli m
This subcommand allow you to generate data files and upload them to capture some measurements using the following commands:
nitro-da-cli m generateornitro-da-cli m gto generate data files to a given directorynitro-da-cli m measureornitro-da-cli m mto upload data from a given directory and capture measurementsnitro-da-cli m automateornitro-da-cli m ato run automated benchmarks with combinations of different data generation and measurement scenarios
Dependencies
~87MB
~1.5M SLoC