@0xbow/privacy-pools-core-sdk 1.0.2 → 1.0.3

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.
Files changed (29) hide show
  1. package/dist/esm/{fetchArtifacts.esm-D0mKkSYH.js → fetchArtifacts.esm-aHubC6Nb.js} +2 -2
  2. package/dist/esm/{fetchArtifacts.esm-D0mKkSYH.js.map → fetchArtifacts.esm-aHubC6Nb.js.map} +1 -1
  3. package/dist/esm/{fetchArtifacts.node-D2RwI1ei.js → fetchArtifacts.node-DUdhNM9Z.js} +2 -2
  4. package/dist/esm/{fetchArtifacts.node-D2RwI1ei.js.map → fetchArtifacts.node-DUdhNM9Z.js.map} +1 -1
  5. package/dist/esm/{index-CysEkDfm.js → index-BQLhaPQL.js} +11 -4
  6. package/dist/esm/{index-CysEkDfm.js.map → index-BQLhaPQL.js.map} +1 -1
  7. package/dist/esm/index.mjs +1 -1
  8. package/dist/node/{fetchArtifacts.esm-GuREmUVE.js → fetchArtifacts.esm-CRX34p8g.js} +2 -2
  9. package/dist/node/{fetchArtifacts.esm-GuREmUVE.js.map → fetchArtifacts.esm-CRX34p8g.js.map} +1 -1
  10. package/dist/node/{fetchArtifacts.node-80qrImLq.js → fetchArtifacts.node-CuPs4jZ1.js} +2 -2
  11. package/dist/node/{fetchArtifacts.node-80qrImLq.js.map → fetchArtifacts.node-CuPs4jZ1.js.map} +1 -1
  12. package/dist/node/{index-bIu80opN.js → index-DB1uYJPF.js} +11 -4
  13. package/dist/node/{index-bIu80opN.js.map → index-DB1uYJPF.js.map} +1 -1
  14. package/dist/node/index.mjs +1 -1
  15. package/dist/types/core/test.d.ts +1 -0
  16. package/dist/types/{fetchArtifacts.esm-Ok2Ropox.js → fetchArtifacts.esm-CzBDJOwj.js} +1 -1
  17. package/dist/types/{fetchArtifacts.node-DpNFJc75.js → fetchArtifacts.node-CtMsXhR9.js} +1 -1
  18. package/dist/types/{index-xpjDqElC.js → index-BL6xN-P5.js} +10 -3
  19. package/dist/types/index.js +1 -1
  20. package/package.json +1 -1
  21. package/src/core/contracts.service.ts +6 -2
  22. package/src/core/data.service.ts +8 -6
  23. package/src/providers/blockchainProvider.ts +3 -1
  24. package/dist/node/artifacts/commitment.vkey +0 -109
  25. package/dist/node/artifacts/commitment.wasm +0 -0
  26. package/dist/node/artifacts/commitment.zkey +0 -0
  27. package/dist/node/artifacts/withdraw.vkey +0 -129
  28. package/dist/node/artifacts/withdraw.wasm +0 -0
  29. package/dist/node/artifacts/withdraw.zkey +0 -0
@@ -1,4 +1,4 @@
1
- import { F as FetchArtifact } from './index-CysEkDfm.js';
1
+ import { F as FetchArtifact } from './index-BQLhaPQL.js';
2
2
  import 'viem/accounts';
3
3
  import 'buffer';
4
4
  import 'assert';
@@ -15,4 +15,4 @@ async function fetchVersionedArtifact(artifactUrl) {
15
15
  }
16
16
 
17
17
  export { fetchVersionedArtifact };
18
- //# sourceMappingURL=fetchArtifacts.esm-D0mKkSYH.js.map
18
+ //# sourceMappingURL=fetchArtifacts.esm-aHubC6Nb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchArtifacts.esm-D0mKkSYH.js","sources":["../../src/circuits/fetchArtifacts.esm.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAEO,eAAe,sBAAsB,CAC1C,WAAgB,EAAA;AAEhB,IAAA,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC;AACpC,IAAA,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;AACtB,QAAA,MAAM,IAAI,aAAa,CAAC,WAAW,CAAC;;AAEtC,IAAA,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,WAAW,EAAE;AACpC,IAAA,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC;AAC7B;;;;"}
1
+ {"version":3,"file":"fetchArtifacts.esm-aHubC6Nb.js","sources":["../../src/circuits/fetchArtifacts.esm.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAEO,eAAe,sBAAsB,CAC1C,WAAgB,EAAA;AAEhB,IAAA,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC;AACpC,IAAA,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;AACtB,QAAA,MAAM,IAAI,aAAa,CAAC,WAAW,CAAC;;AAEtC,IAAA,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,WAAW,EAAE;AACpC,IAAA,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC;AAC7B;;;;"}
@@ -1,4 +1,4 @@
1
- import { F as FetchArtifact } from './index-CysEkDfm.js';
1
+ import { F as FetchArtifact } from './index-BQLhaPQL.js';
2
2
  import 'viem/accounts';
3
3
  import 'buffer';
4
4
  import 'assert';
@@ -28,4 +28,4 @@ async function fetchVersionedArtifact(artifactUrl) {
28
28
  }
29
29
 
30
30
  export { fetchVersionedArtifact };
31
- //# sourceMappingURL=fetchArtifacts.node-D2RwI1ei.js.map
31
+ //# sourceMappingURL=fetchArtifacts.node-DUdhNM9Z.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchArtifacts.node-D2RwI1ei.js","sources":["../../src/circuits/fetchArtifacts.node.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAEO,eAAe,sBAAsB,CAC1C,WAAgB,EAAA;AAEhB,IAAA,IAAI;QACF,MAAM,EAAE,GAAG,CAAC,MAAM,OAAO,IAAI,CAAC,EAAE,OAAO;QACvC,MAAM,WAAW,GAAoB,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACnE,YAAA,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,KAAI;gBAC9C,IAAI,GAAG,EAAE;oBACP,MAAM,CAAC,GAAG,CAAC;;qBACN;oBACL,OAAO,CAAC,IAAI,CAAC;;AAEjB,aAAC,CAAC;AACJ,SAAC,CAAC;AACF,QAAA,MAAM,GAAG,GAAG,MAAM,WAAW;AAC7B,QAAA,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC;;IAC1B,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACpB,QAAA,MAAM,IAAI,aAAa,CAAC,WAAW,CAAC;;AAExC;;;;"}
1
+ {"version":3,"file":"fetchArtifacts.node-DUdhNM9Z.js","sources":["../../src/circuits/fetchArtifacts.node.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAEO,eAAe,sBAAsB,CAC1C,WAAgB,EAAA;AAEhB,IAAA,IAAI;QACF,MAAM,EAAE,GAAG,CAAC,MAAM,OAAO,IAAI,CAAC,EAAE,OAAO;QACvC,MAAM,WAAW,GAAoB,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACnE,YAAA,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,KAAI;gBAC9C,IAAI,GAAG,EAAE;oBACP,MAAM,CAAC,GAAG,CAAC;;qBACN;oBACL,OAAO,CAAC,IAAI,CAAC;;AAEjB,aAAC,CAAC;AACJ,SAAC,CAAC;AACF,QAAA,MAAM,GAAG,GAAG,MAAM,WAAW;AAC7B,QAAA,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC;;IAC1B,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACpB,QAAA,MAAM,IAAI,aAAa,CAAC,WAAW,CAAC;;AAExC;;;;"}
@@ -45803,10 +45803,10 @@ const circuitToAsset = {
45803
45803
 
45804
45804
  async function importFetchVersionedArtifact(isBrowser) {
45805
45805
  if (isBrowser) {
45806
- return import('./fetchArtifacts.esm-D0mKkSYH.js');
45806
+ return import('./fetchArtifacts.esm-aHubC6Nb.js');
45807
45807
  }
45808
45808
  else {
45809
- return import('./fetchArtifacts.node-D2RwI1ei.js');
45809
+ return import('./fetchArtifacts.node-DUdhNM9Z.js');
45810
45810
  }
45811
45811
  }
45812
45812
 
@@ -69377,7 +69377,7 @@ class AccountService {
69377
69377
  */
69378
69378
  constructor(dataService, config) {
69379
69379
  this.dataService = dataService;
69380
- this.logger = new Logger({ prefix: "Account" });
69380
+ this.logger = new Logger({ prefix: "Account", level: LogLevel.DEBUG });
69381
69381
  if ("mnemonic" in config) {
69382
69382
  this.account = this._initializeAccount(config.mnemonic);
69383
69383
  }
@@ -69592,6 +69592,12 @@ class AccountService {
69592
69592
  addPoolAccount(scope, value, nullifier, secret, label, blockNumber, txHash) {
69593
69593
  const precommitment = this._hashPrecommitment(nullifier, secret);
69594
69594
  const commitment = this._hashCommitment(value, label, precommitment);
69595
+ this.logger.debug(`Commitment calculation details`, {
69596
+ value,
69597
+ label,
69598
+ precommitment,
69599
+ commitment,
69600
+ });
69595
69601
  const newAccount = {
69596
69602
  label,
69597
69603
  deposit: {
@@ -69657,6 +69663,7 @@ class AccountService {
69657
69663
  blockNumber,
69658
69664
  txHash,
69659
69665
  };
69666
+ this.logger.debug(`adding the following commitment`, { precommitment, hash: this._hashCommitment(value, parentCommitment.label, precommitment), });
69660
69667
  foundAccount.children.push(newCommitment);
69661
69668
  this.logger.info(`Added new commitment with value ${value} to account with label ${parentCommitment.label}`);
69662
69669
  return newCommitment;
@@ -70346,4 +70353,4 @@ class DataService {
70346
70353
  }
70347
70354
 
70348
70355
  export { AccountService as A, BlockchainProvider as B, CommitmentService as C, DataService as D, ErrorCode as E, FetchArtifact as F, InvalidRpcUrl as I, PrivacyPoolSDK as P, SDKError as S, WithdrawalService as W, generateDepositSecrets as a, generateWithdrawalSecrets as b, getCommitment as c, generateMerkleProof as d, bigintToHash as e, bigintToHex as f, generateMasterKeys as g, hashPrecommitment as h, calculateContext as i, Circuits as j, ContractInteractionsService as k, ProofError as l, ContractError as m, AccountError as n, CircuitName as o };
70349
- //# sourceMappingURL=index-CysEkDfm.js.map
70356
+ //# sourceMappingURL=index-BQLhaPQL.js.map