@pioneer-platform/pioneer-react 0.2.46 → 0.2.47

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 +163952 -215421
  2. package/dist/{index_7b095b99.js → index_003befba.js} +1312 -1122
  3. package/dist/{index_9a2fa5ba.js → index_0364269a.js} +3 -3
  4. package/dist/{index_0233ab6e.js → index_0e37f5ff.js} +1 -1
  5. package/dist/{index_e21338b4.js → index_167c5f7a.js} +3 -3
  6. package/dist/{index_f1c394c8.js → index_1990afbf.js} +4 -4
  7. package/dist/{index_343f9468.js → index_29e62962.js} +4 -4
  8. package/dist/{index_cd7b7000.js → index_2cbf1530.js} +6 -6
  9. package/dist/{index_3d7082d3.js → index_310b7772.js} +9 -9
  10. package/dist/{index_fd3a5ec6.js → index_354cce52.js} +3 -3
  11. package/dist/{index_a2c6091a.js → index_37894947.js} +3 -3
  12. package/dist/{index_66933ca6.js → index_3891b298.js} +1 -1
  13. package/dist/{index_bfe24110.js → index_3a6b0cd3.js} +3 -3
  14. package/dist/{index_0e190af0.js → index_4a548214.js} +8 -8
  15. package/dist/{index_8f7f1311.js → index_542dbb9a.js} +4 -4
  16. package/dist/{index_dce9b56f.js → index_547d2868.js} +4 -4
  17. package/dist/{index_8ef2dd82.js → index_61a33920.js} +6 -6
  18. package/dist/{index_be8c55cd.js → index_674ffbfa.js} +9 -9
  19. package/dist/{index_192f4d2e.js → index_6d2a3e5c.js} +2 -6
  20. package/dist/{index_a47b2b71.js → index_7382dec1.js} +5 -5
  21. package/dist/{index_d0632736.js → index_7a1bb0b1.js} +8 -8
  22. package/dist/{index_5eb2fe9f.js → index_7c12bb44.js} +1 -1
  23. package/dist/{index_52e88303.js → index_85b01410.js} +6 -6
  24. package/dist/{index_c964d4f9.js → index_8b9255eb.js} +10 -10
  25. package/dist/{index_8c886fbb.js → index_a4f5a15a.js} +19 -19
  26. package/dist/{index_d910f98e.js → index_a682c1a8.js} +1 -3
  27. package/dist/{index_b9f8fd38.js → index_a6b45215.js} +3 -7
  28. package/dist/{index_af178090.js → index_ae6c3b10.js} +3 -3
  29. package/dist/{index_50faa3fa.js → index_b21f58b7.js} +4 -4
  30. package/dist/{index_66728978.js → index_b3022c1a.js} +5 -5
  31. package/dist/{index_41dc30a7.js → index_bd7e0d56.js} +2 -2
  32. package/dist/{index_394e6e8f.js → index_c8ebd6e3.js} +11 -11
  33. package/dist/{index_a46ee29a.js → index_ca633a1c.js} +7 -7
  34. package/dist/{index_1af9af9e.js → index_d8e757ba.js} +3 -3
  35. package/dist/{index_ada459da.js → index_e168f4c0.js} +7 -7
  36. package/dist/{index_8edb57a9.js → index_e233a036.js} +1 -1
  37. package/dist/{index_98d1dfc6.js → index_e57ba5a5.js} +3 -3
  38. package/dist/{index_05b89cc8.js → index_f19b5fe5.js} +3 -3
  39. package/dist/{index_d7d50cc6.js → index_f3922fc1.js} +3 -3
  40. package/dist/{index_92a17a5e.js → index_f80541a0.js} +25 -38
  41. package/dist/{index_2c508270.js → index_f9d1a3bf.js} +1 -3
  42. package/dist/{index_df76109e.js → index_f9d461d1.js} +3 -3
  43. package/package.json +1 -2
  44. package/src/lib/context/Pioneer/sdk/connect.ts +11 -11
  45. package/dist/index_0a85a2ce.js +0 -25
  46. package/dist/index_10812439.js +0 -25
  47. package/dist/index_1098f328.js +0 -12913
  48. package/dist/index_180735b4.js +0 -22872
  49. package/dist/index_24fdd0ba.js +0 -130
  50. package/dist/index_36ed5d98.js +0 -2856
  51. package/dist/index_3d5897c4.js +0 -1115
  52. package/dist/index_a591ed33.js +0 -446
  53. package/dist/index_ab332746.js +0 -121
  54. package/dist/index_b19211e4.js +0 -112
  55. package/dist/index_b2e7cbe3.js +0 -11003
  56. package/dist/index_ccf11e2f.js +0 -65
  57. package/dist/index_d8a5e2ef.js +0 -116
@@ -1,130 +0,0 @@
1
- import { A } from "./index_0233ab6e.js";
2
- import { P as Psbt } from "./index_7b095b99.js";
3
- import "./index_92a17a5e.js";
4
- import "react";
5
- import "@chakra-ui/react";
6
- import "react-dom";
7
- import "./index_d910f98e.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_a2c6091a.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_bfe24110.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_e21338b4.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_a2c6091a.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
- };