@openocean.finance/openocean-sdk 1.2.4 → 1.2.6

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.
@@ -71,7 +71,6 @@ export declare class ReqQuoteVo extends ChainName {
71
71
  }
72
72
  export declare class ReqSwapVo extends ChainName {
73
73
  inTokenAddress: string;
74
- dex: string;
75
74
  outTokenAddress: string;
76
75
  amount: Number;
77
76
  slippage: Number;
@@ -282,14 +282,6 @@ var ReqQuoteVo = /** @class */ (function (_super) {
282
282
  return ReqQuoteVo;
283
283
  }(ChainName));
284
284
  exports.ReqQuoteVo = ReqQuoteVo;
285
- var Dexs;
286
- (function (Dexs) {
287
- Dexs[Dexs["openOcean"] = 0] = "openOcean";
288
- Dexs[Dexs["1inch"] = 1] = "1inch";
289
- Dexs[Dexs["paraSwap"] = 2] = "paraSwap";
290
- Dexs[Dexs["matcha"] = 3] = "matcha";
291
- Dexs[Dexs["jupiter"] = 4] = "jupiter";
292
- })(Dexs || (Dexs = {}));
293
285
  var ReqSwapVo = /** @class */ (function (_super) {
294
286
  __extends(ReqSwapVo, _super);
295
287
  function ReqSwapVo() {
@@ -299,11 +291,6 @@ var ReqSwapVo = /** @class */ (function (_super) {
299
291
  (0, class_validator_1.IsNotEmpty)({ message: 'In Token address cannot be empty' }),
300
292
  (0, class_transformer_1.Type)(function () { return String; })
301
293
  ], ReqSwapVo.prototype, "inTokenAddress", void 0);
302
- __decorate([
303
- (0, class_validator_1.IsNotEmpty)({ message: 'In Dex cannot be empty' }),
304
- (0, class_validator_1.IsEnum)(Dexs, { message: "Dex in (openOcean,1inch,paraSwap,matcha,jupiter)" }),
305
- (0, class_transformer_1.Type)(function () { return String; })
306
- ], ReqSwapVo.prototype, "dex", void 0);
307
294
  __decorate([
308
295
  (0, class_validator_1.IsNotEmpty)({ message: 'Out Token address cannot be empty' }),
309
296
  (0, class_transformer_1.Type)(function () { return String; })
@@ -0,0 +1,281 @@
1
+ /*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
+
7
+ /*!
8
+ * mustache.js - Logic-less {{mustache}} templates with JavaScript
9
+ * http://github.com/janl/mustache.js
10
+ */
11
+
12
+ /*!
13
+ * Fast "async" scrypt implementation in JavaScript.
14
+ * Copyright (c) 2013-2016 Dmitry Chestnykh | BSD License
15
+ * https://github.com/dchest/scrypt-async-js
16
+ */
17
+
18
+ /*!
19
+ * The buffer module from node.js, for the browser.
20
+ *
21
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
22
+ * @license MIT
23
+ */
24
+
25
+ /*!
26
+ * The buffer module from node.js, for the browser.
27
+ *
28
+ * @author Feross Aboukhadijeh <https://feross.org>
29
+ * @license MIT
30
+ */
31
+
32
+ /*!
33
+ * depd
34
+ * Copyright(c) 2015 Douglas Christopher Wilson
35
+ * MIT Licensed
36
+ */
37
+
38
+ /*!
39
+ * http-errors
40
+ * Copyright(c) 2014 Jonathan Ong
41
+ * Copyright(c) 2016 Douglas Christopher Wilson
42
+ * MIT Licensed
43
+ */
44
+
45
+ /*!
46
+ * statuses
47
+ * Copyright(c) 2014 Jonathan Ong
48
+ * Copyright(c) 2016 Douglas Christopher Wilson
49
+ * MIT Licensed
50
+ */
51
+
52
+ /*!
53
+ * toidentifier
54
+ * Copyright(c) 2016 Douglas Christopher Wilson
55
+ * MIT Licensed
56
+ */
57
+
58
+ /*!
59
+ * v2.1.4-104-gc868b3a
60
+ *
61
+ */
62
+
63
+ /*! *****************************************************************************
64
+ Copyright (C) Microsoft. All rights reserved.
65
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
66
+ this file except in compliance with the License. You may obtain a copy of the
67
+ License at http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
70
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
71
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
72
+ MERCHANTABLITY OR NON-INFRINGEMENT.
73
+
74
+ See the Apache Version 2.0 License for specific language governing permissions
75
+ and limitations under the License.
76
+ ***************************************************************************** */
77
+
78
+ /*! *****************************************************************************
79
+ Copyright (c) Microsoft Corporation.
80
+
81
+ Permission to use, copy, modify, and/or distribute this software for any
82
+ purpose with or without fee is hereby granted.
83
+
84
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
85
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
86
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
87
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
88
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
89
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
90
+ PERFORMANCE OF THIS SOFTWARE.
91
+ ***************************************************************************** */
92
+
93
+ /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
94
+
95
+ /*! @ont-community/window-post-message-proxy v0.2.14 | (c) 2016 Microsoft Corporation MIT */
96
+
97
+ /*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
98
+
99
+ /*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
100
+
101
+ /*! https://mths.be/punycode v1.3.2 by @mathias */
102
+
103
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
104
+
105
+ /*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */
106
+
107
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
108
+
109
+ /*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */
110
+
111
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
112
+
113
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
114
+
115
+ /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
116
+
117
+ /*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
118
+
119
+ /*! websocket-as-promised v0.7.0 */
120
+
121
+ /**
122
+ * Support for translating between Uint8Array instances and JavaScript
123
+ * native types.
124
+ *
125
+ * {@link module:Layout~Layout|Layout} is the basis of a class
126
+ * hierarchy that associates property names with sequences of encoded
127
+ * bytes.
128
+ *
129
+ * Layouts are supported for these scalar (numeric) types:
130
+ * * {@link module:Layout~UInt|Unsigned integers in little-endian
131
+ * format} with {@link module:Layout.u8|8-bit}, {@link
132
+ * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},
133
+ * {@link module:Layout.u32|32-bit}, {@link
134
+ * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}
135
+ * representation ranges;
136
+ * * {@link module:Layout~UIntBE|Unsigned integers in big-endian
137
+ * format} with {@link module:Layout.u16be|16-bit}, {@link
138
+ * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},
139
+ * {@link module:Layout.u40be|40-bit}, and {@link
140
+ * module:Layout.u48be|48-bit} representation ranges;
141
+ * * {@link module:Layout~Int|Signed integers in little-endian
142
+ * format} with {@link module:Layout.s8|8-bit}, {@link
143
+ * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},
144
+ * {@link module:Layout.s32|32-bit}, {@link
145
+ * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}
146
+ * representation ranges;
147
+ * * {@link module:Layout~IntBE|Signed integers in big-endian format}
148
+ * with {@link module:Layout.s16be|16-bit}, {@link
149
+ * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},
150
+ * {@link module:Layout.s40be|40-bit}, and {@link
151
+ * module:Layout.s48be|48-bit} representation ranges;
152
+ * * 64-bit integral values that decode to an exact (if magnitude is
153
+ * less than 2^53) or nearby integral Number in {@link
154
+ * module:Layout.nu64|unsigned little-endian}, {@link
155
+ * module:Layout.nu64be|unsigned big-endian}, {@link
156
+ * module:Layout.ns64|signed little-endian}, and {@link
157
+ * module:Layout.ns64be|unsigned big-endian} encodings;
158
+ * * 32-bit floating point values with {@link
159
+ * module:Layout.f32|little-endian} and {@link
160
+ * module:Layout.f32be|big-endian} representations;
161
+ * * 64-bit floating point values with {@link
162
+ * module:Layout.f64|little-endian} and {@link
163
+ * module:Layout.f64be|big-endian} representations;
164
+ * * {@link module:Layout.const|Constants} that take no space in the
165
+ * encoded expression.
166
+ *
167
+ * and for these aggregate types:
168
+ * * {@link module:Layout.seq|Sequence}s of instances of a {@link
169
+ * module:Layout~Layout|Layout}, with JavaScript representation as
170
+ * an Array and constant or data-dependent {@link
171
+ * module:Layout~Sequence#count|length};
172
+ * * {@link module:Layout.struct|Structure}s that aggregate a
173
+ * heterogeneous sequence of {@link module:Layout~Layout|Layout}
174
+ * instances, with JavaScript representation as an Object;
175
+ * * {@link module:Layout.union|Union}s that support multiple {@link
176
+ * module:Layout~VariantLayout|variant layouts} over a fixed
177
+ * (padded) or variable (not padded) span of bytes, using an
178
+ * unsigned integer at the start of the data or a separate {@link
179
+ * module:Layout.unionLayoutDiscriminator|layout element} to
180
+ * determine which layout to use when interpreting the buffer
181
+ * contents;
182
+ * * {@link module:Layout.bits|BitStructure}s that contain a sequence
183
+ * of individual {@link
184
+ * module:Layout~BitStructure#addField|BitField}s packed into an 8,
185
+ * 16, 24, or 32-bit unsigned integer starting at the least- or
186
+ * most-significant bit;
187
+ * * {@link module:Layout.cstr|C strings} of varying length;
188
+ * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link
189
+ * module:Layout~Blob#length|length} raw data.
190
+ *
191
+ * All {@link module:Layout~Layout|Layout} instances are immutable
192
+ * after construction, to prevent internal state from becoming
193
+ * inconsistent.
194
+ *
195
+ * @local Layout
196
+ * @local ExternalLayout
197
+ * @local GreedyCount
198
+ * @local OffsetLayout
199
+ * @local UInt
200
+ * @local UIntBE
201
+ * @local Int
202
+ * @local IntBE
203
+ * @local NearUInt64
204
+ * @local NearUInt64BE
205
+ * @local NearInt64
206
+ * @local NearInt64BE
207
+ * @local Float
208
+ * @local FloatBE
209
+ * @local Double
210
+ * @local DoubleBE
211
+ * @local Sequence
212
+ * @local Structure
213
+ * @local UnionDiscriminator
214
+ * @local UnionLayoutDiscriminator
215
+ * @local Union
216
+ * @local VariantLayout
217
+ * @local BitStructure
218
+ * @local BitField
219
+ * @local Boolean
220
+ * @local Blob
221
+ * @local CString
222
+ * @local Constant
223
+ * @local bindConstructorLayout
224
+ * @module Layout
225
+ * @license MIT
226
+ * @author Peter A. Bigot
227
+ * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}
228
+ */
229
+
230
+ /**
231
+ * [js-sha256]{@link https://github.com/emn178/js-sha256}
232
+ *
233
+ * @version 0.9.0
234
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
235
+ * @copyright Chen, Yi-Cyuan 2014-2017
236
+ * @license MIT
237
+ */
238
+
239
+ /**
240
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
241
+ *
242
+ * @version 0.5.7
243
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
244
+ * @copyright Chen, Yi-Cyuan 2015-2016
245
+ * @license MIT
246
+ */
247
+
248
+ /**
249
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
250
+ *
251
+ * @version 0.7.0
252
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
253
+ * @copyright Chen, Yi-Cyuan 2015-2017
254
+ * @license MIT
255
+ */
256
+
257
+ /**
258
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
259
+ *
260
+ * @version 0.8.0
261
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
262
+ * @copyright Chen, Yi-Cyuan 2015-2018
263
+ * @license MIT
264
+ */
265
+
266
+ /** @preserve
267
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
268
+ * derived from CryptoJS.mode.CTR
269
+ * Jan Hruby jhruby.web@gmail.com
270
+ */
271
+
272
+ /** @preserve
273
+ (c) 2012 by Cédric Mesnil. All rights reserved.
274
+
275
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
276
+
277
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
278
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
279
+
280
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
281
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/openocean-sdk",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Openocean sdk",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -53,11 +53,13 @@
53
53
  "@uniswap/v2-core": "^1.0.1",
54
54
  "@walletconnect/web3-provider": "^1.7.8",
55
55
  "aptos": "^1.3.17",
56
+ "axios": "^1.3.5",
56
57
  "bs58": "^4.0.1",
57
58
  "buffer": "^6.0.3",
58
59
  "class-transformer": "^0.5.1",
59
60
  "class-validator": "^0.13.2",
60
61
  "eth-sig-util": "^3.0.1",
62
+ "ethereumjs-util": "^7.1.5",
61
63
  "fs": "^0.0.1-security",
62
64
  "jsbi": "^4.3.0",
63
65
  "json-loader": "^0.5.7",