v0.1.2 — Message account helpers
Message account helpers
Gagliardetto-compatible helpers on the static account keys, added for downstream migration (first consumer: alphabatem/rpc_shard):
Message.Account(index uint16) (PublicKey, error)Message.AccountMetaList() (AccountMetaSlice, error)— returns the newErrAddressTablesNotSetsentinel for versioned messages that reference address table lookups (this package carries no lookup-table resolution)Message.IsWritableStatic(PublicKey) bool— implements the message account-ordering rule with saturating arithmetic, same as upstream RustMessage.UnmarshalBase64(string) errorPublicKeySlice.ToBase58() []string
Base58 interning on the String paths
PublicKey.String and Hash.String now serve repeated keys from base58.EncodeCached32's lock-free intern table — these APIs allocate a string regardless, so a cache hit erases the allocation entirely (program IDs, mints, hot accounts and blockhashes repeat constantly in Solana workloads). The hand-built JSON writers are unchanged and keep encoding directly into the output buffer; JSON output is byte-identical.