@permissionless-technologies/upp-sdk 0.3.6 → 0.4.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/dist/{asp-ZA3RGN7G.js → asp-72WUGTQE.js} +3 -3
- package/dist/asp-72WUGTQE.js.map +1 -0
- package/dist/{asp-TXSAFFD3.cjs → asp-CUE3NMBN.cjs} +14 -14
- package/dist/asp-CUE3NMBN.cjs.map +1 -0
- package/dist/{chunk-KXPZUBPI.cjs → chunk-23B5XSS4.cjs} +12 -12
- package/dist/{chunk-KXPZUBPI.cjs.map → chunk-23B5XSS4.cjs.map} +1 -1
- package/dist/{chunk-SQKBT2SH.cjs → chunk-2G22R7AJ.cjs} +18 -7
- package/dist/chunk-2G22R7AJ.cjs.map +1 -0
- package/dist/chunk-5QSSX3KR.js +64 -0
- package/dist/chunk-5QSSX3KR.js.map +1 -0
- package/dist/{chunk-P37MRZ73.js → chunk-6IEYWJVS.js} +8 -8
- package/dist/chunk-6IEYWJVS.js.map +1 -0
- package/dist/{chunk-5V5HSN6Y.js → chunk-6TFDBBAQ.js} +3 -3
- package/dist/{chunk-5V5HSN6Y.js.map → chunk-6TFDBBAQ.js.map} +1 -1
- package/dist/{chunk-ZKZV6OI3.cjs → chunk-7BNJV2ZS.cjs} +21 -21
- package/dist/{chunk-ZKZV6OI3.cjs.map → chunk-7BNJV2ZS.cjs.map} +1 -1
- package/dist/{chunk-XBNYAAMU.js → chunk-7T4CUE6E.js} +3 -3
- package/dist/{chunk-XBNYAAMU.js.map → chunk-7T4CUE6E.js.map} +1 -1
- package/dist/{chunk-OD2SDC4L.js → chunk-CEJN5ZE5.js} +3 -3
- package/dist/{chunk-OD2SDC4L.js.map → chunk-CEJN5ZE5.js.map} +1 -1
- package/dist/{chunk-2JQISXBD.js → chunk-DTEAFJG7.js} +8 -8
- package/dist/{chunk-2JQISXBD.js.map → chunk-DTEAFJG7.js.map} +1 -1
- package/dist/chunk-EHGH6TAW.js +100 -0
- package/dist/chunk-EHGH6TAW.js.map +1 -0
- package/dist/{chunk-ZU6J7KMY.js → chunk-GPF72JFR.js} +3 -3
- package/dist/{chunk-ZU6J7KMY.js.map → chunk-GPF72JFR.js.map} +1 -1
- package/dist/chunk-HEHXSV47.cjs +77 -0
- package/dist/chunk-HEHXSV47.cjs.map +1 -0
- package/dist/chunk-I5EKGD4P.cjs +113 -0
- package/dist/chunk-I5EKGD4P.cjs.map +1 -0
- package/dist/{chunk-EUP7MBAH.cjs → chunk-IIUKM5VE.cjs} +7 -7
- package/dist/{chunk-EUP7MBAH.cjs.map → chunk-IIUKM5VE.cjs.map} +1 -1
- package/dist/{chunk-CWSUBAV3.js → chunk-OBBSIPEK.js} +30 -35
- package/dist/chunk-OBBSIPEK.js.map +1 -0
- package/dist/{chunk-FVT2XRRL.cjs → chunk-Q2E432UK.cjs} +41 -46
- package/dist/chunk-Q2E432UK.cjs.map +1 -0
- package/dist/{chunk-QKI4QWLT.js → chunk-RNUG3EFC.js} +6 -6
- package/dist/{chunk-QKI4QWLT.js.map → chunk-RNUG3EFC.js.map} +1 -1
- package/dist/{chunk-3YZSIYJC.cjs → chunk-SWTNJPK5.cjs} +11 -11
- package/dist/{chunk-3YZSIYJC.cjs.map → chunk-SWTNJPK5.cjs.map} +1 -1
- package/dist/{chunk-BH24DZ5S.cjs → chunk-U3YFYMWF.cjs} +5 -5
- package/dist/{chunk-BH24DZ5S.cjs.map → chunk-U3YFYMWF.cjs.map} +1 -1
- package/dist/{chunk-3HQ7A6ZM.cjs → chunk-UFEDJJSH.cjs} +5 -5
- package/dist/{chunk-3HQ7A6ZM.cjs.map → chunk-UFEDJJSH.cjs.map} +1 -1
- package/dist/{chunk-W77GRBO4.js → chunk-UQIM2KT3.js} +3 -3
- package/dist/{chunk-W77GRBO4.js.map → chunk-UQIM2KT3.js.map} +1 -1
- package/dist/{chunk-SJDPDHSD.cjs → chunk-UTAJSERA.cjs} +4 -4
- package/dist/{chunk-SJDPDHSD.cjs.map → chunk-UTAJSERA.cjs.map} +1 -1
- package/dist/{chunk-NI62M3W3.cjs → chunk-UYE2JASE.cjs} +2 -2
- package/dist/{chunk-NI62M3W3.cjs.map → chunk-UYE2JASE.cjs.map} +1 -1
- package/dist/{chunk-S4B7GYLN.js → chunk-W3HLIKC2.js} +18 -8
- package/dist/chunk-W3HLIKC2.js.map +1 -0
- package/dist/{chunk-NDM5EJEV.cjs → chunk-XVIICZKW.cjs} +7 -7
- package/dist/chunk-XVIICZKW.cjs.map +1 -0
- package/dist/{chunk-7Q4RSSHM.js → chunk-ZTVXII74.js} +2 -2
- package/dist/{chunk-7Q4RSSHM.js.map → chunk-ZTVXII74.js.map} +1 -1
- package/dist/core/index.cjs +85 -85
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +10 -10
- package/dist/{index-B45-okum.d.cts → index-BgPdYxFS.d.cts} +18 -18
- package/dist/{index-o-Ds3YAq.d.cts → index-CL4vb3ej.d.cts} +1 -1
- package/dist/{index-BIcvNMPt.d.ts → index-CtcXgof_.d.ts} +18 -18
- package/dist/{index-DwAJBoU7.d.ts → index-D6nvfm59.d.ts} +1 -1
- package/dist/index.cjs +265 -266
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +29 -30
- package/dist/index.js.map +1 -1
- package/dist/indexer/index.cjs +6 -6
- package/dist/indexer/index.d.cts +5 -5
- package/dist/indexer/index.d.ts +5 -5
- package/dist/indexer/index.js +1 -1
- package/dist/keys/index.cjs +18 -18
- package/dist/keys/index.js +4 -4
- package/dist/merkle-DZHEOPH3.cjs +30 -0
- package/dist/{merkle-HGDC6OB4.cjs.map → merkle-DZHEOPH3.cjs.map} +1 -1
- package/dist/merkle-IF2RMWCF.js +5 -0
- package/dist/{merkle-7KS2EHRF.js.map → merkle-IF2RMWCF.js.map} +1 -1
- package/dist/poseidon-ACM7E2OH.js +7 -0
- package/dist/{poseidon-UHTJLWQM.js.map → poseidon-ACM7E2OH.js.map} +1 -1
- package/dist/poseidon-PUSGUIVZ.cjs +61 -0
- package/dist/{poseidon-WHJSZSNP.cjs.map → poseidon-PUSGUIVZ.cjs.map} +1 -1
- package/dist/proof-JME3IZTX.js +4 -0
- package/dist/{proof-C4YBP6RY.js.map → proof-JME3IZTX.js.map} +1 -1
- package/dist/proof-XR6XE5PJ.cjs +49 -0
- package/dist/{proof-5OECB3RQ.cjs.map → proof-XR6XE5PJ.cjs.map} +1 -1
- package/dist/react/index.cjs +47 -51
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +20 -24
- package/dist/react/index.js.map +1 -1
- package/dist/{transfer-BzyernBd.d.cts → transfer-D111ihqN.d.cts} +108 -56
- package/dist/{transfer-sqS6mJko.d.ts → transfer-DvIXqHCr.d.ts} +108 -56
- package/dist/transfer-MQMGSXTH.js +8 -0
- package/dist/{transfer-F6YOQTUL.js.map → transfer-MQMGSXTH.js.map} +1 -1
- package/dist/transfer-PB6D5VCW.cjs +37 -0
- package/dist/{transfer-42C4DXYA.cjs.map → transfer-PB6D5VCW.cjs.map} +1 -1
- package/dist/utils/index.cjs +60 -61
- package/dist/utils/index.d.cts +37 -14
- package/dist/utils/index.d.ts +37 -14
- package/dist/utils/index.js +6 -7
- package/package.json +4 -2
- package/src/contracts/interfaces/IUniversalPrivatePool.sol +10 -8
- package/src/contracts/interfaces/IVerifiers.sol +16 -52
- package/src/deployments/11155111.json +15 -12
- package/dist/asp-TXSAFFD3.cjs.map +0 -1
- package/dist/asp-ZA3RGN7G.js.map +0 -1
- package/dist/babyjubjub-2MGQVCKB.js +0 -5
- package/dist/babyjubjub-2MGQVCKB.js.map +0 -1
- package/dist/babyjubjub-MWZLJOVZ.cjs +0 -66
- package/dist/babyjubjub-MWZLJOVZ.cjs.map +0 -1
- package/dist/chunk-CWSUBAV3.js.map +0 -1
- package/dist/chunk-FVT2XRRL.cjs.map +0 -1
- package/dist/chunk-JWNXBALH.cjs +0 -57
- package/dist/chunk-JWNXBALH.cjs.map +0 -1
- package/dist/chunk-NDM5EJEV.cjs.map +0 -1
- package/dist/chunk-P37MRZ73.js.map +0 -1
- package/dist/chunk-PTDVGWHU.cjs +0 -10
- package/dist/chunk-PTDVGWHU.cjs.map +0 -1
- package/dist/chunk-S4B7GYLN.js.map +0 -1
- package/dist/chunk-SQKBT2SH.cjs.map +0 -1
- package/dist/chunk-TSF6HEVS.cjs +0 -201
- package/dist/chunk-TSF6HEVS.cjs.map +0 -1
- package/dist/chunk-UAVWYXDN.js +0 -8
- package/dist/chunk-UAVWYXDN.js.map +0 -1
- package/dist/chunk-V23OSL25.js +0 -48
- package/dist/chunk-V23OSL25.js.map +0 -1
- package/dist/chunk-YOWDERVC.js +0 -186
- package/dist/chunk-YOWDERVC.js.map +0 -1
- package/dist/merkle-7KS2EHRF.js +0 -5
- package/dist/merkle-HGDC6OB4.cjs +0 -30
- package/dist/poseidon-UHTJLWQM.js +0 -7
- package/dist/poseidon-WHJSZSNP.cjs +0 -45
- package/dist/proof-5OECB3RQ.cjs +0 -45
- package/dist/proof-C4YBP6RY.js +0 -4
- package/dist/transfer-42C4DXYA.cjs +0 -37
- package/dist/transfer-F6YOQTUL.js +0 -8
package/dist/react/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ax as NoteCreationResult, ay as ShieldedNote, O as TransferStage, I as SwapOrderEvent } from '../transfer-
|
|
2
|
-
export { A as ASPProof, aF as ASP_TREE_DEPTH, aD as IndexerConfig, aC as ProofSystemType, aE as SignTypedDataFn, aB as UPPAccountContextType, aA as UPPAccountProvider, Y as buildASPTree, a2 as computeMultiOriginASPRoot, a5 as computeSingleOriginASPRoot, ae as generateASPProof, ag as generateMultiOriginASPProof, ai as generateSingleOriginASPProof, az as useUPPAccount } from '../transfer-
|
|
1
|
+
import { ax as NoteCreationResult, ay as ShieldedNote, O as TransferStage, I as SwapOrderEvent } from '../transfer-D111ihqN.cjs';
|
|
2
|
+
export { A as ASPProof, aF as ASP_TREE_DEPTH, aD as IndexerConfig, aC as ProofSystemType, aE as SignTypedDataFn, aB as UPPAccountContextType, aA as UPPAccountProvider, Y as buildASPTree, a2 as computeMultiOriginASPRoot, a5 as computeSingleOriginASPRoot, ae as generateASPProof, ag as generateMultiOriginASPProof, ai as generateSingleOriginASPProof, az as useUPPAccount } from '../transfer-D111ihqN.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { CSSProperties } from 'react';
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ax as NoteCreationResult, ay as ShieldedNote, O as TransferStage, I as SwapOrderEvent } from '../transfer-
|
|
2
|
-
export { A as ASPProof, aF as ASP_TREE_DEPTH, aD as IndexerConfig, aC as ProofSystemType, aE as SignTypedDataFn, aB as UPPAccountContextType, aA as UPPAccountProvider, Y as buildASPTree, a2 as computeMultiOriginASPRoot, a5 as computeSingleOriginASPRoot, ae as generateASPProof, ag as generateMultiOriginASPProof, ai as generateSingleOriginASPProof, az as useUPPAccount } from '../transfer-
|
|
1
|
+
import { ax as NoteCreationResult, ay as ShieldedNote, O as TransferStage, I as SwapOrderEvent } from '../transfer-DvIXqHCr.js';
|
|
2
|
+
export { A as ASPProof, aF as ASP_TREE_DEPTH, aD as IndexerConfig, aC as ProofSystemType, aE as SignTypedDataFn, aB as UPPAccountContextType, aA as UPPAccountProvider, Y as buildASPTree, a2 as computeMultiOriginASPRoot, a5 as computeSingleOriginASPRoot, ae as generateASPProof, ag as generateMultiOriginASPProof, ai as generateSingleOriginASPProof, az as useUPPAccount } from '../transfer-DvIXqHCr.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { CSSProperties } from 'react';
|
package/dist/react/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { StorableAccountAdapter, init_stealth, stealth_exports, SWAP_ORDER_PLACED_EVENT, filterOrdersByTokenPair, filterOrdersByASP, generateCancelSecret, computeCancelKeyHash, computeGiveAmount, NoteStore } from '../chunk-
|
|
2
|
-
import { computeSingleOriginASPRoot } from '../chunk-
|
|
3
|
-
export { ASP_TREE_DEPTH, buildASPTree, computeMultiOriginASPRoot, computeSingleOriginASPRoot, generateASPProof, generateMultiOriginASPProof, generateSingleOriginASPProof } from '../chunk-
|
|
1
|
+
import { StorableAccountAdapter, init_stealth, stealth_exports, SWAP_ORDER_PLACED_EVENT, filterOrdersByTokenPair, filterOrdersByASP, generateCancelSecret, computeCancelKeyHash, computeGiveAmount, NoteStore } from '../chunk-RNUG3EFC.js';
|
|
2
|
+
import { computeSingleOriginASPRoot } from '../chunk-6IEYWJVS.js';
|
|
3
|
+
export { ASP_TREE_DEPTH, buildASPTree, computeMultiOriginASPRoot, computeSingleOriginASPRoot, generateASPProof, generateMultiOriginASPProof, generateSingleOriginASPProof } from '../chunk-6IEYWJVS.js';
|
|
4
4
|
import { createAutoAdapter } from '../chunk-XV72HNHN.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { init_poseidon, BABYJUBJUB_SUBORDER } from '../chunk-
|
|
5
|
+
import '../chunk-UQIM2KT3.js';
|
|
6
|
+
import { init_poseidon, BABYJUBJUB_SUBORDER } from '../chunk-5QSSX3KR.js';
|
|
7
7
|
import { __toCommonJS } from '../chunk-Z6ZWNWWR.js';
|
|
8
8
|
import { createContext, useState, useRef, useEffect, useCallback, useMemo, useContext } from 'react';
|
|
9
9
|
import { keccak256, toBytes, toHex, getAddress, encodePacked } from 'viem';
|
|
@@ -802,11 +802,9 @@ function useUPPAccount() {
|
|
|
802
802
|
}
|
|
803
803
|
async function createHashBasedNote(sdk, amount, spendingSecret, ownerHash, viewingSecret, origin, token) {
|
|
804
804
|
const blinding = await sdk.randomFieldElement();
|
|
805
|
-
const pubkey = await sdk.privateToPublic(spendingSecret);
|
|
806
805
|
const commitment = await sdk.poseidon([
|
|
807
806
|
amount,
|
|
808
|
-
|
|
809
|
-
pubkey.y,
|
|
807
|
+
ownerHash,
|
|
810
808
|
blinding,
|
|
811
809
|
origin,
|
|
812
810
|
token
|
|
@@ -818,8 +816,6 @@ async function createHashBasedNote(sdk, amount, spendingSecret, ownerHash, viewi
|
|
|
818
816
|
commitment,
|
|
819
817
|
ownerSecret: spendingSecret,
|
|
820
818
|
ownerHash,
|
|
821
|
-
pubkeyX: pubkey.x,
|
|
822
|
-
pubkeyY: pubkey.y,
|
|
823
819
|
blinding,
|
|
824
820
|
encryptedNote,
|
|
825
821
|
searchTag,
|
|
@@ -1601,9 +1597,9 @@ function usePoolTransfer(config) {
|
|
|
1601
1597
|
const recipientNote = await createNoteForSelf(amount, origin, token);
|
|
1602
1598
|
const changeNote = await createNoteForSelf(changeAmount, origin, token);
|
|
1603
1599
|
const [transferModule, proofModule, aspModule] = await Promise.all([
|
|
1604
|
-
import('../transfer-
|
|
1605
|
-
import('../proof-
|
|
1606
|
-
import('../asp-
|
|
1600
|
+
import('../transfer-MQMGSXTH.js'),
|
|
1601
|
+
import('../proof-JME3IZTX.js'),
|
|
1602
|
+
import('../asp-72WUGTQE.js')
|
|
1607
1603
|
]);
|
|
1608
1604
|
const {
|
|
1609
1605
|
syncMerkleTree,
|
|
@@ -1760,8 +1756,8 @@ function useWithdraw(config) {
|
|
|
1760
1756
|
const token = BigInt(selectedNote.token);
|
|
1761
1757
|
setStage("creating_outputs");
|
|
1762
1758
|
const [transferModule, proofModule, sdk] = await Promise.all([
|
|
1763
|
-
import('../transfer-
|
|
1764
|
-
import('../proof-
|
|
1759
|
+
import('../transfer-MQMGSXTH.js'),
|
|
1760
|
+
import('../proof-JME3IZTX.js'),
|
|
1765
1761
|
import('../index.js')
|
|
1766
1762
|
]);
|
|
1767
1763
|
const { syncMerkleTree, getMerkleProofsForNotes } = transferModule;
|
|
@@ -2140,10 +2136,10 @@ function useSwap(config) {
|
|
|
2140
2136
|
}
|
|
2141
2137
|
setStage("creating_outputs");
|
|
2142
2138
|
const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
|
|
2143
|
-
import('../transfer-
|
|
2144
|
-
import('../proof-
|
|
2139
|
+
import('../transfer-MQMGSXTH.js'),
|
|
2140
|
+
import('../proof-JME3IZTX.js'),
|
|
2145
2141
|
import('../index.js'),
|
|
2146
|
-
import('../asp-
|
|
2142
|
+
import('../asp-72WUGTQE.js')
|
|
2147
2143
|
]);
|
|
2148
2144
|
const { syncMerkleTree, getMerkleProofsForNotes } = transferModule;
|
|
2149
2145
|
const { generateUPPProof, formatProofForContract } = proofModule;
|
|
@@ -2292,10 +2288,10 @@ function useSwap(config) {
|
|
|
2292
2288
|
}
|
|
2293
2289
|
setStage("creating_outputs");
|
|
2294
2290
|
const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
|
|
2295
|
-
import('../transfer-
|
|
2296
|
-
import('../proof-
|
|
2291
|
+
import('../transfer-MQMGSXTH.js'),
|
|
2292
|
+
import('../proof-JME3IZTX.js'),
|
|
2297
2293
|
import('../index.js'),
|
|
2298
|
-
import('../asp-
|
|
2294
|
+
import('../asp-72WUGTQE.js')
|
|
2299
2295
|
]);
|
|
2300
2296
|
const { syncMerkleTree, getMerkleProofsForNotes } = transferModule;
|
|
2301
2297
|
const { generateUPPProof, formatProofForContract } = proofModule;
|
|
@@ -2522,9 +2518,9 @@ function useSwap(config) {
|
|
|
2522
2518
|
createNoteForSelf(changeAmount, origin, token)
|
|
2523
2519
|
]);
|
|
2524
2520
|
const [transferModule, proofModule, aspModule] = await Promise.all([
|
|
2525
|
-
import('../transfer-
|
|
2526
|
-
import('../proof-
|
|
2527
|
-
import('../asp-
|
|
2521
|
+
import('../transfer-MQMGSXTH.js'),
|
|
2522
|
+
import('../proof-JME3IZTX.js'),
|
|
2523
|
+
import('../asp-72WUGTQE.js')
|
|
2528
2524
|
]);
|
|
2529
2525
|
const { syncMerkleTree, getMerkleProofsForNotes, buildUPPTransferCircuitInputs } = transferModule;
|
|
2530
2526
|
const { generateUPPProof, formatProofForContract } = proofModule;
|