@xyo-network/xl1-providers 1.26.39 → 1.26.40
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 +42 -8
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/locators/baseConfigFactoryLocator.d.ts +17 -0
- package/dist/browser/locators/baseConfigFactoryLocator.d.ts.map +1 -0
- package/dist/browser/locators/createRestDataLake.d.ts +32 -0
- package/dist/browser/locators/createRestDataLake.d.ts.map +1 -0
- package/dist/browser/locators/index.d.ts +2 -0
- package/dist/browser/locators/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +42 -8
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/locators/baseConfigFactoryLocator.d.ts +17 -0
- package/dist/neutral/locators/baseConfigFactoryLocator.d.ts.map +1 -0
- package/dist/neutral/locators/createRestDataLake.d.ts +32 -0
- package/dist/neutral/locators/createRestDataLake.d.ts.map +1 -0
- package/dist/neutral/locators/index.d.ts +2 -0
- package/dist/neutral/locators/index.d.ts.map +1 -1
- package/dist/node/index.mjs +42 -8
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/locators/baseConfigFactoryLocator.d.ts +17 -0
- package/dist/node/locators/baseConfigFactoryLocator.d.ts.map +1 -0
- package/dist/node/locators/createRestDataLake.d.ts +32 -0
- package/dist/node/locators/createRestDataLake.d.ts.map +1 -0
- package/dist/node/locators/index.d.ts +2 -0
- package/dist/node/locators/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/browser/index.mjs
CHANGED
|
@@ -1327,10 +1327,24 @@ async function buildSimpleXyoSignerV2(context, account) {
|
|
|
1327
1327
|
return await locator.getInstance(XyoSignerMoniker);
|
|
1328
1328
|
}
|
|
1329
1329
|
|
|
1330
|
+
// src/locators/baseConfigFactoryLocator.ts
|
|
1331
|
+
import {
|
|
1332
|
+
BaseConfigZod,
|
|
1333
|
+
ProviderFactoryLocator as ProviderFactoryLocator4
|
|
1334
|
+
} from "@xyo-network/xl1-protocol-sdk";
|
|
1335
|
+
async function baseConfigFactoryLocator() {
|
|
1336
|
+
const config = BaseConfigZod.parse({});
|
|
1337
|
+
return new ProviderFactoryLocator4({
|
|
1338
|
+
config,
|
|
1339
|
+
singletons: {},
|
|
1340
|
+
caches: {}
|
|
1341
|
+
}, {});
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1330
1344
|
// src/locators/basicRemoteRunnerLocator.ts
|
|
1331
1345
|
import { isDefined as isDefined2 } from "@xylabs/sdk-js";
|
|
1332
1346
|
import {
|
|
1333
|
-
ProviderFactoryLocator as
|
|
1347
|
+
ProviderFactoryLocator as ProviderFactoryLocator8,
|
|
1334
1348
|
RestDataLakeViewer as RestDataLakeViewer2,
|
|
1335
1349
|
SimpleXyoGatewayRunner as SimpleXyoGatewayRunner2
|
|
1336
1350
|
} from "@xyo-network/xl1-protocol-sdk";
|
|
@@ -1340,7 +1354,7 @@ import { JsonRpcXyoRunner as JsonRpcXyoRunner3, JsonRpcXyoSigner } from "@xyo-ne
|
|
|
1340
1354
|
import { isDefined } from "@xylabs/sdk-js";
|
|
1341
1355
|
import {
|
|
1342
1356
|
ActorConfigZod,
|
|
1343
|
-
ProviderFactoryLocator as
|
|
1357
|
+
ProviderFactoryLocator as ProviderFactoryLocator7,
|
|
1344
1358
|
RestDataLakeViewer,
|
|
1345
1359
|
SimpleTransactionViewer as SimpleTransactionViewer2,
|
|
1346
1360
|
SimpleXyoGateway as SimpleXyoGateway2
|
|
@@ -1386,7 +1400,7 @@ SimpleXyoConnectionViewer = __decorateClass([
|
|
|
1386
1400
|
|
|
1387
1401
|
// src/locators/commonLocatorFromConfig.ts
|
|
1388
1402
|
import {
|
|
1389
|
-
ProviderFactoryLocator as
|
|
1403
|
+
ProviderFactoryLocator as ProviderFactoryLocator5,
|
|
1390
1404
|
SimpleBlockRewardViewer,
|
|
1391
1405
|
SimpleTimeSyncViewer as SimpleTimeSyncViewer3,
|
|
1392
1406
|
SimpleTransactionValidationViewer,
|
|
@@ -1394,7 +1408,7 @@ import {
|
|
|
1394
1408
|
SimpleWindowedBlockViewer as SimpleWindowedBlockViewer3
|
|
1395
1409
|
} from "@xyo-network/xl1-protocol-sdk";
|
|
1396
1410
|
function commonLocatorFromConfig(context, validateDepsOnRegister = false) {
|
|
1397
|
-
const locator = new
|
|
1411
|
+
const locator = new ProviderFactoryLocator5(context, {}, validateDepsOnRegister);
|
|
1398
1412
|
locator.registerMany([
|
|
1399
1413
|
SimpleNetworkStakeViewer.factory(SimpleNetworkStakeViewer.dependencies, {}),
|
|
1400
1414
|
SimpleTimeSyncViewer3.factory(SimpleTimeSyncViewer3.dependencies, {}),
|
|
@@ -1414,7 +1428,7 @@ function commonLocatorFromConfig(context, validateDepsOnRegister = false) {
|
|
|
1414
1428
|
|
|
1415
1429
|
// src/locators/remoteLocatorFromConfig.ts
|
|
1416
1430
|
import {
|
|
1417
|
-
ProviderFactoryLocator as
|
|
1431
|
+
ProviderFactoryLocator as ProviderFactoryLocator6,
|
|
1418
1432
|
SimpleBlockValidationViewer,
|
|
1419
1433
|
SimpleStakeEventsViewer as SimpleStakeEventsViewer3
|
|
1420
1434
|
} from "@xyo-network/xl1-protocol-sdk";
|
|
@@ -1430,7 +1444,7 @@ import {
|
|
|
1430
1444
|
JsonRpcXyoViewer as JsonRpcXyoViewer3
|
|
1431
1445
|
} from "@xyo-network/xl1-rpc";
|
|
1432
1446
|
function remoteLocatorFromConfig(context, validateDepsOnRegister = false, validators) {
|
|
1433
|
-
const locator = new
|
|
1447
|
+
const locator = new ProviderFactoryLocator6(context, {}, validateDepsOnRegister);
|
|
1434
1448
|
locator.registerMany([
|
|
1435
1449
|
JsonRpcMempoolViewer3.factory(JsonRpcMempoolViewer3.dependencies, {}),
|
|
1436
1450
|
JsonRpcMempoolRunner3.factory(JsonRpcMempoolRunner3.dependencies, {}),
|
|
@@ -1459,7 +1473,7 @@ async function basicRemoteViewerLocator(name, remoteConfig, dataLakeEndpoint, op
|
|
|
1459
1473
|
caches: {}
|
|
1460
1474
|
});
|
|
1461
1475
|
const remoteLocator = await remoteLocatorFromConfig(rootLocator.context, false, options?.validators);
|
|
1462
|
-
const locator = new
|
|
1476
|
+
const locator = new ProviderFactoryLocator7(remoteLocator.context, {});
|
|
1463
1477
|
locator.registerMany([
|
|
1464
1478
|
SimpleXyoGateway2.factory(SimpleXyoGateway2.dependencies, {}),
|
|
1465
1479
|
SimpleXyoConnectionViewer.factory(SimpleXyoConnectionViewer.dependencies, {}),
|
|
@@ -1477,7 +1491,7 @@ async function basicRemoteViewerLocator(name, remoteConfig, dataLakeEndpoint, op
|
|
|
1477
1491
|
// src/locators/basicRemoteRunnerLocator.ts
|
|
1478
1492
|
async function basicRemoteRunnerLocator(name, remoteConfig, signerTransport, dataLakeEndpoint, options) {
|
|
1479
1493
|
const remoteViewerLocator = await basicRemoteViewerLocator(name, remoteConfig, dataLakeEndpoint, options);
|
|
1480
|
-
const locator = new
|
|
1494
|
+
const locator = new ProviderFactoryLocator8(remoteViewerLocator.context, {});
|
|
1481
1495
|
const providers = [
|
|
1482
1496
|
SimpleXyoConnectionRunner.factory(SimpleXyoConnectionRunner.dependencies, {}),
|
|
1483
1497
|
JsonRpcXyoRunner3.factory(JsonRpcXyoRunner3.dependencies, {})
|
|
@@ -1506,6 +1520,23 @@ async function basicRemoteRunnerLocator(name, remoteConfig, signerTransport, dat
|
|
|
1506
1520
|
return locator;
|
|
1507
1521
|
}
|
|
1508
1522
|
|
|
1523
|
+
// src/locators/createRestDataLake.ts
|
|
1524
|
+
import { RestDataLakeRunner, RestDataLakeViewer as RestDataLakeViewer3 } from "@xyo-network/xl1-protocol-sdk";
|
|
1525
|
+
async function createRestDataLakeViewer(dataLakeEndpoint) {
|
|
1526
|
+
const locator = await baseConfigFactoryLocator();
|
|
1527
|
+
const dataLakeViewerParams = { endpoint: dataLakeEndpoint };
|
|
1528
|
+
locator.register(RestDataLakeViewer3.factory(RestDataLakeViewer3.dependencies, dataLakeViewerParams));
|
|
1529
|
+
locator.freeze();
|
|
1530
|
+
return await locator.getInstance(RestDataLakeViewer3.defaultMoniker);
|
|
1531
|
+
}
|
|
1532
|
+
async function createRestDataLakeRunner(dataLakeEndpoint) {
|
|
1533
|
+
const locator = await baseConfigFactoryLocator();
|
|
1534
|
+
const dataLakeRunnerParams = { endpoint: dataLakeEndpoint };
|
|
1535
|
+
locator.register(RestDataLakeRunner.factory(RestDataLakeRunner.dependencies, dataLakeRunnerParams));
|
|
1536
|
+
locator.freeze();
|
|
1537
|
+
return await locator.getInstance(RestDataLakeRunner.defaultMoniker);
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1509
1540
|
// src/locators/rootLocatorFromConfig.ts
|
|
1510
1541
|
import { assertEx as assertEx5 } from "@xylabs/sdk-js";
|
|
1511
1542
|
async function rootLocatorFromConfig(context, validateDepsOnRegister = false, validators) {
|
|
@@ -1782,6 +1813,7 @@ export {
|
|
|
1782
1813
|
SimpleXyoConnectionRunner,
|
|
1783
1814
|
SimpleXyoConnectionViewer,
|
|
1784
1815
|
SimpleXyoViewer,
|
|
1816
|
+
baseConfigFactoryLocator,
|
|
1785
1817
|
basicRemoteRunnerLocator,
|
|
1786
1818
|
basicRemoteViewerLocator,
|
|
1787
1819
|
buildEmptyProviderLocator,
|
|
@@ -1794,6 +1826,8 @@ export {
|
|
|
1794
1826
|
buildSimpleProviderLocatorV2,
|
|
1795
1827
|
buildSimpleXyoSignerV2,
|
|
1796
1828
|
commonLocatorFromConfig,
|
|
1829
|
+
createRestDataLakeRunner,
|
|
1830
|
+
createRestDataLakeViewer,
|
|
1797
1831
|
registerGatewayRunnerWithLocatorIfProvided,
|
|
1798
1832
|
registerGatewayWithLocator,
|
|
1799
1833
|
registerSimpleStakeViewerWithLocator,
|