uvd-x402-sdk 2.104.1 → 2.104.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -1
- package/dist/adapters/index.d.mts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/backend/index.d.mts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +760 -26
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/index.mjs +760 -28
- package/dist/backend/index.mjs.map +1 -1
- package/dist/{escrow-contracts-C59jszp3.d.ts → escrow-contracts-Bf3PU_Ub.d.ts} +496 -4
- package/dist/{escrow-contracts-Dgcyu7Fh.d.mts → escrow-contracts-amyDktMD.d.mts} +496 -4
- package/dist/{index-QswKm6BF.d.ts → index-CZHgEr58.d.ts} +2 -2
- package/dist/{index-DagQ74ZQ.d.ts → index-DARXHuQl.d.mts} +1 -1
- package/dist/{index-DagQ74ZQ.d.mts → index-DARXHuQl.d.ts} +1 -1
- package/dist/{index-CS4qStqy.d.mts → index-jNJd8jEb.d.mts} +2 -2
- package/dist/index.d.mts +21 -428
- package/dist/index.d.ts +21 -428
- package/dist/index.js +510 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +509 -29
- package/dist/index.mjs.map +1 -1
- package/dist/providers/algorand/index.d.mts +1 -1
- package/dist/providers/algorand/index.d.ts +1 -1
- package/dist/providers/evm/index.d.mts +1 -1
- package/dist/providers/evm/index.d.ts +1 -1
- package/dist/providers/hedera/index.d.mts +1 -1
- package/dist/providers/hedera/index.d.ts +1 -1
- package/dist/providers/near/index.d.mts +1 -1
- package/dist/providers/near/index.d.ts +1 -1
- package/dist/providers/solana/index.d.mts +1 -1
- package/dist/providers/solana/index.d.ts +1 -1
- package/dist/providers/stellar/index.d.mts +1 -1
- package/dist/providers/stellar/index.d.ts +1 -1
- package/dist/providers/sui/index.d.mts +1 -1
- package/dist/providers/sui/index.d.ts +1 -1
- package/dist/providers/xrpl/index.d.mts +1 -1
- package/dist/providers/xrpl/index.d.ts +1 -1
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/picker/index.d.mts +1 -1
- package/dist/react/picker/index.d.ts +1 -1
- package/dist/{receipts-8XsMeo1y.d.ts → receipts-CMuWVtO0.d.ts} +1 -1
- package/dist/{receipts-COPJ_BY9.d.mts → receipts-DsOSK0yB.d.mts} +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/{validity-BpwXbfdj.d.ts → validity-BshzF_Ga.d.ts} +1 -1
- package/dist/{validity-eGGXxzpi.d.mts → validity-y_M1oNCt.d.mts} +1 -1
- package/package.json +1 -1
- package/src/backend/durable.ts +582 -0
- package/src/backend/index.ts +149 -5
- package/src/escrow-preauth.ts +38 -33
- package/src/index.ts +7 -0
package/README.md
CHANGED
|
@@ -684,7 +684,7 @@ const paymentAuth = await buildEscrowPreAuth(new EnvKeyAdapter(), {
|
|
|
684
684
|
// Send as the X-Payment-Auth header (raw JSON, NOT base64).
|
|
685
685
|
```
|
|
686
686
|
|
|
687
|
-
Any `SigningWalletAdapter` works as the signer (only `signTypedData` is used); browser wallets can pass a minimal `{ signTypedData }` wrapper. Validation fails loud instead of falling back: incomplete network config, unknown tier, bounty outside the on-chain deposit limit ($100), or a `maxFeeBps` below the operator's 1300 bps all throw before anything is signed. What the config asserts is also checked against the SDK's own tables before signing, as in the Python SDK: the `chain_id` against the `network` you name (a registry name or `eip155:<id>`), the escrow, token collector and USDC against `ESCROW_CONTRACTS`, the operator against `ESCROW_OPERATORS`,
|
|
687
|
+
Any `SigningWalletAdapter` works as the signer (only `signTypedData` is used); browser wallets can pass a minimal `{ signTypedData }` wrapper. Validation fails loud instead of falling back: incomplete network config, unknown tier, bounty outside the on-chain deposit limit ($100), or a `maxFeeBps` below the operator's 1300 bps all throw before anything is signed. What the config asserts is also checked against the SDK's own tables before signing, as in the Python SDK: the `chain_id` against the `network` you name (a registry name or `eip155:<id>`), the escrow, token collector and USDC against `ESCROW_CONTRACTS`, the operator against `ESCROW_OPERATORS`, `maxFeeBps` against the chain's ceiling in `ESCROW_MAX_FEE_BPS`, and the USDC EIP-712 domain (`usdc_domain_name` / `usdc_domain_version`) against the token's on-chain domain in `VERIFIED_USDC_DOMAINS`. A contradiction throws `INVALID_CONFIG`, and so do a `network` the SDK does not register and a chain without a row in each of the four tables, with or without `network`; name the network you expect to pay on, from your own code, never one read from the config. A server-published tier window must be an integer from 0 to its `ESCROW_TIER_WINDOW_MAX`, and `authorizationExpiry` at most `ESCROW_MAX_AUTHORIZATION_SEC` after now: past either, the SDK refuses, it never clamps. `computeEscrowNonce` is exported to reproduce `AuthCaptureEscrow.getHash` externally.
|
|
688
688
|
|
|
689
689
|
## Multi-Stablecoin (EVM)
|
|
690
690
|
|
|
@@ -889,6 +889,8 @@ app.post('/api/premium', async (req, res) => {
|
|
|
889
889
|
});
|
|
890
890
|
```
|
|
891
891
|
|
|
892
|
+
To be listed in the facilitator's Bazaar after a paid call, flag the accepts as discoverable: `discoverable: true` in the options of `createHonoMiddleware()` or `createFetchPaywall()` writes `extra.discoverable: true` on every accept, in the 402 and in the requirements sent to `/verify` and `/settle`; the other `extra` fields (`name`, `version`) stay. `false` writes `discoverable: false`, overriding a hand-written `true`, as the Python SDK's `False` does (for the facilitator, `false` and no flag both mean "not listed"); without the option the accepts go out as given. Native Hedera accepts go out as given with either value: the facilitator allows only `feePayer` in their `extra`, so a Hedera settle is never listed. For one accept, or for `create402Response`, use `withDiscoverable(accept)` (`withDiscoverable(accept, false)` to opt out); it throws for a native Hedera accept. Neither modifies the object it is given. A `discoverable` that is not a boolean and an `extra` that is not a plain object throw when the paywall is built, before any request.
|
|
893
|
+
|
|
892
894
|
`createPaymentMiddleware()`, `createHonoMiddleware()` and `createFetchPaywall()` verify and settle automatically by default (`before-handler`). Use `settlementStrategy: 'manual'` if you need to control when settlement happens (e.g., settle only after confirming you can fulfill the request).
|
|
893
895
|
|
|
894
896
|
A buyer in a browser on another origin reads the terms of a v2 402, in the `PAYMENT-REQUIRED` header, only if the app's CORS exposes that header: list it in `Access-Control-Expose-Headers` (with `hono/cors`, `exposeHeaders: ['PAYMENT-REQUIRED']`) and send `Access-Control-Allow-Origin`. The 402 of `createHonoMiddleware` and `createFetchPaywall` sets no CORS header of its own; `create402Response` lists the header in its `headers` but sets no `Access-Control-Allow-Origin` (spread `getCorsHeaders(origin)` too).
|
|
@@ -2050,6 +2052,91 @@ const result = await anchorEvidence(body, {
|
|
|
2050
2052
|
res.setHeader('X-Durable-Evidence', evidenceHeader(result));
|
|
2051
2053
|
```
|
|
2052
2054
|
|
|
2055
|
+
### Seller: from the paywall itself (`durable`)
|
|
2056
|
+
|
|
2057
|
+
`createFetchPaywall`, `createHonoMiddleware` and `createPaymentMiddleware`
|
|
2058
|
+
(Express) take an opt-in `durable`. With it, a paid `2xx` answer that the
|
|
2059
|
+
handler did not anchor itself is captured once, sealed and anchored through
|
|
2060
|
+
`anchorEvidence`, and goes out with `X-Durable-Evidence`:
|
|
2061
|
+
|
|
2062
|
+
```ts
|
|
2063
|
+
import { TypedDataEncoder, getBytes } from 'ethers';
|
|
2064
|
+
import { createFetchPaywall, type DurableEvidenceContext } from 'uvd-x402-sdk/backend';
|
|
2065
|
+
import { caip2ToChain, getChainByName, payerKeyFromEvmSignature } from 'uvd-x402-sdk';
|
|
2066
|
+
|
|
2067
|
+
const TRANSFER_WITH_AUTHORIZATION = {
|
|
2068
|
+
TransferWithAuthorization: [
|
|
2069
|
+
{ name: 'from', type: 'address' }, { name: 'to', type: 'address' },
|
|
2070
|
+
{ name: 'value', type: 'uint256' }, { name: 'validAfter', type: 'uint256' },
|
|
2071
|
+
{ name: 'validBefore', type: 'uint256' }, { name: 'nonce', type: 'bytes32' },
|
|
2072
|
+
],
|
|
2073
|
+
};
|
|
2074
|
+
|
|
2075
|
+
// The key behind an EIP-3009 USDC payment: recovered from the signature over the
|
|
2076
|
+
// digest the buyer signed, with the token domain of the chain registry.
|
|
2077
|
+
const evmPayerKey = ({ payment }: DurableEvidenceContext) => {
|
|
2078
|
+
const payload = payment.payment.payload;
|
|
2079
|
+
if (!('authorization' in payload)) return undefined; // not an EVM payment: skipped
|
|
2080
|
+
const network = payment.requirements.network;
|
|
2081
|
+
const chain = getChainByName(caip2ToChain(network) ?? network);
|
|
2082
|
+
if (!chain) return undefined;
|
|
2083
|
+
const digest = TypedDataEncoder.hash(
|
|
2084
|
+
{ name: chain.usdc.name, version: chain.usdc.version, chainId: chain.chainId, verifyingContract: payment.requirements.asset },
|
|
2085
|
+
TRANSFER_WITH_AUTHORIZATION,
|
|
2086
|
+
payload.authorization,
|
|
2087
|
+
);
|
|
2088
|
+
return payerKeyFromEvmSignature(payload.signature, getBytes(digest));
|
|
2089
|
+
};
|
|
2090
|
+
|
|
2091
|
+
const paywall = createFetchPaywall({
|
|
2092
|
+
accepts,
|
|
2093
|
+
durable: {
|
|
2094
|
+
payerKey: evmPayerKey, // Solana: ({ payment }) => payerKeyFromSolanaAddress(payment.verifyResult.payer!)
|
|
2095
|
+
maxBodyBytes: 64 * 1024, // default ANCHOR_MAX_REQUEST_BYTES
|
|
2096
|
+
timeoutMs: 5000, // default DURABLE_DEFAULT_TIMEOUT_MS
|
|
2097
|
+
},
|
|
2098
|
+
});
|
|
2099
|
+
```
|
|
2100
|
+
|
|
2101
|
+
A wrong digest does not throw: it recovers another valid key, and the evidence
|
|
2102
|
+
would be sealed to it. `src/backend/durable-evidence.test.ts` checks this
|
|
2103
|
+
derivation against a signature made with a synthetic key.
|
|
2104
|
+
|
|
2105
|
+
Without `durable` nothing changes and nothing is anchored. It anchors only a
|
|
2106
|
+
payment this request settled with a transaction hash (`'manual'`: once
|
|
2107
|
+
`x402.settle()` resolved successfully before the answer); a replayed settle, or
|
|
2108
|
+
one whose receipt is `pending`, `unknown` or `rejected`, is not anchored. The body is read once
|
|
2109
|
+
and held at most `maxBodyBytes`; past that, past `timeoutMs`, for an event
|
|
2110
|
+
stream, for a body already locked or read, or when the handler's own stream
|
|
2111
|
+
fails, the response goes out whole and unchanged except for a skip notice in
|
|
2112
|
+
the header, and nothing is anchored. A failed anchor is a skip notice too: the
|
|
2113
|
+
response and the payment stand. A `HEAD`, a non-`2xx` answer and a response that
|
|
2114
|
+
already has `X-Durable-Evidence` are left alone. Every field of `durable` but
|
|
2115
|
+
`payerKey`, `maxBodyBytes` and `timeoutMs` is the `anchorEvidence` option of the
|
|
2116
|
+
same name; `facilitator` defaults to the paywall's facilitator.
|
|
2117
|
+
|
|
2118
|
+
The skip notices the paywall adds, besides those of `anchorEvidence`:
|
|
2119
|
+
|
|
2120
|
+
| `skipped` | When |
|
|
2121
|
+
|---|---|
|
|
2122
|
+
| `no_payer_key` | `payerKey` returned `undefined` or an empty key, or threw |
|
|
2123
|
+
| `too_large` | the body is over `maxBodyBytes` (declared or read) |
|
|
2124
|
+
| `not_capturable` | an event stream, a body already sent, a chunk that is not bytes, or a handler stream that failed |
|
|
2125
|
+
| `timeout` | capture, `payerKey`, upload or anchor did not finish within `timeoutMs` |
|
|
2126
|
+
| `anchor_failed` | the anchor failed |
|
|
2127
|
+
|
|
2128
|
+
In Express, the answer is held from the handler's `end()` until the anchor
|
|
2129
|
+
returns (at most `timeoutMs`). In that window `res.headersSent` and
|
|
2130
|
+
`res.writableEnded` are `true`, a further `write()` is refused as a write after
|
|
2131
|
+
end, a further `end()` only queues its callback, and headers can no longer be
|
|
2132
|
+
set: the paid answer goes out as the handler ended it. A close the server asks
|
|
2133
|
+
for in that window without an error (`res.destroy()` or `req.socket.destroy()`,
|
|
2134
|
+
which is what Express's final handler does on an error once headers are sent)
|
|
2135
|
+
waits until the body is written and then closes the connection. A close with an
|
|
2136
|
+
error, or one once the connection can no longer write, is not held. A client
|
|
2137
|
+
that hangs up its side during the window does not get the body: the window
|
|
2138
|
+
lengthens (up to `timeoutMs`) the time in which that happens.
|
|
2139
|
+
|
|
2053
2140
|
**It never throws.** Every failure resolves to `result.skipped`, because
|
|
2054
2141
|
evidence is an addition to the payment path and must never be a gate in front of
|
|
2055
2142
|
it. An unreachable facilitator costs the receipt, never the sale.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as X402Version, a as PaymentResult } from '../index-
|
|
1
|
+
import { X as X402Version, a as PaymentResult } from '../index-DARXHuQl.mjs';
|
|
2
2
|
export { E as EnvKeyAdapter, O as OWSAccountInfo, a as OWSCore, b as OWSSignResult, c as OWSWallet, d as OWSWalletAdapter, e as OWSWalletAdapterOptions } from '../ows-DazT4KQH.mjs';
|
|
3
3
|
import '../wallet-T0NFUUkT.mjs';
|
|
4
4
|
import 'ethers';
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as X402Version, a as PaymentResult } from '../index-
|
|
1
|
+
import { X as X402Version, a as PaymentResult } from '../index-DARXHuQl.js';
|
|
2
2
|
export { E as EnvKeyAdapter, O as OWSAccountInfo, a as OWSCore, b as OWSSignResult, c as OWSWallet, d as OWSWalletAdapter, e as OWSWalletAdapterOptions } from '../ows-BB6Sgj0W.js';
|
|
3
3
|
import '../wallet-T0NFUUkT.js';
|
|
4
4
|
import 'ethers';
|
package/dist/backend/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../wallet-T0NFUUkT.mjs';
|
|
2
|
-
export { a as FacilitatorReceipt, F as FetchReceiptResult, P as PaymentState, b as PurchaseContext, c as RECEIPT_ISSUER, R as ReceiptFetchOptions, d as ReceiptKeys, e as STACK_KEY_HEADER, S as StackKeyOptions, f as StackKeyRedirectError, g as canonicalReceiptJson, h as createPurchaseContext, i as fetchWithReceipt, j as getFacilitatorReceipt, m as mergeHeaderList, k as mergePaymentResponseHeaders, p as parseFacilitatorReceipt, l as paymentResponseHeaders, n as purchaseContextHeader, r as receiptCommitment, o as receiptFromErrorBody, q as receiptFromResponse, v as validatePurchaseContext, s as verifyFacilitatorReceipt } from '../receipts-
|
|
3
|
-
import '../index-
|
|
4
|
-
export { A as AMBIGUOUS_LEASE_REASONS,
|
|
2
|
+
export { a as FacilitatorReceipt, F as FetchReceiptResult, P as PaymentState, b as PurchaseContext, c as RECEIPT_ISSUER, R as ReceiptFetchOptions, d as ReceiptKeys, e as STACK_KEY_HEADER, S as StackKeyOptions, f as StackKeyRedirectError, g as canonicalReceiptJson, h as createPurchaseContext, i as fetchWithReceipt, j as getFacilitatorReceipt, m as mergeHeaderList, k as mergePaymentResponseHeaders, p as parseFacilitatorReceipt, l as paymentResponseHeaders, n as purchaseContextHeader, r as receiptCommitment, o as receiptFromErrorBody, q as receiptFromResponse, v as validatePurchaseContext, s as verifyFacilitatorReceipt } from '../receipts-DsOSK0yB.mjs';
|
|
3
|
+
import '../index-DARXHuQl.mjs';
|
|
4
|
+
export { A as AMBIGUOUS_LEASE_REASONS, b as AUTHORIZATION_ALREADY_SETTLED, c as AUTHORIZATION_IN_FLIGHT, d as AdmittedAuthorizationCode, bf as AdvancedAuthorizationResult, bg as AdvancedEscrowClient, bh as AdvancedEscrowClientOptions, bi as AdvancedEscrowContracts, bj as AdvancedEscrowTaskTier, bk as AdvancedPaymentInfo, bl as AdvancedTransactionResult, bm as AgentId, bn as AgentIdentity, bo as AgentRegistration, bp as AgentRegistrationFile, bq as AgentService, br as AtomStats, bs as BASE_MAINNET_CONTRACTS, B as BAZAAR_BODY_METHODS, g as BAZAAR_BODY_TYPES, h as BAZAAR_QUERY_METHODS, j as BazaarBodyEndpoint, k as BazaarBodyMethod, l as BazaarBodyType, bt as BazaarClient, bu as BazaarClientOptions, bv as BazaarDiscoverOptions, bw as BazaarDiscoverResponse, m as BazaarExtensionOptions, n as BazaarOutput, o as BazaarQueryEndpoint, p as BazaarQueryMethod, bx as BazaarRegisterOptions, by as BazaarResource, bz as CreateEscrowOptions, D as DEFAULT_FACILITATOR_RETRIES, bA as DEFAULT_MAX_SEARCH_LEN, r as DEFAULT_RETRY_AFTER_SECONDS, bB as DEPOSIT_LIMIT_USDC, s as DURABLE_DEFAULT_TIMEOUT_MS, bC as DiscoveryAccepts, bD as DiscoveryCuration, bE as DiscoveryHealth, bF as DiscoveryHealthStatus, bG as DiscoveryKind, bH as DiscoveryListOptions, bI as DiscoveryMethod, bJ as DiscoveryPagination, bK as DiscoveryRegisterOptions, bL as DiscoveryResource, bM as DiscoveryResponse, bN as DiscoverySource, bO as DiscoveryStats, bP as DiscoveryTier, bQ as Dispute, bR as DisputeOutcome, u as DurableEvidenceContext, v as DurableEvidenceOptions, bS as ERC8004_CONTRACTS, bT as ERC8004_EXTENSION_ID, bU as ESCROW_CONTRACTS, bV as ESCROW_NOTHING_TO_VOID, bW as ESCROW_OPERATOR_GENERATION, bX as ESCROW_OPERATOR_NOT_DEPLOYED, bY as ESCROW_TIMEOUT_MS, bZ as ESCROW_UNSUPPORTED_ON_GENERATION, b_ as ESCROW_VOID_AMOUNT_MISMATCH, b$ as Erc8004Client, c0 as Erc8004ClientOptions, c1 as Erc8004LookupError, c2 as Erc8004Network, c3 as EscrowClient, c4 as EscrowClientOptions, c5 as EscrowOperatorGeneration, c6 as EscrowPayment, c7 as EscrowStateResponse, c8 as EscrowStatus, F as FacilitatorCallOptions, G as FacilitatorClient, H as FacilitatorClientOptions, I as FacilitatorErrorInfo, J as FacilitatorFailureFields, K as FacilitatorFetchOptions, c9 as FeedbackEntry, ca as FeedbackParams, cb as FeedbackRequest, cc as FeedbackResponse, L as FetchPaywall, M as FetchPaywallOptions, N as FetchRouteInput, cd as HEALTH_FILTERS, O as HonoMiddlewareOptions, P as IDEMPOTENCY_KEY_HEADER, Q as IDEMPOTENT_REPLAYED_HEADER, ce as IdentityByOwnerResponse, cf as IdentityMetadataResponse, cg as IdentityTotalSupplyResponse, ch as KIND_FILTERS, ci as LifecycleAuthOptions, a1 as MAX_RETRY_AFTER_SECONDS, cj as MAX_SEARCH_LEN, ck as METHOD_FILTERS, cl as MetadataEntryParam, cm as OPERATOR_ABI, cn as OPERATOR_ABI_CREATE3, co as OPERATOR_ABI_V3, cp as PAYMENT_INFO_TYPEHASH, a2 as ParsedFacilitatorErrorBody, a3 as PaymentAcceptance, a4 as PaymentConflictResponse, a5 as PaymentMiddlewareOptions, a6 as PaymentPayloadV2, cq as PaymentRequirementResolver, cr as PaymentRequirements, cs as PaymentRequirementsOptions, a7 as PaymentRequirementsV2, ct as PrepareRelayFeedbackRequest, cu as PrepareRelayFeedbackResponse, cv as PrepareRelayResponseRequest, cw as PrepareSolanaFeedbackRequest, cx as PrepareSolanaFeedbackResponse, cy as ProofOfPayment, a8 as RECEIPT_REQUEST_CONFLICT, cz as RELAYED_FEEDBACK_NETWORKS, a9 as REPLAYABLE_LEASE_REASONS, cA as RefundRequest, cB as RefundStatus, cC as RegisterAgentRequest, cD as RegisterAgentResponse, cE as RegisterJobResponse, cF as RegisterJobStatus, cG as RegistrationPendingError, cH as RelayAuthorizationParams, cI as ReputationResponse, cJ as ReputationSummary, cK as RequestRefundOptions, ab as ResourceInfoV2, ac as SETTLEMENT_UNCONFIRMED, cL as SOLANA_FEEDBACK_NETWORKS, cM as SettleRequest, ad as SettleRequestV2, ae as SettleResponse, cN as SettleResponseWithProof, cO as SubmitRelayFeedbackRequest, cP as SubmitRelayResponseRequest, cQ as SubmitSolanaFeedbackRequest, cR as TIER_FILTERS, cS as TIER_TIMINGS, cT as USDC_DOMAIN_NAME, cU as UnavailableBody, cV as UnavailableResponse, af as VerifiedPaymentState, cW as VerifyRequest, ag as VerifyRequestV2, ah as VerifyResponse, ai as WRITER_LEASE_REASONS, ak as WriterLeaseReason, al as X402_CORS_HEADERS, am as X402_HEADER_NAMES, cX as ZERO_ADDRESS, ar as bazaarExtension, cY as buildErc8004PaymentRequirements, au as buildPaymentConflictResponse, av as buildPaymentRequirements, aw as buildSettleRequest, ax as buildSettleRequestForVersion, ay as buildSettleRequestV2, cZ as buildUnavailableResponse, az as buildVerifyRequest, aA as buildVerifyRequestForVersion, aB as buildVerifyRequestV2, c_ as canRefundEscrow, c$ as canReleaseEscrow, d0 as carryFailureFields, aD as create402Response, aE as createFetchPaywall, aF as createHonoMiddleware, aG as createIdempotencyKey, aH as createPaymentMiddleware, d1 as epochToDate, d2 as escrowTimeRemaining, aN as extractPaymentFromHeaders, aO as facilitatorFetch, aP as getCorsHeaders, d3 as getEscrowContractsByChainId, d4 as getEscrowOperatorGeneration, d5 as getEscrowSupportedChainIds, d6 as isAlive, aQ as isAmbiguousLeaseReason, aR as isAuthorizationAlreadyUsed, aS as isAuthorizationInFlight, d7 as isEscrowExpired, d8 as isEscrowSupportedOnChain, d9 as isRegisterJobTerminal, aU as isReplayableLeaseReason, aV as isSettlementUnconfirmed, aY as parseFacilitatorErrorBody, da as parsePaymentHeader, aZ as parseRetryAfterSeconds, b1 as readFacilitatorError, b3 as resolveEnvelopeVersion, db as supportsRelayedFeedback, dc as supportsSolanaFeedback, ba as toPaymentRequirementsV2, bb as toResourceInfoV2, dd as wireNetwork, be as withDiscoverable } from '../escrow-contracts-amyDktMD.mjs';
|
package/dist/backend/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../wallet-T0NFUUkT.js';
|
|
2
|
-
export { a as FacilitatorReceipt, F as FetchReceiptResult, P as PaymentState, b as PurchaseContext, c as RECEIPT_ISSUER, R as ReceiptFetchOptions, d as ReceiptKeys, e as STACK_KEY_HEADER, S as StackKeyOptions, f as StackKeyRedirectError, g as canonicalReceiptJson, h as createPurchaseContext, i as fetchWithReceipt, j as getFacilitatorReceipt, m as mergeHeaderList, k as mergePaymentResponseHeaders, p as parseFacilitatorReceipt, l as paymentResponseHeaders, n as purchaseContextHeader, r as receiptCommitment, o as receiptFromErrorBody, q as receiptFromResponse, v as validatePurchaseContext, s as verifyFacilitatorReceipt } from '../receipts-
|
|
3
|
-
import '../index-
|
|
4
|
-
export { A as AMBIGUOUS_LEASE_REASONS,
|
|
2
|
+
export { a as FacilitatorReceipt, F as FetchReceiptResult, P as PaymentState, b as PurchaseContext, c as RECEIPT_ISSUER, R as ReceiptFetchOptions, d as ReceiptKeys, e as STACK_KEY_HEADER, S as StackKeyOptions, f as StackKeyRedirectError, g as canonicalReceiptJson, h as createPurchaseContext, i as fetchWithReceipt, j as getFacilitatorReceipt, m as mergeHeaderList, k as mergePaymentResponseHeaders, p as parseFacilitatorReceipt, l as paymentResponseHeaders, n as purchaseContextHeader, r as receiptCommitment, o as receiptFromErrorBody, q as receiptFromResponse, v as validatePurchaseContext, s as verifyFacilitatorReceipt } from '../receipts-CMuWVtO0.js';
|
|
3
|
+
import '../index-DARXHuQl.js';
|
|
4
|
+
export { A as AMBIGUOUS_LEASE_REASONS, b as AUTHORIZATION_ALREADY_SETTLED, c as AUTHORIZATION_IN_FLIGHT, d as AdmittedAuthorizationCode, bf as AdvancedAuthorizationResult, bg as AdvancedEscrowClient, bh as AdvancedEscrowClientOptions, bi as AdvancedEscrowContracts, bj as AdvancedEscrowTaskTier, bk as AdvancedPaymentInfo, bl as AdvancedTransactionResult, bm as AgentId, bn as AgentIdentity, bo as AgentRegistration, bp as AgentRegistrationFile, bq as AgentService, br as AtomStats, bs as BASE_MAINNET_CONTRACTS, B as BAZAAR_BODY_METHODS, g as BAZAAR_BODY_TYPES, h as BAZAAR_QUERY_METHODS, j as BazaarBodyEndpoint, k as BazaarBodyMethod, l as BazaarBodyType, bt as BazaarClient, bu as BazaarClientOptions, bv as BazaarDiscoverOptions, bw as BazaarDiscoverResponse, m as BazaarExtensionOptions, n as BazaarOutput, o as BazaarQueryEndpoint, p as BazaarQueryMethod, bx as BazaarRegisterOptions, by as BazaarResource, bz as CreateEscrowOptions, D as DEFAULT_FACILITATOR_RETRIES, bA as DEFAULT_MAX_SEARCH_LEN, r as DEFAULT_RETRY_AFTER_SECONDS, bB as DEPOSIT_LIMIT_USDC, s as DURABLE_DEFAULT_TIMEOUT_MS, bC as DiscoveryAccepts, bD as DiscoveryCuration, bE as DiscoveryHealth, bF as DiscoveryHealthStatus, bG as DiscoveryKind, bH as DiscoveryListOptions, bI as DiscoveryMethod, bJ as DiscoveryPagination, bK as DiscoveryRegisterOptions, bL as DiscoveryResource, bM as DiscoveryResponse, bN as DiscoverySource, bO as DiscoveryStats, bP as DiscoveryTier, bQ as Dispute, bR as DisputeOutcome, u as DurableEvidenceContext, v as DurableEvidenceOptions, bS as ERC8004_CONTRACTS, bT as ERC8004_EXTENSION_ID, bU as ESCROW_CONTRACTS, bV as ESCROW_NOTHING_TO_VOID, bW as ESCROW_OPERATOR_GENERATION, bX as ESCROW_OPERATOR_NOT_DEPLOYED, bY as ESCROW_TIMEOUT_MS, bZ as ESCROW_UNSUPPORTED_ON_GENERATION, b_ as ESCROW_VOID_AMOUNT_MISMATCH, b$ as Erc8004Client, c0 as Erc8004ClientOptions, c1 as Erc8004LookupError, c2 as Erc8004Network, c3 as EscrowClient, c4 as EscrowClientOptions, c5 as EscrowOperatorGeneration, c6 as EscrowPayment, c7 as EscrowStateResponse, c8 as EscrowStatus, F as FacilitatorCallOptions, G as FacilitatorClient, H as FacilitatorClientOptions, I as FacilitatorErrorInfo, J as FacilitatorFailureFields, K as FacilitatorFetchOptions, c9 as FeedbackEntry, ca as FeedbackParams, cb as FeedbackRequest, cc as FeedbackResponse, L as FetchPaywall, M as FetchPaywallOptions, N as FetchRouteInput, cd as HEALTH_FILTERS, O as HonoMiddlewareOptions, P as IDEMPOTENCY_KEY_HEADER, Q as IDEMPOTENT_REPLAYED_HEADER, ce as IdentityByOwnerResponse, cf as IdentityMetadataResponse, cg as IdentityTotalSupplyResponse, ch as KIND_FILTERS, ci as LifecycleAuthOptions, a1 as MAX_RETRY_AFTER_SECONDS, cj as MAX_SEARCH_LEN, ck as METHOD_FILTERS, cl as MetadataEntryParam, cm as OPERATOR_ABI, cn as OPERATOR_ABI_CREATE3, co as OPERATOR_ABI_V3, cp as PAYMENT_INFO_TYPEHASH, a2 as ParsedFacilitatorErrorBody, a3 as PaymentAcceptance, a4 as PaymentConflictResponse, a5 as PaymentMiddlewareOptions, a6 as PaymentPayloadV2, cq as PaymentRequirementResolver, cr as PaymentRequirements, cs as PaymentRequirementsOptions, a7 as PaymentRequirementsV2, ct as PrepareRelayFeedbackRequest, cu as PrepareRelayFeedbackResponse, cv as PrepareRelayResponseRequest, cw as PrepareSolanaFeedbackRequest, cx as PrepareSolanaFeedbackResponse, cy as ProofOfPayment, a8 as RECEIPT_REQUEST_CONFLICT, cz as RELAYED_FEEDBACK_NETWORKS, a9 as REPLAYABLE_LEASE_REASONS, cA as RefundRequest, cB as RefundStatus, cC as RegisterAgentRequest, cD as RegisterAgentResponse, cE as RegisterJobResponse, cF as RegisterJobStatus, cG as RegistrationPendingError, cH as RelayAuthorizationParams, cI as ReputationResponse, cJ as ReputationSummary, cK as RequestRefundOptions, ab as ResourceInfoV2, ac as SETTLEMENT_UNCONFIRMED, cL as SOLANA_FEEDBACK_NETWORKS, cM as SettleRequest, ad as SettleRequestV2, ae as SettleResponse, cN as SettleResponseWithProof, cO as SubmitRelayFeedbackRequest, cP as SubmitRelayResponseRequest, cQ as SubmitSolanaFeedbackRequest, cR as TIER_FILTERS, cS as TIER_TIMINGS, cT as USDC_DOMAIN_NAME, cU as UnavailableBody, cV as UnavailableResponse, af as VerifiedPaymentState, cW as VerifyRequest, ag as VerifyRequestV2, ah as VerifyResponse, ai as WRITER_LEASE_REASONS, ak as WriterLeaseReason, al as X402_CORS_HEADERS, am as X402_HEADER_NAMES, cX as ZERO_ADDRESS, ar as bazaarExtension, cY as buildErc8004PaymentRequirements, au as buildPaymentConflictResponse, av as buildPaymentRequirements, aw as buildSettleRequest, ax as buildSettleRequestForVersion, ay as buildSettleRequestV2, cZ as buildUnavailableResponse, az as buildVerifyRequest, aA as buildVerifyRequestForVersion, aB as buildVerifyRequestV2, c_ as canRefundEscrow, c$ as canReleaseEscrow, d0 as carryFailureFields, aD as create402Response, aE as createFetchPaywall, aF as createHonoMiddleware, aG as createIdempotencyKey, aH as createPaymentMiddleware, d1 as epochToDate, d2 as escrowTimeRemaining, aN as extractPaymentFromHeaders, aO as facilitatorFetch, aP as getCorsHeaders, d3 as getEscrowContractsByChainId, d4 as getEscrowOperatorGeneration, d5 as getEscrowSupportedChainIds, d6 as isAlive, aQ as isAmbiguousLeaseReason, aR as isAuthorizationAlreadyUsed, aS as isAuthorizationInFlight, d7 as isEscrowExpired, d8 as isEscrowSupportedOnChain, d9 as isRegisterJobTerminal, aU as isReplayableLeaseReason, aV as isSettlementUnconfirmed, aY as parseFacilitatorErrorBody, da as parsePaymentHeader, aZ as parseRetryAfterSeconds, b1 as readFacilitatorError, b3 as resolveEnvelopeVersion, db as supportsRelayedFeedback, dc as supportsSolanaFeedback, ba as toPaymentRequirementsV2, bb as toResourceInfoV2, dd as wireNetwork, be as withDiscoverable } from '../escrow-contracts-Bf3PU_Ub.js';
|