Skip to main content

Crate palinurus_core

Crate palinurus_core 

Source
Expand description

Palinurus — minimal wasm32-wasip2-friendly Solana substrate for ZeroClaw WIT tool plugins.

Track C (DePIN) core for the Superteam Brasil × ZeroClaw bounty. MIT-licensed. Pure logic, no wasm dependency — host-testable with cargo test; the plugins import this as a crates.io dependency and compile it into their wasm32-wasip2 components.

solana-sdk / solana-program cannot be compiled inside a WIT component (they pull in syscall stubs that don’t build for wasm32-wasip2). This crate hand-rolls only the primitives a Solana tool plugin needs:

  • PDA derivation (pda::find_program_address) — reimplementation of solana_program::Pubkey::find_program_address using sha2 + curve25519-dalek.
  • (more modules landing as the build progresses: base58, borsh helpers, versioned-tx construction, durable-nonce handling, RPC over the host’s wasi:http, response shaping to ~200 tokens).

Re-exports§

pub use base58::Pubkey;
pub use borsh::memo_ix_data;
pub use borsh::CreateAttestationIxData;
pub use pda::find_program_address;
pub use pda::is_on_curve;
pub use response::estimate_tokens;
pub use response::shape_account_info;
pub use response::shape_attestation_result;
pub use response::shape_signatures;
pub use response::short_pubkey;
pub use response::AccountKind;
pub use rpc::parse_account_info;
pub use rpc::parse_blockhash;
pub use rpc::parse_send_tx;
pub use rpc::parse_signatures;
pub use rpc::rpc_request;
pub use rpc::rpc_result;
pub use rpc::MockRpc;
pub use rpc::Rpc;
pub use rpc::RpcError;
pub use rpc::WakiRpc;
pub use durable_nonce::build_with_durable_nonce;
pub use durable_nonce::nonce_advance_ix;
pub use durable_nonce::nonce_authorize_ix;
pub use durable_nonce::parse_nonce_account;
pub use durable_nonce::NonceAccount;
pub use durable_nonce::NonceData;
pub use durable_nonce::NonceError;
pub use durable_nonce::NonceState;
pub use durable_nonce::NonceVersion;
pub use versioned_tx::build_unsigned;
pub use versioned_tx::serialize as serialize_tx;
pub use versioned_tx::AccountMeta;
pub use versioned_tx::Instruction;
pub use versioned_tx::MessageHeader;
pub use versioned_tx::MessageV0;
pub use versioned_tx::VersionedTransaction;

Modules§

base58
Base58 Pubkey newtype — the typed 32-byte Solana address used across the crate.
borsh
Borsh instruction-data helpers for Solana instructions the Palinurus plugins emit.
durable_nonce
Durable transaction nonces — the blockhash-expiry fix.
pda
Solana Program Derived Address (PDA) derivation.
response
Response shaping — keep RPC/IX outputs to ~200 tokens, not 40KB JSON.
rpc
Solana JSON-RPC 2.0 client over waki (blocking wasi:http).
versioned_tx
Versioned transaction (V0) construction — unsigned, T1 custody.