Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,803 changes: 2,566 additions & 237 deletions packages/wasm-solana/Cargo.lock

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions packages/wasm-solana/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name = "wasm-solana"
version = "0.1.0"
edition = "2021"

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

[lib]
crate-type = ["cdylib", "rlib"]

Expand All @@ -12,17 +15,26 @@ all = "warn"
[dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Solana SDK crates
solana-pubkey = { version = "2.0", features = ["curve25519"] }
solana-keypair = "2.0"
solana-signer = "2.0"
# Ed25519 for deriving pubkey from 32-byte seed (solana-keypair expects 64-byte format)
ed25519-dalek = { version = "2.1", default-features = false, features = ["std"] }
solana-transaction = { version = "3.0", features = ["serde", "bincode"] }
# Instruction decoder interfaces (official Solana crates)
solana-system-interface = { version = "2.0", features = ["bincode"] }
solana-stake-interface = { version = "2.0", features = ["bincode"] }
solana-compute-budget-interface = { version = "2.0", features = ["borsh"] }
# Serialization
bincode = "1.3"
borsh = "1.5"
base64 = "0.22"
serde-wasm-bindgen = "0.6"
spl-stake-pool = { version = "2.0.3", features = ["no-entrypoint"] }

[dev-dependencies]
wasm-bindgen-test = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
hex = "0.4"

[profile.release]
Expand Down
Binary file not shown.
34 changes: 34 additions & 0 deletions packages/wasm-solana/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,41 @@ void wasm;
// Namespace exports for explicit imports
export * as keypair from "./keypair.js";
export * as pubkey from "./pubkey.js";
export * as transaction from "./transaction.js";
export * as parser from "./parser.js";

// Top-level class exports for convenience
export { Keypair } from "./keypair.js";
export { Pubkey } from "./pubkey.js";
export { Transaction } from "./transaction.js";

// Top-level function exports
export { parseTransaction } from "./parser.js";

// Type exports
export type { AccountMeta, Instruction } from "./transaction.js";
export type {
ParsedTransaction,
DurableNonce,
InstructionParams,
TransferParams,
CreateAccountParams,
NonceAdvanceParams,
CreateNonceAccountParams,
NonceInitializeParams,
StakeInitializeParams,
StakingActivateParams,
StakingDeactivateParams,
StakingWithdrawParams,
StakingDelegateParams,
StakingAuthorizeParams,
SetComputeUnitLimitParams,
SetPriorityFeeParams,
TokenTransferParams,
CreateAtaParams,
CloseAtaParams,
MemoParams,
StakePoolDepositSolParams,
StakePoolWithdrawStakeParams,
UnknownInstructionParams,
} from "./parser.js";
Loading