x402z-shared 0.0.14 → 0.0.15

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
@@ -186,7 +186,7 @@ declare const confidentialTokenAbi: readonly [{
186
186
  readonly type: "function";
187
187
  }, {
188
188
  readonly inputs: readonly [{
189
- readonly internalType: "bytes32";
189
+ readonly internalType: "euint64";
190
190
  readonly name: "burntAmount";
191
191
  readonly type: "bytes32";
192
192
  }, {
@@ -416,8 +416,8 @@ declare function createEncryptedAmountInput(relayer: RelayerInstance, contractAd
416
416
  inputProof: `0x${string}`;
417
417
  }>;
418
418
  declare function decryptEuint64(relayer: RelayerInstance, handle: string, contractAddress: string, signer: RelayerSigner, options?: {
419
- durationDays?: string;
420
- startTimestamp?: string;
419
+ durationDays?: number;
420
+ startTimestamp?: number;
421
421
  }): Promise<bigint>;
422
422
  declare function publicDecrypt(relayer: RelayerInstance, handles: string[]): Promise<{
423
423
  clearValues: Record<string, bigint>;
package/dist/index.d.ts CHANGED
@@ -186,7 +186,7 @@ declare const confidentialTokenAbi: readonly [{
186
186
  readonly type: "function";
187
187
  }, {
188
188
  readonly inputs: readonly [{
189
- readonly internalType: "bytes32";
189
+ readonly internalType: "euint64";
190
190
  readonly name: "burntAmount";
191
191
  readonly type: "bytes32";
192
192
  }, {
@@ -416,8 +416,8 @@ declare function createEncryptedAmountInput(relayer: RelayerInstance, contractAd
416
416
  inputProof: `0x${string}`;
417
417
  }>;
418
418
  declare function decryptEuint64(relayer: RelayerInstance, handle: string, contractAddress: string, signer: RelayerSigner, options?: {
419
- durationDays?: string;
420
- startTimestamp?: string;
419
+ durationDays?: number;
420
+ startTimestamp?: number;
421
421
  }): Promise<bigint>;
422
422
  declare function publicDecrypt(relayer: RelayerInstance, handles: string[]): Promise<{
423
423
  clearValues: Record<string, bigint>;
package/dist/index.js CHANGED
@@ -138,7 +138,7 @@ var confidentialTokenAbi = [
138
138
  },
139
139
  {
140
140
  inputs: [
141
- { internalType: "bytes32", name: "burntAmount", type: "bytes32" },
141
+ { internalType: "euint64", name: "burntAmount", type: "bytes32" },
142
142
  { internalType: "uint64", name: "burntAmountCleartext", type: "uint64" },
143
143
  { internalType: "bytes", name: "decryptionProof", type: "bytes" }
144
144
  ],
@@ -290,8 +290,8 @@ async function createEncryptedAmountInput(relayer, contractAddress, callerAddres
290
290
  }
291
291
  async function decryptEuint64(relayer, handle, contractAddress, signer, options) {
292
292
  const keypair = relayer.generateKeypair();
293
- const startTimestamp = options?.startTimestamp ?? Math.floor(Date.now() / 1e3).toString();
294
- const durationDays = options?.durationDays ?? "10";
293
+ const startTimestamp = options?.startTimestamp ?? Math.floor(Date.now() / 1e3);
294
+ const durationDays = options?.durationDays ?? 10;
295
295
  const contractAddresses = [contractAddress];
296
296
  const eip712 = relayer.createEIP712(keypair.publicKey, contractAddresses, startTimestamp, durationDays);
297
297
  const types = { UserDecryptRequestVerification: eip712.types.UserDecryptRequestVerification };
package/dist/index.mjs CHANGED
@@ -100,7 +100,7 @@ var confidentialTokenAbi = [
100
100
  },
101
101
  {
102
102
  inputs: [
103
- { internalType: "bytes32", name: "burntAmount", type: "bytes32" },
103
+ { internalType: "euint64", name: "burntAmount", type: "bytes32" },
104
104
  { internalType: "uint64", name: "burntAmountCleartext", type: "uint64" },
105
105
  { internalType: "bytes", name: "decryptionProof", type: "bytes" }
106
106
  ],
@@ -252,8 +252,8 @@ async function createEncryptedAmountInput(relayer, contractAddress, callerAddres
252
252
  }
253
253
  async function decryptEuint64(relayer, handle, contractAddress, signer, options) {
254
254
  const keypair = relayer.generateKeypair();
255
- const startTimestamp = options?.startTimestamp ?? Math.floor(Date.now() / 1e3).toString();
256
- const durationDays = options?.durationDays ?? "10";
255
+ const startTimestamp = options?.startTimestamp ?? Math.floor(Date.now() / 1e3);
256
+ const durationDays = options?.durationDays ?? 10;
257
257
  const contractAddresses = [contractAddress];
258
258
  const eip712 = relayer.createEIP712(keypair.publicKey, contractAddresses, startTimestamp, durationDays);
259
259
  const types = { UserDecryptRequestVerification: eip712.types.UserDecryptRequestVerification };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x402z-shared",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@x402/core": "^2.0.0",
19
19
  "viem": "^2.39.3",
20
- "@zama-fhe/relayer-sdk": "0.3.0-8"
20
+ "@zama-fhe/relayer-sdk": "0.4.0-3"
21
21
  },
22
22
  "devDependencies": {
23
23
  "jest": "^29.7.0",