x402z-shared 0.0.3 → 0.0.5

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
@@ -1,5 +1,5 @@
1
- import { R as RelayerInstance, a as RelayerSigner } from './types-gx3OAvqG.mjs';
2
- export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, g as createEncryptedAmountInput, e as createNonce, f as createRelayerInstance, h as hashEncryptedAmountInput, n as normalizeAmount, p as publicDecrypt, s as setObserver, u as userDecryptEuint64 } from './types-gx3OAvqG.mjs';
1
+ import { R as RelayerInstance, a as RelayerSigner } from './types-Cy4f8wJ6.mjs';
2
+ export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, g as createEncryptedAmountInput, e as createNonce, f as createRelayerInstance, h as hashEncryptedAmountInput, n as normalizeAmount, p as publicDecrypt, s as setObserver, u as userDecryptEuint64 } from './types-Cy4f8wJ6.mjs';
3
3
  export * from '@x402/core/types';
4
4
  export { FhevmInstanceConfig, SepoliaConfig } from '@zama-fhe/relayer-sdk/node';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RelayerInstance, a as RelayerSigner } from './types-gx3OAvqG.js';
2
- export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, g as createEncryptedAmountInput, e as createNonce, f as createRelayerInstance, h as hashEncryptedAmountInput, n as normalizeAmount, p as publicDecrypt, s as setObserver, u as userDecryptEuint64 } from './types-gx3OAvqG.js';
1
+ import { R as RelayerInstance, a as RelayerSigner } from './types-Cy4f8wJ6.js';
2
+ export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, g as createEncryptedAmountInput, e as createNonce, f as createRelayerInstance, h as hashEncryptedAmountInput, n as normalizeAmount, p as publicDecrypt, s as setObserver, u as userDecryptEuint64 } from './types-Cy4f8wJ6.js';
3
3
  export * from '@x402/core/types';
4
4
  export { FhevmInstanceConfig, SepoliaConfig } from '@zama-fhe/relayer-sdk/node';
5
5
 
@@ -0,0 +1,266 @@
1
+ import { FhevmInstanceConfig, createInstance } from '@zama-fhe/relayer-sdk/node';
2
+
3
+ declare const confidentialTokenAbi: readonly [{
4
+ readonly inputs: readonly [{
5
+ readonly components: readonly [{
6
+ readonly internalType: "address";
7
+ readonly name: "holder";
8
+ readonly type: "address";
9
+ }, {
10
+ readonly internalType: "address";
11
+ readonly name: "payee";
12
+ readonly type: "address";
13
+ }, {
14
+ readonly internalType: "uint256";
15
+ readonly name: "maxClearAmount";
16
+ readonly type: "uint256";
17
+ }, {
18
+ readonly internalType: "bytes32";
19
+ readonly name: "resourceHash";
20
+ readonly type: "bytes32";
21
+ }, {
22
+ readonly internalType: "uint48";
23
+ readonly name: "validAfter";
24
+ readonly type: "uint48";
25
+ }, {
26
+ readonly internalType: "uint48";
27
+ readonly name: "validBefore";
28
+ readonly type: "uint48";
29
+ }, {
30
+ readonly internalType: "bytes32";
31
+ readonly name: "nonce";
32
+ readonly type: "bytes32";
33
+ }, {
34
+ readonly internalType: "bytes32";
35
+ readonly name: "encryptedAmountHash";
36
+ readonly type: "bytes32";
37
+ }];
38
+ readonly internalType: "struct FHEToken.ConfidentialPayment";
39
+ readonly name: "p";
40
+ readonly type: "tuple";
41
+ }, {
42
+ readonly internalType: "externalEuint64";
43
+ readonly name: "encryptedAmountInput";
44
+ readonly type: "bytes32";
45
+ }, {
46
+ readonly internalType: "bytes";
47
+ readonly name: "inputProof";
48
+ readonly type: "bytes";
49
+ }, {
50
+ readonly internalType: "bytes";
51
+ readonly name: "sig";
52
+ readonly type: "bytes";
53
+ }];
54
+ readonly name: "confidentialTransferWithAuthorization";
55
+ readonly outputs: readonly [{
56
+ readonly internalType: "euint64";
57
+ readonly name: "transferred";
58
+ readonly type: "bytes32";
59
+ }];
60
+ readonly stateMutability: "nonpayable";
61
+ readonly type: "function";
62
+ }, {
63
+ readonly anonymous: false;
64
+ readonly inputs: readonly [{
65
+ readonly indexed: true;
66
+ readonly internalType: "address";
67
+ readonly name: "holder";
68
+ readonly type: "address";
69
+ }, {
70
+ readonly indexed: true;
71
+ readonly internalType: "address";
72
+ readonly name: "payee";
73
+ readonly type: "address";
74
+ }, {
75
+ readonly indexed: false;
76
+ readonly internalType: "uint256";
77
+ readonly name: "maxClearAmount";
78
+ readonly type: "uint256";
79
+ }, {
80
+ readonly indexed: true;
81
+ readonly internalType: "bytes32";
82
+ readonly name: "resourceHash";
83
+ readonly type: "bytes32";
84
+ }, {
85
+ readonly indexed: false;
86
+ readonly internalType: "bytes32";
87
+ readonly name: "nonce";
88
+ readonly type: "bytes32";
89
+ }, {
90
+ readonly indexed: false;
91
+ readonly internalType: "bytes32";
92
+ readonly name: "transferredAmount";
93
+ readonly type: "bytes32";
94
+ }];
95
+ readonly name: "ConfidentialPaymentExecuted";
96
+ readonly type: "event";
97
+ }, {
98
+ readonly inputs: readonly [{
99
+ readonly internalType: "address";
100
+ readonly name: "";
101
+ readonly type: "address";
102
+ }, {
103
+ readonly internalType: "bytes32";
104
+ readonly name: "";
105
+ readonly type: "bytes32";
106
+ }];
107
+ readonly name: "usedNonces";
108
+ readonly outputs: readonly [{
109
+ readonly internalType: "bool";
110
+ readonly name: "";
111
+ readonly type: "bool";
112
+ }];
113
+ readonly stateMutability: "view";
114
+ readonly type: "function";
115
+ }, {
116
+ readonly inputs: readonly [{
117
+ readonly internalType: "address";
118
+ readonly name: "account";
119
+ readonly type: "address";
120
+ }];
121
+ readonly name: "observer";
122
+ readonly outputs: readonly [{
123
+ readonly internalType: "address";
124
+ readonly name: "";
125
+ readonly type: "address";
126
+ }];
127
+ readonly stateMutability: "view";
128
+ readonly type: "function";
129
+ }, {
130
+ readonly inputs: readonly [{
131
+ readonly internalType: "address";
132
+ readonly name: "account";
133
+ readonly type: "address";
134
+ }, {
135
+ readonly internalType: "address";
136
+ readonly name: "newObserver";
137
+ readonly type: "address";
138
+ }];
139
+ readonly name: "setObserver";
140
+ readonly outputs: readonly [];
141
+ readonly stateMutability: "nonpayable";
142
+ readonly type: "function";
143
+ }];
144
+
145
+ declare const confidentialPaymentTypes: {
146
+ readonly ConfidentialPayment: readonly [{
147
+ readonly name: "holder";
148
+ readonly type: "address";
149
+ }, {
150
+ readonly name: "payee";
151
+ readonly type: "address";
152
+ }, {
153
+ readonly name: "maxClearAmount";
154
+ readonly type: "uint256";
155
+ }, {
156
+ readonly name: "resourceHash";
157
+ readonly type: "bytes32";
158
+ }, {
159
+ readonly name: "validAfter";
160
+ readonly type: "uint48";
161
+ }, {
162
+ readonly name: "validBefore";
163
+ readonly type: "uint48";
164
+ }, {
165
+ readonly name: "nonce";
166
+ readonly type: "bytes32";
167
+ }, {
168
+ readonly name: "encryptedAmountHash";
169
+ readonly type: "bytes32";
170
+ }];
171
+ };
172
+ declare const confidentialErrorCodes: {
173
+ readonly observerNotAuthorized: "observer_not_authorized";
174
+ };
175
+ type ConfidentialErrorCode = (typeof confidentialErrorCodes)[keyof typeof confidentialErrorCodes];
176
+
177
+ declare function createNonce(): `0x${string}`;
178
+ declare function hashEncryptedAmountInput(encryptedAmountInput: `0x${string}`): `0x${string}`;
179
+ declare function normalizeAmount(amount: string | number | bigint): string;
180
+
181
+ type RelayerInstance = Awaited<ReturnType<typeof createInstance>>;
182
+ type RelayerSigner = {
183
+ address: string;
184
+ signTypedData: ((domain: Record<string, unknown>, types: Record<string, Array<{
185
+ name: string;
186
+ type: string;
187
+ }>>, message: Record<string, unknown>) => Promise<string>) | ((args: {
188
+ domain: Record<string, unknown>;
189
+ types: Record<string, Array<{
190
+ name: string;
191
+ type: string;
192
+ }>>;
193
+ primaryType: string;
194
+ message: Record<string, unknown>;
195
+ }) => Promise<string>);
196
+ };
197
+
198
+ declare function createRelayerInstance(config: FhevmInstanceConfig): Promise<RelayerInstance>;
199
+
200
+ declare function createEncryptedAmountInput(relayer: RelayerInstance, contractAddress: string, senderAddress: string, amount: number): Promise<{
201
+ handle: `0x${string}`;
202
+ inputProof: `0x${string}`;
203
+ }>;
204
+ declare function userDecryptEuint64(relayer: RelayerInstance, handle: string, contractAddress: string, signer: RelayerSigner, options?: {
205
+ durationDays?: string;
206
+ startTimestamp?: string;
207
+ }): Promise<bigint>;
208
+ declare function publicDecrypt(relayer: RelayerInstance, handles: string[]): Promise<{
209
+ clearValues: Record<string, bigint>;
210
+ decryptionProof: string;
211
+ }>;
212
+
213
+ type SetObserverOptions = {
214
+ rpcUrl: string;
215
+ tokenAddress: `0x${string}`;
216
+ account: `0x${string}`;
217
+ observer: `0x${string}`;
218
+ signer: RelayerSigner & {
219
+ writeContract: (args: {
220
+ address: `0x${string}`;
221
+ abi: typeof confidentialTokenAbi;
222
+ functionName: "setObserver";
223
+ args: [`0x${string}`, `0x${string}`];
224
+ }) => Promise<`0x${string}`>;
225
+ };
226
+ };
227
+ declare function setObserver(options: SetObserverOptions): Promise<`0x${string}`>;
228
+
229
+ type ConfidentialPaymentAuthorization = {
230
+ holder: `0x${string}`;
231
+ payee: `0x${string}`;
232
+ maxClearAmount: string;
233
+ resourceHash: `0x${string}`;
234
+ validAfter: string;
235
+ validBefore: string;
236
+ nonce: `0x${string}`;
237
+ encryptedAmountHash: `0x${string}`;
238
+ };
239
+ type ConfidentialPaymentPayload = {
240
+ authorization: ConfidentialPaymentAuthorization;
241
+ signature: `0x${string}`;
242
+ encryptedAmountInput: `0x${string}`;
243
+ inputProof: `0x${string}`;
244
+ };
245
+ type ConfidentialRequirementsExtra = {
246
+ eip712: {
247
+ name: string;
248
+ version: string;
249
+ };
250
+ confidential?: {
251
+ maxClearAmount?: string;
252
+ resourceHash?: `0x${string}`;
253
+ batcherAddress?: `0x${string}`;
254
+ };
255
+ };
256
+ type ConfidentialPaymentInput = {
257
+ encryptedAmountInput: `0x${string}`;
258
+ inputProof: `0x${string}`;
259
+ maxClearAmount?: string;
260
+ resourceHash?: `0x${string}`;
261
+ validAfter?: number;
262
+ validBefore?: number;
263
+ nonce?: `0x${string}`;
264
+ };
265
+
266
+ export { type ConfidentialErrorCode as C, type RelayerInstance as R, type SetObserverOptions as S, type RelayerSigner as a, confidentialPaymentTypes as b, confidentialTokenAbi as c, confidentialErrorCodes as d, createNonce as e, createRelayerInstance as f, createEncryptedAmountInput as g, hashEncryptedAmountInput as h, type ConfidentialPaymentAuthorization as i, type ConfidentialPaymentPayload as j, type ConfidentialRequirementsExtra as k, type ConfidentialPaymentInput as l, normalizeAmount as n, publicDecrypt as p, setObserver as s, userDecryptEuint64 as u };
@@ -0,0 +1,266 @@
1
+ import { FhevmInstanceConfig, createInstance } from '@zama-fhe/relayer-sdk/node';
2
+
3
+ declare const confidentialTokenAbi: readonly [{
4
+ readonly inputs: readonly [{
5
+ readonly components: readonly [{
6
+ readonly internalType: "address";
7
+ readonly name: "holder";
8
+ readonly type: "address";
9
+ }, {
10
+ readonly internalType: "address";
11
+ readonly name: "payee";
12
+ readonly type: "address";
13
+ }, {
14
+ readonly internalType: "uint256";
15
+ readonly name: "maxClearAmount";
16
+ readonly type: "uint256";
17
+ }, {
18
+ readonly internalType: "bytes32";
19
+ readonly name: "resourceHash";
20
+ readonly type: "bytes32";
21
+ }, {
22
+ readonly internalType: "uint48";
23
+ readonly name: "validAfter";
24
+ readonly type: "uint48";
25
+ }, {
26
+ readonly internalType: "uint48";
27
+ readonly name: "validBefore";
28
+ readonly type: "uint48";
29
+ }, {
30
+ readonly internalType: "bytes32";
31
+ readonly name: "nonce";
32
+ readonly type: "bytes32";
33
+ }, {
34
+ readonly internalType: "bytes32";
35
+ readonly name: "encryptedAmountHash";
36
+ readonly type: "bytes32";
37
+ }];
38
+ readonly internalType: "struct FHEToken.ConfidentialPayment";
39
+ readonly name: "p";
40
+ readonly type: "tuple";
41
+ }, {
42
+ readonly internalType: "externalEuint64";
43
+ readonly name: "encryptedAmountInput";
44
+ readonly type: "bytes32";
45
+ }, {
46
+ readonly internalType: "bytes";
47
+ readonly name: "inputProof";
48
+ readonly type: "bytes";
49
+ }, {
50
+ readonly internalType: "bytes";
51
+ readonly name: "sig";
52
+ readonly type: "bytes";
53
+ }];
54
+ readonly name: "confidentialTransferWithAuthorization";
55
+ readonly outputs: readonly [{
56
+ readonly internalType: "euint64";
57
+ readonly name: "transferred";
58
+ readonly type: "bytes32";
59
+ }];
60
+ readonly stateMutability: "nonpayable";
61
+ readonly type: "function";
62
+ }, {
63
+ readonly anonymous: false;
64
+ readonly inputs: readonly [{
65
+ readonly indexed: true;
66
+ readonly internalType: "address";
67
+ readonly name: "holder";
68
+ readonly type: "address";
69
+ }, {
70
+ readonly indexed: true;
71
+ readonly internalType: "address";
72
+ readonly name: "payee";
73
+ readonly type: "address";
74
+ }, {
75
+ readonly indexed: false;
76
+ readonly internalType: "uint256";
77
+ readonly name: "maxClearAmount";
78
+ readonly type: "uint256";
79
+ }, {
80
+ readonly indexed: true;
81
+ readonly internalType: "bytes32";
82
+ readonly name: "resourceHash";
83
+ readonly type: "bytes32";
84
+ }, {
85
+ readonly indexed: false;
86
+ readonly internalType: "bytes32";
87
+ readonly name: "nonce";
88
+ readonly type: "bytes32";
89
+ }, {
90
+ readonly indexed: false;
91
+ readonly internalType: "bytes32";
92
+ readonly name: "transferredAmount";
93
+ readonly type: "bytes32";
94
+ }];
95
+ readonly name: "ConfidentialPaymentExecuted";
96
+ readonly type: "event";
97
+ }, {
98
+ readonly inputs: readonly [{
99
+ readonly internalType: "address";
100
+ readonly name: "";
101
+ readonly type: "address";
102
+ }, {
103
+ readonly internalType: "bytes32";
104
+ readonly name: "";
105
+ readonly type: "bytes32";
106
+ }];
107
+ readonly name: "usedNonces";
108
+ readonly outputs: readonly [{
109
+ readonly internalType: "bool";
110
+ readonly name: "";
111
+ readonly type: "bool";
112
+ }];
113
+ readonly stateMutability: "view";
114
+ readonly type: "function";
115
+ }, {
116
+ readonly inputs: readonly [{
117
+ readonly internalType: "address";
118
+ readonly name: "account";
119
+ readonly type: "address";
120
+ }];
121
+ readonly name: "observer";
122
+ readonly outputs: readonly [{
123
+ readonly internalType: "address";
124
+ readonly name: "";
125
+ readonly type: "address";
126
+ }];
127
+ readonly stateMutability: "view";
128
+ readonly type: "function";
129
+ }, {
130
+ readonly inputs: readonly [{
131
+ readonly internalType: "address";
132
+ readonly name: "account";
133
+ readonly type: "address";
134
+ }, {
135
+ readonly internalType: "address";
136
+ readonly name: "newObserver";
137
+ readonly type: "address";
138
+ }];
139
+ readonly name: "setObserver";
140
+ readonly outputs: readonly [];
141
+ readonly stateMutability: "nonpayable";
142
+ readonly type: "function";
143
+ }];
144
+
145
+ declare const confidentialPaymentTypes: {
146
+ readonly ConfidentialPayment: readonly [{
147
+ readonly name: "holder";
148
+ readonly type: "address";
149
+ }, {
150
+ readonly name: "payee";
151
+ readonly type: "address";
152
+ }, {
153
+ readonly name: "maxClearAmount";
154
+ readonly type: "uint256";
155
+ }, {
156
+ readonly name: "resourceHash";
157
+ readonly type: "bytes32";
158
+ }, {
159
+ readonly name: "validAfter";
160
+ readonly type: "uint48";
161
+ }, {
162
+ readonly name: "validBefore";
163
+ readonly type: "uint48";
164
+ }, {
165
+ readonly name: "nonce";
166
+ readonly type: "bytes32";
167
+ }, {
168
+ readonly name: "encryptedAmountHash";
169
+ readonly type: "bytes32";
170
+ }];
171
+ };
172
+ declare const confidentialErrorCodes: {
173
+ readonly observerNotAuthorized: "observer_not_authorized";
174
+ };
175
+ type ConfidentialErrorCode = (typeof confidentialErrorCodes)[keyof typeof confidentialErrorCodes];
176
+
177
+ declare function createNonce(): `0x${string}`;
178
+ declare function hashEncryptedAmountInput(encryptedAmountInput: `0x${string}`): `0x${string}`;
179
+ declare function normalizeAmount(amount: string | number | bigint): string;
180
+
181
+ type RelayerInstance = Awaited<ReturnType<typeof createInstance>>;
182
+ type RelayerSigner = {
183
+ address: string;
184
+ signTypedData: ((domain: Record<string, unknown>, types: Record<string, Array<{
185
+ name: string;
186
+ type: string;
187
+ }>>, message: Record<string, unknown>) => Promise<string>) | ((args: {
188
+ domain: Record<string, unknown>;
189
+ types: Record<string, Array<{
190
+ name: string;
191
+ type: string;
192
+ }>>;
193
+ primaryType: string;
194
+ message: Record<string, unknown>;
195
+ }) => Promise<string>);
196
+ };
197
+
198
+ declare function createRelayerInstance(config: FhevmInstanceConfig): Promise<RelayerInstance>;
199
+
200
+ declare function createEncryptedAmountInput(relayer: RelayerInstance, contractAddress: string, senderAddress: string, amount: number): Promise<{
201
+ handle: `0x${string}`;
202
+ inputProof: `0x${string}`;
203
+ }>;
204
+ declare function userDecryptEuint64(relayer: RelayerInstance, handle: string, contractAddress: string, signer: RelayerSigner, options?: {
205
+ durationDays?: string;
206
+ startTimestamp?: string;
207
+ }): Promise<bigint>;
208
+ declare function publicDecrypt(relayer: RelayerInstance, handles: string[]): Promise<{
209
+ clearValues: Record<string, bigint>;
210
+ decryptionProof: string;
211
+ }>;
212
+
213
+ type SetObserverOptions = {
214
+ rpcUrl: string;
215
+ tokenAddress: `0x${string}`;
216
+ account: `0x${string}`;
217
+ observer: `0x${string}`;
218
+ signer: RelayerSigner & {
219
+ writeContract: (args: {
220
+ address: `0x${string}`;
221
+ abi: typeof confidentialTokenAbi;
222
+ functionName: "setObserver";
223
+ args: [`0x${string}`, `0x${string}`];
224
+ }) => Promise<`0x${string}`>;
225
+ };
226
+ };
227
+ declare function setObserver(options: SetObserverOptions): Promise<`0x${string}`>;
228
+
229
+ type ConfidentialPaymentAuthorization = {
230
+ holder: `0x${string}`;
231
+ payee: `0x${string}`;
232
+ maxClearAmount: string;
233
+ resourceHash: `0x${string}`;
234
+ validAfter: string;
235
+ validBefore: string;
236
+ nonce: `0x${string}`;
237
+ encryptedAmountHash: `0x${string}`;
238
+ };
239
+ type ConfidentialPaymentPayload = {
240
+ authorization: ConfidentialPaymentAuthorization;
241
+ signature: `0x${string}`;
242
+ encryptedAmountInput: `0x${string}`;
243
+ inputProof: `0x${string}`;
244
+ };
245
+ type ConfidentialRequirementsExtra = {
246
+ eip712: {
247
+ name: string;
248
+ version: string;
249
+ };
250
+ confidential?: {
251
+ maxClearAmount?: string;
252
+ resourceHash?: `0x${string}`;
253
+ batcherAddress?: `0x${string}`;
254
+ };
255
+ };
256
+ type ConfidentialPaymentInput = {
257
+ encryptedAmountInput: `0x${string}`;
258
+ inputProof: `0x${string}`;
259
+ maxClearAmount?: string;
260
+ resourceHash?: `0x${string}`;
261
+ validAfter?: number;
262
+ validBefore?: number;
263
+ nonce?: `0x${string}`;
264
+ };
265
+
266
+ export { type ConfidentialErrorCode as C, type RelayerInstance as R, type SetObserverOptions as S, type RelayerSigner as a, confidentialPaymentTypes as b, confidentialTokenAbi as c, confidentialErrorCodes as d, createNonce as e, createRelayerInstance as f, createEncryptedAmountInput as g, hashEncryptedAmountInput as h, type ConfidentialPaymentAuthorization as i, type ConfidentialPaymentPayload as j, type ConfidentialRequirementsExtra as k, type ConfidentialPaymentInput as l, normalizeAmount as n, publicDecrypt as p, setObserver as s, userDecryptEuint64 as u };
package/dist/web.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, e as createNonce, h as hashEncryptedAmountInput, n as normalizeAmount, s as setObserver } from './types-gx3OAvqG.mjs';
2
- import { createInstance } from '@zama-fhe/relayer-sdk/bundle';
3
- export { SepoliaConfig, initSDK } from '@zama-fhe/relayer-sdk/bundle';
1
+ export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, e as createNonce, h as hashEncryptedAmountInput, n as normalizeAmount, s as setObserver } from './types-Cy4f8wJ6.mjs';
2
+ import { createInstance } from '@zama-fhe/relayer-sdk/web';
3
+ export { SepoliaConfig, initSDK } from '@zama-fhe/relayer-sdk/web';
4
4
  import { WalletClient } from 'viem';
5
5
  export * from '@x402/core/types';
6
6
  import '@zama-fhe/relayer-sdk/node';
package/dist/web.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, e as createNonce, h as hashEncryptedAmountInput, n as normalizeAmount, s as setObserver } from './types-gx3OAvqG.js';
2
- import { createInstance } from '@zama-fhe/relayer-sdk/bundle';
3
- export { SepoliaConfig, initSDK } from '@zama-fhe/relayer-sdk/bundle';
1
+ export { C as ConfidentialErrorCode, i as ConfidentialPaymentAuthorization, l as ConfidentialPaymentInput, j as ConfidentialPaymentPayload, k as ConfidentialRequirementsExtra, S as SetObserverOptions, d as confidentialErrorCodes, b as confidentialPaymentTypes, c as confidentialTokenAbi, e as createNonce, h as hashEncryptedAmountInput, n as normalizeAmount, s as setObserver } from './types-Cy4f8wJ6.js';
2
+ import { createInstance } from '@zama-fhe/relayer-sdk/web';
3
+ export { SepoliaConfig, initSDK } from '@zama-fhe/relayer-sdk/web';
4
4
  import { WalletClient } from 'viem';
5
5
  export * from '@x402/core/types';
6
6
  import '@zama-fhe/relayer-sdk/node';
package/dist/web.js CHANGED
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/web.ts
21
21
  var web_exports = {};
22
22
  __export(web_exports, {
23
- SepoliaConfig: () => import_bundle.SepoliaConfig,
23
+ SepoliaConfig: () => import_web.SepoliaConfig,
24
24
  confidentialErrorCodes: () => confidentialErrorCodes,
25
25
  confidentialPaymentTypes: () => confidentialPaymentTypes,
26
26
  confidentialTokenAbi: () => confidentialTokenAbi,
@@ -28,7 +28,7 @@ __export(web_exports, {
28
28
  createNonce: () => createNonce,
29
29
  createRelayerInstance: () => createRelayerInstance,
30
30
  hashEncryptedAmountInput: () => hashEncryptedAmountInput,
31
- initSDK: () => import_bundle.initSDK,
31
+ initSDK: () => import_web.initSDK,
32
32
  normalizeAmount: () => normalizeAmount,
33
33
  publicDecrypt: () => publicDecrypt,
34
34
  setObserver: () => setObserver,
@@ -154,10 +154,10 @@ function normalizeAmount(amount) {
154
154
  }
155
155
 
156
156
  // src/relayer-web.ts
157
- var import_bundle = require("@zama-fhe/relayer-sdk/bundle");
157
+ var import_web = require("@zama-fhe/relayer-sdk/web");
158
158
  var import_viem2 = require("viem");
159
159
  async function createRelayerInstance(config) {
160
- const instance = await (0, import_bundle.createInstance)(config);
160
+ const instance = await (0, import_web.createInstance)(config);
161
161
  if (typeof config.network === "string") {
162
162
  instance.network = config.network;
163
163
  }
package/dist/web.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-LTE4V3LT.mjs";
10
10
 
11
11
  // src/relayer-web.ts
12
- import { createInstance, initSDK, SepoliaConfig } from "@zama-fhe/relayer-sdk/bundle";
12
+ import { createInstance, initSDK, SepoliaConfig } from "@zama-fhe/relayer-sdk/web";
13
13
  import { getAddress, toHex } from "viem";
14
14
  async function createRelayerInstance(config) {
15
15
  const instance = await createInstance(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x402z-shared",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",