@xyo-network/chain-bridge 1.19.14 → 1.19.16
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/node/BridgeActor.d.ts +3 -2
- package/dist/node/BridgeActor.d.ts.map +1 -1
- package/dist/node/config/getBridgeEscrowAddress.d.ts +3 -3
- package/dist/node/config/getBridgeEscrowAddress.d.ts.map +1 -1
- package/dist/node/config/getBridgeFeesAddress.d.ts +3 -3
- package/dist/node/config/getBridgeFeesAddress.d.ts.map +1 -1
- package/dist/node/config/getBridgeSettings.d.ts +2 -2
- package/dist/node/config/getBridgeSettings.d.ts.map +1 -1
- package/dist/node/config/getBridgeWalletAccount.d.ts +3 -3
- package/dist/node/config/getBridgeWalletAccount.d.ts.map +1 -1
- package/dist/node/config/getFeeStructure.d.ts +2 -2
- package/dist/node/config/getFeeStructure.d.ts.map +1 -1
- package/dist/node/config/getGateway.d.ts +3 -2
- package/dist/node/config/getGateway.d.ts.map +1 -1
- package/dist/node/config/getMaxBridgeAmount.d.ts +2 -2
- package/dist/node/config/getMaxBridgeAmount.d.ts.map +1 -1
- package/dist/node/config/getMinBridgeAmount.d.ts +2 -2
- package/dist/node/config/getMinBridgeAmount.d.ts.map +1 -1
- package/dist/node/config/getRemoteChainId.d.ts +3 -2
- package/dist/node/config/getRemoteChainId.d.ts.map +1 -1
- package/dist/node/config/getRemoteTokenAddress.d.ts +2 -2
- package/dist/node/config/getRemoteTokenAddress.d.ts.map +1 -1
- package/dist/node/config/getTransferAddresses.d.ts +2 -2
- package/dist/node/config/getTransferAddresses.d.ts.map +1 -1
- package/dist/node/config/getXl1ChainId.d.ts +3 -2
- package/dist/node/config/getXl1ChainId.d.ts.map +1 -1
- package/dist/node/config/getXl1TokenAddress.d.ts +2 -2
- package/dist/node/config/getXl1TokenAddress.d.ts.map +1 -1
- package/dist/node/index.mjs +178 -624
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/interface/service/Relay/LiquidityPoolBridgeRelay/LiquidityPoolBridgeRelay.d.ts +1 -1
- package/dist/node/interface/service/Relay/LiquidityPoolBridgeRelay/LiquidityPoolBridgeRelay.d.ts.map +1 -1
- package/dist/node/modules/EVMLiquidityBridgeTransactionCompletionMonitorSentinel/EVMLiquidityBridgeTransactionCompletionMonitorSentinel.d.ts +1 -2
- package/dist/node/modules/EVMLiquidityBridgeTransactionCompletionMonitorSentinel/EVMLiquidityBridgeTransactionCompletionMonitorSentinel.d.ts.map +1 -1
- package/dist/node/modules/XL1TransactionCompletionMonitorSentinel/XL1TransactionCompletionMonitorSentinel.d.ts +1 -2
- package/dist/node/modules/XL1TransactionCompletionMonitorSentinel/XL1TransactionCompletionMonitorSentinel.d.ts.map +1 -1
- package/dist/node/queue/connection.d.ts +2 -2
- package/dist/node/queue/connection.d.ts.map +1 -1
- package/dist/node/queue/workers/EthTransactionPreparation.d.ts.map +1 -1
- package/dist/node/queue/workers/util/index.d.ts +2 -0
- package/dist/node/queue/workers/util/index.d.ts.map +1 -1
- package/dist/node/queue/workers/util/validateSufficientAllowance.d.ts +19 -0
- package/dist/node/queue/workers/util/validateSufficientAllowance.d.ts.map +1 -0
- package/dist/node/queue/workers/util/validateSufficientBalance.d.ts +19 -0
- package/dist/node/queue/workers/util/validateSufficientBalance.d.ts.map +1 -0
- package/dist/node/server/addFlowProducer.d.ts +2 -2
- package/dist/node/server/addFlowProducer.d.ts.map +1 -1
- package/dist/node/server/addWorkers.d.ts +2 -2
- package/dist/node/server/addWorkers.d.ts.map +1 -1
- package/dist/node/server/app.d.ts +3 -3
- package/dist/node/server/app.d.ts.map +1 -1
- package/dist/node/server/index.d.ts +0 -2
- package/dist/node/server/index.d.ts.map +1 -1
- package/dist/node/server/routes/addRoutes.d.ts +3 -2
- package/dist/node/server/routes/addRoutes.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/addBridgeRoutes.d.ts +3 -2
- package/dist/node/server/routes/bridge/addBridgeRoutes.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/getRouteDefinitions.d.ts +3 -2
- package/dist/node/server/routes/bridge/routeDefinitions/getRouteDefinitions.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/pathParams/ChainIdPathParam.d.ts +2 -2
- package/dist/node/server/routes/bridge/routeDefinitions/pathParams/ChainIdPathParam.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeConfig.d.ts +2 -2
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeConfig.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeFromRemoteStatus.d.ts +2 -2
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeFromRemoteStatus.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeToRemote.d.ts +3 -3
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeToRemote.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteEstimate.d.ts +4 -3
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteEstimate.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteStatus.d.ts +2 -2
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteStatus.d.ts.map +1 -1
- package/dist/node/server/server.d.ts +3 -10
- package/dist/node/server/server.d.ts.map +1 -1
- package/dist/node/{manifest → services}/getIterableMap.d.ts +2 -2
- package/dist/node/services/getIterableMap.d.ts.map +1 -0
- package/dist/node/services/getServices.d.ts +9 -0
- package/dist/node/services/getServices.d.ts.map +1 -0
- package/dist/node/services/index.d.ts +1 -0
- package/dist/node/services/index.d.ts.map +1 -1
- package/dist/node/util/BridgeFees.d.ts +7 -0
- package/dist/node/util/BridgeFees.d.ts.map +1 -0
- package/dist/node/util/bridgeFeesAsBigInt.d.ts +7 -0
- package/dist/node/util/bridgeFeesAsBigInt.d.ts.map +1 -0
- package/dist/node/util/calculateBridgeFees.d.ts +4 -8
- package/dist/node/util/calculateBridgeFees.d.ts.map +1 -1
- package/dist/node/util/createBridgeTransfer.d.ts +14 -0
- package/dist/node/util/createBridgeTransfer.d.ts.map +1 -0
- package/dist/node/util/generateBridgeEstimate.d.ts +3 -2
- package/dist/node/util/generateBridgeEstimate.d.ts.map +1 -1
- package/dist/node/util/index.d.ts +3 -0
- package/dist/node/util/index.d.ts.map +1 -1
- package/dist/node/util/validateBridgeEstimate.d.ts +3 -2
- package/dist/node/util/validateBridgeEstimate.d.ts.map +1 -1
- package/dist/node/util/validateBridgeEstimateExact.d.ts +3 -2
- package/dist/node/util/validateBridgeEstimateExact.d.ts.map +1 -1
- package/dist/node/util/validateBridgeTransaction.d.ts +3 -2
- package/dist/node/util/validateBridgeTransaction.d.ts.map +1 -1
- package/package.json +46 -59
- package/src/BridgeActor.ts +3 -3
- package/src/config/getBridgeEscrowAddress.ts +5 -5
- package/src/config/getBridgeFeesAddress.ts +5 -5
- package/src/config/getBridgeSettings.ts +2 -2
- package/src/config/getBridgeWalletAccount.ts +7 -4
- package/src/config/getFeeStructure.ts +3 -3
- package/src/config/getGateway.ts +5 -4
- package/src/config/getMaxBridgeAmount.ts +3 -3
- package/src/config/getMinBridgeAmount.ts +3 -3
- package/src/config/getRemoteChainId.ts +4 -3
- package/src/config/getRemoteTokenAddress.ts +3 -3
- package/src/config/getTransferAddresses.ts +2 -2
- package/src/config/getXl1ChainId.ts +4 -3
- package/src/config/getXl1TokenAddress.ts +3 -3
- package/src/interface/service/Observer/LiquidityPoolBridgeObserver/LiquidityPoolBridgeObserver.ts +1 -1
- package/src/interface/service/Relay/LiquidityPoolBridgeRelay/LiquidityPoolBridgeRelay.ts +1 -1
- package/src/interface/util/getBridgeIntentIdentifier.ts +1 -1
- package/src/modules/EVMLiquidityBridgeTransactionCompletionMonitorSentinel/EVMLiquidityBridgeTransactionCompletionMonitorSentinel.ts +2 -3
- package/src/modules/XL1TransactionCompletionMonitorSentinel/XL1TransactionCompletionMonitorSentinel.ts +2 -3
- package/src/queue/connection.ts +3 -3
- package/src/queue/workers/EthTransactionMonitor.ts +1 -1
- package/src/queue/workers/EthTransactionPreparation.ts +14 -4
- package/src/queue/workers/EthTransactionSubmission.ts +1 -1
- package/src/queue/workers/Xl1TransactionMonitor.ts +1 -1
- package/src/queue/workers/Xl1TransactionPreparation.ts +1 -1
- package/src/queue/workers/Xl1TransactionSubmission.ts +1 -1
- package/src/queue/workers/util/index.ts +2 -0
- package/src/queue/workers/util/submitEthTransaction.ts +1 -1
- package/src/queue/workers/util/validateSufficientAllowance.ts +38 -0
- package/src/queue/workers/util/validateSufficientBalance.ts +37 -0
- package/src/server/addFlowProducer.ts +2 -2
- package/src/server/addWorkers.ts +2 -2
- package/src/server/app.ts +3 -4
- package/src/server/index.ts +2 -2
- package/src/server/routes/addRoutes.ts +3 -2
- package/src/server/routes/bridge/addBridgeRoutes.ts +3 -2
- package/src/server/routes/bridge/routeDefinitions/getRouteDefinitions.ts +3 -2
- package/src/server/routes/bridge/routeDefinitions/pathParams/ChainIdPathParam.ts +3 -2
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeConfig.ts +3 -2
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeFromRemoteStatus.ts +4 -3
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeToRemote.ts +6 -4
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteEstimate.ts +4 -3
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteStatus.ts +4 -5
- package/src/server/server.ts +7 -48
- package/src/{manifest → services}/getIterableMap.ts +2 -2
- package/src/{manifest → services}/getServices.ts +9 -13
- package/src/services/index.ts +1 -0
- package/src/util/BridgeFees.ts +7 -0
- package/src/util/bridgeFeesAsBigInt.ts +15 -0
- package/src/util/calculateBridgeFees.ts +5 -11
- package/src/util/createBridgeTransfer.ts +31 -0
- package/src/util/generateBridgeEstimate.ts +9 -17
- package/src/util/index.ts +3 -0
- package/src/util/validateBridgeEstimate.ts +4 -5
- package/src/util/validateBridgeEstimateExact.ts +4 -5
- package/src/util/validateBridgeTransaction.ts +4 -3
- package/dist/node/indexers/index.d.ts +0 -2
- package/dist/node/indexers/index.d.ts.map +0 -1
- package/dist/node/manifest/getIterableMap.d.ts.map +0 -1
- package/dist/node/manifest/getModuleLocator.d.ts +0 -15
- package/dist/node/manifest/getModuleLocator.d.ts.map +0 -1
- package/dist/node/manifest/getNode.d.ts +0 -15
- package/dist/node/manifest/getNode.d.ts.map +0 -1
- package/dist/node/manifest/getServices.d.ts +0 -13
- package/dist/node/manifest/getServices.d.ts.map +0 -1
- package/dist/node/manifest/index.d.ts +0 -7
- package/dist/node/manifest/index.d.ts.map +0 -1
- package/dist/node/manifest/nodeManifest.d.ts +0 -6
- package/dist/node/manifest/nodeManifest.d.ts.map +0 -1
- package/dist/node/manifest/private/index.d.ts +0 -5
- package/dist/node/manifest/private/index.d.ts.map +0 -1
- package/dist/node/manifest/public/index.d.ts +0 -14
- package/dist/node/manifest/public/index.d.ts.map +0 -1
- package/dist/node/server/routes/dataLake/addDataLakeRoutes.d.ts +0 -3
- package/dist/node/server/routes/dataLake/addDataLakeRoutes.d.ts.map +0 -1
- package/dist/node/server/routes/dataLake/archivistMiddleware.d.ts +0 -10
- package/dist/node/server/routes/dataLake/archivistMiddleware.d.ts.map +0 -1
- package/dist/node/server/routes/dataLake/index.d.ts +0 -2
- package/dist/node/server/routes/dataLake/index.d.ts.map +0 -1
- package/src/indexers/index.ts +0 -1
- package/src/manifest/getModuleLocator.ts +0 -153
- package/src/manifest/getNode.ts +0 -40
- package/src/manifest/index.ts +0 -6
- package/src/manifest/node.json +0 -17
- package/src/manifest/nodeManifest.ts +0 -8
- package/src/manifest/private/index.ts +0 -4
- package/src/manifest/public/Ethereum.json +0 -48
- package/src/manifest/public/XL1.json +0 -48
- package/src/manifest/public/index.ts +0 -23
- package/src/server/routes/dataLake/addDataLakeRoutes.ts +0 -9
- package/src/server/routes/dataLake/archivistMiddleware.ts +0 -85
- package/src/server/routes/dataLake/index.ts +0 -1
package/src/util/index.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export * from './BridgeFees.ts'
|
|
2
|
+
export * from './bridgeFeesAsBigInt.ts'
|
|
1
3
|
export * from './calculateBridgeFees.ts'
|
|
4
|
+
export * from './createBridgeTransfer.ts'
|
|
2
5
|
export * from './generateBridgeEstimate.ts'
|
|
3
6
|
export * from './getConfigFromEnv.ts'
|
|
4
7
|
export * from './validateBridgeEstimate.ts'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { hexToBigInt, isUndefined } from '@xylabs/sdk-js'
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
} from '@xyo-network/xl1-sdk'
|
|
2
|
+
import type { BridgeConfig } from '@xyo-network/chain-orchestration'
|
|
3
|
+
import type { BridgeIntent, Transfer } from '@xyo-network/xl1-sdk'
|
|
5
4
|
|
|
6
5
|
import { getBridgeSettings } from '../config/index.ts'
|
|
7
6
|
import { calculateBridgeFees } from './calculateBridgeFees.js'
|
|
@@ -18,7 +17,7 @@ import { calculateBridgeFees } from './calculateBridgeFees.js'
|
|
|
18
17
|
export const validateBridgeEstimate = async (
|
|
19
18
|
intent: BridgeIntent,
|
|
20
19
|
transfer: Transfer,
|
|
21
|
-
config:
|
|
20
|
+
config: BridgeConfig,
|
|
22
21
|
): Promise<boolean> => {
|
|
23
22
|
const {
|
|
24
23
|
escrowAddress, feeFixed, feeRateBasisPoints, feesAddress, remoteChainId, remoteTokenAddress, xl1ChainId, xl1TokenAddress,
|
|
@@ -53,7 +52,7 @@ export const validateBridgeEstimate = async (
|
|
|
53
52
|
if (feeAmount < expectedFeeTotal) return false
|
|
54
53
|
|
|
55
54
|
// 4. Check derived dest amount
|
|
56
|
-
if (hexToBigInt(intent.destAmount) !== hexToBigInt(fees.
|
|
55
|
+
if (hexToBigInt(intent.destAmount) !== hexToBigInt(fees.srcAmount)) {
|
|
57
56
|
return false
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { isUndefined } from '@xylabs/sdk-js'
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
} from '@xyo-network/xl1-sdk'
|
|
2
|
+
import type { BridgeConfig } from '@xyo-network/chain-orchestration'
|
|
3
|
+
import { PayloadBuilder } from '@xyo-network/sdk-js'
|
|
4
|
+
import type { BridgeIntent, Transfer } from '@xyo-network/xl1-sdk'
|
|
6
5
|
|
|
7
6
|
import { generateBridgeEstimate } from './generateBridgeEstimate.ts'
|
|
8
7
|
|
|
@@ -17,7 +16,7 @@ import { generateBridgeEstimate } from './generateBridgeEstimate.ts'
|
|
|
17
16
|
export const validateBridgeEstimateExact = async (
|
|
18
17
|
intent: BridgeIntent,
|
|
19
18
|
transfer: Transfer,
|
|
20
|
-
config:
|
|
19
|
+
config: BridgeConfig,
|
|
21
20
|
): Promise<boolean> => {
|
|
22
21
|
const {
|
|
23
22
|
srcAddress, srcAmount, destAddress,
|
|
@@ -2,9 +2,10 @@ import { asAddress, isDefined } from '@xylabs/sdk-js'
|
|
|
2
2
|
import {
|
|
3
3
|
addressesContains, BoundWitnessValidator, payloadHashesContainsAll,
|
|
4
4
|
} from '@xyo-network/boundwitness-validator'
|
|
5
|
-
import {
|
|
5
|
+
import type { BridgeConfig } from '@xyo-network/chain-orchestration'
|
|
6
|
+
import { PayloadBuilder } from '@xyo-network/sdk-js'
|
|
6
7
|
import type {
|
|
7
|
-
BridgeIntent,
|
|
8
|
+
BridgeIntent,
|
|
8
9
|
TransactionBoundWitness, Transfer,
|
|
9
10
|
} from '@xyo-network/xl1-sdk'
|
|
10
11
|
|
|
@@ -25,7 +26,7 @@ export const validateBridgeTransaction = async (
|
|
|
25
26
|
signedTxBw: TransactionBoundWitness,
|
|
26
27
|
intent: BridgeIntent,
|
|
27
28
|
transfer: Transfer,
|
|
28
|
-
config:
|
|
29
|
+
config: BridgeConfig,
|
|
29
30
|
): Promise<boolean> => {
|
|
30
31
|
const { srcAddress } = intent
|
|
31
32
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/indexers/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,OAAO,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getIterableMap.d.ts","sourceRoot":"","sources":["../../../src/manifest/getIterableMap.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAU,CAAC,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC,SAAS,QAAQ,GAAG,QAAQ,EACvF,QAAQ,MAAM,EACd,YAAY,MAAM,KACjB,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAkB3B,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '@xylabs/sdk-js';
|
|
2
|
-
import { ModuleFactoryLocator } from '@xyo-network/module-factory-locator';
|
|
3
|
-
import type { Config, ProviderFactoryLocator } from '@xyo-network/xl1-sdk';
|
|
4
|
-
export interface GetLocatorContext {
|
|
5
|
-
config: Config;
|
|
6
|
-
locator: ProviderFactoryLocator;
|
|
7
|
-
logger?: Logger;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Used for retrieving a locator with the necessary modules registered for testing
|
|
11
|
-
* operation of the node (entirely in memory)
|
|
12
|
-
* @returns A locator with the necessary modules registered
|
|
13
|
-
*/
|
|
14
|
-
export declare const getModuleLocator: (context: GetLocatorContext) => Promise<ModuleFactoryLocator>;
|
|
15
|
-
//# sourceMappingURL=getModuleLocator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getModuleLocator.d.ts","sourceRoot":"","sources":["../../../src/manifest/getModuleLocator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,MAAM,EAAE,MAAM,gBAAgB,CAAA;AASlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAG1E,OAAO,KAAK,EACoB,MAAM,EAAe,sBAAsB,EAC1E,MAAM,sBAAsB,CAAA;AAY7B,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,sBAAsB,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,iBAAiB,kCAuFhE,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Logger } from '@xylabs/sdk-js';
|
|
2
|
-
import type { WalletInstance } from '@xyo-network/wallet-model';
|
|
3
|
-
import type { Config } from '@xyo-network/xl1-sdk';
|
|
4
|
-
export interface GetNodeContext {
|
|
5
|
-
config: Config;
|
|
6
|
-
logger?: Logger;
|
|
7
|
-
wallet: WalletInstance;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Creates a node with the xyo-chain modules registered
|
|
11
|
-
* @param context The context to use for the node
|
|
12
|
-
* @returns A node with the xyo-chain modules registered
|
|
13
|
-
*/
|
|
14
|
-
export declare const getNode: (context: GetNodeContext) => Promise<import("@xyo-network/node-memory").MemoryNode<import("@xyo-network/node-memory").MemoryNodeParams, import("@xyo-network/node-model").NodeModuleEventData>>;
|
|
15
|
-
//# sourceMappingURL=getNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getNode.d.ts","sourceRoot":"","sources":["../../../src/manifest/getNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EACV,MAAM,EACP,MAAM,sBAAsB,CAAA;AAO7B,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,cAAc,CAAA;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAU,SAAS,cAAc,uKAgBpD,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '@xylabs/sdk-js';
|
|
2
|
-
import type { Config, XyoGatewayRunner } from '@xyo-network/xl1-sdk';
|
|
3
|
-
import type { IBridgeServiceCollection } from '../services/index.ts';
|
|
4
|
-
export interface GetServicesContext {
|
|
5
|
-
config: Config;
|
|
6
|
-
logger?: Logger;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Used for retrieving a service collection
|
|
10
|
-
* @returns A service collection
|
|
11
|
-
*/
|
|
12
|
-
export declare const getServices: (context: GetServicesContext, gateway: XyoGatewayRunner) => Promise<IBridgeServiceCollection>;
|
|
13
|
-
//# sourceMappingURL=getServices.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getServices.d.ts","sourceRoot":"","sources":["../../../src/manifest/getServices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAKlD,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGpE,OAAO,KAAK,EACE,wBAAwB,EACrC,MAAM,sBAAsB,CAAA;AAG7B,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAU,SAAS,kBAAkB,EAAE,SAAS,gBAAgB,KAAG,OAAO,CAAC,wBAAwB,CAsB1H,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nodeManifest.d.ts","sourceRoot":"","sources":["../../../src/manifest/nodeManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAIzE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAsB,sBAAsB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/manifest/private/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,qBAAqB,SAAK,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ModuleManifest, PackageManifestPayload } from '@xyo-network/manifest-model';
|
|
2
|
-
/**
|
|
3
|
-
* XL1 Node Manifest
|
|
4
|
-
*/
|
|
5
|
-
export declare const XL1NodeManifest: PackageManifestPayload;
|
|
6
|
-
/**
|
|
7
|
-
* Ethereum Node Manifest
|
|
8
|
-
*/
|
|
9
|
-
export declare const EthereumNodeManifest: PackageManifestPayload;
|
|
10
|
-
/**
|
|
11
|
-
* Public Child Manifests
|
|
12
|
-
*/
|
|
13
|
-
export declare const PublicChildManifests: ModuleManifest[];
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/manifest/public/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAMzF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAyB,sBAAsB,CAAA;AAE3E;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAA8B,sBAAsB,CAAA;AAErF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAAc,EAGhD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addDataLakeRoutes.d.ts","sourceRoot":"","sources":["../../../../../src/server/routes/dataLake/addDataLakeRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAItC,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAAO,SAI7C,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
-
import type { NodeInstance } from '@xyo-network/node-model';
|
|
3
|
-
import type { Router } from 'express';
|
|
4
|
-
type ArchivistMiddlewareOptions = {
|
|
5
|
-
archivistModuleIdentifier: ModuleIdentifier;
|
|
6
|
-
node: NodeInstance;
|
|
7
|
-
};
|
|
8
|
-
export declare const archivistMiddleware: (options: ArchivistMiddlewareOptions) => Router;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=archivistMiddleware.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archivistMiddleware.d.ts","sourceRoot":"","sources":["../../../../../src/server/routes/dataLake/archivistMiddleware.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAI3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAiBrC,KAAK,0BAA0B,GAAG;IAChC,yBAAyB,EAAE,gBAAgB,CAAA;IAC3C,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,SAAS,0BAA0B,KAAG,MAkDzE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/server/routes/dataLake/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
|
package/src/indexers/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const TODO = true
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { BaseMongoSdk, type BaseMongoSdkPrivateConfig } from '@xylabs/mongo'
|
|
2
|
-
import type { Hash, Logger } from '@xylabs/sdk-js'
|
|
3
|
-
import { assertEx, isDefined } from '@xylabs/sdk-js'
|
|
4
|
-
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
5
|
-
import { MongoDBArchivistV2 } from '@xyo-network/archivist-mongodb'
|
|
6
|
-
import { ViewArchivist } from '@xyo-network/archivist-view'
|
|
7
|
-
import { initEvmProvider } from '@xyo-network/chain-orchestration'
|
|
8
|
-
import { MongoMap } from '@xyo-network/chain-protocol'
|
|
9
|
-
import { initTelemetry } from '@xyo-network/chain-telemetry'
|
|
10
|
-
import { AbstractModule, LoggerModuleStatusReporter } from '@xyo-network/module-abstract'
|
|
11
|
-
import { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'
|
|
12
|
-
import type { MongoDBModuleParamsV2 } from '@xyo-network/module-model-mongodb'
|
|
13
|
-
import { MemorySentinel } from '@xyo-network/sentinel-memory'
|
|
14
|
-
import type {
|
|
15
|
-
BridgeDestinationObservation, Config, IterableMap, ProviderFactoryLocator, SignedHydratedTransaction, XyoGatewayRunner,
|
|
16
|
-
} from '@xyo-network/xl1-sdk'
|
|
17
|
-
import {
|
|
18
|
-
hasMongoConfig, mapToMapType, XyoGatewayRunnerMoniker,
|
|
19
|
-
} from '@xyo-network/xl1-sdk'
|
|
20
|
-
import type { Document } from 'mongodb'
|
|
21
|
-
|
|
22
|
-
import type { EVMLiquidityBridgeTransactionCompletionMonitorSentinelParams, XL1TransactionCompletionMonitorSentinelParams } from '../modules/index.ts'
|
|
23
|
-
import {
|
|
24
|
-
EVMLiquidityBridgeTransactionCompletionMonitorSentinel, EVMLiquidityBridgeTransactionCompletionMonitorSentinelConfigSchema,
|
|
25
|
-
XL1TransactionCompletionMonitorSentinel, XL1TransactionCompletionMonitorSentinelConfigSchema,
|
|
26
|
-
} from '../modules/index.ts'
|
|
27
|
-
|
|
28
|
-
export interface GetLocatorContext {
|
|
29
|
-
config: Config
|
|
30
|
-
locator: ProviderFactoryLocator
|
|
31
|
-
logger?: Logger
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Used for retrieving a locator with the necessary modules registered for testing
|
|
36
|
-
* operation of the node (entirely in memory)
|
|
37
|
-
* @returns A locator with the necessary modules registered
|
|
38
|
-
*/
|
|
39
|
-
export const getModuleLocator = async (context: GetLocatorContext) => {
|
|
40
|
-
const {
|
|
41
|
-
config, locator, logger,
|
|
42
|
-
} = context
|
|
43
|
-
const { otlpEndpoint } = config.telemetry?.otel ?? {}
|
|
44
|
-
const { path: endpoint = '/metrics', port: port = 9468 } = config.telemetry?.metrics?.scrape ?? {}
|
|
45
|
-
const { traceProvider, meterProvider } = await initTelemetry({
|
|
46
|
-
attributes: {
|
|
47
|
-
serviceName: 'xl1-bridge',
|
|
48
|
-
serviceVersion: '1.0.0',
|
|
49
|
-
},
|
|
50
|
-
otlpEndpoint,
|
|
51
|
-
metricsConfig: { endpoint, port },
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
if (isDefined(logger)) AbstractModule.defaultLogger = logger
|
|
55
|
-
const statusReporter = logger ? new LoggerModuleStatusReporter(logger) : undefined
|
|
56
|
-
|
|
57
|
-
const moduleLocator = new ModuleFactoryLocator()
|
|
58
|
-
// If there's a MongoDB configuration
|
|
59
|
-
const mongoConfig = config.storage?.mongo
|
|
60
|
-
if (hasMongoConfig(mongoConfig)) {
|
|
61
|
-
// Create the MongoDB SDK from the configuration
|
|
62
|
-
const {
|
|
63
|
-
connectionString: dbConnectionString, database: dbName, domain: dbDomain, password: dbPassword, username: dbUserName,
|
|
64
|
-
} = mongoConfig
|
|
65
|
-
const payloadSdkConfig: BaseMongoSdkPrivateConfig = {
|
|
66
|
-
dbConnectionString, dbDomain, dbName, dbPassword, dbUserName,
|
|
67
|
-
}
|
|
68
|
-
const params: Partial<MongoDBModuleParamsV2> = {
|
|
69
|
-
meterProvider, payloadSdkConfig, statusReporter, traceProvider,
|
|
70
|
-
}
|
|
71
|
-
// Register the MongoDB Archivist as the default
|
|
72
|
-
moduleLocator.register(MongoDBArchivistV2.factory(params), undefined, true)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
moduleLocator.register(MemoryArchivist.factory({
|
|
76
|
-
traceProvider, meterProvider, statusReporter,
|
|
77
|
-
}))
|
|
78
|
-
moduleLocator.register(MemorySentinel.factory({
|
|
79
|
-
traceProvider, meterProvider, statusReporter,
|
|
80
|
-
}))
|
|
81
|
-
moduleLocator.register(ViewArchivist.factory({
|
|
82
|
-
traceProvider, meterProvider, statusReporter,
|
|
83
|
-
}))
|
|
84
|
-
|
|
85
|
-
const gateway = await locator.getInstance<XyoGatewayRunner>(XyoGatewayRunnerMoniker)
|
|
86
|
-
const viewer = assertEx(gateway.connection.viewer, () => 'Gateway viewer is not defined')
|
|
87
|
-
const pendingXl1ToEthXl1BridgeIntentTransactions = await getIterableMap<Hash, SignedHydratedTransaction>(
|
|
88
|
-
config,
|
|
89
|
-
'liquidity_bridge_xl1_to_eth_xl1_pending',
|
|
90
|
-
)
|
|
91
|
-
const completedXl1ToEthXl1BridgeIntentTransactions = await getIterableMap<Hash, SignedHydratedTransaction>(
|
|
92
|
-
config,
|
|
93
|
-
'liquidity_bridge_xl1_to_eth_xl1_completed',
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
const xl1TransactionCompletionMonitorSentinelParams: XL1TransactionCompletionMonitorSentinelParams = {
|
|
97
|
-
completedTransactions: completedXl1ToEthXl1BridgeIntentTransactions,
|
|
98
|
-
config: { schema: XL1TransactionCompletionMonitorSentinelConfigSchema },
|
|
99
|
-
meterProvider,
|
|
100
|
-
pendingTransactions: pendingXl1ToEthXl1BridgeIntentTransactions,
|
|
101
|
-
statusReporter,
|
|
102
|
-
traceProvider,
|
|
103
|
-
viewer,
|
|
104
|
-
}
|
|
105
|
-
moduleLocator.register(XL1TransactionCompletionMonitorSentinel.factory(xl1TransactionCompletionMonitorSentinelParams))
|
|
106
|
-
|
|
107
|
-
const completedEthXl1BridgeTransactions = await getIterableMap<Hash, BridgeDestinationObservation>(
|
|
108
|
-
config,
|
|
109
|
-
'liquidity_bridge_eth_xl1_bridge_completed',
|
|
110
|
-
)
|
|
111
|
-
const provider = await initEvmProvider({ config })
|
|
112
|
-
const bridgeAddress = config.actors.bridge.remoteBridgeContractAddress
|
|
113
|
-
const evmLiquidityBridgeTransactionCompletionMonitorSentinelParams: EVMLiquidityBridgeTransactionCompletionMonitorSentinelParams = {
|
|
114
|
-
bridgeAddress,
|
|
115
|
-
completedTransactions: completedEthXl1BridgeTransactions,
|
|
116
|
-
config: { schema: EVMLiquidityBridgeTransactionCompletionMonitorSentinelConfigSchema },
|
|
117
|
-
meterProvider,
|
|
118
|
-
pendingTransactions: completedXl1ToEthXl1BridgeIntentTransactions,
|
|
119
|
-
provider,
|
|
120
|
-
statusReporter,
|
|
121
|
-
traceProvider,
|
|
122
|
-
}
|
|
123
|
-
moduleLocator.register(EVMLiquidityBridgeTransactionCompletionMonitorSentinel.factory(evmLiquidityBridgeTransactionCompletionMonitorSentinelParams))
|
|
124
|
-
|
|
125
|
-
return moduleLocator
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Gets an iterable map based on the storage instructions in the config
|
|
130
|
-
* @param config The config containing storage instructions
|
|
131
|
-
* @param collection The collection to use if using MongoDB for persistence
|
|
132
|
-
* @returns The iterable map
|
|
133
|
-
*/
|
|
134
|
-
const getIterableMap = async <K extends {} = string, V extends Document = Document>
|
|
135
|
-
(config: Config, collection: string): Promise<IterableMap<K, V>> => {
|
|
136
|
-
const mongoConfig = config.storage?.mongo
|
|
137
|
-
if (hasMongoConfig(mongoConfig)) {
|
|
138
|
-
const {
|
|
139
|
-
connectionString: dbConnectionString, database: dbName, domain: dbDomain, password: dbPassword, username: dbUserName,
|
|
140
|
-
} = mongoConfig
|
|
141
|
-
const payloadSdkConfig: BaseMongoSdkPrivateConfig = {
|
|
142
|
-
dbConnectionString, dbDomain, dbName, dbPassword, dbUserName,
|
|
143
|
-
}
|
|
144
|
-
const sdkBalanceSummaryMap = new BaseMongoSdk<V>({ ...payloadSdkConfig, collection })
|
|
145
|
-
const result = await MongoMap.create<MongoMap<K, V>>({
|
|
146
|
-
sdk: sdkBalanceSummaryMap,
|
|
147
|
-
getCache: { enabled: true, maxEntries: 5000 },
|
|
148
|
-
})
|
|
149
|
-
return result
|
|
150
|
-
} else {
|
|
151
|
-
return mapToMapType(new Map<K, V>())
|
|
152
|
-
}
|
|
153
|
-
}
|
package/src/manifest/getNode.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { assertEx, type Logger } from '@xylabs/sdk-js'
|
|
2
|
-
import { ManifestWrapper } from '@xyo-network/manifest-wrapper'
|
|
3
|
-
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
4
|
-
import type {
|
|
5
|
-
Config, RpcSchemaMap, TransportFactory,
|
|
6
|
-
} from '@xyo-network/xl1-sdk'
|
|
7
|
-
import { buildJsonRpcProviderLocator, HttpRpcTransport } from '@xyo-network/xl1-sdk'
|
|
8
|
-
|
|
9
|
-
import { getBridgeWalletAccount } from '../config/index.ts'
|
|
10
|
-
import { getModuleLocator } from './getModuleLocator.ts'
|
|
11
|
-
import { NodeManifest } from './nodeManifest.ts'
|
|
12
|
-
|
|
13
|
-
export interface GetNodeContext {
|
|
14
|
-
config: Config
|
|
15
|
-
logger?: Logger
|
|
16
|
-
wallet: WalletInstance
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Creates a node with the xyo-chain modules registered
|
|
21
|
-
* @param context The context to use for the node
|
|
22
|
-
* @returns A node with the xyo-chain modules registered
|
|
23
|
-
*/
|
|
24
|
-
export const getNode = async (context: GetNodeContext) => {
|
|
25
|
-
const { config, wallet } = context
|
|
26
|
-
const endpoint = assertEx(config.actors.bridge.remote?.rpc?.url ?? config.remote?.rpc?.url, () => 'RPC URL is required for Node')
|
|
27
|
-
const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(endpoint, schemas)
|
|
28
|
-
const signerAccount = await getBridgeWalletAccount(config)
|
|
29
|
-
const locator = await buildJsonRpcProviderLocator({ signerAccount, transportFactory })
|
|
30
|
-
|
|
31
|
-
const moduleLocator = await getModuleLocator({ ...context, locator })
|
|
32
|
-
// const wrapper = new ManifestWrapper(NodeManifest, wallet, moduleLocator, PublicChildManifests, PrivateChildManifests)
|
|
33
|
-
const wrapper = new ManifestWrapper(NodeManifest, wallet, moduleLocator, [], [])
|
|
34
|
-
const [node, ...childNodes] = await wrapper.loadNodes()
|
|
35
|
-
if (childNodes?.length > 0) {
|
|
36
|
-
await Promise.all(childNodes.map(childNode => node.register(childNode)))
|
|
37
|
-
await Promise.all(childNodes.map(childNode => node.attach(childNode.address, true)))
|
|
38
|
-
}
|
|
39
|
-
return node
|
|
40
|
-
}
|
package/src/manifest/index.ts
DELETED
package/src/manifest/node.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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": "XYOEthereumBridge",
|
|
8
|
-
"schema": "network.xyo.node.config"
|
|
9
|
-
},
|
|
10
|
-
"modules": {
|
|
11
|
-
"private": [],
|
|
12
|
-
"public": []
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"schema": "network.xyo.manifest"
|
|
17
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
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": "3",
|
|
7
|
-
"name": "Ethereum",
|
|
8
|
-
"schema": "network.xyo.node.config"
|
|
9
|
-
},
|
|
10
|
-
"modules": {
|
|
11
|
-
"private": [
|
|
12
|
-
{
|
|
13
|
-
"config": {
|
|
14
|
-
"accountPath": "1/1'/1'",
|
|
15
|
-
"automations": [
|
|
16
|
-
{
|
|
17
|
-
"frequency": 60000,
|
|
18
|
-
"frequencyUnits": "millis",
|
|
19
|
-
"schema": "network.xyo.automation.interval",
|
|
20
|
-
"type": "interval"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"name": "EVMLiquidityBridgeTransactionCompletionMonitorSentinelIntervalSentinel",
|
|
24
|
-
"schema": "network.xyo.sentinel.config",
|
|
25
|
-
"synchronous": true,
|
|
26
|
-
"tasks": [
|
|
27
|
-
{
|
|
28
|
-
"mod": "EVMLiquidityBridgeTransactionCompletionMonitorSentinel",
|
|
29
|
-
"endPoint": "report"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"public": [
|
|
36
|
-
{
|
|
37
|
-
"config": {
|
|
38
|
-
"accountPath": "1/1/1",
|
|
39
|
-
"name": "EVMLiquidityBridgeTransactionCompletionMonitorSentinel",
|
|
40
|
-
"schema": "network.xyo.sentinel.chain.evm.liquidity.bridge.transaction.completion.monitor.config"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"schema": "network.xyo.manifest"
|
|
48
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
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": "XL1",
|
|
8
|
-
"schema": "network.xyo.node.config"
|
|
9
|
-
},
|
|
10
|
-
"modules": {
|
|
11
|
-
"private": [
|
|
12
|
-
{
|
|
13
|
-
"config": {
|
|
14
|
-
"accountPath": "1/1'/1'",
|
|
15
|
-
"automations": [
|
|
16
|
-
{
|
|
17
|
-
"frequency": 60000,
|
|
18
|
-
"frequencyUnits": "millis",
|
|
19
|
-
"schema": "network.xyo.automation.interval",
|
|
20
|
-
"type": "interval"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"name": "XL1BridgeIntentTransactionCompletionMonitorSentinelIntervalSentinel",
|
|
24
|
-
"schema": "network.xyo.sentinel.config",
|
|
25
|
-
"synchronous": true,
|
|
26
|
-
"tasks": [
|
|
27
|
-
{
|
|
28
|
-
"mod": "XL1BridgeIntentTransactionCompletionMonitorSentinel",
|
|
29
|
-
"endPoint": "report"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"public": [
|
|
36
|
-
{
|
|
37
|
-
"config": {
|
|
38
|
-
"accountPath": "1/1/1",
|
|
39
|
-
"name": "XL1BridgeIntentTransactionCompletionMonitorSentinel",
|
|
40
|
-
"schema": "network.xyo.sentinel.chain.transaction.completion.monitor.config"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"schema": "network.xyo.manifest"
|
|
48
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ModuleManifest, PackageManifestPayload } from '@xyo-network/manifest-model'
|
|
2
|
-
|
|
3
|
-
import XL1Node from './XL1.json' with { type: 'json' }
|
|
4
|
-
import EthereumNode from './Ethereum.json' with { type: 'json' }
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* XL1 Node Manifest
|
|
9
|
-
*/
|
|
10
|
-
export const XL1NodeManifest = XL1Node as unknown as PackageManifestPayload
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Ethereum Node Manifest
|
|
14
|
-
*/
|
|
15
|
-
export const EthereumNodeManifest = EthereumNode as unknown as PackageManifestPayload
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Public Child Manifests
|
|
19
|
-
*/
|
|
20
|
-
export const PublicChildManifests: ModuleManifest[] = [
|
|
21
|
-
...XL1NodeManifest.nodes,
|
|
22
|
-
...EthereumNodeManifest.nodes,
|
|
23
|
-
]
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Express } from 'express'
|
|
2
|
-
|
|
3
|
-
import { archivistMiddleware } from './archivistMiddleware.ts'
|
|
4
|
-
|
|
5
|
-
export const addDataLakeRoutes = (app: Express) => {
|
|
6
|
-
const { node } = app
|
|
7
|
-
const archivistModuleIdentifier = 'Chain:Finalized'
|
|
8
|
-
app.use('/chain', archivistMiddleware({ node, archivistModuleIdentifier }))
|
|
9
|
-
}
|