@leashmarket/core
v0.2.3
Published
Policy evaluation, receipt hashing / chain verification, real x402 client adapter for Solana, treasury helpers, and an env-based kill-switch.
Readme
@leashmarket/core
Policy evaluation, receipt hashing / chain verification, real x402 client adapter for Solana, treasury helpers, and an env-based kill-switch.
Install
npm install @leashmarket/core
# or
pnpm add @leashmarket/coreUsage
import {
evaluate,
finalizeReceipt,
verifyReceiptChain,
treasuryPda,
readPauseFromEnv,
} from '@leashmarket/core';
import { createSvmBuyerFetch } from '@leashmarket/core/x402';createSvmBuyerFetch({ signer, networks, rpcUrl }) registers
ExactSvmScheme (from @x402/svm) with wrapFetchWithPayment (from
@x402/fetch) and returns a paidFetch that handles the real x402
402 → sign SPL transfer → retry → settle round-trip on Solana.
All hashing uses @noble/hashes so the package runs unchanged in Node,
the browser, and edge runtimes.
Docs
See also: Real x402 on Solana
Test
pnpm --filter @leashmarket/core test