uvd-x402-sdk 2.53.0 → 2.56.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/dist/index.d.mts CHANGED
@@ -6,6 +6,194 @@ export { a as EIP3009Authorization, E as EIP3009Params } from './wallet-w7BnImDG
6
6
  export { E as EnvKeyAdapter, O as OWSWallet, a as OWSWalletAdapter } from './ows-Z9v4GxOZ.mjs';
7
7
  export { FacilitatorClient, FacilitatorClientOptions, HonoMiddlewareOptions, PaymentAcceptance, PaymentMiddlewareOptions, PaymentPayloadV2, PaymentRequirementsV2, ResourceInfoV2, SettleRequestV2, VerifiedPaymentState, VerifyRequestV2, X402_CORS_HEADERS, X402_HEADER_NAMES, buildPaymentRequirements, buildSettleRequest, buildSettleRequestV2, buildVerifyRequest, buildVerifyRequestV2, create402Response, createHonoMiddleware, createPaymentMiddleware, extractPaymentFromHeaders, getCorsHeaders } from './backend/index.mjs';
8
8
 
9
+ /**
10
+ * DX402 `durable-evidence`: recover a paid response after the fact.
11
+ *
12
+ * x402 settles payment on-chain permanently but delivers the purchased resource
13
+ * **exactly once**, in the body of a `200 OK`, and keeps nothing. A buyer who did
14
+ * not capture it at that instant cannot recover it, and neither party can later
15
+ * prove *what* was delivered — only *that* payment happened.
16
+ *
17
+ * DX402 closes that gap. The seller seals a copy of the response to the payer's
18
+ * own public key — recovered from the payment signature itself — and anchors it.
19
+ * The buyer gets an `X-Durable-Evidence` header pointing at it.
20
+ *
21
+ * **Paying is publishing your encryption key.** No registration, no key
22
+ * exchange, no extra round trip.
23
+ *
24
+ * ```ts
25
+ * const evidence = evidenceFromHeaders(response.headers);
26
+ * const body = await recoverEvidence(evidence, myPrivateKey);
27
+ * ```
28
+ *
29
+ * Specification: `docs/plans/dx402/02-SPEC-v0.1.md` in x402-rs.
30
+ */
31
+ declare const EVIDENCE_HEADER = "X-Durable-Evidence";
32
+ /** Why a party holds a key to this evidence. */
33
+ type RecipientRole = 'payer' | 'seller' | 'auditor';
34
+ declare class DX402Error extends Error {
35
+ constructor(message: string);
36
+ }
37
+ /**
38
+ * No evidence was anchored for this payment.
39
+ *
40
+ * A normal outcome, not a fault: the body may have exceeded the seller's size
41
+ * cap, the store may have been unreachable, or the payer may be a
42
+ * smart-contract wallet with no recoverable key.
43
+ */
44
+ declare class EvidenceSkipped extends DX402Error {
45
+ readonly reason: string;
46
+ constructor(reason: string);
47
+ }
48
+ /**
49
+ * The anchored bytes are not the bytes that were delivered.
50
+ *
51
+ * This is the interesting failure: the seller anchored something other than
52
+ * what it served, which is precisely the fraud `contentHash` exists to expose.
53
+ * Treat it as evidence of misbehaviour, not a transport glitch.
54
+ */
55
+ declare class ContentHashMismatch extends DX402Error {
56
+ readonly anchored: string;
57
+ readonly actual: string;
58
+ constructor(anchored: string, actual: string);
59
+ }
60
+ type EvidenceMode = 'direct' | 'escrowed';
61
+ interface AnchoredEvidence {
62
+ v: number;
63
+ paymentId: string;
64
+ pointer: string;
65
+ backend: string;
66
+ contentHash: string;
67
+ cipher: string;
68
+ keyAlg: 'ECIES-secp256k1' | 'ECIES-X25519';
69
+ mode: EvidenceMode;
70
+ retention: string;
71
+ receipt?: string;
72
+ }
73
+ /**
74
+ * Whether the facilitator is cryptographically unable to read this payload.
75
+ *
76
+ * `direct` and `escrowed` make materially different claims about who can open
77
+ * the payload, so a caller that cares about confidentiality must check rather
78
+ * than assume.
79
+ */
80
+ declare function isEndToEnd(evidence: AnchoredEvidence): boolean;
81
+ /** keccak256 of a body, `0x`-prefixed — matching the facilitator's `contentHash`. */
82
+ declare function contentHash(body: Uint8Array): string;
83
+ /**
84
+ * Derive the canonical payment identifier: `keccak256(caip2Network || txHash)`.
85
+ *
86
+ * This value is the AEAD associated data binding a ciphertext to its payment.
87
+ * Buyer and seller must derive it identically or decryption fails with no
88
+ * obvious cause, which is why it lives in the SDK rather than in each caller.
89
+ */
90
+ declare function paymentId(caip2Network: string, txHash: string): string;
91
+ /** Parse an `X-Durable-Evidence` header value. */
92
+ declare function parseEvidenceHeader(value: string): AnchoredEvidence;
93
+ /**
94
+ * Pull the anchored evidence out of a response's headers.
95
+ *
96
+ * Accepts a `Headers` object or a plain record. Lookup is case-insensitive,
97
+ * because HTTP does not care and different clients disagree about casing.
98
+ */
99
+ declare function evidenceFromHeaders(headers: Headers | Record<string, string>): AnchoredEvidence;
100
+ /**
101
+ * Turn a DX402 pointer into a fetchable URL.
102
+ *
103
+ * `s3+https://...` is a scheme tag over an ordinary HTTPS URL; `ipfs://` and
104
+ * `ar://` go through public gateways. Anything else passes through untouched, so
105
+ * a caller with their own resolver is not blocked by this function.
106
+ */
107
+ declare function dereferencePointer(pointer: string): string;
108
+ interface Recipient {
109
+ role: RecipientRole;
110
+ alg: 'secp256k1' | 'x25519';
111
+ ephemeral: Uint8Array;
112
+ cekNonce: Uint8Array;
113
+ wrappedCek: Uint8Array;
114
+ }
115
+ interface SealedEnvelope {
116
+ recipients: Recipient[];
117
+ bodyNonce: Uint8Array;
118
+ ciphertext: Uint8Array;
119
+ }
120
+ /**
121
+ * Who can open this blob, without decrypting anything.
122
+ *
123
+ * Worth surfacing: a buyer has to be able to see that the seller — or a
124
+ * designated auditor — also holds a key to what they bought. Finding that out
125
+ * afterwards would destroy the privacy property.
126
+ */
127
+ declare function sealedRoles(raw: Uint8Array): RecipientRole[];
128
+ /**
129
+ * Parse the sealed-blob layout.
130
+ *
131
+ * `MAGIC | version | alg | ephLen | eph | cekNonce | wrappedLen | wrapped |
132
+ * bodyNonce | ciphertext`
133
+ *
134
+ * Every read is bounds-checked, so a truncated blob is a clear parse failure
135
+ * rather than an out-of-range surprise later.
136
+ */
137
+ declare function parseSealed(raw: Uint8Array): SealedEnvelope;
138
+ /**
139
+ * Decrypt a sealed envelope with whichever recipient slot belongs to `privateKey`.
140
+ *
141
+ * Tries every slot: a holder does not necessarily know which one is theirs, and
142
+ * in a multi-recipient envelope the payer is not always first. A slot that does
143
+ * not open is skipped, not reported — "that one was not for me" is not an error.
144
+ */
145
+ declare function unseal(sealed: SealedEnvelope, privateKey: Uint8Array, aad: Uint8Array): Uint8Array;
146
+ /**
147
+ * Fetch, decrypt and verify the body behind `evidence`.
148
+ *
149
+ * `privateKey` is the raw key of the wallet that paid: 32 bytes for both an EVM
150
+ * secp256k1 key and an ed25519 seed. Hex accepted with or without `0x`.
151
+ *
152
+ * In `direct` mode this needs no permission from anyone — the ciphertext was
153
+ * sealed to the public key of the wallet that paid, so retrieval is arithmetic
154
+ * rather than an access-control decision that could be refused or misconfigured.
155
+ *
156
+ * The `contentHash` check is **not optional**: it is what catches a seller that
157
+ * anchored something other than what it served.
158
+ */
159
+ declare function recoverEvidence(evidence: AnchoredEvidence, privateKey: Uint8Array | string, options?: {
160
+ fetch?: typeof fetch;
161
+ }): Promise<Uint8Array>;
162
+ /**
163
+ * Map an ed25519 public key to its X25519 form.
164
+ *
165
+ * On ed25519 chains (Solana, NEAR, Stellar, Algorand) the address **is** the
166
+ * public key, so this is all that stands between an address and an encryption
167
+ * target — no signature, no lookup.
168
+ */
169
+ declare function ed25519ToX25519(pubkey: Uint8Array): Uint8Array;
170
+ /**
171
+ * Recover an EVM payer's secp256k1 public key from their payment signature.
172
+ *
173
+ * `digest` is the EIP-712 digest the payer actually signed. Getting it wrong
174
+ * does not throw: it recovers a *different, perfectly valid* key, and the body
175
+ * would be sealed to a stranger while every log line said success. The token's
176
+ * EIP-712 domain name varies per chain and even flips between a chain's mainnet
177
+ * and testnet, so derive it from the same table the facilitator uses.
178
+ *
179
+ * Returns the SEC1-compressed key (33 bytes).
180
+ */
181
+ declare function payerKeyFromEvmSignature(signature: Uint8Array | string, digest: Uint8Array): Uint8Array;
182
+ /**
183
+ * Seal `body` so that only the holder of the payer's private key can read it.
184
+ *
185
+ * `payerKey` is a 33-byte SEC1-compressed secp256k1 key (EVM, XRPL) or a 32-byte
186
+ * X25519 key from {@link ed25519ToX25519}.
187
+ *
188
+ * `paymentIdValue` is bound in as AEAD associated data, which is what stops a
189
+ * ciphertext from being replayed as the evidence for a different payment.
190
+ * Derive it with {@link paymentId} on both sides — deriving it differently makes
191
+ * decryption fail with no obvious cause.
192
+ *
193
+ * Returns the bytes to upload. Nothing here touches the network.
194
+ */
195
+ declare function sealEvidence(body: Uint8Array, payerKey: Uint8Array, paymentIdValue: string): Uint8Array;
196
+
9
197
  /**
10
198
  * Facilitator wallet addresses by chain type
11
199
  *
@@ -653,4 +841,4 @@ interface EscrowPreAuthParams {
653
841
  */
654
842
  declare function buildEscrowPreAuth(wallet: EscrowPreAuthSigner, params: EscrowPreAuthParams): Promise<string>;
655
843
 
656
- export { type CreateSignedFetchConfig, type ERC8128RequestOptions, ESCROW_DEPOSIT_LIMIT_USD, ESCROW_TIER_WINDOWS, EVENT_KINDS, type EscrowNetworkConfig, type EscrowPaymentInfo, type EscrowPreAuthParams, type EscrowPreAuthSigner, type EscrowTierWindows, FACILITATOR_ADDRESSES, type FacilitatorAddresses, KEEPALIVE_INTERVAL_MS, OPERATOR_FEE_BPS, type SSEFrame, SSEParser, type SignRequestOptions, type SignRequestWithSignerOptions, type SignatureBaseParams, type SignatureHeaders, type SignatureParamsInput, SigningWalletAdapter, type StreamTrafficEventsOptions, type TrafficEvent, type TrafficEventKind, TrafficStreamError, buildEscrowPreAuth, buildSignatureBase, buildSignatureParams, computeEscrowNonce, createSignedFetch, fetchNonce, getFacilitatorAddress, matchesFilters, parseTrafficEvent, signRequest, signRequestWithSigner, signRequestWithWallet, streamTrafficEvents };
844
+ export { type AnchoredEvidence, ContentHashMismatch, type CreateSignedFetchConfig, DX402Error, type ERC8128RequestOptions, ESCROW_DEPOSIT_LIMIT_USD, ESCROW_TIER_WINDOWS, EVENT_KINDS, EVIDENCE_HEADER, type EscrowNetworkConfig, type EscrowPaymentInfo, type EscrowPreAuthParams, type EscrowPreAuthSigner, type EscrowTierWindows, type EvidenceMode, EvidenceSkipped, FACILITATOR_ADDRESSES, type FacilitatorAddresses, KEEPALIVE_INTERVAL_MS, OPERATOR_FEE_BPS, type RecipientRole, type SSEFrame, SSEParser, type SignRequestOptions, type SignRequestWithSignerOptions, type SignatureBaseParams, type SignatureHeaders, type SignatureParamsInput, SigningWalletAdapter, type StreamTrafficEventsOptions, type TrafficEvent, type TrafficEventKind, TrafficStreamError, buildEscrowPreAuth, buildSignatureBase, buildSignatureParams, computeEscrowNonce, contentHash, createSignedFetch, dereferencePointer, paymentId as dx402PaymentId, ed25519ToX25519, evidenceFromHeaders, fetchNonce, getFacilitatorAddress, isEndToEnd, matchesFilters, parseEvidenceHeader, parseSealed, parseTrafficEvent, payerKeyFromEvmSignature, recoverEvidence, sealEvidence, sealedRoles, signRequest, signRequestWithSigner, signRequestWithWallet, streamTrafficEvents, unseal };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,194 @@ export { a as EIP3009Authorization, E as EIP3009Params } from './wallet-w7BnImDG
6
6
  export { E as EnvKeyAdapter, O as OWSWallet, a as OWSWalletAdapter } from './ows-C-KmORG9.js';
7
7
  export { FacilitatorClient, FacilitatorClientOptions, HonoMiddlewareOptions, PaymentAcceptance, PaymentMiddlewareOptions, PaymentPayloadV2, PaymentRequirementsV2, ResourceInfoV2, SettleRequestV2, VerifiedPaymentState, VerifyRequestV2, X402_CORS_HEADERS, X402_HEADER_NAMES, buildPaymentRequirements, buildSettleRequest, buildSettleRequestV2, buildVerifyRequest, buildVerifyRequestV2, create402Response, createHonoMiddleware, createPaymentMiddleware, extractPaymentFromHeaders, getCorsHeaders } from './backend/index.js';
8
8
 
9
+ /**
10
+ * DX402 `durable-evidence`: recover a paid response after the fact.
11
+ *
12
+ * x402 settles payment on-chain permanently but delivers the purchased resource
13
+ * **exactly once**, in the body of a `200 OK`, and keeps nothing. A buyer who did
14
+ * not capture it at that instant cannot recover it, and neither party can later
15
+ * prove *what* was delivered — only *that* payment happened.
16
+ *
17
+ * DX402 closes that gap. The seller seals a copy of the response to the payer's
18
+ * own public key — recovered from the payment signature itself — and anchors it.
19
+ * The buyer gets an `X-Durable-Evidence` header pointing at it.
20
+ *
21
+ * **Paying is publishing your encryption key.** No registration, no key
22
+ * exchange, no extra round trip.
23
+ *
24
+ * ```ts
25
+ * const evidence = evidenceFromHeaders(response.headers);
26
+ * const body = await recoverEvidence(evidence, myPrivateKey);
27
+ * ```
28
+ *
29
+ * Specification: `docs/plans/dx402/02-SPEC-v0.1.md` in x402-rs.
30
+ */
31
+ declare const EVIDENCE_HEADER = "X-Durable-Evidence";
32
+ /** Why a party holds a key to this evidence. */
33
+ type RecipientRole = 'payer' | 'seller' | 'auditor';
34
+ declare class DX402Error extends Error {
35
+ constructor(message: string);
36
+ }
37
+ /**
38
+ * No evidence was anchored for this payment.
39
+ *
40
+ * A normal outcome, not a fault: the body may have exceeded the seller's size
41
+ * cap, the store may have been unreachable, or the payer may be a
42
+ * smart-contract wallet with no recoverable key.
43
+ */
44
+ declare class EvidenceSkipped extends DX402Error {
45
+ readonly reason: string;
46
+ constructor(reason: string);
47
+ }
48
+ /**
49
+ * The anchored bytes are not the bytes that were delivered.
50
+ *
51
+ * This is the interesting failure: the seller anchored something other than
52
+ * what it served, which is precisely the fraud `contentHash` exists to expose.
53
+ * Treat it as evidence of misbehaviour, not a transport glitch.
54
+ */
55
+ declare class ContentHashMismatch extends DX402Error {
56
+ readonly anchored: string;
57
+ readonly actual: string;
58
+ constructor(anchored: string, actual: string);
59
+ }
60
+ type EvidenceMode = 'direct' | 'escrowed';
61
+ interface AnchoredEvidence {
62
+ v: number;
63
+ paymentId: string;
64
+ pointer: string;
65
+ backend: string;
66
+ contentHash: string;
67
+ cipher: string;
68
+ keyAlg: 'ECIES-secp256k1' | 'ECIES-X25519';
69
+ mode: EvidenceMode;
70
+ retention: string;
71
+ receipt?: string;
72
+ }
73
+ /**
74
+ * Whether the facilitator is cryptographically unable to read this payload.
75
+ *
76
+ * `direct` and `escrowed` make materially different claims about who can open
77
+ * the payload, so a caller that cares about confidentiality must check rather
78
+ * than assume.
79
+ */
80
+ declare function isEndToEnd(evidence: AnchoredEvidence): boolean;
81
+ /** keccak256 of a body, `0x`-prefixed — matching the facilitator's `contentHash`. */
82
+ declare function contentHash(body: Uint8Array): string;
83
+ /**
84
+ * Derive the canonical payment identifier: `keccak256(caip2Network || txHash)`.
85
+ *
86
+ * This value is the AEAD associated data binding a ciphertext to its payment.
87
+ * Buyer and seller must derive it identically or decryption fails with no
88
+ * obvious cause, which is why it lives in the SDK rather than in each caller.
89
+ */
90
+ declare function paymentId(caip2Network: string, txHash: string): string;
91
+ /** Parse an `X-Durable-Evidence` header value. */
92
+ declare function parseEvidenceHeader(value: string): AnchoredEvidence;
93
+ /**
94
+ * Pull the anchored evidence out of a response's headers.
95
+ *
96
+ * Accepts a `Headers` object or a plain record. Lookup is case-insensitive,
97
+ * because HTTP does not care and different clients disagree about casing.
98
+ */
99
+ declare function evidenceFromHeaders(headers: Headers | Record<string, string>): AnchoredEvidence;
100
+ /**
101
+ * Turn a DX402 pointer into a fetchable URL.
102
+ *
103
+ * `s3+https://...` is a scheme tag over an ordinary HTTPS URL; `ipfs://` and
104
+ * `ar://` go through public gateways. Anything else passes through untouched, so
105
+ * a caller with their own resolver is not blocked by this function.
106
+ */
107
+ declare function dereferencePointer(pointer: string): string;
108
+ interface Recipient {
109
+ role: RecipientRole;
110
+ alg: 'secp256k1' | 'x25519';
111
+ ephemeral: Uint8Array;
112
+ cekNonce: Uint8Array;
113
+ wrappedCek: Uint8Array;
114
+ }
115
+ interface SealedEnvelope {
116
+ recipients: Recipient[];
117
+ bodyNonce: Uint8Array;
118
+ ciphertext: Uint8Array;
119
+ }
120
+ /**
121
+ * Who can open this blob, without decrypting anything.
122
+ *
123
+ * Worth surfacing: a buyer has to be able to see that the seller — or a
124
+ * designated auditor — also holds a key to what they bought. Finding that out
125
+ * afterwards would destroy the privacy property.
126
+ */
127
+ declare function sealedRoles(raw: Uint8Array): RecipientRole[];
128
+ /**
129
+ * Parse the sealed-blob layout.
130
+ *
131
+ * `MAGIC | version | alg | ephLen | eph | cekNonce | wrappedLen | wrapped |
132
+ * bodyNonce | ciphertext`
133
+ *
134
+ * Every read is bounds-checked, so a truncated blob is a clear parse failure
135
+ * rather than an out-of-range surprise later.
136
+ */
137
+ declare function parseSealed(raw: Uint8Array): SealedEnvelope;
138
+ /**
139
+ * Decrypt a sealed envelope with whichever recipient slot belongs to `privateKey`.
140
+ *
141
+ * Tries every slot: a holder does not necessarily know which one is theirs, and
142
+ * in a multi-recipient envelope the payer is not always first. A slot that does
143
+ * not open is skipped, not reported — "that one was not for me" is not an error.
144
+ */
145
+ declare function unseal(sealed: SealedEnvelope, privateKey: Uint8Array, aad: Uint8Array): Uint8Array;
146
+ /**
147
+ * Fetch, decrypt and verify the body behind `evidence`.
148
+ *
149
+ * `privateKey` is the raw key of the wallet that paid: 32 bytes for both an EVM
150
+ * secp256k1 key and an ed25519 seed. Hex accepted with or without `0x`.
151
+ *
152
+ * In `direct` mode this needs no permission from anyone — the ciphertext was
153
+ * sealed to the public key of the wallet that paid, so retrieval is arithmetic
154
+ * rather than an access-control decision that could be refused or misconfigured.
155
+ *
156
+ * The `contentHash` check is **not optional**: it is what catches a seller that
157
+ * anchored something other than what it served.
158
+ */
159
+ declare function recoverEvidence(evidence: AnchoredEvidence, privateKey: Uint8Array | string, options?: {
160
+ fetch?: typeof fetch;
161
+ }): Promise<Uint8Array>;
162
+ /**
163
+ * Map an ed25519 public key to its X25519 form.
164
+ *
165
+ * On ed25519 chains (Solana, NEAR, Stellar, Algorand) the address **is** the
166
+ * public key, so this is all that stands between an address and an encryption
167
+ * target — no signature, no lookup.
168
+ */
169
+ declare function ed25519ToX25519(pubkey: Uint8Array): Uint8Array;
170
+ /**
171
+ * Recover an EVM payer's secp256k1 public key from their payment signature.
172
+ *
173
+ * `digest` is the EIP-712 digest the payer actually signed. Getting it wrong
174
+ * does not throw: it recovers a *different, perfectly valid* key, and the body
175
+ * would be sealed to a stranger while every log line said success. The token's
176
+ * EIP-712 domain name varies per chain and even flips between a chain's mainnet
177
+ * and testnet, so derive it from the same table the facilitator uses.
178
+ *
179
+ * Returns the SEC1-compressed key (33 bytes).
180
+ */
181
+ declare function payerKeyFromEvmSignature(signature: Uint8Array | string, digest: Uint8Array): Uint8Array;
182
+ /**
183
+ * Seal `body` so that only the holder of the payer's private key can read it.
184
+ *
185
+ * `payerKey` is a 33-byte SEC1-compressed secp256k1 key (EVM, XRPL) or a 32-byte
186
+ * X25519 key from {@link ed25519ToX25519}.
187
+ *
188
+ * `paymentIdValue` is bound in as AEAD associated data, which is what stops a
189
+ * ciphertext from being replayed as the evidence for a different payment.
190
+ * Derive it with {@link paymentId} on both sides — deriving it differently makes
191
+ * decryption fail with no obvious cause.
192
+ *
193
+ * Returns the bytes to upload. Nothing here touches the network.
194
+ */
195
+ declare function sealEvidence(body: Uint8Array, payerKey: Uint8Array, paymentIdValue: string): Uint8Array;
196
+
9
197
  /**
10
198
  * Facilitator wallet addresses by chain type
11
199
  *
@@ -653,4 +841,4 @@ interface EscrowPreAuthParams {
653
841
  */
654
842
  declare function buildEscrowPreAuth(wallet: EscrowPreAuthSigner, params: EscrowPreAuthParams): Promise<string>;
655
843
 
656
- export { type CreateSignedFetchConfig, type ERC8128RequestOptions, ESCROW_DEPOSIT_LIMIT_USD, ESCROW_TIER_WINDOWS, EVENT_KINDS, type EscrowNetworkConfig, type EscrowPaymentInfo, type EscrowPreAuthParams, type EscrowPreAuthSigner, type EscrowTierWindows, FACILITATOR_ADDRESSES, type FacilitatorAddresses, KEEPALIVE_INTERVAL_MS, OPERATOR_FEE_BPS, type SSEFrame, SSEParser, type SignRequestOptions, type SignRequestWithSignerOptions, type SignatureBaseParams, type SignatureHeaders, type SignatureParamsInput, SigningWalletAdapter, type StreamTrafficEventsOptions, type TrafficEvent, type TrafficEventKind, TrafficStreamError, buildEscrowPreAuth, buildSignatureBase, buildSignatureParams, computeEscrowNonce, createSignedFetch, fetchNonce, getFacilitatorAddress, matchesFilters, parseTrafficEvent, signRequest, signRequestWithSigner, signRequestWithWallet, streamTrafficEvents };
844
+ export { type AnchoredEvidence, ContentHashMismatch, type CreateSignedFetchConfig, DX402Error, type ERC8128RequestOptions, ESCROW_DEPOSIT_LIMIT_USD, ESCROW_TIER_WINDOWS, EVENT_KINDS, EVIDENCE_HEADER, type EscrowNetworkConfig, type EscrowPaymentInfo, type EscrowPreAuthParams, type EscrowPreAuthSigner, type EscrowTierWindows, type EvidenceMode, EvidenceSkipped, FACILITATOR_ADDRESSES, type FacilitatorAddresses, KEEPALIVE_INTERVAL_MS, OPERATOR_FEE_BPS, type RecipientRole, type SSEFrame, SSEParser, type SignRequestOptions, type SignRequestWithSignerOptions, type SignatureBaseParams, type SignatureHeaders, type SignatureParamsInput, SigningWalletAdapter, type StreamTrafficEventsOptions, type TrafficEvent, type TrafficEventKind, TrafficStreamError, buildEscrowPreAuth, buildSignatureBase, buildSignatureParams, computeEscrowNonce, contentHash, createSignedFetch, dereferencePointer, paymentId as dx402PaymentId, ed25519ToX25519, evidenceFromHeaders, fetchNonce, getFacilitatorAddress, isEndToEnd, matchesFilters, parseEvidenceHeader, parseSealed, parseTrafficEvent, payerKeyFromEvmSignature, recoverEvidence, sealEvidence, sealedRoles, signRequest, signRequestWithSigner, signRequestWithWallet, streamTrafficEvents, unseal };