@xyo-network/chain-bridge 1.18.0 → 1.18.1
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/config/asChainId.d.ts +1 -1
- package/dist/node/config/asChainId.d.ts.map +1 -1
- package/dist/node/config/getBridgeEscrowAddress.d.ts +1 -1
- package/dist/node/config/getBridgeEscrowAddress.d.ts.map +1 -1
- package/dist/node/config/getBridgeFeesAddress.d.ts +1 -1
- package/dist/node/config/getBridgeFeesAddress.d.ts.map +1 -1
- package/dist/node/config/getBridgeSettings.d.ts +1 -1
- package/dist/node/config/getBridgeSettings.d.ts.map +1 -1
- package/dist/node/config/getBridgeWalletAccount.d.ts +1 -1
- package/dist/node/config/getBridgeWalletAccount.d.ts.map +1 -1
- package/dist/node/config/getFeeStructure.d.ts +1 -1
- package/dist/node/config/getFeeStructure.d.ts.map +1 -1
- package/dist/node/config/getGateway.d.ts +1 -1
- package/dist/node/config/getGateway.d.ts.map +1 -1
- package/dist/node/config/getMaxBridgeAmount.d.ts +1 -1
- package/dist/node/config/getMaxBridgeAmount.d.ts.map +1 -1
- package/dist/node/config/getMinBridgeAmount.d.ts +1 -1
- package/dist/node/config/getMinBridgeAmount.d.ts.map +1 -1
- package/dist/node/config/getRemoteChainId.d.ts +1 -2
- package/dist/node/config/getRemoteChainId.d.ts.map +1 -1
- package/dist/node/config/getRemoteTokenAddress.d.ts +1 -1
- package/dist/node/config/getRemoteTokenAddress.d.ts.map +1 -1
- package/dist/node/config/getTransferAddresses.d.ts +1 -1
- package/dist/node/config/getTransferAddresses.d.ts.map +1 -1
- package/dist/node/config/getXl1ChainId.d.ts +1 -2
- package/dist/node/config/getXl1ChainId.d.ts.map +1 -1
- package/dist/node/config/getXl1TokenAddress.d.ts +1 -1
- package/dist/node/config/getXl1TokenAddress.d.ts.map +1 -1
- package/dist/node/index.mjs +23 -24
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/interface/interface/ChainBridgeRelayInterface.d.ts +1 -1
- package/dist/node/interface/interface/ChainBridgeRelayInterface.d.ts.map +1 -1
- package/dist/node/interface/interface/ObservationIndexerInterface.d.ts +1 -1
- package/dist/node/interface/interface/ObservationIndexerInterface.d.ts.map +1 -1
- package/dist/node/interface/interface/Params.d.ts +1 -1
- package/dist/node/interface/interface/Params.d.ts.map +1 -1
- package/dist/node/interface/repository/RepositoryInterface.d.ts +1 -1
- package/dist/node/interface/repository/RepositoryInterface.d.ts.map +1 -1
- package/dist/node/interface/service/Observer/ERC20TransferObserver/ERC20TransferObserver.d.ts +3 -2
- package/dist/node/interface/service/Observer/ERC20TransferObserver/ERC20TransferObserver.d.ts.map +1 -1
- package/dist/node/interface/service/Observer/LiquidityPoolBridgeObserver/LiquidityPoolBridgeObserver.d.ts +3 -2
- package/dist/node/interface/service/Observer/LiquidityPoolBridgeObserver/LiquidityPoolBridgeObserver.d.ts.map +1 -1
- package/dist/node/interface/service/Observer/Observer.d.ts +2 -2
- package/dist/node/interface/service/Observer/Observer.d.ts.map +1 -1
- package/dist/node/interface/service/Relay/ChainBridgeRelay/ChainBridgeRelayInterface.d.ts +1 -1
- package/dist/node/interface/service/Relay/ChainBridgeRelay/ChainBridgeRelayInterface.d.ts.map +1 -1
- package/dist/node/interface/service/Relay/ChainBridgeRelay/ChainBridgeRelayService.d.ts +4 -3
- package/dist/node/interface/service/Relay/ChainBridgeRelay/ChainBridgeRelayService.d.ts.map +1 -1
- package/dist/node/interface/service/Relay/LiquidityPoolBridgeRelay/LiquidityPoolBridgeRelay.d.ts +4 -3
- package/dist/node/interface/service/Relay/LiquidityPoolBridgeRelay/LiquidityPoolBridgeRelay.d.ts.map +1 -1
- package/dist/node/interface/util/getBridgeIntentIdentifier.d.ts +1 -1
- package/dist/node/interface/util/getBridgeIntentIdentifier.d.ts.map +1 -1
- package/dist/node/manifest/getLocator.d.ts +1 -1
- package/dist/node/manifest/getLocator.d.ts.map +1 -1
- package/dist/node/manifest/getNode.d.ts +1 -1
- package/dist/node/manifest/getNode.d.ts.map +1 -1
- package/dist/node/manifest/getServices.d.ts +1 -1
- package/dist/node/manifest/getServices.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 +1 -1
- package/dist/node/queue/connection.d.ts.map +1 -1
- package/dist/node/queue/flows/createXl1ToEthBridgeJob.d.ts +1 -1
- package/dist/node/queue/flows/createXl1ToEthBridgeJob.d.ts.map +1 -1
- package/dist/node/server/app.d.ts +1 -1
- package/dist/node/server/app.d.ts.map +1 -1
- package/dist/node/server/flowProducer.d.ts +1 -1
- package/dist/node/server/flowProducer.d.ts.map +1 -1
- package/dist/node/server/routes/addRoutes.d.ts +1 -1
- package/dist/node/server/routes/addRoutes.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/addBridgeRoutes.d.ts +1 -1
- package/dist/node/server/routes/bridge/addBridgeRoutes.d.ts.map +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/getRouteDefinitions.d.ts +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/node/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteStatus.d.ts.map +1 -1
- package/dist/node/server/server.d.ts +1 -1
- package/dist/node/server/server.d.ts.map +1 -1
- package/dist/node/services/IBridgeServiceCollection.d.ts +1 -1
- package/dist/node/services/IBridgeServiceCollection.d.ts.map +1 -1
- package/dist/node/services/Xl1TxState.d.ts +1 -1
- package/dist/node/services/Xl1TxState.d.ts.map +1 -1
- package/dist/node/util/calculateBridgeFees.d.ts +1 -1
- package/dist/node/util/calculateBridgeFees.d.ts.map +1 -1
- package/dist/node/util/generateBridgeEstimate.d.ts +1 -2
- package/dist/node/util/generateBridgeEstimate.d.ts.map +1 -1
- package/dist/node/util/validateBridgeEstimate.d.ts +1 -2
- package/dist/node/util/validateBridgeEstimate.d.ts.map +1 -1
- package/dist/node/util/validateBridgeEstimateExact.d.ts +1 -2
- package/dist/node/util/validateBridgeEstimateExact.d.ts.map +1 -1
- package/dist/node/util/validateBridgeTransaction.d.ts +1 -2
- package/dist/node/util/validateBridgeTransaction.d.ts.map +1 -1
- package/package.json +58 -61
- package/src/config/asChainId.ts +1 -1
- package/src/config/getBridgeEscrowAddress.ts +1 -1
- package/src/config/getBridgeFeesAddress.ts +1 -1
- package/src/config/getBridgeSettings.ts +1 -1
- package/src/config/getBridgeWalletAccount.ts +2 -2
- package/src/config/getFeeStructure.ts +1 -1
- package/src/config/getGateway.ts +7 -7
- package/src/config/getMaxBridgeAmount.ts +1 -1
- package/src/config/getMinBridgeAmount.ts +1 -1
- package/src/config/getRemoteChainId.ts +1 -2
- package/src/config/getRemoteTokenAddress.ts +1 -1
- package/src/config/getTransferAddresses.ts +1 -1
- package/src/config/getXl1ChainId.ts +1 -2
- package/src/config/getXl1TokenAddress.ts +1 -1
- package/src/interface/interface/ChainBridgeRelayInterface.ts +1 -1
- package/src/interface/interface/ObservationIndexerInterface.ts +1 -1
- package/src/interface/interface/Params.ts +1 -1
- package/src/interface/repository/RepositoryInterface.ts +1 -1
- package/src/interface/service/Observer/ERC20TransferObserver/ERC20TransferObserver.ts +5 -4
- package/src/interface/service/Observer/LiquidityPoolBridgeObserver/LiquidityPoolBridgeObserver.ts +5 -4
- package/src/interface/service/Observer/Observer.ts +3 -3
- package/src/interface/service/Relay/ChainBridgeRelay/ChainBridgeRelayInterface.ts +1 -1
- package/src/interface/service/Relay/ChainBridgeRelay/ChainBridgeRelayService.ts +4 -3
- package/src/interface/service/Relay/LiquidityPoolBridgeRelay/LiquidityPoolBridgeRelay.ts +4 -3
- package/src/interface/util/getBridgeIntentIdentifier.ts +1 -1
- package/src/manifest/getLocator.ts +7 -7
- package/src/manifest/getNode.ts +1 -1
- package/src/manifest/getServices.ts +9 -9
- package/src/modules/EVMLiquidityBridgeTransactionCompletionMonitorSentinel/EVMLiquidityBridgeTransactionCompletionMonitorSentinel.ts +7 -6
- package/src/modules/XL1TransactionCompletionMonitorSentinel/XL1TransactionCompletionMonitorSentinel.ts +4 -4
- package/src/queue/connection.ts +1 -1
- package/src/queue/flows/createXl1ToEthBridgeJob.ts +1 -1
- package/src/queue/workers/ethTransactionMonitor.ts +1 -1
- package/src/queue/workers/ethTransactionPreparation.ts +1 -1
- 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/server/app.ts +1 -1
- package/src/server/flowProducer.ts +1 -1
- package/src/server/routes/addRoutes.ts +1 -1
- package/src/server/routes/bridge/addBridgeRoutes.ts +1 -1
- package/src/server/routes/bridge/routeDefinitions/getRouteDefinitions.ts +1 -1
- package/src/server/routes/bridge/routeDefinitions/pathParams/ChainIdPathParam.ts +1 -2
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeConfig.ts +1 -1
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeFromRemoteStatus.ts +2 -3
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeToRemote.ts +4 -4
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteEstimate.ts +2 -2
- package/src/server/routes/bridge/routeDefinitions/routes/bridgeToRemoteStatus.ts +4 -3
- package/src/server/server.ts +1 -1
- package/src/services/IBridgeServiceCollection.ts +1 -1
- package/src/services/Xl1TxState.ts +1 -1
- package/src/util/calculateBridgeFees.ts +1 -1
- package/src/util/generateBridgeEstimate.ts +4 -4
- package/src/util/validateBridgeEstimate.ts +3 -2
- package/src/util/validateBridgeEstimateExact.ts +3 -2
- package/src/util/validateBridgeTransaction.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateBridgeEstimate.d.ts","sourceRoot":"","sources":["../../../src/util/generateBridgeEstimate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAGzC,OAAO,KAAK,EACV,YAAY,EAAsB,
|
|
1
|
+
{"version":3,"file":"generateBridgeEstimate.d.ts","sourceRoot":"","sources":["../../../src/util/generateBridgeEstimate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAGzC,OAAO,KAAK,EACV,YAAY,EAAsB,MAAM,EACxC,QAAQ,EACT,MAAM,sBAAsB,CAAA;AAO7B,eAAO,MAAM,sBAAsB,GACjC,YAAY,GAAG,EACf,WAAW,GAAG,EACd,aAAa,GAAG,EAChB,QAAQ,MAAM,EACd,gBAAgB,MAAM,KACrB,OAAO,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CA2ClC,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { BridgeIntent, Transfer } from '@xyo-network/xl1-
|
|
2
|
-
import { type Config } from '@xyo-network/xl1-protocol-sdk';
|
|
1
|
+
import type { BridgeIntent, Config, Transfer } from '@xyo-network/xl1-sdk';
|
|
3
2
|
/**
|
|
4
3
|
* Validates a bridge estimate by checking the intent and transfer against the provided configuration. This method
|
|
5
4
|
* exists to allow for "at least" validation of a bridge estimates in case we want to allow for some flexibility in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateBridgeEstimate.d.ts","sourceRoot":"","sources":["../../../src/util/validateBridgeEstimate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"validateBridgeEstimate.d.ts","sourceRoot":"","sources":["../../../src/util/validateBridgeEstimate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAAE,MAAM,EAAE,QAAQ,EAC/B,MAAM,sBAAsB,CAAA;AAK7B;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,YAAY,EACpB,UAAU,QAAQ,EAClB,QAAQ,MAAM,KACb,OAAO,CAAC,OAAO,CAuCjB,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { BridgeIntent, Transfer } from '@xyo-network/xl1-
|
|
2
|
-
import { type Config } from '@xyo-network/xl1-protocol-sdk';
|
|
1
|
+
import type { BridgeIntent, Config, Transfer } from '@xyo-network/xl1-sdk';
|
|
3
2
|
/**
|
|
4
3
|
* Validates a bridge estimate by checking the intent and transfer against the provided configuration. This method
|
|
5
4
|
* only returns true if the bridge estimate matches exactly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateBridgeEstimateExact.d.ts","sourceRoot":"","sources":["../../../src/util/validateBridgeEstimateExact.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"validateBridgeEstimateExact.d.ts","sourceRoot":"","sources":["../../../src/util/validateBridgeEstimateExact.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAAE,MAAM,EAAE,QAAQ,EAC/B,MAAM,sBAAsB,CAAA;AAI7B;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,GACtC,QAAQ,YAAY,EACpB,UAAU,QAAQ,EAClB,QAAQ,MAAM,KACb,OAAO,CAAC,OAAO,CAcjB,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { BridgeIntent, TransactionBoundWitness, Transfer } from '@xyo-network/xl1-
|
|
2
|
-
import { type Config } from '@xyo-network/xl1-protocol-sdk';
|
|
1
|
+
import type { BridgeIntent, Config, TransactionBoundWitness, Transfer } from '@xyo-network/xl1-sdk';
|
|
3
2
|
/**
|
|
4
3
|
* Validates a bridge estimate by checking the intent and transfer against the provided configuration. This method
|
|
5
4
|
* exists to allow for "at least" validation of a bridge estimates in case we want to allow for some flexibility in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateBridgeTransaction.d.ts","sourceRoot":"","sources":["../../../src/util/validateBridgeTransaction.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EAAE,uBAAuB,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"validateBridgeTransaction.d.ts","sourceRoot":"","sources":["../../../src/util/validateBridgeTransaction.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EAAE,MAAM,EACpB,uBAAuB,EAAE,QAAQ,EAClC,MAAM,sBAAsB,CAAA;AAI7B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,GACpC,YAAY,uBAAuB,EACnC,QAAQ,YAAY,EACpB,UAAU,QAAQ,EAClB,QAAQ,MAAM,KACb,OAAO,CAAC,OAAO,CAgBjB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/chain-bridge",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.1",
|
|
4
4
|
"description": "XYO Layer One Bridge",
|
|
5
5
|
"homepage": "https://xylabs.com",
|
|
6
6
|
"bugs": {
|
|
@@ -49,82 +49,79 @@
|
|
|
49
49
|
"types": "tsc --noEmit -p tsconfig.test.json"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@opentelemetry/instrumentation": "~0.
|
|
53
|
-
"@opentelemetry/instrumentation-express": "~0.
|
|
54
|
-
"@opentelemetry/instrumentation-http": "~0.
|
|
55
|
-
"@xylabs/express": "~5.0.
|
|
56
|
-
"@xylabs/mongo": "~5.0.
|
|
57
|
-
"@xylabs/sdk-js": "~5.0.
|
|
58
|
-
"@xyo-network/archivist-memory": "~5.2.
|
|
59
|
-
"@xyo-network/archivist-mongodb": "~5.2.
|
|
60
|
-
"@xyo-network/archivist-view": "~5.2.
|
|
52
|
+
"@opentelemetry/instrumentation": "~0.210.0",
|
|
53
|
+
"@opentelemetry/instrumentation-express": "~0.58.0",
|
|
54
|
+
"@opentelemetry/instrumentation-http": "~0.210.0",
|
|
55
|
+
"@xylabs/express": "~5.0.61",
|
|
56
|
+
"@xylabs/mongo": "~5.0.61",
|
|
57
|
+
"@xylabs/sdk-js": "~5.0.61",
|
|
58
|
+
"@xyo-network/archivist-memory": "~5.2.22",
|
|
59
|
+
"@xyo-network/archivist-mongodb": "~5.2.22",
|
|
60
|
+
"@xyo-network/archivist-view": "~5.2.22",
|
|
61
61
|
"@xyo-network/bios": "~7.2.0",
|
|
62
|
-
"@xyo-network/boundwitness-validator": "~5.2.
|
|
63
|
-
"@xyo-network/chain-protocol": "~1.18.
|
|
64
|
-
"@xyo-network/chain-services": "~1.18.
|
|
65
|
-
"@xyo-network/chain-telemetry": "~1.18.
|
|
66
|
-
"@xyo-network/manifest-model": "~5.2.
|
|
67
|
-
"@xyo-network/manifest-wrapper": "~5.2.
|
|
68
|
-
"@xyo-network/module-abstract": "~5.2.
|
|
69
|
-
"@xyo-network/module-factory-locator": "~5.2.
|
|
70
|
-
"@xyo-network/module-model": "~5.2.
|
|
71
|
-
"@xyo-network/node-model": "~5.2.
|
|
72
|
-
"@xyo-network/payload-builder": "~5.2.
|
|
73
|
-
"@xyo-network/payload-model": "~5.2.
|
|
74
|
-
"@xyo-network/sentinel-abstract": "~5.2.
|
|
75
|
-
"@xyo-network/sentinel-memory": "~5.2.
|
|
76
|
-
"@xyo-network/sentinel-model": "~5.2.
|
|
62
|
+
"@xyo-network/boundwitness-validator": "~5.2.22",
|
|
63
|
+
"@xyo-network/chain-protocol": "~1.18.1",
|
|
64
|
+
"@xyo-network/chain-services": "~1.18.1",
|
|
65
|
+
"@xyo-network/chain-telemetry": "~1.18.1",
|
|
66
|
+
"@xyo-network/manifest-model": "~5.2.22",
|
|
67
|
+
"@xyo-network/manifest-wrapper": "~5.2.22",
|
|
68
|
+
"@xyo-network/module-abstract": "~5.2.22",
|
|
69
|
+
"@xyo-network/module-factory-locator": "~5.2.22",
|
|
70
|
+
"@xyo-network/module-model": "~5.2.22",
|
|
71
|
+
"@xyo-network/node-model": "~5.2.22",
|
|
72
|
+
"@xyo-network/payload-builder": "~5.2.22",
|
|
73
|
+
"@xyo-network/payload-model": "~5.2.22",
|
|
74
|
+
"@xyo-network/sentinel-abstract": "~5.2.22",
|
|
75
|
+
"@xyo-network/sentinel-memory": "~5.2.22",
|
|
76
|
+
"@xyo-network/sentinel-model": "~5.2.22",
|
|
77
77
|
"@xyo-network/typechain": "~4.0.11",
|
|
78
|
-
"@xyo-network/wallet": "~5.2.
|
|
79
|
-
"@xyo-network/wallet-model": "~5.2.
|
|
80
|
-
"@xyo-network/xl1-
|
|
81
|
-
"@xyo-network/xl1-protocol-sdk": "~1.18.0",
|
|
82
|
-
"@xyo-network/xl1-providers": "~1.18.0",
|
|
83
|
-
"@xyo-network/xl1-rpc": "~1.18.0",
|
|
78
|
+
"@xyo-network/wallet": "~5.2.22",
|
|
79
|
+
"@xyo-network/wallet-model": "~5.2.22",
|
|
80
|
+
"@xyo-network/xl1-sdk": "~1.18.2",
|
|
84
81
|
"async-mutex": "~0.5.0",
|
|
85
|
-
"bullmq": "~5.66.
|
|
82
|
+
"bullmq": "~5.66.5",
|
|
86
83
|
"compression": "~1.8.1",
|
|
87
84
|
"cors": "~2.8.5",
|
|
88
85
|
"ethers": "^6.16.0",
|
|
89
86
|
"express": "~5.2.1",
|
|
90
|
-
"ioredis": "
|
|
87
|
+
"ioredis": "5.9.1",
|
|
91
88
|
"uuid": "~13.0.0",
|
|
92
|
-
"zod": "~4.1
|
|
89
|
+
"zod": "~4.2.1"
|
|
93
90
|
},
|
|
94
91
|
"devDependencies": {
|
|
95
92
|
"@opentelemetry/api": "^1.9.0",
|
|
96
93
|
"@types/compression": "~1.8.1",
|
|
97
94
|
"@types/cors": "~2.8.19",
|
|
98
95
|
"@types/express": "5.0.6",
|
|
99
|
-
"@types/express-serve-static-core": "~5.1.
|
|
100
|
-
"@types/node": "~25.0.
|
|
101
|
-
"@xylabs/mongo": "~5.0.
|
|
102
|
-
"@xylabs/sdk-js": "~5.0.
|
|
96
|
+
"@types/express-serve-static-core": "~5.1.1",
|
|
97
|
+
"@types/node": "~25.0.8",
|
|
98
|
+
"@xylabs/mongo": "~5.0.61",
|
|
99
|
+
"@xylabs/sdk-js": "~5.0.61",
|
|
103
100
|
"@xylabs/ts-scripts-yarn3": "~7.2.32",
|
|
104
101
|
"@xylabs/tsconfig": "~7.2.32",
|
|
105
|
-
"@xylabs/vitest-extended": "~5.0.
|
|
106
|
-
"@xyo-network/account": "~5.2.
|
|
107
|
-
"@xyo-network/account-model": "~5.2.
|
|
108
|
-
"@xyo-network/archivist-abstract": "~5.2.
|
|
109
|
-
"@xyo-network/archivist-memory": "~5.2.
|
|
110
|
-
"@xyo-network/archivist-model": "~5.2.
|
|
111
|
-
"@xyo-network/archivist-mongodb": "~5.2.
|
|
112
|
-
"@xyo-network/archivist-view": "~5.2.
|
|
102
|
+
"@xylabs/vitest-extended": "~5.0.61",
|
|
103
|
+
"@xyo-network/account": "~5.2.22",
|
|
104
|
+
"@xyo-network/account-model": "~5.2.22",
|
|
105
|
+
"@xyo-network/archivist-abstract": "~5.2.22",
|
|
106
|
+
"@xyo-network/archivist-memory": "~5.2.22",
|
|
107
|
+
"@xyo-network/archivist-model": "~5.2.22",
|
|
108
|
+
"@xyo-network/archivist-mongodb": "~5.2.22",
|
|
109
|
+
"@xyo-network/archivist-view": "~5.2.22",
|
|
113
110
|
"@xyo-network/bios": "~7.2.0",
|
|
114
111
|
"@xyo-network/bios-model": "~7.2.0",
|
|
115
|
-
"@xyo-network/boundwitness-builder": "~5.2.
|
|
116
|
-
"@xyo-network/chain-protocol": "~1.18.
|
|
117
|
-
"@xyo-network/chain-services": "~1.18.
|
|
118
|
-
"@xyo-network/chain-telemetry": "~1.18.
|
|
119
|
-
"@xyo-network/manifest-wrapper": "~5.2.
|
|
120
|
-
"@xyo-network/module-abstract": "~5.2.
|
|
121
|
-
"@xyo-network/module-abstract-mongodb": "~5.2.
|
|
122
|
-
"@xyo-network/module-model-mongodb": "~5.2.
|
|
123
|
-
"@xyo-network/node-memory": "~5.2.
|
|
124
|
-
"@xyo-network/payload-builder": "~5.2.
|
|
125
|
-
"@xyo-network/sentinel-memory": "~5.2.
|
|
126
|
-
"@xyo-network/wallet": "~5.2.
|
|
127
|
-
"@xyo-network/xl1-
|
|
112
|
+
"@xyo-network/boundwitness-builder": "~5.2.22",
|
|
113
|
+
"@xyo-network/chain-protocol": "~1.18.1",
|
|
114
|
+
"@xyo-network/chain-services": "~1.18.1",
|
|
115
|
+
"@xyo-network/chain-telemetry": "~1.18.1",
|
|
116
|
+
"@xyo-network/manifest-wrapper": "~5.2.22",
|
|
117
|
+
"@xyo-network/module-abstract": "~5.2.22",
|
|
118
|
+
"@xyo-network/module-abstract-mongodb": "~5.2.22",
|
|
119
|
+
"@xyo-network/module-model-mongodb": "~5.2.22",
|
|
120
|
+
"@xyo-network/node-memory": "~5.2.22",
|
|
121
|
+
"@xyo-network/payload-builder": "~5.2.22",
|
|
122
|
+
"@xyo-network/sentinel-memory": "~5.2.22",
|
|
123
|
+
"@xyo-network/wallet": "~5.2.22",
|
|
124
|
+
"@xyo-network/xl1-sdk": "~1.18.2",
|
|
128
125
|
"async-mutex": "~0.5.0",
|
|
129
126
|
"dotenv": "~17.2.3",
|
|
130
127
|
"eslint": "^9.39.2",
|
|
@@ -134,7 +131,7 @@
|
|
|
134
131
|
"nodemon": "~3.1.11",
|
|
135
132
|
"tslib": "~2.8.1",
|
|
136
133
|
"typescript": "~5.9.3",
|
|
137
|
-
"vitest": "~4.0.
|
|
134
|
+
"vitest": "~4.0.17",
|
|
138
135
|
"vitest-mock-extended": "~3.1.0"
|
|
139
136
|
},
|
|
140
137
|
"engines": {
|
|
@@ -144,4 +141,4 @@
|
|
|
144
141
|
"publishConfig": {
|
|
145
142
|
"access": "restricted"
|
|
146
143
|
}
|
|
147
|
-
}
|
|
144
|
+
}
|
package/src/config/asChainId.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/sdk-js'
|
|
2
2
|
import { asAddress, assertEx } from '@xylabs/sdk-js'
|
|
3
|
-
import type { Config } from '@xyo-network/xl1-
|
|
3
|
+
import type { Config } from '@xyo-network/xl1-sdk'
|
|
4
4
|
|
|
5
5
|
export const tryGetBridgeEscrowAddress = (config: Config): Address | undefined => {
|
|
6
6
|
const address = asAddress(config.bridge.escrowAddress)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/sdk-js'
|
|
2
2
|
import { asAddress, assertEx } from '@xylabs/sdk-js'
|
|
3
|
-
import type { Config } from '@xyo-network/xl1-
|
|
3
|
+
import type { Config } from '@xyo-network/xl1-sdk'
|
|
4
4
|
|
|
5
5
|
export const tryGetBridgeFeesAddress = (config: Config): Address | undefined => {
|
|
6
6
|
const address = asAddress(config.bridge.feesAddress)
|
|
@@ -2,8 +2,8 @@ import type { Address, Promisable } from '@xylabs/sdk-js'
|
|
|
2
2
|
import { isDefined, isUndefined } from '@xylabs/sdk-js'
|
|
3
3
|
import { HDWallet } from '@xyo-network/wallet'
|
|
4
4
|
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
5
|
-
import type { Config } from '@xyo-network/xl1-
|
|
6
|
-
import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-
|
|
5
|
+
import type { Config } from '@xyo-network/xl1-sdk'
|
|
6
|
+
import { ADDRESS_INDEX, generateXyoBaseWalletFromPhrase } from '@xyo-network/xl1-sdk'
|
|
7
7
|
|
|
8
8
|
let accountServiceSingleton: Promisable<WalletInstance> | undefined
|
|
9
9
|
|
package/src/config/getGateway.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { isDefined } from '@xylabs/sdk-js'
|
|
2
2
|
import { HDWallet } from '@xyo-network/wallet'
|
|
3
3
|
import type {
|
|
4
|
-
Config,
|
|
5
|
-
|
|
4
|
+
Config, RpcSchemaMap, TransportFactory,
|
|
5
|
+
XyoConnection, XyoGatewayRunner,
|
|
6
|
+
} from '@xyo-network/xl1-sdk'
|
|
6
7
|
import {
|
|
8
|
+
buildJsonRpcProviderLocator,
|
|
9
|
+
HttpRpcTransport,
|
|
7
10
|
SimpleXyoGatewayRunner, SimpleXyoSigner, XyoConnectionMoniker,
|
|
8
|
-
} from '@xyo-network/xl1-
|
|
9
|
-
import { buildJsonRpcProviderLocator } from '@xyo-network/xl1-providers'
|
|
10
|
-
import type { RpcSchemaMap, TransportFactory } from '@xyo-network/xl1-rpc'
|
|
11
|
-
import { HttpRpcTransport } from '@xyo-network/xl1-rpc'
|
|
11
|
+
} from '@xyo-network/xl1-sdk'
|
|
12
12
|
|
|
13
13
|
let gatewayInstance: XyoGatewayRunner | undefined
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@ export const getGateway = async (config: Config): Promise<XyoGatewayRunner> => {
|
|
|
17
17
|
const { mnemonic, chainRpcApiUrl: endpoint } = config.bridge
|
|
18
18
|
const walletPromise = isDefined(mnemonic) ? HDWallet.fromPhrase(mnemonic) : HDWallet.random()
|
|
19
19
|
const account = await walletPromise
|
|
20
|
-
const signer =
|
|
20
|
+
const signer = await SimpleXyoSigner.create({ account })
|
|
21
21
|
const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(endpoint, schemas)
|
|
22
22
|
const locator = await buildJsonRpcProviderLocator({ transportFactory })
|
|
23
23
|
const connection = await locator.getInstance<XyoConnection>(XyoConnectionMoniker)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/sdk-js'
|
|
2
|
-
import type { ChainId } from '@xyo-network/xl1-
|
|
3
|
-
import type { Config } from '@xyo-network/xl1-protocol-sdk'
|
|
2
|
+
import type { ChainId, Config } from '@xyo-network/xl1-sdk'
|
|
4
3
|
|
|
5
4
|
import { asChainId } from './asChainId.ts'
|
|
6
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/sdk-js'
|
|
2
|
-
import type { Config } from '@xyo-network/xl1-
|
|
2
|
+
import type { Config } from '@xyo-network/xl1-sdk'
|
|
3
3
|
|
|
4
4
|
import { tryGetBridgeEscrowAddress } from './getBridgeEscrowAddress.ts'
|
|
5
5
|
import { tryGetBridgeFeesAddress } from './getBridgeFeesAddress.ts'
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { assertEx, isDefined } from '@xylabs/sdk-js'
|
|
2
|
-
import type { ChainId } from '@xyo-network/xl1-
|
|
3
|
-
import type { Config } from '@xyo-network/xl1-protocol-sdk'
|
|
2
|
+
import type { ChainId, Config } from '@xyo-network/xl1-sdk'
|
|
4
3
|
|
|
5
4
|
import { asChainId } from './asChainId.ts'
|
|
6
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Hex } from '@xylabs/sdk-js'
|
|
2
2
|
import { isDefined } from '@xylabs/sdk-js'
|
|
3
|
-
import type { Config } from '@xyo-network/xl1-
|
|
3
|
+
import type { Config } from '@xyo-network/xl1-sdk'
|
|
4
4
|
|
|
5
5
|
import { asToken } from './asToken.ts'
|
|
6
6
|
import { getXl1ChainId } from './getXl1ChainId.ts'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BridgeDestinationObservation, BridgeIntent } from '@xyo-network/xl1-
|
|
1
|
+
import type { BridgeDestinationObservation, BridgeIntent } from '@xyo-network/xl1-sdk'
|
|
2
2
|
|
|
3
3
|
import type { AsynchronousRelayInterface, SynchronousRelayInterface } from './RelayInterface.ts'
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
BridgeDestinationObservation, BridgeIntent, BridgeSourceObservation,
|
|
3
|
-
} from '@xyo-network/xl1-
|
|
3
|
+
} from '@xyo-network/xl1-sdk'
|
|
4
4
|
|
|
5
5
|
export interface ObservationIndexerInterface<
|
|
6
6
|
TObservation extends BridgeSourceObservation | BridgeDestinationObservation,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type BaseAccountableServiceParams } from '@xyo-network/chain-services'
|
|
2
2
|
import type {
|
|
3
3
|
BridgeDestinationObservation, BridgeIntent, BridgeSourceObservation,
|
|
4
|
-
} from '@xyo-network/xl1-
|
|
4
|
+
} from '@xyo-network/xl1-sdk'
|
|
5
5
|
|
|
6
6
|
import type { ChainBridgeRelayInterface } from './ChainBridgeRelayInterface.ts'
|
|
7
7
|
import type { IntentIndexerInterface } from './IntentIndexerInterface.ts'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/sdk-js'
|
|
2
2
|
import type {
|
|
3
3
|
BridgeDestinationObservation, BridgeIntent, BridgeSourceObservation,
|
|
4
|
-
} from '@xyo-network/xl1-
|
|
4
|
+
} from '@xyo-network/xl1-sdk'
|
|
5
5
|
|
|
6
6
|
export interface IntentRepository {
|
|
7
7
|
getBridgeIntents(src: Address, nonce?: string): Promise<BridgeIntent[]>
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
asAddress, asHex, hexToBigInt, isBigInt, isNull, isUndefined,
|
|
4
4
|
toAddress,
|
|
5
5
|
} from '@xylabs/sdk-js'
|
|
6
|
-
import type { BridgeDestinationObservation, BridgeSourceObservation } from '@xyo-network/xl1-
|
|
6
|
+
import type { BridgeDestinationObservation, BridgeSourceObservation } from '@xyo-network/xl1-sdk'
|
|
7
7
|
import {
|
|
8
8
|
BridgeDestinationObservationSchema, BridgeSourceObservationSchema, XYO_ZERO_ADDRESS,
|
|
9
|
-
} from '@xyo-network/xl1-
|
|
9
|
+
} from '@xyo-network/xl1-sdk'
|
|
10
10
|
import type { EventLog, WebSocketProvider } from 'ethers'
|
|
11
11
|
import { Contract } from 'ethers'
|
|
12
12
|
import { getAddress } from 'ethers/address'
|
|
13
13
|
|
|
14
14
|
import type { BridgeServiceParams } from '../../../interface/index.ts'
|
|
15
|
-
import {
|
|
15
|
+
import { AbstractBridgeObserverService } from '../Observer.ts'
|
|
16
16
|
|
|
17
17
|
export type ERC20TransferObserverParams = BridgeServiceParams & {
|
|
18
18
|
/**
|
|
@@ -38,7 +38,8 @@ const ERC20_ABI = [
|
|
|
38
38
|
'event Transfer(address indexed from, address indexed to, uint256 value)',
|
|
39
39
|
]
|
|
40
40
|
|
|
41
|
-
export class ERC20TransferObserver extends
|
|
41
|
+
export class ERC20TransferObserver extends AbstractBridgeObserverService<ERC20TransferObserverParams> {
|
|
42
|
+
moniker = 'ERC20TransferObserver'
|
|
42
43
|
protected get tokenAddress(): Address {
|
|
43
44
|
return toAddress(this.params.tokenAddress)
|
|
44
45
|
}
|
package/src/interface/service/Observer/LiquidityPoolBridgeObserver/LiquidityPoolBridgeObserver.ts
CHANGED
|
@@ -7,15 +7,15 @@ import type { LiquidityPoolBridge } from '@xyo-network/typechain'
|
|
|
7
7
|
import { LiquidityPoolBridge__factory } from '@xyo-network/typechain'
|
|
8
8
|
import type {
|
|
9
9
|
BridgeDestinationObservation, BridgeIntent, BridgeSourceObservation,
|
|
10
|
-
} from '@xyo-network/xl1-
|
|
10
|
+
} from '@xyo-network/xl1-sdk'
|
|
11
11
|
import {
|
|
12
12
|
BridgeDestinationObservationSchema, BridgeIntentSchema, BridgeSourceObservationSchema,
|
|
13
|
-
} from '@xyo-network/xl1-
|
|
13
|
+
} from '@xyo-network/xl1-sdk'
|
|
14
14
|
import type { ContractEventPayload, WebSocketProvider } from 'ethers'
|
|
15
15
|
import { getAddress } from 'ethers'
|
|
16
16
|
|
|
17
17
|
import type { BridgeServiceParams } from '../../../interface/index.ts'
|
|
18
|
-
import {
|
|
18
|
+
import { AbstractBridgeObserverService } from '../Observer.ts'
|
|
19
19
|
|
|
20
20
|
export type LiquidityPoolBridgeObserverParams = BridgeServiceParams & {
|
|
21
21
|
/**
|
|
@@ -32,7 +32,8 @@ export type LiquidityPoolBridgeObserverParams = BridgeServiceParams & {
|
|
|
32
32
|
startBlock?: number
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export class LiquidityPoolBridgeObserver extends
|
|
35
|
+
export class LiquidityPoolBridgeObserver extends AbstractBridgeObserverService<LiquidityPoolBridgeObserverParams> {
|
|
36
|
+
moniker = 'LiquidityPoolBridgeObserver'
|
|
36
37
|
protected _bridge: LiquidityPoolBridge | undefined
|
|
37
38
|
protected _bridgeChainId: Hex | undefined
|
|
38
39
|
protected _bridgeRemoteChainId: Hex | undefined
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/sdk-js'
|
|
2
|
-
import {
|
|
2
|
+
import { AbstractCreatableProvider } from '@xyo-network/xl1-sdk'
|
|
3
3
|
|
|
4
4
|
import type {
|
|
5
5
|
BridgeDestinationObservationIndexerInterface, BridgeIntentIndexerInterface, BridgeServiceParams,
|
|
@@ -12,8 +12,8 @@ export interface BridgeObserverInterface {
|
|
|
12
12
|
// TODO:
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export class
|
|
16
|
-
extends
|
|
15
|
+
export abstract class AbstractBridgeObserverService<TParams extends BridgeServiceParams = BridgeServiceParams>
|
|
16
|
+
extends AbstractCreatableProvider<TParams> implements BridgeObserverInterface {
|
|
17
17
|
protected get account() {
|
|
18
18
|
return assertEx(this.params.account, () => 'account is required')
|
|
19
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BridgeDestinationObservation, BridgeIntent } from '@xyo-network/xl1-
|
|
1
|
+
import type { BridgeDestinationObservation, BridgeIntent } from '@xyo-network/xl1-sdk'
|
|
2
2
|
|
|
3
3
|
import type { AsynchronousRelayInterface, SynchronousRelayInterface } from '../../../interface/index.ts'
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { assertEx, isNull } from '@xylabs/sdk-js'
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import type { BridgeDestinationObservation, BridgeIntent } from '@xyo-network/xl1-sdk'
|
|
3
|
+
import { AbstractCreatableProvider } from '@xyo-network/xl1-sdk'
|
|
4
4
|
|
|
5
5
|
import type {
|
|
6
6
|
BridgeDestinationObservationIndexerInterface, BridgeIntentIndexerInterface,
|
|
@@ -10,7 +10,8 @@ import type {
|
|
|
10
10
|
} from '../../../interface/index.ts'
|
|
11
11
|
|
|
12
12
|
export class ChainBridgeRelayService<TParams extends BridgeServiceParams = BridgeServiceParams>
|
|
13
|
-
extends
|
|
13
|
+
extends AbstractCreatableProvider<TParams> implements ChainBridgeRelayInterface {
|
|
14
|
+
moniker = 'ChainBridgeRelayService'
|
|
14
15
|
protected get account() {
|
|
15
16
|
return assertEx(this.params.account, () => 'account is required')
|
|
16
17
|
}
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
asHex, assertEx, hexFromBigInt, hexToBigInt, isNull,
|
|
4
4
|
toAddress,
|
|
5
5
|
} from '@xylabs/sdk-js'
|
|
6
|
-
import { BaseAccountableService } from '@xyo-network/chain-services'
|
|
7
6
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
8
7
|
import type { LiquidityPoolBridge } from '@xyo-network/typechain'
|
|
9
8
|
import { LiquidityPoolBridge__factory } from '@xyo-network/typechain'
|
|
9
|
+
import { AbstractCreatableProvider } from '@xyo-network/xl1-sdk'
|
|
10
10
|
import {
|
|
11
11
|
type BridgeDestinationObservation, BridgeDestinationObservationSchema, type BridgeIntent,
|
|
12
|
-
} from '@xyo-network/xl1-
|
|
12
|
+
} from '@xyo-network/xl1-sdk'
|
|
13
13
|
import type { WebSocketProvider } from 'ethers'
|
|
14
14
|
import { getAddress, Wallet } from 'ethers'
|
|
15
15
|
|
|
@@ -30,7 +30,8 @@ export type LiquidityPoolBridgeRelayParams = BridgeServiceParams & {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export class LiquidityPoolBridgeRelay<TParams extends LiquidityPoolBridgeRelayParams = LiquidityPoolBridgeRelayParams>
|
|
33
|
-
extends
|
|
33
|
+
extends AbstractCreatableProvider<TParams> implements ChainBridgeRelayInterface {
|
|
34
|
+
moniker = 'LiquidityPoolBridgeRelay'
|
|
34
35
|
protected _bridge: LiquidityPoolBridge | undefined
|
|
35
36
|
protected _bridgeChainId: Hex | undefined
|
|
36
37
|
protected _bridgeRemoteChainId: Hex | undefined
|
|
@@ -2,7 +2,7 @@ import type { Hash } from '@xylabs/sdk-js'
|
|
|
2
2
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
3
3
|
import {
|
|
4
4
|
type BridgeDestinationObservation, type BridgeIntent, BridgeIntentSchema, type BridgeSourceObservation,
|
|
5
|
-
} from '@xyo-network/xl1-
|
|
5
|
+
} from '@xyo-network/xl1-sdk'
|
|
6
6
|
|
|
7
7
|
export const getBridgeIntentFromObservation = (observation: BridgeSourceObservation | BridgeDestinationObservation, nonce: string): BridgeIntent => {
|
|
8
8
|
const {
|
|
@@ -12,14 +12,14 @@ import { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'
|
|
|
12
12
|
import type { MongoDBModuleParamsV2 } from '@xyo-network/module-model-mongodb'
|
|
13
13
|
import { MemorySentinel } from '@xyo-network/sentinel-memory'
|
|
14
14
|
import { HDWallet } from '@xyo-network/wallet'
|
|
15
|
-
import type { BridgeDestinationObservation, SignedHydratedTransaction } from '@xyo-network/xl1-protocol'
|
|
16
15
|
import type {
|
|
17
|
-
Config, IterableMap,
|
|
18
|
-
|
|
16
|
+
BridgeDestinationObservation, Config, IterableMap, SignedHydratedTransaction,
|
|
17
|
+
XyoGatewayRunner,
|
|
18
|
+
} from '@xyo-network/xl1-sdk'
|
|
19
19
|
import {
|
|
20
|
-
hasMongoConfig, mapToMapType,
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
hasMongoConfig, mapToMapType, SimpleXyoConnection,
|
|
21
|
+
SimpleXyoGatewayRunner, SimpleXyoSigner,
|
|
22
|
+
} from '@xyo-network/xl1-sdk'
|
|
23
23
|
import type { Document } from 'mongodb'
|
|
24
24
|
|
|
25
25
|
import type { EVMLiquidityBridgeTransactionCompletionMonitorSentinelParams, XL1TransactionCompletionMonitorSentinelParams } from '../modules/index.ts'
|
|
@@ -131,7 +131,7 @@ const getGateway = async (
|
|
|
131
131
|
const { mnemonic, chainRpcApiUrl: endpoint } = config.bridge
|
|
132
132
|
const walletPromise = isDefined(mnemonic) ? HDWallet.fromPhrase(mnemonic) : HDWallet.random()
|
|
133
133
|
const account = await walletPromise
|
|
134
|
-
const signer =
|
|
134
|
+
const signer = await SimpleXyoSigner.create({ account })
|
|
135
135
|
const connection = await SimpleXyoConnection.create()
|
|
136
136
|
const gateway = new SimpleXyoGatewayRunner(connection, signer)
|
|
137
137
|
return gateway
|
package/src/manifest/getNode.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Logger } from '@xylabs/sdk-js'
|
|
2
2
|
import { ManifestWrapper } from '@xyo-network/manifest-wrapper'
|
|
3
3
|
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
4
|
-
import type { Config } from '@xyo-network/xl1-
|
|
4
|
+
import type { Config } from '@xyo-network/xl1-sdk'
|
|
5
5
|
|
|
6
6
|
import { getLocator } from './getLocator.ts'
|
|
7
7
|
import { NodeManifest } from './nodeManifest.ts'
|
|
@@ -6,16 +6,16 @@ import { initEvmProvider } from '@xyo-network/chain-services'
|
|
|
6
6
|
import { LiquidityPoolBridge__factory } from '@xyo-network/typechain'
|
|
7
7
|
import { HDWallet } from '@xyo-network/wallet'
|
|
8
8
|
import type {
|
|
9
|
-
Config, IterableMap,
|
|
10
|
-
|
|
9
|
+
Config, IterableMap, RpcSchemaMap, SimpleXyoConnection,
|
|
10
|
+
TransportFactory,
|
|
11
|
+
XyoGatewayRunner,
|
|
12
|
+
} from '@xyo-network/xl1-sdk'
|
|
11
13
|
import {
|
|
12
|
-
|
|
14
|
+
buildJsonRpcProviderLocator,
|
|
15
|
+
hasMongoConfig, HttpRpcTransport,
|
|
16
|
+
mapToMapType, SimpleXyoGatewayRunner, SimpleXyoSigner,
|
|
13
17
|
XyoConnectionMoniker,
|
|
14
|
-
} from '@xyo-network/xl1-
|
|
15
|
-
import type { SimpleXyoConnection } from '@xyo-network/xl1-providers'
|
|
16
|
-
import { buildJsonRpcProviderLocator } from '@xyo-network/xl1-providers'
|
|
17
|
-
import type { RpcSchemaMap, TransportFactory } from '@xyo-network/xl1-rpc'
|
|
18
|
-
import { HttpRpcTransport } from '@xyo-network/xl1-rpc'
|
|
18
|
+
} from '@xyo-network/xl1-sdk'
|
|
19
19
|
import { getAddress, Wallet } from 'ethers'
|
|
20
20
|
import type { Document } from 'mongodb'
|
|
21
21
|
|
|
@@ -66,7 +66,7 @@ const getGateway = async (
|
|
|
66
66
|
const { mnemonic, chainRpcApiUrl: endpoint } = config.bridge
|
|
67
67
|
const walletPromise = isDefined(mnemonic) ? HDWallet.fromPhrase(mnemonic) : HDWallet.random()
|
|
68
68
|
const account = await walletPromise
|
|
69
|
-
const signer =
|
|
69
|
+
const signer = await SimpleXyoSigner.create({ account })
|
|
70
70
|
const transportFactory: TransportFactory = (schemas: RpcSchemaMap) => new HttpRpcTransport(endpoint, schemas)
|
|
71
71
|
const locator = await buildJsonRpcProviderLocator({ transportFactory })
|
|
72
72
|
const connection = await locator.getInstance<SimpleXyoConnection>(XyoConnectionMoniker)
|