@xyo-network/xl1-rpc 2.2.0 → 3.0.0
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/neutral/engine-node/middleware/RpcContext.d.ts +1 -1
- package/dist/neutral/index.mjs +172 -166
- package/dist/neutral/index.mjs.map +2 -2
- package/dist/neutral/networkTier3Descriptors.d.ts +2 -16
- package/dist/neutral/networkTier3Descriptors.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcBlockViewer/JsonRpcBlockViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcFinalizationViewer/JsonRpcFinalizationViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/neutral/transport/HttpRpcTransport.d.ts.map +1 -1
- package/dist/neutral/transport/PostMessage/PostMessageRpcTransport.d.ts.map +1 -1
- package/dist/neutral/transport/PostMessage/bus/implementations/PostMessage.d.ts.map +1 -1
- package/dist/node/engine-node/middleware/RpcContext.d.ts +1 -1
- package/dist/node/index-node.mjs +172 -166
- package/dist/node/index-node.mjs.map +2 -2
- package/dist/node/networkTier3Descriptors.d.ts +2 -16
- package/dist/node/networkTier3Descriptors.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcBlockViewer/JsonRpcBlockViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcFinalizationViewer/JsonRpcFinalizationViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/node/transport/HttpRpcTransport.d.ts.map +1 -1
- package/dist/node/transport/PostMessage/PostMessageRpcTransport.d.ts.map +1 -1
- package/dist/node/transport/PostMessage/bus/implementations/PostMessage.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -18,7 +18,7 @@ export type RpcContext = MiddlewareContext<RpcContextKeyValues>;
|
|
|
18
18
|
/**
|
|
19
19
|
* Middleware shape used throughout the RPC engine. We only handle
|
|
20
20
|
* {@link JsonRpcRequest}s (no notifications), so Result is constrained to
|
|
21
|
-
* {@link
|
|
21
|
+
* {@link JSON}. This matches what `createScaffoldMiddleware` and a sub-engine
|
|
22
22
|
* built purely from request-handling middleware will produce.
|
|
23
23
|
*/
|
|
24
24
|
export type RpcMiddleware = JsonRpcMiddleware<JsonRpcRequest, Json, RpcContext>;
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1604,14 +1604,15 @@ var HttpRpcTransport = class {
|
|
|
1604
1604
|
method
|
|
1605
1605
|
};
|
|
1606
1606
|
const schema = schemas[method];
|
|
1607
|
-
if (params) {
|
|
1607
|
+
if (params !== void 0) {
|
|
1608
1608
|
body.params = isDefined(schema) ? schema.params.to.parse(params) : this._passThrough ? z25.json().parse(params) : void 0;
|
|
1609
1609
|
if (!isDefined(body.params)) {
|
|
1610
1610
|
throw new Error(`[callRpc] RPC method ${String(method)} missing schema`);
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
1613
|
body.params ??= [];
|
|
1614
|
-
const
|
|
1614
|
+
const client = new FetchJsonClient();
|
|
1615
|
+
const res = await client.post(url, body);
|
|
1615
1616
|
const json = res.data;
|
|
1616
1617
|
if (isUndefinedOrNull(json)) {
|
|
1617
1618
|
throw new Error(`[callRpc] empty response body (status ${res.status})`);
|
|
@@ -1718,22 +1719,33 @@ var isMessageWithId = (message) => {
|
|
|
1718
1719
|
};
|
|
1719
1720
|
|
|
1720
1721
|
// src/transport/PostMessage/bus/implementations/PostMessage.ts
|
|
1722
|
+
function browserWindow() {
|
|
1723
|
+
return globalThis;
|
|
1724
|
+
}
|
|
1725
|
+
function deliverPostMessage(message, targetOrigin, transfer) {
|
|
1726
|
+
const win = browserWindow();
|
|
1727
|
+
if (typeof win.postMessage !== "function") {
|
|
1728
|
+
throw new TypeError("postMessage is only available in browser environments");
|
|
1729
|
+
}
|
|
1730
|
+
const postMessageFn = win.postMessage;
|
|
1731
|
+
postMessageFn.call(win, message, targetOrigin, transfer);
|
|
1732
|
+
}
|
|
1721
1733
|
var PostMessageBus = class extends AbstractMessageBus {
|
|
1722
1734
|
constructor(sessionId, name = "default") {
|
|
1723
1735
|
super(sessionId, name);
|
|
1724
1736
|
}
|
|
1725
|
-
postMessage(message, origin
|
|
1726
|
-
|
|
1737
|
+
postMessage(message, origin) {
|
|
1738
|
+
deliverPostMessage(message, origin ?? browserWindow().location?.origin ?? "*");
|
|
1727
1739
|
}
|
|
1728
1740
|
start() {
|
|
1729
|
-
|
|
1741
|
+
addEventListener("message", (event) => this.handleMessage(event));
|
|
1730
1742
|
}
|
|
1731
1743
|
stop() {
|
|
1732
|
-
|
|
1744
|
+
removeEventListener("message", this.handleMessage);
|
|
1733
1745
|
this.connections.length = 0;
|
|
1734
1746
|
}
|
|
1735
1747
|
handleMessage = (event) => {
|
|
1736
|
-
if (event.origin !==
|
|
1748
|
+
if (event.origin !== browserWindow().location?.origin) return;
|
|
1737
1749
|
if (!this.validateSessionId(event.data?.sessionId)) return;
|
|
1738
1750
|
for (const connection of this.connections) {
|
|
1739
1751
|
const { id, listener } = connection;
|
|
@@ -1794,20 +1806,21 @@ var PostMessageRpcTransport = class {
|
|
|
1794
1806
|
const postMessageBus = new PostMessageBus(this.sessionId);
|
|
1795
1807
|
const postMessageConnection = {
|
|
1796
1808
|
listener: (event) => {
|
|
1797
|
-
if ("data" in event.data
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1809
|
+
if (!("data" in event.data) || !isJsonRpcResponse(event.data.data)) {
|
|
1810
|
+
return;
|
|
1811
|
+
}
|
|
1812
|
+
const response = event.data.data;
|
|
1813
|
+
if (isJsonRpcSuccess(response) && Array.isArray(response.result)) {
|
|
1814
|
+
const ret = schemas[method].result.from.parse(response.result[0]);
|
|
1815
|
+
resolve(ret);
|
|
1816
|
+
return;
|
|
1817
|
+
}
|
|
1818
|
+
if (isJsonRpcFailure(response)) {
|
|
1819
|
+
this.logger?.error("Error in PostMessageRpcTransport", response);
|
|
1820
|
+
reject(new Error(response.error.message));
|
|
1821
|
+
return;
|
|
1810
1822
|
}
|
|
1823
|
+
throw new Error(`Invalid response from wallet extension, ${JSON.stringify(event.data)}`);
|
|
1811
1824
|
},
|
|
1812
1825
|
id
|
|
1813
1826
|
};
|
|
@@ -2070,25 +2083,32 @@ var JsonRpcBlockViewer = class extends JsonRpcBlockViewerMethods {
|
|
|
2070
2083
|
};
|
|
2071
2084
|
}
|
|
2072
2085
|
async blockByHash(hash) {
|
|
2073
|
-
|
|
2086
|
+
const blocks = await this.blocksByHash(hash, 1);
|
|
2087
|
+
return blocks[0];
|
|
2074
2088
|
}
|
|
2075
2089
|
async blockByNumber(block) {
|
|
2076
|
-
|
|
2090
|
+
const blocks = await this.blocksByNumber(block, 1);
|
|
2091
|
+
return blocks[0];
|
|
2077
2092
|
}
|
|
2078
2093
|
async chainId(blockNumber = "latest") {
|
|
2079
2094
|
if (blockNumber === "latest") {
|
|
2080
|
-
|
|
2095
|
+
const current = await this.currentBlock();
|
|
2096
|
+
return current[0].chain;
|
|
2081
2097
|
}
|
|
2082
|
-
|
|
2098
|
+
const blocks = await this.blocksByNumber(blockNumber, 1);
|
|
2099
|
+
return blocks[0][0].chain;
|
|
2083
2100
|
}
|
|
2084
2101
|
async currentBlockHash() {
|
|
2085
|
-
|
|
2102
|
+
const block = await this.currentBlock();
|
|
2103
|
+
return block[0]._hash;
|
|
2086
2104
|
}
|
|
2087
2105
|
async currentBlockNumber() {
|
|
2088
|
-
|
|
2106
|
+
const block = await this.currentBlock();
|
|
2107
|
+
return block[0].block;
|
|
2089
2108
|
}
|
|
2090
2109
|
async payloadByHash(hash) {
|
|
2091
|
-
|
|
2110
|
+
const payloads = await this.payloadsByHash([hash]);
|
|
2111
|
+
return payloads[0] ?? null;
|
|
2092
2112
|
}
|
|
2093
2113
|
async rate(range, timeUnit) {
|
|
2094
2114
|
return await calculateBlockRate(this, range, timeUnit);
|
|
@@ -2140,10 +2160,11 @@ var JsonRpcBlockViewer = class extends JsonRpcBlockViewerMethods {
|
|
|
2140
2160
|
}, this.headPollIntervalMs);
|
|
2141
2161
|
}
|
|
2142
2162
|
stopHeadPolling() {
|
|
2143
|
-
if (this._headPollTimer) {
|
|
2144
|
-
|
|
2145
|
-
this._headPollTimer = null;
|
|
2163
|
+
if (!this._headPollTimer) {
|
|
2164
|
+
return;
|
|
2146
2165
|
}
|
|
2166
|
+
clearInterval(this._headPollTimer);
|
|
2167
|
+
this._headPollTimer = null;
|
|
2147
2168
|
}
|
|
2148
2169
|
};
|
|
2149
2170
|
__publicField(JsonRpcBlockViewer, "defaultMoniker", BlockViewerMoniker2);
|
|
@@ -2176,16 +2197,20 @@ var JsonRpcFinalizationViewerMethods = class extends AbstractJsonRpcViewer {
|
|
|
2176
2197
|
// src/provider/viewer/JsonRpcFinalizationViewer/JsonRpcFinalizationViewer.ts
|
|
2177
2198
|
var JsonRpcFinalizationViewer = class extends JsonRpcFinalizationViewerMethods {
|
|
2178
2199
|
async chainId() {
|
|
2179
|
-
|
|
2200
|
+
const headBlock = await this.headBlock();
|
|
2201
|
+
return headBlock.chain;
|
|
2180
2202
|
}
|
|
2181
2203
|
async headBlock() {
|
|
2182
|
-
|
|
2204
|
+
const head = await this.head();
|
|
2205
|
+
return head[0];
|
|
2183
2206
|
}
|
|
2184
2207
|
async headHash() {
|
|
2185
|
-
|
|
2208
|
+
const head = await this.head();
|
|
2209
|
+
return head[0]._hash;
|
|
2186
2210
|
}
|
|
2187
2211
|
async headNumber() {
|
|
2188
|
-
|
|
2212
|
+
const head = await this.head();
|
|
2213
|
+
return head[0].block;
|
|
2189
2214
|
}
|
|
2190
2215
|
};
|
|
2191
2216
|
__publicField(JsonRpcFinalizationViewer, "defaultMoniker", FinalizationViewerMoniker2);
|
|
@@ -2602,28 +2627,33 @@ var JsonRpcXyoViewer = class extends AbstractJsonRpcViewer {
|
|
|
2602
2627
|
return await this.account.balance.accountBalanceHistory(address, config);
|
|
2603
2628
|
}
|
|
2604
2629
|
async blockByHash(hash) {
|
|
2605
|
-
|
|
2630
|
+
const blocks = await this.blocksByHash(hash, 1);
|
|
2631
|
+
return blocks[0];
|
|
2606
2632
|
}
|
|
2607
2633
|
async blockByNumber(blockNumber) {
|
|
2608
|
-
|
|
2634
|
+
const blocks = await this.blocksByNumber(blockNumber, 1);
|
|
2635
|
+
return blocks[0];
|
|
2609
2636
|
}
|
|
2610
2637
|
async blocksByHash(hash, limit) {
|
|
2611
|
-
|
|
2638
|
+
const blocks = await this.transport.sendRequest(
|
|
2612
2639
|
"xyoViewer_blocksByHash",
|
|
2613
2640
|
[hash, limit]
|
|
2614
|
-
)
|
|
2641
|
+
);
|
|
2642
|
+
return await Promise.all(blocks.map((b) => fixSignedHydratedBlockWithHashMeta(b)));
|
|
2615
2643
|
}
|
|
2616
2644
|
async blocksByNumber(blockNumber, limit) {
|
|
2617
|
-
|
|
2645
|
+
const blocks = await this.transport.sendRequest(
|
|
2618
2646
|
"xyoViewer_blocksByNumber",
|
|
2619
2647
|
[blockNumber, limit]
|
|
2620
|
-
)
|
|
2648
|
+
);
|
|
2649
|
+
return await Promise.all(blocks.map((b) => fixSignedHydratedBlockWithHashMeta(b)));
|
|
2621
2650
|
}
|
|
2622
2651
|
async blocksByStep(stepLevel, stepIndex) {
|
|
2623
|
-
|
|
2652
|
+
const blocks = await this.transport.sendRequest(
|
|
2624
2653
|
"xyoViewer_blocksByStep",
|
|
2625
2654
|
[stepLevel, stepIndex]
|
|
2626
|
-
)
|
|
2655
|
+
);
|
|
2656
|
+
return await Promise.all(blocks.map((b) => fixSignedHydratedBlockWithHashMeta(b)));
|
|
2627
2657
|
}
|
|
2628
2658
|
async chainId(blockNumber = "latest") {
|
|
2629
2659
|
const block = blockNumber === "latest" ? await this.currentBlock() : await this.blockByNumber(blockNumber);
|
|
@@ -2656,10 +2686,12 @@ var JsonRpcXyoViewer = class extends AbstractJsonRpcViewer {
|
|
|
2656
2686
|
return fixSignedHydratedBlockWithHashMeta(result);
|
|
2657
2687
|
}
|
|
2658
2688
|
async currentBlockHash() {
|
|
2659
|
-
|
|
2689
|
+
const block = await this.currentBlock();
|
|
2690
|
+
return block[0]._hash;
|
|
2660
2691
|
}
|
|
2661
2692
|
async currentBlockNumber() {
|
|
2662
|
-
|
|
2693
|
+
const block = await this.currentBlock();
|
|
2694
|
+
return block[0].block;
|
|
2663
2695
|
}
|
|
2664
2696
|
async forkHistory() {
|
|
2665
2697
|
return await this.transport.sendRequest("xyoViewer_forkHistory");
|
|
@@ -2719,7 +2751,8 @@ var JsonRpcXyoViewer = class extends AbstractJsonRpcViewer {
|
|
|
2719
2751
|
return await this.transport.sendRequest("xyoViewer_networkStakeStepRewardsForStepLevel", [stepLevel, range]);
|
|
2720
2752
|
}
|
|
2721
2753
|
async payloadByHash(hash) {
|
|
2722
|
-
|
|
2754
|
+
const payloads = await this.payloadsByHash([hash]);
|
|
2755
|
+
return payloads[0] ?? null;
|
|
2723
2756
|
}
|
|
2724
2757
|
async payloadsByHash(hashes) {
|
|
2725
2758
|
return await PayloadBuilder2.addHashMeta(await this.transport.sendRequest(
|
|
@@ -2780,130 +2813,103 @@ JsonRpcXyoViewer = __decorateClass([
|
|
|
2780
2813
|
|
|
2781
2814
|
// src/networkTier3Descriptors.ts
|
|
2782
2815
|
var passes = () => true;
|
|
2783
|
-
|
|
2784
|
-
{
|
|
2785
|
-
id
|
|
2786
|
-
satisfies: [
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
surface
|
|
2790
|
-
preconditions: passes,
|
|
2791
|
-
build: () => JsonRpcBlockViewer.factory(JsonRpcBlockViewer.dependencies, {})
|
|
2792
|
-
},
|
|
2793
|
-
{
|
|
2794
|
-
id: "JsonRpcMempoolViewer",
|
|
2795
|
-
satisfies: [JsonRpcMempoolViewer.defaultMoniker],
|
|
2796
|
-
tier: 3,
|
|
2797
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2798
|
-
surface: "node",
|
|
2799
|
-
preconditions: passes,
|
|
2800
|
-
build: () => JsonRpcMempoolViewer.factory(JsonRpcMempoolViewer.dependencies, {})
|
|
2801
|
-
},
|
|
2802
|
-
{
|
|
2803
|
-
id: "JsonRpcMempoolRunner",
|
|
2804
|
-
satisfies: [JsonRpcMempoolRunner.defaultMoniker],
|
|
2805
|
-
tier: 3,
|
|
2806
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2807
|
-
surface: "node",
|
|
2808
|
-
preconditions: passes,
|
|
2809
|
-
build: () => JsonRpcMempoolRunner.factory(JsonRpcMempoolRunner.dependencies, {})
|
|
2810
|
-
},
|
|
2811
|
-
{
|
|
2812
|
-
id: "JsonRpcFinalizationViewer",
|
|
2813
|
-
satisfies: [JsonRpcFinalizationViewer.defaultMoniker],
|
|
2814
|
-
tier: 3,
|
|
2815
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2816
|
-
surface: "node",
|
|
2817
|
-
preconditions: passes,
|
|
2818
|
-
build: () => JsonRpcFinalizationViewer.factory(JsonRpcFinalizationViewer.dependencies, {})
|
|
2819
|
-
},
|
|
2820
|
-
{
|
|
2821
|
-
id: "JsonRpcAccountBalanceViewer",
|
|
2822
|
-
satisfies: [JsonRpcAccountBalanceViewer.defaultMoniker],
|
|
2823
|
-
tier: 3,
|
|
2824
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2825
|
-
// AccountBalanceViewer is a point query (`f(address) → balance`) — node-surface,
|
|
2826
|
-
// even though indexer-backed today on the producer side.
|
|
2827
|
-
surface: "node",
|
|
2828
|
-
preconditions: passes,
|
|
2829
|
-
build: () => JsonRpcAccountBalanceViewer.factory(JsonRpcAccountBalanceViewer.dependencies, {})
|
|
2830
|
-
},
|
|
2831
|
-
{
|
|
2832
|
-
id: "JsonRpcTransactionViewer",
|
|
2833
|
-
satisfies: [JsonRpcTransactionViewer.defaultMoniker],
|
|
2834
|
-
tier: 3,
|
|
2835
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2836
|
-
surface: "node",
|
|
2837
|
-
preconditions: passes,
|
|
2838
|
-
build: () => JsonRpcTransactionViewer.factory(JsonRpcTransactionViewer.dependencies, {})
|
|
2839
|
-
},
|
|
2840
|
-
{
|
|
2841
|
-
id: "JsonRpcTimeSyncViewer",
|
|
2842
|
-
satisfies: [JsonRpcTimeSyncViewer.defaultMoniker],
|
|
2843
|
-
tier: 3,
|
|
2844
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2845
|
-
surface: "node",
|
|
2846
|
-
preconditions: passes,
|
|
2847
|
-
build: () => JsonRpcTimeSyncViewer.factory(JsonRpcTimeSyncViewer.dependencies, {})
|
|
2848
|
-
},
|
|
2849
|
-
{
|
|
2850
|
-
id: "JsonRpcXyoViewer",
|
|
2851
|
-
satisfies: [JsonRpcXyoViewer.defaultMoniker],
|
|
2852
|
-
tier: 3,
|
|
2853
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2854
|
-
surface: "node",
|
|
2855
|
-
preconditions: passes,
|
|
2856
|
-
build: () => JsonRpcXyoViewer.factory(JsonRpcXyoViewer.dependencies, {})
|
|
2857
|
-
},
|
|
2858
|
-
{
|
|
2859
|
-
id: "JsonRpcXyoRunner",
|
|
2860
|
-
satisfies: [JsonRpcXyoRunner.defaultMoniker],
|
|
2861
|
-
tier: 3,
|
|
2862
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2863
|
-
surface: "node",
|
|
2864
|
-
preconditions: passes,
|
|
2865
|
-
build: () => JsonRpcXyoRunner.factory(JsonRpcXyoRunner.dependencies, {})
|
|
2866
|
-
},
|
|
2867
|
-
{
|
|
2868
|
-
// StakeTotalsViewer.activeByStaked(addr) is a point query keyed by address — node-surface.
|
|
2869
|
-
id: "JsonRpcStakeTotalsViewer",
|
|
2870
|
-
satisfies: [JsonRpcStakeTotalsViewer.defaultMoniker],
|
|
2871
|
-
tier: 3,
|
|
2872
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2873
|
-
surface: "node",
|
|
2816
|
+
function rpcDescriptor(id, moniker, surface, build, planDependencies = []) {
|
|
2817
|
+
return {
|
|
2818
|
+
id,
|
|
2819
|
+
satisfies: [moniker],
|
|
2820
|
+
connectionTypes: ["rpc"],
|
|
2821
|
+
dependencies: planDependencies,
|
|
2822
|
+
surface,
|
|
2874
2823
|
preconditions: passes,
|
|
2875
|
-
build
|
|
2876
|
-
}
|
|
2824
|
+
build
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
var nodeNetworkDescriptors = [
|
|
2828
|
+
rpcDescriptor(
|
|
2829
|
+
"JsonRpcBlockViewer",
|
|
2830
|
+
JsonRpcBlockViewer.defaultMoniker,
|
|
2831
|
+
"node",
|
|
2832
|
+
() => JsonRpcBlockViewer.factory(JsonRpcBlockViewer.dependencies, {})
|
|
2833
|
+
),
|
|
2834
|
+
rpcDescriptor(
|
|
2835
|
+
"JsonRpcMempoolViewer",
|
|
2836
|
+
JsonRpcMempoolViewer.defaultMoniker,
|
|
2837
|
+
"node",
|
|
2838
|
+
() => JsonRpcMempoolViewer.factory(JsonRpcMempoolViewer.dependencies, {})
|
|
2839
|
+
),
|
|
2840
|
+
rpcDescriptor(
|
|
2841
|
+
"JsonRpcMempoolRunner",
|
|
2842
|
+
JsonRpcMempoolRunner.defaultMoniker,
|
|
2843
|
+
"node",
|
|
2844
|
+
() => JsonRpcMempoolRunner.factory(JsonRpcMempoolRunner.dependencies, {})
|
|
2845
|
+
),
|
|
2846
|
+
rpcDescriptor(
|
|
2847
|
+
"JsonRpcFinalizationViewer",
|
|
2848
|
+
JsonRpcFinalizationViewer.defaultMoniker,
|
|
2849
|
+
"node",
|
|
2850
|
+
() => JsonRpcFinalizationViewer.factory(JsonRpcFinalizationViewer.dependencies, {})
|
|
2851
|
+
),
|
|
2852
|
+
rpcDescriptor(
|
|
2853
|
+
"JsonRpcAccountBalanceViewer",
|
|
2854
|
+
JsonRpcAccountBalanceViewer.defaultMoniker,
|
|
2855
|
+
"node",
|
|
2856
|
+
() => JsonRpcAccountBalanceViewer.factory(JsonRpcAccountBalanceViewer.dependencies, {})
|
|
2857
|
+
),
|
|
2858
|
+
rpcDescriptor(
|
|
2859
|
+
"JsonRpcTransactionViewer",
|
|
2860
|
+
JsonRpcTransactionViewer.defaultMoniker,
|
|
2861
|
+
"node",
|
|
2862
|
+
() => JsonRpcTransactionViewer.factory(JsonRpcTransactionViewer.dependencies, {}),
|
|
2863
|
+
[...JsonRpcTransactionViewer.dependencies]
|
|
2864
|
+
),
|
|
2865
|
+
rpcDescriptor(
|
|
2866
|
+
"JsonRpcTimeSyncViewer",
|
|
2867
|
+
JsonRpcTimeSyncViewer.defaultMoniker,
|
|
2868
|
+
"node",
|
|
2869
|
+
() => JsonRpcTimeSyncViewer.factory(JsonRpcTimeSyncViewer.dependencies, {})
|
|
2870
|
+
),
|
|
2871
|
+
rpcDescriptor(
|
|
2872
|
+
"JsonRpcXyoViewer",
|
|
2873
|
+
JsonRpcXyoViewer.defaultMoniker,
|
|
2874
|
+
"node",
|
|
2875
|
+
() => JsonRpcXyoViewer.factory(JsonRpcXyoViewer.dependencies, {})
|
|
2876
|
+
),
|
|
2877
|
+
rpcDescriptor(
|
|
2878
|
+
"JsonRpcXyoRunner",
|
|
2879
|
+
JsonRpcXyoRunner.defaultMoniker,
|
|
2880
|
+
"node",
|
|
2881
|
+
() => JsonRpcXyoRunner.factory(JsonRpcXyoRunner.dependencies, {}),
|
|
2882
|
+
[...JsonRpcXyoRunner.dependencies]
|
|
2883
|
+
),
|
|
2884
|
+
rpcDescriptor(
|
|
2885
|
+
"JsonRpcStakeTotalsViewer",
|
|
2886
|
+
JsonRpcStakeTotalsViewer.defaultMoniker,
|
|
2887
|
+
"node",
|
|
2888
|
+
() => JsonRpcStakeTotalsViewer.factory(JsonRpcStakeTotalsViewer.dependencies, {})
|
|
2889
|
+
)
|
|
2877
2890
|
];
|
|
2878
2891
|
var indexedNetworkDescriptors = [
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
satisfies: [JsonRpcNetworkStakeStepRewardsViewer.defaultMoniker],
|
|
2901
|
-
tier: 3,
|
|
2902
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
2903
|
-
surface: "indexed",
|
|
2904
|
-
preconditions: passes,
|
|
2905
|
-
build: () => JsonRpcNetworkStakeStepRewardsViewer.factory(JsonRpcNetworkStakeStepRewardsViewer.dependencies, {})
|
|
2906
|
-
}
|
|
2892
|
+
rpcDescriptor(
|
|
2893
|
+
"JsonRpcStakeViewer",
|
|
2894
|
+
JsonRpcStakeViewer.defaultMoniker,
|
|
2895
|
+
"indexed",
|
|
2896
|
+
() => JsonRpcStakeViewer.factory(JsonRpcStakeViewer.dependencies, {})
|
|
2897
|
+
),
|
|
2898
|
+
rpcDescriptor(
|
|
2899
|
+
"JsonRpcNetworkStakeViewer",
|
|
2900
|
+
JsonRpcNetworkStakeViewer.defaultMoniker,
|
|
2901
|
+
"indexed",
|
|
2902
|
+
() => JsonRpcNetworkStakeViewer.factory(JsonRpcNetworkStakeViewer.dependencies, {})
|
|
2903
|
+
),
|
|
2904
|
+
rpcDescriptor(
|
|
2905
|
+
"JsonRpcNetworkStakeStepRewardsViewer",
|
|
2906
|
+
JsonRpcNetworkStakeStepRewardsViewer.defaultMoniker,
|
|
2907
|
+
"indexed",
|
|
2908
|
+
() => JsonRpcNetworkStakeStepRewardsViewer.factory(
|
|
2909
|
+
JsonRpcNetworkStakeStepRewardsViewer.dependencies,
|
|
2910
|
+
{}
|
|
2911
|
+
)
|
|
2912
|
+
)
|
|
2907
2913
|
];
|
|
2908
2914
|
var networkTier3Descriptors = [
|
|
2909
2915
|
...nodeNetworkDescriptors,
|