@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.
- package/dist/index.js +198340 -146844
- package/dist/{index_0e37f5ff.js → index_0652205a.js} +6 -6
- package/dist/{index_f9d1a3bf.js → index_096371b1.js} +3 -1
- package/dist/{index_ae6c3b10.js → index_0a5ed442.js} +3 -3
- package/dist/{index_e233a036.js → index_0a6e5811.js} +1 -1
- package/dist/{index_547d2868.js → index_0b5f5f6a.js} +4 -4
- package/dist/index_10812439.js +25 -0
- package/dist/{index_4a548214.js → index_1093b1b4.js} +8 -8
- package/dist/{index_3a6b0cd3.js → index_169417bf.js} +3 -3
- package/dist/{index_e168f4c0.js → index_1d5f0f00.js} +7 -7
- package/dist/{index_e57ba5a5.js → index_278505c5.js} +3 -3
- package/dist/{index_a4f5a15a.js → index_2845411a.js} +19 -19
- package/dist/{index_003befba.js → index_29be6ff5.js} +1122 -1312
- package/dist/{index_a6b45215.js → index_2dc95f2a.js} +7 -3
- package/dist/{index_6d2a3e5c.js → index_3402bab8.js} +6 -2
- package/dist/{index_310b7772.js → index_3c54e5ec.js} +9 -9
- package/dist/{index_f9d461d1.js → index_423ea09e.js} +3 -3
- package/dist/{index_37894947.js → index_4425b278.js} +3 -3
- package/dist/{index_61a33920.js → index_514c608b.js} +6 -6
- package/dist/index_51b338c1.js +121 -0
- package/dist/{index_0364269a.js → index_5d8426fb.js} +3 -3
- package/dist/index_628b22bc.js +11003 -0
- package/dist/index_63a883f7.js +446 -0
- package/dist/{index_d8e757ba.js → index_654fef3a.js} +3 -3
- package/dist/index_691fd636.js +12913 -0
- package/dist/{index_674ffbfa.js → index_69b0f47b.js} +9 -9
- package/dist/{index_a682c1a8.js → index_6cd7bc1a.js} +3 -1
- package/dist/{index_c8ebd6e3.js → index_6ebe4744.js} +900 -900
- package/dist/{index_7382dec1.js → index_7f735685.js} +5 -5
- package/dist/{index_b3022c1a.js → index_82348f63.js} +5 -5
- package/dist/index_849386d3.js +1115 -0
- package/dist/{index_85b01410.js → index_8610c3c4.js} +6 -6
- package/dist/index_8d6422b9.js +112 -0
- package/dist/{index_167c5f7a.js → index_8fd2c24a.js} +3 -3
- package/dist/{index_1990afbf.js → index_942c3b80.js} +4 -4
- package/dist/index_94b7968d.js +22872 -0
- package/dist/index_94d38802.js +2856 -0
- package/dist/{index_bd7e0d56.js → index_a5ca5cc4.js} +2 -2
- package/dist/{index_f80541a0.js → index_aa71379e.js} +307 -267
- package/dist/{index_354cce52.js → index_aa773d39.js} +3 -3
- package/dist/{index_29e62962.js → index_b022faaa.js} +4 -4
- package/dist/index_b1028d5f.js +65 -0
- package/dist/index_c232ca43.js +25 -0
- package/dist/{index_f19b5fe5.js → index_c9105338.js} +3 -3
- package/dist/{index_7c12bb44.js → index_cebbd50e.js} +1 -1
- package/dist/{index_ca633a1c.js → index_d477606a.js} +7 -7
- package/dist/index_d8a5e2ef.js +116 -0
- package/dist/{index_542dbb9a.js → index_de4af619.js} +4 -4
- package/dist/{index_7a1bb0b1.js → index_df47a9c6.js} +8 -8
- package/dist/{index_8b9255eb.js → index_e0b32f2f.js} +10 -10
- package/dist/{index_b21f58b7.js → index_e2794130.js} +4 -4
- package/dist/{index_2cbf1530.js → index_ecce7b22.js} +6 -6
- package/dist/{index_3891b298.js → index_f2d68730.js} +1 -1
- package/dist/index_f66728ba.js +130 -0
- package/dist/{index_f3922fc1.js → index_f8bc80e1.js} +3 -3
- package/package.json +19 -18
- package/src/lib/context/Pioneer/sdk/connect.ts +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as commonjsGlobal } from "./
|
|
2
|
-
import { b as bnExports } from "./
|
|
1
|
+
import { c as commonjsGlobal, a as getDefaultExportFromCjs } from "./index_aa71379e.js";
|
|
2
|
+
import { b as bnExports } from "./index_096371b1.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
5
5
|
const e = m[i];
|
|
@@ -437,9 +437,13 @@ integers.Uint64 = Uint64;
|
|
|
437
437
|
return integers_1.Uint64;
|
|
438
438
|
} });
|
|
439
439
|
})(build);
|
|
440
|
+
const Yi = /* @__PURE__ */ getDefaultExportFromCjs(build);
|
|
440
441
|
const index = /* @__PURE__ */ _mergeNamespaces({
|
|
441
|
-
__proto__: null
|
|
442
|
+
__proto__: null,
|
|
443
|
+
default: Yi
|
|
442
444
|
}, [build]);
|
|
443
445
|
export {
|
|
446
|
+
Yi as Y,
|
|
447
|
+
build as b,
|
|
444
448
|
index as i
|
|
445
449
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as commonjsGlobal,
|
|
1
|
+
import { c as commonjsGlobal, e as base64Js, f as bech32$2, a as getDefaultExportFromCjs } from "./index_aa71379e.js";
|
|
2
2
|
function _mergeNamespaces(n, m) {
|
|
3
3
|
for (var i = 0; i < m.length; i++) {
|
|
4
4
|
const e = m[i];
|
|
@@ -279,9 +279,13 @@ utf8.fromUtf8 = fromUtf8;
|
|
|
279
279
|
return utf8_1.toUtf8;
|
|
280
280
|
} });
|
|
281
281
|
})(build);
|
|
282
|
+
const H1 = /* @__PURE__ */ getDefaultExportFromCjs(build);
|
|
282
283
|
const index = /* @__PURE__ */ _mergeNamespaces({
|
|
283
|
-
__proto__: null
|
|
284
|
+
__proto__: null,
|
|
285
|
+
default: H1
|
|
284
286
|
}, [build]);
|
|
285
287
|
export {
|
|
288
|
+
H1 as H,
|
|
289
|
+
build as b,
|
|
286
290
|
index as i
|
|
287
291
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as global } from "./
|
|
2
|
-
import { A as AbstractSigner } from "./
|
|
1
|
+
import { g as global } from "./index_aa71379e.js";
|
|
2
|
+
import { A as AbstractSigner } from "./index_0a6e5811.js";
|
|
3
3
|
var be = Object.defineProperty;
|
|
4
4
|
var Fe = (e82, n, s) => n in e82 ? be(e82, n, { enumerable: true, configurable: true, writable: true, value: s }) : e82[n] = s;
|
|
5
5
|
var z = (e82, n, s) => (Fe(e82, typeof n != "symbol" ? n + "" : n, s), s);
|
|
@@ -4327,7 +4327,7 @@ class WalletconnectSigner extends AbstractSigner {
|
|
|
4327
4327
|
});
|
|
4328
4328
|
z(this, "sendTransaction", async ({ from: s2, to: m2, value: l2, data: _ }) => {
|
|
4329
4329
|
var h;
|
|
4330
|
-
const { toHexString: y } = await import("./
|
|
4330
|
+
const { toHexString: y } = await import("./index_169417bf.js"), c = {
|
|
4331
4331
|
from: s2,
|
|
4332
4332
|
to: m2,
|
|
4333
4333
|
value: y(BigInt(l2 || 0)),
|
|
@@ -4428,11 +4428,11 @@ const getToolbox = async ({
|
|
|
4428
4428
|
throw new Error("Ethplorer API key not found");
|
|
4429
4429
|
if (e82 !== i$1.Ethereum && !s)
|
|
4430
4430
|
throw new Error("Covalent API key not found");
|
|
4431
|
-
const { getProvider: c, ETHToolbox: h, AVAXToolbox: S, BSCToolbox: w } = await import("./
|
|
4431
|
+
const { getProvider: c, ETHToolbox: h, AVAXToolbox: S, BSCToolbox: w } = await import("./index_169417bf.js"), F = c(e82), U = await getEVMSigner({ walletconnect: m, chain: e82, provider: F });
|
|
4432
4432
|
return e82 === i$1.Ethereum ? h({ provider: F, signer: U, ethplorerApiKey: n }) : e82 === i$1.Avalanche ? S({ provider: F, signer: U, covalentApiKey: s }) : w({ provider: F, signer: U, covalentApiKey: s });
|
|
4433
4433
|
}
|
|
4434
4434
|
case i$1.Binance: {
|
|
4435
|
-
const { sortObject: c, BinanceToolbox: h } = await import("./
|
|
4435
|
+
const { sortObject: c, BinanceToolbox: h } = await import("./index_4425b278.js"), S = h();
|
|
4436
4436
|
return { ...S, transfer: async ({ recipient: F, assetValue: U, memo: P }) => {
|
|
4437
4437
|
var u;
|
|
4438
4438
|
const v = await S.getAccount(y), { transaction: V, signMsg: N } = await S.createTransactionAndSignMsg({
|
|
@@ -4460,7 +4460,7 @@ const getToolbox = async ({
|
|
|
4460
4460
|
} };
|
|
4461
4461
|
}
|
|
4462
4462
|
case i$1.THORChain: {
|
|
4463
|
-
const { getDenomWithChain: c, ThorchainToolbox: h } = await import("./
|
|
4463
|
+
const { getDenomWithChain: c, ThorchainToolbox: h } = await import("./index_4425b278.js"), S = h({ stagenet: false }), w = (P) => m == null ? void 0 : m.client.request({
|
|
4464
4464
|
chainId: THORCHAIN_MAINNET_ID,
|
|
4465
4465
|
topic: _.topic,
|
|
4466
4466
|
request: {
|
|
@@ -4486,7 +4486,7 @@ const getToolbox = async ({
|
|
|
4486
4486
|
from_address: l,
|
|
4487
4487
|
to_address: v
|
|
4488
4488
|
}
|
|
4489
|
-
}, { encodePubkey: W, makeAuthInfoBytes: Q } = await import("./
|
|
4489
|
+
}, { encodePubkey: W, makeAuthInfoBytes: Q } = await import("./index_a5ca5cc4.js").then((n2) => n2.i), { makeSignDoc: u } = await import("./index_aa773d39.js").then((n2) => n2.i), { fromBase64: d } = await import("./index_3402bab8.js").then((n2) => n2.i), { StargateClient: E } = await import("./index_f8bc80e1.js").then((n2) => n2.i), { Int53: C } = await import("./index_2dc95f2a.js").then((n2) => n2.i), b = u(
|
|
4490
4490
|
[$],
|
|
4491
4491
|
DEFAULT_THORCHAIN_FEE,
|
|
4492
4492
|
T.THORChain,
|
|
@@ -4542,7 +4542,7 @@ const getToolbox = async ({
|
|
|
4542
4542
|
memo: v,
|
|
4543
4543
|
signer: l
|
|
4544
4544
|
}
|
|
4545
|
-
}, { makeSignDoc: G } = await import("./
|
|
4545
|
+
}, { makeSignDoc: G } = await import("./index_aa773d39.js").then((n2) => n2.i), { fromBase64: $ } = await import("./index_3402bab8.js").then((n2) => n2.i), { StargateClient: W } = await import("./index_f8bc80e1.js").then((n2) => n2.i), { Int53: Q } = await import("./index_2dc95f2a.js").then((n2) => n2.i), { encodePubkey: u, makeAuthInfoBytes: d } = await import("./index_a5ca5cc4.js").then((n2) => n2.i), E = G(
|
|
4546
4546
|
[L],
|
|
4547
4547
|
DEFAULT_THORCHAIN_FEE,
|
|
4548
4548
|
T.THORChain,
|
|
@@ -4592,7 +4592,7 @@ const getToolbox = async ({
|
|
|
4592
4592
|
try {
|
|
4593
4593
|
if (!n)
|
|
4594
4594
|
throw new Error("Error while setting up walletconnect connection: Project ID not specified");
|
|
4595
|
-
const m = getRequiredNamespaces(e82.map(chainToChainId)), { WalletConnectModalSign: l } = await import("./
|
|
4595
|
+
const m = getRequiredNamespaces(e82.map(chainToChainId)), { WalletConnectModalSign: l } = await import("./index_de4af619.js").then((h) => h.i), _ = new l({
|
|
4596
4596
|
logger: DEFAULT_LOGGER,
|
|
4597
4597
|
relayUrl: DEFAULT_RELAY_URL,
|
|
4598
4598
|
projectId: n,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as aspromise, E as base64$1, F as eventemitter, H as float, I as inquire_1, J as utf8$2, L as pool_1, j as commonjsGlobal, y as getDefaultExportFromCjs } from "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
1
|
+
import { C as aspromise, E as base64$1, F as eventemitter, H as float, I as inquire_1, J as utf8$2, L as pool_1, j as commonjsGlobal, y as getDefaultExportFromCjs } from "./index_2845411a.js";
|
|
2
|
+
import "./index_0652205a.js";
|
|
3
|
+
import "./index_aa71379e.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@chakra-ui/react";
|
|
6
6
|
import "react-dom";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A, B, D, G, K, M, T, b, a, c, e, g, d, f, i, h, s } from "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
1
|
+
import { A, B, D, G, K, M, T, b, a, c, e, g, d, f, i, h, s } from "./index_2845411a.js";
|
|
2
|
+
import "./index_0652205a.js";
|
|
3
|
+
import "./index_aa71379e.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@chakra-ui/react";
|
|
6
6
|
import "react-dom";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as commonjsGlobal, l as long, m as minimal, e as build, h as helpers, a as any, b as coin, d as dist, t as tx, s as signing } from "./
|
|
2
|
-
import { b as oe$1 } from "./
|
|
3
|
-
import { b as Vn, d as Pi, a as Ri } from "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
1
|
+
import { c as commonjsGlobal, l as long, m as minimal, e as build, h as helpers, a as any, b as coin, d as dist, t as tx, s as signing } from "./index_1093b1b4.js";
|
|
2
|
+
import { b as oe$1 } from "./index_82348f63.js";
|
|
3
|
+
import { b as Vn, d as Pi, a as Ri } from "./index_942c3b80.js";
|
|
4
|
+
import "./index_df47a9c6.js";
|
|
5
|
+
import "./index_0652205a.js";
|
|
6
|
+
import "./index_aa71379e.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "@chakra-ui/react";
|
|
9
9
|
import "react-dom";
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { d as dist } from "./index_94b7968d.js";
|
|
2
|
+
import { s } from "./index_b1028d5f.js";
|
|
3
|
+
import { UserRefusedOnDevice as S$1 } from "./index_d8a5e2ef.js";
|
|
4
|
+
import "./index_3402bab8.js";
|
|
5
|
+
import "./index_2dc95f2a.js";
|
|
6
|
+
import "./index_a5ca5cc4.js";
|
|
7
|
+
import "./index_f8bc80e1.js";
|
|
8
|
+
import "./index_0652205a.js";
|
|
9
|
+
import "./index_096371b1.js";
|
|
10
|
+
import "./index_29be6ff5.js";
|
|
11
|
+
import "./index_6cd7bc1a.js";
|
|
12
|
+
import "./index_aa71379e.js";
|
|
13
|
+
import "react";
|
|
14
|
+
import "@chakra-ui/react";
|
|
15
|
+
import "react-dom";
|
|
16
|
+
import "./index_0a6e5811.js";
|
|
17
|
+
import "./index_aa773d39.js";
|
|
18
|
+
var P = globalThis && globalThis.__awaiter || function(d, t, n, f) {
|
|
19
|
+
function l(e) {
|
|
20
|
+
return e instanceof n ? e : new n(function(r) {
|
|
21
|
+
r(e);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return new (n || (n = Promise))(function(e, r) {
|
|
25
|
+
function s2(c) {
|
|
26
|
+
try {
|
|
27
|
+
o(f.next(c));
|
|
28
|
+
} catch (a) {
|
|
29
|
+
r(a);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function i(c) {
|
|
33
|
+
try {
|
|
34
|
+
o(f.throw(c));
|
|
35
|
+
} catch (a) {
|
|
36
|
+
r(a);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function o(c) {
|
|
40
|
+
c.done ? e(c.value) : l(c.value).then(s2, i);
|
|
41
|
+
}
|
|
42
|
+
o((f = f.apply(d, t || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const p = 250, h = 85, A = "CSM", E = 0, w = 2, I = 4, S = 0, x = 1, C = 2, _ = 36864, L = 27014;
|
|
46
|
+
class M {
|
|
47
|
+
constructor(t, n = A) {
|
|
48
|
+
this.transport = t, t.decorateAppAPIMethods(this, ["getAddress", "sign", "getAppConfiguration"], n);
|
|
49
|
+
}
|
|
50
|
+
// FIXME: understand what is going on with the return type here
|
|
51
|
+
getAppConfiguration() {
|
|
52
|
+
return this.transport.send(h, E, 0, 0).then((t) => ({
|
|
53
|
+
test_mode: t[0] !== 0,
|
|
54
|
+
version: "" + t[1] + "." + t[2] + "." + t[3],
|
|
55
|
+
device_locked: t[4] === 1,
|
|
56
|
+
major: t[1]
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
serializePath(t) {
|
|
60
|
+
const n = dist.Buffer.alloc(20);
|
|
61
|
+
return n.writeUInt32LE((2147483648 | t[0]) >>> 0, 0), n.writeUInt32LE((2147483648 | t[1]) >>> 0, 4), n.writeUInt32LE((2147483648 | t[2]) >>> 0, 8), n.writeUInt32LE(t[3], 12), n.writeUInt32LE(t[4], 16), n;
|
|
62
|
+
}
|
|
63
|
+
serializeHRP(t) {
|
|
64
|
+
if (t == null || t.length === 0 || t.length > 83)
|
|
65
|
+
throw new Error("Invalid HRP");
|
|
66
|
+
const n = dist.Buffer.alloc(1 + t.length);
|
|
67
|
+
return n.writeUInt8(t.length, 0), n.write(t, 1), n;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* get Cosmos address for a given BIP 32 path.
|
|
71
|
+
* @param path a path in BIP 32 format
|
|
72
|
+
* @param hrp usually cosmos
|
|
73
|
+
* @option boolDisplay optionally enable or not the display
|
|
74
|
+
* @return an object with a publicKey, address and (optionally) chainCode
|
|
75
|
+
* @example
|
|
76
|
+
* cosmos.getAddress("44'/60'/0'/0/0", "cosmos").then(o => o.address)
|
|
77
|
+
*/
|
|
78
|
+
getAddress(t, n, f) {
|
|
79
|
+
const l = s.fromString(t).toPathArray(), e = this.serializePath(l), r = dist.Buffer.concat([this.serializeHRP(n), e]);
|
|
80
|
+
return this.transport.send(h, I, f ? 1 : 0, 0, r, [_]).then((s2) => {
|
|
81
|
+
const i = dist.Buffer.from(s2.slice(33, -2)).toString(), o = dist.Buffer.from(s2.slice(0, 33)).toString("hex");
|
|
82
|
+
return {
|
|
83
|
+
address: i,
|
|
84
|
+
publicKey: o
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
foreach(t, n) {
|
|
89
|
+
function f(l, e, r) {
|
|
90
|
+
return l >= e.length ? r : n(e[l], l).then(function(s2) {
|
|
91
|
+
return r.push(s2), f(l + 1, e, r);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return Promise.resolve().then(() => f(0, t, []));
|
|
95
|
+
}
|
|
96
|
+
sign(t, n) {
|
|
97
|
+
return P(this, void 0, void 0, function* () {
|
|
98
|
+
const f = s.fromString(t).toPathArray(), l = this.serializePath(f), e = [];
|
|
99
|
+
e.push(l);
|
|
100
|
+
const r = dist.Buffer.from(n);
|
|
101
|
+
for (let i = 0; i < r.length; i += p) {
|
|
102
|
+
let o = i + p;
|
|
103
|
+
i > r.length && (o = r.length), e.push(r.slice(i, o));
|
|
104
|
+
}
|
|
105
|
+
let s$1 = {};
|
|
106
|
+
return this.foreach(e, (i, o) => this.transport.send(h, w, o === 0 ? S : o + 1 === e.length ? C : x, 0, i, [_, L]).then((c) => s$1 = c)).then(() => {
|
|
107
|
+
const i = s$1.slice(-2), o = i[0] * 256 + i[1];
|
|
108
|
+
let c = null;
|
|
109
|
+
if (s$1.length > 2 && (c = s$1.slice(0, s$1.length - 2)), o === 27014)
|
|
110
|
+
throw new S$1();
|
|
111
|
+
return {
|
|
112
|
+
signature: c,
|
|
113
|
+
return_code: o
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
M as default
|
|
121
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { w as requireBrowser$8, q as dist, x as requireElliptic, y as getDefaultExportFromCjs, z as bnExports } from "./
|
|
2
|
-
import "./
|
|
1
|
+
import { w as requireBrowser$8, q as dist, x as requireElliptic, y as getDefaultExportFromCjs, z as bnExports } from "./index_2845411a.js";
|
|
2
|
+
import "./index_aa71379e.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@chakra-ui/react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import "./
|
|
6
|
+
import "./index_0652205a.js";
|
|
7
7
|
function F(e, r) {
|
|
8
8
|
for (var t = 0; t < r.length; t++) {
|
|
9
9
|
const o = r[t];
|