@thesingularitynetwork/darkswap-sdk 0.1.18 → 0.1.19

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 (83) hide show
  1. package/dist/test/utils/helpers.d.ts +9 -0
  2. package/package.json +56 -53
  3. package/src/abis/DarkSwapAssetManager.json +0 -1162
  4. package/src/abis/DarkSwapFeeAssetManager.json +0 -282
  5. package/src/abis/IERC20.json +0 -194
  6. package/src/abis/IERC20_USDT.json +0 -188
  7. package/src/abis/MerkleTreeOperator.json +0 -533
  8. package/src/aztec/bigint-buffer/index.ts +0 -87
  9. package/src/aztec/collection/object.ts +0 -76
  10. package/src/aztec/crypto/poseidon/index.ts +0 -18
  11. package/src/aztec/crypto/schnorr/index.ts +0 -40
  12. package/src/aztec/crypto/schnorr/signature.ts +0 -107
  13. package/src/aztec/crypto/serialize.ts +0 -85
  14. package/src/aztec/crypto/signature/index.ts +0 -17
  15. package/src/aztec/fields/fields.ts +0 -361
  16. package/src/aztec/fields/point.ts +0 -208
  17. package/src/aztec/serialize/buffer_reader.ts +0 -402
  18. package/src/aztec/serialize/field_reader.ts +0 -154
  19. package/src/aztec/serialize/free_funcs.ts +0 -193
  20. package/src/aztec/serialize/serialize.ts +0 -336
  21. package/src/aztec/serialize/types.ts +0 -19
  22. package/src/aztec/string/index.ts +0 -39
  23. package/src/circuits/pro/dark_swap_cancel_order_compiled_circuit.json +0 -1
  24. package/src/circuits/pro/dark_swap_deposit_compiled_circuit.json +0 -1
  25. package/src/circuits/pro/dark_swap_join_compiled_circuit.json +0 -1
  26. package/src/circuits/pro/dark_swap_pro_create_order_compiled_circuit.json +0 -1
  27. package/src/circuits/pro/dark_swap_pro_swap_compiled_circuit.json +0 -1
  28. package/src/circuits/pro/dark_swap_triple_join_compiled_circuit.json +0 -1
  29. package/src/circuits/pro/dark_swap_withdraw_compiled_circuit.json +0 -1
  30. package/src/circuits/retail/dark_swap_cancel_order_withdraw_compiled_circuit.json +0 -1
  31. package/src/circuits/retail/dark_swap_retail_deposit_create_order_compiled_circuit.json +0 -1
  32. package/src/circuits/retail/dark_swap_retail_swap_compiled_circuit.json +0 -1
  33. package/src/config/chain.ts +0 -9
  34. package/src/config/config.ts +0 -9
  35. package/src/config/contractConfig.ts +0 -61
  36. package/src/config/index.ts +0 -3
  37. package/src/darkSwap.ts +0 -31
  38. package/src/entities/error.ts +0 -6
  39. package/src/entities/index.ts +0 -3
  40. package/src/entities/token.ts +0 -9
  41. package/src/entities/types.ts +0 -6
  42. package/src/index.ts +0 -9
  43. package/src/proof/baseProofService.ts +0 -34
  44. package/src/proof/basic/depositProof.ts +0 -101
  45. package/src/proof/basic/joinProof.ts +0 -112
  46. package/src/proof/basic/tripleJoinProof.ts +0 -130
  47. package/src/proof/basic/withdrawProof.ts +0 -97
  48. package/src/proof/keyService.ts +0 -9
  49. package/src/proof/noteService.ts +0 -114
  50. package/src/proof/pro/orders/cancelOrderProof.ts +0 -126
  51. package/src/proof/pro/orders/createOrderProof.ts +0 -136
  52. package/src/proof/pro/orders/swapProof.ts +0 -189
  53. package/src/proof/retail/cancelOrderProof.ts +0 -78
  54. package/src/proof/retail/depositOrderProof.ts +0 -133
  55. package/src/proof/retail/swapProof.ts +0 -158
  56. package/src/services/BaseService.ts +0 -49
  57. package/src/services/EventService.ts +0 -17
  58. package/src/services/agent/index.ts +0 -1
  59. package/src/services/agent/retailSwap.ts +0 -116
  60. package/src/services/base/deposit.ts +0 -174
  61. package/src/services/base/index.ts +0 -4
  62. package/src/services/base/join.ts +0 -135
  63. package/src/services/base/tripleJoin.ts +0 -161
  64. package/src/services/base/withdraw.ts +0 -123
  65. package/src/services/feeRatioService.ts +0 -13
  66. package/src/services/index.ts +0 -7
  67. package/src/services/merkletree.ts +0 -46
  68. package/src/services/noteService.ts +0 -75
  69. package/src/services/pro/cancelOrder.ts +0 -142
  70. package/src/services/pro/createOrder.ts +0 -183
  71. package/src/services/pro/index.ts +0 -3
  72. package/src/services/pro/proSwap.ts +0 -199
  73. package/src/services/retail/cancelAndWithdrawOrder.ts +0 -95
  74. package/src/services/retail/depositAndCreateOrder.ts +0 -150
  75. package/src/services/retail/index.ts +0 -2
  76. package/src/types.ts +0 -76
  77. package/src/utils/constants.ts +0 -3
  78. package/src/utils/encoders.ts +0 -10
  79. package/src/utils/formatters.ts +0 -11
  80. package/src/utils/mimc.ts +0 -143
  81. package/src/utils/proofUtils.ts +0 -18
  82. package/src/utils/swapUtils.ts +0 -55
  83. package/src/utils/util.ts +0 -21
@@ -0,0 +1,9 @@
1
+ import { ethers } from "ethers";
2
+ import { DarkSwap } from "../../src";
3
+ export declare function getAliceWallet(): ethers.Wallet;
4
+ export declare function getBobWallet(): ethers.Wallet;
5
+ export declare function getAliceSignature(): Promise<string>;
6
+ export declare function getBobSignature(): Promise<string>;
7
+ export declare function getAliceWalletBalance(asset: string): Promise<any>;
8
+ export declare function getDarkSwapForAlice(): DarkSwap;
9
+ export declare function getDarkSwapForBob(): DarkSwap;
package/package.json CHANGED
@@ -1,54 +1,57 @@
1
1
  {
2
- "name": "@thesingularitynetwork/darkswap-sdk",
3
- "version": "0.1.18",
4
- "description": "DarkSwap SDK for browser and Node.js",
5
- "type": "module",
6
- "types": "dist/types/src/index.d.ts",
7
- "main": "dist/index.js",
8
- "files": [
9
- "dist",
10
- "src"
11
- ],
12
- "scripts": {
13
- "build": "tsdx build",
14
- "build:prod": "tsdx build --prod",
15
- "dev": "rollup -c --bundleConfigAsCjs -w",
16
- "test": "vitest",
17
- "lint": "eslint src --ext .ts",
18
- "format": "prettier --write \"src/**/*.ts\""
19
- },
20
- "keywords": [
21
- "darkswap",
22
- "sdk",
23
- "typescript"
24
- ],
25
- "author": "",
26
- "license": "MIT",
27
- "devDependencies": {
28
- "@babel/core": "^7.27.4",
29
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
30
- "@babel/preset-env": "^7.27.2",
31
- "@rollup/plugin-json": "^6.1.0",
32
- "@types/jest": "^29.5.14",
33
- "@types/node": "^22.15.24",
34
- "@typescript-eslint/eslint-plugin": "^8.33.0",
35
- "@typescript-eslint/parser": "^8.33.0",
36
- "babel-jest": "^30.0.0-beta.3",
37
- "eslint": "^9.27.0",
38
- "prettier": "^3.5.3",
39
- "rollup": "^4.41.1",
40
- "rollup-plugin-typescript2": "^0.36.0",
41
- "ts-node": "^10.9.2",
42
- "tsdx": "^0.14.1",
43
- "typescript": "^5.8.3",
44
- "vitest": "^3.1.4"
45
- },
46
- "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72",
47
- "dependencies": {
48
- "@aztec/bb.js": "0.84.0",
49
- "@noir-lang/noir_js": "1.0.0-beta.6",
50
- "@noir-lang/noir_wasm": "1.0.0-beta.6",
51
- "@noir-lang/types": "1.0.0-beta.6",
52
- "ethers": "^6.14.3"
53
- }
54
- }
2
+ "name": "@thesingularitynetwork/darkswap-sdk",
3
+ "license": "MIT",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "version": "0.1.19",
8
+ "description": "DarkSwap SDK for browser and Node.js",
9
+ "main": "dist/index.js",
10
+ "typings": "dist/index.d.ts",
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "repository": "https://github.com/portalgateme/darkSwap-sdk.git",
15
+ "keywords": [
16
+ "singularity",
17
+ "darkSwap"
18
+ ],
19
+ "module": "dist/darkswap-sdk.esm.js",
20
+ "scripts": {
21
+ "build": "tsdx build",
22
+ "start": "tsdx watch",
23
+ "test": "tsdx test",
24
+ "prepublishOnly": "tsdx build",
25
+ "format": "prettier --write ./src/**/**/*.{ts,tsx} ./src/**/*.{ts,tsx} ./src/*.{ts,tsx}"
26
+ },
27
+ "dependencies": {
28
+ "@aztec/bb.js": "0.84.0",
29
+ "@noir-lang/noir_js": "1.0.0-beta.6",
30
+ "@noir-lang/noir_wasm": "1.0.0-beta.6",
31
+ "@noir-lang/types": "1.0.0-beta.6",
32
+ "ethers": "^6.14.3",
33
+ "tiny-invariant": "^1.1.0",
34
+ "tiny-warning": "^1.0.3"
35
+ },
36
+ "devDependencies": {
37
+ "@types/jest": "^24.0.25",
38
+ "@types/lodash": "^4.17.4",
39
+ "tsdx": "^0.14.1",
40
+ "vitest": "^3.1.4"
41
+ },
42
+ "resolutions": {
43
+ "regenerator-runtime": "^0.14.1"
44
+ },
45
+ "resolutionsComments": {
46
+ "regenerator-runtime": "Fixes https://github.com/facebook/regenerator/pull/480. It can be removed when `tsdx` updates their dependencies."
47
+ },
48
+ "engines": {
49
+ "node": ">=10"
50
+ },
51
+ "prettier": {
52
+ "printWidth": 120,
53
+ "semi": true,
54
+ "singleQuote": true
55
+ },
56
+ "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
57
+ }