@interest-protocol/vortex-sdk 0.0.1-alpha.0 → 1.1.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.
Files changed (121) hide show
  1. package/.eslingignore +1 -0
  2. package/dist/__tests__/entities/keypair.spec.d.ts +2 -0
  3. package/dist/__tests__/entities/keypair.spec.d.ts.map +1 -0
  4. package/dist/__tests__/test-utils.d.ts +25 -0
  5. package/dist/__tests__/test-utils.d.ts.map +1 -0
  6. package/dist/__tests__/types.d.ts +3 -0
  7. package/dist/__tests__/types.d.ts.map +1 -0
  8. package/dist/__tests__/vortex.test.d.ts +2 -0
  9. package/dist/__tests__/vortex.test.d.ts.map +1 -0
  10. package/dist/constants.d.ts +44 -0
  11. package/dist/constants.d.ts.map +1 -0
  12. package/dist/crypto/ff/f1field.d.ts +76 -0
  13. package/dist/crypto/ff/f1field.d.ts.map +1 -0
  14. package/dist/crypto/ff/index.d.ts +6 -0
  15. package/dist/crypto/ff/index.d.ts.map +1 -0
  16. package/dist/crypto/ff/random.d.ts +2 -0
  17. package/dist/crypto/ff/random.d.ts.map +1 -0
  18. package/dist/crypto/ff/scalar.d.ts +45 -0
  19. package/dist/crypto/ff/scalar.d.ts.map +1 -0
  20. package/dist/crypto/ff/utils.d.ts +6 -0
  21. package/dist/crypto/ff/utils.d.ts.map +1 -0
  22. package/dist/crypto/index.d.ts +6 -0
  23. package/dist/crypto/index.d.ts.map +1 -0
  24. package/dist/crypto/poseidon/index.d.ts +2 -0
  25. package/dist/crypto/poseidon/index.d.ts.map +1 -0
  26. package/dist/crypto/poseidon/poseidon-constants-opt.d.ts +7 -0
  27. package/dist/crypto/poseidon/poseidon-constants-opt.d.ts.map +1 -0
  28. package/dist/crypto/poseidon/poseidon-opt.d.ts +16 -0
  29. package/dist/crypto/poseidon/poseidon-opt.d.ts.map +1 -0
  30. package/dist/deposit.d.ts +4 -0
  31. package/dist/deposit.d.ts.map +1 -0
  32. package/dist/entities/index.d.ts +4 -0
  33. package/dist/entities/index.d.ts.map +1 -0
  34. package/dist/entities/keypair.d.ts +29 -0
  35. package/dist/entities/keypair.d.ts.map +1 -0
  36. package/dist/entities/merkle-tree.d.ts +81 -0
  37. package/dist/entities/merkle-tree.d.ts.map +1 -0
  38. package/dist/entities/utxo.d.ts +24 -0
  39. package/dist/entities/utxo.d.ts.map +1 -0
  40. package/dist/index.d.ts +6 -2
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +38280 -4459
  43. package/dist/index.js.map +1 -1
  44. package/dist/index.mjs +38244 -4453
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/jest-setup.d.ts +2 -0
  47. package/dist/jest-setup.d.ts.map +1 -0
  48. package/dist/keys/index.d.ts +3 -0
  49. package/dist/keys/index.d.ts.map +1 -0
  50. package/dist/pkg/nodejs/vortex.d.ts +11 -0
  51. package/dist/pkg/nodejs/vortex.d.ts.map +1 -0
  52. package/dist/pkg/web/vortex.d.ts +44 -0
  53. package/dist/pkg/web/vortex.d.ts.map +1 -0
  54. package/dist/utils/decrypt.d.ts +12 -0
  55. package/dist/utils/decrypt.d.ts.map +1 -0
  56. package/dist/utils/env.d.ts +2 -0
  57. package/dist/utils/env.d.ts.map +1 -0
  58. package/dist/utils/events.d.ts +7 -0
  59. package/dist/utils/events.d.ts.map +1 -0
  60. package/dist/utils/ext-data.d.ts +3 -0
  61. package/dist/utils/ext-data.d.ts.map +1 -0
  62. package/dist/utils/index.d.ts +50 -0
  63. package/dist/utils/index.d.ts.map +1 -0
  64. package/dist/utils/prove.d.ts +3 -0
  65. package/dist/utils/prove.d.ts.map +1 -0
  66. package/dist/vortex.d.ts +51 -21
  67. package/dist/vortex.d.ts.map +1 -1
  68. package/dist/vortex.types.d.ts +74 -50
  69. package/dist/vortex.types.d.ts.map +1 -1
  70. package/dist/vortex_bg.wasm +0 -0
  71. package/dist/withdraw.d.ts +4 -0
  72. package/dist/withdraw.d.ts.map +1 -0
  73. package/jest.config.js +31 -0
  74. package/package.json +22 -7
  75. package/src/__tests__/entities/keypair.spec.ts +191 -0
  76. package/src/__tests__/test-utils.ts +76 -0
  77. package/src/__tests__/types.ts +3 -0
  78. package/src/__tests__/vortex.test.ts +25 -0
  79. package/src/constants.ts +104 -0
  80. package/src/crypto/ff/f1field.ts +464 -0
  81. package/src/crypto/ff/index.ts +6 -0
  82. package/src/crypto/ff/random.ts +32 -0
  83. package/src/crypto/ff/readme.md +8 -0
  84. package/src/crypto/ff/scalar.ts +264 -0
  85. package/src/crypto/ff/utils.ts +121 -0
  86. package/src/crypto/index.ts +8 -0
  87. package/src/crypto/poseidon/index.ts +1 -0
  88. package/src/crypto/poseidon/poseidon-constants-opt.ts +24806 -0
  89. package/src/crypto/poseidon/poseidon-opt.ts +184 -0
  90. package/src/deposit.ts +168 -0
  91. package/src/entities/index.ts +3 -0
  92. package/src/entities/keypair.ts +262 -0
  93. package/src/entities/merkle-tree.ts +256 -0
  94. package/src/entities/utxo.ts +52 -0
  95. package/src/index.ts +6 -2
  96. package/src/jest-setup.ts +2 -0
  97. package/src/keys/index.ts +5 -0
  98. package/src/pkg/nodejs/vortex.d.ts +36 -0
  99. package/src/pkg/nodejs/vortex.js +332 -0
  100. package/src/pkg/nodejs/vortex_bg.wasm +0 -0
  101. package/src/pkg/nodejs/vortex_bg.wasm.d.ts +12 -0
  102. package/src/pkg/web/vortex.d.ts +72 -0
  103. package/src/pkg/web/vortex.js +442 -0
  104. package/src/pkg/web/vortex_bg.wasm +0 -0
  105. package/src/pkg/web/vortex_bg.wasm.d.ts +12 -0
  106. package/src/utils/decrypt.ts +46 -0
  107. package/src/utils/env.ts +18 -0
  108. package/src/utils/events.ts +16 -0
  109. package/src/utils/ext-data.ts +43 -0
  110. package/src/utils/index.ts +152 -0
  111. package/src/utils/prove.ts +18 -0
  112. package/src/vortex.ts +235 -111
  113. package/src/vortex.types.ts +74 -54
  114. package/src/withdraw.ts +159 -0
  115. package/tsconfig.json +4 -2
  116. package/dist/admin.d.ts +0 -17
  117. package/dist/admin.d.ts.map +0 -1
  118. package/dist/utils.d.ts +0 -11
  119. package/dist/utils.d.ts.map +0 -1
  120. package/src/admin.ts +0 -124
  121. package/src/utils.ts +0 -66
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=jest-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest-setup.d.ts","sourceRoot":"","sources":["../src/jest-setup.ts"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const PROVING_KEY: string;
2
+ export declare const VERIFYING_KEY: string;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QACm5xxO,CAAC;AAE56xxO,eAAO,MAAM,aAAa,QACi8B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export function main(): void;
2
+ export function prove(input_json: string, proving_key_hex: string): string;
3
+ export function verify(proof_json: string, verifying_key_hex: string): boolean;
4
+ export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0: any, arg1: any): void;
5
+ export function __wbg_error_7534b8e9a36f1ab4(arg0: any, arg1: any): void;
6
+ export function __wbg_new_8a6f238a6ece86ea(): Error;
7
+ export function __wbg_stack_0ed75d68575b0f3c(arg0: any, arg1: any): void;
8
+ export function __wbindgen_cast_2241b6af4c4b2941(arg0: any, arg1: any): string;
9
+ export function __wbindgen_init_externref_table(): void;
10
+ export const __wasm: WebAssembly.Exports;
11
+ //# sourceMappingURL=vortex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vortex.d.ts","sourceRoot":"","sources":["../../../src/pkg/nodejs/vortex.js"],"names":[],"mappings":"AAwKe,6BAEd;AA+Be,kCAJL,MAAM,mBACN,MAAM,GACJ,MAAM,CAgClB;AAegB,mCAJN,MAAM,qBACN,MAAM,GACJ,OAAO,CAoBnB;AAEwD,2FAUxD;AAEsC,yEAUtC;AAEoC,oDAGpC;AAEsC,yEAUtC;AAE0C,+EAI1C;AAEyC,wDAQzC"}
@@ -0,0 +1,44 @@
1
+ export function main(): void;
2
+ /**
3
+ * Generates a zero-knowledge proof for a privacy-preserving transaction
4
+ *
5
+ * # Arguments
6
+ * * `input_json` - JSON string containing all circuit inputs
7
+ * * `proving_key_hex` - Hex-encoded proving key (generated during setup)
8
+ *
9
+ * # Returns
10
+ * JSON string containing the proof and public inputs
11
+ *
12
+ * # Example
13
+ * ```javascript
14
+ * const input = {
15
+ * root: "12345...",
16
+ * publicAmount: "1000",
17
+ * // ... other inputs
18
+ * };
19
+ * const proof = prove(JSON.stringify(input), provingKeyHex);
20
+ * const { proofA, proofB, proofC, publicInputs } = JSON.parse(proof);
21
+ * ```
22
+ * @param {string} input_json
23
+ * @param {string} proving_key_hex
24
+ * @returns {string}
25
+ */
26
+ export function prove(input_json: string, proving_key_hex: string): string;
27
+ /**
28
+ * Verifies a proof (useful for testing before submitting to chain)
29
+ *
30
+ * # Arguments
31
+ * * `proof_json` - JSON string containing proof output from `prove()`
32
+ * * `verifying_key_hex` - Hex-encoded verifying key
33
+ *
34
+ * # Returns
35
+ * "true" if proof is valid, "false" otherwise
36
+ * @param {string} proof_json
37
+ * @param {string} verifying_key_hex
38
+ * @returns {boolean}
39
+ */
40
+ export function verify(proof_json: string, verifying_key_hex: string): boolean;
41
+ export default __wbg_init;
42
+ export function initSync(module: any): any;
43
+ declare function __wbg_init(module_or_path: any): Promise<any>;
44
+ //# sourceMappingURL=vortex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vortex.d.ts","sourceRoot":"","sources":["../../../src/pkg/web/vortex.js"],"names":[],"mappings":"AAkLA,6BAEC;AAOD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,kCAJW,MAAM,mBACN,MAAM,GACJ,MAAM,CAgClB;AAED;;;;;;;;;;;;GAYG;AACH,mCAJW,MAAM,qBACN,MAAM,GACJ,OAAO,CAoBnB;;AA+GD,2CAsBC;AAED,+DA6BC"}
@@ -0,0 +1,12 @@
1
+ import { PaginatedEvents } from '@mysten/sui/client';
2
+ import { VortexKeypair } from '../entities/keypair';
3
+ import { Utxo } from '../entities/utxo';
4
+ import { Vortex } from '../vortex';
5
+ interface GetUnspentUtxosArgs {
6
+ commitmentEvents: PaginatedEvents;
7
+ vortexKeypair: VortexKeypair;
8
+ vortex: Vortex;
9
+ }
10
+ export declare const getUnspentUtxos: ({ commitmentEvents, vortexKeypair, vortex, }: GetUnspentUtxosArgs) => Promise<Utxo[]>;
11
+ export {};
12
+ //# sourceMappingURL=decrypt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decrypt.d.ts","sourceRoot":"","sources":["../../src/utils/decrypt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,UAAU,mBAAmB;IAC3B,gBAAgB,EAAE,eAAe,CAAC;IAClC,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,GAAU,8CAInC,mBAAmB,oBA2BrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getEnv: () => "web" | "node";
2
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,MAAM,sBAMlB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { PaginatedEvents } from '@mysten/sui/client';
2
+ export declare const parseNewCommitmentEvent: (events: PaginatedEvents) => {
3
+ commitment: bigint;
4
+ index: bigint;
5
+ encryptedOutput: string;
6
+ }[];
7
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,eAAO,MAAM,uBAAuB,GAAI,QAAQ,eAAe;;;;GAW3D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ExtDataHashArgs } from '../vortex.types';
2
+ export declare function computeExtDataHash({ recipient, value, valueSign, relayer, relayerFee, encryptedOutput0, encryptedOutput1, }: ExtDataHashArgs): Uint8Array;
3
+ //# sourceMappingURL=ext-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ext-data.d.ts","sourceRoot":"","sources":["../../src/utils/ext-data.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,KAAK,EACL,SAAS,EACT,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,gBAAgB,GACjB,EAAE,eAAe,GAAG,UAAU,CA4B9B"}
@@ -0,0 +1,50 @@
1
+ import { MerkleTree } from '../entities/merkle-tree';
2
+ import { Utxo } from '../entities/utxo';
3
+ import { VortexKeypair } from '../entities/keypair';
4
+ export declare const reverseBytes: (bytes: Uint8Array) => Uint8Array;
5
+ export declare const bytesToBigInt: (bytes: Uint8Array) => bigint;
6
+ export declare function getMerklePath(merkleTree: MerkleTree, utxo: Utxo | null): [string, string][];
7
+ interface ToProveInputArgs {
8
+ merkleTree: MerkleTree;
9
+ publicAmount: bigint;
10
+ extDataHash: bigint;
11
+ nullifier0: bigint;
12
+ nullifier1: bigint;
13
+ commitment0: bigint;
14
+ commitment1: bigint;
15
+ vortexKeypair: VortexKeypair;
16
+ inputUtxo0: Utxo;
17
+ inputUtxo1: Utxo;
18
+ outputUtxo0: Utxo;
19
+ outputUtxo1: Utxo;
20
+ }
21
+ export declare const toProveInput: ({ merkleTree, publicAmount, extDataHash, nullifier0, nullifier1, commitment0, commitment1, vortexKeypair, inputUtxo0, inputUtxo1, outputUtxo0, outputUtxo1, }: ToProveInputArgs) => {
22
+ root: bigint;
23
+ publicAmount: bigint;
24
+ extDataHash: bigint;
25
+ inputNullifier0: bigint;
26
+ inputNullifier1: bigint;
27
+ outputCommitment0: bigint;
28
+ outputCommitment1: bigint;
29
+ inPrivateKey0: bigint;
30
+ inPrivateKey1: bigint;
31
+ inAmount0: bigint;
32
+ inAmount1: bigint;
33
+ inBlinding0: bigint;
34
+ inBlinding1: bigint;
35
+ inPathIndex0: bigint;
36
+ inPathIndex1: bigint;
37
+ merklePath0: [string, string][];
38
+ merklePath1: [string, string][];
39
+ outPublicKey0: string;
40
+ outPublicKey1: string;
41
+ outAmount0: bigint;
42
+ outAmount1: bigint;
43
+ outBlinding0: bigint;
44
+ outBlinding1: bigint;
45
+ };
46
+ export * from './ext-data';
47
+ export * from './events';
48
+ export * from './prove';
49
+ export * from './decrypt';
50
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,eAAO,MAAM,YAAY,GAAI,OAAO,UAAU,KAAG,UAMhD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,UAAU,KAAG,MAEjD,CAAC;AAEF,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,GAAG,IAAI,GAChB,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAkEpB;AAED,UAAU,gBAAgB;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,IAAI,CAAC;IAClB,WAAW,EAAE,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,GAAI,+JAa1B,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;CA2BlB,CAAC;AAEF,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const prove: (input: string) => string;
2
+ export declare const verify: (proof: string) => boolean;
3
+ //# sourceMappingURL=prove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prove.d.ts","sourceRoot":"","sources":["../../src/utils/prove.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,WAKlC,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,YAKnC,CAAC"}
package/dist/vortex.d.ts CHANGED
@@ -1,24 +1,54 @@
1
- import { SdkConstructorArgs, DepositArgs, Pool, WithdrawArgs } from './vortex.types';
2
1
  import { Transaction } from '@mysten/sui/transactions';
3
- export declare class VortexSdk {
4
- private client;
5
- private packageId;
6
- private pools;
7
- TREE_HEIGHT: number;
8
- BN254_FIELD_MODULUS: bigint;
9
- constructor(args: SdkConstructorArgs);
10
- generateRandomNote(): {
11
- nullifier: bigint;
12
- secret: bigint;
13
- commitment: bigint;
14
- };
15
- poseidon1(a: bigint | number | string): bigint;
16
- poseidon2(a: bigint | number | string, b: bigint | number | string): bigint;
17
- addressToFieldElement(address: string): bigint;
18
- bigIntToFieldElement(value: bigint): bigint;
19
- zeros(): bigint[];
20
- deposit({ commitment, pool, tx }: DepositArgs): Transaction;
21
- withdraw({ proofPointsHex, root, nullifier, recipient, relayer, relayerFee, pool, tx, }: WithdrawArgs): Transaction;
22
- root(pool: Pool): Promise<any>;
2
+ import { ConstructorArgs, RegisterArgs, SharedObjectData, NewExtDataArgs, NewProofArgs, TransactArgs } from './vortex.types';
3
+ export declare class Vortex {
4
+ #private;
5
+ packageId: string;
6
+ registry: SharedObjectData;
7
+ vortex: SharedObjectData;
8
+ newCommitmentEventType: string;
9
+ nullifierSpentEventType: string;
10
+ newEncryptionKeyEventType: string;
11
+ constructor({ registry, packageId, vortex, fullNodeUrl, }: ConstructorArgs);
12
+ register({ tx, encryptionKey }: RegisterArgs): {
13
+ tx: Transaction;
14
+ };
15
+ encryptionKey(user: string): Promise<string>;
16
+ newExtData({ tx, recipient, value, action, relayer, relayerFee, encryptedOutput1, encryptedOutput0, }: NewExtDataArgs): {
17
+ tx: Transaction;
18
+ extData: import("@mysten/sui/dist/cjs/transactions").TransactionResult;
19
+ };
20
+ newProof({ tx, proofPoints, root, publicValue, action, extDataHash, inputNullifier0, inputNullifier1, outputCommitment0, outputCommitment1, }: NewProofArgs): {
21
+ tx: Transaction;
22
+ proof: import("@mysten/sui/dist/cjs/transactions").TransactionResult;
23
+ };
24
+ transact({ tx, proof, extData, deposit }: TransactArgs): {
25
+ tx: Transaction;
26
+ };
27
+ tvl(): Promise<bigint>;
28
+ root(): Promise<bigint>;
29
+ nextIndex(): Promise<bigint>;
30
+ isNullifierSpent(nullifier: bigint): Promise<boolean>;
31
+ areNullifiersSpent(nullifiers: bigint[]): Promise<boolean[]>;
32
+ immutableVortexRef(tx: Transaction): {
33
+ $kind: "Input";
34
+ Input: number;
35
+ type?: "object";
36
+ };
37
+ immutableRegistryRef(tx: Transaction): {
38
+ $kind: "Input";
39
+ Input: number;
40
+ type?: "object";
41
+ };
42
+ mutableVortexRef(tx: Transaction): {
43
+ $kind: "Input";
44
+ Input: number;
45
+ type?: "object";
46
+ };
47
+ mutableRegistryRef(tx: Transaction): {
48
+ $kind: "Input";
49
+ Input: number;
50
+ type?: "object";
51
+ };
23
52
  }
53
+ export declare const vortexSDK: Vortex;
24
54
  //# sourceMappingURL=vortex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vortex.d.ts","sourceRoot":"","sources":["../src/vortex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAElB,WAAW,EAEX,IAAI,EACJ,YAAY,EACb,MAAM,gBAAgB,CAAC;AAWxB,OAAO,EAAE,WAAW,EAAmB,MAAM,0BAA0B,CAAC;AAKxE,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,KAAK,CAAc;IAEpB,WAAW,SAAM;IACjB,mBAAmB,SAAuB;gBAErC,IAAI,EAAE,kBAAkB;IAMpC,kBAAkB;;;;;IAIlB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAIrC,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAIlE,qBAAqB,CAAC,OAAO,EAAE,MAAM;IAIrC,oBAAoB,CAAC,KAAK,EAAE,MAAM;IAIlC,KAAK;IAIL,OAAO,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,EAAsB,EAAE,EAAE,WAAW;IA0BjE,QAAQ,CAAC,EACP,cAAc,EACd,IAAI,EACJ,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,IAAI,EACJ,EAAsB,GACvB,EAAE,YAAY;IAqCT,IAAI,CAAC,IAAI,EAAE,IAAI;CA4BtB"}
1
+ {"version":3,"file":"vortex.d.ts","sourceRoot":"","sources":["../src/vortex.ts"],"names":[],"m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E,EAAE,WAAW;;;;;CAOnC;AAED,eAAO,MAAM,SAAS,QAWpB,CAAC"}
@@ -1,69 +1,93 @@
1
- import { SuiClient } from '@mysten/sui/client';
2
- import { Transaction, TransactionResult } from '@mysten/sui/transactions';
3
- export declare enum Pool {
4
- shrimp = 100000000,
5
- dolphin = 1000000000,
6
- whale = 10000000000
1
+ import { MaybeTx } from '@interest-protocol/sui-core-sdk';
2
+ import { TransactionResult } from '@mysten/sui/transactions';
3
+ import { Vortex } from './vortex';
4
+ import { VortexKeypair } from './entities/keypair';
5
+ import { MerkleTree } from './entities/merkle-tree';
6
+ import { Utxo } from './entities/utxo';
7
+ export declare enum Action {
8
+ Deposit = 0,
9
+ Withdraw = 1
7
10
  }
8
- export declare enum Modules {
9
- vortex = "vortex",
10
- proof = "vortex_proof",
11
- merkleTree = "vortex_merkle_tree"
11
+ export interface RegisterArgs extends MaybeTx {
12
+ encryptionKey: string;
12
13
  }
13
- export interface SharedObject {
14
+ export interface SharedObjectData {
14
15
  objectId: string;
15
16
  initialSharedVersion: string;
16
17
  }
17
- export interface VortexPools {
18
- [Pool.shrimp]: SharedObject;
19
- [Pool.dolphin]: SharedObject;
20
- [Pool.whale]: SharedObject;
21
- }
22
- export interface SdkConstructorArgs {
23
- client: SuiClient;
18
+ export interface ConstructorArgs {
19
+ registry: SharedObjectData;
20
+ vortex: SharedObjectData;
21
+ fullNodeUrl?: string;
24
22
  packageId: string;
25
- pools: VortexPools;
26
23
  }
27
- export interface AdminSdkConstructorArgs {
28
- packageId: string;
29
- adminCap: string;
24
+ export interface ExtDataHashArgs {
25
+ recipient: string;
26
+ value: bigint;
27
+ valueSign: boolean;
28
+ relayer: string;
29
+ relayerFee: bigint;
30
+ encryptedOutput0: Uint8Array;
31
+ encryptedOutput1: Uint8Array;
30
32
  }
31
- export interface DepositArgs {
32
- tx?: Transaction;
33
- commitment: bigint;
34
- pool: Pool;
33
+ export interface Proof {
34
+ proofA: number[];
35
+ proofB: number[];
36
+ proofC: number[];
37
+ publicInputs: [string, string, string, string, string, string, string];
38
+ proofSerializedHex: string;
39
+ publicInputsHex: string;
35
40
  }
36
- export interface WithdrawArgs {
37
- tx?: Transaction;
38
- pool: Pool;
39
- proofPointsHex: string;
40
- root: bigint;
41
- nullifier: bigint;
41
+ export interface NewExtDataArgs extends MaybeTx {
42
42
  recipient: string;
43
+ value: bigint;
43
44
  relayer: string;
44
45
  relayerFee: bigint;
46
+ encryptedOutput0: Uint8Array;
47
+ encryptedOutput1: Uint8Array;
48
+ action: Action;
45
49
  }
46
- export interface NewPoolArgs {
47
- tx?: Transaction;
48
- pool: Pool;
50
+ export interface NewProofArgs extends MaybeTx {
51
+ proofPoints: Uint8Array;
52
+ root: bigint;
53
+ publicValue: bigint;
54
+ action: Action;
55
+ extDataHash: bigint;
56
+ inputNullifier0: bigint;
57
+ inputNullifier1: bigint;
58
+ outputCommitment0: bigint;
59
+ outputCommitment1: bigint;
60
+ }
61
+ interface NestedResult {
62
+ $kind: 'NestedResult';
63
+ NestedResult: [number, number];
49
64
  }
50
- export interface SharePoolArgs {
51
- tx: Transaction;
52
- pool: TransactionResult;
65
+ export interface TransactArgs extends MaybeTx {
66
+ proof: TransactionResult;
67
+ extData: TransactionResult;
68
+ deposit: TransactionResult | NestedResult;
53
69
  }
54
- export interface SetDepositFeeArgs {
55
- tx?: Transaction;
56
- pool: TransactionResult | string;
57
- fee: bigint;
70
+ export interface DepositArgs extends MaybeTx {
71
+ amount: bigint;
72
+ vortex: Vortex;
73
+ vortexKeypair: VortexKeypair;
74
+ merkleTree: MerkleTree;
75
+ unspentUtxos?: Utxo[];
58
76
  }
59
- export interface SetWithdrawFeeArgs {
60
- tx?: Transaction;
61
- pool: TransactionResult | string;
62
- fee: bigint;
77
+ export interface WithdrawArgs extends MaybeTx {
78
+ amount: bigint;
79
+ unspentUtxos: Utxo[];
80
+ vortex: Vortex;
81
+ vortexKeypair: VortexKeypair;
82
+ merkleTree: MerkleTree;
83
+ recipient: string;
84
+ relayer: string;
85
+ relayerFee: bigint;
63
86
  }
64
- export interface SetGroth16VkArgs {
65
- tx?: Transaction;
66
- pool: TransactionResult | string;
67
- vk: string;
87
+ export interface ParsedCommitmentEvent {
88
+ commitment: bigint;
89
+ index: bigint;
90
+ encryptedOutput: string;
68
91
  }
92
+ export {};
69
93
  //# sourceMappingURL=vortex.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vortex.types.d.ts","sourceRoot":"","sources":["../src/vortex.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,oBAAY,IAAI;IAEd,MAAM,YAAc;IAEpB,OAAO,aAAgB;IAEvB,KAAK,cAAiB;CACvB;AAED,oBAAY,OAAO;IACjB,MAAM,WAAW;IACjB,KAAK,iBAAiB;IACtB,UAAU,uBAAuB;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAC5B,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IAC7B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ;A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,0 +1,4 @@
1
+ import { Transaction } from '@mysten/sui/transactions';
2
+ import { WithdrawArgs } from './vortex.types';
3
+ export declare const withdraw: ({ tx, amount, unspentUtxos, vortex, vortexKeypair, merkleTree, recipient, relayer, relayerFee, }: WithdrawArgs) => Promise<Transaction>;
4
+ //# sourceMappingURL=withdraw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withdraw.d.ts","sourceRoot":"","sources":["../src/withdraw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAgBvD,OAAO,EAAiB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE7D,eAAO,MAAM,QAAQ,GAAU,kGAU5B,YAAY,yBAkId,CAAC"}
package/jest.config.js ADDED
@@ -0,0 +1,31 @@
1
+ /** @type {import('jest').Config} */
2
+ const config = {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ watchman: false,
6
+ testMatch: ['<rootDir>/src/**/*.(test|spec).(ts|tsx)'],
7
+ transform: {
8
+ '^.+\.tsx?$': [
9
+ 'ts-jest',
10
+ {
11
+ tsconfig: '<rootDir>/tsconfig.json',
12
+ },
13
+ ],
14
+ '^.+\\.js$': [
15
+ 'ts-jest',
16
+ {
17
+ tsconfig: '<rootDir>/tsconfig.json',
18
+ },
19
+ ],
20
+ },
21
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
22
+ collectCoverageFrom: ['<rootDir>/src/**/*.ts', '!<rootDir>/src/**/*.test.ts'],
23
+ moduleNameMapper: {
24
+ '^@/(.*)$': '<rootDir>/src/$1',
25
+ },
26
+ transformIgnorePatterns: [
27
+ 'node_modules/(?!.*@noble)',
28
+ ],
29
+ };
30
+
31
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interest-protocol/vortex-sdk",
3
- "version": "0.0.1-alpha.0",
3
+ "version": "1.1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "./dist/index.mjs",
@@ -18,24 +18,38 @@
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
20
  "@mysten/sui": "^1.36.2",
21
+ "@noble/ciphers": "^2.0.1",
22
+ "@noble/curves": "^2.0.1",
23
+ "@noble/hashes": "^2.0.1",
21
24
  "@polymedia/suitcase-core": "^0.0.67",
22
- "poseidon-hash": "^1.0.1",
23
- "poseidon-lite": "^0.3.0",
25
+ "bn.js": "^5.2.2",
24
26
  "ramda": "^0.30.1",
25
- "tiny-invariant": "^1.3.3"
27
+ "tiny-invariant": "^1.3.3",
28
+ "@interest-protocol/sui-core-sdk": "1.0.0"
26
29
  },
27
30
  "devDependencies": {
31
+ "@types/bn.js": "^5.1.6",
32
+ "@types/jest": "^29.5.5",
33
+ "@types/ramda": "^0.30.2",
34
+ "jest": "^29.7.0",
35
+ "jest-environment-node": "^29.7.0",
28
36
  "rimraf": "^6.0.1",
37
+ "ts-jest": "^29.1.1",
29
38
  "tsup": "^8.3.5",
30
- "@interest-protocol/prettier-config": "1.0.0",
31
- "@interest-protocol/typescript-config": "1.0.0"
39
+ "@interest-protocol/typescript-config": "1.0.0",
40
+ "@interest-protocol/prettier-config": "1.0.0"
32
41
  },
33
42
  "publishConfig": {
34
43
  "access": "public",
35
44
  "dependencies": {
45
+ "@interest-protocol/sui-core-sdk": "1.0.0",
36
46
  "@mysten/sui": "^1.36.2",
47
+ "@noble/ciphers": "^2.0.1",
48
+ "@noble/curves": "^2.0.1",
49
+ "@noble/hashes": "^2.0.1",
37
50
  "@polymedia/suitcase-core": "^0.0.67",
38
- "poseidon-hash": "^1.0.1",
51
+ "bn.js": "^5.2.2",
52
+ "pnpm": "^10.22.0",
39
53
  "poseidon-lite": "^0.3.0",
40
54
  "ramda": "^0.30.1",
41
55
  "tiny-invariant": "^1.3.3"
@@ -44,6 +58,7 @@
44
58
  "scripts": {
45
59
  "prebuild": "rimraf dist",
46
60
  "build": "rollup -c rollup.config.js",
61
+ "postbuild": "mkdir -p dist && cp src/pkg/nodejs/vortex_bg.wasm dist/vortex_bg.wasm",
47
62
  "build:types": "tsc --emitDeclarationOnly"
48
63
  }
49
64
  }