@xyo-network/react-chain-network 1.0.13 → 1.1.1
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/browser/index.mjs +277 -97
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/menu/Avatar.d.ts +8 -0
- package/dist/types/components/menu/Avatar.d.ts.map +1 -0
- package/dist/types/components/menu/index.d.ts +1 -0
- package/dist/types/components/menu/index.d.ts.map +1 -1
- package/dist/types/context/network/Provider.d.ts.map +1 -1
- package/dist/types/helpers/Networks.d.ts +1 -0
- package/dist/types/helpers/Networks.d.ts.map +1 -1
- package/dist/types/images/icons/index.d.ts +2 -0
- package/dist/types/images/icons/index.d.ts.map +1 -1
- package/dist/types/images/icons/mainnet/index.d.ts +2 -0
- package/dist/types/images/icons/mainnet/index.d.ts.map +1 -0
- package/dist/types/images/icons/mainnet/xl1-mainnet.d.ts +5 -0
- package/dist/types/images/icons/mainnet/xl1-mainnet.d.ts.map +1 -0
- package/dist/types/images/icons/testnet/index.d.ts +2 -0
- package/dist/types/images/icons/testnet/index.d.ts.map +1 -0
- package/dist/types/images/icons/testnet/xl1-testnet.d.ts +5 -0
- package/dist/types/images/icons/testnet/xl1-testnet.d.ts.map +1 -0
- package/dist/types/models/Bootstrap.d.ts.map +1 -1
- package/dist/types/provider/NetworkProvider.d.ts +13 -5
- package/dist/types/provider/NetworkProvider.d.ts.map +1 -1
- package/package.json +37 -42
- package/src/components/menu/Avatar.tsx +34 -0
- package/src/components/menu/MenuItem.tsx +2 -2
- package/src/components/menu/index.ts +1 -0
- package/src/context/network/Provider.tsx +5 -2
- package/src/helpers/Networks.ts +10 -6
- package/src/helpers/initNetworkNode.ts +1 -1
- package/src/images/icons/index.ts +2 -0
- package/src/images/icons/mainnet/index.ts +1 -0
- package/src/images/icons/mainnet/xl1-mainnet.svg +1 -0
- package/src/images/icons/mainnet/xl1-mainnet.tsx +33 -0
- package/src/images/icons/testnet/index.ts +1 -0
- package/src/images/icons/testnet/xl1-testnet.svg +1 -0
- package/src/images/icons/testnet/xl1-testnet.tsx +33 -0
- package/src/provider/NetworkProvider.ts +43 -6
package/dist/browser/index.mjs
CHANGED
|
@@ -1,45 +1,9 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
-
// src/components/menu/
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
var NetworkIcon = /* @__PURE__ */ __name(({ icon, ...props }) => {
|
|
8
|
-
return /* @__PURE__ */ React.createElement(Icon, {
|
|
9
|
-
sx: {
|
|
10
|
-
display: "inline-flex",
|
|
11
|
-
alignItems: "center",
|
|
12
|
-
justifyContent: "center"
|
|
13
|
-
},
|
|
14
|
-
ref: /* @__PURE__ */ __name((ref) => {
|
|
15
|
-
if (ref && icon) {
|
|
16
|
-
ref.innerHTML = icon;
|
|
17
|
-
}
|
|
18
|
-
}, "ref"),
|
|
19
|
-
...props
|
|
20
|
-
});
|
|
21
|
-
}, "NetworkIcon");
|
|
22
|
-
|
|
23
|
-
// src/components/menu/MenuItem.tsx
|
|
24
|
-
import { ListItemText } from "@mui/material";
|
|
25
|
-
import { ActiveMenuItem } from "@xyo-network/react-chain-shared";
|
|
26
|
-
import React2 from "react";
|
|
27
|
-
var NetworkMenuItem = /* @__PURE__ */ __name(({ active, network, onClick, updateActiveNetwork, ...props }) => {
|
|
28
|
-
const handleClick = /* @__PURE__ */ __name((event) => {
|
|
29
|
-
if (network === void 0) throw new Error("Network is undefined");
|
|
30
|
-
updateActiveNetwork?.(network.id);
|
|
31
|
-
onClick?.(event);
|
|
32
|
-
}, "handleClick");
|
|
33
|
-
return /* @__PURE__ */ React2.createElement(ActiveMenuItem, {
|
|
34
|
-
title: network?.name,
|
|
35
|
-
disableRipple: true,
|
|
36
|
-
onClick: handleClick,
|
|
37
|
-
active,
|
|
38
|
-
...props
|
|
39
|
-
}, /* @__PURE__ */ React2.createElement(NetworkIcon, {
|
|
40
|
-
icon: network?.icon
|
|
41
|
-
}), /* @__PURE__ */ React2.createElement(ListItemText, null, network?.name));
|
|
42
|
-
}, "NetworkMenuItem");
|
|
4
|
+
// src/components/menu/Avatar.tsx
|
|
5
|
+
import { Avatar } from "@mui/material";
|
|
6
|
+
import React6 from "react";
|
|
43
7
|
|
|
44
8
|
// src/context/network/context.ts
|
|
45
9
|
import { createContextEx } from "@xylabs/react-shared";
|
|
@@ -48,7 +12,7 @@ var ChainNetworkContext = createContextEx();
|
|
|
48
12
|
// src/context/network/Provider.tsx
|
|
49
13
|
import { ErrorRender } from "@xylabs/react-error";
|
|
50
14
|
import { usePromise } from "@xylabs/react-promise";
|
|
51
|
-
import
|
|
15
|
+
import React4, { useCallback, useMemo, useState } from "react";
|
|
52
16
|
|
|
53
17
|
// src/helpers/getBridgedNodes.ts
|
|
54
18
|
var bridgedNodeMap = /* @__PURE__ */ new Map();
|
|
@@ -57,7 +21,7 @@ var getBridgedNodes = /* @__PURE__ */ __name(() => {
|
|
|
57
21
|
}, "getBridgedNodes");
|
|
58
22
|
|
|
59
23
|
// src/helpers/initNetworkNode.ts
|
|
60
|
-
import { initBridge } from "@xyo-network/chain-
|
|
24
|
+
import { initBridge } from "@xyo-network/chain-orchestration";
|
|
61
25
|
|
|
62
26
|
// src/helpers/getNetworkNode.ts
|
|
63
27
|
import { HDWallet } from "@xyo-network/account";
|
|
@@ -106,11 +70,11 @@ var initNetworkNode = /* @__PURE__ */ __name(async (activeNetwork) => {
|
|
|
106
70
|
|
|
107
71
|
// src/images/icons/LocalNetwork.tsx
|
|
108
72
|
import { createSvgIcon } from "@mui/material";
|
|
109
|
-
import
|
|
110
|
-
var LocalNetworkIcon = createSvgIcon(/* @__PURE__ */
|
|
73
|
+
import React from "react";
|
|
74
|
+
var LocalNetworkIcon = createSvgIcon(/* @__PURE__ */ React.createElement("svg", {
|
|
111
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
112
76
|
viewBox: "0 -960 960 960"
|
|
113
|
-
}, /* @__PURE__ */
|
|
77
|
+
}, /* @__PURE__ */ React.createElement("path", {
|
|
114
78
|
fill: "currentColor",
|
|
115
79
|
d: "M40-120v-80h880v80H40Zm120-120q-33 0-56.5-23.5T80-320v-440q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v440q0 33-23.5 56.5T800-240H160Zm0-80h640v-440H160v440Zm0 0v-440 440Z"
|
|
116
80
|
})), "LocalNetworkIcon");
|
|
@@ -120,52 +84,172 @@ var LocalNetworkIconString = `
|
|
|
120
84
|
</svg>
|
|
121
85
|
`;
|
|
122
86
|
|
|
123
|
-
// src/images/icons/
|
|
87
|
+
// src/images/icons/mainnet/xl1-mainnet.tsx
|
|
124
88
|
import { createSvgIcon as createSvgIcon2 } from "@mui/material";
|
|
125
|
-
import
|
|
126
|
-
var
|
|
89
|
+
import React2 from "react";
|
|
90
|
+
var xl1Mainnet = createSvgIcon2(/* @__PURE__ */ React2.createElement("svg", {
|
|
91
|
+
id: "Layer_1",
|
|
127
92
|
xmlns: "http://www.w3.org/2000/svg",
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
93
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
94
|
+
viewBox: "0 0 256 256"
|
|
95
|
+
}, /* @__PURE__ */ React2.createElement("defs", null, /* @__PURE__ */ React2.createElement("linearGradient", {
|
|
96
|
+
id: "mainnet-linear-gradient",
|
|
97
|
+
x1: "14.52",
|
|
98
|
+
y1: "172.25",
|
|
99
|
+
x2: "172.25",
|
|
100
|
+
y2: "14.52",
|
|
101
|
+
gradientUnits: "userSpaceOnUse"
|
|
102
|
+
}, /* @__PURE__ */ React2.createElement("stop", {
|
|
103
|
+
offset: "0",
|
|
104
|
+
stopColor: "#572aff"
|
|
105
|
+
}), /* @__PURE__ */ React2.createElement("stop", {
|
|
106
|
+
offset: "1",
|
|
107
|
+
stopColor: "#7c82d8"
|
|
108
|
+
})), /* @__PURE__ */ React2.createElement("linearGradient", {
|
|
109
|
+
id: "mainnet-linear-gradient-2",
|
|
110
|
+
x1: "73.92",
|
|
111
|
+
y1: "231.66",
|
|
112
|
+
x2: "231.66",
|
|
113
|
+
y2: "73.92",
|
|
114
|
+
xlinkHref: "#mainnet-linear-gradient"
|
|
115
|
+
}), /* @__PURE__ */ React2.createElement("linearGradient", {
|
|
116
|
+
id: "mainnet-linear-gradient-3",
|
|
117
|
+
x1: "-7.8",
|
|
118
|
+
y1: "149.93",
|
|
119
|
+
x2: "149.93",
|
|
120
|
+
y2: "-7.8",
|
|
121
|
+
xlinkHref: "#mainnet-linear-gradient"
|
|
122
|
+
}), /* @__PURE__ */ React2.createElement("linearGradient", {
|
|
123
|
+
id: "mainnet-linear-gradient-4",
|
|
124
|
+
x1: "59.4",
|
|
125
|
+
y1: "217.13",
|
|
126
|
+
x2: "217.13",
|
|
127
|
+
y2: "59.4",
|
|
128
|
+
xlinkHref: "#mainnet-linear-gradient"
|
|
129
|
+
}), /* @__PURE__ */ React2.createElement("linearGradient", {
|
|
130
|
+
id: "mainnet-linear-gradient-5",
|
|
131
|
+
x1: "159.35",
|
|
132
|
+
y1: "79.63",
|
|
133
|
+
x2: "96.57",
|
|
134
|
+
y2: "176.29",
|
|
135
|
+
xlinkHref: "#mainnet-linear-gradient"
|
|
136
|
+
})), /* @__PURE__ */ React2.createElement("path", {
|
|
137
|
+
fill: "none",
|
|
138
|
+
d: "M186.66,85.35c-5.97-8.18-13.6-15.07-22.4-20.17-10.68-6.19-23.06-9.75-36.26-9.75s-25.58,3.56-36.26,9.75c-8.8,5.1-16.43,11.99-22.4,20.17-4.46,6.12-7.99,12.96-10.38,20.32-2.07,6.38-3.27,13.15-3.48,20.17-.02.72-.05,1.43-.05,2.16,0,40.01,32.56,72.57,72.57,72.57s72.57-32.56,72.57-72.57c0-.72-.03-1.44-.05-2.16-.21-7.02-1.41-13.79-3.48-20.17-2.38-7.35-5.91-14.19-10.38-20.32ZM150.31,139.08c6.47,4.14,14.84,5.55,19.59,12.09,9.49,13.07-4.75,28.95-18.78,19.89-8.36-5.4-9.7-16.12-15.65-23.25-5.39-6.45-11.23-5.21-15.78,1.25-5.14,7.31-7.11,17.48-15.28,22.33-15.49,9.19-29.67-10.89-15.62-23.03,6.67-5.76,24.82-9.57,24.99-20.21.16-10.07-16.21-14.45-22.86-18.78-8.83-5.74-11.34-19.34-1.26-25.16,9.9-5.72,19.09,2.39,23.68,10.7,3.44,6.24,8.65,21.97,18.55,16.52,7.29-4.01,9.94-19.23,18.23-25.49,13.22-9.98,28.82,3.35,20.39,17.8-4.93,8.45-17.06,9.5-24.04,16.25-7.51,7.26-3.78,14.21,3.83,19.08Z"
|
|
139
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
140
|
+
fill: "url(#mainnet-linear-gradient)",
|
|
141
|
+
d: "M128,55.43c13.2,0,25.58,3.56,36.26,9.75h45.83l-15.93-27.59c-4.32-7.48-12.3-12.09-20.94-12.09h-90.43c-8.64,0-16.62,4.61-20.94,12.09l-15.93,27.59h45.83c10.68-6.19,23.06-9.75,36.26-9.75Z"
|
|
142
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
143
|
+
fill: "url(#mainnet-linear-gradient-2)",
|
|
144
|
+
d: "M197.04,105.67h36.43l-11.73-20.32h-35.07c4.46,6.12,7.99,12.96,10.38,20.32Z"
|
|
145
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
146
|
+
fill: "url(#mainnet-linear-gradient-4)",
|
|
147
|
+
d: "M69.34,85.35h-35.07l-11.73,20.32h36.43c2.38-7.35,5.91-14.19,10.38-20.32Z"
|
|
148
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
149
|
+
fill: "fill:url(#mainnet-linear-gradient-4)",
|
|
150
|
+
d: "M200.51,125.84c.02.72.05,1.43.05,2.16,0,40.01-32.56,72.57-72.57,72.57s-72.57-32.56-72.57-72.57c0-.72.03-1.44.05-2.16H13.49c-.44,4.88.6,9.86,3.13,14.25l45.22,78.32c4.32,7.48,12.3,12.09,20.94,12.09h90.43c8.64,0,16.62-4.61,20.94-12.09l45.22-78.32c2.53-4.39,3.57-9.37,3.13-14.25h-41.99Z"
|
|
151
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
152
|
+
className: "mainnet-cls-2",
|
|
153
|
+
d: "M146.47,119.99c6.99-6.76,19.12-7.8,24.04-16.25,8.42-14.45-7.18-27.78-20.39-17.8-8.29,6.26-10.94,21.47-18.23,25.49-9.91,5.45-15.11-10.29-18.55-16.52-4.59-8.31-13.78-16.42-23.68-10.7-10.09,5.83-7.57,19.42,1.26,25.16,6.66,4.33,23.02,8.71,22.86,18.78-.17,10.64-18.33,14.45-24.99,20.21-14.05,12.14.13,32.23,15.62,23.03,8.17-4.85,10.14-15.02,15.28-22.33,4.55-6.47,10.4-7.7,15.78-1.25,5.95,7.13,7.29,17.85,15.65,23.25,14.02,9.06,28.26-6.82,18.78-19.89-4.75-6.54-13.12-7.95-19.59-12.09-7.61-4.87-11.35-11.82-3.83-19.08Z"
|
|
154
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
155
|
+
fill: "url(#mainnet-linear-gradient-5)",
|
|
156
|
+
d: "M186.66,85.35h35.07l-11.65-20.17h-45.83c8.8,5.1,16.43,11.99,22.4,20.17Z"
|
|
157
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
158
|
+
fill: "url(#mainnet-linear-gradient-5)",
|
|
159
|
+
d: "M91.74,65.18h-45.83l-11.65,20.17h35.07c5.97-8.18,13.6-15.07,22.4-20.17Z"
|
|
160
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
161
|
+
fill: "url(#mainnet-linear-gradient-5)",
|
|
162
|
+
d: "M58.96,105.67H22.53l-5.91,10.24c-1.79,3.1-2.82,6.49-3.13,9.93h41.99c.21-7.02,1.41-13.79,3.48-20.17Z"
|
|
163
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
164
|
+
fill: "url(#mainnet-linear-gradient-5)",
|
|
165
|
+
d: "M200.51,125.84h41.99c-.31-3.44-1.34-6.84-3.13-9.93l-5.91-10.24h-36.43c2.07,6.38,3.27,13.15,3.48,20.17Z"
|
|
166
|
+
})), "xl1Mainnet");
|
|
167
|
+
var xl1MainnetString = `
|
|
168
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 256 256"><defs><style>.mainnet-cls-1{fill:none;}.mainnet-cls-2{fill:url(#mainnet-linear-gradient-5);}.mainnet-cls-3{fill:url(#mainnet-linear-gradient-4);}.mainnet-cls-4{fill:url(#mainnet-linear-gradient-3);}.mainnet-cls-5{fill:url(#mainnet-linear-gradient-2);}.mainnet-cls-6{fill:url(#mainnet-linear-gradient);}.mainnet-cls-7{fill:#fff;}</style><linearGradient id="mainnet-linear-gradient" x1="14.52" y1="172.25" x2="172.25" y2="14.52" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#572aff"/><stop offset="1" stop-color="#7c82d8"/></linearGradient><linearGradient id="mainnet-linear-gradient-2" x1="73.92" y1="231.66" x2="231.66" y2="73.92" xlink:href="#mainnet-linear-gradient"/><linearGradient id="mainnet-linear-gradient-3" x1="-7.8" y1="149.93" x2="149.93" y2="-7.8" xlink:href="#mainnet-linear-gradient"/><linearGradient id="mainnet-linear-gradient-4" x1="59.4" y1="217.13" x2="217.13" y2="59.4" xlink:href="#mainnet-linear-gradient"/><linearGradient id="mainnet-linear-gradient-5" x1="159.35" y1="79.63" x2="96.57" y2="176.29" xlink:href="#mainnet-linear-gradient"/></defs><path class="mainnet-cls-1" d="M186.66,85.35c-5.97-8.18-13.6-15.07-22.4-20.17-10.68-6.19-23.06-9.75-36.26-9.75s-25.58,3.56-36.26,9.75c-8.8,5.1-16.43,11.99-22.4,20.17-4.46,6.12-7.99,12.96-10.38,20.32-2.07,6.38-3.27,13.15-3.48,20.17-.02.72-.05,1.43-.05,2.16,0,40.01,32.56,72.57,72.57,72.57s72.57-32.56,72.57-72.57c0-.72-.03-1.44-.05-2.16-.21-7.02-1.41-13.79-3.48-20.17-2.38-7.35-5.91-14.19-10.38-20.32ZM150.31,139.08c6.47,4.14,14.84,5.55,19.59,12.09,9.49,13.07-4.75,28.95-18.78,19.89-8.36-5.4-9.7-16.12-15.65-23.25-5.39-6.45-11.23-5.21-15.78,1.25-5.14,7.31-7.11,17.48-15.28,22.33-15.49,9.19-29.67-10.89-15.62-23.03,6.67-5.76,24.82-9.57,24.99-20.21.16-10.07-16.21-14.45-22.86-18.78-8.83-5.74-11.34-19.34-1.26-25.16,9.9-5.72,19.09,2.39,23.68,10.7,3.44,6.24,8.65,21.97,18.55,16.52,7.29-4.01,9.94-19.23,18.23-25.49,13.22-9.98,28.82,3.35,20.39,17.8-4.93,8.45-17.06,9.5-24.04,16.25-7.51,7.26-3.78,14.21,3.83,19.08Z"/><path class="mainnet-cls-6" d="M128,55.43c13.2,0,25.58,3.56,36.26,9.75h45.83l-15.93-27.59c-4.32-7.48-12.3-12.09-20.94-12.09h-90.43c-8.64,0-16.62,4.61-20.94,12.09l-15.93,27.59h45.83c10.68-6.19,23.06-9.75,36.26-9.75Z"/><path class="mainnet-cls-5" d="M197.04,105.67h36.43l-11.73-20.32h-35.07c4.46,6.12,7.99,12.96,10.38,20.32Z"/><path class="mainnet-cls-4" d="M69.34,85.35h-35.07l-11.73,20.32h36.43c2.38-7.35,5.91-14.19,10.38-20.32Z"/><path class="mainnet-cls-3" d="M200.51,125.84c.02.72.05,1.43.05,2.16,0,40.01-32.56,72.57-72.57,72.57s-72.57-32.56-72.57-72.57c0-.72.03-1.44.05-2.16H13.49c-.44,4.88.6,9.86,3.13,14.25l45.22,78.32c4.32,7.48,12.3,12.09,20.94,12.09h90.43c8.64,0,16.62-4.61,20.94-12.09l45.22-78.32c2.53-4.39,3.57-9.37,3.13-14.25h-41.99Z"/><path class="mainnet-cls-2" d="M146.47,119.99c6.99-6.76,19.12-7.8,24.04-16.25,8.42-14.45-7.18-27.78-20.39-17.8-8.29,6.26-10.94,21.47-18.23,25.49-9.91,5.45-15.11-10.29-18.55-16.52-4.59-8.31-13.78-16.42-23.68-10.7-10.09,5.83-7.57,19.42,1.26,25.16,6.66,4.33,23.02,8.71,22.86,18.78-.17,10.64-18.33,14.45-24.99,20.21-14.05,12.14.13,32.23,15.62,23.03,8.17-4.85,10.14-15.02,15.28-22.33,4.55-6.47,10.4-7.7,15.78-1.25,5.95,7.13,7.29,17.85,15.65,23.25,14.02,9.06,28.26-6.82,18.78-19.89-4.75-6.54-13.12-7.95-19.59-12.09-7.61-4.87-11.35-11.82-3.83-19.08Z"/><path class="mainnet-cls-7" d="M186.66,85.35h35.07l-11.65-20.17h-45.83c8.8,5.1,16.43,11.99,22.4,20.17Z"/><path class="mainnet-cls-7" d="M91.74,65.18h-45.83l-11.65,20.17h35.07c5.97-8.18,13.6-15.07,22.4-20.17Z"/><path class="mainnet-cls-7" d="M58.96,105.67H22.53l-5.91,10.24c-1.79,3.1-2.82,6.49-3.13,9.93h41.99c.21-7.02,1.41-13.79,3.48-20.17Z"/><path class="mainnet-cls-7" d="M200.51,125.84h41.99c-.31-3.44-1.34-6.84-3.13-9.93l-5.91-10.24h-36.43c2.07,6.38,3.27,13.15,3.48,20.17Z"/></svg>
|
|
169
|
+
`;
|
|
170
|
+
|
|
171
|
+
// src/images/icons/testnet/xl1-testnet.tsx
|
|
172
|
+
import { createSvgIcon as createSvgIcon3 } from "@mui/material";
|
|
173
|
+
import React3 from "react";
|
|
174
|
+
var xl1Testnet = createSvgIcon3(/* @__PURE__ */ React3.createElement("svg", {
|
|
175
|
+
id: "Layer_1",
|
|
176
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
177
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
178
|
+
viewBox: "0 0 256 256"
|
|
179
|
+
}, /* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("linearGradient", {
|
|
180
|
+
id: "testnet-linear-gradient",
|
|
181
|
+
x1: "14.52",
|
|
182
|
+
y1: "172.25",
|
|
183
|
+
x2: "172.25",
|
|
184
|
+
y2: "14.52",
|
|
185
|
+
gradientUnits: "userSpaceOnUse"
|
|
186
|
+
}, /* @__PURE__ */ React3.createElement("stop", {
|
|
187
|
+
offset: "0",
|
|
188
|
+
stopColor: "#f74504"
|
|
189
|
+
}), /* @__PURE__ */ React3.createElement("stop", {
|
|
190
|
+
offset: "1",
|
|
191
|
+
stopColor: "#f79e04"
|
|
192
|
+
})), /* @__PURE__ */ React3.createElement("linearGradient", {
|
|
193
|
+
id: "testnet-linear-gradient-2",
|
|
194
|
+
x1: "73.92",
|
|
195
|
+
y1: "231.66",
|
|
196
|
+
x2: "231.66",
|
|
197
|
+
y2: "73.92",
|
|
198
|
+
xlinkHref: "#testnet-linear-gradient"
|
|
199
|
+
}), /* @__PURE__ */ React3.createElement("linearGradient", {
|
|
200
|
+
id: "testnet-linear-gradient-3",
|
|
201
|
+
x1: "-7.8",
|
|
202
|
+
y1: "149.93",
|
|
203
|
+
x2: "149.93",
|
|
204
|
+
y2: "-7.8",
|
|
205
|
+
xlinkHref: "#testnet-linear-gradient"
|
|
206
|
+
}), /* @__PURE__ */ React3.createElement("linearGradient", {
|
|
207
|
+
id: "testnet-linear-gradient-4",
|
|
208
|
+
x1: "59.4",
|
|
209
|
+
y1: "217.13",
|
|
210
|
+
x2: "217.13",
|
|
211
|
+
y2: "59.4",
|
|
212
|
+
xlinkHref: "#testnet-linear-gradient"
|
|
213
|
+
}), /* @__PURE__ */ React3.createElement("linearGradient", {
|
|
214
|
+
id: "testnet-linear-gradient-5",
|
|
215
|
+
x1: "159.35",
|
|
216
|
+
y1: "79.63",
|
|
217
|
+
x2: "96.57",
|
|
218
|
+
y2: "176.29",
|
|
219
|
+
xlinkHref: "#testnet-linear-gradient"
|
|
220
|
+
})), /* @__PURE__ */ React3.createElement("path", {
|
|
221
|
+
fill: "none",
|
|
222
|
+
d: "M186.66,85.35c-5.97-8.18-13.6-15.07-22.4-20.17-10.68-6.19-23.06-9.75-36.26-9.75s-25.58,3.56-36.26,9.75c-8.8,5.1-16.43,11.99-22.4,20.17-4.46,6.12-7.99,12.96-10.38,20.32-2.07,6.38-3.27,13.15-3.48,20.17-.02.72-.05,1.43-.05,2.16,0,40.01,32.56,72.57,72.57,72.57s72.57-32.56,72.57-72.57c0-.72-.03-1.44-.05-2.16-.21-7.02-1.41-13.79-3.48-20.17-2.38-7.35-5.91-14.19-10.38-20.32ZM150.31,139.08c6.47,4.14,14.84,5.55,19.59,12.09,9.49,13.07-4.75,28.95-18.78,19.89-8.36-5.4-9.7-16.12-15.65-23.25-5.39-6.45-11.23-5.21-15.78,1.25-5.14,7.31-7.11,17.48-15.28,22.33-15.49,9.19-29.67-10.89-15.62-23.03,6.67-5.76,24.82-9.57,24.99-20.21.16-10.07-16.21-14.45-22.86-18.78-8.83-5.74-11.34-19.34-1.26-25.16,9.9-5.72,19.09,2.39,23.68,10.7,3.44,6.24,8.65,21.97,18.55,16.52,7.29-4.01,9.94-19.23,18.23-25.49,13.22-9.98,28.82,3.35,20.39,17.8-4.93,8.45-17.06,9.5-24.04,16.25-7.51,7.26-3.78,14.21,3.83,19.08Z"
|
|
223
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
224
|
+
fill: "url(#testnet-linear-gradient)",
|
|
225
|
+
d: "M128,55.43c13.2,0,25.58,3.56,36.26,9.75h45.83l-15.93-27.59c-4.32-7.48-12.3-12.09-20.94-12.09h-90.43c-8.64,0-16.62,4.61-20.94,12.09l-15.93,27.59h45.83c10.68-6.19,23.06-9.75,36.26-9.75Z"
|
|
226
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
227
|
+
fill: "url(#testnet-linear-gradient-2",
|
|
228
|
+
d: "M197.04,105.67h36.43l-11.73-20.32h-35.07c4.46,6.12,7.99,12.96,10.38,20.32Z"
|
|
229
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
230
|
+
fill: "url(#testnet-linear-gradient-3",
|
|
231
|
+
d: "M69.34,85.35h-35.07l-11.73,20.32h36.43c2.38-7.35,5.91-14.19,10.38-20.32Z"
|
|
232
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
233
|
+
fill: "url(#testnet-linear-gradient-4",
|
|
234
|
+
d: "M200.51,125.84c.02.72.05,1.43.05,2.16,0,40.01-32.56,72.57-72.57,72.57s-72.57-32.56-72.57-72.57c0-.72.03-1.44.05-2.16H13.49c-.44,4.88.6,9.86,3.13,14.25l45.22,78.32c4.32,7.48,12.3,12.09,20.94,12.09h90.43c8.64,0,16.62-4.61,20.94-12.09l45.22-78.32c2.53-4.39,3.57-9.37,3.13-14.25h-41.99Z"
|
|
235
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
236
|
+
fill: "url(#testnet-linear-gradient-5",
|
|
237
|
+
d: "M146.47,119.99c6.99-6.76,19.12-7.8,24.04-16.25,8.42-14.45-7.18-27.78-20.39-17.8-8.29,6.26-10.94,21.47-18.23,25.49-9.91,5.45-15.11-10.29-18.55-16.52-4.59-8.31-13.78-16.42-23.68-10.7-10.09,5.83-7.57,19.42,1.26,25.16,6.66,4.33,23.02,8.71,22.86,18.78-.17,10.64-18.33,14.45-24.99,20.21-14.05,12.14.13,32.23,15.62,23.03,8.17-4.85,10.14-15.02,15.28-22.33,4.55-6.47,10.4-7.7,15.78-1.25,5.95,7.13,7.29,17.85,15.65,23.25,14.02,9.06,28.26-6.82,18.78-19.89-4.75-6.54-13.12-7.95-19.59-12.09-7.61-4.87-11.35-11.82-3.83-19.08Z"
|
|
238
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
239
|
+
fill: "#fff",
|
|
240
|
+
d: "M186.66,85.35h35.07l-11.65-20.17h-45.83c8.8,5.1,16.43,11.99,22.4,20.17Z"
|
|
241
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
242
|
+
fill: "#fff",
|
|
243
|
+
d: "M91.74,65.18h-45.83l-11.65,20.17h35.07c5.97-8.18,13.6-15.07,22.4-20.17Z"
|
|
244
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
245
|
+
fill: "#fff",
|
|
246
|
+
d: "M58.96,105.67H22.53l-5.91,10.24c-1.79,3.1-2.82,6.49-3.13,9.93h41.99c.21-7.02,1.41-13.79,3.48-20.17Z"
|
|
247
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
248
|
+
fill: "#fff",
|
|
249
|
+
d: "M200.51,125.84h41.99c-.31-3.44-1.34-6.84-3.13-9.93l-5.91-10.24h-36.43c2.07,6.38,3.27,13.15,3.48,20.17Z"
|
|
250
|
+
})), "xl1Testnet");
|
|
251
|
+
var xl1TestnetString = `
|
|
252
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 256 256"><defs><style>.testnet-cls-1{fill:none;}.testnet-cls-2{fill:url(#testnet-linear-gradient-5);}.testnet-cls-3{fill:url(#testnet-linear-gradient-4);}.testnet-cls-4{fill:url(#testnet-linear-gradient-3);}.testnet-cls-5{fill:url(#testnet-linear-gradient-2);}.testnet-cls-6{fill:url(#testnet-linear-gradient);}.testnet-cls-7{fill:#fff;}</style><linearGradient id="testnet-linear-gradient" x1="14.52" y1="172.25" x2="172.25" y2="14.52" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f74504"/><stop offset="1" stop-color="#f79e04"/></linearGradient><linearGradient id="testnet-linear-gradient-2" x1="73.92" y1="231.66" x2="231.66" y2="73.92" xlink:href="#testnet-linear-gradient"/><linearGradient id="testnet-linear-gradient-3" x1="-7.8" y1="149.93" x2="149.93" y2="-7.8" xlink:href="#testnet-linear-gradient"/><linearGradient id="testnet-linear-gradient-4" x1="59.4" y1="217.13" x2="217.13" y2="59.4" xlink:href="#testnet-linear-gradient"/><linearGradient id="testnet-linear-gradient-5" x1="159.35" y1="79.63" x2="96.57" y2="176.29" xlink:href="#testnet-linear-gradient"/></defs><path class="testnet-cls-1" d="M186.66,85.35c-5.97-8.18-13.6-15.07-22.4-20.17-10.68-6.19-23.06-9.75-36.26-9.75s-25.58,3.56-36.26,9.75c-8.8,5.1-16.43,11.99-22.4,20.17-4.46,6.12-7.99,12.96-10.38,20.32-2.07,6.38-3.27,13.15-3.48,20.17-.02.72-.05,1.43-.05,2.16,0,40.01,32.56,72.57,72.57,72.57s72.57-32.56,72.57-72.57c0-.72-.03-1.44-.05-2.16-.21-7.02-1.41-13.79-3.48-20.17-2.38-7.35-5.91-14.19-10.38-20.32ZM150.31,139.08c6.47,4.14,14.84,5.55,19.59,12.09,9.49,13.07-4.75,28.95-18.78,19.89-8.36-5.4-9.7-16.12-15.65-23.25-5.39-6.45-11.23-5.21-15.78,1.25-5.14,7.31-7.11,17.48-15.28,22.33-15.49,9.19-29.67-10.89-15.62-23.03,6.67-5.76,24.82-9.57,24.99-20.21.16-10.07-16.21-14.45-22.86-18.78-8.83-5.74-11.34-19.34-1.26-25.16,9.9-5.72,19.09,2.39,23.68,10.7,3.44,6.24,8.65,21.97,18.55,16.52,7.29-4.01,9.94-19.23,18.23-25.49,13.22-9.98,28.82,3.35,20.39,17.8-4.93,8.45-17.06,9.5-24.04,16.25-7.51,7.26-3.78,14.21,3.83,19.08Z"/><path class="testnet-cls-6" d="M128,55.43c13.2,0,25.58,3.56,36.26,9.75h45.83l-15.93-27.59c-4.32-7.48-12.3-12.09-20.94-12.09h-90.43c-8.64,0-16.62,4.61-20.94,12.09l-15.93,27.59h45.83c10.68-6.19,23.06-9.75,36.26-9.75Z"/><path class="testnet-cls-5" d="M197.04,105.67h36.43l-11.73-20.32h-35.07c4.46,6.12,7.99,12.96,10.38,20.32Z"/><path class="testnet-cls-4" d="M69.34,85.35h-35.07l-11.73,20.32h36.43c2.38-7.35,5.91-14.19,10.38-20.32Z"/><path class="testnet-cls-3" d="M200.51,125.84c.02.72.05,1.43.05,2.16,0,40.01-32.56,72.57-72.57,72.57s-72.57-32.56-72.57-72.57c0-.72.03-1.44.05-2.16H13.49c-.44,4.88.6,9.86,3.13,14.25l45.22,78.32c4.32,7.48,12.3,12.09,20.94,12.09h90.43c8.64,0,16.62-4.61,20.94-12.09l45.22-78.32c2.53-4.39,3.57-9.37,3.13-14.25h-41.99Z"/><path class="testnet-cls-2" d="M146.47,119.99c6.99-6.76,19.12-7.8,24.04-16.25,8.42-14.45-7.18-27.78-20.39-17.8-8.29,6.26-10.94,21.47-18.23,25.49-9.91,5.45-15.11-10.29-18.55-16.52-4.59-8.31-13.78-16.42-23.68-10.7-10.09,5.83-7.57,19.42,1.26,25.16,6.66,4.33,23.02,8.71,22.86,18.78-.17,10.64-18.33,14.45-24.99,20.21-14.05,12.14.13,32.23,15.62,23.03,8.17-4.85,10.14-15.02,15.28-22.33,4.55-6.47,10.4-7.7,15.78-1.25,5.95,7.13,7.29,17.85,15.65,23.25,14.02,9.06,28.26-6.82,18.78-19.89-4.75-6.54-13.12-7.95-19.59-12.09-7.61-4.87-11.35-11.82-3.83-19.08Z"/><path class="testnet-cls-7" d="M186.66,85.35h35.07l-11.65-20.17h-45.83c8.8,5.1,16.43,11.99,22.4,20.17Z"/><path class="testnet-cls-7" d="M91.74,65.18h-45.83l-11.65,20.17h35.07c5.97-8.18,13.6-15.07,22.4-20.17Z"/><path class="testnet-cls-7" d="M58.96,105.67H22.53l-5.91,10.24c-1.79,3.1-2.82,6.49-3.13,9.93h41.99c.21-7.02,1.41-13.79,3.48-20.17Z"/><path class="testnet-cls-7" d="M200.51,125.84h41.99c-.31-3.44-1.34-6.84-3.13-9.93l-5.91-10.24h-36.43c2.07,6.38,3.27,13.15,3.48,20.17Z"/></svg>
|
|
169
253
|
`;
|
|
170
254
|
|
|
171
255
|
// src/models/Bootstrap.ts
|
|
@@ -177,17 +261,17 @@ var asOptionalNetwork = AsObjectFactory.createOptional(isNetworkBootstrap);
|
|
|
177
261
|
|
|
178
262
|
// src/helpers/Networks.ts
|
|
179
263
|
var MainNetwork = {
|
|
180
|
-
description: "Main
|
|
181
|
-
icon:
|
|
264
|
+
description: "Main Network for XYO Layer 1",
|
|
265
|
+
icon: xl1MainnetString,
|
|
182
266
|
id: "mainnet",
|
|
183
267
|
name: "Mainnet",
|
|
184
268
|
schema: NetworkBootstrapSchema,
|
|
185
|
-
symbol: "
|
|
269
|
+
symbol: "XL1",
|
|
186
270
|
url: "https://api.chain.xyo.network"
|
|
187
271
|
};
|
|
188
272
|
var SequenceNetwork = {
|
|
189
|
-
description: "Test
|
|
190
|
-
icon:
|
|
273
|
+
description: "Test Network for XYO Layer 1",
|
|
274
|
+
icon: xl1TestnetString,
|
|
191
275
|
id: "sequence",
|
|
192
276
|
name: "Sequence",
|
|
193
277
|
schema: NetworkBootstrapSchema,
|
|
@@ -203,9 +287,14 @@ var LocalNetwork = {
|
|
|
203
287
|
symbol: "XYOG",
|
|
204
288
|
url: "http://localhost:8080"
|
|
205
289
|
};
|
|
290
|
+
var DefaultNetworks = [
|
|
291
|
+
MainNetwork,
|
|
292
|
+
SequenceNetwork,
|
|
293
|
+
LocalNetwork
|
|
294
|
+
];
|
|
206
295
|
|
|
207
296
|
// src/context/network/Provider.tsx
|
|
208
|
-
var ChainNetworkProvider = /* @__PURE__ */ __name(({ children, getActiveNetwork, networks, setActiveNetwork: setActiveNetworkExternal }) => {
|
|
297
|
+
var ChainNetworkProvider = /* @__PURE__ */ __name(({ children, getActiveNetwork, networks = DefaultNetworks, setActiveNetwork: setActiveNetworkExternal }) => {
|
|
209
298
|
const [activeNetwork, setActiveNetwork] = useState();
|
|
210
299
|
const [error, setError] = useState();
|
|
211
300
|
const [resolvedActiveNetwork, activeNetworkError] = usePromise(async () => {
|
|
@@ -247,9 +336,9 @@ var ChainNetworkProvider = /* @__PURE__ */ __name(({ children, getActiveNetwork,
|
|
|
247
336
|
networks,
|
|
248
337
|
updateActiveNetwork
|
|
249
338
|
]);
|
|
250
|
-
return /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ React4.createElement(ChainNetworkContext, {
|
|
251
340
|
value
|
|
252
|
-
}, /* @__PURE__ */
|
|
341
|
+
}, /* @__PURE__ */ React4.createElement(ErrorRender, {
|
|
253
342
|
error: error ?? activeNetworkError,
|
|
254
343
|
scope: "WalletNetworkProvider"
|
|
255
344
|
}), children);
|
|
@@ -259,11 +348,75 @@ var ChainNetworkProvider = /* @__PURE__ */ __name(({ children, getActiveNetwork,
|
|
|
259
348
|
import { useContextEx } from "@xylabs/react-shared";
|
|
260
349
|
var useChainNetwork = /* @__PURE__ */ __name((required = true) => useContextEx(ChainNetworkContext, "WalletNetwork", required), "useChainNetwork");
|
|
261
350
|
|
|
351
|
+
// src/components/menu/Icon.tsx
|
|
352
|
+
import { Icon } from "@mui/material";
|
|
353
|
+
import React5 from "react";
|
|
354
|
+
var NetworkIcon = /* @__PURE__ */ __name(({ icon, ...props }) => {
|
|
355
|
+
return /* @__PURE__ */ React5.createElement(Icon, {
|
|
356
|
+
sx: {
|
|
357
|
+
display: "inline-flex",
|
|
358
|
+
alignItems: "center",
|
|
359
|
+
justifyContent: "center"
|
|
360
|
+
},
|
|
361
|
+
ref: /* @__PURE__ */ __name((ref) => {
|
|
362
|
+
if (ref && icon) {
|
|
363
|
+
ref.innerHTML = icon;
|
|
364
|
+
}
|
|
365
|
+
}, "ref"),
|
|
366
|
+
...props
|
|
367
|
+
});
|
|
368
|
+
}, "NetworkIcon");
|
|
369
|
+
|
|
370
|
+
// src/components/menu/Avatar.tsx
|
|
371
|
+
var NetworkAvatar = /* @__PURE__ */ __name(({ icon, name, ...props }) => {
|
|
372
|
+
return /* @__PURE__ */ React6.createElement(Avatar, {
|
|
373
|
+
sx: {
|
|
374
|
+
backgroundColor: "white",
|
|
375
|
+
height: 30,
|
|
376
|
+
width: 30
|
|
377
|
+
},
|
|
378
|
+
alt: name,
|
|
379
|
+
...props
|
|
380
|
+
}, /* @__PURE__ */ React6.createElement(NetworkIcon, {
|
|
381
|
+
icon
|
|
382
|
+
}));
|
|
383
|
+
}, "NetworkAvatar");
|
|
384
|
+
var ActiveNetworkAvatar = /* @__PURE__ */ __name((props) => {
|
|
385
|
+
const { activeNetwork } = useChainNetwork();
|
|
386
|
+
return /* @__PURE__ */ React6.createElement(NetworkAvatar, {
|
|
387
|
+
icon: activeNetwork?.icon,
|
|
388
|
+
name: activeNetwork?.name,
|
|
389
|
+
...props
|
|
390
|
+
});
|
|
391
|
+
}, "ActiveNetworkAvatar");
|
|
392
|
+
|
|
393
|
+
// src/components/menu/MenuItem.tsx
|
|
394
|
+
import { ListItemText } from "@mui/material";
|
|
395
|
+
import { ActiveMenuItem } from "@xyo-network/react-chain-shared";
|
|
396
|
+
import React7 from "react";
|
|
397
|
+
var NetworkMenuItem = /* @__PURE__ */ __name(({ active, network, onClick, updateActiveNetwork, ...props }) => {
|
|
398
|
+
const handleClick = /* @__PURE__ */ __name((event) => {
|
|
399
|
+
if (network === void 0) throw new Error("Network is undefined");
|
|
400
|
+
updateActiveNetwork?.(network.id);
|
|
401
|
+
onClick?.(event);
|
|
402
|
+
}, "handleClick");
|
|
403
|
+
return /* @__PURE__ */ React7.createElement(ActiveMenuItem, {
|
|
404
|
+
title: network?.name,
|
|
405
|
+
disableRipple: true,
|
|
406
|
+
onClick: handleClick,
|
|
407
|
+
active,
|
|
408
|
+
...props
|
|
409
|
+
}, /* @__PURE__ */ React7.createElement(NetworkAvatar, {
|
|
410
|
+
icon: network?.icon,
|
|
411
|
+
name: network?.name
|
|
412
|
+
}), /* @__PURE__ */ React7.createElement(ListItemText, null, network?.name));
|
|
413
|
+
}, "NetworkMenuItem");
|
|
414
|
+
|
|
262
415
|
// src/provider/NetworkProvider.ts
|
|
263
416
|
import { assertEx } from "@xylabs/assert";
|
|
264
417
|
import { asArchivistInstance } from "@xyo-network/archivist-model";
|
|
418
|
+
import { initBridge as initBridge2 } from "@xyo-network/chain-orchestration";
|
|
265
419
|
import { findMostRecentBlock, hydrateBlock } from "@xyo-network/chain-protocol";
|
|
266
|
-
import { initBridge as initBridge2 } from "@xyo-network/chain-sdk";
|
|
267
420
|
import { XyoChainBlockNumberIterator } from "@xyo-network/chain-services";
|
|
268
421
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
269
422
|
var FINALIZED_ARCHIVIST = "XYOChain:Chain:Finalized";
|
|
@@ -285,6 +438,15 @@ var NetworkProvider = class _NetworkProvider {
|
|
|
285
438
|
accountBalance(_address, _blockNumber, _full) {
|
|
286
439
|
throw new Error("Method not implemented.");
|
|
287
440
|
}
|
|
441
|
+
accounts() {
|
|
442
|
+
throw new Error("Method not implemented.");
|
|
443
|
+
}
|
|
444
|
+
addChain(_chain, _name) {
|
|
445
|
+
throw new Error("Method not implemented.");
|
|
446
|
+
}
|
|
447
|
+
address() {
|
|
448
|
+
throw new Error("Method not implemented.");
|
|
449
|
+
}
|
|
288
450
|
blockByHash(_hash) {
|
|
289
451
|
throw new Error("Method not implemented.");
|
|
290
452
|
}
|
|
@@ -297,6 +459,9 @@ var NetworkProvider = class _NetworkProvider {
|
|
|
297
459
|
chainId() {
|
|
298
460
|
throw new Error("Method not implemented.");
|
|
299
461
|
}
|
|
462
|
+
chains() {
|
|
463
|
+
throw new Error("Method not implemented.");
|
|
464
|
+
}
|
|
300
465
|
currentBlock() {
|
|
301
466
|
throw new Error("Method not implemented.");
|
|
302
467
|
}
|
|
@@ -306,6 +471,9 @@ var NetworkProvider = class _NetworkProvider {
|
|
|
306
471
|
currentBlockNumber() {
|
|
307
472
|
throw new Error("Method not implemented.");
|
|
308
473
|
}
|
|
474
|
+
permissions() {
|
|
475
|
+
throw new Error("Method not implemented.");
|
|
476
|
+
}
|
|
309
477
|
async previousBlocks(startingBlock, count = 25) {
|
|
310
478
|
const chainArchivist = await this.getFinalizedArchivist();
|
|
311
479
|
const head = assertEx(await findMostRecentBlock(chainArchivist, {
|
|
@@ -322,12 +490,21 @@ var NetworkProvider = class _NetworkProvider {
|
|
|
322
490
|
}
|
|
323
491
|
return hydratedBlocks;
|
|
324
492
|
}
|
|
493
|
+
requestPermissions(_permissions) {
|
|
494
|
+
throw new Error("Method not implemented.");
|
|
495
|
+
}
|
|
496
|
+
revokePermissions(_permissions) {
|
|
497
|
+
throw new Error("Method not implemented.");
|
|
498
|
+
}
|
|
325
499
|
sendTransaction(_transaction) {
|
|
326
500
|
throw new Error("Method not implemented.");
|
|
327
501
|
}
|
|
328
502
|
signTransaction(_transaction) {
|
|
329
503
|
throw new Error("Method not implemented.");
|
|
330
504
|
}
|
|
505
|
+
switchChain(_chain) {
|
|
506
|
+
throw new Error("Method not implemented.");
|
|
507
|
+
}
|
|
331
508
|
transactionByBlockHashAndIndex(_blockHash, _transactionIndex) {
|
|
332
509
|
throw new Error("Method not implemented.");
|
|
333
510
|
}
|
|
@@ -344,11 +521,14 @@ var NetworkProvider = class _NetworkProvider {
|
|
|
344
521
|
}
|
|
345
522
|
};
|
|
346
523
|
export {
|
|
524
|
+
ActiveNetworkAvatar,
|
|
347
525
|
ChainNetworkContext,
|
|
348
526
|
ChainNetworkProvider,
|
|
527
|
+
DefaultNetworks,
|
|
349
528
|
FINALIZED_ARCHIVIST,
|
|
350
529
|
LocalNetwork,
|
|
351
530
|
MainNetwork,
|
|
531
|
+
NetworkAvatar,
|
|
352
532
|
NetworkBootstrapSchema,
|
|
353
533
|
NetworkIcon,
|
|
354
534
|
NetworkMenuItem,
|