Skip to main content

GitHub Repository

Dependencies

Features

Solana Accounts

SolanaAccounts provides the native/builtin program IDs, common SPL program IDs, and sysvar addresses, each with pre-constructed read/invoked AccountMeta variants.
For a fork or custom deployment, use SolanaAccountsBuilder and override only the addresses which differ; every field defaults to its main-net value.

Token-2022 Extensions

Token2022 and Token2022Account parse known Token-2022 extensions into a sealed type hierarchy. Unrecognized type IDs in well-formed TLV data are retained as UnknownTokenExtension with their on-chain type value and raw data. Truncated TLV values, mismatched fixed-size extension lengths, and duplicate extension IDs are rejected. tokenExtensions() returns the parsed extensions. Match their concrete types when handling them; ordinal() exposes each extension’s stable on-chain type ID.

Program Derived Addresses

Private Key Parsing

PrivateKeyEncoding is provided by sava-rpc. JsonIterator comes from its transitive json-iterator dependency.

Usage

JSON Configuration

A JSON object requires encoding and secret; fields may appear in any order. Unknown fields are skipped, including nested objects and arrays. If the base58 encoded public key is supplied as pubKey, it is checked against the public key derived from the private key.

Solana CLI Key Pair JSON Array

By default, if only an array is configured, the assumption is that it is a key pair generated by the Solana CLI.

JSON Array

Key Pair

Encoded 64 byte private/public key pair. Derived public key will be validated.
  • base64KeyPair
  • base58KeyPair

Private Key Only

Encoded 32 byte private key.
  • base64PrivateKey
  • base58PrivateKey

Transaction Deserialization

The TransactionSkeleton interface provides a lightweight view over transaction data. Allowing for partial introspection or complete reconstruction of a Transaction.

Legacy

v0

v1

The same deserializer recognizes v1. All v1 accounts are carried directly in the message, so no address lookup tables need to be fetched.
Deserialization reads the wire structure; it does not establish signature validity or whether a transaction would execute successfully on a cluster.

Creating Transactions

The transaction guide covers choosing a format, building v1 transactions with TxBuilder, simulating, signing, and submitting. It also covers creating a v1 builder from a parsed TransactionSkeleton with prototypeTransaction(). The IDL client examples show a supported legacy flow using generated program instructions.