@mysten-incubation/suipay 0.2.0-dev.15 → 0.2.0-dev.17

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/dist/index.d.ts CHANGED
@@ -558,7 +558,7 @@ declare const ERRORS: {
558
558
  };
559
559
  };
560
560
  readonly 'limit.rate_limited': {
561
- readonly surfaces: readonly ["gateway", "console_server"];
561
+ readonly surfaces: readonly ["gateway", "console_server", "sdk"];
562
562
  readonly status: 429;
563
563
  readonly title: "Rate limit exceeded";
564
564
  readonly paymentState: "not_charged";
package/dist/index.js CHANGED
@@ -1145,7 +1145,7 @@ var LIMIT_CODES = {
1145
1145
  }
1146
1146
  },
1147
1147
  "limit.rate_limited": {
1148
- surfaces: ["gateway", "console_server"],
1148
+ surfaces: ["gateway", "console_server", "sdk"],
1149
1149
  status: 429,
1150
1150
  title: "Rate limit exceeded",
1151
1151
  paymentState: "not_charged",
@@ -2917,6 +2917,8 @@ var CONTEXT_ALLOWLIST = /* @__PURE__ */ new Set([
2917
2917
  "seedId",
2918
2918
  "grantId",
2919
2919
  "grantObjectId",
2920
+ "policyId",
2921
+ "onChainPolicyId",
2920
2922
  "sameGrantObjectId",
2921
2923
  "verifiedGrant",
2922
2924
  "poolObjectId",
@@ -10787,7 +10789,9 @@ async function resolvePayerSession(options) {
10787
10789
  ok: false,
10788
10790
  // The gateway's stable code, never a raw body — the read client already
10789
10791
  // sanitized it, and an operator needs to tell 429 from 401.
10790
- error: manifestError(MANIFEST_ERROR_CODES.MALFORMED_MANIFEST, `bootstrap was refused (${bootstrap.error}${bootstrap.code ? `: ${bootstrap.code}` : ""})`)
10792
+ // A 429 is the gateway's rate limit, not a manifest the agent can fix, so
10793
+ // it keeps the retryable code instead of the manifest default.
10794
+ error: manifestError(MANIFEST_ERROR_CODES.MALFORMED_MANIFEST, `bootstrap was refused (${bootstrap.error}${bootstrap.code ? `: ${bootstrap.code}` : ""})`, bootstrap.status === 429 ? "limit.rate_limited" : void 0)
10791
10795
  };
10792
10796
  }
10793
10797
  const whole = manifestToSession({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten-incubation/suipay",
3
- "version": "0.2.0-dev.15",
3
+ "version": "0.2.0-dev.17",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "SuiPay embeddable client — quote and pay a 402 from a spend-account grant.",