Official TypeScript SDK for Obscra — the privacy-preserving marketplace for sensitive data, built on Solana.
Obscra lets people buy and sell sensitive data without exposing the raw payload. The SDK is a thin, type-safe layer over the building blocks that make that possible:
- Solana — fast, cheap settlement
- x402 — HTTP-native micropayments (pay-per-request)
- IPFS — content-addressed encrypted storage
- zk-proofs — verifiable claims about data without revealing it
Status: early development. APIs will change before
v1.0.0. Pin exact versions.
npm install @obscra/sdk
# peer dependency
npm install @solana/web3.jsimport { createObscraClient } from '@obscra/sdk';
const obscra = createObscraClient({ cluster: 'devnet' });
const listings = await obscra.marketplace.getListings({
category: 'health',
limit: 20,
});| Module | What it does |
|---|---|
marketplace |
List, browse, and purchase datasets |
x402 |
HTTP 402 payment flow (fetch with automatic settle) |
ipfs |
Resolve and fetch encrypted blobs from IPFS gateways |
zk |
Pluggable verifiers for zero-knowledge proofs |
import { createObscraClient } from '@obscra/sdk';
const obscra = createObscraClient({ cluster: 'devnet' });
const res = await obscra.x402.fetchWithPayment('https://api.obscra.xyz/datasets/123', {
onPaymentRequired: async (requirement) => {
// Sign and return an X-PAYMENT header for the requirement.
return await mySolanaWallet.signX402(requirement);
},
});
const data = await res.json();import { createObscraClient } from '@obscra/sdk';
const obscra = createObscraClient();
obscra.zk.registerVerifier('groth16', {
async verify(proof, vk) {
// Plug in snarkjs, arkworks-wasm, etc.
return await myGroth16Verify(proof, vk);
},
});See ROADMAP.md. Daily progress is tracked there.
Issues and PRs welcome — please open a discussion first for non-trivial changes.
MIT © Obscra