@interest-protocol/vortex-sdk 6.2.0 → 6.3.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/index.mjs CHANGED
@@ -39184,11 +39184,19 @@ class Utxo {
39184
39184
  this.index = index ?? 0n;
39185
39185
  this.vortexPool = vortexPool;
39186
39186
  }
39187
+ static makeCommitment({ amount, publicKey, blinding, vortexPool, }) {
39188
+ return poseidon4(amount, BigInt(publicKey), blinding, BigInt(normalizeSuiAddress(vortexPool, !vortexPool.startsWith('0x'))));
39189
+ }
39187
39190
  static blinding() {
39188
39191
  return BigInt(Math.floor(Math.random() * 1000000000));
39189
39192
  }
39190
39193
  commitment() {
39191
- return poseidon4(this.amount, BigInt(this.keypair.publicKey), this.blinding, BigInt(normalizeSuiAddress(this.vortexPool, !this.vortexPool.startsWith('0x'))));
39194
+ return Utxo.makeCommitment({
39195
+ amount: this.amount,
39196
+ publicKey: this.keypair.publicKey,
39197
+ blinding: this.blinding,
39198
+ vortexPool: this.vortexPool,
39199
+ });
39192
39200
  }
39193
39201
  nullifier() {
39194
39202
  const commitment = this.commitment();