@permissionless-technologies/upp-sdk 0.4.6 → 0.4.8
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/{chunk-VIBIC5L7.cjs → chunk-43GNVMVL.cjs} +14 -14
- package/dist/{chunk-VIBIC5L7.cjs.map → chunk-43GNVMVL.cjs.map} +1 -1
- package/dist/{chunk-CZRCIN6S.cjs → chunk-IWNEKLAA.cjs} +2 -2
- package/dist/{chunk-CZRCIN6S.cjs.map → chunk-IWNEKLAA.cjs.map} +1 -1
- package/dist/{chunk-746OK22E.js → chunk-L3PVYAH2.js} +14 -14
- package/dist/{chunk-746OK22E.js.map → chunk-L3PVYAH2.js.map} +1 -1
- package/dist/{chunk-VDZSF5GW.js → chunk-R75NKNDC.js} +2 -2
- package/dist/{chunk-VDZSF5GW.js.map → chunk-R75NKNDC.js.map} +1 -1
- package/dist/core/index.cjs +7 -7
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.js +2 -2
- package/dist/indexer/index.cjs +6 -6
- package/dist/indexer/index.js +1 -1
- package/dist/react/index.cjs +17 -20
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +18 -21
- package/dist/react/index.js.map +1 -1
- package/dist/{transfer-SGPJB6AK.js → transfer-WYG6422Y.js} +3 -3
- package/dist/{transfer-SGPJB6AK.js.map → transfer-WYG6422Y.js.map} +1 -1
- package/dist/{transfer-KKFEYGL4.cjs → transfer-ZDJPVUL2.cjs} +9 -9
- package/dist/{transfer-KKFEYGL4.cjs.map → transfer-ZDJPVUL2.cjs.map} +1 -1
- package/package.json +1 -1
- package/src/deployments/11155111.json +12 -12
package/dist/indexer/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIWNEKLAA_cjs = require('../chunk-IWNEKLAA.cjs');
|
|
4
4
|
var chunkERQE57IA_cjs = require('../chunk-ERQE57IA.cjs');
|
|
5
5
|
require('../chunk-G7VZBCD6.cjs');
|
|
6
6
|
|
|
@@ -8,23 +8,23 @@ require('../chunk-G7VZBCD6.cjs');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "computeSearchTag", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkIWNEKLAA_cjs.computeSearchTag; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "makeRpcIndexer", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkIWNEKLAA_cjs.makeRpcIndexer; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "matchesSearchTag", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkIWNEKLAA_cjs.matchesSearchTag; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "tryDecryptNote", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkIWNEKLAA_cjs.tryDecryptNote; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "unpackNoteData", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkIWNEKLAA_cjs.unpackNoteData; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "createAutoAdapter", {
|
|
30
30
|
enumerable: true,
|
package/dist/indexer/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { computeSearchTag, makeRpcIndexer, matchesSearchTag, tryDecryptNote, unpackNoteData } from '../chunk-
|
|
1
|
+
export { computeSearchTag, makeRpcIndexer, matchesSearchTag, tryDecryptNote, unpackNoteData } from '../chunk-R75NKNDC.js';
|
|
2
2
|
export { createAutoAdapter, createIndexedDBAdapter, createLocalStorageAdapter, createMemoryAdapter, indexedDBAdapter, localStorageAdapter, memoryAdapter } from '../chunk-XV72HNHN.js';
|
|
3
3
|
import '../chunk-Z6ZWNWWR.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.cjs
CHANGED
|
@@ -1597,7 +1597,7 @@ function usePoolTransfer(config) {
|
|
|
1597
1597
|
const recipientNote = await createNoteForSelf(amount, origin, token);
|
|
1598
1598
|
const changeNote = await createNoteForSelf(changeAmount, origin, token);
|
|
1599
1599
|
const [transferModule, proofModule, aspModule] = await Promise.all([
|
|
1600
|
-
import('../transfer-
|
|
1600
|
+
import('../transfer-ZDJPVUL2.cjs'),
|
|
1601
1601
|
import('../proof-VINVGL4F.cjs'),
|
|
1602
1602
|
import('../asp-CUE3NMBN.cjs')
|
|
1603
1603
|
]);
|
|
@@ -1746,7 +1746,7 @@ function useWithdraw(config) {
|
|
|
1746
1746
|
const token = BigInt(selectedNote.token);
|
|
1747
1747
|
setStage("creating_outputs");
|
|
1748
1748
|
const [transferModule, proofModule, sdk] = await Promise.all([
|
|
1749
|
-
import('../transfer-
|
|
1749
|
+
import('../transfer-ZDJPVUL2.cjs'),
|
|
1750
1750
|
import('../proof-VINVGL4F.cjs'),
|
|
1751
1751
|
import('../index.cjs')
|
|
1752
1752
|
]);
|
|
@@ -1769,11 +1769,10 @@ function useWithdraw(config) {
|
|
|
1769
1769
|
const merkleProof = noteProof.proof;
|
|
1770
1770
|
const stateRootBI = merkleProof.root;
|
|
1771
1771
|
const actualLeafIndex = merkleProof.leafIndex;
|
|
1772
|
-
const
|
|
1772
|
+
const inputOwnerHash = chunkHEHXSV47_cjs.computeOwnerHash(BigInt(selectedNote.ownerSecret));
|
|
1773
1773
|
const localCommitment = await sdk.poseidon([
|
|
1774
1774
|
selectedNote.amount,
|
|
1775
|
-
|
|
1776
|
-
inputPubkey.y,
|
|
1775
|
+
inputOwnerHash,
|
|
1777
1776
|
selectedNote.blinding,
|
|
1778
1777
|
BigInt(selectedNote.origin),
|
|
1779
1778
|
BigInt(selectedNote.token)
|
|
@@ -1785,7 +1784,7 @@ function useWithdraw(config) {
|
|
|
1785
1784
|
);
|
|
1786
1785
|
}
|
|
1787
1786
|
const nullifier = await sdk.poseidon([
|
|
1788
|
-
BigInt(selectedNote.ownerSecret)
|
|
1787
|
+
BigInt(selectedNote.ownerSecret),
|
|
1789
1788
|
BigInt(actualLeafIndex),
|
|
1790
1789
|
storedCommitment
|
|
1791
1790
|
]);
|
|
@@ -1801,7 +1800,7 @@ function useWithdraw(config) {
|
|
|
1801
1800
|
// Private inputs - Input Note
|
|
1802
1801
|
// IMPORTANT: Use actualLeafIndex from Merkle proof, not stored leafIndex
|
|
1803
1802
|
inputAmount: selectedNote.amount.toString(),
|
|
1804
|
-
inputOneTimeSecret:
|
|
1803
|
+
inputOneTimeSecret: BigInt(selectedNote.ownerSecret).toString(),
|
|
1805
1804
|
inputBlinding: selectedNote.blinding.toString(),
|
|
1806
1805
|
inputOrigin: origin.toString(),
|
|
1807
1806
|
inputLeafIndex: actualLeafIndex.toString(),
|
|
@@ -2116,7 +2115,7 @@ function useSwap(config) {
|
|
|
2116
2115
|
}
|
|
2117
2116
|
setStage("creating_outputs");
|
|
2118
2117
|
const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
|
|
2119
|
-
import('../transfer-
|
|
2118
|
+
import('../transfer-ZDJPVUL2.cjs'),
|
|
2120
2119
|
import('../proof-VINVGL4F.cjs'),
|
|
2121
2120
|
import('../index.cjs'),
|
|
2122
2121
|
import('../asp-CUE3NMBN.cjs')
|
|
@@ -2143,11 +2142,10 @@ function useSwap(config) {
|
|
|
2143
2142
|
const stateRootBI = merkleProof.root;
|
|
2144
2143
|
const actualLeafIndex = merkleProof.leafIndex;
|
|
2145
2144
|
setStage("generating_proof");
|
|
2146
|
-
const
|
|
2145
|
+
const inputOwnerHash = chunkHEHXSV47_cjs.computeOwnerHash(BigInt(selectedNote.ownerSecret));
|
|
2147
2146
|
const localCommitment = await sdk.poseidon([
|
|
2148
2147
|
selectedNote.amount,
|
|
2149
|
-
|
|
2150
|
-
inputPubkey.y,
|
|
2148
|
+
inputOwnerHash,
|
|
2151
2149
|
selectedNote.blinding,
|
|
2152
2150
|
origin,
|
|
2153
2151
|
token
|
|
@@ -2159,7 +2157,7 @@ function useSwap(config) {
|
|
|
2159
2157
|
);
|
|
2160
2158
|
}
|
|
2161
2159
|
const nullifier = await sdk.poseidon([
|
|
2162
|
-
BigInt(selectedNote.ownerSecret)
|
|
2160
|
+
BigInt(selectedNote.ownerSecret),
|
|
2163
2161
|
BigInt(actualLeafIndex),
|
|
2164
2162
|
storedCommitment
|
|
2165
2163
|
]);
|
|
@@ -2173,7 +2171,7 @@ function useSwap(config) {
|
|
|
2173
2171
|
token: token.toString(),
|
|
2174
2172
|
isRagequit: "0",
|
|
2175
2173
|
inputAmount: selectedNote.amount.toString(),
|
|
2176
|
-
inputOneTimeSecret:
|
|
2174
|
+
inputOneTimeSecret: BigInt(selectedNote.ownerSecret).toString(),
|
|
2177
2175
|
inputBlinding: selectedNote.blinding.toString(),
|
|
2178
2176
|
inputOrigin: origin.toString(),
|
|
2179
2177
|
inputLeafIndex: actualLeafIndex.toString(),
|
|
@@ -2258,7 +2256,7 @@ function useSwap(config) {
|
|
|
2258
2256
|
}
|
|
2259
2257
|
setStage("creating_outputs");
|
|
2260
2258
|
const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
|
|
2261
|
-
import('../transfer-
|
|
2259
|
+
import('../transfer-ZDJPVUL2.cjs'),
|
|
2262
2260
|
import('../proof-VINVGL4F.cjs'),
|
|
2263
2261
|
import('../index.cjs'),
|
|
2264
2262
|
import('../asp-CUE3NMBN.cjs')
|
|
@@ -2291,11 +2289,10 @@ function useSwap(config) {
|
|
|
2291
2289
|
const stateRootBI = merkleProof.root;
|
|
2292
2290
|
const actualLeafIndex = merkleProof.leafIndex;
|
|
2293
2291
|
setStage("generating_proof");
|
|
2294
|
-
const
|
|
2292
|
+
const inputOwnerHashF = chunkHEHXSV47_cjs.computeOwnerHash(BigInt(selectedNote.ownerSecret));
|
|
2295
2293
|
const localCommitmentF = await sdk.poseidon([
|
|
2296
2294
|
selectedNote.amount,
|
|
2297
|
-
|
|
2298
|
-
inputPubkeyF.y,
|
|
2295
|
+
inputOwnerHashF,
|
|
2299
2296
|
selectedNote.blinding,
|
|
2300
2297
|
origin,
|
|
2301
2298
|
token
|
|
@@ -2307,7 +2304,7 @@ function useSwap(config) {
|
|
|
2307
2304
|
);
|
|
2308
2305
|
}
|
|
2309
2306
|
const nullifier = await sdk.poseidon([
|
|
2310
|
-
BigInt(selectedNote.ownerSecret)
|
|
2307
|
+
BigInt(selectedNote.ownerSecret),
|
|
2311
2308
|
BigInt(actualLeafIndex),
|
|
2312
2309
|
storedCommitmentF
|
|
2313
2310
|
]);
|
|
@@ -2321,7 +2318,7 @@ function useSwap(config) {
|
|
|
2321
2318
|
token: token.toString(),
|
|
2322
2319
|
isRagequit: "0",
|
|
2323
2320
|
inputAmount: selectedNote.amount.toString(),
|
|
2324
|
-
inputOneTimeSecret:
|
|
2321
|
+
inputOneTimeSecret: BigInt(selectedNote.ownerSecret).toString(),
|
|
2325
2322
|
inputBlinding: selectedNote.blinding.toString(),
|
|
2326
2323
|
inputOrigin: origin.toString(),
|
|
2327
2324
|
inputLeafIndex: actualLeafIndex.toString(),
|
|
@@ -2478,7 +2475,7 @@ function useSwap(config) {
|
|
|
2478
2475
|
createNoteForSelf(changeAmount, origin, token)
|
|
2479
2476
|
]);
|
|
2480
2477
|
const [transferModule, proofModule, aspModule] = await Promise.all([
|
|
2481
|
-
import('../transfer-
|
|
2478
|
+
import('../transfer-ZDJPVUL2.cjs'),
|
|
2482
2479
|
import('../proof-VINVGL4F.cjs'),
|
|
2483
2480
|
import('../asp-CUE3NMBN.cjs')
|
|
2484
2481
|
]);
|