@openocean.finance/openocean-sdk 1.2.40 → 1.2.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/openocean-sdk",
3
- "version": "1.2.40",
3
+ "version": "1.2.42",
4
4
  "description": "Openocean sdk",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -48,7 +48,7 @@
48
48
  "dependencies": {
49
49
  "@ethersproject/bignumber": "^5.1.1",
50
50
  "@looksrare/sdk": "^0.12.1",
51
- "@openocean.finance/wallet": "^1.5.13",
51
+ "@openocean.finance/wallet": "^1.5.15",
52
52
  "@solana/web3.js": "1.31.0",
53
53
  "@uniswap/v2-core": "^1.0.1",
54
54
  "@walletconnect/web3-provider": "^1.7.8",
package/lib/122.index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkGenSdk=self.webpackChunkGenSdk||[]).push([[122],{31122:(e,t,r)=>{r.r(t),r.d(t,{IFrameEthereumProvider:()=>d,RpcError:()=>f});var n=r(26729);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function s(e,t,r){return s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},s.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,a(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},l(e)}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var f=function(e){function t(t,r){var n;return(n=e.call(this,t+": "+r)||this).isRpcError=!0,n.code=t,n.reason=r,n}return c(t,e),t}(l(Error)),d=function(e){function t(t){var r,n=void 0===t?{}:t,o=n.targetOrigin,i=void 0===o?"*":o,c=n.timeoutMilliseconds,a=void 0===c?24e4:c,u=n.eventSource,s=void 0===u?window:u,l=n.eventTarget,f=void 0===l?window.parent:l;return(r=e.call(this)||this).enabled=null,r.completers={},r.handleEventSourceMessage=function(e){var t=e.data;if(t){var n=t;if("2.0"===n.jsonrpc){if(void 0!==n.id&&null!==n.id){var o=r.completers[""+n.id];o&&("error"in n||"result"in n?o.resolve(n):o.reject(new Error("Response from provider did not have error or result key")),delete r.completers[n.id])}if("method"in n)switch(n.method){case"notification":r.emitNotification(n.params);break;case"connect":r.emitConnect();break;case"close":r.emitClose(n.params[0],n.params[1]);break;case"chainChanged":r.emitChainChanged(n.params[0]);break;case"networkChanged":r.emitNetworkChanged(n.params[0]);break;case"accountsChanged":r.emitAccountsChanged(n.params[0])}}}},r.targetOrigin=i,r.timeoutMilliseconds=a,r.eventSource=s,r.eventTarget=f,r.eventSource.addEventListener("message",r.handleEventSourceMessage),r}c(t,e);var r,n,a=t.prototype;return a.execute=function(e,t,r){try{var n=this,o=r||Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),c=i({jsonrpc:"2.0",id:o,method:e},void 0===t?null:{params:t}),a=new Promise((function(e,t){return n.completers[o]={resolve:e,reject:t}}));return n.eventTarget.postMessage(c,n.targetOrigin),setTimeout((function(){n.completers[o]&&(n.completers[o].reject(new Error('RPC ID "'+o+'" timed out after '+n.timeoutMilliseconds+" milliseconds")),delete n.completers[o])}),n.timeoutMilliseconds),Promise.resolve(a)}catch(e){return Promise.reject(e)}},a.send=function(e,t){try{return Promise.resolve(this.execute(e,t)).then((function(e){if("error"in e)throw new f(e.error.code,e.error.message);return e.result}))}catch(e){return Promise.reject(e)}},a.enable=function(){try{var e=this;if(null===e.enabled)var t=e.enabled=e.send("enable").catch((function(r){throw e.enabled===t&&(e.enabled=null),r}));return Promise.resolve(e.enabled)}catch(e){return Promise.reject(e)}},a.sendAsync=function(e,t){try{var r=this,n=function(n,o){try{var i=Promise.resolve(r.execute(e.method,e.params,e.id)).then((function(e){t(null,e)}))}catch(e){return o(e)}return i&&i.then?i.then(void 0,o):i}(0,(function(e){t(e,null)}));return Promise.resolve(n&&n.then?n.then((function(){})):void 0)}catch(e){return Promise.reject(e)}},a.emitNotification=function(e){this.emit("notification",e)},a.emitConnect=function(){null===this.enabled&&(this.enabled=Promise.resolve([])),this.emit("connect")},a.emitClose=function(e,t){this.emit("close",e,t)},a.emitChainChanged=function(e){this.emit("chainChanged",e)},a.emitNetworkChanged=function(e){this.emit("networkChanged",e)},a.emitAccountsChanged=function(e){this.enabled=Promise.resolve(e),this.emit("accountsChanged",e)},r=t,(n=[{key:"isIFrame",get:function(){return!0}},{key:"currentProvider",get:function(){return this}}])&&o(r.prototype,n),t}(n.EventEmitter)}}]);
@@ -1,265 +0,0 @@
1
- /*!
2
- * decimal.js v10.4.3
3
- * An arbitrary-precision Decimal type for JavaScript.
4
- * https://github.com/MikeMcl/decimal.js
5
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
6
- * MIT Licence
7
- */
8
-
9
- /*!
10
- * mustache.js - Logic-less {{mustache}} templates with JavaScript
11
- * http://github.com/janl/mustache.js
12
- */
13
-
14
- /*!
15
- * Fast "async" scrypt implementation in JavaScript.
16
- * Copyright (c) 2013-2016 Dmitry Chestnykh | BSD License
17
- * https://github.com/dchest/scrypt-async-js
18
- */
19
-
20
- /*!
21
- * The buffer module from node.js, for the browser.
22
- *
23
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
24
- * @license MIT
25
- */
26
-
27
- /*!
28
- * The buffer module from node.js, for the browser.
29
- *
30
- * @author Feross Aboukhadijeh <https://feross.org>
31
- * @license MIT
32
- */
33
-
34
- /*!
35
- * depd
36
- * Copyright(c) 2015 Douglas Christopher Wilson
37
- * MIT Licensed
38
- */
39
-
40
- /*!
41
- * http-errors
42
- * Copyright(c) 2014 Jonathan Ong
43
- * Copyright(c) 2016 Douglas Christopher Wilson
44
- * MIT Licensed
45
- */
46
-
47
- /*!
48
- * statuses
49
- * Copyright(c) 2014 Jonathan Ong
50
- * Copyright(c) 2016 Douglas Christopher Wilson
51
- * MIT Licensed
52
- */
53
-
54
- /*!
55
- * toidentifier
56
- * Copyright(c) 2016 Douglas Christopher Wilson
57
- * MIT Licensed
58
- */
59
-
60
- /*! *****************************************************************************
61
- Copyright (C) Microsoft. All rights reserved.
62
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
63
- this file except in compliance with the License. You may obtain a copy of the
64
- License at http://www.apache.org/licenses/LICENSE-2.0
65
-
66
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
67
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
68
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
69
- MERCHANTABLITY OR NON-INFRINGEMENT.
70
-
71
- See the Apache Version 2.0 License for specific language governing permissions
72
- and limitations under the License.
73
- ***************************************************************************** */
74
-
75
- /*! *****************************************************************************
76
- Copyright (c) Microsoft Corporation.
77
-
78
- Permission to use, copy, modify, and/or distribute this software for any
79
- purpose with or without fee is hereby granted.
80
-
81
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
82
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
83
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
84
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
85
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
86
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
87
- PERFORMANCE OF THIS SOFTWARE.
88
- ***************************************************************************** */
89
-
90
- /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
91
-
92
- /*! @ont-community/window-post-message-proxy v0.2.14 | (c) 2016 Microsoft Corporation MIT */
93
-
94
- /*! For license information please see web3.min.js.LICENSE.txt */
95
-
96
- /*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
97
-
98
- /*! https://mths.be/punycode v1.3.2 by @mathias */
99
-
100
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
101
-
102
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
103
-
104
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
105
-
106
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
107
-
108
- /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
109
-
110
- /*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
111
-
112
- /*! websocket-as-promised v0.7.0 */
113
-
114
- /**
115
- * Support for translating between Uint8Array instances and JavaScript
116
- * native types.
117
- *
118
- * {@link module:Layout~Layout|Layout} is the basis of a class
119
- * hierarchy that associates property names with sequences of encoded
120
- * bytes.
121
- *
122
- * Layouts are supported for these scalar (numeric) types:
123
- * * {@link module:Layout~UInt|Unsigned integers in little-endian
124
- * format} with {@link module:Layout.u8|8-bit}, {@link
125
- * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},
126
- * {@link module:Layout.u32|32-bit}, {@link
127
- * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}
128
- * representation ranges;
129
- * * {@link module:Layout~UIntBE|Unsigned integers in big-endian
130
- * format} with {@link module:Layout.u16be|16-bit}, {@link
131
- * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},
132
- * {@link module:Layout.u40be|40-bit}, and {@link
133
- * module:Layout.u48be|48-bit} representation ranges;
134
- * * {@link module:Layout~Int|Signed integers in little-endian
135
- * format} with {@link module:Layout.s8|8-bit}, {@link
136
- * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},
137
- * {@link module:Layout.s32|32-bit}, {@link
138
- * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}
139
- * representation ranges;
140
- * * {@link module:Layout~IntBE|Signed integers in big-endian format}
141
- * with {@link module:Layout.s16be|16-bit}, {@link
142
- * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},
143
- * {@link module:Layout.s40be|40-bit}, and {@link
144
- * module:Layout.s48be|48-bit} representation ranges;
145
- * * 64-bit integral values that decode to an exact (if magnitude is
146
- * less than 2^53) or nearby integral Number in {@link
147
- * module:Layout.nu64|unsigned little-endian}, {@link
148
- * module:Layout.nu64be|unsigned big-endian}, {@link
149
- * module:Layout.ns64|signed little-endian}, and {@link
150
- * module:Layout.ns64be|unsigned big-endian} encodings;
151
- * * 32-bit floating point values with {@link
152
- * module:Layout.f32|little-endian} and {@link
153
- * module:Layout.f32be|big-endian} representations;
154
- * * 64-bit floating point values with {@link
155
- * module:Layout.f64|little-endian} and {@link
156
- * module:Layout.f64be|big-endian} representations;
157
- * * {@link module:Layout.const|Constants} that take no space in the
158
- * encoded expression.
159
- *
160
- * and for these aggregate types:
161
- * * {@link module:Layout.seq|Sequence}s of instances of a {@link
162
- * module:Layout~Layout|Layout}, with JavaScript representation as
163
- * an Array and constant or data-dependent {@link
164
- * module:Layout~Sequence#count|length};
165
- * * {@link module:Layout.struct|Structure}s that aggregate a
166
- * heterogeneous sequence of {@link module:Layout~Layout|Layout}
167
- * instances, with JavaScript representation as an Object;
168
- * * {@link module:Layout.union|Union}s that support multiple {@link
169
- * module:Layout~VariantLayout|variant layouts} over a fixed
170
- * (padded) or variable (not padded) span of bytes, using an
171
- * unsigned integer at the start of the data or a separate {@link
172
- * module:Layout.unionLayoutDiscriminator|layout element} to
173
- * determine which layout to use when interpreting the buffer
174
- * contents;
175
- * * {@link module:Layout.bits|BitStructure}s that contain a sequence
176
- * of individual {@link
177
- * module:Layout~BitStructure#addField|BitField}s packed into an 8,
178
- * 16, 24, or 32-bit unsigned integer starting at the least- or
179
- * most-significant bit;
180
- * * {@link module:Layout.cstr|C strings} of varying length;
181
- * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link
182
- * module:Layout~Blob#length|length} raw data.
183
- *
184
- * All {@link module:Layout~Layout|Layout} instances are immutable
185
- * after construction, to prevent internal state from becoming
186
- * inconsistent.
187
- *
188
- * @local Layout
189
- * @local ExternalLayout
190
- * @local GreedyCount
191
- * @local OffsetLayout
192
- * @local UInt
193
- * @local UIntBE
194
- * @local Int
195
- * @local IntBE
196
- * @local NearUInt64
197
- * @local NearUInt64BE
198
- * @local NearInt64
199
- * @local NearInt64BE
200
- * @local Float
201
- * @local FloatBE
202
- * @local Double
203
- * @local DoubleBE
204
- * @local Sequence
205
- * @local Structure
206
- * @local UnionDiscriminator
207
- * @local UnionLayoutDiscriminator
208
- * @local Union
209
- * @local VariantLayout
210
- * @local BitStructure
211
- * @local BitField
212
- * @local Boolean
213
- * @local Blob
214
- * @local CString
215
- * @local Constant
216
- * @local bindConstructorLayout
217
- * @module Layout
218
- * @license MIT
219
- * @author Peter A. Bigot
220
- * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}
221
- */
222
-
223
- /**
224
- * [js-sha256]{@link https://github.com/emn178/js-sha256}
225
- *
226
- * @version 0.9.0
227
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
228
- * @copyright Chen, Yi-Cyuan 2014-2017
229
- * @license MIT
230
- */
231
-
232
- /**
233
- * [js-sha3]{@link https://github.com/emn178/js-sha3}
234
- *
235
- * @version 0.7.0
236
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
237
- * @copyright Chen, Yi-Cyuan 2015-2017
238
- * @license MIT
239
- */
240
-
241
- /**
242
- * [js-sha3]{@link https://github.com/emn178/js-sha3}
243
- *
244
- * @version 0.8.0
245
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
246
- * @copyright Chen, Yi-Cyuan 2015-2018
247
- * @license MIT
248
- */
249
-
250
- /** @preserve
251
- * Counter block mode compatible with Dr Brian Gladman fileenc.c
252
- * derived from CryptoJS.mode.CTR
253
- * Jan Hruby jhruby.web@gmail.com
254
- */
255
-
256
- /** @preserve
257
- (c) 2012 by Cédric Mesnil. All rights reserved.
258
-
259
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
260
-
261
- - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
262
- - 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.
263
-
264
- 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.
265
- */