@xyo-network/xl1-rpc 1.29.7 → 1.30.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/index.mjs +13 -26
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcBlockViewer/JsonRpcBlockViewerMethods.d.ts +1 -3
- package/dist/neutral/provider/viewer/JsonRpcBlockViewer/JsonRpcBlockViewerMethods.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcTransactionViewer/JsonRpcTransactionViewer.d.ts +1 -2
- package/dist/neutral/provider/viewer/JsonRpcTransactionViewer/JsonRpcTransactionViewer.d.ts.map +1 -1
- package/dist/node/index-node.mjs +13 -26
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/provider/viewer/JsonRpcBlockViewer/JsonRpcBlockViewerMethods.d.ts +1 -3
- package/dist/node/provider/viewer/JsonRpcBlockViewer/JsonRpcBlockViewerMethods.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcTransactionViewer/JsonRpcTransactionViewer.d.ts +1 -2
- package/dist/node/provider/viewer/JsonRpcTransactionViewer/JsonRpcTransactionViewer.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/neutral/index.mjs
CHANGED
|
@@ -1954,42 +1954,32 @@ import {
|
|
|
1954
1954
|
|
|
1955
1955
|
// src/provider/viewer/JsonRpcBlockViewer/JsonRpcBlockViewerMethods.ts
|
|
1956
1956
|
import { isDefined as isDefined5 } from "@xylabs/sdk-js";
|
|
1957
|
-
import { BlockViewerMoniker
|
|
1958
|
-
import { addDataLakePayloads, addDataLakePayloadsToPayloads } from "@xyo-network/xl1-protocol-sdk";
|
|
1957
|
+
import { BlockViewerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
1959
1958
|
var JsonRpcBlockViewerMethods = class extends AbstractJsonRpcViewer {
|
|
1960
1959
|
moniker = BlockViewerMoniker;
|
|
1961
|
-
dataLakeViewer;
|
|
1962
1960
|
async blocksByHash(hash, limit) {
|
|
1963
|
-
|
|
1961
|
+
return await this.transport.sendRequest(
|
|
1964
1962
|
"blockViewer_blocksByHash",
|
|
1965
1963
|
isDefined5(limit) ? [hash, limit] : [hash]
|
|
1966
1964
|
);
|
|
1967
|
-
return await Promise.all(result.map(async (block) => (await addDataLakePayloads(block, this.dataLakeViewer))[0]));
|
|
1968
1965
|
}
|
|
1969
1966
|
async blocksByNumber(block, limit) {
|
|
1970
|
-
|
|
1967
|
+
return await this.transport.sendRequest(
|
|
1971
1968
|
"blockViewer_blocksByNumber",
|
|
1972
1969
|
isDefined5(limit) ? [block, limit] : [block]
|
|
1973
1970
|
);
|
|
1974
|
-
return await Promise.all(result.map(async (block2) => (await addDataLakePayloads(block2, this.dataLakeViewer))[0]));
|
|
1975
|
-
}
|
|
1976
|
-
async createHandler() {
|
|
1977
|
-
await super.createHandler();
|
|
1978
|
-
this.dataLakeViewer = await this.locator.tryGetInstance(DataLakeViewerMoniker);
|
|
1979
1971
|
}
|
|
1980
1972
|
async currentBlock() {
|
|
1981
|
-
|
|
1973
|
+
return await this.transport.sendRequest(
|
|
1982
1974
|
"blockViewer_currentBlock",
|
|
1983
1975
|
[]
|
|
1984
1976
|
);
|
|
1985
|
-
return (await addDataLakePayloads(result, this.dataLakeViewer))[0];
|
|
1986
1977
|
}
|
|
1987
1978
|
async payloadsByHash(hashes) {
|
|
1988
|
-
|
|
1979
|
+
return await this.transport.sendRequest(
|
|
1989
1980
|
"blockViewer_payloadsByHash",
|
|
1990
1981
|
[hashes]
|
|
1991
1982
|
);
|
|
1992
|
-
return (await addDataLakePayloadsToPayloads(hashes, result, this.dataLakeViewer))[0];
|
|
1993
1983
|
}
|
|
1994
1984
|
schemas() {
|
|
1995
1985
|
return BlockViewerRpcSchemas;
|
|
@@ -2407,14 +2397,12 @@ import {
|
|
|
2407
2397
|
import { BoundWitnessSchema } from "@xyo-network/sdk-js";
|
|
2408
2398
|
import {
|
|
2409
2399
|
BlockViewerMoniker as BlockViewerMoniker3,
|
|
2410
|
-
DataLakeViewerMoniker as DataLakeViewerMoniker2,
|
|
2411
2400
|
isTransactionBoundWitnessWithHashMeta,
|
|
2412
2401
|
TransactionViewerMoniker
|
|
2413
2402
|
} from "@xyo-network/xl1-protocol-lib";
|
|
2414
|
-
import {
|
|
2403
|
+
import { creatableProvider as creatableProvider12 } from "@xyo-network/xl1-protocol-sdk";
|
|
2415
2404
|
var JsonRpcTransactionViewer = class extends AbstractJsonRpcViewer {
|
|
2416
2405
|
moniker = JsonRpcTransactionViewer.defaultMoniker;
|
|
2417
|
-
dataLakeViewer;
|
|
2418
2406
|
_blockViewer;
|
|
2419
2407
|
get blockViewer() {
|
|
2420
2408
|
return this._blockViewer;
|
|
@@ -2450,24 +2438,23 @@ var JsonRpcTransactionViewer = class extends AbstractJsonRpcViewer {
|
|
|
2450
2438
|
}
|
|
2451
2439
|
async byHash(transactionHash) {
|
|
2452
2440
|
const result = await this.transport.sendRequest("transactionViewer_byHash", [transactionHash]);
|
|
2453
|
-
return result
|
|
2441
|
+
return result ?? null;
|
|
2454
2442
|
}
|
|
2455
2443
|
async createHandler() {
|
|
2456
2444
|
await super.createHandler();
|
|
2457
2445
|
this._blockViewer = await this.locator.getInstance(BlockViewerMoniker3);
|
|
2458
|
-
this.dataLakeViewer = await this.locator.tryGetInstance(DataLakeViewerMoniker2);
|
|
2459
2446
|
}
|
|
2460
2447
|
async transactionByBlockHashAndIndex(blockHash, transactionIndex) {
|
|
2461
2448
|
const result = await this.transport.sendRequest("transactionViewer_transactionByBlockHashAndIndex", [blockHash, transactionIndex]);
|
|
2462
|
-
return result
|
|
2449
|
+
return result ?? null;
|
|
2463
2450
|
}
|
|
2464
2451
|
async transactionByBlockNumberAndIndex(blockNumber, transactionIndex) {
|
|
2465
2452
|
const result = await this.transport.sendRequest("transactionViewer_transactionByBlockNumberAndIndex", [blockNumber, transactionIndex]);
|
|
2466
|
-
return result
|
|
2453
|
+
return result ?? null;
|
|
2467
2454
|
}
|
|
2468
2455
|
async transactionByHash(transactionHash) {
|
|
2469
2456
|
const result = await this.transport.sendRequest("transactionViewer_transactionByHash", [transactionHash]);
|
|
2470
|
-
return result
|
|
2457
|
+
return result ?? null;
|
|
2471
2458
|
}
|
|
2472
2459
|
schemas() {
|
|
2473
2460
|
return TransactionViewerRpcSchemas;
|
|
@@ -2859,10 +2846,10 @@ var networkTier3Descriptors = [
|
|
|
2859
2846
|
import { creatableProvider as creatableProvider14 } from "@xyo-network/xl1-protocol-sdk";
|
|
2860
2847
|
|
|
2861
2848
|
// src/provider/datalake/JsonRpcDataLakeViewerMethods.ts
|
|
2862
|
-
import { DataLakeViewerMoniker
|
|
2849
|
+
import { DataLakeViewerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
2863
2850
|
var JsonRpcDataLakeViewerMethods = class _JsonRpcDataLakeViewerMethods extends AbstractJsonRpcViewer {
|
|
2864
|
-
static defaultMoniker =
|
|
2865
|
-
static monikers = [
|
|
2851
|
+
static defaultMoniker = DataLakeViewerMoniker;
|
|
2852
|
+
static monikers = [DataLakeViewerMoniker];
|
|
2866
2853
|
moniker = _JsonRpcDataLakeViewerMethods.defaultMoniker;
|
|
2867
2854
|
get(_hashes) {
|
|
2868
2855
|
throw new Error("Method [get] not implemented.");
|