@piprail/sdk 2.14.0 → 2.14.1
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 +39 -0
- package/dist/{algorand-QU6G2DQZ.cjs → algorand-ICJNXO5V.cjs} +32 -32
- package/dist/{algorand-6J3IABVF.js → algorand-RM7MP4PK.js} +1 -1
- package/dist/{aptos-DHOMTBLZ.js → aptos-2FIRTMQX.js} +1 -1
- package/dist/{aptos-LFTQGBBK.cjs → aptos-MVEG5ZPS.cjs} +31 -31
- package/dist/{chunk-GYM46G5L.cjs → chunk-57V5DNJT.cjs} +30 -20
- package/dist/{chunk-PAMKCWVW.js → chunk-NUPCFNC5.js} +12 -2
- package/dist/index.cjs +178 -167
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +30 -19
- package/dist/{near-YNNK7RW7.cjs → near-C2IS4RCH.cjs} +27 -27
- package/dist/{near-5PXTVQ47.js → near-L2OWD7M6.js} +1 -1
- package/dist/{solana-N3UCNCYE.cjs → solana-B424IQ5I.cjs} +32 -32
- package/dist/{solana-HITVI3HF.js → solana-V2TGLHJ4.js} +1 -1
- package/dist/{stellar-Y3SQN7S5.cjs → stellar-4YR4UZQX.cjs} +20 -20
- package/dist/{stellar-2QT6YYKN.js → stellar-J7VE7QP7.js} +1 -1
- package/dist/{sui-4AL4E6XU.cjs → sui-F7UW6JXJ.cjs} +16 -16
- package/dist/{sui-FV5L6WF5.js → sui-GMRQAAJH.js} +1 -1
- package/dist/{ton-5HDVOTMR.cjs → ton-3SHFVDLP.cjs} +16 -16
- package/dist/{ton-5FWDQ4QR.js → ton-PEBYBNWJ.js} +1 -1
- package/dist/{tron-TX2B4N2A.cjs → tron-BS5EID2U.cjs} +25 -25
- package/dist/{tron-AZDY7BMQ.js → tron-ZYJHHROT.js} +1 -1
- package/dist/{xrpl-UJL5J7CY.js → xrpl-P2D6TS6I.js} +1 -1
- package/dist/{xrpl-5TYDLQFS.cjs → xrpl-SUEFOOKW.cjs} +20 -20
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,45 @@ 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
|
+
## [2.14.1] — 2026-06-24 — robustness & typed-error polish from a live-artifact break-it pass
|
|
8
|
+
|
|
9
|
+
A small, fully-additive patch. After 2.14.0 shipped, the published npm artifact was put through an
|
|
10
|
+
adversarial **break-it** pass from the examples (10 new suites, ~1,000+ assertions, run against the
|
|
11
|
+
real `npm i @piprail/sdk` — not the workspace build; see
|
|
12
|
+
`examples/basics/x402-parity-sandbox/FINDINGS.md`). Every security-critical and happy-path property
|
|
13
|
+
held; this release tightens the robustness/contract edges it surfaced. **No default changes, no
|
|
14
|
+
settled-payment outcome changes** — safe to bump.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`classifyChallenge` / `describeChallenge` now honour their documented "never throws" contract.**
|
|
19
|
+
A nullish or shapeless challenge (a *foreign* 402 reaching the self-describe / landing-page path)
|
|
20
|
+
previously threw a raw `TypeError` instead of degrading to a verdict / generic pointer. Both now
|
|
21
|
+
guard `accepts` and degrade gracefully. (F-A1/F-A2)
|
|
22
|
+
- **A scientific-notation `amount` is rejected, not silently 1000×'d.** `createPaymentGate({ amount:
|
|
23
|
+
'1e3' })` used to be read as **1000 tokens**; `parseUnits` no longer expands scientific notation
|
|
24
|
+
for merchant amounts (`floorUnits` still does, for RPC dust reads) and throws on it. (F-B1)
|
|
25
|
+
- **Typed config errors (ERRORS.md §5).** A new **`InvalidConfigError`** (`code: 'INVALID_CONFIG'`)
|
|
26
|
+
replaces the raw `viem`/`TypeError`s thrown for an invalid `amount` (non-string or non-decimal), a
|
|
27
|
+
missing `payTo`, or a non-array `resources` in `buildWellKnownX402Manifest`. (F-C1/F-C2)
|
|
28
|
+
- **`buildWellKnownX402Manifest` no longer passes a non-finite `lastUpdated` through** to serialize
|
|
29
|
+
as JSON `null` — a `NaN`/`Infinity` falls back to now. (F-D4)
|
|
30
|
+
- **`DIRECTORY_INFO` is now `Object.freeze`'d** at runtime, matching its `Readonly<>` type. (F-D2)
|
|
31
|
+
- **The `exports` map now exposes `./package.json`**, so `require('@piprail/sdk/package.json')` (used
|
|
32
|
+
by version-introspection tooling) no longer throws `ERR_PACKAGE_PATH_NOT_EXPORTED`. (F-D3)
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- **`InvalidConfigError`** — exported typed error for invalid merchant gate/manifest config.
|
|
37
|
+
|
|
38
|
+
### Notes (verified by-design, not changed)
|
|
39
|
+
|
|
40
|
+
- `client.estimateCost(url)` still **throws `NoCompatibleAcceptError`** when the client can't pay any
|
|
41
|
+
offered rail — a deliberate "this 402 isn't for you" signal (it returns `null` only for a non-402
|
|
42
|
+
or a malformed envelope). Docs clarified. (F-A3)
|
|
43
|
+
- TON's native gas symbol is **`GRAM`** (the ticker after TON's 2026-06-15 governance rebrand), not a
|
|
44
|
+
bug. (F-D1)
|
|
45
|
+
|
|
7
46
|
## [2.14.0] — 2026-06-23 — x402-over-MCP transport, payment-identifier idempotency, the `.well-known/x402.json` manifest — and a deep three-pass security hardening of every chain
|
|
8
47
|
|
|
9
48
|
A feature **and** hardening release. It adds the third official x402 transport, an opt-in
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk57V5DNJTcjs = require('./chunk-57V5DNJT.cjs');
|
|
14
14
|
|
|
15
15
|
// src/drivers/algorand/index.ts
|
|
16
16
|
var _algosdk = require('algosdk'); var _algosdk2 = _interopRequireDefault(_algosdk);
|
|
@@ -58,13 +58,13 @@ async function payAlgorand(params) {
|
|
|
58
58
|
} catch (err) {
|
|
59
59
|
const mapped = mapAlgorandError(err, accept.payTo);
|
|
60
60
|
if (mapped) throw mapped;
|
|
61
|
-
throw _nullishCoalesce(
|
|
61
|
+
throw _nullishCoalesce(_chunk57V5DNJTcjs.toInsufficientFundsError.call(void 0, err), () => ( err));
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
function mapAlgorandError(err, payTo) {
|
|
65
65
|
const m = err instanceof Error ? err.message : String(err);
|
|
66
66
|
if (/must optin/i.test(m) || /missing from/i.test(m) && m.includes(payTo)) {
|
|
67
|
-
return new (0,
|
|
67
|
+
return new (0, _chunk57V5DNJTcjs.RecipientNotReadyError)(
|
|
68
68
|
`Algorand recipient ${payTo} hasn't opted into this asset \u2014 it must opt in (a 0-amount asset transfer to itself) before it can receive. (Algorand: ${firstLine(m)})`,
|
|
69
69
|
{ cause: err }
|
|
70
70
|
);
|
|
@@ -72,7 +72,7 @@ function mapAlgorandError(err, payTo) {
|
|
|
72
72
|
if (/overspend|below min|min(imum)? balance|tried to spend|balance \d+ below|asset \d+ missing from|insufficient|underflow/i.test(
|
|
73
73
|
m
|
|
74
74
|
)) {
|
|
75
|
-
return new (0,
|
|
75
|
+
return new (0, _chunk57V5DNJTcjs.InsufficientFundsError)(
|
|
76
76
|
`Algorand payment failed: the sender can't cover it \u2014 token balance, ALGO for fees, the 0.1-ALGO minimum balance, or a missing asset opt-in on the sender. (Algorand: ${firstLine(m)})`,
|
|
77
77
|
{ cause: err }
|
|
78
78
|
);
|
|
@@ -99,33 +99,33 @@ function isSet(addr) {
|
|
|
99
99
|
function randomNote() {
|
|
100
100
|
const g = globalThis.crypto;
|
|
101
101
|
if (!_optionalChain([g, 'optionalAccess', _ => _.getRandomValues])) {
|
|
102
|
-
throw new (0,
|
|
102
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)("Algorand exact: no Web Crypto CSPRNG available to generate a unique note.");
|
|
103
103
|
}
|
|
104
104
|
return g.getRandomValues(new Uint8Array(32));
|
|
105
105
|
}
|
|
106
106
|
async function payExactAlgorand(input) {
|
|
107
107
|
const { suggestedParams, sk, sender, accept } = input;
|
|
108
108
|
if (accept.asset === "native") {
|
|
109
|
-
throw new (0,
|
|
109
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(
|
|
110
110
|
"Algorand exact is ASA-only (an asset transfer); native ALGO is not exact-payable. Pay via onchain-proof."
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
113
|
const feePayer = accept.extra.feePayer;
|
|
114
114
|
if (!feePayer) {
|
|
115
|
-
throw new (0,
|
|
115
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)("Algorand exact rail must advertise extra.feePayer (the fee sponsor address).");
|
|
116
116
|
}
|
|
117
117
|
const assetId = parseAlgorandAssetId(accept.asset);
|
|
118
118
|
if (assetId === null) {
|
|
119
|
-
throw new (0,
|
|
119
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(`Algorand exact rail asset "${accept.asset}" must be a numeric ASA id.`);
|
|
120
120
|
}
|
|
121
121
|
if (!_algosdk2.default.isValidAddress(feePayer)) {
|
|
122
|
-
throw new (0,
|
|
122
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(`Algorand exact: extra.feePayer "${feePayer}" is not a valid Algorand address.`);
|
|
123
123
|
}
|
|
124
124
|
if (!_algosdk2.default.isValidAddress(accept.payTo)) {
|
|
125
|
-
throw new (0,
|
|
125
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(`Algorand exact: payTo "${accept.payTo}" is not a valid Algorand address.`);
|
|
126
126
|
}
|
|
127
127
|
if (feePayer === sender) {
|
|
128
|
-
throw new (0,
|
|
128
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(
|
|
129
129
|
"Algorand exact: the fee payer must differ from the payer \u2014 the buyer must pay ZERO ALGO (the sponsor pays the pooled fee)."
|
|
130
130
|
);
|
|
131
131
|
}
|
|
@@ -172,13 +172,13 @@ function decodeElement(bytes) {
|
|
|
172
172
|
async function verifyAndSettleExactAlgorand(input) {
|
|
173
173
|
const { client, feePayerSk, feePayerAddr, payload, accept } = input;
|
|
174
174
|
const railFeePayer = accept.extra.feePayer;
|
|
175
|
-
if (!railFeePayer) throw new (0,
|
|
175
|
+
if (!railFeePayer) throw new (0, _chunk57V5DNJTcjs.SettlementError)("Algorand exact: rail is missing extra.feePayer.");
|
|
176
176
|
if (railFeePayer !== feePayerAddr) {
|
|
177
|
-
throw new (0,
|
|
177
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)("Algorand exact: the gate relayer address does not match the rail extra.feePayer \u2014 misconfigured rail.");
|
|
178
178
|
}
|
|
179
179
|
const assetId = parseAlgorandAssetId(accept.asset);
|
|
180
|
-
if (assetId === null) throw new (0,
|
|
181
|
-
if (!_algosdk2.default.isValidAddress(accept.payTo)) throw new (0,
|
|
180
|
+
if (assetId === null) throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Algorand exact: rail asset "${accept.asset}" is not a numeric ASA id.`);
|
|
181
|
+
if (!_algosdk2.default.isValidAddress(accept.payTo)) throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Algorand exact: rail payTo "${accept.payTo}" is invalid.`);
|
|
182
182
|
const { paymentIndex, paymentGroup } = payload;
|
|
183
183
|
if (paymentGroup.length !== GROUP_SIZE) {
|
|
184
184
|
return fail("signature_invalid", `Algorand exact expects a ${GROUP_SIZE}-transaction group (payment + fee), got ${paymentGroup.length}.`);
|
|
@@ -244,7 +244,7 @@ async function verifyAndSettleExactAlgorand(input) {
|
|
|
244
244
|
try {
|
|
245
245
|
feeSigned = fee.signTxn(feePayerSk);
|
|
246
246
|
} catch (err) {
|
|
247
|
-
throw new (0,
|
|
247
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Algorand exact settle: the gate could not sign the fee transaction (${shorten(err instanceof Error ? err.message : String(err))}).`, { cause: err });
|
|
248
248
|
}
|
|
249
249
|
const signedGroup = elements.map((el, i) => i === paymentIndex ? payElement.raw : feeSigned);
|
|
250
250
|
try {
|
|
@@ -266,7 +266,7 @@ async function verifyAndSettleExactAlgorand(input) {
|
|
|
266
266
|
if (/signature|sig|auth|malformed/i.test(m)) return fail("signature_invalid", `Settle rejected \u2014 bad signature: ${shorten(m)}.`);
|
|
267
267
|
if (/already in ledger|already committed|duplicate/i.test(m)) return fail("tx_already_used", `This payment was already settled: ${shorten(m)}.`);
|
|
268
268
|
if (/\bround\b|expired|lifetime|stale|validity/i.test(m)) return fail("payment_expired", `Settle rejected \u2014 validity window expired: ${shorten(m)}.`);
|
|
269
|
-
throw new (0,
|
|
269
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(
|
|
270
270
|
`Algorand exact settle: the group failed to submit (${shorten(m)}). The buyer's signed transaction is still valid \u2014 fund/fix the fee payer (${railFeePayer}) and the buyer can re-present it.`,
|
|
271
271
|
{ cause: err }
|
|
272
272
|
);
|
|
@@ -275,10 +275,10 @@ async function verifyAndSettleExactAlgorand(input) {
|
|
|
275
275
|
try {
|
|
276
276
|
round = await client.waitForConfirmation(buyerTxid);
|
|
277
277
|
} catch (err) {
|
|
278
|
-
throw new (0,
|
|
278
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Algorand exact settle: submitted ${buyerTxid} but confirmation read failed (${shorten(err instanceof Error ? err.message : String(err))}). It likely landed \u2014 re-verify before re-presenting; do NOT re-pay.`, { cause: err });
|
|
279
279
|
}
|
|
280
280
|
if (round === null) {
|
|
281
|
-
throw new (0,
|
|
281
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Algorand exact settle: submitted ${buyerTxid} but it did not confirm in time. It likely landed \u2014 re-verify before re-presenting; do NOT re-pay.`);
|
|
282
282
|
}
|
|
283
283
|
return {
|
|
284
284
|
ok: true,
|
|
@@ -374,13 +374,13 @@ function rpcFailed(nonce) {
|
|
|
374
374
|
|
|
375
375
|
function assertAlgorandWallet(wallet, network) {
|
|
376
376
|
if (typeof wallet !== "object" || wallet === null) {
|
|
377
|
-
throw new (0,
|
|
377
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
378
378
|
`chain ${network} is Algorand; wallet must be { key } (25-word mnemonic) or { account }.`
|
|
379
379
|
);
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
_chunk57V5DNJTcjs.assertNoLegacyWalletKey.call(void 0, wallet, "Algorand");
|
|
382
382
|
if (!("key" in wallet) && !("account" in wallet)) {
|
|
383
|
-
throw new (0,
|
|
383
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
384
384
|
`chain ${network} is Algorand; wallet must be { key } (25-word mnemonic) or { account }.`
|
|
385
385
|
);
|
|
386
386
|
}
|
|
@@ -395,13 +395,13 @@ function resolveAlgorandWallet(config) {
|
|
|
395
395
|
const { addr, sk } = _algosdk2.default.mnemonicToSecretKey(config.key);
|
|
396
396
|
return { addr: addr.toString(), sk };
|
|
397
397
|
} catch (cause) {
|
|
398
|
-
throw new (0,
|
|
398
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
399
399
|
"Algorand wallet { key } is not a valid 25-word Algorand mnemonic.",
|
|
400
400
|
{ cause }
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
throw new (0,
|
|
404
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)("Algorand wallet needs { key } (25-word mnemonic) or { account }.");
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
// src/drivers/algorand/index.ts
|
|
@@ -472,16 +472,16 @@ function makeAlgorandNetwork(preset, algodUrl) {
|
|
|
472
472
|
const info = preset.tokens[token.toUpperCase()];
|
|
473
473
|
if (!info) {
|
|
474
474
|
const known = Object.keys(preset.tokens).join(", ") || "(none built in)";
|
|
475
|
-
throw new (0,
|
|
475
|
+
throw new (0, _chunk57V5DNJTcjs.UnknownTokenError)(
|
|
476
476
|
`token "${token}" isn't built in for Algorand (known: ${known}). Pass { assetId, decimals } for a custom ASA, or use 'native'.`
|
|
477
477
|
);
|
|
478
478
|
}
|
|
479
479
|
return { asset: algorandAssetId(info.assetId), decimals: info.decimals, symbol: info.symbol };
|
|
480
480
|
}
|
|
481
|
-
|
|
481
|
+
_chunk57V5DNJTcjs.rejectForeignToken.call(void 0, token, "algorand", network);
|
|
482
482
|
const t = token;
|
|
483
483
|
if (typeof t.assetId !== "number" || typeof t.decimals !== "number") {
|
|
484
|
-
throw new (0,
|
|
484
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
485
485
|
`chain ${network} is Algorand; a custom token must be { assetId, decimals }.`
|
|
486
486
|
);
|
|
487
487
|
}
|
|
@@ -502,12 +502,12 @@ function makeAlgorandNetwork(preset, algodUrl) {
|
|
|
502
502
|
},
|
|
503
503
|
assertValidPayTo(payTo) {
|
|
504
504
|
if (payTo.startsWith("0x")) {
|
|
505
|
-
throw new (0,
|
|
505
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
506
506
|
`chain ${network} is Algorand, but payTo "${payTo}" looks like an EVM address.`
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
509
|
if (!_algosdk2.default.isValidAddress(payTo)) {
|
|
510
|
-
throw new (0,
|
|
510
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
511
511
|
`chain ${network} is Algorand, but payTo "${payTo}" is not a valid Algorand address.`
|
|
512
512
|
);
|
|
513
513
|
}
|
|
@@ -524,14 +524,14 @@ function makeAlgorandNetwork(preset, algodUrl) {
|
|
|
524
524
|
const info = await _algosdk2.default.waitForConfirmation(algod, ref, 10);
|
|
525
525
|
return { height: String(_nullishCoalesce(info.confirmedRound, () => ( 0))) };
|
|
526
526
|
} catch (err) {
|
|
527
|
-
throw new (0,
|
|
527
|
+
throw new (0, _chunk57V5DNJTcjs.ConfirmationTimeoutError)(`Algorand tx ${ref} did not confirm in time.`, {
|
|
528
528
|
cause: err
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
},
|
|
532
532
|
async estimateCost(accept) {
|
|
533
533
|
if (accept.scheme === "exact") {
|
|
534
|
-
return
|
|
534
|
+
return _chunk57V5DNJTcjs.nativeCost.call(void 0, {
|
|
535
535
|
symbol: ALGO_SYMBOL,
|
|
536
536
|
decimals: ALGO_DECIMALS,
|
|
537
537
|
fee: 0n,
|
|
@@ -539,7 +539,7 @@ function makeAlgorandNetwork(preset, algodUrl) {
|
|
|
539
539
|
detail: "gasless \u2014 the fee payer (facilitator/relayer) pools the group fee; the buyer pays 0 ALGO"
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
return
|
|
542
|
+
return _chunk57V5DNJTcjs.nativeCost.call(void 0, {
|
|
543
543
|
symbol: ALGO_SYMBOL,
|
|
544
544
|
decimals: ALGO_DECIMALS,
|
|
545
545
|
fee: 1000n,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
nativeCost,
|
|
10
10
|
rejectForeignToken,
|
|
11
11
|
toInsufficientFundsError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NUPCFNC5.js";
|
|
13
13
|
|
|
14
14
|
// src/drivers/aptos/index.ts
|
|
15
15
|
import { Aptos, AptosConfig, Network, AccountAddress as AccountAddress2 } from "@aptos-labs/ts-sdk";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk57V5DNJTcjs = require('./chunk-57V5DNJT.cjs');
|
|
13
13
|
|
|
14
14
|
// src/drivers/aptos/index.ts
|
|
15
15
|
var _tssdk = require('@aptos-labs/ts-sdk');
|
|
@@ -58,14 +58,14 @@ async function payAptos(params) {
|
|
|
58
58
|
const res = await client.signSubmit({ signer, transaction });
|
|
59
59
|
return res.hash;
|
|
60
60
|
} catch (err) {
|
|
61
|
-
if (err instanceof
|
|
61
|
+
if (err instanceof _chunk57V5DNJTcjs.InsufficientFundsError) throw err;
|
|
62
62
|
if (isAptosAffordability(err)) {
|
|
63
|
-
throw new (0,
|
|
63
|
+
throw new (0, _chunk57V5DNJTcjs.InsufficientFundsError)(
|
|
64
64
|
err instanceof Error ? err.message : "Insufficient APT/token balance for the payment.",
|
|
65
65
|
{ cause: err }
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
|
-
throw _nullishCoalesce(
|
|
68
|
+
throw _nullishCoalesce(_chunk57V5DNJTcjs.toInsufficientFundsError.call(void 0, err), () => ( err));
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
function isAptosAffordability(err) {
|
|
@@ -103,24 +103,24 @@ function parseAddr(addr) {
|
|
|
103
103
|
async function payExactAptos(input) {
|
|
104
104
|
const { client, sender, accept } = input;
|
|
105
105
|
if (accept.asset === "native") {
|
|
106
|
-
throw new (0,
|
|
106
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(
|
|
107
107
|
"Aptos exact is Fungible-Asset only (a primary_fungible_store transfer); native APT is not exact-payable. Pay via onchain-proof."
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
const feePayer = accept.extra.feePayer;
|
|
111
111
|
if (!feePayer) {
|
|
112
|
-
throw new (0,
|
|
112
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)("Aptos exact rail must advertise extra.feePayer (the gas sponsor address).");
|
|
113
113
|
}
|
|
114
114
|
const feePayerAddr = parseAddr(feePayer);
|
|
115
|
-
if (!feePayerAddr) throw new (0,
|
|
115
|
+
if (!feePayerAddr) throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(`Aptos exact: extra.feePayer "${feePayer}" is not a valid Aptos address.`);
|
|
116
116
|
const payToAddr = parseAddr(accept.payTo);
|
|
117
|
-
if (!payToAddr) throw new (0,
|
|
117
|
+
if (!payToAddr) throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(`Aptos exact: payTo "${accept.payTo}" is not a valid Aptos address.`);
|
|
118
118
|
const metadataAddr = parseAddr(accept.asset);
|
|
119
|
-
if (!metadataAddr) throw new (0,
|
|
119
|
+
if (!metadataAddr) throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(`Aptos exact: asset "${accept.asset}" is not a valid FA metadata address.`);
|
|
120
120
|
const senderAddr = parseAddr(sender);
|
|
121
|
-
if (!senderAddr) throw new (0,
|
|
121
|
+
if (!senderAddr) throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(`Aptos exact: payer "${sender}" is not a valid Aptos address.`);
|
|
122
122
|
if (feePayerAddr.equals(senderAddr)) {
|
|
123
|
-
throw new (0,
|
|
123
|
+
throw new (0, _chunk57V5DNJTcjs.UnsupportedSchemeError)(
|
|
124
124
|
"Aptos exact: the fee payer must differ from the payer \u2014 the buyer must pay ZERO APT (the sponsor pays gas)."
|
|
125
125
|
);
|
|
126
126
|
}
|
|
@@ -158,16 +158,16 @@ function argBytes(arg) {
|
|
|
158
158
|
async function verifyAndSettleExactAptos(input) {
|
|
159
159
|
const { client, feePayerAddr, payload, accept } = input;
|
|
160
160
|
const railFeePayer = accept.extra.feePayer;
|
|
161
|
-
if (!railFeePayer) throw new (0,
|
|
161
|
+
if (!railFeePayer) throw new (0, _chunk57V5DNJTcjs.SettlementError)("Aptos exact: rail is missing extra.feePayer.");
|
|
162
162
|
if (railFeePayer !== feePayerAddr) {
|
|
163
|
-
throw new (0,
|
|
163
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)("Aptos exact: the gate relayer address does not match the rail extra.feePayer \u2014 misconfigured rail.");
|
|
164
164
|
}
|
|
165
|
-
if (accept.asset === "native") throw new (0,
|
|
165
|
+
if (accept.asset === "native") throw new (0, _chunk57V5DNJTcjs.SettlementError)("Aptos exact: native APT is not exact-payable (misconfigured rail).");
|
|
166
166
|
const railFeePayerAddr = parseAddr(railFeePayer);
|
|
167
167
|
const railPayTo = parseAddr(accept.payTo);
|
|
168
168
|
const railMetadata = parseAddr(accept.asset);
|
|
169
169
|
if (!railFeePayerAddr || !railPayTo || !railMetadata) {
|
|
170
|
-
throw new (0,
|
|
170
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)("Aptos exact: rail feePayer/payTo/asset is not a valid Aptos address (misconfigured rail).");
|
|
171
171
|
}
|
|
172
172
|
let tx;
|
|
173
173
|
let senderAuth;
|
|
@@ -241,7 +241,7 @@ async function verifyAndSettleExactAptos(input) {
|
|
|
241
241
|
try {
|
|
242
242
|
feePayerAuth = client.signAsFeePayer({ transaction: tx });
|
|
243
243
|
} catch (err) {
|
|
244
|
-
throw new (0,
|
|
244
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Aptos exact settle: the gate could not sign as fee payer (${shorten(err instanceof Error ? err.message : String(err))}).`, { cause: err });
|
|
245
245
|
}
|
|
246
246
|
if (senderAuth instanceof _tssdk.AccountAuthenticatorEd25519) {
|
|
247
247
|
try {
|
|
@@ -264,7 +264,7 @@ async function verifyAndSettleExactAptos(input) {
|
|
|
264
264
|
if (/signature|invalid.*auth|INVALID_SIGNATURE/i.test(m)) return fail("signature_invalid", `Settle rejected \u2014 bad signature: ${shorten(m)}.`);
|
|
265
265
|
if (/SEQUENCE_NUMBER_TOO_OLD|already.*(committed|ledger)|duplicate/i.test(m)) return fail("tx_already_used", `This payment was already settled: ${shorten(m)}.`);
|
|
266
266
|
if (/EXPIRED|expired|TOO_NEW/i.test(m)) return fail("payment_expired", `Settle rejected \u2014 expired/stale: ${shorten(m)}.`);
|
|
267
|
-
throw new (0,
|
|
267
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(
|
|
268
268
|
`Aptos exact settle: the transaction failed to submit (${shorten(m)}). The buyer's signed transaction is still valid \u2014 fund/fix the fee payer (${railFeePayer}) and the buyer can re-present it.`,
|
|
269
269
|
{ cause: err }
|
|
270
270
|
);
|
|
@@ -273,10 +273,10 @@ async function verifyAndSettleExactAptos(input) {
|
|
|
273
273
|
try {
|
|
274
274
|
confirmed = await client.waitForConfirmation(hash);
|
|
275
275
|
} catch (err) {
|
|
276
|
-
throw new (0,
|
|
276
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Aptos exact settle: submitted ${hash} but confirmation read failed (${shorten(err instanceof Error ? err.message : String(err))}). It likely landed \u2014 re-verify before re-presenting; do NOT re-pay.`, { cause: err });
|
|
277
277
|
}
|
|
278
278
|
if (confirmed === null) {
|
|
279
|
-
throw new (0,
|
|
279
|
+
throw new (0, _chunk57V5DNJTcjs.SettlementError)(`Aptos exact settle: submitted ${hash} but it did not confirm in time. It likely landed \u2014 re-verify before re-presenting; do NOT re-pay.`);
|
|
280
280
|
}
|
|
281
281
|
if (!confirmed.success) {
|
|
282
282
|
return fail("tx_reverted", `Settle tx ${hash} reverted on-chain (a post-simulate race).`);
|
|
@@ -372,13 +372,13 @@ function txNotFound(hash) {
|
|
|
372
372
|
|
|
373
373
|
function assertAptosWallet(wallet, network) {
|
|
374
374
|
if (typeof wallet !== "object" || wallet === null) {
|
|
375
|
-
throw new (0,
|
|
375
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
376
376
|
`chain ${network} is Aptos; wallet must be { key } (ed25519-priv-0x\u2026) or { account }.`
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
|
-
|
|
379
|
+
_chunk57V5DNJTcjs.assertNoLegacyWalletKey.call(void 0, wallet, "Aptos");
|
|
380
380
|
if (!("key" in wallet) && !("account" in wallet)) {
|
|
381
|
-
throw new (0,
|
|
381
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
382
382
|
`chain ${network} is Aptos; wallet must be { key } (ed25519-priv-0x\u2026) or { account }.`
|
|
383
383
|
);
|
|
384
384
|
}
|
|
@@ -390,13 +390,13 @@ function resolveAptosAccount(config) {
|
|
|
390
390
|
try {
|
|
391
391
|
return _tssdk.Account.fromPrivateKey({ privateKey: new (0, _tssdk.Ed25519PrivateKey)(config.key) });
|
|
392
392
|
} catch (cause) {
|
|
393
|
-
throw new (0,
|
|
393
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
394
394
|
"Aptos wallet { key } is not a valid ed25519 secret (ed25519-priv-0x\u2026 or 0x\u2026 hex).",
|
|
395
395
|
{ cause }
|
|
396
396
|
);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
throw new (0,
|
|
399
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)("Aptos wallet needs { key } (ed25519-priv-0x\u2026) or { account }.");
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
// src/drivers/aptos/index.ts
|
|
@@ -468,16 +468,16 @@ function makeAptosNetwork(preset, rpcUrl) {
|
|
|
468
468
|
const info = preset.tokens[token.toUpperCase()];
|
|
469
469
|
if (!info) {
|
|
470
470
|
const known = Object.keys(preset.tokens).join(", ") || "(none built in)";
|
|
471
|
-
throw new (0,
|
|
471
|
+
throw new (0, _chunk57V5DNJTcjs.UnknownTokenError)(
|
|
472
472
|
`token "${token}" isn't built in for Aptos (known: ${known}). Pass { metadata, decimals } for a custom Fungible Asset, or use 'native'.`
|
|
473
473
|
);
|
|
474
474
|
}
|
|
475
475
|
return { asset: info.metadata, decimals: info.decimals, symbol: info.symbol };
|
|
476
476
|
}
|
|
477
|
-
|
|
477
|
+
_chunk57V5DNJTcjs.rejectForeignToken.call(void 0, token, "aptos", network);
|
|
478
478
|
const t = token;
|
|
479
479
|
if (!t.metadata || typeof t.decimals !== "number") {
|
|
480
|
-
throw new (0,
|
|
480
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
481
481
|
`chain ${network} is Aptos; a custom token must be { metadata, decimals }.`
|
|
482
482
|
);
|
|
483
483
|
}
|
|
@@ -504,7 +504,7 @@ function makeAptosNetwork(preset, rpcUrl) {
|
|
|
504
504
|
valid = false;
|
|
505
505
|
}
|
|
506
506
|
if (!valid || evmLike) {
|
|
507
|
-
throw new (0,
|
|
507
|
+
throw new (0, _chunk57V5DNJTcjs.WrongFamilyError)(
|
|
508
508
|
`chain ${network} is Aptos, but payTo "${payTo}" is not a valid Aptos address (0x + 32 bytes).`
|
|
509
509
|
);
|
|
510
510
|
}
|
|
@@ -526,12 +526,12 @@ function makeAptosNetwork(preset, rpcUrl) {
|
|
|
526
526
|
const tx = await aptos.waitForTransaction({ transactionHash: ref });
|
|
527
527
|
return { height: String(_nullishCoalesce(tx.version, () => ( "0"))) };
|
|
528
528
|
} catch (err) {
|
|
529
|
-
throw new (0,
|
|
529
|
+
throw new (0, _chunk57V5DNJTcjs.ConfirmationTimeoutError)(`Aptos tx ${ref} did not finalize in time.`, { cause: err });
|
|
530
530
|
}
|
|
531
531
|
},
|
|
532
532
|
async estimateCost(accept) {
|
|
533
533
|
if (accept.scheme === "exact") {
|
|
534
|
-
return
|
|
534
|
+
return _chunk57V5DNJTcjs.nativeCost.call(void 0, {
|
|
535
535
|
symbol: APT_SYMBOL,
|
|
536
536
|
decimals: APT_DECIMALS,
|
|
537
537
|
fee: 0n,
|
|
@@ -539,7 +539,7 @@ function makeAptosNetwork(preset, rpcUrl) {
|
|
|
539
539
|
detail: "gasless \u2014 the fee payer (facilitator/relayer) sponsors gas; the buyer pays 0 APT"
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
return
|
|
542
|
+
return _chunk57V5DNJTcjs.nativeCost.call(void 0, {
|
|
543
543
|
symbol: APT_SYMBOL,
|
|
544
544
|
decimals: APT_DECIMALS,
|
|
545
545
|
fee: 100000n,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16; var _class17;// src/errors.ts
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16; var _class17; var _class18;// src/errors.ts
|
|
2
2
|
var PipRailError = class extends Error {
|
|
3
3
|
constructor(message, options) {
|
|
4
4
|
super(message, options);
|
|
@@ -71,30 +71,33 @@ var SettlementError = (_class8 = class extends PipRailError {constructor(...args
|
|
|
71
71
|
var InvalidEnvelopeError = (_class9 = class extends PipRailError {constructor(...args6) { super(...args6); _class9.prototype.__init9.call(this); }
|
|
72
72
|
__init9() {this.code = "INVALID_ENVELOPE"}
|
|
73
73
|
}, _class9);
|
|
74
|
-
var
|
|
75
|
-
__init10() {this.code = "
|
|
74
|
+
var InvalidConfigError = (_class10 = class extends PipRailError {constructor(...args7) { super(...args7); _class10.prototype.__init10.call(this); }
|
|
75
|
+
__init10() {this.code = "INVALID_CONFIG"}
|
|
76
76
|
}, _class10);
|
|
77
|
-
var
|
|
78
|
-
__init11() {this.code = "
|
|
77
|
+
var NoCompatibleAcceptError = (_class11 = class extends PipRailError {constructor(...args8) { super(...args8); _class11.prototype.__init11.call(this); }
|
|
78
|
+
__init11() {this.code = "NO_COMPATIBLE_ACCEPT"}
|
|
79
79
|
}, _class11);
|
|
80
|
-
var
|
|
81
|
-
__init12() {this.code = "
|
|
80
|
+
var UnsupportedSchemeError = (_class12 = class extends PipRailError {constructor(...args9) { super(...args9); _class12.prototype.__init12.call(this); }
|
|
81
|
+
__init12() {this.code = "UNSUPPORTED_SCHEME"}
|
|
82
82
|
}, _class12);
|
|
83
|
-
var
|
|
84
|
-
__init13() {this.code = "
|
|
83
|
+
var NonReplayableBodyError = (_class13 = class extends PipRailError {constructor(...args10) { super(...args10); _class13.prototype.__init13.call(this); }
|
|
84
|
+
__init13() {this.code = "NON_REPLAYABLE_BODY"}
|
|
85
85
|
}, _class13);
|
|
86
|
-
var
|
|
87
|
-
__init14() {this.code = "
|
|
86
|
+
var WalletRequiredError = (_class14 = class extends PipRailError {constructor(...args11) { super(...args11); _class14.prototype.__init14.call(this); }
|
|
87
|
+
__init14() {this.code = "WALLET_REQUIRED"}
|
|
88
88
|
}, _class14);
|
|
89
|
-
var
|
|
90
|
-
__init15() {this.code = "
|
|
89
|
+
var WrongFamilyError = (_class15 = class extends PipRailError {constructor(...args12) { super(...args12); _class15.prototype.__init15.call(this); }
|
|
90
|
+
__init15() {this.code = "WRONG_FAMILY"}
|
|
91
91
|
}, _class15);
|
|
92
|
-
var
|
|
93
|
-
__init16() {this.code = "
|
|
92
|
+
var UnknownTokenError = (_class16 = class extends PipRailError {constructor(...args13) { super(...args13); _class16.prototype.__init16.call(this); }
|
|
93
|
+
__init16() {this.code = "UNKNOWN_TOKEN"}
|
|
94
94
|
}, _class16);
|
|
95
|
-
var
|
|
96
|
-
__init17() {this.code = "
|
|
95
|
+
var MissingDriverError = (_class17 = class extends PipRailError {constructor(...args14) { super(...args14); _class17.prototype.__init17.call(this); }
|
|
96
|
+
__init17() {this.code = "MISSING_DRIVER"}
|
|
97
97
|
}, _class17);
|
|
98
|
+
var UnsupportedNetworkError = (_class18 = class extends PipRailError {constructor(...args15) { super(...args15); _class18.prototype.__init18.call(this); }
|
|
99
|
+
__init18() {this.code = "UNSUPPORTED_NETWORK"}
|
|
100
|
+
}, _class18);
|
|
98
101
|
|
|
99
102
|
// src/drivers/shared.ts
|
|
100
103
|
var FAMILY_LABEL = {
|
|
@@ -159,9 +162,15 @@ function expandScientific(value) {
|
|
|
159
162
|
}
|
|
160
163
|
function parseUnits(value, decimals) {
|
|
161
164
|
assertValidDecimals(decimals, "parseUnits");
|
|
162
|
-
value
|
|
165
|
+
if (typeof value !== "string") {
|
|
166
|
+
throw new InvalidConfigError(
|
|
167
|
+
`parseUnits: amount must be a decimal STRING, got ${typeof value}. Pass '0.05', not 0.05.`
|
|
168
|
+
);
|
|
169
|
+
}
|
|
163
170
|
if (!/^\d+(\.\d+)?$/.test(value)) {
|
|
164
|
-
throw new
|
|
171
|
+
throw new InvalidConfigError(
|
|
172
|
+
`parseUnits: "${value}" is not a plain non-negative decimal amount (scientific notation like '1e3' is rejected \u2014 write the number out, e.g. '1000').`
|
|
173
|
+
);
|
|
165
174
|
}
|
|
166
175
|
const [whole, frac = ""] = value.split(".");
|
|
167
176
|
if (frac.length > decimals) {
|
|
@@ -242,4 +251,5 @@ function assertNoLegacyWalletKey(wallet, family) {
|
|
|
242
251
|
|
|
243
252
|
|
|
244
253
|
|
|
245
|
-
|
|
254
|
+
|
|
255
|
+
exports.PipRailError = PipRailError; exports.InsufficientFundsError = InsufficientFundsError; exports.RecipientNotReadyError = RecipientNotReadyError; exports.toInsufficientFundsError = toInsufficientFundsError; exports.WrongChainError = WrongChainError; exports.PaymentTimeoutError = PaymentTimeoutError; exports.MaxRetriesExceededError = MaxRetriesExceededError; exports.PaymentDeclinedError = PaymentDeclinedError; exports.ConfirmationTimeoutError = ConfirmationTimeoutError; exports.SettlementError = SettlementError; exports.InvalidEnvelopeError = InvalidEnvelopeError; exports.InvalidConfigError = InvalidConfigError; exports.NoCompatibleAcceptError = NoCompatibleAcceptError; exports.UnsupportedSchemeError = UnsupportedSchemeError; exports.NonReplayableBodyError = NonReplayableBodyError; exports.WalletRequiredError = WalletRequiredError; exports.WrongFamilyError = WrongFamilyError; exports.UnknownTokenError = UnknownTokenError; exports.MissingDriverError = MissingDriverError; exports.UnsupportedNetworkError = UnsupportedNetworkError; exports.assertNoLegacyWalletKey = assertNoLegacyWalletKey; exports.rejectForeignToken = rejectForeignToken; exports.MAX_DECIMALS = MAX_DECIMALS; exports.parseUnits = parseUnits; exports.floorUnits = floorUnits; exports.formatUnits = formatUnits; exports.nativeCost = nativeCost;
|
|
@@ -71,6 +71,9 @@ var SettlementError = class extends PipRailError {
|
|
|
71
71
|
var InvalidEnvelopeError = class extends PipRailError {
|
|
72
72
|
code = "INVALID_ENVELOPE";
|
|
73
73
|
};
|
|
74
|
+
var InvalidConfigError = class extends PipRailError {
|
|
75
|
+
code = "INVALID_CONFIG";
|
|
76
|
+
};
|
|
74
77
|
var NoCompatibleAcceptError = class extends PipRailError {
|
|
75
78
|
code = "NO_COMPATIBLE_ACCEPT";
|
|
76
79
|
};
|
|
@@ -159,9 +162,15 @@ function expandScientific(value) {
|
|
|
159
162
|
}
|
|
160
163
|
function parseUnits(value, decimals) {
|
|
161
164
|
assertValidDecimals(decimals, "parseUnits");
|
|
162
|
-
value
|
|
165
|
+
if (typeof value !== "string") {
|
|
166
|
+
throw new InvalidConfigError(
|
|
167
|
+
`parseUnits: amount must be a decimal STRING, got ${typeof value}. Pass '0.05', not 0.05.`
|
|
168
|
+
);
|
|
169
|
+
}
|
|
163
170
|
if (!/^\d+(\.\d+)?$/.test(value)) {
|
|
164
|
-
throw new
|
|
171
|
+
throw new InvalidConfigError(
|
|
172
|
+
`parseUnits: "${value}" is not a plain non-negative decimal amount (scientific notation like '1e3' is rejected \u2014 write the number out, e.g. '1000').`
|
|
173
|
+
);
|
|
165
174
|
}
|
|
166
175
|
const [whole, frac = ""] = value.split(".");
|
|
167
176
|
if (frac.length > decimals) {
|
|
@@ -227,6 +236,7 @@ export {
|
|
|
227
236
|
ConfirmationTimeoutError,
|
|
228
237
|
SettlementError,
|
|
229
238
|
InvalidEnvelopeError,
|
|
239
|
+
InvalidConfigError,
|
|
230
240
|
NoCompatibleAcceptError,
|
|
231
241
|
UnsupportedSchemeError,
|
|
232
242
|
NonReplayableBodyError,
|