Data Anchor 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 Solana [Config] file [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.
data-anchor blober or data-anchor br
This subcommand allows you to initialize and close blober PDA accounts with the followign commands:
data-anchor br initializeordata-anchor br ito initialize a newbloberPDA account
# Initialize a new namespace with the seed "some-namespace"
data-anchor br closeordata-anchor br cto close an existingbloberPDA account
# Close a existing namespace with the seed "some-namespace"
data-anchor blob or data-anchor b
This subcommand allows you to upload and discard blobs of data with the following commands:
data-anchor b uploadordata-anchor b uto upload data read from a file at the given--data-path(or-d)
# Upload a blob of data read from a file
data-anchor b discardordata-anchor 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
data-anchor b fetchordata-anchor 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
data-anchor b getordata-anchor b gto retrieve all blobs finalized at a given slot
# Get all blobs which were finalized at the given slot
data-anchor indexer or data-anchor i
This subcommand allows you to fetch blobs and proofs for a given blober PDA and slot using the following commands:
data-anchor i blobsordata-anchor i bto fetch blobs
# Retrieve all blobs finalized at the given slot
data-anchor i proofsordata-anchor i pto fetch proofs
# Fetch a compound proof (inclusion or completness) for a given slot
data-anchor measure or data-anchor m
This subcommand allow you to generate data files and upload them to capture some measurements using the following commands:
data-anchor m generateordata-anchor m gto generate data files to a given directorydata-anchor m measureordata-anchor m mto upload data from a given directory and capture measurementsdata-anchor m automateordata-anchor m ato run automated benchmarks with combinations of different data generation and measurement scenarios