Entros_docs
Integrate

Read verification evidence

Read current wallet evidence and evaluate application requirements on your server.

Run policy checks on your server with Pulse and Verify. The strict reader validates identity accounts, qualifying transactions, and optional SAS attestations. It binds the current wallet commitment to confirmed transaction evidence.

A score lookup supports display. Authorizing a protected action also requires an authenticated wallet, action binding, current evidence, and replay protection.

Evaluate current evidence

Install the released packages:

npm install @entros/pulse-sdk @entros/verify @solana/web3.js @coral-xyz/anchor

Keep the RPC connection and policy in server configuration. Obtain walletPubkey from the authenticated, signed action request. The transaction signature identifies evidence for the reader to validate.

import { Connection } from "@solana/web3.js";
import { readIntegratorEvidence } from "@entros/pulse-sdk";
import { evaluatePolicy, normalizePolicyRequest } from "@entros/verify/policy";

const connection = new Connection("https://api.devnet.solana.com", "confirmed");
const policy = normalizePolicyRequest({
  id: "resource-access",
  version: 1,
  minTrustScore: 100,
  maxVerificationAgeSeconds: 300,
  maxEvaluationAgeSeconds: 90,
  requiredAssurance: "browser_unattested",
  uniquenessRequirement: "allow_unmeasured",
  requireAttestation: false,
  cluster: "devnet",
});

export async function evaluateCurrentVerification(
  walletPubkey: string,
  transactionSignature: string,
) {
  const evidence = await readIntegratorEvidence({
    walletPubkey,
    transactionSignature,
    connection,
    nowSeconds: () => Math.floor(Date.now() / 1000),
  });
  return evaluatePolicy(policy, evidence, Math.floor(Date.now() / 1000));
}

This helper returns a policy decision. It does not authenticate the caller or execute an action. The live clock callback lets the reader check timestamps after asynchronous RPC calls complete. An unavailable or invalid read cannot authorize access.

Bind the decision to an action

  1. Issue a challenge for the wallet, exact action parameters, audience, nonce, and expiry.
  2. Verify the wallet signature over the canonical challenge bytes.
  3. Read current evidence with the server's RPC connection.
  4. Evaluate the server's policy with its clock.
  5. If the result allows access, consume the nonce atomically with the action.

Ignore browser-supplied scores, policy decisions, clocks, and RPC configuration. Use the protected-action example for a tested local implementation of this sequence.

On-chain actions and other languages

For on-chain actions, validate the relevant accounts and policy inside the action transaction. A prior RPC response cannot enforce current account state for that transaction.

A custom reader must validate account ownership, PDA derivation, discriminator, supported layout, wallet binding, field ranges, and transaction consistency. Reading score and timestamp bytes alone does not implement these checks. Use the program reference and PDA reference when implementing another language or program integration.

Next steps

On this page