Quickstart
— First read to verified receipt in under five minutes.
You can read from Pluid with nothing but fetch, but the SDK adds typed methods and one-call receipt verification. This page goes from install to a verified read.
1. Install
bash
npm install @pluid/sdkThe SDK ships ESM + types and has a single runtime dependency for ed25519 verification. No account or key is required to start — the FREE tier is open.
2. Make Your First Read
Construct a client and fetch a balance. On the FREE tier you can omit the key entirely; requests are rate-limited per IP.
read.tsts
import { PluidClient } from "@pluid/sdk";
const pluid = new PluidClient();
// or: new PluidClient({ apiKey: process.env.PLUID_API_KEY })
const { result, slot, receipt } = await pluid.getBalance(
"5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9"
);
console.log(`balance: ${result.lamports} lamports @ slot ${slot}`);3. Verify the Receipt
Every read returns a receipt. Verifying it confirms the answer was signed by Pluid’s network key over the exact bytes you received — no extra network call.
verify.tsts
const ok = pluid.verify(receipt, result); // true
if (!ok) throw new Error("receipt failed verification");
console.log("verified read at slot", receipt.slot);What verification proves
That a Pluid network key signed this exact answer for this exact query at slot
receipt.slot. The SDK verifies offline against its bundled key; the same key is published at /api/v1/pubkey for verifying in any language.Without the SDK
Every method maps to a plain REST route. The same first read with curl:
bash
curl https://pluid.net/api/v1/balance/5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9json
{ "result": { "lamports": 4198320512 }, "slot": 296410233, "receipt": { "query": "getBalance:5tz…Ai9", "answerDigest": "…", "slot": 296410233, "issuedAt": 1718900000000, "sig": "…" } }
Next Steps
- Authentication — add a key, unlock higher limits.
- REST API Reference — the full route catalog.
- Realtime — subscribe to live slot/TPS/epoch stats.
