GitHub Repository
Dependencies
Features
- Transaction construction and signing, plus legacy, v0, and v1 deserialization
- Account Types:
- Token, Mint, Token-2022 and all of its extensions
- Address Lookup Tables
- Common collection of main-net addresses
- Ed25519 public and private keys
- Program derived addresses
- Encoding:
Solana Accounts
SolanaAccounts provides the native/builtin program IDs, common SPL program IDs, and sysvar addresses, each with pre-constructed read/invokedAccountMeta variants.
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 asUnknownTokenExtension 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 requiresencoding 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.Creating Transactions
The transaction guide covers choosing a format, building v1 transactions withTxBuilder, 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.