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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
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: "
|
|
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?:
|
|
420
|
-
startTimestamp?:
|
|
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: "
|
|
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?:
|
|
420
|
-
startTimestamp?:
|
|
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: "
|
|
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)
|
|
294
|
-
const durationDays = options?.durationDays ??
|
|
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: "
|
|
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)
|
|
256
|
-
const durationDays = options?.durationDays ??
|
|
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.
|
|
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.
|
|
20
|
+
"@zama-fhe/relayer-sdk": "0.4.0-3"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"jest": "^29.7.0",
|