uvd-x402-sdk 2.107.0 → 2.109.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/README.md CHANGED
@@ -10,6 +10,8 @@ Users sign a message or transaction, and the Ultravioleta facilitator handles on
10
10
 
11
11
  ## Features
12
12
 
13
+ **Arras NEAR escrow (v2.108.0):** offline local-key NEP-366 authorization, canonical Rust payment IDs and pull lifecycle helpers through `uvd-x402-sdk/near`. [Guide and agent example](docs/near-escrow.md). As of 2026-11-02 the facilitator advertises escrow only on testnet, and the SDK's escrow contract registry has no mainnet row yet.
14
+
13
15
  - **31 Networks**: EVM (19 including HashKey Chain, Arc, Scroll, SKALE Base, Robinhood Chain), Solana, Fogo, Stellar, NEAR, Algorand, Sui, XRP Ledger, Hedera (mainnet + testnet)
14
16
  - **Multi-Stablecoin**: USDC, EURC, AUSD, PYUSD, USDT, USDG (Robinhood Chain)
15
17
  - **x402 v1 & v2**: Protocol auto-detection; native Hedera supports v2/exact only
@@ -1,5 +1,249 @@
1
1
  import { W as WalletAdapter, C as ChainConfig, P as PaymentInfo, X as X402Version } from '../../index-DARXHuQl.mjs';
2
2
 
3
+ type NearEscrowNetwork = 'near:mainnet' | 'near:testnet';
4
+ /** Numbers must be safe integers; use decimal strings or bigint for nanoseconds and u128. */
5
+ type NearUnsigned = string | bigint | number;
6
+ interface EscrowMsgParams {
7
+ operator_id: string;
8
+ receiver: string;
9
+ release_deadline: NearUnsigned;
10
+ reclaim_after: NearUnsigned;
11
+ fee_bps_max: number;
12
+ terms_hash: string;
13
+ salt: string;
14
+ }
15
+ interface PaymentIdParams extends EscrowMsgParams {
16
+ token: string;
17
+ payer: string;
18
+ amount: NearUnsigned;
19
+ }
20
+ interface NearLocalSigner {
21
+ readonly publicKey: Uint8Array;
22
+ /** Sign the supplied SHA-256 digest directly. The calling helper supplies its domain prefix. */
23
+ sign(digest: Uint8Array): Uint8Array | Promise<Uint8Array>;
24
+ }
25
+ interface NearEscrowDelegateOptions {
26
+ network: NearEscrowNetwork;
27
+ signer: NearLocalSigner;
28
+ senderId: string;
29
+ escrowContract: string;
30
+ /** The next access-key nonce, not the current nonce. */
31
+ nonce: NearUnsigned;
32
+ maxBlockHeight: NearUnsigned;
33
+ /** Gas units (1 TGas = 10^12), not a floating point TGas count. */
34
+ gas?: NearUnsigned;
35
+ }
36
+ interface EscrowAuthorizationOptions extends NearEscrowDelegateOptions {
37
+ token: string;
38
+ amount: NearUnsigned;
39
+ msg: EscrowMsgParams;
40
+ }
41
+ interface NearEscrowPayment {
42
+ x402Version: 2;
43
+ scheme: 'escrow';
44
+ network: NearEscrowNetwork;
45
+ payload: {
46
+ signedDelegateAction: string;
47
+ };
48
+ }
49
+ interface NearEscrowFunctionCall {
50
+ methodName: string;
51
+ args: string;
52
+ gas: NearUnsigned;
53
+ deposit: NearUnsigned;
54
+ }
55
+ interface NearEscrowDelegate {
56
+ senderId: string;
57
+ receiverId: string;
58
+ actions: NearEscrowFunctionCall[];
59
+ nonce: NearUnsigned;
60
+ maxBlockHeight: NearUnsigned;
61
+ }
62
+ declare const NEAR_ESCROW_MIN_GAS = 38000000000000n;
63
+ declare const NEAR_ESCROW_MAX_GAS = 100000000000000n;
64
+ declare const NEAR_ESCROW_TOKENS: Readonly<Record<NearEscrowNetwork, string>>;
65
+ /**
66
+ * The Arras escrow deployments this SDK signs for, per network. Any other escrowContract is refused before the
67
+ * signer is called, for authorization and lifecycle alike: a signed delegate can be relayed by anyone, so a 402
68
+ * server must not be able to point it at its own account. Mainnet stays empty until its contract ships in a release.
69
+ */
70
+ declare const NEAR_ESCROW_CONTRACTS: Readonly<Record<NearEscrowNetwork, readonly string[]>>;
71
+ /** Canonical Arras JSON: field order, decimal-string timestamps, lowercase hex, no spaces. */
72
+ declare function buildEscrowMsg(p: EscrowMsgParams): string;
73
+ /** Exact Rust Borsh preimage, exposed for cross-language conformance. */
74
+ declare function paymentIdPreimage(p: PaymentIdParams): Uint8Array;
75
+ declare function computePaymentId(p: PaymentIdParams): string;
76
+ /** A 32-byte Ed25519 seed, or a NEAR ed25519: base58 secret (seed + public key, 64 bytes). */
77
+ declare function createNearLocalSigner(secret: Uint8Array | string): NearLocalSigner;
78
+ /** Build the one allowed FT action. The contract must be in NEAR_ESCROW_CONTRACTS; the operator comes from trusted /supported configuration. */
79
+ declare function buildEscrowAuthorizationDelegate(o: EscrowAuthorizationOptions): NearEscrowDelegate;
80
+ /** Validate before signing, including strict byte binding to the expected canonical FT arguments. */
81
+ declare function validateEscrowAuthorizationDelegate(d: NearEscrowDelegate, o: EscrowAuthorizationOptions): void;
82
+ declare function signEscrowAuthorization(options: EscrowAuthorizationOptions): Promise<NearEscrowPayment>;
83
+ type NearEscrowLifecycleMethod = 'release' | 'refund' | 'reclaim' | 'withdraw' | 'withdraw_for';
84
+ declare function signEscrowLifecycle(options: NearEscrowDelegateOptions, method: NearEscrowLifecycleMethod, args?: {
85
+ payment_id?: string;
86
+ amount?: NearUnsigned | null;
87
+ account?: string;
88
+ }): Promise<NearEscrowPayment>;
89
+ declare const release: (o: NearEscrowDelegateOptions, paymentId: string, amount?: NearUnsigned | null) => Promise<NearEscrowPayment>;
90
+ declare const refund: (o: NearEscrowDelegateOptions, paymentId: string) => Promise<NearEscrowPayment>;
91
+ declare const reclaim: (o: NearEscrowDelegateOptions, paymentId: string) => Promise<NearEscrowPayment>;
92
+ declare const withdraw: (o: NearEscrowDelegateOptions) => Promise<NearEscrowPayment>;
93
+ declare const withdrawFor: (o: NearEscrowDelegateOptions, account: string) => Promise<NearEscrowPayment>;
94
+ /** v2 boundary only: no budget wire format or signing is defined until Arras v2 supplies its vectors. */
95
+ interface AuthorizeFromBudget {
96
+ authorizeFromBudget(request: unknown): Promise<NearEscrowPayment>;
97
+ }
98
+ /** Local-key exact NEP-366 payment; uses the escrow serializer and raw digest signer. */
99
+ interface NearExactDelegateOptions extends Omit<NearEscrowDelegateOptions, 'escrowContract'> {
100
+ token: string;
101
+ payTo: string;
102
+ amount: NearUnsigned;
103
+ }
104
+ interface NearExactPayment extends Omit<NearEscrowPayment, 'scheme'> {
105
+ scheme: 'exact';
106
+ }
107
+ declare function signExactNearDelegate(options: NearExactDelegateOptions): Promise<NearExactPayment>;
108
+
109
+ interface Nep413Message {
110
+ message: string;
111
+ nonce: Uint8Array;
112
+ recipient: string;
113
+ callbackUrl?: string;
114
+ }
115
+ interface SignNep413Options extends Nep413Message {
116
+ signer: NearLocalSigner;
117
+ accountId: string;
118
+ }
119
+ interface Nep413SignedMessage {
120
+ accountId: string;
121
+ publicKey: string;
122
+ signature: string;
123
+ }
124
+ /** Prefix 2^31+413 followed by message, fixed nonce, recipient and Option<String> callback. */
125
+ declare function nep413Preimage(options: Nep413Message): Uint8Array;
126
+ declare function signNep413(options: SignNep413Options): Promise<Nep413SignedMessage>;
127
+
128
+ /** Payer-funded NEP-145 calls. These are unsigned normal transactions, never facilitator delegates. */
129
+
130
+ interface NearStorageTransaction {
131
+ signerId: string;
132
+ receiverId: string;
133
+ actions: [
134
+ {
135
+ type: 'FunctionCall';
136
+ params: {
137
+ methodName: 'storage_deposit';
138
+ args: {
139
+ account_id: string;
140
+ registration_only: boolean;
141
+ };
142
+ gas: string;
143
+ deposit: string;
144
+ };
145
+ }
146
+ ];
147
+ }
148
+ interface NearStorageOptions {
149
+ network: NearEscrowNetwork;
150
+ /** Account that signs the normal transaction and pays its deposit and gas. */
151
+ payerId: string;
152
+ /** Account to register or fund; defaults to payerId. */
153
+ accountId?: string;
154
+ /** YoctoNEAR, not NEAR. Query storage_balance_bounds for the live contract minimum. */
155
+ deposit?: NearUnsigned;
156
+ }
157
+ /** Explicit trusted deployment configuration; this unsigned builder does not select an account parent. */
158
+ interface ArrasStorageOptions extends NearStorageOptions {
159
+ escrowContract: string;
160
+ }
161
+ declare const NEAR_ARRAS_STORAGE_DEPOSIT = "50000000000000000000000";
162
+ declare const NEAR_USDC_STORAGE_DEPOSIT = "1250000000000000000000";
163
+ /** Keep surplus available for payment storage; registration_only must be false for Arras. */
164
+ declare function buildArrasStorageDeposit(options: ArrasStorageOptions): NearStorageTransaction;
165
+ /** Register in native USDC; refund any surplus rather than topping up an FT registration. */
166
+ declare function buildUsdcStorageDeposit(options: NearStorageOptions): NearStorageTransaction;
167
+
168
+ interface ArrasAuthorizedData {
169
+ payment_id: string;
170
+ operator_id: string;
171
+ token: string;
172
+ payer: string;
173
+ receiver: string;
174
+ amount: string;
175
+ fee_bps: number;
176
+ fee_recipient: string;
177
+ terms_hash: string;
178
+ }
179
+ interface ArrasReleasedData {
180
+ payment_id: string;
181
+ amount: string;
182
+ net: string;
183
+ fee: string;
184
+ }
185
+ interface ArrasPaymentAmountData {
186
+ payment_id: string;
187
+ amount: string;
188
+ }
189
+ interface ArrasWithdrawnData {
190
+ account: string;
191
+ token: string;
192
+ amount: string;
193
+ ok: boolean;
194
+ }
195
+ interface ArrasCompactedData {
196
+ payment_id: string;
197
+ }
198
+ interface ArrasOperatorData {
199
+ operator_id: string;
200
+ owner?: string;
201
+ capturers?: string[];
202
+ fee_bps?: number;
203
+ fee_recipient?: string;
204
+ min_amount?: string;
205
+ tope_tvl_operador?: string;
206
+ tope_tvl_por_payer?: string;
207
+ sponsor_max_por_payer?: string;
208
+ }
209
+ interface ArrasCapsSetData {
210
+ by: string;
211
+ tope_por_pago: string;
212
+ tope_tvl_global: string;
213
+ }
214
+ interface ArrasPauseData {
215
+ by: string;
216
+ paused: boolean;
217
+ at: string;
218
+ }
219
+ interface ArrasEventData {
220
+ authorized: ArrasAuthorizedData;
221
+ released: ArrasReleasedData;
222
+ refunded: ArrasPaymentAmountData;
223
+ reclaimed: ArrasPaymentAmountData;
224
+ withdrawn: ArrasWithdrawnData;
225
+ compacted: ArrasCompactedData;
226
+ operator_registered: ArrasOperatorData;
227
+ operator_updated: ArrasOperatorData;
228
+ caps_set: ArrasCapsSetData;
229
+ paused: ArrasPauseData;
230
+ unpaused: ArrasPauseData;
231
+ }
232
+ type ArrasEvent = {
233
+ [K in keyof ArrasEventData]: {
234
+ standard: 'arras';
235
+ version: '1.0.0';
236
+ event: K;
237
+ data: ArrasEventData[K][];
238
+ };
239
+ }[keyof ArrasEventData];
240
+ /**
241
+ * Pass flattened receipt outcome logs. Foreign logs, malformed envelopes/data and unknown
242
+ * standards, versions or events are skipped. Preserve each batch and decimal integer bytes.
243
+ * Logs alone do not authenticate the emitter: the caller must check the receipt executor/status.
244
+ */
245
+ declare function parseArrasEvents(logs: readonly unknown[]): ArrasEvent[];
246
+
3
247
  /**
4
248
  * uvd-x402-sdk - NEAR Provider
5
249
  *
@@ -138,4 +382,4 @@ declare class NEARProvider implements WalletAdapter {
138
382
  private base58Encode;
139
383
  }
140
384
 
141
- export { NEARProvider, type WalletSelectorOptions, NEARProvider as default };
385
+ export { type ArrasAuthorizedData, type ArrasCapsSetData, type ArrasCompactedData, type ArrasEvent, type ArrasEventData, type ArrasOperatorData, type ArrasPauseData, type ArrasPaymentAmountData, type ArrasReleasedData, type ArrasStorageOptions, type ArrasWithdrawnData, type AuthorizeFromBudget, type EscrowAuthorizationOptions, type EscrowMsgParams, NEARProvider, NEAR_ARRAS_STORAGE_DEPOSIT, NEAR_ESCROW_CONTRACTS, NEAR_ESCROW_MAX_GAS, NEAR_ESCROW_MIN_GAS, NEAR_ESCROW_TOKENS, NEAR_USDC_STORAGE_DEPOSIT, type NearEscrowDelegate, type NearEscrowDelegateOptions, type NearEscrowFunctionCall, type NearEscrowLifecycleMethod, type NearEscrowNetwork, type NearEscrowPayment, type NearExactDelegateOptions, type NearExactPayment, type NearLocalSigner, type NearStorageOptions, type NearStorageTransaction, type NearUnsigned, type Nep413Message, type Nep413SignedMessage, type PaymentIdParams, type SignNep413Options, type WalletSelectorOptions, buildArrasStorageDeposit, buildEscrowAuthorizationDelegate, buildEscrowMsg, buildUsdcStorageDeposit, computePaymentId, createNearLocalSigner, NEARProvider as default, nep413Preimage, parseArrasEvents, paymentIdPreimage, reclaim, refund, release, signEscrowAuthorization, signEscrowLifecycle, signExactNearDelegate, signNep413, validateEscrowAuthorizationDelegate, withdraw, withdrawFor };
@@ -1,5 +1,249 @@
1
1
  import { W as WalletAdapter, C as ChainConfig, P as PaymentInfo, X as X402Version } from '../../index-DARXHuQl.js';
2
2
 
3
+ type NearEscrowNetwork = 'near:mainnet' | 'near:testnet';
4
+ /** Numbers must be safe integers; use decimal strings or bigint for nanoseconds and u128. */
5
+ type NearUnsigned = string | bigint | number;
6
+ interface EscrowMsgParams {
7
+ operator_id: string;
8
+ receiver: string;
9
+ release_deadline: NearUnsigned;
10
+ reclaim_after: NearUnsigned;
11
+ fee_bps_max: number;
12
+ terms_hash: string;
13
+ salt: string;
14
+ }
15
+ interface PaymentIdParams extends EscrowMsgParams {
16
+ token: string;
17
+ payer: string;
18
+ amount: NearUnsigned;
19
+ }
20
+ interface NearLocalSigner {
21
+ readonly publicKey: Uint8Array;
22
+ /** Sign the supplied SHA-256 digest directly. The calling helper supplies its domain prefix. */
23
+ sign(digest: Uint8Array): Uint8Array | Promise<Uint8Array>;
24
+ }
25
+ interface NearEscrowDelegateOptions {
26
+ network: NearEscrowNetwork;
27
+ signer: NearLocalSigner;
28
+ senderId: string;
29
+ escrowContract: string;
30
+ /** The next access-key nonce, not the current nonce. */
31
+ nonce: NearUnsigned;
32
+ maxBlockHeight: NearUnsigned;
33
+ /** Gas units (1 TGas = 10^12), not a floating point TGas count. */
34
+ gas?: NearUnsigned;
35
+ }
36
+ interface EscrowAuthorizationOptions extends NearEscrowDelegateOptions {
37
+ token: string;
38
+ amount: NearUnsigned;
39
+ msg: EscrowMsgParams;
40
+ }
41
+ interface NearEscrowPayment {
42
+ x402Version: 2;
43
+ scheme: 'escrow';
44
+ network: NearEscrowNetwork;
45
+ payload: {
46
+ signedDelegateAction: string;
47
+ };
48
+ }
49
+ interface NearEscrowFunctionCall {
50
+ methodName: string;
51
+ args: string;
52
+ gas: NearUnsigned;
53
+ deposit: NearUnsigned;
54
+ }
55
+ interface NearEscrowDelegate {
56
+ senderId: string;
57
+ receiverId: string;
58
+ actions: NearEscrowFunctionCall[];
59
+ nonce: NearUnsigned;
60
+ maxBlockHeight: NearUnsigned;
61
+ }
62
+ declare const NEAR_ESCROW_MIN_GAS = 38000000000000n;
63
+ declare const NEAR_ESCROW_MAX_GAS = 100000000000000n;
64
+ declare const NEAR_ESCROW_TOKENS: Readonly<Record<NearEscrowNetwork, string>>;
65
+ /**
66
+ * The Arras escrow deployments this SDK signs for, per network. Any other escrowContract is refused before the
67
+ * signer is called, for authorization and lifecycle alike: a signed delegate can be relayed by anyone, so a 402
68
+ * server must not be able to point it at its own account. Mainnet stays empty until its contract ships in a release.
69
+ */
70
+ declare const NEAR_ESCROW_CONTRACTS: Readonly<Record<NearEscrowNetwork, readonly string[]>>;
71
+ /** Canonical Arras JSON: field order, decimal-string timestamps, lowercase hex, no spaces. */
72
+ declare function buildEscrowMsg(p: EscrowMsgParams): string;
73
+ /** Exact Rust Borsh preimage, exposed for cross-language conformance. */
74
+ declare function paymentIdPreimage(p: PaymentIdParams): Uint8Array;
75
+ declare function computePaymentId(p: PaymentIdParams): string;
76
+ /** A 32-byte Ed25519 seed, or a NEAR ed25519: base58 secret (seed + public key, 64 bytes). */
77
+ declare function createNearLocalSigner(secret: Uint8Array | string): NearLocalSigner;
78
+ /** Build the one allowed FT action. The contract must be in NEAR_ESCROW_CONTRACTS; the operator comes from trusted /supported configuration. */
79
+ declare function buildEscrowAuthorizationDelegate(o: EscrowAuthorizationOptions): NearEscrowDelegate;
80
+ /** Validate before signing, including strict byte binding to the expected canonical FT arguments. */
81
+ declare function validateEscrowAuthorizationDelegate(d: NearEscrowDelegate, o: EscrowAuthorizationOptions): void;
82
+ declare function signEscrowAuthorization(options: EscrowAuthorizationOptions): Promise<NearEscrowPayment>;
83
+ type NearEscrowLifecycleMethod = 'release' | 'refund' | 'reclaim' | 'withdraw' | 'withdraw_for';
84
+ declare function signEscrowLifecycle(options: NearEscrowDelegateOptions, method: NearEscrowLifecycleMethod, args?: {
85
+ payment_id?: string;
86
+ amount?: NearUnsigned | null;
87
+ account?: string;
88
+ }): Promise<NearEscrowPayment>;
89
+ declare const release: (o: NearEscrowDelegateOptions, paymentId: string, amount?: NearUnsigned | null) => Promise<NearEscrowPayment>;
90
+ declare const refund: (o: NearEscrowDelegateOptions, paymentId: string) => Promise<NearEscrowPayment>;
91
+ declare const reclaim: (o: NearEscrowDelegateOptions, paymentId: string) => Promise<NearEscrowPayment>;
92
+ declare const withdraw: (o: NearEscrowDelegateOptions) => Promise<NearEscrowPayment>;
93
+ declare const withdrawFor: (o: NearEscrowDelegateOptions, account: string) => Promise<NearEscrowPayment>;
94
+ /** v2 boundary only: no budget wire format or signing is defined until Arras v2 supplies its vectors. */
95
+ interface AuthorizeFromBudget {
96
+ authorizeFromBudget(request: unknown): Promise<NearEscrowPayment>;
97
+ }
98
+ /** Local-key exact NEP-366 payment; uses the escrow serializer and raw digest signer. */
99
+ interface NearExactDelegateOptions extends Omit<NearEscrowDelegateOptions, 'escrowContract'> {
100
+ token: string;
101
+ payTo: string;
102
+ amount: NearUnsigned;
103
+ }
104
+ interface NearExactPayment extends Omit<NearEscrowPayment, 'scheme'> {
105
+ scheme: 'exact';
106
+ }
107
+ declare function signExactNearDelegate(options: NearExactDelegateOptions): Promise<NearExactPayment>;
108
+
109
+ interface Nep413Message {
110
+ message: string;
111
+ nonce: Uint8Array;
112
+ recipient: string;
113
+ callbackUrl?: string;
114
+ }
115
+ interface SignNep413Options extends Nep413Message {
116
+ signer: NearLocalSigner;
117
+ accountId: string;
118
+ }
119
+ interface Nep413SignedMessage {
120
+ accountId: string;
121
+ publicKey: string;
122
+ signature: string;
123
+ }
124
+ /** Prefix 2^31+413 followed by message, fixed nonce, recipient and Option<String> callback. */
125
+ declare function nep413Preimage(options: Nep413Message): Uint8Array;
126
+ declare function signNep413(options: SignNep413Options): Promise<Nep413SignedMessage>;
127
+
128
+ /** Payer-funded NEP-145 calls. These are unsigned normal transactions, never facilitator delegates. */
129
+
130
+ interface NearStorageTransaction {
131
+ signerId: string;
132
+ receiverId: string;
133
+ actions: [
134
+ {
135
+ type: 'FunctionCall';
136
+ params: {
137
+ methodName: 'storage_deposit';
138
+ args: {
139
+ account_id: string;
140
+ registration_only: boolean;
141
+ };
142
+ gas: string;
143
+ deposit: string;
144
+ };
145
+ }
146
+ ];
147
+ }
148
+ interface NearStorageOptions {
149
+ network: NearEscrowNetwork;
150
+ /** Account that signs the normal transaction and pays its deposit and gas. */
151
+ payerId: string;
152
+ /** Account to register or fund; defaults to payerId. */
153
+ accountId?: string;
154
+ /** YoctoNEAR, not NEAR. Query storage_balance_bounds for the live contract minimum. */
155
+ deposit?: NearUnsigned;
156
+ }
157
+ /** Explicit trusted deployment configuration; this unsigned builder does not select an account parent. */
158
+ interface ArrasStorageOptions extends NearStorageOptions {
159
+ escrowContract: string;
160
+ }
161
+ declare const NEAR_ARRAS_STORAGE_DEPOSIT = "50000000000000000000000";
162
+ declare const NEAR_USDC_STORAGE_DEPOSIT = "1250000000000000000000";
163
+ /** Keep surplus available for payment storage; registration_only must be false for Arras. */
164
+ declare function buildArrasStorageDeposit(options: ArrasStorageOptions): NearStorageTransaction;
165
+ /** Register in native USDC; refund any surplus rather than topping up an FT registration. */
166
+ declare function buildUsdcStorageDeposit(options: NearStorageOptions): NearStorageTransaction;
167
+
168
+ interface ArrasAuthorizedData {
169
+ payment_id: string;
170
+ operator_id: string;
171
+ token: string;
172
+ payer: string;
173
+ receiver: string;
174
+ amount: string;
175
+ fee_bps: number;
176
+ fee_recipient: string;
177
+ terms_hash: string;
178
+ }
179
+ interface ArrasReleasedData {
180
+ payment_id: string;
181
+ amount: string;
182
+ net: string;
183
+ fee: string;
184
+ }
185
+ interface ArrasPaymentAmountData {
186
+ payment_id: string;
187
+ amount: string;
188
+ }
189
+ interface ArrasWithdrawnData {
190
+ account: string;
191
+ token: string;
192
+ amount: string;
193
+ ok: boolean;
194
+ }
195
+ interface ArrasCompactedData {
196
+ payment_id: string;
197
+ }
198
+ interface ArrasOperatorData {
199
+ operator_id: string;
200
+ owner?: string;
201
+ capturers?: string[];
202
+ fee_bps?: number;
203
+ fee_recipient?: string;
204
+ min_amount?: string;
205
+ tope_tvl_operador?: string;
206
+ tope_tvl_por_payer?: string;
207
+ sponsor_max_por_payer?: string;
208
+ }
209
+ interface ArrasCapsSetData {
210
+ by: string;
211
+ tope_por_pago: string;
212
+ tope_tvl_global: string;
213
+ }
214
+ interface ArrasPauseData {
215
+ by: string;
216
+ paused: boolean;
217
+ at: string;
218
+ }
219
+ interface ArrasEventData {
220
+ authorized: ArrasAuthorizedData;
221
+ released: ArrasReleasedData;
222
+ refunded: ArrasPaymentAmountData;
223
+ reclaimed: ArrasPaymentAmountData;
224
+ withdrawn: ArrasWithdrawnData;
225
+ compacted: ArrasCompactedData;
226
+ operator_registered: ArrasOperatorData;
227
+ operator_updated: ArrasOperatorData;
228
+ caps_set: ArrasCapsSetData;
229
+ paused: ArrasPauseData;
230
+ unpaused: ArrasPauseData;
231
+ }
232
+ type ArrasEvent = {
233
+ [K in keyof ArrasEventData]: {
234
+ standard: 'arras';
235
+ version: '1.0.0';
236
+ event: K;
237
+ data: ArrasEventData[K][];
238
+ };
239
+ }[keyof ArrasEventData];
240
+ /**
241
+ * Pass flattened receipt outcome logs. Foreign logs, malformed envelopes/data and unknown
242
+ * standards, versions or events are skipped. Preserve each batch and decimal integer bytes.
243
+ * Logs alone do not authenticate the emitter: the caller must check the receipt executor/status.
244
+ */
245
+ declare function parseArrasEvents(logs: readonly unknown[]): ArrasEvent[];
246
+
3
247
  /**
4
248
  * uvd-x402-sdk - NEAR Provider
5
249
  *
@@ -138,4 +382,4 @@ declare class NEARProvider implements WalletAdapter {
138
382
  private base58Encode;
139
383
  }
140
384
 
141
- export { NEARProvider, type WalletSelectorOptions, NEARProvider as default };
385
+ export { type ArrasAuthorizedData, type ArrasCapsSetData, type ArrasCompactedData, type ArrasEvent, type ArrasEventData, type ArrasOperatorData, type ArrasPauseData, type ArrasPaymentAmountData, type ArrasReleasedData, type ArrasStorageOptions, type ArrasWithdrawnData, type AuthorizeFromBudget, type EscrowAuthorizationOptions, type EscrowMsgParams, NEARProvider, NEAR_ARRAS_STORAGE_DEPOSIT, NEAR_ESCROW_CONTRACTS, NEAR_ESCROW_MAX_GAS, NEAR_ESCROW_MIN_GAS, NEAR_ESCROW_TOKENS, NEAR_USDC_STORAGE_DEPOSIT, type NearEscrowDelegate, type NearEscrowDelegateOptions, type NearEscrowFunctionCall, type NearEscrowLifecycleMethod, type NearEscrowNetwork, type NearEscrowPayment, type NearExactDelegateOptions, type NearExactPayment, type NearLocalSigner, type NearStorageOptions, type NearStorageTransaction, type NearUnsigned, type Nep413Message, type Nep413SignedMessage, type PaymentIdParams, type SignNep413Options, type WalletSelectorOptions, buildArrasStorageDeposit, buildEscrowAuthorizationDelegate, buildEscrowMsg, buildUsdcStorageDeposit, computePaymentId, createNearLocalSigner, NEARProvider as default, nep413Preimage, parseArrasEvents, paymentIdPreimage, reclaim, refund, release, signEscrowAuthorization, signEscrowLifecycle, signExactNearDelegate, signNep413, validateEscrowAuthorizationDelegate, withdraw, withdrawFor };