Establish a Compression-compatible JSON RPC mock-connection
endpoint to the solana cluster (use for localnet only)
light wasm hasher instance
Endpoint to the compression server.
Endpoint to the prover server. defaults to endpoint
OptionalconnectionConfig: ConnectionConfigOptional connection config
OptionaltestRpcConfig: TestRpcConfigConfig for the mock rpc
Use getStateTreeInfos instead
Use getStateTreeInfos instead
Returns local test state trees.
Get a V2 address tree info.
Fetch the compressed account for the specified account hash
Optionaladdress: BNOptionalhash: BNFetch the compressed balance for the specified account hash
Optionaladdress: BNOptionalhash: BNFetch the total compressed balance for the specified owner public key
Fetch the latest merkle proof for the specified account hash from the cluster
Fetch all the account info for multiple compressed accounts specified by an array of account hashes
Ensure that the Compression Indexer has already indexed the transaction
Fetch the latest merkle proofs for multiple compressed accounts specified by an array account hashes
Fetch all the compressed accounts owned by the specified public key. Owner can be a program or user account
Optional_config: GetCompressedAccountsByOwnerConfigFetch the latest compression signatures on the cluster. Results are paginated.
Optional_cursor: stringOptional_limit: numberFetch the latest non-voting signatures on the cluster. Results are not paginated.
Optional_limit: numberFetch all the compressed token accounts owned by the specified public key. Owner can be a program or user account
Fetch all the compressed accounts delegated to the specified public key.
Fetch the compressed token balance for the specified account hash
use getCompressedTokenBalancesByOwnerV2. Fetch all the compressed token balances owned by the specified public key. Can filter by mint.
Fetch all the compressed token balances owned by the specified public key. Can filter by mint. Uses context.
Returns confirmed signatures for transactions involving the specified account hash forward in time from genesis to the most recent confirmed block
Fetch a confirmed or finalized transaction from the cluster. Return with CompressionInfo
Returns confirmed signatures for transactions involving the specified address forward in time from genesis to the most recent confirmed block
Optional_options: PaginatedOptionsReturns confirmed signatures for compression transactions involving the specified account owner forward in time from genesis to the most recent confirmed block
Optional_options: PaginatedOptionsReturns confirmed signatures for compression transactions involving the specified token account owner forward in time from genesis to the most recent confirmed block
Optional_options: PaginatedOptionsFetch the current indexer health status
Fetch the current slot that the node is processing
Fetch the latest address proofs for new unique addresses specified by an array of addresses.
the proof states that said address have not yet been created in respective address tree.
Array of BN254 new addresses
Array of validity proofs for new addresses
Optional_options: PaginatedOptionsThis method is not available for TestRpc. Please use getValidityProof instead.
Fetch the latest validity proof for (1) compressed accounts specified by an array of account hashes. (2) new unique addresses specified by an array of addresses.
Validity proofs prove the presence of compressed accounts in state trees and the non-existence of addresses in address trees, respectively. They enable verification without recomputing the merkle proof path, thus lowering verification and data costs.
Array of BN254 hashes.
Array of BN254 new addresses.
validity proof with context
Mock RPC for unit tests that simulates the ZK Compression RPC interface. Parses events and builds merkletree on-demand. It does not persist state. Constraints:
For advanced testing use
Rpcclass which uses photon: https://github.com/helius-labs/photon