@pioneer-platform/pioneer-react 0.2.47 → 0.2.49

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 (57) hide show
  1. package/dist/index.js +198340 -146844
  2. package/dist/{index_0e37f5ff.js → index_0652205a.js} +6 -6
  3. package/dist/{index_f9d1a3bf.js → index_096371b1.js} +3 -1
  4. package/dist/{index_ae6c3b10.js → index_0a5ed442.js} +3 -3
  5. package/dist/{index_e233a036.js → index_0a6e5811.js} +1 -1
  6. package/dist/{index_547d2868.js → index_0b5f5f6a.js} +4 -4
  7. package/dist/index_10812439.js +25 -0
  8. package/dist/{index_4a548214.js → index_1093b1b4.js} +8 -8
  9. package/dist/{index_3a6b0cd3.js → index_169417bf.js} +3 -3
  10. package/dist/{index_e168f4c0.js → index_1d5f0f00.js} +7 -7
  11. package/dist/{index_e57ba5a5.js → index_278505c5.js} +3 -3
  12. package/dist/{index_a4f5a15a.js → index_2845411a.js} +19 -19
  13. package/dist/{index_003befba.js → index_29be6ff5.js} +1122 -1312
  14. package/dist/{index_a6b45215.js → index_2dc95f2a.js} +7 -3
  15. package/dist/{index_6d2a3e5c.js → index_3402bab8.js} +6 -2
  16. package/dist/{index_310b7772.js → index_3c54e5ec.js} +9 -9
  17. package/dist/{index_f9d461d1.js → index_423ea09e.js} +3 -3
  18. package/dist/{index_37894947.js → index_4425b278.js} +3 -3
  19. package/dist/{index_61a33920.js → index_514c608b.js} +6 -6
  20. package/dist/index_51b338c1.js +121 -0
  21. package/dist/{index_0364269a.js → index_5d8426fb.js} +3 -3
  22. package/dist/index_628b22bc.js +11003 -0
  23. package/dist/index_63a883f7.js +446 -0
  24. package/dist/{index_d8e757ba.js → index_654fef3a.js} +3 -3
  25. package/dist/index_691fd636.js +12913 -0
  26. package/dist/{index_674ffbfa.js → index_69b0f47b.js} +9 -9
  27. package/dist/{index_a682c1a8.js → index_6cd7bc1a.js} +3 -1
  28. package/dist/{index_c8ebd6e3.js → index_6ebe4744.js} +900 -900
  29. package/dist/{index_7382dec1.js → index_7f735685.js} +5 -5
  30. package/dist/{index_b3022c1a.js → index_82348f63.js} +5 -5
  31. package/dist/index_849386d3.js +1115 -0
  32. package/dist/{index_85b01410.js → index_8610c3c4.js} +6 -6
  33. package/dist/index_8d6422b9.js +112 -0
  34. package/dist/{index_167c5f7a.js → index_8fd2c24a.js} +3 -3
  35. package/dist/{index_1990afbf.js → index_942c3b80.js} +4 -4
  36. package/dist/index_94b7968d.js +22872 -0
  37. package/dist/index_94d38802.js +2856 -0
  38. package/dist/{index_bd7e0d56.js → index_a5ca5cc4.js} +2 -2
  39. package/dist/{index_f80541a0.js → index_aa71379e.js} +307 -267
  40. package/dist/{index_354cce52.js → index_aa773d39.js} +3 -3
  41. package/dist/{index_29e62962.js → index_b022faaa.js} +4 -4
  42. package/dist/index_b1028d5f.js +65 -0
  43. package/dist/index_c232ca43.js +25 -0
  44. package/dist/{index_f19b5fe5.js → index_c9105338.js} +3 -3
  45. package/dist/{index_7c12bb44.js → index_cebbd50e.js} +1 -1
  46. package/dist/{index_ca633a1c.js → index_d477606a.js} +7 -7
  47. package/dist/index_d8a5e2ef.js +116 -0
  48. package/dist/{index_542dbb9a.js → index_de4af619.js} +4 -4
  49. package/dist/{index_7a1bb0b1.js → index_df47a9c6.js} +8 -8
  50. package/dist/{index_8b9255eb.js → index_e0b32f2f.js} +10 -10
  51. package/dist/{index_b21f58b7.js → index_e2794130.js} +4 -4
  52. package/dist/{index_2cbf1530.js → index_ecce7b22.js} +6 -6
  53. package/dist/{index_3891b298.js → index_f2d68730.js} +1 -1
  54. package/dist/index_f66728ba.js +130 -0
  55. package/dist/{index_f3922fc1.js → index_f8bc80e1.js} +3 -3
  56. package/package.json +19 -18
  57. package/src/lib/context/Pioneer/sdk/connect.ts +11 -11
@@ -1,6 +1,6 @@
1
- import { c as commonjsGlobal, a as base64Js, d as bech32$2, f as buffer, _ as _assert, h as utils$1, k as _sha2, r as require$$0, s as sha256$1, l as getAugmentedNamespace, p as process } from "./index_f80541a0.js";
2
- import { b as bnExports } from "./index_f9d1a3bf.js";
3
- import { e as elliptic } from "./index_a682c1a8.js";
1
+ import { c as commonjsGlobal, e as base64Js, f as bech32$2, k as buffer, _ as _assert, l as utils$1, m as _sha2, r as require$$0, s as sha256$1, n as getAugmentedNamespace, p as process } from "./index_aa71379e.js";
2
+ import { b as bnExports } from "./index_096371b1.js";
3
+ import { e as elliptic } from "./index_6cd7bc1a.js";
4
4
  function _mergeNamespaces(n, m) {
5
5
  for (var i = 0; i < m.length; i++) {
6
6
  const e = m[i];
@@ -1,10 +1,10 @@
1
- import { b as On, d as Pg, a as Rg } from "./index_e57ba5a5.js";
2
- import { r as build } from "./index_a4f5a15a.js";
3
- import "./index_f80541a0.js";
1
+ import { b as On, d as Pg, a as Rg } from "./index_278505c5.js";
2
+ import { r as build } from "./index_2845411a.js";
3
+ import "./index_aa71379e.js";
4
4
  import "react";
5
5
  import "@chakra-ui/react";
6
6
  import "react-dom";
7
- import "./index_0e37f5ff.js";
7
+ import "./index_0652205a.js";
8
8
  function he(e, t) {
9
9
  for (var n = 0; n < t.length; n++) {
10
10
  const r = t[n];
@@ -0,0 +1,65 @@
1
+ import { g as getDefaultExportFromCjs } from "./index_94b7968d.js";
2
+ const h = 2147483648;
3
+ var t = function(r) {
4
+ if (!Array.isArray(r))
5
+ throw new Error("Input must be an Array");
6
+ if (r.length === 0)
7
+ throw new Error("Path must contain at least one level");
8
+ for (var e = 0; e < r.length; e++)
9
+ if (typeof r[e] != "number")
10
+ throw new Error("Path element is not a number");
11
+ this.path = r;
12
+ };
13
+ t.validatePathArray = function(r) {
14
+ try {
15
+ return t.fromPathArray(r), true;
16
+ } catch {
17
+ return false;
18
+ }
19
+ };
20
+ t.validateString = function(r, e) {
21
+ try {
22
+ return t.fromString(r, e), true;
23
+ } catch {
24
+ return false;
25
+ }
26
+ };
27
+ t.fromPathArray = function(r) {
28
+ return new t(r);
29
+ };
30
+ t.fromString = function(r, e) {
31
+ if (/^m\//i.test(r))
32
+ r = r.slice(2);
33
+ else if (e)
34
+ throw new Error("Root element is required");
35
+ for (var a = r.split("/"), n = new Array(a.length), o = 0; o < a.length; o++) {
36
+ var i = /(\d+)([hH\']?)/.exec(a[o]);
37
+ if (i === null)
38
+ throw new Error("Invalid input");
39
+ if (n[o] = parseInt(i[1], 10), n[o] >= h)
40
+ throw new Error("Invalid child index");
41
+ if (i[2] === "h" || i[2] === "H" || i[2] === "'")
42
+ n[o] += h;
43
+ else if (i[2].length != 0)
44
+ throw new Error("Invalid modifier");
45
+ }
46
+ return new t(n);
47
+ };
48
+ t.prototype.toPathArray = function() {
49
+ return this.path;
50
+ };
51
+ t.prototype.toString = function(r, e) {
52
+ for (var a = new Array(this.path.length), n = 0; n < this.path.length; n++) {
53
+ var o = this.path[n];
54
+ o & h ? a[n] = (o & ~h) + (e ? "h" : "'") : a[n] = o;
55
+ }
56
+ return (r ? "" : "m/") + a.join("/");
57
+ };
58
+ t.prototype.inspect = function() {
59
+ return "BIPPath <" + this.toString() + ">";
60
+ };
61
+ var l = t;
62
+ const s = /* @__PURE__ */ getDefaultExportFromCjs(l);
63
+ export {
64
+ s
65
+ };
@@ -0,0 +1,25 @@
1
+ import { g as getDefaultExportFromCjs, d as dist } from "./index_94b7968d.js";
2
+ var l = function(i, e, r, a, o, t, s, d) {
3
+ if (dist.process.env.NODE_ENV !== "production" && e === void 0)
4
+ throw new Error("invariant requires an error message argument");
5
+ if (!i) {
6
+ var n;
7
+ if (e === void 0)
8
+ n = new Error(
9
+ "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
10
+ );
11
+ else {
12
+ var f = [r, a, o, t, s, d], u = 0;
13
+ n = new Error(
14
+ e.replace(/%s/g, function() {
15
+ return f[u++];
16
+ })
17
+ ), n.name = "Invariant Violation";
18
+ }
19
+ throw n.framesToPop = 1, n;
20
+ }
21
+ }, p = l;
22
+ const w = /* @__PURE__ */ getDefaultExportFromCjs(p);
23
+ export {
24
+ w
25
+ };
@@ -35,9 +35,9 @@ var __privateMethod = (obj, member, method) => {
35
35
  return method;
36
36
  };
37
37
  var _listener, _listeners, _cancelled, _allowInsecure, _gzip, _headers, _method, _timeout, _url, _body, _bodyType, _creds, _preflight, _process, _retry, _signal, _throttle, _getUrlFunc, _send, send_fn, _statusCode, _statusMessage, _headers2, _body2, _request, _error, _names, _data, _dataLength, _writeData, writeData_fn, _data2, _offset, _peekBytes, peekBytes_fn, _options, _types, _fullTypes, _encoderCache, _getEncoder, getEncoder_fn, _offset2, _tokens, _subTokenString, subTokenString_fn, _walkAsync, walkAsync_fn, _getCoder, getCoder_fn, _errors, _events, _functions, _abiCoder, _getFunction, getFunction_fn, _getEvent, getEvent_fn, _iface, _iface2, _filter, _a, _supports2544, _resolver, _fetch, fetch_fn, _getResolver, getResolver_fn, _url2, _processFunc, _name, _chainId, _plugins, _provider, _poller, _interval, _blockNumber, _poll, poll_fn, _provider2, _poll2, _running, _filter2, _hash, _provider3, _filter3, _poller2, _running2, _blockNumber2, _poll3, poll_fn2, _subs, _plugins2, _pausedState, _destroyed, _networkPromise, _anyNetwork, _performCache, _lastBlockNumber, _nextTimer, _timers, _disableCcipRead, _options2, _perform, perform_fn, _call, call_fn, _checkNetwork, checkNetwork_fn, _getAccountValue, getAccountValue_fn, _getBlock, getBlock_fn, _hasSub, hasSub_fn, _getSub, getSub_fn, _provider4, _filterIdPromise, _poller3, _running3, _network, _hault, _poll4, poll_fn3, _teardown, teardown_fn, _event, _options3, _nextId, _payloads, _drainTimer, _notReady, _network2, _scheduleDrain, scheduleDrain_fn, _pollingInterval, _request2, _signingKey, _data3, _checksum, _words, _loadWords, loadWords_fn, _account, account_fn, _fromSeed, fromSeed_fn;
38
- import { c as createView, h as hash, a as checkOpts, n as number, t as toBytes, b as hmac, w as wrapConstructor, S as SHA2, u as u64, d as assertArgument, e as toBigInt, g as getBytes, f as defineProperties, i as assertNormalize, j as assert, k as hexlify, l as getBytesCopy, m as toNumber, o as concat, p as getNumber, q as toBeArray, s as sha256$1, r as asyncLoop, v as u32, x as getAddress, y as getBigInt, z as dataSlice, B as keccak256, C as encodeRlp, D as assertPrivate, E as toBeHex, F as assertArgumentCount, G as isError, H as mask, I as toTwos, J as fromTwos, K as isHexString, L as toQuantity, M as zeroPadValue, N as makeError, O as zeroPadBytes, P as Log, T as TransactionResponse, Q as TransactionReceipt, R as isAddressable, U as resolveAddress, V as isCallException, W as resolveProperties, X as copyRequest, Y as Signature, Z as accessListify, _ as Block, $ as FeeData, a0 as Transaction, a1 as dataLength, A as AbstractSigner, a2 as computeAddress, a3 as version, a4 as SigningKey, a5 as isBytesLike, a6 as VoidSigner } from "./index_e233a036.js";
39
- import { a7, aa, a9, a8 } from "./index_e233a036.js";
40
- import { g as global } from "./index_f80541a0.js";
38
+ import { c as createView, h as hash, a as checkOpts, n as number, t as toBytes, b as hmac, w as wrapConstructor, S as SHA2, u as u64, d as assertArgument, e as toBigInt, g as getBytes, f as defineProperties, i as assertNormalize, j as assert, k as hexlify, l as getBytesCopy, m as toNumber, o as concat, p as getNumber, q as toBeArray, s as sha256$1, r as asyncLoop, v as u32, x as getAddress, y as getBigInt, z as dataSlice, B as keccak256, C as encodeRlp, D as assertPrivate, E as toBeHex, F as assertArgumentCount, G as isError, H as mask, I as toTwos, J as fromTwos, K as isHexString, L as toQuantity, M as zeroPadValue, N as makeError, O as zeroPadBytes, P as Log, T as TransactionResponse, Q as TransactionReceipt, R as isAddressable, U as resolveAddress, V as isCallException, W as resolveProperties, X as copyRequest, Y as Signature, Z as accessListify, _ as Block, $ as FeeData, a0 as Transaction, a1 as dataLength, A as AbstractSigner, a2 as computeAddress, a3 as version, a4 as SigningKey, a5 as isBytesLike, a6 as VoidSigner } from "./index_0a6e5811.js";
39
+ import { a7, aa, a9, a8 } from "./index_0a6e5811.js";
40
+ import { g as global } from "./index_aa71379e.js";
41
41
  import "react";
42
42
  import "@chakra-ui/react";
43
43
  import "react-dom";
@@ -29,7 +29,7 @@ const M = ({ addChain: _, rpcUrls: t }) => async (n) => {
29
29
  const i = I == null ? void 0 : I.getOfflineSignerOnlyAmino(R);
30
30
  if (!i)
31
31
  throw new Error("Could not load offlineSigner");
32
- const { getDenom: D, KujiraToolbox: O, GaiaToolbox: e, createCosmJS: c } = await import("./index_37894947.js"), d = await c({ offlineSigner: i, rpcUrl: t[n] }), [{ address: o }] = await i.getAccounts(), C = async ({
32
+ const { getDenom: D, KujiraToolbox: O, GaiaToolbox: e, createCosmJS: c } = await import("./index_4425b278.js"), d = await c({ offlineSigner: i, rpcUrl: t[n] }), [{ address: o }] = await i.getAccounts(), C = async ({
33
33
  assetValue: s,
34
34
  recipient: P,
35
35
  memo: h
@@ -1,10 +1,10 @@
1
- import { c as commonjsGlobal, m as minimal, l as long, a as any, h as helpers, b as coin, g as getIntrinsic, t as tx, d as dist, e as build, s as signing, f as multisig } from "./index_4a548214.js";
2
- import { a as Ri$1, b as Vn$1, r as VI, s as TI, c as Ar$1, d as Pi$1 } from "./index_1990afbf.js";
3
- import { t as Te$1, a as xe$1, b as Ne$1 } from "./index_61a33920.js";
4
- import { b as oe$1 } from "./index_b3022c1a.js";
5
- import "./index_7a1bb0b1.js";
6
- import "./index_0e37f5ff.js";
7
- import "./index_f80541a0.js";
1
+ import { c as commonjsGlobal, m as minimal, l as long, a as any, h as helpers, b as coin, g as getIntrinsic, t as tx, d as dist, e as build, s as signing, f as multisig } from "./index_1093b1b4.js";
2
+ import { a as Ri$1, b as Vn$1, r as VI, s as TI, c as Ar$1, d as Pi$1 } from "./index_942c3b80.js";
3
+ import { t as Te$1, a as xe$1, b as Ne$1 } from "./index_514c608b.js";
4
+ import { b as oe$1 } from "./index_82348f63.js";
5
+ import "./index_df47a9c6.js";
6
+ import "./index_0652205a.js";
7
+ import "./index_aa71379e.js";
8
8
  import "react";
9
9
  import "@chakra-ui/react";
10
10
  import "react-dom";
@@ -0,0 +1,116 @@
1
+ const t = (e) => {
2
+ class r extends Error {
3
+ constructor(c, s, n) {
4
+ if (super(c || e, n), Object.setPrototypeOf(this, r.prototype), this.name = e, s)
5
+ for (const o in s)
6
+ this[o] = s[o];
7
+ if (n && O(n) && "cause" in n && !("cause" in this)) {
8
+ const o = n.cause;
9
+ this.cause = o, "stack" in o && (this.stack = this.stack + `
10
+ CAUSE: ` + o.stack);
11
+ }
12
+ }
13
+ }
14
+ return r;
15
+ };
16
+ function O(e) {
17
+ return typeof e == "object";
18
+ }
19
+ const _ = t("LockedDeviceError"), x = t("DisconnectedDevice"), N = t("DisconnectedDeviceDuringOperation"), D = t("NetworkDown"), S = t("UserRefusedOnDevice"), C = t("TransportOpenUserCancelled"), A = t("TransportInterfaceNotAvailable"), d = t("TransportRaceCondition"), u = t("TransportWebUSBGestureRequired"), R = t("LedgerAPI4xx"), L = t("LedgerAPI5xx");
20
+ var i;
21
+ (function(e) {
22
+ e.Unknown = "Unknown", e.LocationServicesDisabled = "LocationServicesDisabled", e.LocationServicesUnauthorized = "LocationServicesUnauthorized", e.BluetoothScanStartFailed = "BluetoothScanStartFailed";
23
+ })(i || (i = {}));
24
+ class U extends Error {
25
+ constructor(r, a) {
26
+ const c = "TransportError";
27
+ super(r || c), this.name = c, this.message = r, this.stack = new Error(r).stack, this.id = a;
28
+ }
29
+ }
30
+ const E = {
31
+ ACCESS_CONDITION_NOT_FULFILLED: 38916,
32
+ ALGORITHM_NOT_SUPPORTED: 38020,
33
+ CLA_NOT_SUPPORTED: 28160,
34
+ CODE_BLOCKED: 38976,
35
+ CODE_NOT_INITIALIZED: 38914,
36
+ COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 27009,
37
+ CONDITIONS_OF_USE_NOT_SATISFIED: 27013,
38
+ CONTRADICTION_INVALIDATION: 38928,
39
+ CONTRADICTION_SECRET_CODE_STATUS: 38920,
40
+ CUSTOM_IMAGE_BOOTLOADER: 26159,
41
+ CUSTOM_IMAGE_EMPTY: 26158,
42
+ FILE_ALREADY_EXISTS: 27273,
43
+ FILE_NOT_FOUND: 37892,
44
+ GP_AUTH_FAILED: 25344,
45
+ HALTED: 28586,
46
+ INCONSISTENT_FILE: 37896,
47
+ INCORRECT_DATA: 27264,
48
+ INCORRECT_LENGTH: 26368,
49
+ INCORRECT_P1_P2: 27392,
50
+ INS_NOT_SUPPORTED: 27904,
51
+ DEVICE_NOT_ONBOARDED: 27911,
52
+ DEVICE_NOT_ONBOARDED_2: 26129,
53
+ INVALID_KCV: 38021,
54
+ INVALID_OFFSET: 37890,
55
+ LICENSING: 28482,
56
+ LOCKED_DEVICE: 21781,
57
+ MAX_VALUE_REACHED: 38992,
58
+ MEMORY_PROBLEM: 37440,
59
+ MISSING_CRITICAL_PARAMETER: 26624,
60
+ NO_EF_SELECTED: 37888,
61
+ NOT_ENOUGH_MEMORY_SPACE: 27268,
62
+ OK: 36864,
63
+ PIN_REMAINING_ATTEMPTS: 25536,
64
+ REFERENCED_DATA_NOT_FOUND: 27272,
65
+ SECURITY_STATUS_NOT_SATISFIED: 27010,
66
+ TECHNICAL_PROBLEM: 28416,
67
+ UNKNOWN_APDU: 27906,
68
+ USER_REFUSED_ON_DEVICE: 21761,
69
+ NOT_ENOUGH_SPACE: 20738
70
+ };
71
+ function T(e) {
72
+ switch (e) {
73
+ case 26368:
74
+ return "Incorrect length";
75
+ case 26624:
76
+ return "Missing critical parameter";
77
+ case 27010:
78
+ return "Security not satisfied (dongle locked or have invalid access rights)";
79
+ case 27013:
80
+ return "Condition of use not satisfied (denied by the user?)";
81
+ case 27264:
82
+ return "Invalid data received";
83
+ case 27392:
84
+ return "Invalid parameter received";
85
+ case 21781:
86
+ return "Locked device";
87
+ }
88
+ if (28416 <= e && e <= 28671)
89
+ return "Internal error, please report";
90
+ }
91
+ function I(e) {
92
+ const r = Object.keys(E).find((n) => E[n] === e) || "UNKNOWN_ERROR", a = T(e) || r, c = e.toString(16), s = `Ledger device: ${a} (0x${c})`;
93
+ if (e === E.LOCKED_DEVICE)
94
+ throw new _(s);
95
+ this.name = "TransportStatusError", this.message = s, this.stack = new Error(s).stack, this.statusCode = e, this.statusText = r;
96
+ }
97
+ I.prototype = new Error();
98
+ export {
99
+ x as DisconnectedDevice,
100
+ N as DisconnectedDeviceDuringOperation,
101
+ i as HwTransportErrorType,
102
+ R as LedgerAPI4xx,
103
+ L as LedgerAPI5xx,
104
+ _ as LockedDeviceError,
105
+ D as NetworkDown,
106
+ E as StatusCodes,
107
+ U as TransportError,
108
+ A as TransportInterfaceNotAvailable,
109
+ C as TransportOpenUserCancelled,
110
+ d as TransportRaceCondition,
111
+ I as TransportStatusError,
112
+ u as TransportWebUSBGestureRequired,
113
+ S as UserRefusedOnDevice,
114
+ t as createCustomErrorClass,
115
+ T as getAltStatusMessage
116
+ };
@@ -1,9 +1,9 @@
1
- import { c as commonjsGlobal, d as dist, g as getAugmentedNamespace, b as buffer, a as getDefaultExportFromCjs } from "./index_310b7772.js";
2
- import "./index_f80541a0.js";
1
+ import { c as commonjsGlobal, d as dist, g as getAugmentedNamespace, b as buffer, a as getDefaultExportFromCjs } from "./index_3c54e5ec.js";
2
+ import "./index_aa71379e.js";
3
3
  import "react";
4
4
  import "@chakra-ui/react";
5
5
  import "react-dom";
6
- import "./index_e233a036.js";
6
+ import "./index_0a6e5811.js";
7
7
  const Tp = Symbol(), bc = Object.getPrototypeOf, Ho = /* @__PURE__ */ new WeakMap(), Bp = (t) => t && (Ho.has(t) ? Ho.get(t) : bc(t) === Object.prototype || bc(t) === Array.prototype), Np = (t) => Bp(t) && t[Tp] || null, vc = (t, e = true) => {
8
8
  Ho.set(t, e);
9
9
  }, Xn = (t) => typeof t == "object" && t !== null, Pr = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakSet(), Lp = (t = Object.is, e = (s, l) => new Proxy(s, l), r = (s) => Xn(s) && !sn.has(s) && (Array.isArray(s) || !(Symbol.iterator in s)) && !(s instanceof WeakMap) && !(s instanceof WeakSet) && !(s instanceof Error) && !(s instanceof Number) && !(s instanceof Date) && !(s instanceof String) && !(s instanceof RegExp) && !(s instanceof ArrayBuffer), i = (s) => s.configurable && s.enumerable && s.writable, a = (s) => {
@@ -417,7 +417,7 @@ let eb = class {
417
417
  }
418
418
  async initUi() {
419
419
  if (typeof window < "u") {
420
- await import("./index_547d2868.js");
420
+ await import("./index_0b5f5f6a.js");
421
421
  const e = document.createElement("wcm-modal");
422
422
  document.body.insertAdjacentElement("beforeend", e), ir.setIsUiLoaded(true);
423
423
  }
@@ -1,4 +1,4 @@
1
- import { g as global } from "./index_f80541a0.js";
1
+ import { g as global } from "./index_aa71379e.js";
2
2
  var Oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
3
  var re = {}, dr = {}, ua = {};
4
4
  ua.byteLength = Ou;
@@ -14740,7 +14740,7 @@ const l3 = async ({
14740
14740
  throw new Error("Ethplorer API key not found");
14741
14741
  if (!n)
14742
14742
  throw new Error("Covalent API key not found");
14743
- const { HDNodeWallet: _ } = await import("./index_f19b5fe5.js"), { getProvider: A, ETHToolbox: I, AVAXToolbox: T, BSCToolbox: C } = await import("./index_3a6b0cd3.js"), L = A(r, e), P = _.fromPhrase(i).connect(L), N = { api: t3, provider: L, signer: P }, $ = r === at.Ethereum ? I({ ...N, ethplorerApiKey: a }) : r === at.Avalanche ? T({ ...N, covalentApiKey: n }) : C({ ...N, covalentApiKey: n });
14743
+ const { HDNodeWallet: _ } = await import("./index_c9105338.js"), { getProvider: A, ETHToolbox: I, AVAXToolbox: T, BSCToolbox: C } = await import("./index_169417bf.js"), L = A(r, e), P = _.fromPhrase(i).connect(L), N = { api: t3, provider: L, signer: P }, $ = r === at.Ethereum ? I({ ...N, ethplorerApiKey: a }) : r === at.Avalanche ? T({ ...N, covalentApiKey: n }) : C({ ...N, covalentApiKey: n });
14744
14744
  return {
14745
14745
  address: P.address,
14746
14746
  walletMethods: {
@@ -14752,7 +14752,7 @@ const l3 = async ({
14752
14752
  case at.BitcoinCash: {
14753
14753
  if (!o)
14754
14754
  throw new Error("UTXO API key not found");
14755
- const { BCHToolbox: _ } = await import("./index_167c5f7a.js"), A = _({ rpcUrl: e, apiKey: o, apiClient: t3 }), I = await A.createKeysForPath({ phrase: i, derivationPath: x }), T = A.getAddressFromKeys(I), C = async ({
14755
+ const { BCHToolbox: _ } = await import("./index_8fd2c24a.js"), A = _({ rpcUrl: e, apiKey: o, apiClient: t3 }), I = await A.createKeysForPath({ phrase: i, derivationPath: x }), T = A.getAddressFromKeys(I), C = async ({
14756
14756
  builder: P,
14757
14757
  utxos: N
14758
14758
  }) => (N.forEach(($, q) => {
@@ -14767,7 +14767,7 @@ const l3 = async ({
14767
14767
  case at.Bitcoin:
14768
14768
  case at.Dogecoin:
14769
14769
  case at.Litecoin: {
14770
- const _ = { rpcUrl: e, apiKey: o, apiClient: t3 }, { BTCToolbox: A, LTCToolbox: I, DOGEToolbox: T } = await import("./index_167c5f7a.js"), C = r === at.Bitcoin ? A(_) : r === at.Litecoin ? I(_) : T(_), L = await C.createKeysForPath({ phrase: i, derivationPath: x }), P = C.getAddressFromKeys(L), N = async ($) => ($.signAllInputs(L), $);
14770
+ const _ = { rpcUrl: e, apiKey: o, apiClient: t3 }, { BTCToolbox: A, LTCToolbox: I, DOGEToolbox: T } = await import("./index_8fd2c24a.js"), C = r === at.Bitcoin ? A(_) : r === at.Litecoin ? I(_) : T(_), L = await C.createKeysForPath({ phrase: i, derivationPath: x }), P = C.getAddressFromKeys(L), N = async ($) => ($.signAllInputs(L), $);
14771
14771
  return {
14772
14772
  address: P,
14773
14773
  walletMethods: {
@@ -14778,7 +14778,7 @@ const l3 = async ({
14778
14778
  };
14779
14779
  }
14780
14780
  case at.Binance: {
14781
- const { BinanceToolbox: _ } = await import("./index_37894947.js"), A = _(), I = await A.createKeyPair(i), T = await A.getAddressFromMnemonic(i);
14781
+ const { BinanceToolbox: _ } = await import("./index_4425b278.js"), A = _(), I = await A.createKeyPair(i), T = await A.getAddressFromMnemonic(i);
14782
14782
  return {
14783
14783
  address: T,
14784
14784
  walletMethods: { ...A, transfer: ({ assetValue: L, recipient: P, memo: N }) => A.transfer({
@@ -14791,7 +14791,7 @@ const l3 = async ({
14791
14791
  };
14792
14792
  }
14793
14793
  case at.Cosmos: {
14794
- const { GaiaToolbox: _ } = await import("./index_37894947.js"), A = _({ server: t3 }), I = await A.getSigner(i), T = await A.getAddressFromMnemonic(i);
14794
+ const { GaiaToolbox: _ } = await import("./index_4425b278.js"), A = _({ server: t3 }), I = await A.getSigner(i), T = await A.getAddressFromMnemonic(i);
14795
14795
  return {
14796
14796
  address: T,
14797
14797
  walletMethods: { ...A, transfer: ({ assetValue: L, recipient: P, memo: N }) => A.transfer({
@@ -14804,7 +14804,7 @@ const l3 = async ({
14804
14804
  };
14805
14805
  }
14806
14806
  case at.Kujira: {
14807
- const { KujiraToolbox: _ } = await import("./index_4a548214.js").then((L) => L.n), A = _({ server: t3 }), I = await A.getSigner(i), T = await A.getAddressFromMnemonic(i);
14807
+ const { KujiraToolbox: _ } = await import("./index_1093b1b4.js").then((L) => L.n), A = _({ server: t3 }), I = await A.getSigner(i), T = await A.getAddressFromMnemonic(i);
14808
14808
  return {
14809
14809
  address: T,
14810
14810
  walletMethods: { ...A, transfer: ({ assetValue: L, recipient: P, memo: N }) => A.transfer({
@@ -14818,7 +14818,7 @@ const l3 = async ({
14818
14818
  }
14819
14819
  case at.Maya:
14820
14820
  case at.THORChain: {
14821
- const { MayaToolbox: _, ThorchainToolbox: A } = await import("./index_37894947.js"), I = r === at.THORChain ? A({ stagenet: b }) : _({ stagenet: b }), T = await I.getAddressFromMnemonic(i), C = await I.getSigner(i), N = { ...I, deposit: async ({ assetValue: $, memo: q }) => I.deposit({ assetValue: $, memo: q, from: T, signer: C }), transfer: async ({ assetValue: $, recipient: q, memo: V }) => I.transfer({
14821
+ const { MayaToolbox: _, ThorchainToolbox: A } = await import("./index_4425b278.js"), I = r === at.THORChain ? A({ stagenet: b }) : _({ stagenet: b }), T = await I.getAddressFromMnemonic(i), C = await I.getSigner(i), N = { ...I, deposit: async ({ assetValue: $, memo: q }) => I.deposit({ assetValue: $, memo: q, from: T, signer: C }), transfer: async ({ assetValue: $, recipient: q, memo: V }) => I.transfer({
14822
14822
  from: T,
14823
14823
  recipient: q,
14824
14824
  signer: C,
@@ -1,6 +1,6 @@
1
- import { A } from "./index_0e37f5ff.js";
2
- import { c as a0 } from "./index_674ffbfa.js";
3
- import "./index_f80541a0.js";
1
+ import { A } from "./index_0652205a.js";
2
+ import { c as a0 } from "./index_69b0f47b.js";
3
+ import "./index_aa71379e.js";
4
4
  import "react";
5
5
  import "@chakra-ui/react";
6
6
  import "react-dom";
@@ -106,7 +106,7 @@ const u = (t) => {
106
106
  return F({ method: r, params: I, chain: t.chain });
107
107
  }, P = ({ chainId: t, rpcUrl: i }) => async ({ from: a, recipient: e, assetValue: r, memo: E }) => {
108
108
  var N, A2;
109
- const { createCosmJS: _ } = await import("./index_37894947.js"), I = (A2 = (N = window.xfi) == null ? void 0 : N.keplr) == null ? void 0 : A2.getOfflineSignerOnlyAmino(t), s = await _({ offlineSigner: I, rpcUrl: i }), S = [
109
+ const { createCosmJS: _ } = await import("./index_4425b278.js"), I = (A2 = (N = window.xfi) == null ? void 0 : N.keplr) == null ? void 0 : A2.getOfflineSignerOnlyAmino(t), s = await _({ offlineSigner: I, rpcUrl: i }), S = [
110
110
  { denom: (r == null ? void 0 : r.symbol) === "MUON" ? "umuon" : "uatom", amount: r.baseValue }
111
111
  ], { transactionHash: c } = await s.sendTokens(a, e, S, 1.6, E);
112
112
  return c;
@@ -123,7 +123,7 @@ const y = async ({
123
123
  var _, I;
124
124
  switch (t) {
125
125
  case o.THORChain: {
126
- const { DEFAULT_GAS_VALUE: s, ThorchainToolbox: S } = await import("./index_37894947.js");
126
+ const { DEFAULT_GAS_VALUE: s, ThorchainToolbox: S } = await import("./index_4425b278.js");
127
127
  return {
128
128
  ...S({ stagenet: false }),
129
129
  deposit: (c) => T({ ...c, recipient: "" }, "deposit"),
@@ -131,21 +131,21 @@ const y = async ({
131
131
  };
132
132
  }
133
133
  case o.Cosmos: {
134
- const { GaiaToolbox: s } = await import("./index_37894947.js");
134
+ const { GaiaToolbox: s } = await import("./index_4425b278.js");
135
135
  return {
136
136
  ...s({ server: E }),
137
137
  transfer: P({ chainId: ChainId.Cosmos, rpcUrl: r || D.Cosmos })
138
138
  };
139
139
  }
140
140
  case o.Kujira: {
141
- const { KujiraToolbox: s } = await import("./index_37894947.js");
141
+ const { KujiraToolbox: s } = await import("./index_4425b278.js");
142
142
  return {
143
143
  ...s(),
144
144
  transfer: P({ chainId: ChainId.Kujira, rpcUrl: r || D.Kujira })
145
145
  };
146
146
  }
147
147
  case o.Binance: {
148
- const { BinanceToolbox: s } = await import("./index_37894947.js");
148
+ const { BinanceToolbox: s } = await import("./index_4425b278.js");
149
149
  return { ...s(), transfer: T };
150
150
  }
151
151
  case o.Ethereum:
@@ -160,7 +160,7 @@ const y = async ({
160
160
  addEVMWalletNetwork: l,
161
161
  covalentApi: U,
162
162
  ethplorerApi: f
163
- } = await import("./index_3a6b0cd3.js"), { BrowserProvider: M } = await import("./index_f19b5fe5.js"), O = (_ = window.xfi) == null ? void 0 : _.ethereum;
163
+ } = await import("./index_169417bf.js"), { BrowserProvider: M } = await import("./index_c9105338.js"), O = (_ = window.xfi) == null ? void 0 : _.ethereum;
164
164
  if (!O)
165
165
  throw new Error("Requested web3 wallet is not installed");
166
166
  if (t !== o.Ethereum && !a || t === o.Ethereum && !i)
@@ -203,7 +203,7 @@ const y = async ({
203
203
  case o.BitcoinCash:
204
204
  case o.Dogecoin:
205
205
  case o.Litecoin: {
206
- const { BCHToolbox: s, BTCToolbox: S, DOGEToolbox: c, LTCToolbox: N } = await import("./index_167c5f7a.js"), A2 = { rpcUrl: r, utxoApiKey: e, apiClient: E };
206
+ const { BCHToolbox: s, BTCToolbox: S, DOGEToolbox: c, LTCToolbox: N } = await import("./index_8fd2c24a.js"), A2 = { rpcUrl: r, utxoApiKey: e, apiClient: E };
207
207
  return { ...t === o.Bitcoin ? S(A2) : t === o.BitcoinCash ? s(A2) : t === o.Dogecoin ? c(A2) : N(A2), transfer: T };
208
208
  }
209
209
  default:
@@ -1,5 +1,5 @@
1
- import { g as global } from "./index_f80541a0.js";
2
- import { b as bt$1, c as ct$1, A, y as yt$1 } from "./index_0e37f5ff.js";
1
+ import { g as global } from "./index_aa71379e.js";
2
+ import { b as bt$1, c as ct$1, A, y as yt$1 } from "./index_0652205a.js";
3
3
  var $v = Object.defineProperty;
4
4
  var Hv = (e7, t, r) => t in e7 ? $v(e7, t, { enumerable: true, configurable: true, writable: true, value: r }) : e7[t] = r;
5
5
  var wi = (e7, t, r) => (Hv(e7, typeof t != "symbol" ? t + "" : t, r), r);
@@ -18130,7 +18130,7 @@ const xI = () => {
18130
18130
  }) => {
18131
18131
  if (!t && !e7)
18132
18132
  throw new Error("Either phrase or wif must be provided");
18133
- const i = await import("./index_d8e757ba.js").then((l) => l.j), o = xl.ECPairFactory(i), s = Kr(n);
18133
+ const i = await import("./index_654fef3a.js").then((l) => l.j), o = xl.ECPairFactory(i), s = Kr(n);
18134
18134
  if (t)
18135
18135
  return o.fromWIF(t, s);
18136
18136
  const a = Nb(e7), f = xn.fromMasterSeed(a, s).derive(r);
@@ -24984,7 +24984,7 @@ const Nf = (e7) => `https://api.blockchair.com/${rN(e7)}`, d0 = (e7) => {
24984
24984
  }) => {
24985
24985
  const n = Kr(Mr);
24986
24986
  if (r) {
24987
- const s = await import("./index_d8e757ba.js").then((a) => a.j);
24987
+ const s = await import("./index_654fef3a.js").then((a) => a.j);
24988
24988
  return xl.ECPairFactory(s).fromWIF(r, n);
24989
24989
  }
24990
24990
  if (!e7)
@@ -1,12 +1,12 @@
1
- import { j as commonjsGlobal, m as minimal, l as long, k as any, n as helpers, o as coin, p as getIntrinsic, t as tx, q as dist, r as build, u as signing, v as multisig } from "./index_a4f5a15a.js";
2
- import { a as Rg$1, b as On$1, r as Or$1, s as Tr$1, c as At$1, d as Pg$1 } from "./index_e57ba5a5.js";
3
- import { t as Te$1, a as Ke$1, b as Ne$1 } from "./index_7382dec1.js";
4
- import { b as oe } from "./index_29e62962.js";
5
- import "./index_f80541a0.js";
1
+ import { j as commonjsGlobal, m as minimal, l as long, k as any, n as helpers, o as coin, p as getIntrinsic, t as tx, q as dist, r as build, u as signing, v as multisig } from "./index_2845411a.js";
2
+ import { a as Rg$1, b as On$1, r as Or$1, s as Tr$1, c as At$1, d as Pg$1 } from "./index_278505c5.js";
3
+ import { t as Te$1, a as Ke$1, b as Ne$1 } from "./index_7f735685.js";
4
+ import { b as oe } from "./index_b022faaa.js";
5
+ import "./index_aa71379e.js";
6
6
  import "react";
7
7
  import "@chakra-ui/react";
8
8
  import "react-dom";
9
- import "./index_0e37f5ff.js";
9
+ import "./index_0652205a.js";
10
10
  function Bc(e, t) {
11
11
  for (var p = 0; p < t.length; p++) {
12
12
  const i = t[p];
@@ -1,4 +1,4 @@
1
- import { u as usePioneer, j as jsxRuntimeExports } from "./index_f80541a0.js";
1
+ import { u as usePioneer, j as jsxRuntimeExports } from "./index_aa71379e.js";
2
2
  import { useDisclosure, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, Button, Tabs, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
3
3
  import { useState, useEffect } from "react";
4
4
  import "react-dom";
@@ -0,0 +1,130 @@
1
+ import { A } from "./index_0652205a.js";
2
+ import { P as Psbt } from "./index_29be6ff5.js";
3
+ import "./index_aa71379e.js";
4
+ import "react";
5
+ import "@chakra-ui/react";
6
+ import "react-dom";
7
+ import "./index_6cd7bc1a.js";
8
+ var n = /* @__PURE__ */ ((t) => (t.INVALID_INPUT_PARAMETERS = "1000", t.UNKNOWN_PROVIDERS = "1001", t.CANNOT_FIND_INBOUND_ADDRESS = "1002", t.NO_INBOUND_ADDRESSES = "1003", t.CHAIN_HALTED_OR_UNSUPPORTED = "1004", t.MISSING_INPUT_PARAMETER = "1005", t.INVALID_TYPE_GENERIC = "1100", t.INVALID_NUMBER_STRING = "1101", t.INVALID_NUMBER = "1102", t.INVALID_BOOLEAN = "1103", t.INVALID_OBJECT = "1104", t.INVALID_ARRAY = "1105", t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", t.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", t.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", t.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", t.AFF_ADDRESS_TOO_LONG = "2004", t.AFF_BPS_INTEGER_0_100 = "2005", t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", t.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", t.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", t.SOURCE_ADDRESS_SMART_CONTRACT = "2011", t.INVALID_PROVIDER = "2100", t.MISSING_CROSS_CHAIN_PROVIDER = "2101", t.MISSING_AVAX_PROVIDER = "2102", t.MISSING_BSC_PROVIDER = "2103", t.MISSING_ETH_PROVIDER = "2104", t.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", t.MISSING_ARB_PROVIDER = "2106", t.INVALID_CHAIN = "2200", t.INVALID_ASSET = "2201", t.INVALID_ASSET_IDENTIFIER = "2202", t.UNSUPPORTED_CHAIN = "2204", t.UNSUPPORTED_ASSET = "2203", t.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", t.INVALID_SOURCE_ADDRESS = "2300", t.INVALID_DESTINATION_ADDRESS = "2301", t.THORNODE_QUOTE_GENERIC_ERROR = "3000", t.NOT_ENOUGH_SYNTH_BALANCE = "3001", t.SYNTH_MINTING_CAP_REACHED = "3002", t.INVALID_QUOTE_MODE = "4000", t.NO_QUOTES = "4001", t.SERVICE_UNAVAILABLE_GENERIC = "5000", t.MISSING_GAS_DATA_GENERIC = "5100", t.MISSING_TOKEN_INFO_GENERIC = "5200", t.CANT_FIND_TOKEN_LIST = "5201", t.NO_PRICE = "5202", t.PRICE_IS_STALE = "5203", t.ADDRESS_NOT_WHITELISTED = "6000", t.ADDRESS_ALREADY_CLAIMED = "6001", t.TEMPORARY_ERROR = "9999", t))(n || {});
9
+ n.INVALID_INPUT_PARAMETERS + "", n.UNKNOWN_PROVIDERS + "", n.CANNOT_FIND_INBOUND_ADDRESS + "", n.NO_INBOUND_ADDRESSES + "", n.CHAIN_HALTED_OR_UNSUPPORTED + "", n.MISSING_INPUT_PARAMETER + "", n.INVALID_TYPE_GENERIC + "", n.INVALID_NUMBER_STRING + "", n.INVALID_NUMBER + "", n.INVALID_BOOLEAN + "", n.INVALID_OBJECT + "", n.INVALID_ARRAY + "", n.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER + "", n.SELL_BUY_ASSETS_ARE_THE_SAME + "", n.MISSING_SOURCE_ADDRESS_FOR_SYNTH + "", n.AFF_ADDRESS_AND_BPS_OR_NEITHER + "", n.AFF_ADDRESS_TOO_LONG + "", n.AFF_BPS_INTEGER_0_100 + "", n.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN + "", n.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN + "", n.PREFERRED_PROFVIDER_NOT_SUPPORTED + "", n.DESTINATION_ADDRESS_SMART_CONTRACT + "", n.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER + "", n.INVALID_PROVIDER + "", n.MISSING_CROSS_CHAIN_PROVIDER + "", n.MISSING_AVAX_PROVIDER + "", n.MISSING_BSC_PROVIDER + "", n.MISSING_ETH_PROVIDER + "", n.MISSING_ARB_PROVIDER + "", n.INVALID_PROVIDER_FOR_SWAP_OUT + "", n.INVALID_CHAIN + "", n.INVALID_ASSET + "", n.UNSUPPORTED_CHAIN + "", n.UNSUPPORTED_ASSET + "", n.UNSUPPORTED_ASSET_FOR_SWAPOUT + "", n.THORNODE_QUOTE_GENERIC_ERROR + "", n.INVALID_SOURCE_ADDRESS + "", n.INVALID_DESTINATION_ADDRESS + "", n.NOT_ENOUGH_SYNTH_BALANCE + "", n.SYNTH_MINTING_CAP_REACHED + "", n.INVALID_QUOTE_MODE + "", n.NO_QUOTES + "", n.SERVICE_UNAVAILABLE_GENERIC + "", n.MISSING_GAS_DATA_GENERIC + "", n.MISSING_TOKEN_INFO_GENERIC + "", n.CANT_FIND_TOKEN_LIST + "", n.NO_PRICE + "", n.PRICE_IS_STALE + "", n.ADDRESS_NOT_WHITELISTED + "", n.ADDRESS_ALREADY_CLAIMED + "";
10
+ var o = /* @__PURE__ */ ((t) => (t.Arbitrum = "ARB", t.Avalanche = "AVAX", t.Binance = "BNB", t.BinanceSmartChain = "BSC", t.Bitcoin = "BTC", t.BitcoinCash = "BCH", t.Cosmos = "GAIA", t.Dogecoin = "DOGE", t.Ethereum = "ETH", t.Kujira = "KUJI", t.Litecoin = "LTC", t.Maya = "MAYA", t.Optimism = "OP", t.Polygon = "MATIC", t.THORChain = "THOR", t))(o || {}), C = /* @__PURE__ */ ((t) => (t[t.ARB = 18] = "ARB", t[t.AVAX = 18] = "AVAX", t[t.BCH = 8] = "BCH", t[t.BNB = 8] = "BNB", t[t.BSC = 18] = "BSC", t[t.BTC = 8] = "BTC", t[t.DASH = 8] = "DASH", t[t.DOGE = 8] = "DOGE", t[t.ETH = 18] = "ETH", t[t.GAIA = 6] = "GAIA", t[t.KUJI = 6] = "KUJI", t[t.LTC = 8] = "LTC", t[t.MATIC = 18] = "MATIC", t[t.MAYA = 10] = "MAYA", t[t.OP = 18] = "OP", t[t.THOR = 8] = "THOR", t))(C || {}), R = /* @__PURE__ */ ((t) => (t.Arbitrum = "42161", t.ArbitrumHex = "0xa4b1", t.Avalanche = "43114", t.AvalancheHex = "0xa86a", t.Binance = "Binance-Chain-Tigris", t.BinanceSmartChain = "56", t.BinanceSmartChainHex = "0x38", t.Bitcoin = "bitcoin", t.BitcoinCash = "bitcoincash", t.Cosmos = "cosmoshub-4", t.Dogecoin = "dogecoin", t.Kujira = "kaiyo-1", t.Ethereum = "1", t.EthereumHex = "0x1", t.Litecoin = "litecoin", t.Maya = "mayachain-mainnet-v1", t.MayaStagenet = "mayachain-stagenet-v1", t.Optimism = "10", t.OptimismHex = "0xa", t.Polygon = "137", t.PolygonHex = "0x89", t.THORChain = "thorchain-mainnet-v1", t.THORChainStagenet = "thorchain-stagenet-v2", t))(R || {}), m = /* @__PURE__ */ ((t) => (t.Arbitrum = "https://arb1.arbitrum.io/rpc", t.Avalanche = "https://node-router.thorswap.net/avalanche-c", t.Binance = "", t.BinanceSmartChain = "https://bsc-dataseed.binance.org", t.Bitcoin = "https://node-router.thorswap.net/bitcoin", t.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", t.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", t.Kujira = "https://rpc-kujira.synergynodes.com/", t.Dogecoin = "https://node-router.thorswap.net/dogecoin", t.Ethereum = "https://node-router.thorswap.net/ethereum", t.Litecoin = "https://node-router.thorswap.net/litecoin", t.Maya = "https://tendermint.mayachain.info", t.MayaStagenet = "https://stagenet.tendermint.mayachain.info", t.Optimism = "https://mainnet.optimism.io", t.Polygon = "https://polygon-rpc.com", t.THORChain = "https://rpc.thorswap.net", t.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", t))(m || {});
11
+ const c = Object.values(o), p = Object.keys(o), D = c.reduce(
12
+ (t, a) => {
13
+ const i = p.find((_) => o[_] === a);
14
+ return i && (t[a] = i), t;
15
+ },
16
+ {}
17
+ );
18
+ c.reduce(
19
+ (t, a) => (t[a] = R[D[a]], t),
20
+ {}
21
+ );
22
+ c.reduce(
23
+ (t, a) => (t[a] = m[D[a]], t),
24
+ {}
25
+ );
26
+ c.reduce(
27
+ (t, a) => {
28
+ const i = `${D[a]}Hex`;
29
+ return t[a] = R[i], t;
30
+ },
31
+ {}
32
+ );
33
+ var h = /* @__PURE__ */ ((t) => (t.KEYSTORE = "KEYSTORE", t.KEEPKEY = "KEEPKEY", t.XDEFI = "XDEFI", t.METAMASK = "METAMASK", t.COINBASE_WEB = "COINBASE_WEB", t.TREZOR = "TREZOR", t.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", t.LEDGER = "LEDGER", t.KEPLR = "KEPLR", t.OKX = "OKX", t.BRAVE = "BRAVE", t.WALLETCONNECT = "WALLETCONNECT", t))(h || {});
34
+ const L = (t) => async ({ from: a, recipient: i, amount: _, asset: I, memo: T }) => {
35
+ var E;
36
+ const A2 = (E = window.okxwallet) == null ? void 0 : E.keplr, S = A2 == null ? void 0 : A2.getOfflineSignerOnlyAmino(R.Cosmos);
37
+ if (!S)
38
+ throw new Error("No cosmos okxwallet found");
39
+ const { createCosmJS: N } = await import("./index_4425b278.js"), s = await N({ offlineSigner: S, rpcUrl: t }), e = [
40
+ { denom: (I == null ? void 0 : I.symbol) === "MUON" ? "umuon" : "uatom", amount: _.amount().toString() }
41
+ ], { transactionHash: r } = await s.sendTokens(a, i, e, 1.6, T);
42
+ return r;
43
+ }, w = async ({
44
+ chain: t,
45
+ ethplorerApiKey: a,
46
+ covalentApiKey: i,
47
+ utxoApiKey: _,
48
+ rpcUrl: I,
49
+ api: T
50
+ }) => {
51
+ var A$1, S, N;
52
+ switch (t) {
53
+ case o.Ethereum:
54
+ case o.Avalanche:
55
+ case o.BinanceSmartChain: {
56
+ if (!((A$1 = window.okxwallet) != null && A$1.send))
57
+ throw new Error("No okxwallet found");
58
+ const { getWeb3WalletMethods: s, getProvider: e } = await import("./index_169417bf.js"), r = await s({
59
+ chain: t,
60
+ ethplorerApiKey: a,
61
+ covalentApiKey: i,
62
+ ethereumWindowProvider: window.okxwallet
63
+ }), E = await window.okxwallet.send("eth_requestAccounts", []);
64
+ return { ...r, getAddress: () => E, getBalance: async () => {
65
+ const l = await r.getBalance(E), O = await e(t).getBalance(E);
66
+ return [
67
+ new A({
68
+ chain: t,
69
+ symbol: t,
70
+ value: O.toString(),
71
+ decimal: C[t]
72
+ }),
73
+ ...l.slice(1)
74
+ ];
75
+ } };
76
+ }
77
+ case o.Bitcoin: {
78
+ if (!((S = window.okxwallet) != null && S.bitcoin))
79
+ throw new Error("No bitcoin okxwallet found");
80
+ if (!_)
81
+ throw new Error("No utxoApiKey provided");
82
+ const { BTCToolbox: s } = await import("./index_8fd2c24a.js"), e = window.okxwallet.bitcoin, r = (await e.connect()).address, E = s({ rpcUrl: I, apiKey: _, apiClient: T }), d = async (O) => {
83
+ const u = await e.signPsbt(O.toHex(), { from: r, type: "list" });
84
+ return Psbt.fromHex(u);
85
+ };
86
+ return { ...E, transfer: (O) => E.transfer({
87
+ ...O,
88
+ signTransaction: d
89
+ }), getAddress: () => r };
90
+ }
91
+ case o.Cosmos: {
92
+ if (!((N = window.okxwallet) != null && N.keplr))
93
+ throw new Error("No cosmos okxwallet found");
94
+ const s = window.okxwallet.keplr;
95
+ await s.enable(R.Cosmos);
96
+ const [{ address: e }] = await s.getOfflineSignerOnlyAmino(R.Cosmos).getAccounts(), { GaiaToolbox: r } = await import("./index_4425b278.js");
97
+ return {
98
+ ...r({ server: T }),
99
+ transfer: L(I),
100
+ getAddress: () => e
101
+ };
102
+ }
103
+ default:
104
+ throw new Error(`No wallet for chain ${t}`);
105
+ }
106
+ };
107
+ o.Avalanche, o.BinanceSmartChain, o.Bitcoin, o.Ethereum, o.Cosmos;
108
+ const U = ({
109
+ addChain: t,
110
+ config: { covalentApiKey: a, ethplorerApiKey: i, utxoApiKey: _ }
111
+ }) => async (I) => (await I.reduce(async (A2, S) => {
112
+ await A2;
113
+ const N = await w({
114
+ chain: S,
115
+ covalentApiKey: a,
116
+ ethplorerApiKey: i,
117
+ utxoApiKey: _
118
+ }), s = await N.getAddress();
119
+ t({
120
+ chain: S,
121
+ walletMethods: { ...N, getAddress: () => s },
122
+ wallet: { address: s, balance: [], walletType: h.OKX }
123
+ });
124
+ }, Promise.resolve()), true), g = {
125
+ connectMethodName: "connectOkx",
126
+ connect: U
127
+ };
128
+ export {
129
+ g as okxWallet
130
+ };