@thesingularitynetwork/darkswap-sdk 0.2.7-beta5 → 0.2.7-beta7
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/darkswap-sdk.cjs.development.js +360 -306
- package/dist/darkswap-sdk.cjs.development.js.map +1 -1
- package/dist/darkswap-sdk.cjs.production.min.js +1 -1
- package/dist/darkswap-sdk.cjs.production.min.js.map +1 -1
- package/dist/darkswap-sdk.esm.js +360 -306
- package/dist/darkswap-sdk.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -2616,11 +2616,6 @@ var abi$1 = [
|
|
|
2616
2616
|
name: "assetPoolERC20",
|
|
2617
2617
|
type: "address"
|
|
2618
2618
|
},
|
|
2619
|
-
{
|
|
2620
|
-
internalType: "address",
|
|
2621
|
-
name: "assetPoolERC721",
|
|
2622
|
-
type: "address"
|
|
2623
|
-
},
|
|
2624
2619
|
{
|
|
2625
2620
|
internalType: "address",
|
|
2626
2621
|
name: "assetPoolETH",
|
|
@@ -2770,38 +2765,50 @@ var abi$1 = [
|
|
|
2770
2765
|
type: "bytes32"
|
|
2771
2766
|
}
|
|
2772
2767
|
],
|
|
2773
|
-
name: "
|
|
2768
|
+
name: "DarkSwapProCancelOrder",
|
|
2774
2769
|
type: "event"
|
|
2775
2770
|
},
|
|
2776
2771
|
{
|
|
2777
2772
|
anonymous: false,
|
|
2778
2773
|
inputs: [
|
|
2774
|
+
{
|
|
2775
|
+
indexed: false,
|
|
2776
|
+
internalType: "address",
|
|
2777
|
+
name: "owner",
|
|
2778
|
+
type: "address"
|
|
2779
|
+
},
|
|
2779
2780
|
{
|
|
2780
2781
|
indexed: false,
|
|
2781
2782
|
internalType: "bytes32",
|
|
2782
|
-
name: "
|
|
2783
|
+
name: "outNullifier",
|
|
2783
2784
|
type: "bytes32"
|
|
2784
2785
|
},
|
|
2785
2786
|
{
|
|
2786
2787
|
indexed: false,
|
|
2787
|
-
internalType: "
|
|
2788
|
-
name: "
|
|
2789
|
-
type: "
|
|
2788
|
+
internalType: "bytes32",
|
|
2789
|
+
name: "changeNote",
|
|
2790
|
+
type: "bytes32"
|
|
2790
2791
|
},
|
|
2791
2792
|
{
|
|
2792
2793
|
indexed: false,
|
|
2793
|
-
internalType: "
|
|
2794
|
-
name: "
|
|
2795
|
-
type: "
|
|
2794
|
+
internalType: "bytes32",
|
|
2795
|
+
name: "changeNoteFooter",
|
|
2796
|
+
type: "bytes32"
|
|
2796
2797
|
},
|
|
2797
2798
|
{
|
|
2798
2799
|
indexed: false,
|
|
2799
|
-
internalType: "
|
|
2800
|
-
name: "
|
|
2801
|
-
type: "
|
|
2800
|
+
internalType: "bytes32",
|
|
2801
|
+
name: "orderNote",
|
|
2802
|
+
type: "bytes32"
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
indexed: false,
|
|
2806
|
+
internalType: "bytes32",
|
|
2807
|
+
name: "orderNoteFooter",
|
|
2808
|
+
type: "bytes32"
|
|
2802
2809
|
}
|
|
2803
2810
|
],
|
|
2804
|
-
name: "
|
|
2811
|
+
name: "DarkSwapProCreateOrder",
|
|
2805
2812
|
type: "event"
|
|
2806
2813
|
},
|
|
2807
2814
|
{
|
|
@@ -2832,7 +2839,7 @@ var abi$1 = [
|
|
|
2832
2839
|
type: "uint256"
|
|
2833
2840
|
}
|
|
2834
2841
|
],
|
|
2835
|
-
name: "
|
|
2842
|
+
name: "DarkSwapProDeposit",
|
|
2836
2843
|
type: "event"
|
|
2837
2844
|
},
|
|
2838
2845
|
{
|
|
@@ -2851,7 +2858,7 @@ var abi$1 = [
|
|
|
2851
2858
|
type: "bytes32"
|
|
2852
2859
|
}
|
|
2853
2860
|
],
|
|
2854
|
-
name: "
|
|
2861
|
+
name: "DarkSwapProJoin",
|
|
2855
2862
|
type: "event"
|
|
2856
2863
|
},
|
|
2857
2864
|
{
|
|
@@ -2859,42 +2866,30 @@ var abi$1 = [
|
|
|
2859
2866
|
inputs: [
|
|
2860
2867
|
{
|
|
2861
2868
|
indexed: false,
|
|
2862
|
-
internalType: "
|
|
2863
|
-
name: "
|
|
2864
|
-
type: "
|
|
2865
|
-
},
|
|
2866
|
-
{
|
|
2867
|
-
indexed: false,
|
|
2868
|
-
internalType: "bytes32",
|
|
2869
|
-
name: "outNullifier",
|
|
2870
|
-
type: "bytes32"
|
|
2871
|
-
},
|
|
2872
|
-
{
|
|
2873
|
-
indexed: false,
|
|
2874
|
-
internalType: "bytes32",
|
|
2875
|
-
name: "changeNote",
|
|
2876
|
-
type: "bytes32"
|
|
2869
|
+
internalType: "bytes32[2]",
|
|
2870
|
+
name: "nullifierIn1",
|
|
2871
|
+
type: "bytes32[2]"
|
|
2877
2872
|
},
|
|
2878
2873
|
{
|
|
2879
2874
|
indexed: false,
|
|
2880
|
-
internalType: "bytes32",
|
|
2881
|
-
name: "
|
|
2882
|
-
type: "bytes32"
|
|
2875
|
+
internalType: "bytes32[2]",
|
|
2876
|
+
name: "nullifierIn2",
|
|
2877
|
+
type: "bytes32[2]"
|
|
2883
2878
|
},
|
|
2884
2879
|
{
|
|
2885
2880
|
indexed: false,
|
|
2886
2881
|
internalType: "bytes32",
|
|
2887
|
-
name: "
|
|
2882
|
+
name: "noteOut1",
|
|
2888
2883
|
type: "bytes32"
|
|
2889
2884
|
},
|
|
2890
2885
|
{
|
|
2891
2886
|
indexed: false,
|
|
2892
2887
|
internalType: "bytes32",
|
|
2893
|
-
name: "
|
|
2888
|
+
name: "noteOut2",
|
|
2894
2889
|
type: "bytes32"
|
|
2895
2890
|
}
|
|
2896
2891
|
],
|
|
2897
|
-
name: "
|
|
2892
|
+
name: "DarkSwapProPairJoin",
|
|
2898
2893
|
type: "event"
|
|
2899
2894
|
},
|
|
2900
2895
|
{
|
|
@@ -2957,36 +2952,36 @@ var abi$1 = [
|
|
|
2957
2952
|
inputs: [
|
|
2958
2953
|
{
|
|
2959
2954
|
indexed: false,
|
|
2960
|
-
internalType: "
|
|
2961
|
-
name: "
|
|
2962
|
-
type: "
|
|
2955
|
+
internalType: "bytes32",
|
|
2956
|
+
name: "nullifierIn",
|
|
2957
|
+
type: "bytes32"
|
|
2963
2958
|
},
|
|
2964
2959
|
{
|
|
2965
2960
|
indexed: false,
|
|
2966
|
-
internalType: "
|
|
2967
|
-
name: "
|
|
2968
|
-
type: "
|
|
2961
|
+
internalType: "uint256",
|
|
2962
|
+
name: "amount",
|
|
2963
|
+
type: "uint256"
|
|
2969
2964
|
},
|
|
2970
2965
|
{
|
|
2971
2966
|
indexed: false,
|
|
2972
|
-
internalType: "
|
|
2973
|
-
name: "
|
|
2974
|
-
type: "
|
|
2967
|
+
internalType: "address",
|
|
2968
|
+
name: "asset",
|
|
2969
|
+
type: "address"
|
|
2975
2970
|
},
|
|
2976
2971
|
{
|
|
2977
2972
|
indexed: false,
|
|
2978
2973
|
internalType: "bytes32",
|
|
2979
|
-
name: "
|
|
2974
|
+
name: "noteRemaining",
|
|
2980
2975
|
type: "bytes32"
|
|
2981
2976
|
},
|
|
2982
2977
|
{
|
|
2983
2978
|
indexed: false,
|
|
2984
|
-
internalType: "
|
|
2985
|
-
name: "
|
|
2986
|
-
type: "
|
|
2979
|
+
internalType: "address",
|
|
2980
|
+
name: "recipient",
|
|
2981
|
+
type: "address"
|
|
2987
2982
|
}
|
|
2988
2983
|
],
|
|
2989
|
-
name: "
|
|
2984
|
+
name: "DarkSwapProWithdraw",
|
|
2990
2985
|
type: "event"
|
|
2991
2986
|
},
|
|
2992
2987
|
{
|
|
@@ -2995,41 +2990,66 @@ var abi$1 = [
|
|
|
2995
2990
|
{
|
|
2996
2991
|
indexed: false,
|
|
2997
2992
|
internalType: "bytes32",
|
|
2998
|
-
name: "
|
|
2993
|
+
name: "nullifier",
|
|
2999
2994
|
type: "bytes32"
|
|
3000
2995
|
},
|
|
3001
2996
|
{
|
|
3002
2997
|
indexed: false,
|
|
3003
|
-
internalType: "
|
|
3004
|
-
name: "
|
|
3005
|
-
type: "
|
|
2998
|
+
internalType: "address",
|
|
2999
|
+
name: "recipient",
|
|
3000
|
+
type: "address"
|
|
3001
|
+
},
|
|
3002
|
+
{
|
|
3003
|
+
indexed: false,
|
|
3004
|
+
internalType: "address",
|
|
3005
|
+
name: "asset",
|
|
3006
|
+
type: "address"
|
|
3007
|
+
},
|
|
3008
|
+
{
|
|
3009
|
+
indexed: false,
|
|
3010
|
+
internalType: "uint256",
|
|
3011
|
+
name: "amount",
|
|
3012
|
+
type: "uint256"
|
|
3013
|
+
}
|
|
3014
|
+
],
|
|
3015
|
+
name: "DarkSwapRetailCancelOrderWithdraw",
|
|
3016
|
+
type: "event"
|
|
3017
|
+
},
|
|
3018
|
+
{
|
|
3019
|
+
anonymous: false,
|
|
3020
|
+
inputs: [
|
|
3021
|
+
{
|
|
3022
|
+
indexed: false,
|
|
3023
|
+
internalType: "address",
|
|
3024
|
+
name: "owner",
|
|
3025
|
+
type: "address"
|
|
3006
3026
|
},
|
|
3007
3027
|
{
|
|
3008
3028
|
indexed: false,
|
|
3009
3029
|
internalType: "bytes32",
|
|
3010
|
-
name: "
|
|
3030
|
+
name: "depositOutNote",
|
|
3011
3031
|
type: "bytes32"
|
|
3012
3032
|
},
|
|
3013
3033
|
{
|
|
3014
3034
|
indexed: false,
|
|
3015
3035
|
internalType: "bytes32",
|
|
3016
|
-
name: "
|
|
3036
|
+
name: "depositOutNoteFooter",
|
|
3017
3037
|
type: "bytes32"
|
|
3018
3038
|
},
|
|
3019
3039
|
{
|
|
3020
3040
|
indexed: false,
|
|
3021
3041
|
internalType: "bytes32",
|
|
3022
|
-
name: "
|
|
3042
|
+
name: "inNote",
|
|
3023
3043
|
type: "bytes32"
|
|
3024
3044
|
},
|
|
3025
3045
|
{
|
|
3026
3046
|
indexed: false,
|
|
3027
3047
|
internalType: "bytes32",
|
|
3028
|
-
name: "
|
|
3048
|
+
name: "inNoteFooter",
|
|
3029
3049
|
type: "bytes32"
|
|
3030
3050
|
}
|
|
3031
3051
|
],
|
|
3032
|
-
name: "
|
|
3052
|
+
name: "DarkSwapRetailDepositCreateOrder",
|
|
3033
3053
|
type: "event"
|
|
3034
3054
|
},
|
|
3035
3055
|
{
|
|
@@ -3038,35 +3058,41 @@ var abi$1 = [
|
|
|
3038
3058
|
{
|
|
3039
3059
|
indexed: false,
|
|
3040
3060
|
internalType: "bytes32",
|
|
3041
|
-
name: "
|
|
3061
|
+
name: "aliceOutNullifier",
|
|
3042
3062
|
type: "bytes32"
|
|
3043
3063
|
},
|
|
3044
3064
|
{
|
|
3045
3065
|
indexed: false,
|
|
3046
|
-
internalType: "
|
|
3047
|
-
name: "
|
|
3048
|
-
type: "
|
|
3066
|
+
internalType: "bytes32",
|
|
3067
|
+
name: "aliceInNote",
|
|
3068
|
+
type: "bytes32"
|
|
3049
3069
|
},
|
|
3050
3070
|
{
|
|
3051
3071
|
indexed: false,
|
|
3052
|
-
internalType: "
|
|
3053
|
-
name: "
|
|
3054
|
-
type: "
|
|
3072
|
+
internalType: "bytes32",
|
|
3073
|
+
name: "aliceInNoteFooter",
|
|
3074
|
+
type: "bytes32"
|
|
3055
3075
|
},
|
|
3056
3076
|
{
|
|
3057
3077
|
indexed: false,
|
|
3058
3078
|
internalType: "bytes32",
|
|
3059
|
-
name: "
|
|
3079
|
+
name: "bobOutNullifier",
|
|
3060
3080
|
type: "bytes32"
|
|
3061
3081
|
},
|
|
3062
3082
|
{
|
|
3063
3083
|
indexed: false,
|
|
3064
|
-
internalType: "
|
|
3065
|
-
name: "
|
|
3066
|
-
type: "
|
|
3084
|
+
internalType: "bytes32",
|
|
3085
|
+
name: "bobInNote",
|
|
3086
|
+
type: "bytes32"
|
|
3087
|
+
},
|
|
3088
|
+
{
|
|
3089
|
+
indexed: false,
|
|
3090
|
+
internalType: "bytes32",
|
|
3091
|
+
name: "bobInNoteFooter",
|
|
3092
|
+
type: "bytes32"
|
|
3067
3093
|
}
|
|
3068
3094
|
],
|
|
3069
|
-
name: "
|
|
3095
|
+
name: "DarkSwapRetailSwap",
|
|
3070
3096
|
type: "event"
|
|
3071
3097
|
},
|
|
3072
3098
|
{
|
|
@@ -3132,129 +3158,68 @@ var abi$1 = [
|
|
|
3132
3158
|
},
|
|
3133
3159
|
{
|
|
3134
3160
|
inputs: [
|
|
3161
|
+
],
|
|
3162
|
+
name: "getAssetPoolERC20",
|
|
3163
|
+
outputs: [
|
|
3135
3164
|
{
|
|
3136
|
-
internalType: "
|
|
3137
|
-
name: "
|
|
3138
|
-
type: "
|
|
3139
|
-
},
|
|
3140
|
-
{
|
|
3141
|
-
internalType: "bytes32",
|
|
3142
|
-
name: "_orderNullifier",
|
|
3143
|
-
type: "bytes32"
|
|
3144
|
-
},
|
|
3145
|
-
{
|
|
3146
|
-
internalType: "bytes32",
|
|
3147
|
-
name: "_remainingNullifier",
|
|
3148
|
-
type: "bytes32"
|
|
3149
|
-
},
|
|
3150
|
-
{
|
|
3151
|
-
internalType: "bytes32",
|
|
3152
|
-
name: "_accountNote",
|
|
3153
|
-
type: "bytes32"
|
|
3154
|
-
},
|
|
3155
|
-
{
|
|
3156
|
-
internalType: "bytes32",
|
|
3157
|
-
name: "_accountNoteFooter",
|
|
3158
|
-
type: "bytes32"
|
|
3159
|
-
},
|
|
3160
|
-
{
|
|
3161
|
-
internalType: "bytes",
|
|
3162
|
-
name: "_proof",
|
|
3163
|
-
type: "bytes"
|
|
3165
|
+
internalType: "address",
|
|
3166
|
+
name: "",
|
|
3167
|
+
type: "address"
|
|
3164
3168
|
}
|
|
3165
3169
|
],
|
|
3166
|
-
|
|
3170
|
+
stateMutability: "view",
|
|
3171
|
+
type: "function"
|
|
3172
|
+
},
|
|
3173
|
+
{
|
|
3174
|
+
inputs: [
|
|
3175
|
+
],
|
|
3176
|
+
name: "getAssetPoolETH",
|
|
3167
3177
|
outputs: [
|
|
3178
|
+
{
|
|
3179
|
+
internalType: "address",
|
|
3180
|
+
name: "",
|
|
3181
|
+
type: "address"
|
|
3182
|
+
}
|
|
3168
3183
|
],
|
|
3169
|
-
stateMutability: "
|
|
3184
|
+
stateMutability: "view",
|
|
3170
3185
|
type: "function"
|
|
3171
3186
|
},
|
|
3172
3187
|
{
|
|
3173
3188
|
inputs: [
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
type: "bytes32"
|
|
3178
|
-
},
|
|
3189
|
+
],
|
|
3190
|
+
name: "getFeeManager",
|
|
3191
|
+
outputs: [
|
|
3179
3192
|
{
|
|
3180
3193
|
internalType: "address",
|
|
3181
|
-
name: "
|
|
3194
|
+
name: "",
|
|
3182
3195
|
type: "address"
|
|
3183
|
-
},
|
|
3184
|
-
{
|
|
3185
|
-
internalType: "uint256",
|
|
3186
|
-
name: "_amount",
|
|
3187
|
-
type: "uint256"
|
|
3188
|
-
},
|
|
3189
|
-
{
|
|
3190
|
-
internalType: "bytes32",
|
|
3191
|
-
name: "_nullifier",
|
|
3192
|
-
type: "bytes32"
|
|
3193
|
-
},
|
|
3194
|
-
{
|
|
3195
|
-
internalType: "bytes",
|
|
3196
|
-
name: "_proof",
|
|
3197
|
-
type: "bytes"
|
|
3198
3196
|
}
|
|
3199
3197
|
],
|
|
3200
|
-
|
|
3198
|
+
stateMutability: "view",
|
|
3199
|
+
type: "function"
|
|
3200
|
+
},
|
|
3201
|
+
{
|
|
3202
|
+
inputs: [
|
|
3203
|
+
],
|
|
3204
|
+
name: "getMerkleTreeOperator",
|
|
3201
3205
|
outputs: [
|
|
3206
|
+
{
|
|
3207
|
+
internalType: "address",
|
|
3208
|
+
name: "",
|
|
3209
|
+
type: "address"
|
|
3210
|
+
}
|
|
3202
3211
|
],
|
|
3203
|
-
stateMutability: "
|
|
3212
|
+
stateMutability: "view",
|
|
3204
3213
|
type: "function"
|
|
3205
3214
|
},
|
|
3206
3215
|
{
|
|
3207
3216
|
inputs: [
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
type: "bytes32"
|
|
3212
|
-
},
|
|
3217
|
+
],
|
|
3218
|
+
name: "getMimc254",
|
|
3219
|
+
outputs: [
|
|
3213
3220
|
{
|
|
3214
3221
|
internalType: "address",
|
|
3215
|
-
name: "
|
|
3216
|
-
type: "address"
|
|
3217
|
-
},
|
|
3218
|
-
{
|
|
3219
|
-
internalType: "uint256",
|
|
3220
|
-
name: "_amount",
|
|
3221
|
-
type: "uint256"
|
|
3222
|
-
},
|
|
3223
|
-
{
|
|
3224
|
-
internalType: "bytes32",
|
|
3225
|
-
name: "_existingNullifier",
|
|
3226
|
-
type: "bytes32"
|
|
3227
|
-
},
|
|
3228
|
-
{
|
|
3229
|
-
internalType: "bytes32",
|
|
3230
|
-
name: "_accountNoteCommitment",
|
|
3231
|
-
type: "bytes32"
|
|
3232
|
-
},
|
|
3233
|
-
{
|
|
3234
|
-
internalType: "bytes32",
|
|
3235
|
-
name: "_accountNoteFooter",
|
|
3236
|
-
type: "bytes32"
|
|
3237
|
-
},
|
|
3238
|
-
{
|
|
3239
|
-
internalType: "bytes",
|
|
3240
|
-
name: "_proof",
|
|
3241
|
-
type: "bytes"
|
|
3242
|
-
}
|
|
3243
|
-
],
|
|
3244
|
-
name: "deposit",
|
|
3245
|
-
outputs: [
|
|
3246
|
-
],
|
|
3247
|
-
stateMutability: "payable",
|
|
3248
|
-
type: "function"
|
|
3249
|
-
},
|
|
3250
|
-
{
|
|
3251
|
-
inputs: [
|
|
3252
|
-
],
|
|
3253
|
-
name: "getAssetPoolERC20",
|
|
3254
|
-
outputs: [
|
|
3255
|
-
{
|
|
3256
|
-
internalType: "address",
|
|
3257
|
-
name: "",
|
|
3222
|
+
name: "",
|
|
3258
3223
|
type: "address"
|
|
3259
3224
|
}
|
|
3260
3225
|
],
|
|
@@ -3264,7 +3229,7 @@ var abi$1 = [
|
|
|
3264
3229
|
{
|
|
3265
3230
|
inputs: [
|
|
3266
3231
|
],
|
|
3267
|
-
name: "
|
|
3232
|
+
name: "getVerifierHub",
|
|
3268
3233
|
outputs: [
|
|
3269
3234
|
{
|
|
3270
3235
|
internalType: "address",
|
|
@@ -3277,36 +3242,42 @@ var abi$1 = [
|
|
|
3277
3242
|
},
|
|
3278
3243
|
{
|
|
3279
3244
|
inputs: [
|
|
3280
|
-
],
|
|
3281
|
-
name: "getAssetPoolETH",
|
|
3282
|
-
outputs: [
|
|
3283
3245
|
{
|
|
3284
|
-
internalType: "
|
|
3285
|
-
name: "",
|
|
3286
|
-
type: "
|
|
3246
|
+
internalType: "bytes32",
|
|
3247
|
+
name: "_merkleRoot",
|
|
3248
|
+
type: "bytes32"
|
|
3249
|
+
},
|
|
3250
|
+
{
|
|
3251
|
+
internalType: "bytes32[3]",
|
|
3252
|
+
name: "_nullifierIn",
|
|
3253
|
+
type: "bytes32[3]"
|
|
3254
|
+
},
|
|
3255
|
+
{
|
|
3256
|
+
internalType: "bytes32",
|
|
3257
|
+
name: "_noteOut",
|
|
3258
|
+
type: "bytes32"
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
internalType: "bytes32",
|
|
3262
|
+
name: "_noteFooter",
|
|
3263
|
+
type: "bytes32"
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
internalType: "bytes",
|
|
3267
|
+
name: "_proof",
|
|
3268
|
+
type: "bytes"
|
|
3287
3269
|
}
|
|
3288
3270
|
],
|
|
3289
|
-
|
|
3290
|
-
type: "function"
|
|
3291
|
-
},
|
|
3292
|
-
{
|
|
3293
|
-
inputs: [
|
|
3294
|
-
],
|
|
3295
|
-
name: "getFeeManager",
|
|
3271
|
+
name: "join",
|
|
3296
3272
|
outputs: [
|
|
3297
|
-
{
|
|
3298
|
-
internalType: "address",
|
|
3299
|
-
name: "",
|
|
3300
|
-
type: "address"
|
|
3301
|
-
}
|
|
3302
3273
|
],
|
|
3303
|
-
stateMutability: "
|
|
3274
|
+
stateMutability: "payable",
|
|
3304
3275
|
type: "function"
|
|
3305
3276
|
},
|
|
3306
3277
|
{
|
|
3307
3278
|
inputs: [
|
|
3308
3279
|
],
|
|
3309
|
-
name: "
|
|
3280
|
+
name: "owner",
|
|
3310
3281
|
outputs: [
|
|
3311
3282
|
{
|
|
3312
3283
|
internalType: "address",
|
|
@@ -3319,52 +3290,85 @@ var abi$1 = [
|
|
|
3319
3290
|
},
|
|
3320
3291
|
{
|
|
3321
3292
|
inputs: [
|
|
3322
|
-
],
|
|
3323
|
-
name: "getMimc254",
|
|
3324
|
-
outputs: [
|
|
3325
3293
|
{
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3294
|
+
components: [
|
|
3295
|
+
{
|
|
3296
|
+
internalType: "bytes32",
|
|
3297
|
+
name: "merkleRoot",
|
|
3298
|
+
type: "bytes32"
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
internalType: "bytes32[2]",
|
|
3302
|
+
name: "nullifierIn1",
|
|
3303
|
+
type: "bytes32[2]"
|
|
3304
|
+
},
|
|
3305
|
+
{
|
|
3306
|
+
internalType: "bytes32[2]",
|
|
3307
|
+
name: "nullifierIn2",
|
|
3308
|
+
type: "bytes32[2]"
|
|
3309
|
+
},
|
|
3310
|
+
{
|
|
3311
|
+
internalType: "bytes32",
|
|
3312
|
+
name: "noteOut1",
|
|
3313
|
+
type: "bytes32"
|
|
3314
|
+
},
|
|
3315
|
+
{
|
|
3316
|
+
internalType: "bytes32",
|
|
3317
|
+
name: "noteOut2",
|
|
3318
|
+
type: "bytes32"
|
|
3319
|
+
},
|
|
3320
|
+
{
|
|
3321
|
+
internalType: "bytes32",
|
|
3322
|
+
name: "noteFooter1",
|
|
3323
|
+
type: "bytes32"
|
|
3324
|
+
},
|
|
3325
|
+
{
|
|
3326
|
+
internalType: "bytes32",
|
|
3327
|
+
name: "noteFooter2",
|
|
3328
|
+
type: "bytes32"
|
|
3329
|
+
}
|
|
3330
|
+
],
|
|
3331
|
+
internalType: "struct DarkSwapAssetManager.ProPairJoinArgs",
|
|
3332
|
+
name: "_args",
|
|
3333
|
+
type: "tuple"
|
|
3334
|
+
},
|
|
3335
|
+
{
|
|
3336
|
+
internalType: "bytes",
|
|
3337
|
+
name: "_proof",
|
|
3338
|
+
type: "bytes"
|
|
3329
3339
|
}
|
|
3330
3340
|
],
|
|
3331
|
-
|
|
3332
|
-
type: "function"
|
|
3333
|
-
},
|
|
3334
|
-
{
|
|
3335
|
-
inputs: [
|
|
3336
|
-
],
|
|
3337
|
-
name: "getVerifierHub",
|
|
3341
|
+
name: "pairJoin",
|
|
3338
3342
|
outputs: [
|
|
3339
|
-
{
|
|
3340
|
-
internalType: "address",
|
|
3341
|
-
name: "",
|
|
3342
|
-
type: "address"
|
|
3343
|
-
}
|
|
3344
3343
|
],
|
|
3345
|
-
stateMutability: "
|
|
3344
|
+
stateMutability: "payable",
|
|
3346
3345
|
type: "function"
|
|
3347
3346
|
},
|
|
3348
3347
|
{
|
|
3349
3348
|
inputs: [
|
|
3350
3349
|
{
|
|
3351
3350
|
internalType: "bytes32",
|
|
3352
|
-
name: "
|
|
3351
|
+
name: "_merkeleRoot",
|
|
3353
3352
|
type: "bytes32"
|
|
3354
3353
|
},
|
|
3355
3354
|
{
|
|
3356
|
-
internalType: "bytes32
|
|
3357
|
-
name: "
|
|
3358
|
-
type: "bytes32
|
|
3355
|
+
internalType: "bytes32",
|
|
3356
|
+
name: "_orderNullifier",
|
|
3357
|
+
type: "bytes32"
|
|
3359
3358
|
},
|
|
3360
3359
|
{
|
|
3361
3360
|
internalType: "bytes32",
|
|
3362
|
-
name: "
|
|
3361
|
+
name: "_remainingNullifier",
|
|
3363
3362
|
type: "bytes32"
|
|
3364
3363
|
},
|
|
3365
3364
|
{
|
|
3366
3365
|
internalType: "bytes32",
|
|
3367
|
-
name: "
|
|
3366
|
+
name: "_accountNote",
|
|
3367
|
+
type: "bytes32"
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
internalType: "bytes32",
|
|
3371
|
+
name: "_accountNoteFooter",
|
|
3368
3372
|
type: "bytes32"
|
|
3369
3373
|
},
|
|
3370
3374
|
{
|
|
@@ -3373,24 +3377,10 @@ var abi$1 = [
|
|
|
3373
3377
|
type: "bytes"
|
|
3374
3378
|
}
|
|
3375
3379
|
],
|
|
3376
|
-
name: "
|
|
3380
|
+
name: "proCancelOrder",
|
|
3377
3381
|
outputs: [
|
|
3378
3382
|
],
|
|
3379
|
-
stateMutability: "
|
|
3380
|
-
type: "function"
|
|
3381
|
-
},
|
|
3382
|
-
{
|
|
3383
|
-
inputs: [
|
|
3384
|
-
],
|
|
3385
|
-
name: "owner",
|
|
3386
|
-
outputs: [
|
|
3387
|
-
{
|
|
3388
|
-
internalType: "address",
|
|
3389
|
-
name: "",
|
|
3390
|
-
type: "address"
|
|
3391
|
-
}
|
|
3392
|
-
],
|
|
3393
|
-
stateMutability: "view",
|
|
3383
|
+
stateMutability: "nonpayable",
|
|
3394
3384
|
type: "function"
|
|
3395
3385
|
},
|
|
3396
3386
|
{
|
|
@@ -3444,6 +3434,50 @@ var abi$1 = [
|
|
|
3444
3434
|
stateMutability: "nonpayable",
|
|
3445
3435
|
type: "function"
|
|
3446
3436
|
},
|
|
3437
|
+
{
|
|
3438
|
+
inputs: [
|
|
3439
|
+
{
|
|
3440
|
+
internalType: "bytes32",
|
|
3441
|
+
name: "_merkleRoot",
|
|
3442
|
+
type: "bytes32"
|
|
3443
|
+
},
|
|
3444
|
+
{
|
|
3445
|
+
internalType: "address",
|
|
3446
|
+
name: "_asset",
|
|
3447
|
+
type: "address"
|
|
3448
|
+
},
|
|
3449
|
+
{
|
|
3450
|
+
internalType: "uint256",
|
|
3451
|
+
name: "_amount",
|
|
3452
|
+
type: "uint256"
|
|
3453
|
+
},
|
|
3454
|
+
{
|
|
3455
|
+
internalType: "bytes32",
|
|
3456
|
+
name: "_existingNullifier",
|
|
3457
|
+
type: "bytes32"
|
|
3458
|
+
},
|
|
3459
|
+
{
|
|
3460
|
+
internalType: "bytes32",
|
|
3461
|
+
name: "_accountNoteCommitment",
|
|
3462
|
+
type: "bytes32"
|
|
3463
|
+
},
|
|
3464
|
+
{
|
|
3465
|
+
internalType: "bytes32",
|
|
3466
|
+
name: "_accountNoteFooter",
|
|
3467
|
+
type: "bytes32"
|
|
3468
|
+
},
|
|
3469
|
+
{
|
|
3470
|
+
internalType: "bytes",
|
|
3471
|
+
name: "_proof",
|
|
3472
|
+
type: "bytes"
|
|
3473
|
+
}
|
|
3474
|
+
],
|
|
3475
|
+
name: "proDeposit",
|
|
3476
|
+
outputs: [
|
|
3477
|
+
],
|
|
3478
|
+
stateMutability: "payable",
|
|
3479
|
+
type: "function"
|
|
3480
|
+
},
|
|
3447
3481
|
{
|
|
3448
3482
|
inputs: [
|
|
3449
3483
|
{
|
|
@@ -3520,6 +3554,50 @@ var abi$1 = [
|
|
|
3520
3554
|
stateMutability: "nonpayable",
|
|
3521
3555
|
type: "function"
|
|
3522
3556
|
},
|
|
3557
|
+
{
|
|
3558
|
+
inputs: [
|
|
3559
|
+
{
|
|
3560
|
+
internalType: "bytes32",
|
|
3561
|
+
name: "_merkleRoot",
|
|
3562
|
+
type: "bytes32"
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
internalType: "address",
|
|
3566
|
+
name: "_asset",
|
|
3567
|
+
type: "address"
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
internalType: "uint256",
|
|
3571
|
+
name: "_amount",
|
|
3572
|
+
type: "uint256"
|
|
3573
|
+
},
|
|
3574
|
+
{
|
|
3575
|
+
internalType: "bytes32",
|
|
3576
|
+
name: "_nullifier",
|
|
3577
|
+
type: "bytes32"
|
|
3578
|
+
},
|
|
3579
|
+
{
|
|
3580
|
+
internalType: "bytes32",
|
|
3581
|
+
name: "_remainingNoteCommitment",
|
|
3582
|
+
type: "bytes32"
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
internalType: "bytes32",
|
|
3586
|
+
name: "_remainingNoteFooter",
|
|
3587
|
+
type: "bytes32"
|
|
3588
|
+
},
|
|
3589
|
+
{
|
|
3590
|
+
internalType: "bytes",
|
|
3591
|
+
name: "_proof",
|
|
3592
|
+
type: "bytes"
|
|
3593
|
+
}
|
|
3594
|
+
],
|
|
3595
|
+
name: "proWithdraw",
|
|
3596
|
+
outputs: [
|
|
3597
|
+
],
|
|
3598
|
+
stateMutability: "nonpayable",
|
|
3599
|
+
type: "function"
|
|
3600
|
+
},
|
|
3523
3601
|
{
|
|
3524
3602
|
inputs: [
|
|
3525
3603
|
{
|
|
@@ -3548,6 +3626,40 @@ var abi$1 = [
|
|
|
3548
3626
|
stateMutability: "nonpayable",
|
|
3549
3627
|
type: "function"
|
|
3550
3628
|
},
|
|
3629
|
+
{
|
|
3630
|
+
inputs: [
|
|
3631
|
+
{
|
|
3632
|
+
internalType: "bytes32",
|
|
3633
|
+
name: "_merkleRoot",
|
|
3634
|
+
type: "bytes32"
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
internalType: "address",
|
|
3638
|
+
name: "_asset",
|
|
3639
|
+
type: "address"
|
|
3640
|
+
},
|
|
3641
|
+
{
|
|
3642
|
+
internalType: "uint256",
|
|
3643
|
+
name: "_amount",
|
|
3644
|
+
type: "uint256"
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
internalType: "bytes32",
|
|
3648
|
+
name: "_nullifier",
|
|
3649
|
+
type: "bytes32"
|
|
3650
|
+
},
|
|
3651
|
+
{
|
|
3652
|
+
internalType: "bytes",
|
|
3653
|
+
name: "_proof",
|
|
3654
|
+
type: "bytes"
|
|
3655
|
+
}
|
|
3656
|
+
],
|
|
3657
|
+
name: "retailCancelOrderWithdraw",
|
|
3658
|
+
outputs: [
|
|
3659
|
+
],
|
|
3660
|
+
stateMutability: "nonpayable",
|
|
3661
|
+
type: "function"
|
|
3662
|
+
},
|
|
3551
3663
|
{
|
|
3552
3664
|
inputs: [
|
|
3553
3665
|
{
|
|
@@ -3610,7 +3722,7 @@ var abi$1 = [
|
|
|
3610
3722
|
},
|
|
3611
3723
|
{
|
|
3612
3724
|
internalType: "uint256",
|
|
3613
|
-
name: "
|
|
3725
|
+
name: "aliceFeeRatio",
|
|
3614
3726
|
type: "uint256"
|
|
3615
3727
|
},
|
|
3616
3728
|
{
|
|
@@ -3630,7 +3742,7 @@ var abi$1 = [
|
|
|
3630
3742
|
},
|
|
3631
3743
|
{
|
|
3632
3744
|
internalType: "uint256",
|
|
3633
|
-
name: "
|
|
3745
|
+
name: "bobFeeRatio",
|
|
3634
3746
|
type: "uint256"
|
|
3635
3747
|
},
|
|
3636
3748
|
{
|
|
@@ -3679,20 +3791,6 @@ var abi$1 = [
|
|
|
3679
3791
|
stateMutability: "nonpayable",
|
|
3680
3792
|
type: "function"
|
|
3681
3793
|
},
|
|
3682
|
-
{
|
|
3683
|
-
inputs: [
|
|
3684
|
-
{
|
|
3685
|
-
internalType: "address",
|
|
3686
|
-
name: "assetPoolERC721",
|
|
3687
|
-
type: "address"
|
|
3688
|
-
}
|
|
3689
|
-
],
|
|
3690
|
-
name: "setAssetPoolERC721",
|
|
3691
|
-
outputs: [
|
|
3692
|
-
],
|
|
3693
|
-
stateMutability: "nonpayable",
|
|
3694
|
-
type: "function"
|
|
3695
|
-
},
|
|
3696
3794
|
{
|
|
3697
3795
|
inputs: [
|
|
3698
3796
|
{
|
|
@@ -3749,50 +3847,6 @@ var abi$1 = [
|
|
|
3749
3847
|
stateMutability: "nonpayable",
|
|
3750
3848
|
type: "function"
|
|
3751
3849
|
},
|
|
3752
|
-
{
|
|
3753
|
-
inputs: [
|
|
3754
|
-
{
|
|
3755
|
-
internalType: "bytes32",
|
|
3756
|
-
name: "_merkleRoot",
|
|
3757
|
-
type: "bytes32"
|
|
3758
|
-
},
|
|
3759
|
-
{
|
|
3760
|
-
internalType: "address",
|
|
3761
|
-
name: "_asset",
|
|
3762
|
-
type: "address"
|
|
3763
|
-
},
|
|
3764
|
-
{
|
|
3765
|
-
internalType: "uint256",
|
|
3766
|
-
name: "_amount",
|
|
3767
|
-
type: "uint256"
|
|
3768
|
-
},
|
|
3769
|
-
{
|
|
3770
|
-
internalType: "bytes32",
|
|
3771
|
-
name: "_nullifier",
|
|
3772
|
-
type: "bytes32"
|
|
3773
|
-
},
|
|
3774
|
-
{
|
|
3775
|
-
internalType: "bytes32",
|
|
3776
|
-
name: "_remainingNoteCommitment",
|
|
3777
|
-
type: "bytes32"
|
|
3778
|
-
},
|
|
3779
|
-
{
|
|
3780
|
-
internalType: "bytes32",
|
|
3781
|
-
name: "_remainingNoteFooter",
|
|
3782
|
-
type: "bytes32"
|
|
3783
|
-
},
|
|
3784
|
-
{
|
|
3785
|
-
internalType: "bytes",
|
|
3786
|
-
name: "_proof",
|
|
3787
|
-
type: "bytes"
|
|
3788
|
-
}
|
|
3789
|
-
],
|
|
3790
|
-
name: "withdraw",
|
|
3791
|
-
outputs: [
|
|
3792
|
-
],
|
|
3793
|
-
stateMutability: "nonpayable",
|
|
3794
|
-
type: "function"
|
|
3795
|
-
},
|
|
3796
3850
|
{
|
|
3797
3851
|
stateMutability: "payable",
|
|
3798
3852
|
type: "receive"
|
|
@@ -4963,7 +5017,7 @@ var DepositService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
4963
5017
|
}();
|
|
4964
5018
|
_proto.execute = /*#__PURE__*/function () {
|
|
4965
5019
|
var _execute = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(context) {
|
|
4966
|
-
var signer, contract, _contract$
|
|
5020
|
+
var signer, contract, _contract$proDeposit, depositArgs, estimatedGas, gasLimit, tx, _contract$proDeposit2, _depositArgs, _estimatedGas, _tx;
|
|
4967
5021
|
return _regenerator().w(function (_context3) {
|
|
4968
5022
|
while (1) switch (_context3.n) {
|
|
4969
5023
|
case 0:
|
|
@@ -4987,14 +5041,14 @@ var DepositService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
4987
5041
|
case 3:
|
|
4988
5042
|
depositArgs = [context.merkleRoot, context.newBalance.asset, hexlify32(context.depositAmount), context.proof.oldBalanceNullifier, hexlify32(context.newBalance.note), context.proof.newBalanceFooter, context.proof.proof];
|
|
4989
5043
|
_context3.n = 4;
|
|
4990
|
-
return (_contract$
|
|
5044
|
+
return (_contract$proDeposit = contract.proDeposit).estimateGas.apply(_contract$proDeposit, depositArgs.concat([{
|
|
4991
5045
|
value: 0n
|
|
4992
5046
|
}]));
|
|
4993
5047
|
case 4:
|
|
4994
5048
|
estimatedGas = _context3.v;
|
|
4995
5049
|
gasLimit = refineGasLimit(estimatedGas);
|
|
4996
5050
|
_context3.n = 5;
|
|
4997
|
-
return contract.
|
|
5051
|
+
return contract.proDeposit.apply(contract, depositArgs.concat([{
|
|
4998
5052
|
value: 0n,
|
|
4999
5053
|
gasLimit: gasLimit
|
|
5000
5054
|
}]));
|
|
@@ -5007,13 +5061,13 @@ var DepositService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
5007
5061
|
case 7:
|
|
5008
5062
|
_depositArgs = [context.merkleRoot, context.newBalance.asset, hexlify32(context.depositAmount), context.proof.oldBalanceNullifier, hexlify32(context.newBalance.note), context.proof.newBalanceFooter, context.proof.proof];
|
|
5009
5063
|
_context3.n = 8;
|
|
5010
|
-
return (_contract$
|
|
5064
|
+
return (_contract$proDeposit2 = contract.proDeposit).estimateGas.apply(_contract$proDeposit2, _depositArgs.concat([{
|
|
5011
5065
|
value: context.depositAmount
|
|
5012
5066
|
}]));
|
|
5013
5067
|
case 8:
|
|
5014
5068
|
_estimatedGas = _context3.v;
|
|
5015
5069
|
_context3.n = 9;
|
|
5016
|
-
return contract.
|
|
5070
|
+
return contract.proDeposit.apply(contract, _depositArgs.concat([{
|
|
5017
5071
|
value: context.depositAmount,
|
|
5018
5072
|
gasLimit: refineGasLimit(_estimatedGas)
|
|
5019
5073
|
}]));
|
|
@@ -5479,7 +5533,7 @@ var WithdrawService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
5479
5533
|
case 2:
|
|
5480
5534
|
contract = new ethers.ethers.Contract(this._darkSwap.contracts.darkSwapAssetManager, DarkSwapAssetManagerAbi.abi, this._darkSwap.signer);
|
|
5481
5535
|
_context3.n = 3;
|
|
5482
|
-
return contract.
|
|
5536
|
+
return contract.proWithdraw(context.merkleRoot, context.currentBalance.asset, context.withdrawAmount, context.proof.oldBalanceNullifier, hexlify32(context.newBalance.note), context.proof.newBalanceFooter, context.proof.proof);
|
|
5483
5537
|
case 3:
|
|
5484
5538
|
tx = _context3.v;
|
|
5485
5539
|
_context3.n = 4;
|
|
@@ -7965,7 +8019,7 @@ var ProCancelOrderService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
7965
8019
|
case 2:
|
|
7966
8020
|
contract = new ethers.ethers.Contract(this._darkSwap.contracts.darkSwapAssetManager, DarkSwapAssetManagerAbi.abi, this._darkSwap.signer);
|
|
7967
8021
|
_context3.n = 3;
|
|
7968
|
-
return contract.
|
|
8022
|
+
return contract.proCancelOrder(context.merkleRoot, context.proof.orderNullifier, context.proof.oldBalanceNullifier, hexlify32(context.newBalance.note), context.proof.newBalanceNoteFooter, context.proof.proof);
|
|
7969
8023
|
case 3:
|
|
7970
8024
|
tx = _context3.v;
|
|
7971
8025
|
_context3.n = 4;
|
|
@@ -9327,7 +9381,7 @@ var RetailCancelOrderService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
9327
9381
|
case 2:
|
|
9328
9382
|
contract = new ethers.ethers.Contract(this._darkSwap.contracts.darkSwapAssetManager, DarkSwapAssetManagerAbi.abi, this._darkSwap.signer);
|
|
9329
9383
|
_context3.n = 3;
|
|
9330
|
-
return contract.
|
|
9384
|
+
return contract.retailCancelOrderWithdraw(context.merkleRoot, context.orderNote.asset, hexlify32(context.orderNote.amount), context.proof.nullifier, context.proof.proof);
|
|
9331
9385
|
case 3:
|
|
9332
9386
|
tx = _context3.v;
|
|
9333
9387
|
_context3.n = 4;
|