@xyo-network/chain-orchestration 1.16.22 → 1.16.23

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.
Files changed (68) hide show
  1. package/dist/neutral/ConfigContext.d.ts +8 -0
  2. package/dist/neutral/ConfigContext.d.ts.map +1 -0
  3. package/dist/neutral/index.d.ts +3 -3
  4. package/dist/neutral/index.d.ts.map +1 -1
  5. package/dist/neutral/index.mjs +687 -21
  6. package/dist/neutral/index.mjs.map +1 -1
  7. package/dist/neutral/init/index.d.ts +9 -0
  8. package/dist/neutral/init/index.d.ts.map +1 -0
  9. package/dist/neutral/init/initBalanceSummaryMap.d.ts +5 -0
  10. package/dist/neutral/init/initBalanceSummaryMap.d.ts.map +1 -0
  11. package/dist/neutral/init/initBridgedModule.d.ts.map +1 -0
  12. package/dist/neutral/init/initChainStakeViewer.d.ts.map +1 -0
  13. package/dist/neutral/init/initProducerAccount.d.ts.map +1 -0
  14. package/dist/neutral/init/initSeedPhrase.d.ts +6 -0
  15. package/dist/neutral/init/initSeedPhrase.d.ts.map +1 -0
  16. package/dist/neutral/init/initServerNode.d.ts +16 -0
  17. package/dist/neutral/init/initServerNode.d.ts.map +1 -0
  18. package/dist/neutral/init/initServerWallet.d.ts +3 -0
  19. package/dist/neutral/init/initServerWallet.d.ts.map +1 -0
  20. package/dist/neutral/init/initTransferSummaryMap.d.ts +5 -0
  21. package/dist/neutral/init/initTransferSummaryMap.d.ts.map +1 -0
  22. package/dist/neutral/manifest/getLocator.d.ts +14 -0
  23. package/dist/neutral/manifest/getLocator.d.ts.map +1 -0
  24. package/dist/neutral/manifest/index.d.ts +6 -0
  25. package/dist/neutral/manifest/index.d.ts.map +1 -0
  26. package/dist/neutral/manifest/loadNode.d.ts +14 -0
  27. package/dist/neutral/manifest/loadNode.d.ts.map +1 -0
  28. package/dist/neutral/manifest/nodeManifest.d.ts +6 -0
  29. package/dist/neutral/manifest/nodeManifest.d.ts.map +1 -0
  30. package/dist/neutral/manifest/private/index.d.ts +5 -0
  31. package/dist/neutral/manifest/private/index.d.ts.map +1 -0
  32. package/dist/neutral/manifest/public/WithMempool/index.d.ts +6 -0
  33. package/dist/neutral/manifest/public/WithMempool/index.d.ts.map +1 -0
  34. package/dist/neutral/manifest/public/WithoutMempool/index.d.ts +6 -0
  35. package/dist/neutral/manifest/public/WithoutMempool/index.d.ts.map +1 -0
  36. package/dist/neutral/manifest/public/index.d.ts +3 -0
  37. package/dist/neutral/manifest/public/index.d.ts.map +1 -0
  38. package/package.json +24 -7
  39. package/src/ConfigContext.ts +9 -0
  40. package/src/index.ts +3 -3
  41. package/src/init/index.ts +8 -0
  42. package/src/init/initBalanceSummaryMap.ts +33 -0
  43. package/src/{initChainStakeViewer.ts → init/initChainStakeViewer.ts} +6 -3
  44. package/src/init/initSeedPhrase.ts +29 -0
  45. package/src/init/initServerNode.ts +45 -0
  46. package/src/init/initServerWallet.ts +17 -0
  47. package/src/init/initTransferSummaryMap.ts +33 -0
  48. package/src/manifest/getLocator.ts +103 -0
  49. package/src/manifest/index.ts +5 -0
  50. package/src/manifest/loadNode.ts +37 -0
  51. package/src/manifest/node.json +17 -0
  52. package/src/manifest/nodeManifest.ts +8 -0
  53. package/src/manifest/private/index.ts +4 -0
  54. package/src/manifest/public/WithMempool/Chain.json +175 -0
  55. package/src/manifest/public/WithMempool/Pending.json +35 -0
  56. package/src/manifest/public/WithMempool/index.ts +20 -0
  57. package/src/manifest/public/WithoutMempool/Chain.json +97 -0
  58. package/src/manifest/public/WithoutMempool/Pending.json +35 -0
  59. package/src/manifest/public/WithoutMempool/index.ts +20 -0
  60. package/src/manifest/public/index.ts +2 -0
  61. package/dist/neutral/initBridgedModule.d.ts.map +0 -1
  62. package/dist/neutral/initChainStakeViewer.d.ts.map +0 -1
  63. package/dist/neutral/initProducerAccount.d.ts.map +0 -1
  64. /package/dist/neutral/{initBridgedModule.d.ts → init/initBridgedModule.d.ts} +0 -0
  65. /package/dist/neutral/{initChainStakeViewer.d.ts → init/initChainStakeViewer.d.ts} +0 -0
  66. /package/dist/neutral/{initProducerAccount.d.ts → init/initProducerAccount.d.ts} +0 -0
  67. /package/src/{initBridgedModule.ts → init/initBridgedModule.ts} +0 -0
  68. /package/src/{initProducerAccount.ts → init/initProducerAccount.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  import {
2
- assertEx, type Logger, toEthAddress,
2
+ asAddress,
3
+ assertEx, type Logger, toAddress, toEthAddress,
3
4
  } from '@xylabs/sdk-js'
4
5
  import { EthereumChainStakeEvents, EthereumChainStakeViewer } from '@xyo-network/chain-sdk'
5
6
  import { StakedXyoChainV2__factory } from '@xyo-network/typechain'
@@ -8,7 +9,7 @@ import {
8
9
  type Config, SimpleChainStakeViewer, type StakeViewer,
9
10
  } from '@xyo-network/xl1-protocol-sdk'
10
11
 
11
- import { canUseEvmProvider, initEvmProvider } from './evm/index.ts'
12
+ import { canUseEvmProvider, initEvmProvider } from '../evm/index.ts'
12
13
 
13
14
  export async function initEvmChainStakeViewer(config: Config, logger?: Logger): Promise<StakeViewer> {
14
15
  const provider = await initEvmProvider({ config, logger })
@@ -24,7 +25,9 @@ export async function initEvmChainStakeViewer(config: Config, logger?: Logger):
24
25
  }
25
26
 
26
27
  export async function initSimpleStakeViewer(config: Config, logger?: Logger): Promise<StakeViewer> {
27
- const stakeChainViewer = await SimpleChainStakeViewer.create({ logger, positions: [] })
28
+ const stakeChainViewer = await SimpleChainStakeViewer.create({
29
+ chainId: asAddress(toAddress(1n), true), logger, positions: [],
30
+ })
28
31
  assertEx(await stakeChainViewer.start(), () => 'Failed to start SimpleChainStake viewer')
29
32
  return stakeChainViewer
30
33
  }
@@ -0,0 +1,29 @@
1
+ import { assertEx, isString } from '@xylabs/sdk-js'
2
+ import type { BiosExternalInterface } from '@xyo-network/bios-model'
3
+ import { HDWallet } from '@xyo-network/wallet'
4
+
5
+ import type { ConfigContext } from '../ConfigContext.ts'
6
+
7
+ // TODO: Make nodejs version of bios support round tripping mnemonic between boots
8
+ export async function initSeedPhrase({
9
+ config, logger, bios,
10
+ }: ConfigContext<{ bios: BiosExternalInterface }>): Promise<string> {
11
+ const storedSeedPhrase = await bios.seedPhraseStore.get('os')
12
+ logger?.debug(`[API] Stored mnemonic: ${storedSeedPhrase}`)
13
+ const { mnemonic } = config.api
14
+ if (isString(storedSeedPhrase) && isString(mnemonic)) {
15
+ logger?.warn('[API] Stored mnemonic does not match supplied. Updating stored mnemonic to supplied.')
16
+ await bios.seedPhraseStore.set('os', mnemonic)
17
+ } else {
18
+ let seedPhrase: string
19
+ if (isString(mnemonic)) {
20
+ seedPhrase = mnemonic
21
+ } else {
22
+ seedPhrase = HDWallet.generateMnemonic()
23
+ logger?.log('[API] No mnemonic provided, using random mnemonic. This is not recommended for production use.')
24
+ logger?.log(`[API] Mnemonic: ${seedPhrase}`)
25
+ }
26
+ await bios.seedPhraseStore.set('os', seedPhrase)
27
+ }
28
+ return assertEx(await bios.seedPhraseStore.get('os'), () => 'Unable to acquire mnemonic from bios')
29
+ }
@@ -0,0 +1,45 @@
1
+ import { assertEx } from '@xylabs/sdk-js'
2
+ import { asArchivistInstance } from '@xyo-network/archivist-model'
3
+ import type { NodeInstance } from '@xyo-network/node-model'
4
+ import type { WithStorageMeta } from '@xyo-network/payload-model'
5
+ import type { WalletInstance } from '@xyo-network/wallet-model'
6
+ import type {
7
+ BalancesStepSummary, MapType, TransfersStepSummary,
8
+ } from '@xyo-network/xl1-protocol-sdk'
9
+
10
+ import type { ConfigContext } from '../ConfigContext.ts'
11
+ import { loadNode } from '../manifest/index.ts'
12
+
13
+ async function chainArchivistFromNode(node: NodeInstance) {
14
+ const chainArchivist = assertEx(asArchivistInstance(
15
+ await node.resolve('Chain:Validated'),
16
+ { required: true },
17
+ ), () => 'FinalizedArchivist not found in node')
18
+ return chainArchivist
19
+ }
20
+
21
+ async function pendingArchivistFromNode(node: NodeInstance) {
22
+ const pendingArchivist = assertEx(asArchivistInstance(
23
+ await node.resolve('XYOChain:Pending:PendingTransactions'),
24
+ { required: true },
25
+ ), () => 'PendingArchivist not found in node')
26
+ return pendingArchivist
27
+ }
28
+
29
+ export async function initServerNode({
30
+ wallet, logger, config, node: providedNode, transferSummaryMap, balanceSummaryMap,
31
+ }: ConfigContext<{
32
+ balanceSummaryMap: MapType<string, WithStorageMeta<BalancesStepSummary>>
33
+ node?: NodeInstance
34
+ transferSummaryMap: MapType<string, WithStorageMeta<TransfersStepSummary>>
35
+ wallet: WalletInstance
36
+ }>) {
37
+ const node: NodeInstance = providedNode ?? await loadNode({
38
+ wallet, logger, config, transferSummaryMap, balanceSummaryMap,
39
+ })
40
+ const chainArchivist = await chainArchivistFromNode(node)
41
+ const pendingArchivist = await pendingArchivistFromNode(node)
42
+ return {
43
+ node, chainArchivist, pendingArchivist,
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ import { isDefined } from '@xylabs/sdk-js'
2
+ import { boot } from '@xyo-network/bios'
3
+ import { HDWallet } from '@xyo-network/wallet'
4
+
5
+ import type { ConfigContext } from '../ConfigContext.ts'
6
+ import { initSeedPhrase } from './initSeedPhrase.ts'
7
+
8
+ export async function initServerWallet({ config, logger }: ConfigContext) {
9
+ const { mnemonic } = config.api
10
+ const bios = await boot()
11
+ const seedPhrase = isDefined(mnemonic)
12
+ ? mnemonic
13
+ : await initSeedPhrase({
14
+ bios, config, logger,
15
+ })
16
+ return await HDWallet.fromPhrase(seedPhrase)
17
+ }
@@ -0,0 +1,33 @@
1
+ import { BaseMongoSdk, type BaseMongoSdkPrivateConfig } from '@xylabs/mongo'
2
+ import type { Hash } from '@xylabs/sdk-js'
3
+ import { assertEx } from '@xylabs/sdk-js'
4
+ import { MongoMap } from '@xyo-network/chain-protocol'
5
+ import type { WithStorageMeta } from '@xyo-network/payload-model'
6
+ import type { MapType, TransfersStepSummary } from '@xyo-network/xl1-protocol-sdk'
7
+ import { hasMongoConfig, MemoryMap } from '@xyo-network/xl1-protocol-sdk'
8
+
9
+ import type { ConfigContext } from '../ConfigContext.ts'
10
+
11
+ export async function initTransferSummaryMap({ config, logger }: ConfigContext): Promise<MapType<string, WithStorageMeta<TransfersStepSummary>>> {
12
+ const mongoConfig = config.storage?.mongo
13
+ if (hasMongoConfig(mongoConfig)) {
14
+ // Create the MongoDB SDK from the configuration
15
+ const {
16
+ connectionString: dbConnectionString, database: dbName, domain: dbDomain, password: dbPassword, username: dbUserName,
17
+ } = mongoConfig
18
+ const payloadSdkConfig: BaseMongoSdkPrivateConfig = {
19
+ dbConnectionString, dbDomain, dbName, dbPassword, dbUserName,
20
+ }
21
+
22
+ const sdkTransferSummaryMap = new BaseMongoSdk<WithStorageMeta<TransfersStepSummary>>({ ...payloadSdkConfig, collection: 'transfer_summary_map' })
23
+ const result = await MongoMap.create<MongoMap<Hash, WithStorageMeta<TransfersStepSummary>>>({
24
+ sdk: sdkTransferSummaryMap,
25
+ getCache: { enabled: true, maxEntries: 5000 },
26
+ })
27
+ assertEx(await result.start(), () => 'Failed to start transfer summary map')
28
+ return result
29
+ } else {
30
+ logger?.warn('[API] Mongo configuration not found. Using MemoryMap for TransferSummaryMap.')
31
+ return new MemoryMap<string, WithStorageMeta<TransfersStepSummary>>()
32
+ }
33
+ }
@@ -0,0 +1,103 @@
1
+ import { type BaseMongoSdkPrivateConfig } from '@xylabs/mongo'
2
+ import {
3
+ asAddress, assertEx, isDefined,
4
+ ZERO_ADDRESS,
5
+ } from '@xylabs/sdk-js'
6
+ import { MemoryArchivist } from '@xyo-network/archivist-memory'
7
+ import { MongoDBArchivistV2 } from '@xyo-network/archivist-mongodb'
8
+ import { ViewArchivist } from '@xyo-network/archivist-view'
9
+ import {
10
+ AddressBalanceDivinerV2, AddressTransferDiviner, ArchivistSyncDiviner, HeadValidationDiviner,
11
+ } from '@xyo-network/chain-modules'
12
+ import { initTelemetry } from '@xyo-network/chain-telemetry'
13
+ import { AbstractModule, LoggerModuleStatusReporter } from '@xyo-network/module-abstract'
14
+ import { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'
15
+ import type { MongoDBModuleParamsV2 } from '@xyo-network/module-model-mongodb'
16
+ import type { WithStorageMeta } from '@xyo-network/payload-model'
17
+ import { MemorySentinel } from '@xyo-network/sentinel-memory'
18
+ import { StepSizes } from '@xyo-network/xl1-protocol'
19
+ import type {
20
+ BalancesStepSummary, MapType, TransfersStepSummary,
21
+ } from '@xyo-network/xl1-protocol-sdk'
22
+ import { hasMongoConfig } from '@xyo-network/xl1-protocol-sdk'
23
+ import { Semaphore } from 'async-mutex'
24
+
25
+ import type { ConfigContext } from '../ConfigContext.ts'
26
+
27
+ /**
28
+ * Used for retrieving a locator with the necessary modules registered for testing
29
+ * operation of the node (entirely in memory)
30
+ * @returns A locator with the necessary modules registered
31
+ */
32
+ export const getLocator = async ({
33
+ config, logger, balanceSummaryMap, transferSummaryMap,
34
+ }: ConfigContext<{
35
+ balanceSummaryMap: MapType<string, WithStorageMeta<BalancesStepSummary>>
36
+ transferSummaryMap: MapType<string, WithStorageMeta<TransfersStepSummary>>
37
+ }>) => {
38
+ const { otlpEndpoint } = config.telemetry?.otel ?? {}
39
+ const { traceProvider, meterProvider } = await initTelemetry({
40
+ attributes: {
41
+ serviceName: 'xl1-api',
42
+ serviceVersion: '1.0.0',
43
+ },
44
+ otlpEndpoint,
45
+ metricsConfig: {
46
+ endpoint: '/metrics',
47
+ port: 9465,
48
+ },
49
+ })
50
+
51
+ if (isDefined(logger)) AbstractModule.defaultLogger = logger
52
+ const statusReporter = logger ? new LoggerModuleStatusReporter(logger) : undefined
53
+
54
+ const locator = new ModuleFactoryLocator()
55
+ // If there's a MongoDB configuration
56
+ const mongoConfig = config.storage?.mongo
57
+ if (hasMongoConfig(mongoConfig)) {
58
+ // Create the MongoDB SDK from the configuration
59
+ const {
60
+ connectionString: dbConnectionString, database: dbName, domain: dbDomain, password: dbPassword, username: dbUserName,
61
+ } = mongoConfig
62
+ const payloadSdkConfig: BaseMongoSdkPrivateConfig = {
63
+ dbConnectionString, dbDomain, dbName, dbPassword, dbUserName,
64
+ }
65
+ const params: Partial<MongoDBModuleParamsV2> = {
66
+ meterProvider, payloadSdkConfig, statusReporter, traceProvider,
67
+ }
68
+ // Register the MongoDB Archivist as the default
69
+ locator.register(MongoDBArchivistV2.factory(params), undefined, true)
70
+ }
71
+
72
+ locator.register(AddressBalanceDivinerV2.factory<AddressBalanceDivinerV2>({
73
+ traceProvider, meterProvider, statusReporter, summaryMap: balanceSummaryMap, stepSemaphores: StepSizes.map(() => new Semaphore(20)),
74
+ }))
75
+
76
+ locator.register(AddressTransferDiviner.factory<AddressTransferDiviner>({
77
+ traceProvider, meterProvider, statusReporter, summaryMap: transferSummaryMap, stepSemaphores: StepSizes.map(() => new Semaphore(20)),
78
+ }))
79
+
80
+ const chainId = isDefined(config.chain.id)
81
+ ? assertEx(asAddress(config.chain.id), () => 'chain.id must be an Address')
82
+ : ZERO_ADDRESS
83
+ locator.register(HeadValidationDiviner.factory<HeadValidationDiviner>({
84
+ traceProvider,
85
+ meterProvider,
86
+ statusReporter,
87
+ chainId,
88
+ allowedProducers: config.producer.allowlist,
89
+ }))
90
+ locator.register(MemoryArchivist.factory({
91
+ traceProvider, meterProvider, statusReporter,
92
+ }))
93
+ locator.register(MemorySentinel.factory({
94
+ traceProvider, meterProvider, statusReporter,
95
+ }))
96
+ locator.register(ViewArchivist.factory({
97
+ traceProvider, meterProvider, statusReporter,
98
+ }))
99
+ locator.register(ArchivistSyncDiviner.factory({
100
+ traceProvider, meterProvider, statusReporter,
101
+ }))
102
+ return locator
103
+ }
@@ -0,0 +1,5 @@
1
+ export * from './getLocator.ts'
2
+ export * from './loadNode.ts'
3
+ export * from './nodeManifest.ts'
4
+ export * from './private/index.ts'
5
+ export * from './public/index.ts'
@@ -0,0 +1,37 @@
1
+ import { ManifestWrapper } from '@xyo-network/manifest-wrapper'
2
+ import type { WithStorageMeta } from '@xyo-network/payload-model'
3
+ import type { WalletInstance } from '@xyo-network/wallet-model'
4
+ import type {
5
+ BalancesStepSummary, MapType, TransfersStepSummary,
6
+ } from '@xyo-network/xl1-protocol-sdk'
7
+
8
+ import type { ConfigContext } from '../ConfigContext.ts'
9
+ import { getLocator } from './getLocator.ts'
10
+ import { NodeManifest } from './nodeManifest.ts'
11
+ import { PrivateChildManifests } from './private/index.ts'
12
+ import { PublicChildManifestsWithMempool, PublicChildManifestsWithoutMempool } from './public/index.ts'
13
+
14
+ /**
15
+ * Creates a node with the xyo-chain modules registered
16
+ * @returns A node with the xyo-chain modules registered
17
+ */
18
+ export const loadNode = async ({
19
+ wallet, config, balanceSummaryMap, transferSummaryMap,
20
+ }: ConfigContext<{
21
+ balanceSummaryMap: MapType<string, WithStorageMeta<BalancesStepSummary>>
22
+ transferSummaryMap: MapType<string, WithStorageMeta<TransfersStepSummary>>
23
+ wallet: WalletInstance
24
+ }>) => {
25
+ const { enabled: mempoolEnabled } = config.mempool
26
+ const PublicChildManifests = mempoolEnabled ? PublicChildManifestsWithoutMempool : PublicChildManifestsWithMempool
27
+ const locator = await getLocator({
28
+ config, balanceSummaryMap, transferSummaryMap,
29
+ })
30
+ const wrapper = new ManifestWrapper(NodeManifest, wallet, locator, PublicChildManifests, PrivateChildManifests)
31
+ const [node, ...childNodes] = await wrapper.loadNodes()
32
+ if (childNodes?.length > 0) {
33
+ await Promise.all(childNodes.map(childNode => node.register(childNode)))
34
+ await Promise.all(childNodes.map(childNode => node.attach(childNode.address, true)))
35
+ }
36
+ return node
37
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/schema.json",
3
+ "nodes": [
4
+ {
5
+ "config": {
6
+ "accountPath": "44'/60'/1",
7
+ "name": "XYOChain",
8
+ "schema": "network.xyo.node.config"
9
+ },
10
+ "modules": {
11
+ "private": [],
12
+ "public": []
13
+ }
14
+ }
15
+ ],
16
+ "schema": "network.xyo.manifest"
17
+ }
@@ -0,0 +1,8 @@
1
+ import type { PackageManifestPayload } from '@xyo-network/manifest-model'
2
+
3
+ import node from './node.json' with { type: 'json' }
4
+
5
+ /**
6
+ * Root Node Manifest
7
+ */
8
+ export const NodeManifest = node as PackageManifestPayload
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Private Child Manifests
3
+ */
4
+ export const PrivateChildManifests = []
@@ -0,0 +1,175 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/schema.json",
3
+ "nodes": [
4
+ {
5
+ "config": {
6
+ "accountPath": "1",
7
+ "name": "Chain",
8
+ "schema": "network.xyo.node.config"
9
+ },
10
+ "modules": {
11
+ "private": [
12
+ {
13
+ "config": {
14
+ "accountPath": "1/1'/1'",
15
+ "name": "Validated",
16
+ "getCache": {
17
+ "enabled": true,
18
+ "maxEntries": 5000
19
+ },
20
+ "payloadSdkConfig": {
21
+ "collection": "chain_validated"
22
+ },
23
+ "schema": "network.xyo.archivist.config"
24
+ }
25
+ },
26
+ {
27
+ "config": {
28
+ "accountPath": "1/1'/2'",
29
+ "schema": "network.xyo.diviner.chain.head.validation.config",
30
+ "eventSubscriptions": [
31
+ {
32
+ "sourceEvent": "inserted",
33
+ "sourceModule": "Submissions",
34
+ "targetModuleFunction": "divine"
35
+ }
36
+ ],
37
+ "inArchivist": "Submissions",
38
+ "outArchivist": "Validated",
39
+ "name": "HeadValidationDiviner"
40
+ }
41
+ },
42
+ {
43
+ "config": {
44
+ "accountPath": "1/1'/3'",
45
+ "automations": [
46
+ {
47
+ "frequency": 1000,
48
+ "frequencyUnits": "millis",
49
+ "schema": "network.xyo.automation.interval",
50
+ "type": "interval"
51
+ }
52
+ ],
53
+ "name": "ChainValidationSentinel",
54
+ "schema": "network.xyo.sentinel.config",
55
+ "synchronous": true,
56
+ "tasks": [
57
+ {
58
+ "mod": "HeadValidationDiviner",
59
+ "endPoint": "divine"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "config": {
66
+ "accountPath": "1/1'/4'",
67
+ "automations": [
68
+ {
69
+ "frequency": 10000,
70
+ "frequencyUnits": "millis",
71
+ "schema": "network.xyo.automation.interval",
72
+ "type": "interval"
73
+ }
74
+ ],
75
+ "name": "AddressBalancePollingSentinel",
76
+ "schema": "network.xyo.sentinel.config",
77
+ "synchronous": true,
78
+ "tasks": [
79
+ {
80
+ "mod": "AddressBalanceDiviner",
81
+ "endPoint": "divine"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ {
87
+ "config": {
88
+ "accountPath": "1/1'/5'",
89
+ "automations": [
90
+ {
91
+ "frequency": 10000,
92
+ "frequencyUnits": "millis",
93
+ "schema": "network.xyo.automation.interval",
94
+ "type": "interval"
95
+ }
96
+ ],
97
+ "name": "AddressTransferPollingSentinel",
98
+ "schema": "network.xyo.sentinel.config",
99
+ "synchronous": true,
100
+ "tasks": [
101
+ {
102
+ "mod": "AddressTransferDiviner",
103
+ "endPoint": "divine"
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ ],
109
+ "public": [
110
+ {
111
+ "config": {
112
+ "accountPath": "1/1/1",
113
+ "name": "Submissions",
114
+ "getCache": {
115
+ "enabled": true,
116
+ "maxEntries": 5000
117
+ },
118
+ "payloadSdkConfig": {
119
+ "collection": "chain_submissions"
120
+ },
121
+ "schema": "network.xyo.archivist.config"
122
+ }
123
+ },
124
+ {
125
+ "config": {
126
+ "accountPath": "1/1/2",
127
+ "name": "Finalized",
128
+ "allowedQueries": [
129
+ "network.xyo.query.archivist.get",
130
+ "network.xyo.query.archivist.next"
131
+ ],
132
+ "getCache": {
133
+ "enabled": true,
134
+ "maxEntries": 50000
135
+ },
136
+ "originArchivist": "Validated",
137
+ "schema": "network.xyo.archivist.view.config"
138
+ }
139
+ },
140
+ {
141
+ "config": {
142
+ "accountPath": "1/1/3'",
143
+ "name": "AddressBalanceDiviner",
144
+ "schema": "network.xyo.diviner.chain.address.balance.config",
145
+ "map": {
146
+ "lmdb": {
147
+ "dbName": "summaries",
148
+ "storeName": "address_balance",
149
+ "location": ".store"
150
+ }
151
+ },
152
+ "archivist": "Validated"
153
+ }
154
+ },
155
+ {
156
+ "config": {
157
+ "accountPath": "1/1/4'",
158
+ "name": "AddressTransferDiviner",
159
+ "schema": "network.xyo.diviner.chain.address.transfer.config",
160
+ "map": {
161
+ "lmdb": {
162
+ "dbName": "summaries",
163
+ "storeName": "address_transfer",
164
+ "location": ".store"
165
+ }
166
+ },
167
+ "archivist": "Validated"
168
+ }
169
+ }
170
+ ]
171
+ }
172
+ }
173
+ ],
174
+ "schema": "network.xyo.manifest"
175
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/schema.json",
3
+ "nodes": [
4
+ {
5
+ "config": {
6
+ "accountPath": "2",
7
+ "name": "Pending",
8
+ "schema": "network.xyo.node.config"
9
+ },
10
+ "modules": {
11
+ "private": [],
12
+ "public": [
13
+ {
14
+ "config": {
15
+ "accountPath": "2/1/1",
16
+ "name": "PendingTransactions",
17
+ "getCache": {
18
+ "enabled": true,
19
+ "maxEntries": 5000
20
+ },
21
+ "labels": {
22
+ "network.xyo.storage.class": "mongodb"
23
+ },
24
+ "payloadSdkConfig": {
25
+ "collection": "pending_bundles"
26
+ },
27
+ "schema": "network.xyo.archivist.config"
28
+ }
29
+ }
30
+ ]
31
+ }
32
+ }
33
+ ],
34
+ "schema": "network.xyo.manifest"
35
+ }
@@ -0,0 +1,20 @@
1
+ import type { ModuleManifest, PackageManifestPayload } from '@xyo-network/manifest-model'
2
+
3
+ import Chain from './Chain.json' with { type: 'json' }
4
+ import Pending from './Pending.json' with { type: 'json' }
5
+
6
+ /**
7
+ * Chain Node Manifest
8
+ */
9
+ const ChainNodeManifest = Chain as PackageManifestPayload
10
+ /**
11
+ * Pending Node Manifest
12
+ */
13
+ const PendingNodeManifest = Pending as PackageManifestPayload
14
+ /**
15
+ * Public Child Manifests
16
+ */
17
+ export const PublicChildManifestsWithMempool: ModuleManifest[] = [
18
+ ...ChainNodeManifest.nodes,
19
+ ...PendingNodeManifest.nodes,
20
+ ]
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/schema.json",
3
+ "nodes": [
4
+ {
5
+ "config": {
6
+ "accountPath": "1",
7
+ "name": "Chain",
8
+ "schema": "network.xyo.node.config"
9
+ },
10
+ "modules": {
11
+ "private": [
12
+ {
13
+ "config": {
14
+ "accountPath": "1/1'/1'",
15
+ "name": "Validated",
16
+ "allowedQueries": [
17
+ "network.xyo.query.archivist.get",
18
+ "network.xyo.query.archivist.next"
19
+ ],
20
+ "getCache": {
21
+ "enabled": true,
22
+ "maxEntries": 5000
23
+ },
24
+ "payloadSdkConfig": {
25
+ "collection": "chain_validated"
26
+ },
27
+ "schema": "network.xyo.archivist.config"
28
+ }
29
+ }
30
+ ],
31
+ "public": [
32
+ {
33
+ "config": {
34
+ "accountPath": "1/1/1",
35
+ "name": "Submissions",
36
+ "getCache": {
37
+ "enabled": true,
38
+ "maxEntries": 5000
39
+ },
40
+ "payloadSdkConfig": {
41
+ "collection": "chain_submissions"
42
+ },
43
+ "schema": "network.xyo.archivist.config"
44
+ }
45
+ },
46
+ {
47
+ "config": {
48
+ "accountPath": "1/1/2",
49
+ "name": "Finalized",
50
+ "allowedQueries": [
51
+ "network.xyo.query.archivist.get",
52
+ "network.xyo.query.archivist.next"
53
+ ],
54
+ "getCache": {
55
+ "enabled": true,
56
+ "maxEntries": 50000
57
+ },
58
+ "originArchivist": "Validated",
59
+ "schema": "network.xyo.archivist.view.config"
60
+ }
61
+ },
62
+ {
63
+ "config": {
64
+ "accountPath": "1/1/3'",
65
+ "name": "AddressBalanceDiviner",
66
+ "schema": "network.xyo.diviner.chain.address.balance.config",
67
+ "map": {
68
+ "lmdb": {
69
+ "dbName": "summaries",
70
+ "storeName": "address_balance",
71
+ "location": ".store"
72
+ }
73
+ },
74
+ "archivist": "Validated"
75
+ }
76
+ },
77
+ {
78
+ "config": {
79
+ "accountPath": "1/1/4'",
80
+ "name": "AddressTransferDiviner",
81
+ "schema": "network.xyo.diviner.chain.address.transfer.config",
82
+ "map": {
83
+ "lmdb": {
84
+ "dbName": "summaries",
85
+ "storeName": "address_transfer",
86
+ "location": ".store"
87
+ }
88
+ },
89
+ "archivist": "Validated"
90
+ }
91
+ }
92
+ ]
93
+ }
94
+ }
95
+ ],
96
+ "schema": "network.xyo.manifest"
97
+ }