
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.
snap-solana-sdk
Advanced tools
snap-solana-sdkShielded agent-to-agent payments on Solana with automatic Groth16 proof generation.
Status:
snap-solana-sdkis for the SNAP limited release. It is not audited production software.
SNAP is live on Solana mainnet. Install and try it:
npm install snap-solana-sdk @solana/web3.js @coral-xyz/anchor
import { SNAPClient } from "snap-solana-sdk";
import { Connection, Keypair, PublicKey } from "@solana/web3.js";
const connection = new Connection("https://api.mainnet-beta.solana.com");
const wallet = Keypair.generate();
const snap = new SNAPClient(connection, wallet);
// Deposit into the shielded pool
const POOL = new PublicKey("B8SyffZKt8LABKogWjH9rZcjY5PV2hyYRCbTxxbcrpFf");
const note = await snap.deposit(POOL);
// Share `note` with the recipient off-chain
const serialized = SNAPClient.serializeNote(note);
// Recipient withdraws with ZK proof
const restored = SNAPClient.deserializeNote(serialized);
const recipientKeypair = Keypair.generate();
const recipientSnap = new SNAPClient(connection, recipientKeypair);
const tx = await recipientSnap.withdraw(POOL, restored, recipientKeypair);
| Field | Value |
|---|---|
| Program ID | 9uePoqdgaXpqFLQM2ED1GGQrwSEiqe3r6tW1AfsnrrbS |
| 0.1 SOL pool | B8SyffZKt8LABKogWjH9rZcjY5PV2hyYRCbTxxbcrpFf |
| 1 USDC pool | 5LeuHrPBgHNhgbCy996MEjcsBk5gNHhVj6AiuuCHZ8od |
| 10 USDC pool | ECuHf8kgiWfmL3Q6id4WGBQWvuukhzqvF5vsxuPAKZBv |
| Network | Solana Mainnet |
| Explorer | View Program |
import { SNAPClient } from "snap-solana-sdk";
const snap = new SNAPClient(connection, wallet);
const note = await snap.deposit(poolAddress, 0.1);
const txSig = await snap.withdraw(poolAddress, note, recipientKeypair);
deposit() always uses the pool's fixed denomination. If you pass amount, it must match the pool denomination.withdraw() rebuilds the Poseidon Merkle tree, generates the witness, produces the Groth16 proof, formats it for Solana, and submits the transaction.withdrawViaRelayer() signs the relayer request with a one-time Ed25519 session key derived from the agent spending key or a Keypair-backed wallet seed. That signature is only the transport envelope: the relayer also verifies the proof off-chain and binds the signed request to the exact proof/root/nullifier/recipient/fee/timestamp tuple before it submits anything.maxDepositDelayMs and maxWithdrawDelayMs add cryptographically random timing jitter with crypto.getRandomValues() to reduce simple timing-correlation attacks.serializeNote() returns a JSON-safe string. Anyone with the note can withdraw the funds, so it must stay off-chain and private.Anyone with the note can withdraw the funds. A note contains the
secret and nullifier that generate the ZK proof. There is no
additional key-based authorization on-chain. Protect notes like
private keys.
The viewing key can decrypt an agent's note history for audit purposes.
It cannot spend funds or recover the spending key. This supports the
selective-disclosure compliance model described in docs/COMPLIANCE.md.
The spending key seeds the agent's Solana wallet and signs relayer request payloads. It does NOT control on-chain withdrawals. The note controls that. This is a transport credential, not a protocol authorization key.
The package ships the proving artifacts in assets/:
withdraw.wasmwithdraw_final.zkeyThey are loaded at runtime from the installed package directory.
FAQs
Shielded agent-to-agent payments on Solana using ZK proofs
The npm package snap-solana-sdk receives a total of 3 weekly downloads. As such, snap-solana-sdk popularity was classified as not popular.
We found that snap-solana-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.