@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.
- package/dist/test/utils/helpers.d.ts +9 -0
- package/package.json +56 -53
- package/src/abis/DarkSwapAssetManager.json +0 -1162
- package/src/abis/DarkSwapFeeAssetManager.json +0 -282
- package/src/abis/IERC20.json +0 -194
- package/src/abis/IERC20_USDT.json +0 -188
- package/src/abis/MerkleTreeOperator.json +0 -533
- package/src/aztec/bigint-buffer/index.ts +0 -87
- package/src/aztec/collection/object.ts +0 -76
- package/src/aztec/crypto/poseidon/index.ts +0 -18
- package/src/aztec/crypto/schnorr/index.ts +0 -40
- package/src/aztec/crypto/schnorr/signature.ts +0 -107
- package/src/aztec/crypto/serialize.ts +0 -85
- package/src/aztec/crypto/signature/index.ts +0 -17
- package/src/aztec/fields/fields.ts +0 -361
- package/src/aztec/fields/point.ts +0 -208
- package/src/aztec/serialize/buffer_reader.ts +0 -402
- package/src/aztec/serialize/field_reader.ts +0 -154
- package/src/aztec/serialize/free_funcs.ts +0 -193
- package/src/aztec/serialize/serialize.ts +0 -336
- package/src/aztec/serialize/types.ts +0 -19
- package/src/aztec/string/index.ts +0 -39
- package/src/circuits/pro/dark_swap_cancel_order_compiled_circuit.json +0 -1
- package/src/circuits/pro/dark_swap_deposit_compiled_circuit.json +0 -1
- package/src/circuits/pro/dark_swap_join_compiled_circuit.json +0 -1
- package/src/circuits/pro/dark_swap_pro_create_order_compiled_circuit.json +0 -1
- package/src/circuits/pro/dark_swap_pro_swap_compiled_circuit.json +0 -1
- package/src/circuits/pro/dark_swap_triple_join_compiled_circuit.json +0 -1
- package/src/circuits/pro/dark_swap_withdraw_compiled_circuit.json +0 -1
- package/src/circuits/retail/dark_swap_cancel_order_withdraw_compiled_circuit.json +0 -1
- package/src/circuits/retail/dark_swap_retail_deposit_create_order_compiled_circuit.json +0 -1
- package/src/circuits/retail/dark_swap_retail_swap_compiled_circuit.json +0 -1
- package/src/config/chain.ts +0 -9
- package/src/config/config.ts +0 -9
- package/src/config/contractConfig.ts +0 -61
- package/src/config/index.ts +0 -3
- package/src/darkSwap.ts +0 -31
- package/src/entities/error.ts +0 -6
- package/src/entities/index.ts +0 -3
- package/src/entities/token.ts +0 -9
- package/src/entities/types.ts +0 -6
- package/src/index.ts +0 -9
- package/src/proof/baseProofService.ts +0 -34
- package/src/proof/basic/depositProof.ts +0 -101
- package/src/proof/basic/joinProof.ts +0 -112
- package/src/proof/basic/tripleJoinProof.ts +0 -130
- package/src/proof/basic/withdrawProof.ts +0 -97
- package/src/proof/keyService.ts +0 -9
- package/src/proof/noteService.ts +0 -114
- package/src/proof/pro/orders/cancelOrderProof.ts +0 -126
- package/src/proof/pro/orders/createOrderProof.ts +0 -136
- package/src/proof/pro/orders/swapProof.ts +0 -189
- package/src/proof/retail/cancelOrderProof.ts +0 -78
- package/src/proof/retail/depositOrderProof.ts +0 -133
- package/src/proof/retail/swapProof.ts +0 -158
- package/src/services/BaseService.ts +0 -49
- package/src/services/EventService.ts +0 -17
- package/src/services/agent/index.ts +0 -1
- package/src/services/agent/retailSwap.ts +0 -116
- package/src/services/base/deposit.ts +0 -174
- package/src/services/base/index.ts +0 -4
- package/src/services/base/join.ts +0 -135
- package/src/services/base/tripleJoin.ts +0 -161
- package/src/services/base/withdraw.ts +0 -123
- package/src/services/feeRatioService.ts +0 -13
- package/src/services/index.ts +0 -7
- package/src/services/merkletree.ts +0 -46
- package/src/services/noteService.ts +0 -75
- package/src/services/pro/cancelOrder.ts +0 -142
- package/src/services/pro/createOrder.ts +0 -183
- package/src/services/pro/index.ts +0 -3
- package/src/services/pro/proSwap.ts +0 -199
- package/src/services/retail/cancelAndWithdrawOrder.ts +0 -95
- package/src/services/retail/depositAndCreateOrder.ts +0 -150
- package/src/services/retail/index.ts +0 -2
- package/src/types.ts +0 -76
- package/src/utils/constants.ts +0 -3
- package/src/utils/encoders.ts +0 -10
- package/src/utils/formatters.ts +0 -11
- package/src/utils/mimc.ts +0 -143
- package/src/utils/proofUtils.ts +0 -18
- package/src/utils/swapUtils.ts +0 -55
- 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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"dist",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
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
|
+
}
|