Keep your Merkle trees in expert hands.
solana-arborist
provides the arborist
command-line utility, which gives
easy access to Solana programs leveraging the
spl-account-compression
program. Currently the only such
supported program is the mpl-bubblegum
compressed NFT program.
To install Arborist, the only prerequisite you'll need is a Rust toolchain with Cargo.
To install Arborist from Git, simply check out the repo with git clone
,
optionally select a branch or commit to install, and then install it with the
--path
flag for cargo install
:
$ git clone https://github.com/holaplex/solana-arborist
$ cargo install --path solana-arborist
Arborist loads the keypair for signing transactions in a similar fashion to the
Solana CLI. If you already have a keypair configured with the
solana
command then it will be automatically detected by Arborist. However,
if you use a non-standard configuration you may specify an alternate Solana
config path with -C
, an alternate keypair location with -k
, or the URL of
an alternate Solana RPC node with -u
. (Shorthands are also supported, such as
-u devnet
)
For additional help with the command-line interface, you can always run:
$ arborist help
This will print info about available commands and global options. For help with a specific command, run: ,
$ arborist help <COMMAND>
This command creates a new concurrent Merkle tree and its associated bubblegum tree configuration. To run it, execute the following:
$ arborist create-tree -d <DEPTH> -b <BUFFER_SIZE>
The DEPTH
and BUFFER_SIZE
parameters only accept specific value
combinations, but Arborist will attempt to both prevent submitting illegal
instruction arguments and provide help for selecting correct values for these
parameters. For more information on the DEPTH
and BUFFER_SIZE
parameters,
see the docs.
This command delegates authority over an existing Merkle tree that was previously created with the current signing keypair to a different public key. To run it, execute the following:
$ arborist delegate-tree -t <TREE> -c <TREE_AUTHORITY> -d <NEW_DELEGATE>
The TREE
and TREE_AUTHORITY
parameters are, respectively, the public keys
of the Merkle tree and Bubblegum tree configuration accounts created e.g. by the
create-tree
subcommand. The NEW_DELEGATE
parameter is the public key of
the account to delegate authority of these accounts to.