npm npm-downloads
code-style-prettier

@solana/web3.js

This is the JavaScript SDK for building Solana apps for Node, web, and React Native.

In addition to reexporting functions from packages in the @solana/* namespace, this package offers additional helpers for building Solana applications, with sensible defaults.

Returns a function that you can call to airdrop a certain amount of Lamports to a Solana address.

import {
address,
airdropFactory,
createSolanaRpc,
createSolanaRpcSubscriptions,
devnet,
lamports,
} from '@solana/web3.js';

const rpc = createSolanaRpc(devnet('http://127.0.0.1:8899'));
const rpcSubscriptions = createSolanaRpcSubscriptions(devnet('ws://127.0.0.1:8900'));

const airdrop = airdropFactory({ rpc, rpcSubscriptions });

await airdrop({
commitment: 'confirmed',
recipientAddress: address('FnHyam9w4NZoWR6mKN1CuGBritdsEWZQa4Z4oawLZGxa'),
lamports: lamports(10_000_000n),
});
Note

This only works on test clusters.

Returns a TransactionMessage from a CompiledTransactionMessage. If any of the accounts in the compiled message require an address lookup table to find their address, this function will use the supplied RPC instance to fetch the contents of the address lookup table from the network.

Given a list of addresses belonging to address lookup tables, returns a map of lookup table addresses to an ordered array of the addresses they contain.

Correctly budgeting a compute unit limit for your transaction message can increase the probability that your transaction will be accepted for processing. If you don't declare a compute unit limit on your transaction, validators will assume an upper limit of 200K compute units (CU) per instruction.

Since validators have an incentive to pack as many transactions into each block as possible, they may choose to include transactions that they know will fit into the remaining compute budget for the current block over transactions that might not. For this reason, you should set a compute unit limit on each of your transaction messages, whenever possible.

Use this utility to estimate the actual compute unit cost of a given transaction message.

import { getSetComputeUnitLimitInstruction } from '@solana-program/compute-budget';
import { createSolanaRpc, getComputeUnitEstimateForTransactionMessageFactory, pipe } from '@solana/web3.js';

// Create an estimator function.
const rpc = createSolanaRpc('http://127.0.0.1:8899');
const getComputeUnitEstimateForTransactionMessage = getComputeUnitEstimateForTransactionMessageFactory({
rpc,
});

// Create your transaction message.
const transactionMessage = pipe(
createTransactionMessage({ version: 'legacy' }),
/* ... */
);

// Request an estimate of the actual compute units this message will consume.
const computeUnitsEstimate = await getComputeUnitEstimateForTransactionMessage(transactionMessage);

// Set the transaction message's compute unit budget.
const transactionMessageWithComputeUnitLimit = prependTransactionMessageInstruction(
getSetComputeUnitLimitInstruction({ units: computeUnitsEstimate }),
transactionMessage,
);
Warning

The compute unit estimate is just that – an estimate. The compute unit consumption of the actual transaction might be higher or lower than what was observed in simulation. Unless you are confident that your particular transaction message will consume the same or fewer compute units as was estimated, you might like to augment the estimate by either a fixed number of CUs or a multiplier.

Note

If you are preparing an unsigned transaction, destined to be signed and submitted to the network by a wallet, you might like to leave it up to the wallet to determine the compute unit limit. Consider that the wallet might have a more global view of how many compute units certain types of transactions consume, and might be able to make better estimates of an appropriate compute unit budget.

Returns a function that you can call to send a nonce-based transaction to the network and to wait until it has been confirmed.

import {
isSolanaError,
sendAndConfirmDurableNonceTransactionFactory,
SOLANA_ERROR__INVALID_NONCE,
SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND,
} from '@solana/web3.js';

const sendAndConfirmNonceTransaction = sendAndConfirmDurableNonceTransactionFactory({ rpc, rpcSubscriptions });

try {
await sendAndConfirmNonceTransaction(transaction, { commitment: 'confirmed' });
} catch (e) {
if (isSolanaError(e, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND)) {
console.error(
'The lifetime specified by this transaction refers to a nonce account ' +
`\`${e.context.nonceAccountAddress}\` that does not exist`,
);
} else if (isSolanaError(e, SOLANA_ERROR__INVALID_NONCE)) {
console.error('This transaction depends on a nonce that is no longer valid');
} else {
throw e;
}
}

Returns a function that you can call to send a blockhash-based transaction to the network and to wait until it has been confirmed.

import { isSolanaError, sendAndConfirmTransactionFactory, SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED } from '@solana/web3.js';

const sendAndConfirmTransaction = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions });

try {
await sendAndConfirmTransaction(transaction, { commitment: 'confirmed' });
} catch (e) {
if (isSolanaError(e, SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED)) {
console.error('This transaction depends on a blockhash that has expired');
} else {
throw e;
}
}

Returns a function that you can call to send a transaction with any kind of lifetime to the network without waiting for it to be confirmed.

import {
sendTransactionWithoutConfirmingFactory,
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE,
} from '@solana/web3.js';

const sendTransaction = sendTransactionWithoutConfirmingFactory({ rpc });

try {
await sendTransaction(transaction, { commitment: 'confirmed' });
} catch (e) {
if (isSolanaError(e, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE)) {
console.error('The transaction failed in simulation', e.cause);
} else {
throw e;
}
}

Modules

<internal>

Enumerations

AccountRole
Endian

Classes

SolanaError

Interfaces

BaseTransactionSignerConfig
FullySignedTransaction
IAccountLookupMeta
IAccountMeta
IAccountSignerMeta
IInstruction
IInstructionWithAccounts
IInstructionWithData
ITransactionMessageWithFeePayer
ITransactionMessageWithFeePayerSigner
ReadonlyUint8Array
RpcSimulateTransactionResult
RpcSubscriptionsApiMethods
RpcSubscriptionsChannel
RpcSubscriptionsTransport
TransactionMessageWithBlockhashLifetime
TransactionMessageWithDurableNonceLifetime

Type Aliases

Account
AccountInfoBase
AccountInfoWithBase58Bytes
AccountInfoWithBase58EncodedData
AccountInfoWithBase64EncodedData
AccountInfoWithBase64EncodedZStdCompressedData
AccountInfoWithJsonData
AccountInfoWithPubkey
AccountNotificationsApi
Address
AddressesByLookupTableAddress
ArrayCodecConfig
ArrayLikeCodecSize
Base58EncodedBytes
Base58EncodedDataResponse
Base64EncodedBytes
Base64EncodedDataResponse
Base64EncodedWireTransaction
Base64EncodedZStdCompressedBytes
Base64EncodedZStdCompressedDataResponse
BaseAccount
BaseSignerConfig
BaseTransactionMessage
BitArrayCodecConfig
Blockhash
BlockNotificationsApi
BooleanCodecConfig
ClusterUrl
Codec
Commitment
CompilableTransactionMessage
CompiledTransactionMessage
DataSlice
Decoder
DecompileTransactionMessageConfig
DefaultRpcSubscriptionsChannelConfig
DefaultRpcSubscriptionsTransportConfig
DevnetUrl
DiscriminatedUnion
DiscriminatedUnionCodecConfig
EncodedAccount
Encoder
EnumCodecConfig
Epoch
F64UnsafeSeeDocumentation
FetchAccountConfig
FetchAccountsConfig
FixedSizeCodec
FixedSizeDecoder
FixedSizeEncoder
FixedSizeNumberCodec
FixedSizeNumberDecoder
FixedSizeNumberEncoder
GetAccountInfoApi
GetBalanceApi
GetBlockApi
GetBlockCommitmentApi
GetBlockHeightApi
GetBlockProductionApi
GetBlocksApi
GetBlocksWithLimitApi
GetBlockTimeApi
GetClusterNodesApi
GetDiscriminatedUnionVariant
GetDiscriminatedUnionVariantContent
GetEpochInfoApi
GetEpochScheduleApi
GetFeeForMessageApi
GetFirstAvailableBlockApi
GetGenesisHashApi
GetHealthApi
GetHighestSnapshotSlotApi
GetIdentityApi
GetInflationGovernorApi
GetInflationRateApi
GetInflationRewardApi
GetLargestAccountsApi
GetLatestBlockhashApi
GetLeaderScheduleApi
GetMaxRetransmitSlotApi
GetMaxShredInsertSlotApi
GetMinimumBalanceForRentExemptionApi
GetMultipleAccountsApi
GetProgramAccountsApi
GetProgramAccountsDatasizeFilter
GetProgramAccountsMemcmpFilter
GetRecentPerformanceSamplesApi
GetRecentPrioritizationFeesApi
GetSignaturesForAddressApi
GetSignatureStatusesApi
GetSlotApi
GetSlotLeaderApi
GetSlotLeadersApi
GetStakeMinimumDelegationApi
GetSupplyApi
GetTokenAccountBalanceApi
GetTokenAccountsByDelegateApi
GetTokenAccountsByOwnerApi
GetTokenLargestAccountsApi
GetTokenSupplyApi
GetTransactionApi
GetTransactionCountApi
GetVersionApi
GetVoteAccountsApi
IInstructionWithSigners
IsBlockhashValidApi
ITransactionMessageWithSigners
ITransactionMessageWithSingleSendingSigner
JsonParsedAddressLookupTableAccount
JsonParsedBpfUpgradeableLoaderProgramAccount
JsonParsedConfigProgramAccount
JsonParsedNonceAccount
JsonParsedStakeProgramAccount
JsonParsedSysvarAccount
JsonParsedTokenAccount
JsonParsedTokenProgramAccount
JsonParsedVoteAccount
KeyPairSigner
Lamports
LiteralUnionCodecConfig
LogsNotificationsApi
MainnetUrl
MapCodecConfig
MaybeAccount
MaybeEncodedAccount
MessageModifyingSigner
MessageModifyingSignerConfig
MessagePartialSigner
MessagePartialSignerConfig
MessageSigner
MicroLamports
MinimumLedgerSlotApi
Nonce
None
NoopSigner
NullableCodecConfig
NumberCodec
NumberCodecConfig
NumberDecoder
NumberEncoder
Offset
Option
OptionCodecConfig
OptionOrNullable
PendingRpcRequest
PendingRpcSubscriptionsRequest
ProgramDerivedAddress
ProgramDerivedAddressBump
ProgramNotificationsApi
ReadonlyAccount
ReadonlyAccountLookup
ReadonlySignerAccount
RequestAirdropApi
Reward
RootNotificationsApi
Rpc
RpcApi
RpcApiConfig
RpcConfig
RpcDevnet
RpcFromTransport
RpcMainnet
RpcParsedInfo
RpcParsedType
RpcPlan
RpcRequest
RpcRequestTransformer
RpcResponse
RpcResponseData
RpcResponseTransformer
RpcSendOptions
RpcSubscribeOptions
RpcSubscriptionChannelEvents
RpcSubscriptions
RpcSubscriptionsApi
RpcSubscriptionsApiConfig
RpcSubscriptionsChannelCreator
RpcSubscriptionsChannelCreatorDevnet
RpcSubscriptionsChannelCreatorFromClusterUrl
RpcSubscriptionsChannelCreatorMainnet
RpcSubscriptionsChannelCreatorTestnet
RpcSubscriptionsChannelCreatorWithCluster
RpcSubscriptionsChannelDevnet
RpcSubscriptionsChannelFromClusterUrl
RpcSubscriptionsChannelMainnet
RpcSubscriptionsChannelTestnet
RpcSubscriptionsChannelWithCluster
RpcSubscriptionsConfig
RpcSubscriptionsDevnet
RpcSubscriptionsFromTransport
RpcSubscriptionsMainnet
RpcSubscriptionsPlan
RpcSubscriptionsTestnet
RpcSubscriptionsTransportDataEvents
RpcSubscriptionsTransportDevnet
RpcSubscriptionsTransportFromClusterUrl
RpcSubscriptionsTransportMainnet
RpcSubscriptionsTransportTestnet
RpcSubscriptionsTransportWithCluster
RpcTestnet
RpcTransport
RpcTransportDevnet
RpcTransportFromClusterUrl
RpcTransportMainnet
RpcTransportTestnet
SendTransactionApi
SetCodecConfig
SignableMessage
Signature
SignatureBytes
SignatureDictionary
SignatureNotificationsApi
SignaturesMap
SignedLamports
SimulateTransactionApi
Slot
SlotNotificationsApi
SlotsUpdatesNotificationsApi
SolanaErrorCode
SolanaErrorCodeWithCause
SolanaRpcApi
SolanaRpcApiDevnet
SolanaRpcApiFromTransport
SolanaRpcApiMainnet
SolanaRpcApiTestnet
SolanaRpcResponse
SolanaRpcSubscriptionsApi
SolanaRpcSubscriptionsApiUnstable
Some
StringifiedBigInt
StringifiedNumber
TestnetUrl
TokenAmount
TokenBalance
Transaction
TransactionBlockhashLifetime
TransactionDurableNonceLifetime
TransactionError
TransactionForAccounts
TransactionForFullBase58
TransactionForFullBase64
TransactionForFullJson
TransactionForFullJsonParsed
TransactionForFullMetaInnerInstructionsParsed
TransactionForFullMetaInnerInstructionsUnparsed
TransactionMessage
TransactionMessageBytes
TransactionMessageBytesBase64
TransactionModifyingSigner
TransactionModifyingSignerConfig
TransactionPartialSigner
TransactionPartialSignerConfig
TransactionSendingSigner
TransactionSendingSignerConfig
TransactionSigner
TransactionStatus
TransactionVersion
TransactionWithBlockhashLifetime
TransactionWithDurableNonceLifetime
TransactionWithLifetime
UnixTimestamp
UnwrappedOption
VariableSizeCodec
VariableSizeDecoder
VariableSizeEncoder
VoteNotificationsApi
WritableAccount
WritableAccountLookup
WritableSignerAccount

Variables

BASE_ACCOUNT_SIZE
DEFAULT_RPC_CONFIG
DEFAULT_RPC_SUBSCRIPTIONS_CONFIG
SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND
SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED
SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT
SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT
SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND
SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED
SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS
SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH
SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY
SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE
SOLANA_ERROR__ADDRESSES__MALFORMED_PDA
SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED
SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED
SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE
SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER
SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE
SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED
SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE
SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY
SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS
SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL
SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH
SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH
SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH
SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE
SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH
SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH
SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH
SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE
SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH
SOLANA_ERROR__CODECS__INVALID_CONSTANT
SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT
SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT
SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT
SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS
SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE
SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE
SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE
SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE
SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES
SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE
SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED
SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS
SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA
SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH
SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED
SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED
SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING
SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED
SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL
SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE
SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT
SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW
SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR
SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS
SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH
SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED
SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM
SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX
SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC
SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT
SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED
SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE
SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED
SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED
SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND
SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR
SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER
SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE
SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY
SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID
SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS
SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA
SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER
SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT
SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR
SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA
SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC
SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS
SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED
SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED
SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED
SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED
SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT
SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE
SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID
SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS
SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION
SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE
SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE
SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE
SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED
SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE
SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED
SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED
SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION
SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT
SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN
SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID
SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR
SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH
SOLANA_ERROR__INVALID_NONCE
SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING
SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED
SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE
SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING
SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE
SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR
SOLANA_ERROR__JSON_RPC__INVALID_PARAMS
SOLANA_ERROR__JSON_RPC__INVALID_REQUEST
SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND
SOLANA_ERROR__JSON_RPC__PARSE_ERROR
SOLANA_ERROR__JSON_RPC__SCAN_ERROR
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE
SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION
SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH
SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH
SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH
SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY
SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE
SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE
SOLANA_ERROR__MALFORMED_BIGINT_STRING
SOLANA_ERROR__MALFORMED_NUMBER_STRING
SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND
SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD
SOLANA_ERROR__RPC__INTEGER_OVERFLOW
SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR
SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN
SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN
SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED
SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED
SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT
SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID
SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS
SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER
SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER
SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER
SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER
SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER
SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER
SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER
SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER
SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS
SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING
SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED
SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY
SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED
SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT
SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED
SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED
SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED
SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED
SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED
SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE
SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING
SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION
SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES
SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME
SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME
SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING
SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE
SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING
SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND
SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT
SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT
SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING
SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING
SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE
SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING
SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES
SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE
SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH
SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING
SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE
SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING
SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE
SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE
SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND
SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND
SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED
SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND
SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP
SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE
SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION
SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE
SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT
SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT
SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED
SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE
SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND
SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED
SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED
SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE
SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE
SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS
SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION
SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN
SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION
SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT
SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT
SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT
SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT
SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT

Functions

addCodecSentinel
addCodecSizePrefix
addDecoderSentinel
addDecoderSizePrefix
addEncoderSentinel
addEncoderSizePrefix
address
addSignersToInstruction
addSignersToTransactionMessage
airdropFactory
appendTransactionMessageInstruction
appendTransactionMessageInstructions
assertAccountDecoded
assertAccountExists
assertAccountsDecoded
assertAccountsExist
assertByteArrayHasEnoughBytesForCodec
assertByteArrayIsNotEmptyForCodec
assertByteArrayOffsetIsNotOutOfRange
assertIsAddress
assertIsBlockhash
assertIsDurableNonceTransactionMessage
assertIsFixedSize
assertIsInstructionForProgram
assertIsInstructionWithAccounts
assertIsInstructionWithData
assertIsKeyPairSigner
assertIsLamports
assertIsMessageModifyingSigner
assertIsMessagePartialSigner
assertIsMessageSigner
assertIsProgramDerivedAddress
assertIsSignature
assertIsStringifiedBigInt
assertIsStringifiedNumber
assertIsTransactionMessageWithBlockhashLifetime
assertIsTransactionMessageWithSingleSendingSigner
assertIsTransactionModifyingSigner
assertIsTransactionPartialSigner
assertIsTransactionSendingSigner
assertIsTransactionSigner
assertIsUnixTimestamp
assertIsVariableSize
assertNumberIsBetweenForCodec
assertTransactionIsFullySigned
assertValidBaseString
assertValidNumberOfItemsForCodec
blockhash
combineCodec
commitmentComparator
compileTransaction
compileTransactionMessage
compressTransactionMessageUsingAddressLookupTables
containsBytes
createAddressWithSeed
createCodec
createDecoder
createDefaultRpcSubscriptionsChannelCreator
createDefaultRpcSubscriptionsTransport
createDefaultRpcTransport
createDefaultSolanaRpcSubscriptionsChannelCreator
createEncoder
createJsonRpcApi
createKeyPairFromBytes
createKeyPairFromPrivateKeyBytes
createKeyPairSignerFromBytes
createKeyPairSignerFromPrivateKeyBytes
createNoopSigner
createPrivateKeyFromBytes
createRpc
createRpcMessage
createRpcSubscriptionsApi
createRpcSubscriptionsTransportFromChannelCreator
createSignableMessage
createSignerFromKeyPair
createSolanaRpc
createSolanaRpcApi
createSolanaRpcFromTransport
createSolanaRpcSubscriptions
createSolanaRpcSubscriptions_UNSTABLE
createSolanaRpcSubscriptionsApi
createSolanaRpcSubscriptionsApi_UNSTABLE
createSolanaRpcSubscriptionsFromTransport
createSubscriptionRpc
createTransactionMessage
decodeAccount
decompileTransactionMessage
decompileTransactionMessageFetchingLookupTables
devnet
downgradeRoleToNonSigner
downgradeRoleToReadonly
executeRpcPubSubSubscriptionPlan
fetchEncodedAccount
fetchEncodedAccounts
fetchJsonParsedAccount
fetchJsonParsedAccounts
fixBytes
fixCodecSize
fixDecoderSize
fixEncoderSize
generateKeyPair
generateKeyPairSigner
getAddressCodec
getAddressComparator
getAddressDecoder
getAddressEncoder
getAddressFromPublicKey
getArrayCodec
getArrayDecoder
getArrayEncoder
getBase10Codec
getBase10Decoder
getBase10Encoder
getBase16Codec
getBase16Decoder
getBase16Encoder
getBase58Codec
getBase58Decoder
getBase58Encoder
getBase64Codec
getBase64Decoder
getBase64EncodedWireTransaction
getBase64Encoder
getBaseXCodec
getBaseXDecoder
getBaseXEncoder
getBaseXResliceCodec
getBaseXResliceDecoder
getBaseXResliceEncoder
getBitArrayCodec
getBitArrayDecoder
getBitArrayEncoder
getBlockhashCodec
getBlockhashComparator
getBlockhashDecoder
getBlockhashEncoder
getBooleanCodec
getBooleanDecoder
getBooleanEncoder
getBytesCodec
getBytesDecoder
getBytesEncoder
getCompiledTransactionMessageCodec
getCompiledTransactionMessageDecoder
getCompiledTransactionMessageEncoder
getComputeUnitEstimateForTransactionMessageFactory
getConstantCodec
getConstantDecoder
getConstantEncoder
getDataEnumCodec
getDataEnumDecoder
getDataEnumEncoder
getDefaultLamportsCodec
getDefaultLamportsDecoder
getDefaultLamportsEncoder
getDiscriminatedUnionCodec
getDiscriminatedUnionDecoder
getDiscriminatedUnionEncoder
getEncodedSize
getEnumCodec
getEnumDecoder
getEnumEncoder
getF32Codec
getF32Decoder
getF32Encoder
getF64Codec
getF64Decoder
getF64Encoder
getHiddenPrefixCodec
getHiddenPrefixDecoder
getHiddenPrefixEncoder
getHiddenSuffixCodec
getHiddenSuffixDecoder
getHiddenSuffixEncoder
getI128Codec
getI128Decoder
getI128Encoder
getI16Codec
getI16Decoder
getI16Encoder
getI32Codec
getI32Decoder
getI32Encoder
getI64Codec
getI64Decoder
getI64Encoder
getI8Codec
getI8Decoder
getI8Encoder
getLamportsCodec
getLamportsDecoder
getLamportsEncoder
getLiteralUnionCodec
getLiteralUnionDecoder
getLiteralUnionEncoder
getMapCodec
getMapDecoder
getMapEncoder
getNullableCodec
getNullableDecoder
getNullableEncoder
getOptionCodec
getOptionDecoder
getOptionEncoder
getProgramDerivedAddress
getPublicKeyFromPrivateKey
getRpcSubscriptionsChannelWithJSONSerialization
getScalarEnumCodec
getScalarEnumDecoder
getScalarEnumEncoder
getSetCodec
getSetDecoder
getSetEncoder
getShortU16Codec
getShortU16Decoder
getShortU16Encoder
getSignatureFromTransaction
getSignersFromInstruction
getSignersFromTransactionMessage
getSolanaErrorFromInstructionError
getSolanaErrorFromJsonRpcError
getSolanaErrorFromTransactionError
getStructCodec
getStructDecoder
getStructEncoder
getTransactionCodec
getTransactionDecoder
getTransactionEncoder
getTransactionVersionCodec
getTransactionVersionDecoder
getTransactionVersionEncoder
getTupleCodec
getTupleDecoder
getTupleEncoder
getU128Codec
getU128Decoder
getU128Encoder
getU16Codec
getU16Decoder
getU16Encoder
getU32Codec
getU32Decoder
getU32Encoder
getU64Codec
getU64Decoder
getU64Encoder
getU8Codec
getU8Decoder
getU8Encoder
getUnionCodec
getUnionDecoder
getUnionEncoder
getUnitCodec
getUnitDecoder
getUnitEncoder
getUtf8Codec
getUtf8Decoder
getUtf8Encoder
isAddress
isAdvanceNonceAccountInstruction
isBlockhash
isDurableNonceTransaction
isFixedSize
isInstructionForProgram
isInstructionWithAccounts
isInstructionWithData
isJsonRpcPayload
isKeyPairSigner
isLamports
isMessageModifyingSigner
isMessagePartialSigner
isMessageSigner
isNone
isOption
isProgramDerivedAddress
isProgramError
isSignature
isSignerRole
isSolanaError
isSome
isStringifiedBigInt
isStringifiedNumber
isTransactionMessageWithBlockhashLifetime
isTransactionMessageWithSingleSendingSigner
isTransactionModifyingSigner
isTransactionPartialSigner
isTransactionSendingSigner
isTransactionSigner
isUnixTimestamp
isVariableSize
isWritableRole
lamports
mainnet
mergeBytes
mergeRoles
none
offsetCodec
offsetDecoder
offsetEncoder
padBytes
padLeftCodec
padLeftDecoder
padLeftEncoder
padNullCharacters
padRightCodec
padRightDecoder
padRightEncoder
parseBase58RpcAccount
parseBase64RpcAccount
parseJsonRpcAccount
partiallySignTransaction
partiallySignTransactionMessageWithSigners
pipe
prependTransactionMessageInstruction
prependTransactionMessageInstructions
removeNullCharacters
resizeCodec
resizeDecoder
resizeEncoder
reverseCodec
reverseDecoder
reverseEncoder
safeCaptureStackTrace
sendAndConfirmDurableNonceTransactionFactory
sendAndConfirmTransactionFactory
sendTransactionWithoutConfirmingFactory
setTransactionMessageFeePayer
setTransactionMessageFeePayerSigner
setTransactionMessageLifetimeUsingBlockhash
setTransactionMessageLifetimeUsingDurableNonce
signAndSendTransactionMessageWithSigners
signature
signBytes
signTransaction
signTransactionMessageWithSigners
some
stringifiedBigInt
stringifiedNumber
testnet
transformChannelInboundMessages
transformChannelOutboundMessages
transformCodec
transformDecoder
transformEncoder
unixTimestamp
unwrapOption
unwrapOptionRecursively
upgradeRoleToSigner
upgradeRoleToWritable
verifySignature
wrapNullable