@piprail/sdk 1.10.0 → 1.11.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ All notable changes to `@piprail/sdk` are documented here. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the
5
5
  versions follow [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [1.11.0] — 2026-06-09
8
+
9
+ ### Added — Agent-friendly discovery lifecycle
10
+ - **`register()` outcomes now tell an agent when/where a listing is findable.** Each
11
+ `RegisterOutcome` carries a `visibility: 'live' | 'pending-review' | 'not-listable'` plus a
12
+ plain-language `note` — projected from a new exported source-of-truth, **`DIRECTORY_INFO`**
13
+ (per-index: review mode, auth, chains, `readByDiscover`, caveat). So an agent reads the caveat
14
+ right where it already is instead of guessing. New exports: `DIRECTORY_INFO`, `getDirectoryInfo`,
15
+ `decorateOutcome`, and the `DirectoryInfo` / `ListingVisibility` types.
16
+ - **The sharp caveats are now explicit** (in the types, the `note`, and `register()`/`discover()`
17
+ JSDoc): **402 Index lists a self-registered resource as `pending-review`** (not searchable until
18
+ approved — verify your domain on 402index.io for instant approval), **`discover()` does NOT read
19
+ x402scan** (a live x402scan listing won't appear there — don't read its absence as failure), and
20
+ **CDP Bazaar can't list a backendless PipRail resource at all** (facilitator-coupled).
21
+
22
+ ### Docs — x402 v1/v2 version posture made authoritative
23
+ - A definitive comment in `x402.ts` documents the stance: **emit strict v2, accept liberal v1 + v2**
24
+ (Postel). v2 *replaced* v1 on the wire; the current reference client `@x402/fetch` is v2, but the
25
+ original `x402-fetch`/`x402-express`/`x402-next` packages still send v1, so the gate keeps accepting
26
+ it. PipRail emits no v1 *body* on its own paths; the lone v1 emitter is the `encodeXPaymentHeader`
27
+ utility (its `x402Version: 1` default is correct — consistent with the v1-flat shape it builds).
28
+
29
+ ### Fixed
30
+ - Corrected stale "searchable within seconds" wording for 402 Index (it added a review queue):
31
+ `register402Index`'s success `detail` now surfaces the index's own message, and the JSDoc + MCP
32
+ `piprail_register` tool description reflect the `pending-review` reality.
33
+
7
34
  ## [1.10.0] — 2026-06-09
8
35
 
9
36
  ### Added — Universal Payments (the standard x402 `exact` rail)
@@ -549,6 +576,7 @@ straight into your wallet. The API is small and self-contained.
549
576
  to your wallet; PipRail never holds funds.
550
577
  - `viem ^2.21` is a peer dependency. Node 20+ or a modern browser.
551
578
 
579
+ [1.11.0]: https://www.npmjs.com/package/@piprail/sdk
552
580
  [1.10.0]: https://www.npmjs.com/package/@piprail/sdk
553
581
  [1.9.0]: https://www.npmjs.com/package/@piprail/sdk
554
582
  [1.8.0]: https://www.npmjs.com/package/@piprail/sdk
package/dist/index.cjs CHANGED
@@ -1305,6 +1305,42 @@ async function resolveNetwork2(opts) {
1305
1305
  }
1306
1306
 
1307
1307
  // src/indexes.ts
1308
+ var DIRECTORY_INFO = {
1309
+ "402index": {
1310
+ source: "402index",
1311
+ review: "probe-sync",
1312
+ auth: "none",
1313
+ chains: null,
1314
+ onSuccess: "pending-review",
1315
+ readByDiscover: true,
1316
+ caveat: "402 Index probes your URL on submit, then lists it as PENDING REVIEW \u2014 a self-registered resource is NOT in search until approved. Verify your domain on 402index.io for instant approval; otherwise it appears after manual review, so retry discover() later."
1317
+ },
1318
+ x402scan: {
1319
+ source: "x402scan",
1320
+ review: "probe-sync",
1321
+ auth: "siwx",
1322
+ chains: ["eip155:8453", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],
1323
+ onSuccess: "live",
1324
+ readByDiscover: false,
1325
+ caveat: "x402scan lists Base/Solana only, needs one wallet signature (SIWX), and requires a resolvable input schema (from /openapi.json or the bazaar extension in the 402 body). It goes live on x402scan.com immediately on success \u2014 but discover() does NOT read x402scan, so the listing won't appear in discover() results."
1326
+ },
1327
+ bazaar: {
1328
+ source: "bazaar",
1329
+ review: "settle-coupled",
1330
+ auth: "facilitator-only",
1331
+ chains: null,
1332
+ onSuccess: "not-listable",
1333
+ readByDiscover: true,
1334
+ caveat: "CDP Bazaar has no register endpoint \u2014 it catalogs a resource only when its own facilitator settles a payment. PipRail verifies locally with no facilitator, so a PipRail resource cannot be listed here (you can still READ Bazaar to find others). List on 402 Index or x402scan instead."
1335
+ }
1336
+ };
1337
+ function getDirectoryInfo(source) {
1338
+ return DIRECTORY_INFO[source];
1339
+ }
1340
+ function decorateOutcome(o) {
1341
+ const info = DIRECTORY_INFO[o.source];
1342
+ return { ...o, visibility: o.ok ? info.onSuccess : "not-listable", note: info.caveat };
1343
+ }
1308
1344
  var BAZAAR_URL = "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources";
1309
1345
  var INDEX402_SEARCH = "https://402index.io/api/v1/services";
1310
1346
  var INDEX402_REGISTER = "https://402index.io/api/v1/register";
@@ -1457,7 +1493,13 @@ async function register402Index(input) {
1457
1493
  body: JSON.stringify(payload)
1458
1494
  });
1459
1495
  if (res.ok) {
1460
- return { source: "402index", ok: true, status: res.status, detail: "Listed on 402 Index (searchable at 402index.io)." };
1496
+ const msg = await readIndexMessage(res);
1497
+ return {
1498
+ source: "402index",
1499
+ ok: true,
1500
+ status: res.status,
1501
+ detail: _nullishCoalesce(msg, () => ( "Registered on 402 Index \u2014 pending review (verify your domain on 402index.io for instant approval)."))
1502
+ };
1461
1503
  }
1462
1504
  const why = await readIndexError(res);
1463
1505
  return {
@@ -1470,6 +1512,14 @@ async function register402Index(input) {
1470
1512
  return { source: "402index", ok: false, detail: errMsg(err) };
1471
1513
  }
1472
1514
  }
1515
+ async function readIndexMessage(res) {
1516
+ try {
1517
+ const body = await res.json();
1518
+ return typeof body.message === "string" && body.message.length > 0 ? body.message : void 0;
1519
+ } catch (e17) {
1520
+ return void 0;
1521
+ }
1522
+ }
1473
1523
  async function readIndexError(res) {
1474
1524
  try {
1475
1525
  const body = await res.json();
@@ -1477,7 +1527,7 @@ async function readIndexError(res) {
1477
1527
  (p) => typeof p === "string" && p.length > 0
1478
1528
  );
1479
1529
  return parts.length ? [...new Set(parts)].join(" \u2014 ") : void 0;
1480
- } catch (e17) {
1530
+ } catch (e18) {
1481
1531
  return void 0;
1482
1532
  }
1483
1533
  }
@@ -1539,7 +1589,7 @@ async function readSiwxInfo(res) {
1539
1589
  return info;
1540
1590
  }
1541
1591
  return null;
1542
- } catch (e18) {
1592
+ } catch (e19) {
1543
1593
  return null;
1544
1594
  }
1545
1595
  }
@@ -1619,7 +1669,7 @@ function firstArray(o, ...keys) {
1619
1669
  function hostOf(url) {
1620
1670
  try {
1621
1671
  return new URL(url).hostname;
1622
- } catch (e19) {
1672
+ } catch (e20) {
1623
1673
  return url;
1624
1674
  }
1625
1675
  }
@@ -1774,7 +1824,7 @@ var PipRailClient = (_class2 = class {
1774
1824
  safeEmit(event) {
1775
1825
  try {
1776
1826
  this.onEvent(event);
1777
- } catch (e20) {
1827
+ } catch (e21) {
1778
1828
  }
1779
1829
  }
1780
1830
  /** Auto-mount the chain's driver, resolve the network, and bind the wallet — once. */
@@ -1908,9 +1958,15 @@ var PipRailClient = (_class2 = class {
1908
1958
  *
1909
1959
  * Nothing PipRail-hosted: these are third-party open directories. Never throws
1910
1960
  * for a read problem — an index that's down or changed simply contributes
1911
- * nothing. Honest caveat: index results are cross-scheme (mostly the
1912
- * mainstream `exact` scheme); `fetch()` pays only `onchain-proof` rails
1913
- * directly (pay `exact` resources with the experimental `drivers/evm/exact.ts`).
1961
+ * nothing. Honest caveats (see {@link DIRECTORY_INFO}):
1962
+ * - Reads **`bazaar` + `402index`** only — **NOT `x402scan`** (its reads are paid). A
1963
+ * resource you registered on x402scan is live there but will NOT appear here; don't
1964
+ * read that absence as failure. (Passing `sources:['x402scan']` explicitly yields `[]`.)
1965
+ * - A resource just listed via {@link register} may not appear yet — 402 Index reviews
1966
+ * before publishing, so retry with a brief backoff if a fresh listing is missing.
1967
+ * - Results are cross-scheme (mostly the mainstream `exact` scheme); `fetch()` pays
1968
+ * only `onchain-proof` rails directly (pay `exact` resources with the experimental
1969
+ * `drivers/evm/exact.ts`).
1914
1970
  */
1915
1971
  async discover(opts = {}) {
1916
1972
  const found = await searchOpenIndexes({
@@ -1935,12 +1991,27 @@ var PipRailClient = (_class2 = class {
1935
1991
  }
1936
1992
  /**
1937
1993
  * List a resource you run on the OPEN x402 registries, so agents can find it.
1938
- * Default target is **402 Index** — one POST, no auth, no signature, no payment
1939
- * (searchable within seconds). Add `'x402scan'` to also register via SIWX (one
1940
- * wallet signature; EVM + a Base/Solana rail). Returns one {@link RegisterOutcome}
1941
- * per target — a target the chain can't satisfy comes back `{ ok:false, detail }`,
1942
- * never a throw. An explicit, developer-invoked action; it moves no funds, and
1943
- * nothing is PipRail-hosted — you're listing on third-party open directories.
1994
+ * Default target is **402 Index** — one POST, no auth, no signature, no payment.
1995
+ * Add `'x402scan'` to also register via SIWX (one wallet signature; EVM + a
1996
+ * Base/Solana rail). Returns one {@link RegisterOutcome} per target — a target the
1997
+ * chain can't satisfy comes back `{ ok:false, detail }`, never a throw. An explicit,
1998
+ * developer-invoked action; it moves no funds, and nothing is PipRail-hosted —
1999
+ * you're listing on third-party open directories.
2000
+ *
2001
+ * **Listing is asynchronous — each outcome carries a `visibility` + `note` so an
2002
+ * agent knows when/where the resource is findable (don't assume `ok:true` means
2003
+ * "searchable now"):**
2004
+ * - **402 Index** → `visibility:'pending-review'`. It probes your URL on submit, then lists it
2005
+ * PENDING REVIEW — not searchable until approved (verify your domain on 402index.io for instant
2006
+ * approval), so `discover()` returns nothing for a fresh listing until then. Retry later.
2007
+ * - **x402scan** → `visibility:'live'`, but **`discover()` does NOT read x402scan** — the
2008
+ * listing is real on x402scan.com yet won't show up in `discover()`. Base/Solana only;
2009
+ * needs a resolvable input schema (`/openapi.json` or the `extensions.bazaar` block).
2010
+ * - **Bazaar** → `visibility:'not-listable'` for PipRail (it lists only what its facilitator
2011
+ * settles; PipRail uses none). You can still READ Bazaar via {@link discover} to find others.
2012
+ *
2013
+ * The per-source facts live in {@link DIRECTORY_INFO} (importable) if you'd rather branch
2014
+ * on them before calling.
1944
2015
  */
1945
2016
  async register(url, opts = {}) {
1946
2017
  const targets = _nullishCoalesce(opts.targets, () => ( ["402index"]));
@@ -1979,7 +2050,7 @@ var PipRailClient = (_class2 = class {
1979
2050
  });
1980
2051
  }
1981
2052
  }
1982
- return outcomes;
2053
+ return outcomes.map(decorateOutcome);
1983
2054
  }
1984
2055
  /**
1985
2056
  * The discovery signer for the bound wallet (its address + a message signer),
@@ -2339,7 +2410,7 @@ var PipRailClient = (_class2 = class {
2339
2410
  function safeBig(s) {
2340
2411
  try {
2341
2412
  return BigInt(s);
2342
- } catch (e21) {
2413
+ } catch (e22) {
2343
2414
  return 0n;
2344
2415
  }
2345
2416
  }
@@ -2405,7 +2476,7 @@ function railOnNetwork(rail, matches) {
2405
2476
  function hostOf2(url) {
2406
2477
  try {
2407
2478
  return new URL(url).hostname;
2408
- } catch (e22) {
2479
+ } catch (e23) {
2409
2480
  return url;
2410
2481
  }
2411
2482
  }
@@ -2436,7 +2507,7 @@ async function readInvalidReason(response) {
2436
2507
  detail: typeof body.detail === "string" ? body.detail : ""
2437
2508
  };
2438
2509
  }
2439
- } catch (e23) {
2510
+ } catch (e24) {
2440
2511
  }
2441
2512
  return null;
2442
2513
  }
@@ -2447,7 +2518,7 @@ async function readBody(res) {
2447
2518
  if (!text) return null;
2448
2519
  try {
2449
2520
  return JSON.parse(text);
2450
- } catch (e24) {
2521
+ } catch (e25) {
2451
2522
  return text;
2452
2523
  }
2453
2524
  }
@@ -2627,7 +2698,7 @@ function paymentTools(client) {
2627
2698
  },
2628
2699
  {
2629
2700
  name: "piprail_register",
2630
- description: "List an x402 payment-gated resource YOU run on the open indexes so other agents can discover it. Default target is 402 Index \u2014 no auth, no signature, no payment; searchable within seconds. Returns one outcome per index ({ source, ok, detail }); a step the chain can't satisfy comes back ok:false with the reason. Moves no funds; nothing is PipRail-hosted.",
2701
+ description: "List an x402 payment-gated resource YOU run on the open indexes so other agents can discover it. Default target is 402 Index \u2014 no auth, no signature, no payment; a self-registered listing is pending review (verify your domain on 402index.io for instant approval). Returns one outcome per index ({ source, ok, detail, visibility, note }); a step the chain can't satisfy comes back ok:false with the reason. Moves no funds; nothing is PipRail-hosted.",
2631
2702
  annotations: {
2632
2703
  title: "Register an x402 endpoint",
2633
2704
  readOnlyHint: false,
@@ -2685,7 +2756,7 @@ async function post(url, body, headers) {
2685
2756
  let json = null;
2686
2757
  try {
2687
2758
  json = await res.json();
2688
- } catch (e25) {
2759
+ } catch (e26) {
2689
2760
  }
2690
2761
  return { status: res.status, json };
2691
2762
  }
@@ -2939,7 +3010,7 @@ function createPaymentGate(options) {
2939
3010
  if (options.onPaid) {
2940
3011
  try {
2941
3012
  options.onPaid(receipt);
2942
- } catch (e26) {
3013
+ } catch (e27) {
2943
3014
  }
2944
3015
  }
2945
3016
  }
@@ -3109,7 +3180,7 @@ var GENERATOR = "@piprail/sdk \xB7 https://piprail.com";
3109
3180
  function pathOf(url) {
3110
3181
  try {
3111
3182
  return new URL(url).pathname || "/";
3112
- } catch (e27) {
3183
+ } catch (e28) {
3113
3184
  return url.startsWith("/") ? url : `/${url}`;
3114
3185
  }
3115
3186
  }
@@ -3216,4 +3287,7 @@ function buildX402DnsTxt(input) {
3216
3287
 
3217
3288
 
3218
3289
 
3219
- exports.CHAINS = CHAINS; exports.ConfirmationTimeoutError = _chunkMDLZJGLYcjs.ConfirmationTimeoutError; exports.EIP3009_TYPES = EIP3009_TYPES; exports.EXACT_NETWORK_SLUGS = EXACT_NETWORK_SLUGS; exports.GENERATOR = GENERATOR; exports.HEADER_REQUIRED = HEADER_REQUIRED; exports.HEADER_RESPONSE = HEADER_RESPONSE; exports.HEADER_RESPONSE_V1 = HEADER_RESPONSE_V1; exports.HEADER_SIGNATURE = HEADER_SIGNATURE; exports.HEADER_SIGNATURE_V1 = HEADER_SIGNATURE_V1; exports.InsufficientFundsError = _chunkMDLZJGLYcjs.InsufficientFundsError; exports.InvalidEnvelopeError = _chunkMDLZJGLYcjs.InvalidEnvelopeError; exports.MaxRetriesExceededError = _chunkMDLZJGLYcjs.MaxRetriesExceededError; exports.MissingDriverError = _chunkMDLZJGLYcjs.MissingDriverError; exports.NoCompatibleAcceptError = _chunkMDLZJGLYcjs.NoCompatibleAcceptError; exports.NonReplayableBodyError = _chunkMDLZJGLYcjs.NonReplayableBodyError; exports.PaymentDeclinedError = _chunkMDLZJGLYcjs.PaymentDeclinedError; exports.PaymentTimeoutError = _chunkMDLZJGLYcjs.PaymentTimeoutError; exports.PipRailClient = PipRailClient; exports.PipRailError = _chunkMDLZJGLYcjs.PipRailError; exports.RecipientNotReadyError = _chunkMDLZJGLYcjs.RecipientNotReadyError; exports.SettlementError = _chunkMDLZJGLYcjs.SettlementError; exports.UnknownTokenError = _chunkMDLZJGLYcjs.UnknownTokenError; exports.UnsupportedNetworkError = _chunkMDLZJGLYcjs.UnsupportedNetworkError; exports.WrongChainError = _chunkMDLZJGLYcjs.WrongChainError; exports.WrongFamilyError = _chunkMDLZJGLYcjs.WrongFamilyError; exports.buildChallengeHeader = buildChallengeHeader; exports.buildExactAuthorization = buildExactAuthorization; exports.buildOpenApi = buildOpenApi; exports.buildReceiptHeader = buildReceiptHeader; exports.buildSignatureHeader = buildSignatureHeader; exports.buildWellKnownX402 = buildWellKnownX402; exports.buildX402DnsTxt = buildX402DnsTxt; exports.chainIdForExactNetwork = chainIdForExactNetwork; exports.createPaymentGate = createPaymentGate; exports.eip3009Abi = eip3009Abi; exports.encodeXPaymentHeader = encodeXPaymentHeader; exports.evaluatePolicy = evaluatePolicy; exports.normalizeNetwork = normalizeNetwork; exports.parseChallenge = parseChallenge; exports.parseExactPaymentHeader = parseExactPaymentHeader; exports.parseExactRequirements = parseExactRequirements; exports.parseReceipt = parseReceipt; exports.parseSignatureHeader = parseSignatureHeader; exports.paymentTools = paymentTools; exports.pickAccept = pickAccept; exports.planAcross = planAcross; exports.readExactDomain = readExactDomain; exports.register402Index = register402Index; exports.registerDriver = registerDriver; exports.registerX402Scan = registerX402Scan; exports.requirePayment = requirePayment; exports.resolveChain = resolveChain; exports.searchOpenIndexes = searchOpenIndexes; exports.settleViaFacilitator = settleViaFacilitator; exports.toInsufficientFundsError = _chunkMDLZJGLYcjs.toInsufficientFundsError; exports.toInvalidBody = toInvalidBody;
3290
+
3291
+
3292
+
3293
+ exports.CHAINS = CHAINS; exports.ConfirmationTimeoutError = _chunkMDLZJGLYcjs.ConfirmationTimeoutError; exports.DIRECTORY_INFO = DIRECTORY_INFO; exports.EIP3009_TYPES = EIP3009_TYPES; exports.EXACT_NETWORK_SLUGS = EXACT_NETWORK_SLUGS; exports.GENERATOR = GENERATOR; exports.HEADER_REQUIRED = HEADER_REQUIRED; exports.HEADER_RESPONSE = HEADER_RESPONSE; exports.HEADER_RESPONSE_V1 = HEADER_RESPONSE_V1; exports.HEADER_SIGNATURE = HEADER_SIGNATURE; exports.HEADER_SIGNATURE_V1 = HEADER_SIGNATURE_V1; exports.InsufficientFundsError = _chunkMDLZJGLYcjs.InsufficientFundsError; exports.InvalidEnvelopeError = _chunkMDLZJGLYcjs.InvalidEnvelopeError; exports.MaxRetriesExceededError = _chunkMDLZJGLYcjs.MaxRetriesExceededError; exports.MissingDriverError = _chunkMDLZJGLYcjs.MissingDriverError; exports.NoCompatibleAcceptError = _chunkMDLZJGLYcjs.NoCompatibleAcceptError; exports.NonReplayableBodyError = _chunkMDLZJGLYcjs.NonReplayableBodyError; exports.PaymentDeclinedError = _chunkMDLZJGLYcjs.PaymentDeclinedError; exports.PaymentTimeoutError = _chunkMDLZJGLYcjs.PaymentTimeoutError; exports.PipRailClient = PipRailClient; exports.PipRailError = _chunkMDLZJGLYcjs.PipRailError; exports.RecipientNotReadyError = _chunkMDLZJGLYcjs.RecipientNotReadyError; exports.SettlementError = _chunkMDLZJGLYcjs.SettlementError; exports.UnknownTokenError = _chunkMDLZJGLYcjs.UnknownTokenError; exports.UnsupportedNetworkError = _chunkMDLZJGLYcjs.UnsupportedNetworkError; exports.WrongChainError = _chunkMDLZJGLYcjs.WrongChainError; exports.WrongFamilyError = _chunkMDLZJGLYcjs.WrongFamilyError; exports.buildChallengeHeader = buildChallengeHeader; exports.buildExactAuthorization = buildExactAuthorization; exports.buildOpenApi = buildOpenApi; exports.buildReceiptHeader = buildReceiptHeader; exports.buildSignatureHeader = buildSignatureHeader; exports.buildWellKnownX402 = buildWellKnownX402; exports.buildX402DnsTxt = buildX402DnsTxt; exports.chainIdForExactNetwork = chainIdForExactNetwork; exports.createPaymentGate = createPaymentGate; exports.decorateOutcome = decorateOutcome; exports.eip3009Abi = eip3009Abi; exports.encodeXPaymentHeader = encodeXPaymentHeader; exports.evaluatePolicy = evaluatePolicy; exports.getDirectoryInfo = getDirectoryInfo; exports.normalizeNetwork = normalizeNetwork; exports.parseChallenge = parseChallenge; exports.parseExactPaymentHeader = parseExactPaymentHeader; exports.parseExactRequirements = parseExactRequirements; exports.parseReceipt = parseReceipt; exports.parseSignatureHeader = parseSignatureHeader; exports.paymentTools = paymentTools; exports.pickAccept = pickAccept; exports.planAcross = planAcross; exports.readExactDomain = readExactDomain; exports.register402Index = register402Index; exports.registerDriver = registerDriver; exports.registerX402Scan = registerX402Scan; exports.requirePayment = requirePayment; exports.resolveChain = resolveChain; exports.searchOpenIndexes = searchOpenIndexes; exports.settleViaFacilitator = settleViaFacilitator; exports.toInsufficientFundsError = _chunkMDLZJGLYcjs.toInsufficientFundsError; exports.toInvalidBody = toInvalidBody;
package/dist/index.d.cts CHANGED
@@ -216,9 +216,6 @@ type VerifyResult = {
216
216
  declare const HEADER_REQUIRED = "payment-required";
217
217
  declare const HEADER_SIGNATURE = "payment-signature";
218
218
  declare const HEADER_RESPONSE = "payment-response";
219
- /** Legacy x402 v1 header names. PipRail EMITS v2 (the constants above) but also
220
- * READS the v1 client header and ECHOES the v1 response header, so a deprecated
221
- * v1 client (still ~half the installed base) interoperates on the `exact` rail. */
222
219
  declare const HEADER_SIGNATURE_V1 = "x-payment";
223
220
  declare const HEADER_RESPONSE_V1 = "x-payment-response";
224
221
  declare function buildChallengeHeader(challenge: X402Challenge): string;
@@ -4237,6 +4234,14 @@ interface DiscoveredResource {
4237
4234
  /** The payment options the index advertises (best-effort, cross-scheme). */
4238
4235
  rails: DiscoveredRail[];
4239
4236
  }
4237
+ /** Where a listing stands after a register attempt — a branchable lifecycle
4238
+ * state so an agent doesn't have to re-derive each index's behaviour:
4239
+ * - `'live'` — findable now (search it immediately).
4240
+ * - `'pending-review'` — accepted, but the index reviews/propagates before it's
4241
+ * publicly findable; allow a short delay before `discover()`.
4242
+ * - `'not-listable'` — it didn't list (a failure, or this index structurally
4243
+ * can't list a PipRail resource). See `detail` + `note`. */
4244
+ type ListingVisibility = 'live' | 'pending-review' | 'not-listable';
4240
4245
  /** The result of trying to list a resource on one open index. */
4241
4246
  interface RegisterOutcome {
4242
4247
  source: DiscoverySource;
@@ -4247,6 +4252,14 @@ interface RegisterOutcome {
4247
4252
  detail?: string;
4248
4253
  /** A link to the listing, when the index returns one. */
4249
4254
  listingUrl?: string;
4255
+ /** The lifecycle state of this listing — `'live'`, `'pending-review'`, or
4256
+ * `'not-listable'`. Projected from {@link DIRECTORY_INFO}; branch on this
4257
+ * instead of guessing how soon `discover()` will find the resource. */
4258
+ visibility?: ListingVisibility;
4259
+ /** A one-line, agent-readable caveat for this source (from {@link DIRECTORY_INFO})
4260
+ * — e.g. "402 Index reviews before publishing" or "discover() doesn't read
4261
+ * x402scan, so a live listing there won't appear in discover() results". */
4262
+ note?: string;
4250
4263
  }
4251
4264
  interface SearchOpenIndexesOptions {
4252
4265
  /** Free-text query (filtered client-side against name/description/resource). */
@@ -4278,6 +4291,48 @@ interface RegisterInput {
4278
4291
  */
4279
4292
  attribution?: boolean;
4280
4293
  }
4294
+ /**
4295
+ * Static, agent-readable lifecycle facts about one open index — the SINGLE source
4296
+ * of truth that {@link RegisterOutcome.visibility}/`note` are projected from, and
4297
+ * that an agent can also query directly (via {@link getDirectoryInfo}) to reason
4298
+ * about an index BEFORE calling. Best-effort: an index can change its behaviour,
4299
+ * so treat the timing as guidance, not an SLA.
4300
+ */
4301
+ interface DirectoryInfo {
4302
+ source: DiscoverySource;
4303
+ /** How a new listing is gated: a synchronous URL probe (`402index`, `x402scan`),
4304
+ * or coupled to a facilitator settling a payment (`bazaar`). */
4305
+ review: 'probe-sync' | 'settle-coupled';
4306
+ /** Auth needed to WRITE a listing. */
4307
+ auth: 'none' | 'siwx' | 'facilitator-only';
4308
+ /** Chains (CAIP-2) this index will list. `null` = any chain the resource advertises. */
4309
+ chains: readonly string[] | null;
4310
+ /** Visibility a SUCCESSFUL listing reaches here (the steady state a non-failed
4311
+ * outcome maps to). */
4312
+ onSuccess: ListingVisibility;
4313
+ /** Whether THIS SDK's {@link PipRailClient.discover} reads this index. It reads
4314
+ * `bazaar` + `402index`; it does NOT read `x402scan` — so a live x402scan listing
4315
+ * won't appear in `discover()` results. Don't read that absence as failure. */
4316
+ readByDiscover: boolean;
4317
+ /** One-line caveat: why a register might fail, or what to expect afterwards. */
4318
+ caveat: string;
4319
+ }
4320
+ /**
4321
+ * The open directories' lifecycle, as one queryable map. An agent can branch on
4322
+ * this without embedding directory knowledge: `DIRECTORY_INFO[source].readByDiscover`,
4323
+ * `.chains`, `.onSuccess`, etc. {@link PipRailClient.register} projects the relevant
4324
+ * entry onto every {@link RegisterOutcome} (`visibility` + `note`).
4325
+ */
4326
+ declare const DIRECTORY_INFO: Readonly<Record<DiscoverySource, DirectoryInfo>>;
4327
+ /** Lifecycle facts for one open index (auth, chains, how soon a listing is
4328
+ * findable, whether `discover()` reads it). See {@link DIRECTORY_INFO}. The param
4329
+ * is the closed {@link DiscoverySource} union (TS callers are safe); a string
4330
+ * outside it returns `undefined` at runtime. */
4331
+ declare function getDirectoryInfo(source: DiscoverySource): DirectoryInfo;
4332
+ /** Project the static {@link DIRECTORY_INFO} lifecycle facts onto a register
4333
+ * outcome, so an agent gets `visibility` + `note` in the result it already holds —
4334
+ * no second lookup. A failed outcome is always `'not-listable'`. Idempotent. */
4335
+ declare function decorateOutcome(o: RegisterOutcome): RegisterOutcome;
4281
4336
  /** Normalize an index's network field to CAIP-2 when we recognise the slug;
4282
4337
  * pass a value that's already CAIP-2 (`namespace:reference`) through unchanged.
4283
4338
  * An unknown slug returns unchanged (no `:`), which the client treats as
@@ -4291,8 +4346,11 @@ declare function normalizeNetwork(network: string): string;
4291
4346
  declare function searchOpenIndexes(opts?: SearchOpenIndexesOptions): Promise<DiscoveredResource[]>;
4292
4347
  /**
4293
4348
  * Register a resource on **402 Index** — the primary, friction-free path: a
4294
- * single POST, no auth, no signature, no payment. Searchable within seconds.
4295
- * Returns a structured outcome; never throws for an HTTP/transport problem.
4349
+ * single POST, no auth, no signature, no payment. A self-registered listing is
4350
+ * **pending review** (not searchable until approved verify your domain on
4351
+ * 402index.io for instant approval). Returns a structured outcome; never throws
4352
+ * for an HTTP/transport problem. NOTE: the outcome is BARE — `visibility`/`note`
4353
+ * are added by {@link PipRailClient.register} (or call {@link decorateOutcome}).
4296
4354
  */
4297
4355
  declare function register402Index(input: RegisterInput): Promise<RegisterOutcome>;
4298
4356
  /**
@@ -4300,7 +4358,9 @@ declare function register402Index(input: RegisterInput): Promise<RegisterOutcome
4300
4358
  * EIP-4361 challenge with the merchant's own key, resend with the
4301
4359
  * `SIGN-IN-WITH-X` header. Facilitator-free, but **Base/Solana-only** and EVM
4302
4360
  * signing today. EXPERIMENTAL — the open SIWX handshake is a moving convention;
4303
- * validate against x402scan before relying on it. Never throws.
4361
+ * validate against x402scan before relying on it. Never throws. NOTE: returns a
4362
+ * BARE outcome — `visibility`/`note` are added by {@link PipRailClient.register}
4363
+ * (or call {@link decorateOutcome}).
4304
4364
  */
4305
4365
  declare function registerX402Scan(input: {
4306
4366
  url: string;
@@ -4753,19 +4813,40 @@ declare class PipRailClient {
4753
4813
  *
4754
4814
  * Nothing PipRail-hosted: these are third-party open directories. Never throws
4755
4815
  * for a read problem — an index that's down or changed simply contributes
4756
- * nothing. Honest caveat: index results are cross-scheme (mostly the
4757
- * mainstream `exact` scheme); `fetch()` pays only `onchain-proof` rails
4758
- * directly (pay `exact` resources with the experimental `drivers/evm/exact.ts`).
4816
+ * nothing. Honest caveats (see {@link DIRECTORY_INFO}):
4817
+ * - Reads **`bazaar` + `402index`** only — **NOT `x402scan`** (its reads are paid). A
4818
+ * resource you registered on x402scan is live there but will NOT appear here; don't
4819
+ * read that absence as failure. (Passing `sources:['x402scan']` explicitly yields `[]`.)
4820
+ * - A resource just listed via {@link register} may not appear yet — 402 Index reviews
4821
+ * before publishing, so retry with a brief backoff if a fresh listing is missing.
4822
+ * - Results are cross-scheme (mostly the mainstream `exact` scheme); `fetch()` pays
4823
+ * only `onchain-proof` rails directly (pay `exact` resources with the experimental
4824
+ * `drivers/evm/exact.ts`).
4759
4825
  */
4760
4826
  discover(opts?: DiscoverOptions): Promise<DiscoveredResource[]>;
4761
4827
  /**
4762
4828
  * List a resource you run on the OPEN x402 registries, so agents can find it.
4763
- * Default target is **402 Index** — one POST, no auth, no signature, no payment
4764
- * (searchable within seconds). Add `'x402scan'` to also register via SIWX (one
4765
- * wallet signature; EVM + a Base/Solana rail). Returns one {@link RegisterOutcome}
4766
- * per target — a target the chain can't satisfy comes back `{ ok:false, detail }`,
4767
- * never a throw. An explicit, developer-invoked action; it moves no funds, and
4768
- * nothing is PipRail-hosted — you're listing on third-party open directories.
4829
+ * Default target is **402 Index** — one POST, no auth, no signature, no payment.
4830
+ * Add `'x402scan'` to also register via SIWX (one wallet signature; EVM + a
4831
+ * Base/Solana rail). Returns one {@link RegisterOutcome} per target — a target the
4832
+ * chain can't satisfy comes back `{ ok:false, detail }`, never a throw. An explicit,
4833
+ * developer-invoked action; it moves no funds, and nothing is PipRail-hosted —
4834
+ * you're listing on third-party open directories.
4835
+ *
4836
+ * **Listing is asynchronous — each outcome carries a `visibility` + `note` so an
4837
+ * agent knows when/where the resource is findable (don't assume `ok:true` means
4838
+ * "searchable now"):**
4839
+ * - **402 Index** → `visibility:'pending-review'`. It probes your URL on submit, then lists it
4840
+ * PENDING REVIEW — not searchable until approved (verify your domain on 402index.io for instant
4841
+ * approval), so `discover()` returns nothing for a fresh listing until then. Retry later.
4842
+ * - **x402scan** → `visibility:'live'`, but **`discover()` does NOT read x402scan** — the
4843
+ * listing is real on x402scan.com yet won't show up in `discover()`. Base/Solana only;
4844
+ * needs a resolvable input schema (`/openapi.json` or the `extensions.bazaar` block).
4845
+ * - **Bazaar** → `visibility:'not-listable'` for PipRail (it lists only what its facilitator
4846
+ * settles; PipRail uses none). You can still READ Bazaar via {@link discover} to find others.
4847
+ *
4848
+ * The per-source facts live in {@link DIRECTORY_INFO} (importable) if you'd rather branch
4849
+ * on them before calling.
4769
4850
  */
4770
4851
  register(url: string, opts?: RegisterOptions): Promise<RegisterOutcome[]>;
4771
4852
  /**
@@ -5619,12 +5700,21 @@ declare function buildExactAuthorization(params: BuildExactParams): Promise<{
5619
5700
  authorization: ExactAuthorization;
5620
5701
  signature: Hex;
5621
5702
  }>;
5622
- /** Encode an x402 `exact` PaymentPayload into an `X-PAYMENT` header value. */
5703
+ /**
5704
+ * Encode an x402 `exact` PaymentPayload into an `X-PAYMENT` header value — the
5705
+ * **v1 flat shape** (`{ x402Version, scheme, network, payload }`). This is a
5706
+ * client-side UTILITY (PipRail's own client pays only `onchain-proof`, never this);
5707
+ * the v1 flat shape is what Coinbase's original reference emits and is still accepted
5708
+ * by every x402 gate + facilitator, so `x402Version` defaults to `1` to stay
5709
+ * INTERNALLY CONSISTENT with that shape (emitting `2` here would mislabel a v1 body —
5710
+ * a proper v2 `exact` payload is the nested `accepted`-envelope shape instead). See
5711
+ * the version-posture note in `x402.ts`.
5712
+ */
5623
5713
  declare function encodeXPaymentHeader(input: {
5624
5714
  network: string;
5625
5715
  authorization: ExactAuthorization;
5626
5716
  signature: Hex;
5627
- /** x402 envelope version (Coinbase's reference uses 1). */
5717
+ /** x402 envelope version. Defaults to `1` — consistent with this flat shape. */
5628
5718
  x402Version?: number;
5629
5719
  }): string;
5630
5720
  /**
@@ -5740,4 +5830,4 @@ declare function readExactDomain(publicClient: PublicClient, asset: string): Pro
5740
5830
  version: string;
5741
5831
  } | null>;
5742
5832
 
5743
- export { type AcceptOption, type AddressId, type AgentTool, type AlgorandToken, type AptosToken, type AssetId, type BuildExactParams, CHAINS, type Caip2, type ChainFamily, type ChainInput, type ChainName, type ChainPreset, type ChainSelector, type ConfirmInfo, ConfirmationTimeoutError, type CostEstimate, type DiscoverOptions, type DiscoveredRail, type DiscoveredResource, type DiscoverySigner, type DiscoverySource, EIP3009_TYPES, EXACT_NETWORK_SLUGS, type EvmToken, type ExactAccept, type ExactAuthorization, type ExactAuthorizationWire, type ExactPaymentPayload, type ExactRailOption, type ExpressLikeMiddleware, type ExpressLikeNext, type ExpressLikeRequest, type ExpressLikeResponse, type FacilitatorConfig, type FacilitatorPaymentRequirements, GENERATOR, HEADER_REQUIRED, HEADER_RESPONSE, HEADER_RESPONSE_V1, HEADER_SIGNATURE, HEADER_SIGNATURE_V1, InsufficientFundsError, InvalidEnvelopeError, type ManifestInput, MaxRetriesExceededError, MissingDriverError, type NearToken, NoCompatibleAcceptError, NonReplayableBodyError, type OpenApiDocument, type OpenApiOperation, type ParsedExactPayment, type PayBlocker, type PayOption, type PayWarning, PaymentDeclinedError, type PaymentDriver, type PaymentGate, type PaymentIntent, type PaymentPlan, type PaymentPolicy, type PaymentRail, PaymentTimeoutError, PipRailClient, type PipRailClientOptions, type PipRailCostQuote, PipRailError, type PipRailEvent, type PipRailQuote, type PolicyDecision, RecipientNotReadyError, type RecipientReason, type RegisterInput, type RegisterOptions, type RegisterOutcome, type RequirePaymentOptions, type ResolveOptions, type ResolvedChain, type ResolvedNetwork, type ResolvedToken, type ResourceDescription, type SearchOpenIndexesOptions, type SettleViaFacilitatorInput, SettlementError, type SolanaToken, type SpendAssetTotal, type SpendRecord, type SpendSummary, type StellarToken, type SuiToken, type TokenInfo, type TokenInput, type TonToken, type ToolAnnotations, type TronToken, UnknownTokenError, UnsupportedNetworkError, type VerifyErrorCode, type VerifyPaymentResult, type VerifyResult, type WalletBalance, type WalletHandle, type WalletInput, type WellKnownX402, WrongChainError, WrongFamilyError, type X402AcceptEntry, type X402AnyAccept, type X402Challenge, type X402DnsRecord, type X402ExactAcceptEntry, type X402InvalidBody, type X402PaymentSignature, type X402Receipt, type X402ResourceObject, type XrplToken, buildChallengeHeader, buildExactAuthorization, buildOpenApi, buildReceiptHeader, buildSignatureHeader, buildWellKnownX402, buildX402DnsTxt, chainIdForExactNetwork, createPaymentGate, eip3009Abi, encodeXPaymentHeader, evaluatePolicy, normalizeNetwork, parseChallenge, parseExactPaymentHeader, parseExactRequirements, parseReceipt, parseSignatureHeader, paymentTools, pickAccept, planAcross, readExactDomain, register402Index, registerDriver, registerX402Scan, requirePayment, resolveChain, searchOpenIndexes, settleViaFacilitator, toInsufficientFundsError, toInvalidBody };
5833
+ export { type AcceptOption, type AddressId, type AgentTool, type AlgorandToken, type AptosToken, type AssetId, type BuildExactParams, CHAINS, type Caip2, type ChainFamily, type ChainInput, type ChainName, type ChainPreset, type ChainSelector, type ConfirmInfo, ConfirmationTimeoutError, type CostEstimate, DIRECTORY_INFO, type DirectoryInfo, type DiscoverOptions, type DiscoveredRail, type DiscoveredResource, type DiscoverySigner, type DiscoverySource, EIP3009_TYPES, EXACT_NETWORK_SLUGS, type EvmToken, type ExactAccept, type ExactAuthorization, type ExactAuthorizationWire, type ExactPaymentPayload, type ExactRailOption, type ExpressLikeMiddleware, type ExpressLikeNext, type ExpressLikeRequest, type ExpressLikeResponse, type FacilitatorConfig, type FacilitatorPaymentRequirements, GENERATOR, HEADER_REQUIRED, HEADER_RESPONSE, HEADER_RESPONSE_V1, HEADER_SIGNATURE, HEADER_SIGNATURE_V1, InsufficientFundsError, InvalidEnvelopeError, type ListingVisibility, type ManifestInput, MaxRetriesExceededError, MissingDriverError, type NearToken, NoCompatibleAcceptError, NonReplayableBodyError, type OpenApiDocument, type OpenApiOperation, type ParsedExactPayment, type PayBlocker, type PayOption, type PayWarning, PaymentDeclinedError, type PaymentDriver, type PaymentGate, type PaymentIntent, type PaymentPlan, type PaymentPolicy, type PaymentRail, PaymentTimeoutError, PipRailClient, type PipRailClientOptions, type PipRailCostQuote, PipRailError, type PipRailEvent, type PipRailQuote, type PolicyDecision, RecipientNotReadyError, type RecipientReason, type RegisterInput, type RegisterOptions, type RegisterOutcome, type RequirePaymentOptions, type ResolveOptions, type ResolvedChain, type ResolvedNetwork, type ResolvedToken, type ResourceDescription, type SearchOpenIndexesOptions, type SettleViaFacilitatorInput, SettlementError, type SolanaToken, type SpendAssetTotal, type SpendRecord, type SpendSummary, type StellarToken, type SuiToken, type TokenInfo, type TokenInput, type TonToken, type ToolAnnotations, type TronToken, UnknownTokenError, UnsupportedNetworkError, type VerifyErrorCode, type VerifyPaymentResult, type VerifyResult, type WalletBalance, type WalletHandle, type WalletInput, type WellKnownX402, WrongChainError, WrongFamilyError, type X402AcceptEntry, type X402AnyAccept, type X402Challenge, type X402DnsRecord, type X402ExactAcceptEntry, type X402InvalidBody, type X402PaymentSignature, type X402Receipt, type X402ResourceObject, type XrplToken, buildChallengeHeader, buildExactAuthorization, buildOpenApi, buildReceiptHeader, buildSignatureHeader, buildWellKnownX402, buildX402DnsTxt, chainIdForExactNetwork, createPaymentGate, decorateOutcome, eip3009Abi, encodeXPaymentHeader, evaluatePolicy, getDirectoryInfo, normalizeNetwork, parseChallenge, parseExactPaymentHeader, parseExactRequirements, parseReceipt, parseSignatureHeader, paymentTools, pickAccept, planAcross, readExactDomain, register402Index, registerDriver, registerX402Scan, requirePayment, resolveChain, searchOpenIndexes, settleViaFacilitator, toInsufficientFundsError, toInvalidBody };
package/dist/index.d.ts CHANGED
@@ -216,9 +216,6 @@ type VerifyResult = {
216
216
  declare const HEADER_REQUIRED = "payment-required";
217
217
  declare const HEADER_SIGNATURE = "payment-signature";
218
218
  declare const HEADER_RESPONSE = "payment-response";
219
- /** Legacy x402 v1 header names. PipRail EMITS v2 (the constants above) but also
220
- * READS the v1 client header and ECHOES the v1 response header, so a deprecated
221
- * v1 client (still ~half the installed base) interoperates on the `exact` rail. */
222
219
  declare const HEADER_SIGNATURE_V1 = "x-payment";
223
220
  declare const HEADER_RESPONSE_V1 = "x-payment-response";
224
221
  declare function buildChallengeHeader(challenge: X402Challenge): string;
@@ -4237,6 +4234,14 @@ interface DiscoveredResource {
4237
4234
  /** The payment options the index advertises (best-effort, cross-scheme). */
4238
4235
  rails: DiscoveredRail[];
4239
4236
  }
4237
+ /** Where a listing stands after a register attempt — a branchable lifecycle
4238
+ * state so an agent doesn't have to re-derive each index's behaviour:
4239
+ * - `'live'` — findable now (search it immediately).
4240
+ * - `'pending-review'` — accepted, but the index reviews/propagates before it's
4241
+ * publicly findable; allow a short delay before `discover()`.
4242
+ * - `'not-listable'` — it didn't list (a failure, or this index structurally
4243
+ * can't list a PipRail resource). See `detail` + `note`. */
4244
+ type ListingVisibility = 'live' | 'pending-review' | 'not-listable';
4240
4245
  /** The result of trying to list a resource on one open index. */
4241
4246
  interface RegisterOutcome {
4242
4247
  source: DiscoverySource;
@@ -4247,6 +4252,14 @@ interface RegisterOutcome {
4247
4252
  detail?: string;
4248
4253
  /** A link to the listing, when the index returns one. */
4249
4254
  listingUrl?: string;
4255
+ /** The lifecycle state of this listing — `'live'`, `'pending-review'`, or
4256
+ * `'not-listable'`. Projected from {@link DIRECTORY_INFO}; branch on this
4257
+ * instead of guessing how soon `discover()` will find the resource. */
4258
+ visibility?: ListingVisibility;
4259
+ /** A one-line, agent-readable caveat for this source (from {@link DIRECTORY_INFO})
4260
+ * — e.g. "402 Index reviews before publishing" or "discover() doesn't read
4261
+ * x402scan, so a live listing there won't appear in discover() results". */
4262
+ note?: string;
4250
4263
  }
4251
4264
  interface SearchOpenIndexesOptions {
4252
4265
  /** Free-text query (filtered client-side against name/description/resource). */
@@ -4278,6 +4291,48 @@ interface RegisterInput {
4278
4291
  */
4279
4292
  attribution?: boolean;
4280
4293
  }
4294
+ /**
4295
+ * Static, agent-readable lifecycle facts about one open index — the SINGLE source
4296
+ * of truth that {@link RegisterOutcome.visibility}/`note` are projected from, and
4297
+ * that an agent can also query directly (via {@link getDirectoryInfo}) to reason
4298
+ * about an index BEFORE calling. Best-effort: an index can change its behaviour,
4299
+ * so treat the timing as guidance, not an SLA.
4300
+ */
4301
+ interface DirectoryInfo {
4302
+ source: DiscoverySource;
4303
+ /** How a new listing is gated: a synchronous URL probe (`402index`, `x402scan`),
4304
+ * or coupled to a facilitator settling a payment (`bazaar`). */
4305
+ review: 'probe-sync' | 'settle-coupled';
4306
+ /** Auth needed to WRITE a listing. */
4307
+ auth: 'none' | 'siwx' | 'facilitator-only';
4308
+ /** Chains (CAIP-2) this index will list. `null` = any chain the resource advertises. */
4309
+ chains: readonly string[] | null;
4310
+ /** Visibility a SUCCESSFUL listing reaches here (the steady state a non-failed
4311
+ * outcome maps to). */
4312
+ onSuccess: ListingVisibility;
4313
+ /** Whether THIS SDK's {@link PipRailClient.discover} reads this index. It reads
4314
+ * `bazaar` + `402index`; it does NOT read `x402scan` — so a live x402scan listing
4315
+ * won't appear in `discover()` results. Don't read that absence as failure. */
4316
+ readByDiscover: boolean;
4317
+ /** One-line caveat: why a register might fail, or what to expect afterwards. */
4318
+ caveat: string;
4319
+ }
4320
+ /**
4321
+ * The open directories' lifecycle, as one queryable map. An agent can branch on
4322
+ * this without embedding directory knowledge: `DIRECTORY_INFO[source].readByDiscover`,
4323
+ * `.chains`, `.onSuccess`, etc. {@link PipRailClient.register} projects the relevant
4324
+ * entry onto every {@link RegisterOutcome} (`visibility` + `note`).
4325
+ */
4326
+ declare const DIRECTORY_INFO: Readonly<Record<DiscoverySource, DirectoryInfo>>;
4327
+ /** Lifecycle facts for one open index (auth, chains, how soon a listing is
4328
+ * findable, whether `discover()` reads it). See {@link DIRECTORY_INFO}. The param
4329
+ * is the closed {@link DiscoverySource} union (TS callers are safe); a string
4330
+ * outside it returns `undefined` at runtime. */
4331
+ declare function getDirectoryInfo(source: DiscoverySource): DirectoryInfo;
4332
+ /** Project the static {@link DIRECTORY_INFO} lifecycle facts onto a register
4333
+ * outcome, so an agent gets `visibility` + `note` in the result it already holds —
4334
+ * no second lookup. A failed outcome is always `'not-listable'`. Idempotent. */
4335
+ declare function decorateOutcome(o: RegisterOutcome): RegisterOutcome;
4281
4336
  /** Normalize an index's network field to CAIP-2 when we recognise the slug;
4282
4337
  * pass a value that's already CAIP-2 (`namespace:reference`) through unchanged.
4283
4338
  * An unknown slug returns unchanged (no `:`), which the client treats as
@@ -4291,8 +4346,11 @@ declare function normalizeNetwork(network: string): string;
4291
4346
  declare function searchOpenIndexes(opts?: SearchOpenIndexesOptions): Promise<DiscoveredResource[]>;
4292
4347
  /**
4293
4348
  * Register a resource on **402 Index** — the primary, friction-free path: a
4294
- * single POST, no auth, no signature, no payment. Searchable within seconds.
4295
- * Returns a structured outcome; never throws for an HTTP/transport problem.
4349
+ * single POST, no auth, no signature, no payment. A self-registered listing is
4350
+ * **pending review** (not searchable until approved verify your domain on
4351
+ * 402index.io for instant approval). Returns a structured outcome; never throws
4352
+ * for an HTTP/transport problem. NOTE: the outcome is BARE — `visibility`/`note`
4353
+ * are added by {@link PipRailClient.register} (or call {@link decorateOutcome}).
4296
4354
  */
4297
4355
  declare function register402Index(input: RegisterInput): Promise<RegisterOutcome>;
4298
4356
  /**
@@ -4300,7 +4358,9 @@ declare function register402Index(input: RegisterInput): Promise<RegisterOutcome
4300
4358
  * EIP-4361 challenge with the merchant's own key, resend with the
4301
4359
  * `SIGN-IN-WITH-X` header. Facilitator-free, but **Base/Solana-only** and EVM
4302
4360
  * signing today. EXPERIMENTAL — the open SIWX handshake is a moving convention;
4303
- * validate against x402scan before relying on it. Never throws.
4361
+ * validate against x402scan before relying on it. Never throws. NOTE: returns a
4362
+ * BARE outcome — `visibility`/`note` are added by {@link PipRailClient.register}
4363
+ * (or call {@link decorateOutcome}).
4304
4364
  */
4305
4365
  declare function registerX402Scan(input: {
4306
4366
  url: string;
@@ -4753,19 +4813,40 @@ declare class PipRailClient {
4753
4813
  *
4754
4814
  * Nothing PipRail-hosted: these are third-party open directories. Never throws
4755
4815
  * for a read problem — an index that's down or changed simply contributes
4756
- * nothing. Honest caveat: index results are cross-scheme (mostly the
4757
- * mainstream `exact` scheme); `fetch()` pays only `onchain-proof` rails
4758
- * directly (pay `exact` resources with the experimental `drivers/evm/exact.ts`).
4816
+ * nothing. Honest caveats (see {@link DIRECTORY_INFO}):
4817
+ * - Reads **`bazaar` + `402index`** only — **NOT `x402scan`** (its reads are paid). A
4818
+ * resource you registered on x402scan is live there but will NOT appear here; don't
4819
+ * read that absence as failure. (Passing `sources:['x402scan']` explicitly yields `[]`.)
4820
+ * - A resource just listed via {@link register} may not appear yet — 402 Index reviews
4821
+ * before publishing, so retry with a brief backoff if a fresh listing is missing.
4822
+ * - Results are cross-scheme (mostly the mainstream `exact` scheme); `fetch()` pays
4823
+ * only `onchain-proof` rails directly (pay `exact` resources with the experimental
4824
+ * `drivers/evm/exact.ts`).
4759
4825
  */
4760
4826
  discover(opts?: DiscoverOptions): Promise<DiscoveredResource[]>;
4761
4827
  /**
4762
4828
  * List a resource you run on the OPEN x402 registries, so agents can find it.
4763
- * Default target is **402 Index** — one POST, no auth, no signature, no payment
4764
- * (searchable within seconds). Add `'x402scan'` to also register via SIWX (one
4765
- * wallet signature; EVM + a Base/Solana rail). Returns one {@link RegisterOutcome}
4766
- * per target — a target the chain can't satisfy comes back `{ ok:false, detail }`,
4767
- * never a throw. An explicit, developer-invoked action; it moves no funds, and
4768
- * nothing is PipRail-hosted — you're listing on third-party open directories.
4829
+ * Default target is **402 Index** — one POST, no auth, no signature, no payment.
4830
+ * Add `'x402scan'` to also register via SIWX (one wallet signature; EVM + a
4831
+ * Base/Solana rail). Returns one {@link RegisterOutcome} per target — a target the
4832
+ * chain can't satisfy comes back `{ ok:false, detail }`, never a throw. An explicit,
4833
+ * developer-invoked action; it moves no funds, and nothing is PipRail-hosted —
4834
+ * you're listing on third-party open directories.
4835
+ *
4836
+ * **Listing is asynchronous — each outcome carries a `visibility` + `note` so an
4837
+ * agent knows when/where the resource is findable (don't assume `ok:true` means
4838
+ * "searchable now"):**
4839
+ * - **402 Index** → `visibility:'pending-review'`. It probes your URL on submit, then lists it
4840
+ * PENDING REVIEW — not searchable until approved (verify your domain on 402index.io for instant
4841
+ * approval), so `discover()` returns nothing for a fresh listing until then. Retry later.
4842
+ * - **x402scan** → `visibility:'live'`, but **`discover()` does NOT read x402scan** — the
4843
+ * listing is real on x402scan.com yet won't show up in `discover()`. Base/Solana only;
4844
+ * needs a resolvable input schema (`/openapi.json` or the `extensions.bazaar` block).
4845
+ * - **Bazaar** → `visibility:'not-listable'` for PipRail (it lists only what its facilitator
4846
+ * settles; PipRail uses none). You can still READ Bazaar via {@link discover} to find others.
4847
+ *
4848
+ * The per-source facts live in {@link DIRECTORY_INFO} (importable) if you'd rather branch
4849
+ * on them before calling.
4769
4850
  */
4770
4851
  register(url: string, opts?: RegisterOptions): Promise<RegisterOutcome[]>;
4771
4852
  /**
@@ -5619,12 +5700,21 @@ declare function buildExactAuthorization(params: BuildExactParams): Promise<{
5619
5700
  authorization: ExactAuthorization;
5620
5701
  signature: Hex;
5621
5702
  }>;
5622
- /** Encode an x402 `exact` PaymentPayload into an `X-PAYMENT` header value. */
5703
+ /**
5704
+ * Encode an x402 `exact` PaymentPayload into an `X-PAYMENT` header value — the
5705
+ * **v1 flat shape** (`{ x402Version, scheme, network, payload }`). This is a
5706
+ * client-side UTILITY (PipRail's own client pays only `onchain-proof`, never this);
5707
+ * the v1 flat shape is what Coinbase's original reference emits and is still accepted
5708
+ * by every x402 gate + facilitator, so `x402Version` defaults to `1` to stay
5709
+ * INTERNALLY CONSISTENT with that shape (emitting `2` here would mislabel a v1 body —
5710
+ * a proper v2 `exact` payload is the nested `accepted`-envelope shape instead). See
5711
+ * the version-posture note in `x402.ts`.
5712
+ */
5623
5713
  declare function encodeXPaymentHeader(input: {
5624
5714
  network: string;
5625
5715
  authorization: ExactAuthorization;
5626
5716
  signature: Hex;
5627
- /** x402 envelope version (Coinbase's reference uses 1). */
5717
+ /** x402 envelope version. Defaults to `1` — consistent with this flat shape. */
5628
5718
  x402Version?: number;
5629
5719
  }): string;
5630
5720
  /**
@@ -5740,4 +5830,4 @@ declare function readExactDomain(publicClient: PublicClient, asset: string): Pro
5740
5830
  version: string;
5741
5831
  } | null>;
5742
5832
 
5743
- export { type AcceptOption, type AddressId, type AgentTool, type AlgorandToken, type AptosToken, type AssetId, type BuildExactParams, CHAINS, type Caip2, type ChainFamily, type ChainInput, type ChainName, type ChainPreset, type ChainSelector, type ConfirmInfo, ConfirmationTimeoutError, type CostEstimate, type DiscoverOptions, type DiscoveredRail, type DiscoveredResource, type DiscoverySigner, type DiscoverySource, EIP3009_TYPES, EXACT_NETWORK_SLUGS, type EvmToken, type ExactAccept, type ExactAuthorization, type ExactAuthorizationWire, type ExactPaymentPayload, type ExactRailOption, type ExpressLikeMiddleware, type ExpressLikeNext, type ExpressLikeRequest, type ExpressLikeResponse, type FacilitatorConfig, type FacilitatorPaymentRequirements, GENERATOR, HEADER_REQUIRED, HEADER_RESPONSE, HEADER_RESPONSE_V1, HEADER_SIGNATURE, HEADER_SIGNATURE_V1, InsufficientFundsError, InvalidEnvelopeError, type ManifestInput, MaxRetriesExceededError, MissingDriverError, type NearToken, NoCompatibleAcceptError, NonReplayableBodyError, type OpenApiDocument, type OpenApiOperation, type ParsedExactPayment, type PayBlocker, type PayOption, type PayWarning, PaymentDeclinedError, type PaymentDriver, type PaymentGate, type PaymentIntent, type PaymentPlan, type PaymentPolicy, type PaymentRail, PaymentTimeoutError, PipRailClient, type PipRailClientOptions, type PipRailCostQuote, PipRailError, type PipRailEvent, type PipRailQuote, type PolicyDecision, RecipientNotReadyError, type RecipientReason, type RegisterInput, type RegisterOptions, type RegisterOutcome, type RequirePaymentOptions, type ResolveOptions, type ResolvedChain, type ResolvedNetwork, type ResolvedToken, type ResourceDescription, type SearchOpenIndexesOptions, type SettleViaFacilitatorInput, SettlementError, type SolanaToken, type SpendAssetTotal, type SpendRecord, type SpendSummary, type StellarToken, type SuiToken, type TokenInfo, type TokenInput, type TonToken, type ToolAnnotations, type TronToken, UnknownTokenError, UnsupportedNetworkError, type VerifyErrorCode, type VerifyPaymentResult, type VerifyResult, type WalletBalance, type WalletHandle, type WalletInput, type WellKnownX402, WrongChainError, WrongFamilyError, type X402AcceptEntry, type X402AnyAccept, type X402Challenge, type X402DnsRecord, type X402ExactAcceptEntry, type X402InvalidBody, type X402PaymentSignature, type X402Receipt, type X402ResourceObject, type XrplToken, buildChallengeHeader, buildExactAuthorization, buildOpenApi, buildReceiptHeader, buildSignatureHeader, buildWellKnownX402, buildX402DnsTxt, chainIdForExactNetwork, createPaymentGate, eip3009Abi, encodeXPaymentHeader, evaluatePolicy, normalizeNetwork, parseChallenge, parseExactPaymentHeader, parseExactRequirements, parseReceipt, parseSignatureHeader, paymentTools, pickAccept, planAcross, readExactDomain, register402Index, registerDriver, registerX402Scan, requirePayment, resolveChain, searchOpenIndexes, settleViaFacilitator, toInsufficientFundsError, toInvalidBody };
5833
+ export { type AcceptOption, type AddressId, type AgentTool, type AlgorandToken, type AptosToken, type AssetId, type BuildExactParams, CHAINS, type Caip2, type ChainFamily, type ChainInput, type ChainName, type ChainPreset, type ChainSelector, type ConfirmInfo, ConfirmationTimeoutError, type CostEstimate, DIRECTORY_INFO, type DirectoryInfo, type DiscoverOptions, type DiscoveredRail, type DiscoveredResource, type DiscoverySigner, type DiscoverySource, EIP3009_TYPES, EXACT_NETWORK_SLUGS, type EvmToken, type ExactAccept, type ExactAuthorization, type ExactAuthorizationWire, type ExactPaymentPayload, type ExactRailOption, type ExpressLikeMiddleware, type ExpressLikeNext, type ExpressLikeRequest, type ExpressLikeResponse, type FacilitatorConfig, type FacilitatorPaymentRequirements, GENERATOR, HEADER_REQUIRED, HEADER_RESPONSE, HEADER_RESPONSE_V1, HEADER_SIGNATURE, HEADER_SIGNATURE_V1, InsufficientFundsError, InvalidEnvelopeError, type ListingVisibility, type ManifestInput, MaxRetriesExceededError, MissingDriverError, type NearToken, NoCompatibleAcceptError, NonReplayableBodyError, type OpenApiDocument, type OpenApiOperation, type ParsedExactPayment, type PayBlocker, type PayOption, type PayWarning, PaymentDeclinedError, type PaymentDriver, type PaymentGate, type PaymentIntent, type PaymentPlan, type PaymentPolicy, type PaymentRail, PaymentTimeoutError, PipRailClient, type PipRailClientOptions, type PipRailCostQuote, PipRailError, type PipRailEvent, type PipRailQuote, type PolicyDecision, RecipientNotReadyError, type RecipientReason, type RegisterInput, type RegisterOptions, type RegisterOutcome, type RequirePaymentOptions, type ResolveOptions, type ResolvedChain, type ResolvedNetwork, type ResolvedToken, type ResourceDescription, type SearchOpenIndexesOptions, type SettleViaFacilitatorInput, SettlementError, type SolanaToken, type SpendAssetTotal, type SpendRecord, type SpendSummary, type StellarToken, type SuiToken, type TokenInfo, type TokenInput, type TonToken, type ToolAnnotations, type TronToken, UnknownTokenError, UnsupportedNetworkError, type VerifyErrorCode, type VerifyPaymentResult, type VerifyResult, type WalletBalance, type WalletHandle, type WalletInput, type WellKnownX402, WrongChainError, WrongFamilyError, type X402AcceptEntry, type X402AnyAccept, type X402Challenge, type X402DnsRecord, type X402ExactAcceptEntry, type X402InvalidBody, type X402PaymentSignature, type X402Receipt, type X402ResourceObject, type XrplToken, buildChallengeHeader, buildExactAuthorization, buildOpenApi, buildReceiptHeader, buildSignatureHeader, buildWellKnownX402, buildX402DnsTxt, chainIdForExactNetwork, createPaymentGate, decorateOutcome, eip3009Abi, encodeXPaymentHeader, evaluatePolicy, getDirectoryInfo, normalizeNetwork, parseChallenge, parseExactPaymentHeader, parseExactRequirements, parseReceipt, parseSignatureHeader, paymentTools, pickAccept, planAcross, readExactDomain, register402Index, registerDriver, registerX402Scan, requirePayment, resolveChain, searchOpenIndexes, settleViaFacilitator, toInsufficientFundsError, toInvalidBody };
package/dist/index.js CHANGED
@@ -1305,6 +1305,42 @@ async function resolveNetwork2(opts) {
1305
1305
  }
1306
1306
 
1307
1307
  // src/indexes.ts
1308
+ var DIRECTORY_INFO = {
1309
+ "402index": {
1310
+ source: "402index",
1311
+ review: "probe-sync",
1312
+ auth: "none",
1313
+ chains: null,
1314
+ onSuccess: "pending-review",
1315
+ readByDiscover: true,
1316
+ caveat: "402 Index probes your URL on submit, then lists it as PENDING REVIEW \u2014 a self-registered resource is NOT in search until approved. Verify your domain on 402index.io for instant approval; otherwise it appears after manual review, so retry discover() later."
1317
+ },
1318
+ x402scan: {
1319
+ source: "x402scan",
1320
+ review: "probe-sync",
1321
+ auth: "siwx",
1322
+ chains: ["eip155:8453", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],
1323
+ onSuccess: "live",
1324
+ readByDiscover: false,
1325
+ caveat: "x402scan lists Base/Solana only, needs one wallet signature (SIWX), and requires a resolvable input schema (from /openapi.json or the bazaar extension in the 402 body). It goes live on x402scan.com immediately on success \u2014 but discover() does NOT read x402scan, so the listing won't appear in discover() results."
1326
+ },
1327
+ bazaar: {
1328
+ source: "bazaar",
1329
+ review: "settle-coupled",
1330
+ auth: "facilitator-only",
1331
+ chains: null,
1332
+ onSuccess: "not-listable",
1333
+ readByDiscover: true,
1334
+ caveat: "CDP Bazaar has no register endpoint \u2014 it catalogs a resource only when its own facilitator settles a payment. PipRail verifies locally with no facilitator, so a PipRail resource cannot be listed here (you can still READ Bazaar to find others). List on 402 Index or x402scan instead."
1335
+ }
1336
+ };
1337
+ function getDirectoryInfo(source) {
1338
+ return DIRECTORY_INFO[source];
1339
+ }
1340
+ function decorateOutcome(o) {
1341
+ const info = DIRECTORY_INFO[o.source];
1342
+ return { ...o, visibility: o.ok ? info.onSuccess : "not-listable", note: info.caveat };
1343
+ }
1308
1344
  var BAZAAR_URL = "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources";
1309
1345
  var INDEX402_SEARCH = "https://402index.io/api/v1/services";
1310
1346
  var INDEX402_REGISTER = "https://402index.io/api/v1/register";
@@ -1457,7 +1493,13 @@ async function register402Index(input) {
1457
1493
  body: JSON.stringify(payload)
1458
1494
  });
1459
1495
  if (res.ok) {
1460
- return { source: "402index", ok: true, status: res.status, detail: "Listed on 402 Index (searchable at 402index.io)." };
1496
+ const msg = await readIndexMessage(res);
1497
+ return {
1498
+ source: "402index",
1499
+ ok: true,
1500
+ status: res.status,
1501
+ detail: msg ?? "Registered on 402 Index \u2014 pending review (verify your domain on 402index.io for instant approval)."
1502
+ };
1461
1503
  }
1462
1504
  const why = await readIndexError(res);
1463
1505
  return {
@@ -1470,6 +1512,14 @@ async function register402Index(input) {
1470
1512
  return { source: "402index", ok: false, detail: errMsg(err) };
1471
1513
  }
1472
1514
  }
1515
+ async function readIndexMessage(res) {
1516
+ try {
1517
+ const body = await res.json();
1518
+ return typeof body.message === "string" && body.message.length > 0 ? body.message : void 0;
1519
+ } catch {
1520
+ return void 0;
1521
+ }
1522
+ }
1473
1523
  async function readIndexError(res) {
1474
1524
  try {
1475
1525
  const body = await res.json();
@@ -1908,9 +1958,15 @@ var PipRailClient = class {
1908
1958
  *
1909
1959
  * Nothing PipRail-hosted: these are third-party open directories. Never throws
1910
1960
  * for a read problem — an index that's down or changed simply contributes
1911
- * nothing. Honest caveat: index results are cross-scheme (mostly the
1912
- * mainstream `exact` scheme); `fetch()` pays only `onchain-proof` rails
1913
- * directly (pay `exact` resources with the experimental `drivers/evm/exact.ts`).
1961
+ * nothing. Honest caveats (see {@link DIRECTORY_INFO}):
1962
+ * - Reads **`bazaar` + `402index`** only — **NOT `x402scan`** (its reads are paid). A
1963
+ * resource you registered on x402scan is live there but will NOT appear here; don't
1964
+ * read that absence as failure. (Passing `sources:['x402scan']` explicitly yields `[]`.)
1965
+ * - A resource just listed via {@link register} may not appear yet — 402 Index reviews
1966
+ * before publishing, so retry with a brief backoff if a fresh listing is missing.
1967
+ * - Results are cross-scheme (mostly the mainstream `exact` scheme); `fetch()` pays
1968
+ * only `onchain-proof` rails directly (pay `exact` resources with the experimental
1969
+ * `drivers/evm/exact.ts`).
1914
1970
  */
1915
1971
  async discover(opts = {}) {
1916
1972
  const found = await searchOpenIndexes({
@@ -1935,12 +1991,27 @@ var PipRailClient = class {
1935
1991
  }
1936
1992
  /**
1937
1993
  * List a resource you run on the OPEN x402 registries, so agents can find it.
1938
- * Default target is **402 Index** — one POST, no auth, no signature, no payment
1939
- * (searchable within seconds). Add `'x402scan'` to also register via SIWX (one
1940
- * wallet signature; EVM + a Base/Solana rail). Returns one {@link RegisterOutcome}
1941
- * per target — a target the chain can't satisfy comes back `{ ok:false, detail }`,
1942
- * never a throw. An explicit, developer-invoked action; it moves no funds, and
1943
- * nothing is PipRail-hosted — you're listing on third-party open directories.
1994
+ * Default target is **402 Index** — one POST, no auth, no signature, no payment.
1995
+ * Add `'x402scan'` to also register via SIWX (one wallet signature; EVM + a
1996
+ * Base/Solana rail). Returns one {@link RegisterOutcome} per target — a target the
1997
+ * chain can't satisfy comes back `{ ok:false, detail }`, never a throw. An explicit,
1998
+ * developer-invoked action; it moves no funds, and nothing is PipRail-hosted —
1999
+ * you're listing on third-party open directories.
2000
+ *
2001
+ * **Listing is asynchronous — each outcome carries a `visibility` + `note` so an
2002
+ * agent knows when/where the resource is findable (don't assume `ok:true` means
2003
+ * "searchable now"):**
2004
+ * - **402 Index** → `visibility:'pending-review'`. It probes your URL on submit, then lists it
2005
+ * PENDING REVIEW — not searchable until approved (verify your domain on 402index.io for instant
2006
+ * approval), so `discover()` returns nothing for a fresh listing until then. Retry later.
2007
+ * - **x402scan** → `visibility:'live'`, but **`discover()` does NOT read x402scan** — the
2008
+ * listing is real on x402scan.com yet won't show up in `discover()`. Base/Solana only;
2009
+ * needs a resolvable input schema (`/openapi.json` or the `extensions.bazaar` block).
2010
+ * - **Bazaar** → `visibility:'not-listable'` for PipRail (it lists only what its facilitator
2011
+ * settles; PipRail uses none). You can still READ Bazaar via {@link discover} to find others.
2012
+ *
2013
+ * The per-source facts live in {@link DIRECTORY_INFO} (importable) if you'd rather branch
2014
+ * on them before calling.
1944
2015
  */
1945
2016
  async register(url, opts = {}) {
1946
2017
  const targets = opts.targets ?? ["402index"];
@@ -1979,7 +2050,7 @@ var PipRailClient = class {
1979
2050
  });
1980
2051
  }
1981
2052
  }
1982
- return outcomes;
2053
+ return outcomes.map(decorateOutcome);
1983
2054
  }
1984
2055
  /**
1985
2056
  * The discovery signer for the bound wallet (its address + a message signer),
@@ -2627,7 +2698,7 @@ function paymentTools(client) {
2627
2698
  },
2628
2699
  {
2629
2700
  name: "piprail_register",
2630
- description: "List an x402 payment-gated resource YOU run on the open indexes so other agents can discover it. Default target is 402 Index \u2014 no auth, no signature, no payment; searchable within seconds. Returns one outcome per index ({ source, ok, detail }); a step the chain can't satisfy comes back ok:false with the reason. Moves no funds; nothing is PipRail-hosted.",
2701
+ description: "List an x402 payment-gated resource YOU run on the open indexes so other agents can discover it. Default target is 402 Index \u2014 no auth, no signature, no payment; a self-registered listing is pending review (verify your domain on 402index.io for instant approval). Returns one outcome per index ({ source, ok, detail, visibility, note }); a step the chain can't satisfy comes back ok:false with the reason. Moves no funds; nothing is PipRail-hosted.",
2631
2702
  annotations: {
2632
2703
  title: "Register an x402 endpoint",
2633
2704
  readOnlyHint: false,
@@ -3161,6 +3232,7 @@ function buildX402DnsTxt(input) {
3161
3232
  export {
3162
3233
  CHAINS,
3163
3234
  ConfirmationTimeoutError,
3235
+ DIRECTORY_INFO,
3164
3236
  EIP3009_TYPES,
3165
3237
  EXACT_NETWORK_SLUGS,
3166
3238
  GENERATOR,
@@ -3194,9 +3266,11 @@ export {
3194
3266
  buildX402DnsTxt,
3195
3267
  chainIdForExactNetwork,
3196
3268
  createPaymentGate,
3269
+ decorateOutcome,
3197
3270
  eip3009Abi,
3198
3271
  encodeXPaymentHeader,
3199
3272
  evaluatePolicy,
3273
+ getDirectoryInfo,
3200
3274
  normalizeNetwork,
3201
3275
  parseChallenge,
3202
3276
  parseExactPaymentHeader,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piprail/sdk",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Accept x402 crypto payments across 29 chains — every major EVM chain plus Solana, TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar & XRPL — in a couple of lines. No backend, no database, no fee; payments settle straight to your wallet.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",