insumer-verify 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -119,6 +119,40 @@ The attestation response you're verifying looks like this:
119
119
 
120
120
  No balances. No amounts. Just a signed true/false per condition.
121
121
 
122
+ #### XRPL-specific fields
123
+
124
+ XRPL attestation results use `ledgerIndex` (integer) and `ledgerHash` (string) instead of `blockNumber` and `blockTimestamp`:
125
+
126
+ ```json
127
+ {
128
+ "condition": 0,
129
+ "met": true,
130
+ "label": "RLUSD >= 100 on XRPL",
131
+ "type": "token_balance",
132
+ "chainId": "xrpl",
133
+ "evaluatedCondition": {
134
+ "type": "token_balance",
135
+ "chainId": "xrpl",
136
+ "currency": "524C555344...",
137
+ "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
138
+ "operator": "gte",
139
+ "threshold": 100,
140
+ "decimals": 6
141
+ },
142
+ "conditionHash": "0x9f2c...",
143
+ "ledgerIndex": 96482715,
144
+ "ledgerHash": "A1B2C3D4..."
145
+ }
146
+ ```
147
+
148
+ Trust line token conditions may also include `trustLineState` with a `frozen` boolean indicating whether the trust line is frozen:
149
+
150
+ ```json
151
+ "trustLineState": { "frozen": false }
152
+ ```
153
+
154
+ Because XRPL results have no `blockTimestamp`, the freshness check (`maxAge`) skips them rather than failing. Condition hash and signature checks work identically across all chains.
155
+
122
156
  ### Handling `rpc_failure` errors
123
157
 
124
158
  If the API cannot reach one or more data sources (RPC nodes, Helius, XRPL, Covalent) after retries, it returns `ok: false` with error code `rpc_failure` instead of issuing an attestation. **No signature, no JWT, no credits charged.** This is a retryable error — retry the same request after a short delay (2-5 seconds).
@@ -177,7 +211,7 @@ const result = await verifyAttestation(apiResponse, { maxAge: 120 });
177
211
  // Fails if any blockTimestamp is older than 120 seconds
178
212
  ```
179
213
 
180
- Results without `blockTimestamp` (Covalent, Solana, and XRPL chains) are skipped, not treated as failures.
214
+ Results without `blockTimestamp` (Covalent, Solana, and XRPL chains) are skipped, not treated as failures. XRPL results use `ledgerIndex` and `ledgerHash` instead.
181
215
 
182
216
  ### JWKS key discovery
183
217
 
@@ -237,6 +271,18 @@ Each attestation result includes an `evaluatedCondition` object and a `condition
237
271
 
238
272
  This ensures the condition that was actually evaluated on-chain can be independently verified by any third party.
239
273
 
274
+ ## Pricing
275
+
276
+ **Tiers:** Free (10 credits) | Pro $9/mo (10,000/day) | Enterprise $29/mo (100,000/day)
277
+
278
+ **USDC volume discounts:** $5–$99 = $0.04/call (25 credits/$1) · $100–$499 = $0.03 (33/$1, 25% off) · $500+ = $0.02 (50/$1, 50% off)
279
+
280
+ **Platform wallets (USDC only):**
281
+ - **EVM:** `0xAd982CB19aCCa2923Df8F687C0614a7700255a23`
282
+ - **Solana:** `6a1mLjefhvSJX1sEX8PTnionbE9DqoYjU6F6bNkT4Ydr`
283
+
284
+ **Supported USDC chains:** Ethereum, Base, Polygon, Arbitrum, Optimism, BNB Chain, Avalanche, Solana. USDC sent on unsupported chains cannot be recovered. All purchases are final and non-refundable. [Full pricing →](https://insumermodel.com/pricing/)
285
+
240
286
  ## License
241
287
 
242
288
  MIT
package/build/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export interface CheckResult {
25
25
  reason?: string;
26
26
  }
27
27
  export interface VerifyOptions {
28
- /** Maximum acceptable age of blockTimestamp in seconds. Results without blockTimestamp are skipped. */
28
+ /** Maximum acceptable age of blockTimestamp in seconds. Results without blockTimestamp (e.g. XRPL, which uses ledgerIndex/ledgerHash instead) are skipped. */
29
29
  maxAge?: number;
30
30
  /** JWKS URL for dynamic key discovery. When set, fetches the signing key from this URL instead of using the hardcoded key. Example: "https://insumermodel.com/.well-known/jwks.json" */
31
31
  jwksUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "insumer-verify",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "Client-side verifier for InsumerAPI attestations. ECDSA P-256 signatures, condition hashes, block freshness, expiry. Zero dependencies. Used by DJD Agent Score (Coinbase x402).",
5
5
  "type": "module",
6
6
  "main": "build/index.js",