@xyo-network/xl1-rpc 1.16.9 → 1.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/engine/rpcMethodHandlersFromViewer.d.ts.map +1 -1
- package/dist/neutral/engine-node/rpcEngineFromConnection.d.ts.map +1 -1
- package/dist/neutral/index.mjs +608 -528
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/provider/runner/JsonRpcXyoRunner.d.ts +1 -1
- package/dist/neutral/provider/runner/JsonRpcXyoRunner.d.ts.map +1 -1
- package/dist/neutral/provider/runner/NodeXyoRunner.d.ts +1 -1
- package/dist/neutral/provider/runner/NodeXyoRunner.d.ts.map +1 -1
- package/dist/neutral/provider/signer/JsonRpcXyoSigner.d.ts +1 -1
- package/dist/neutral/provider/signer/JsonRpcXyoSigner.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewer.d.ts +8 -0
- package/dist/neutral/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewer.d.ts.map +1 -0
- package/dist/neutral/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewerMethods.d.ts +13 -0
- package/dist/neutral/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewerMethods.d.ts.map +1 -0
- package/dist/neutral/provider/viewer/JsonRpcTimeSyncViewer/index.d.ts +3 -0
- package/dist/neutral/provider/viewer/JsonRpcTimeSyncViewer/index.d.ts.map +1 -0
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts +3 -4
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/index.d.ts +1 -0
- package/dist/neutral/provider/viewer/index.d.ts.map +1 -1
- package/dist/neutral/transport/MemoryRpcTransport.d.ts.map +1 -1
- package/dist/neutral/types/{XyoDataLakeViewerRpc.d.ts → DataLakeViewerRpc.d.ts} +1 -1
- package/dist/neutral/types/DataLakeViewerRpc.d.ts.map +1 -0
- package/dist/neutral/types/TimeSyncViewerRpc.d.ts +10 -0
- package/dist/neutral/types/TimeSyncViewerRpc.d.ts.map +1 -0
- package/dist/neutral/types/index.d.ts +2 -0
- package/dist/neutral/types/index.d.ts.map +1 -1
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts +194 -568
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/DataLakeViewerRpcSchema.d.ts +6 -6
- package/dist/neutral/types/schema/NetworkStakeViewerRpcSchemas.d.ts +2 -2
- package/dist/neutral/types/schema/RewardsByPositionViewerRpcSchemas.d.ts +30 -50
- package/dist/neutral/types/schema/RewardsByPositionViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsByStakerViewerRpcSchemas.d.ts +30 -70
- package/dist/neutral/types/schema/RewardsByStakerViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsByStepViewerRpcSchemas.d.ts +30 -70
- package/dist/neutral/types/schema/RewardsByStepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsTotalViewerRpcSchemas.d.ts +30 -50
- package/dist/neutral/types/schema/RewardsTotalViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/StepViewerRpcSchemas.d.ts +37 -69
- package/dist/neutral/types/schema/StepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/TimeSyncViewerRpcSchema.d.ts +58 -0
- package/dist/neutral/types/schema/TimeSyncViewerRpcSchema.d.ts.map +1 -0
- package/dist/neutral/types/schema/XyoRunnerRpcSchemas.d.ts +26 -34
- package/dist/neutral/types/schema/XyoRunnerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoSignerRpcSchemas.d.ts +62 -86
- package/dist/neutral/types/schema/XyoSignerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts +476 -818
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/BlockBoundWitness.d.ts +20 -28
- package/dist/neutral/types/schema/common/BlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/BoundWitness.d.ts +60 -96
- package/dist/neutral/types/schema/common/BoundWitness.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/HydratedBlock.d.ts +10 -30
- package/dist/neutral/types/schema/common/HydratedBlock.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/HydratedTransaction.d.ts +84 -112
- package/dist/neutral/types/schema/common/HydratedTransaction.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/RewardsRangeOptions.d.ts +2 -4
- package/dist/neutral/types/schema/common/RewardsRangeOptions.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/Stake.d.ts +17 -45
- package/dist/neutral/types/schema/common/Stake.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/TimeDomain.d.ts +3 -0
- package/dist/neutral/types/schema/common/TimeDomain.d.ts.map +1 -0
- package/dist/neutral/types/schema/common/TransactionBoundWitness.d.ts +4 -12
- package/dist/neutral/types/schema/common/TransactionBoundWitness.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/TransactionFees.d.ts +18 -18
- package/dist/neutral/types/schema/common/TransactionFees.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/TransferPair.d.ts +1 -5
- package/dist/neutral/types/schema/common/TransferPair.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/index.d.ts +1 -3
- package/dist/neutral/types/schema/common/index.d.ts.map +1 -1
- package/dist/neutral/types/schema/index.d.ts +1 -0
- package/dist/neutral/types/schema/index.d.ts.map +1 -1
- package/dist/node/engine/rpcMethodHandlersFromViewer.d.ts.map +1 -1
- package/dist/node/engine-node/rpcEngineFromConnection.d.ts.map +1 -1
- package/dist/node/index-node.mjs +616 -530
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/provider/runner/JsonRpcXyoRunner.d.ts +1 -1
- package/dist/node/provider/runner/JsonRpcXyoRunner.d.ts.map +1 -1
- package/dist/node/provider/runner/NodeXyoRunner.d.ts +1 -1
- package/dist/node/provider/runner/NodeXyoRunner.d.ts.map +1 -1
- package/dist/node/provider/signer/JsonRpcXyoSigner.d.ts +1 -1
- package/dist/node/provider/signer/JsonRpcXyoSigner.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewer.d.ts +8 -0
- package/dist/node/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewer.d.ts.map +1 -0
- package/dist/node/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewerMethods.d.ts +13 -0
- package/dist/node/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewerMethods.d.ts.map +1 -0
- package/dist/node/provider/viewer/JsonRpcTimeSyncViewer/index.d.ts +3 -0
- package/dist/node/provider/viewer/JsonRpcTimeSyncViewer/index.d.ts.map +1 -0
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts +3 -4
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/index.d.ts +1 -0
- package/dist/node/provider/viewer/index.d.ts.map +1 -1
- package/dist/node/transport/MemoryRpcTransport.d.ts.map +1 -1
- package/dist/node/types/{XyoDataLakeViewerRpc.d.ts → DataLakeViewerRpc.d.ts} +1 -1
- package/dist/node/types/DataLakeViewerRpc.d.ts.map +1 -0
- package/dist/node/types/TimeSyncViewerRpc.d.ts +10 -0
- package/dist/node/types/TimeSyncViewerRpc.d.ts.map +1 -0
- package/dist/node/types/index.d.ts +2 -0
- package/dist/node/types/index.d.ts.map +1 -1
- package/dist/node/types/schema/AllRpcSchemas.d.ts +194 -568
- package/dist/node/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/DataLakeViewerRpcSchema.d.ts +6 -6
- package/dist/node/types/schema/NetworkStakeViewerRpcSchemas.d.ts +2 -2
- package/dist/node/types/schema/RewardsByPositionViewerRpcSchemas.d.ts +30 -50
- package/dist/node/types/schema/RewardsByPositionViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsByStakerViewerRpcSchemas.d.ts +30 -70
- package/dist/node/types/schema/RewardsByStakerViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsByStepViewerRpcSchemas.d.ts +30 -70
- package/dist/node/types/schema/RewardsByStepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsTotalViewerRpcSchemas.d.ts +30 -50
- package/dist/node/types/schema/RewardsTotalViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/StepViewerRpcSchemas.d.ts +37 -69
- package/dist/node/types/schema/StepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/TimeSyncViewerRpcSchema.d.ts +58 -0
- package/dist/node/types/schema/TimeSyncViewerRpcSchema.d.ts.map +1 -0
- package/dist/node/types/schema/XyoRunnerRpcSchemas.d.ts +26 -34
- package/dist/node/types/schema/XyoRunnerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/XyoSignerRpcSchemas.d.ts +62 -86
- package/dist/node/types/schema/XyoSignerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts +476 -818
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/common/BlockBoundWitness.d.ts +20 -28
- package/dist/node/types/schema/common/BlockBoundWitness.d.ts.map +1 -1
- package/dist/node/types/schema/common/BoundWitness.d.ts +60 -96
- package/dist/node/types/schema/common/BoundWitness.d.ts.map +1 -1
- package/dist/node/types/schema/common/HydratedBlock.d.ts +10 -30
- package/dist/node/types/schema/common/HydratedBlock.d.ts.map +1 -1
- package/dist/node/types/schema/common/HydratedTransaction.d.ts +84 -112
- package/dist/node/types/schema/common/HydratedTransaction.d.ts.map +1 -1
- package/dist/node/types/schema/common/RewardsRangeOptions.d.ts +2 -4
- package/dist/node/types/schema/common/RewardsRangeOptions.d.ts.map +1 -1
- package/dist/node/types/schema/common/Stake.d.ts +17 -45
- package/dist/node/types/schema/common/Stake.d.ts.map +1 -1
- package/dist/node/types/schema/common/TimeDomain.d.ts +3 -0
- package/dist/node/types/schema/common/TimeDomain.d.ts.map +1 -0
- package/dist/node/types/schema/common/TransactionBoundWitness.d.ts +4 -12
- package/dist/node/types/schema/common/TransactionBoundWitness.d.ts.map +1 -1
- package/dist/node/types/schema/common/TransactionFees.d.ts +18 -18
- package/dist/node/types/schema/common/TransactionFees.d.ts.map +1 -1
- package/dist/node/types/schema/common/TransferPair.d.ts +1 -5
- package/dist/node/types/schema/common/TransferPair.d.ts.map +1 -1
- package/dist/node/types/schema/common/index.d.ts +1 -3
- package/dist/node/types/schema/common/index.d.ts.map +1 -1
- package/dist/node/types/schema/index.d.ts +1 -0
- package/dist/node/types/schema/index.d.ts.map +1 -1
- package/package.json +18 -21
- package/src/engine/rpcMethodHandlersFromViewer.ts +0 -1
- package/src/engine-node/rpcEngineFromConnection.ts +9 -3
- package/src/provider/runner/JsonRpcXyoRunner.ts +1 -1
- package/src/provider/runner/NodeXyoRunner.ts +4 -4
- package/src/provider/signer/JsonRpcXyoSigner.ts +1 -1
- package/src/provider/signer/spec/RpcEngineXyoSigner.spec.ts +1 -1
- package/src/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewer.ts +11 -0
- package/src/provider/viewer/JsonRpcTimeSyncViewer/JsonRpcTimeSyncViewerMethods.ts +32 -0
- package/src/provider/viewer/JsonRpcTimeSyncViewer/index.ts +2 -0
- package/src/provider/viewer/JsonRpcXyoViewer.ts +12 -21
- package/src/provider/viewer/index.ts +1 -0
- package/src/provider/viewer/spec/JsonRpcXyoViewer.spec.ts +3 -4
- package/src/spec/MemoryXyoGateway.spec.ts +4 -4
- package/src/transport/HttpRpcTransport.ts +3 -3
- package/src/transport/MemoryRpcTransport.ts +3 -2
- package/src/types/TimeSyncViewerRpc.ts +16 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema/DataLakeViewerRpcSchema.ts +2 -2
- package/src/types/schema/NetworkStakeViewerRpcSchemas.ts +1 -1
- package/src/types/schema/RewardsByPositionViewerRpcSchemas.ts +1 -1
- package/src/types/schema/RewardsByStakerViewerRpcSchemas.ts +4 -2
- package/src/types/schema/RewardsByStepViewerRpcSchemas.ts +4 -2
- package/src/types/schema/RewardsTotalViewerRpcSchemas.ts +1 -1
- package/src/types/schema/StepViewerRpcSchemas.ts +3 -4
- package/src/types/schema/TimeSyncViewerRpcSchema.ts +49 -0
- package/src/types/schema/XyoRunnerRpcSchemas.ts +1 -1
- package/src/types/schema/XyoSignerRpcSchemas.ts +1 -1
- package/src/types/schema/XyoViewerRpcSchemas.ts +3 -14
- package/src/types/schema/common/BlockBoundWitness.ts +1 -1
- package/src/types/schema/common/BoundWitness.ts +3 -3
- package/src/types/schema/common/Chain.ts +1 -1
- package/src/types/schema/common/HydratedTransaction.ts +1 -1
- package/src/types/schema/common/RewardsRangeOptions.ts +2 -4
- package/src/types/schema/common/Sequence.ts +1 -1
- package/src/types/schema/common/Stake.ts +1 -2
- package/src/types/schema/common/TimeDomain.ts +7 -0
- package/src/types/schema/common/TransactionFees.ts +1 -1
- package/src/types/schema/common/TransferPair.ts +1 -2
- package/src/types/schema/common/index.ts +1 -3
- package/src/types/schema/common/spec/BigIntZod.spec.ts +1 -1
- package/src/types/schema/common/spec/HydratedTransaction.spec.ts +1 -1
- package/src/types/schema/common/spec/Payload.spec.ts +1 -1
- package/src/types/schema/common/spec/TransactionBoundWitnessZod.spec.ts +1 -1
- package/src/types/schema/index.ts +1 -0
- package/dist/neutral/types/XyoDataLakeViewerRpc.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/Address.d.ts +0 -5
- package/dist/neutral/types/schema/common/Address.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/StepIdentity.d.ts +0 -9
- package/dist/neutral/types/schema/common/StepIdentity.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/Transfer.d.ts +0 -28
- package/dist/neutral/types/schema/common/Transfer.d.ts.map +0 -1
- package/dist/node/types/XyoDataLakeViewerRpc.d.ts.map +0 -1
- package/dist/node/types/schema/common/Address.d.ts +0 -5
- package/dist/node/types/schema/common/Address.d.ts.map +0 -1
- package/dist/node/types/schema/common/StepIdentity.d.ts +0 -9
- package/dist/node/types/schema/common/StepIdentity.d.ts.map +0 -1
- package/dist/node/types/schema/common/Transfer.d.ts +0 -28
- package/dist/node/types/schema/common/Transfer.d.ts.map +0 -1
- package/src/types/schema/common/Address.ts +0 -5
- package/src/types/schema/common/StepIdentity.ts +0 -9
- package/src/types/schema/common/Transfer.ts +0 -18
- /package/src/types/{XyoDataLakeViewerRpc.ts → DataLakeViewerRpc.ts} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './Address.ts';
|
|
2
1
|
export * from './ArrayBuffer.ts';
|
|
3
2
|
export * from './BlockBoundWitness.ts';
|
|
4
3
|
export * from './BoundWitness.ts';
|
|
@@ -10,9 +9,8 @@ export * from './Permission.ts';
|
|
|
10
9
|
export * from './RewardsRangeOptions.ts';
|
|
11
10
|
export * from './Sequence.ts';
|
|
12
11
|
export * from './Stake.ts';
|
|
13
|
-
export * from './
|
|
12
|
+
export * from './TimeDomain.ts';
|
|
14
13
|
export * from './TransactionBoundWitness.ts';
|
|
15
14
|
export * from './TransactionFees.ts';
|
|
16
|
-
export * from './Transfer.ts';
|
|
17
15
|
export * from './TransferPair.ts';
|
|
18
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA"}
|
|
@@ -10,6 +10,7 @@ export * from './RewardsByStepViewerRpcSchemas.ts';
|
|
|
10
10
|
export * from './RewardsTotalViewerRpcSchemas.ts';
|
|
11
11
|
export * from './RpcSchemaMap.ts';
|
|
12
12
|
export * from './StepRewardsViewerRpcSchemas.ts';
|
|
13
|
+
export * from './TimeSyncViewerRpcSchema.ts';
|
|
13
14
|
export * from './XyoPermissionsRpcSchemas.ts';
|
|
14
15
|
export * from './XyoRunnerRpcSchemas.ts';
|
|
15
16
|
export * from './XyoSignerRpcSchemas.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,mCAAmC,CAAA;AACjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mBAAmB,CAAA;AACjC,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,mCAAmC,CAAA;AACjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mBAAmB,CAAA;AACjC,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xyo-network/xl1-rpc",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.11",
|
|
5
5
|
"description": "XYO Layer One API",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -56,18 +56,16 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@metamask/json-rpc-engine": "~10.1.1",
|
|
59
|
-
"@xylabs/
|
|
60
|
-
"@xylabs/
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@xyo-network/
|
|
64
|
-
"@xyo-network/
|
|
65
|
-
"@xyo-network/
|
|
66
|
-
"@xyo-network/
|
|
67
|
-
"@xyo-network/
|
|
68
|
-
"@xyo-network/
|
|
69
|
-
"@xyo-network/xl1-protocol": "~1.13.6",
|
|
70
|
-
"@xyo-network/xl1-protocol-sdk": "~1.16.9",
|
|
59
|
+
"@xylabs/axios": "~5.0.33",
|
|
60
|
+
"@xylabs/sdk-js": "~5.0.33",
|
|
61
|
+
"@xyo-network/archivist-model": "~5.1.22",
|
|
62
|
+
"@xyo-network/boundwitness-model": "~5.1.22",
|
|
63
|
+
"@xyo-network/module-model": "~5.1.22",
|
|
64
|
+
"@xyo-network/node-model": "~5.1.22",
|
|
65
|
+
"@xyo-network/payload-builder": "~5.1.22",
|
|
66
|
+
"@xyo-network/payload-model": "~5.1.22",
|
|
67
|
+
"@xyo-network/xl1-protocol": "~1.13.11",
|
|
68
|
+
"@xyo-network/xl1-protocol-sdk": "~1.16.11",
|
|
71
69
|
"axios": "~1.13.2",
|
|
72
70
|
"uuid": "~13.0.0",
|
|
73
71
|
"zod": "~4.1.12"
|
|
@@ -75,19 +73,18 @@
|
|
|
75
73
|
"devDependencies": {
|
|
76
74
|
"@metamask/utils": "~11.8.1",
|
|
77
75
|
"@types/node": "~24.10.1",
|
|
78
|
-
"@xylabs/
|
|
79
|
-
"@xylabs/object": "~5.0.24",
|
|
76
|
+
"@xylabs/sdk-js": "~5.0.33",
|
|
80
77
|
"@xylabs/ts-scripts-yarn3": "~7.2.8",
|
|
81
78
|
"@xylabs/tsconfig": "~7.2.8",
|
|
82
|
-
"@xylabs/vitest-extended": "~5.0.
|
|
83
|
-
"@xyo-network/account": "~5.1.
|
|
84
|
-
"@xyo-network/account-model": "~5.1.
|
|
85
|
-
"@xyo-network/chain-protocol": "~1.16.
|
|
86
|
-
"@xyo-network/wallet": "~5.1.
|
|
79
|
+
"@xylabs/vitest-extended": "~5.0.33",
|
|
80
|
+
"@xyo-network/account": "~5.1.22",
|
|
81
|
+
"@xyo-network/account-model": "~5.1.22",
|
|
82
|
+
"@xyo-network/chain-protocol": "~1.16.11",
|
|
83
|
+
"@xyo-network/wallet": "~5.1.22",
|
|
87
84
|
"dotenv": "~17.2.3",
|
|
88
85
|
"eslint": "^9.39.1",
|
|
89
86
|
"typescript": "~5.9.3",
|
|
90
|
-
"vitest": "~4.0.
|
|
87
|
+
"vitest": "~4.0.9"
|
|
91
88
|
},
|
|
92
89
|
"packageManager": "yarn@4.6.0",
|
|
93
90
|
"engines": {
|
|
@@ -37,7 +37,6 @@ export const rpcMethodHandlersFromViewer = (viewer: XyoViewer): XyoViewerRpcMeth
|
|
|
37
37
|
xyoViewer_stakeByStaker: params => viewer.stakeByStaker(...(params ?? [])),
|
|
38
38
|
xyoViewer_stakesByStaked: params => viewer.stakesByStaked(...(params ?? [])),
|
|
39
39
|
xyoViewer_stakesByStaker: params => viewer.stakesByStaker(...(params ?? [])),
|
|
40
|
-
xyoViewer_stakedByStaker: params => viewer.stakedByStaker(...(params ?? [])),
|
|
41
40
|
xyoViewer_transactionByBlockHashAndIndex: params => viewer.transactionByBlockHashAndIndex(...(params ?? [])),
|
|
42
41
|
xyoViewer_transactionByBlockNumberAndIndex: params => viewer.transactionByBlockNumberAndIndex(...(params ?? [])),
|
|
43
42
|
xyoViewer_transactionByHash: params => viewer.transactionByHash(...(params ?? [])),
|
|
@@ -37,6 +37,7 @@ export const rpcEngineFromConnection = (connection: XyoConnection, networkStakeV
|
|
|
37
37
|
const parsed = requestSchema.safeParse(req)
|
|
38
38
|
// If validation fails
|
|
39
39
|
if (!parsed.success) {
|
|
40
|
+
console.error('RPC Request Validation Error:', parsed.error)
|
|
40
41
|
res.error = {
|
|
41
42
|
// Return invalid params error
|
|
42
43
|
...JsonRpcErrorCodes.InvalidParams,
|
|
@@ -48,9 +49,14 @@ export const rpcEngineFromConnection = (connection: XyoConnection, networkStakeV
|
|
|
48
49
|
|
|
49
50
|
// Call handler with validated params
|
|
50
51
|
const { params } = parsed.data
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
try {
|
|
53
|
+
const result = await handler(params as never)
|
|
54
|
+
// Parse handler result according to schema
|
|
55
|
+
res.result = schema.result.to.parse(result) as Json
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error('RPC Response Handler Error:', error)
|
|
58
|
+
throw error
|
|
59
|
+
}
|
|
54
60
|
}),
|
|
55
61
|
)
|
|
56
62
|
return engine
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type Hash } from '@xylabs/sdk-js'
|
|
2
|
+
import { assertEx } from '@xylabs/sdk-js'
|
|
3
3
|
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
4
4
|
import { asArchivistInstance } from '@xyo-network/archivist-model'
|
|
5
5
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
@@ -39,12 +39,12 @@ export class NodeXyoRunner implements XyoRunner {
|
|
|
39
39
|
|
|
40
40
|
protected getArchivist = async (identifier: ModuleIdentifier) => {
|
|
41
41
|
const archivist = await this.node.resolve(identifier)
|
|
42
|
-
return assertEx(asArchivistInstance(archivist), () => `
|
|
42
|
+
return assertEx(asArchivistInstance(archivist), () => `Could not resolve ${identifier} to an archivist instance`)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
protected getPendingArchivist = async () => {
|
|
46
46
|
if (this._pendingArchivist) return this._pendingArchivist
|
|
47
47
|
this._pendingArchivist = await this.getArchivist(this.pendingArchivistPath)
|
|
48
|
-
return assertEx(this._pendingArchivist, () => `
|
|
48
|
+
return assertEx(this._pendingArchivist, () => `Could not resolve pending archivist at ${this.pendingArchivistPath}`)
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAsyncMiddleware, JsonRpcEngine } from '@metamask/json-rpc-engine'
|
|
2
2
|
import type { Json } from '@metamask/utils'
|
|
3
|
-
import { asAddress, toAddress } from '@xylabs/
|
|
3
|
+
import { asAddress, toAddress } from '@xylabs/sdk-js'
|
|
4
4
|
import { Account } from '@xyo-network/account'
|
|
5
5
|
import type { ChainId } from '@xyo-network/xl1-protocol'
|
|
6
6
|
import { defaultTransactionFees } from '@xyo-network/xl1-protocol'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TimeSyncViewer } from '@xyo-network/xl1-protocol-sdk'
|
|
2
|
+
|
|
3
|
+
import type { RpcTransport } from '../../../transport/index.ts'
|
|
4
|
+
import type { TimeSyncViewerRpcSchemas } from '../../../types/index.ts'
|
|
5
|
+
import { JsonRpcTimeSyncViewerMethods } from './JsonRpcTimeSyncViewerMethods.ts'
|
|
6
|
+
|
|
7
|
+
export class JsonRpcTimeSyncViewer extends JsonRpcTimeSyncViewerMethods implements TimeSyncViewer {
|
|
8
|
+
constructor(transport: RpcTransport<typeof TimeSyncViewerRpcSchemas>) {
|
|
9
|
+
super(transport)
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
TimeDomain,
|
|
3
|
+
TimePayload,
|
|
4
|
+
} from '@xyo-network/xl1-protocol'
|
|
5
|
+
import type { TimeSyncViewerMethods } from '@xyo-network/xl1-protocol-sdk'
|
|
6
|
+
|
|
7
|
+
import type { RpcTransport } from '../../../transport/index.ts'
|
|
8
|
+
import type { TimeSyncViewerRpcSchemas } from '../../../types/index.ts'
|
|
9
|
+
|
|
10
|
+
export class JsonRpcTimeSyncViewerMethods implements TimeSyncViewerMethods {
|
|
11
|
+
protected readonly transport: RpcTransport<typeof TimeSyncViewerRpcSchemas>
|
|
12
|
+
|
|
13
|
+
constructor(transport: RpcTransport<typeof TimeSyncViewerRpcSchemas>) {
|
|
14
|
+
this.transport = transport
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async convertTime(fromDomain: TimeDomain, toDomain: TimeDomain, from: number): Promise<number> {
|
|
18
|
+
return await this.transport.sendRequest('timeSyncViewer_convertTime', [fromDomain, toDomain, from])
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async currentTime(domain: TimeDomain): Promise<[string, number]> {
|
|
22
|
+
return await this.transport.sendRequest('timeSyncViewer_currentTime', [domain])
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async currentTimeAndHash(domain: TimeDomain): Promise<[number, string | null]> {
|
|
26
|
+
return await this.transport.sendRequest('timeSyncViewer_currentTimeAndHash', [domain])
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async currentTimePayload(): Promise<TimePayload> {
|
|
30
|
+
return await this.transport.sendRequest('timeSyncViewer_currentTimePayload', [])
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
type Address,
|
|
3
|
-
|
|
4
|
-
} from '@xylabs/
|
|
2
|
+
type Address, type Hash, isHash,
|
|
3
|
+
} from '@xylabs/sdk-js'
|
|
4
|
+
import { isDefined } from '@xylabs/sdk-js'
|
|
5
5
|
import type {
|
|
6
6
|
AttoXL1,
|
|
7
7
|
BlockRange,
|
|
@@ -10,15 +10,12 @@ import type {
|
|
|
10
10
|
SignedHydratedTransaction,
|
|
11
11
|
StepIdentity,
|
|
12
12
|
StepIdentityString,
|
|
13
|
+
XL1BlockNumber,
|
|
13
14
|
XL1BlockRange,
|
|
14
15
|
} from '@xyo-network/xl1-protocol'
|
|
15
|
-
import {
|
|
16
|
-
asAttoXL1, asHydratedBlock, asXL1BlockRange,
|
|
17
|
-
isRange,
|
|
18
|
-
} from '@xyo-network/xl1-protocol'
|
|
16
|
+
import { asAttoXL1, asHydratedBlock } from '@xyo-network/xl1-protocol'
|
|
19
17
|
import type {
|
|
20
|
-
AccountBalanceHistoryItem,
|
|
21
|
-
ForkHistory, NetworkStakeViewer, Position, TransferBalanceHistoryItem, TransferPair, XyoViewer,
|
|
18
|
+
AccountBalanceHistoryItem, ForkHistory, NetworkStakeViewer, Position, TransferBalanceHistoryItem, TransferPair, XyoViewer,
|
|
22
19
|
} from '@xyo-network/xl1-protocol-sdk'
|
|
23
20
|
|
|
24
21
|
import type { RpcTransport } from '../../transport/index.ts'
|
|
@@ -49,13 +46,11 @@ export class JsonRpcXyoViewer implements XyoViewer {
|
|
|
49
46
|
async accountBalanceHistory(address: Address, head: Hash): Promise<AccountBalanceHistoryItem[]>
|
|
50
47
|
async accountBalanceHistory(address: Address, range: BlockRange): Promise<AccountBalanceHistoryItem[]>
|
|
51
48
|
async accountBalanceHistory(address: Address, headOrRange?: BlockRange | Hash): Promise<AccountBalanceHistoryItem[]> {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (isRange(range)) {
|
|
58
|
-
return (await this.transport.sendRequest('xyoViewer_accountBalanceHistory', [address, range])) as AccountBalanceHistoryItem[]
|
|
49
|
+
if (isDefined(headOrRange)) {
|
|
50
|
+
if (isHash(headOrRange)) {
|
|
51
|
+
return (await this.transport.sendRequest('xyoViewer_accountBalanceHistory', [address, headOrRange])) as AccountBalanceHistoryItem[]
|
|
52
|
+
}
|
|
53
|
+
return (await this.transport.sendRequest('xyoViewer_accountBalanceHistory', [address, headOrRange])) as AccountBalanceHistoryItem[]
|
|
59
54
|
}
|
|
60
55
|
return (await this.transport.sendRequest('xyoViewer_accountBalanceHistory', [address])) as AccountBalanceHistoryItem[]
|
|
61
56
|
}
|
|
@@ -88,7 +83,7 @@ export class JsonRpcXyoViewer implements XyoViewer {
|
|
|
88
83
|
return (await this.transport.sendRequest('xyoViewer_currentBlockHash'))
|
|
89
84
|
}
|
|
90
85
|
|
|
91
|
-
async currentBlockNumber(): Promise<
|
|
86
|
+
async currentBlockNumber(): Promise<XL1BlockNumber> {
|
|
92
87
|
return (await this.transport.sendRequest('xyoViewer_currentBlockNumber'))
|
|
93
88
|
}
|
|
94
89
|
|
|
@@ -176,10 +171,6 @@ export class JsonRpcXyoViewer implements XyoViewer {
|
|
|
176
171
|
return (await this.transport.sendRequest('xyoViewer_stakeByStaker', [staker, slot]))
|
|
177
172
|
}
|
|
178
173
|
|
|
179
|
-
async stakedByStaker(staker: Address): Promise<Address[]> {
|
|
180
|
-
return (await this.transport.sendRequest('xyoViewer_stakedByStaker', [staker]))
|
|
181
|
-
}
|
|
182
|
-
|
|
183
174
|
async stakesByStaked(staked: Address): Promise<Position[]> {
|
|
184
175
|
return (await this.transport.sendRequest('xyoViewer_stakesByStaked', [staked]))
|
|
185
176
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import '@xylabs/vitest-extended'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import type { Address, Hash } from '@xylabs/hex'
|
|
3
|
+
import type { Address, Hash } from '@xylabs/sdk-js'
|
|
5
4
|
import {
|
|
6
|
-
AddressRegEx, asAddress, asHash,
|
|
7
|
-
} from '@xylabs/
|
|
5
|
+
AddressRegEx, asAddress, asHash, assertEx,
|
|
6
|
+
} from '@xylabs/sdk-js'
|
|
8
7
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
9
8
|
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
10
9
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Hash } from '@xylabs/
|
|
2
|
-
import { isHash } from '@xylabs/
|
|
1
|
+
import type { Hash } from '@xylabs/sdk-js'
|
|
2
|
+
import { isHash } from '@xylabs/sdk-js'
|
|
3
3
|
import { Account } from '@xyo-network/account'
|
|
4
4
|
import type { AccountInstance } from '@xyo-network/account-model'
|
|
5
5
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
@@ -7,7 +7,7 @@ import type { AnyPayload, Payload } from '@xyo-network/payload-model'
|
|
|
7
7
|
import type { AllowedBlockPayload, SignedHydratedTransaction } from '@xyo-network/xl1-protocol'
|
|
8
8
|
import type { XyoGatewayRunner } from '@xyo-network/xl1-protocol-sdk'
|
|
9
9
|
import {
|
|
10
|
-
buildUnsignedTransaction,
|
|
10
|
+
buildUnsignedTransaction, SimpleXyoGatewayRunner,
|
|
11
11
|
SimpleXyoSigner,
|
|
12
12
|
} from '@xyo-network/xl1-protocol-sdk'
|
|
13
13
|
import {
|
|
@@ -33,7 +33,7 @@ describe('MemoryXyoGateway', () => {
|
|
|
33
33
|
endpoint,
|
|
34
34
|
// storage: dataLakeEndpoint,
|
|
35
35
|
})
|
|
36
|
-
sut = new SimpleXyoGatewayRunner(
|
|
36
|
+
sut = new SimpleXyoGatewayRunner(connection, signer)
|
|
37
37
|
})
|
|
38
38
|
|
|
39
39
|
describe('connection', () => {
|
|
@@ -2,8 +2,8 @@ import type {
|
|
|
2
2
|
JsonRpcFailure, JsonRpcRequest, JsonRpcSuccess,
|
|
3
3
|
} from '@metamask/utils'
|
|
4
4
|
import { AxiosJson } from '@xylabs/axios'
|
|
5
|
-
import { isError, isUndefinedOrNull } from '@xylabs/
|
|
6
|
-
import { isAxiosError } from 'axios'
|
|
5
|
+
import { isError, isUndefinedOrNull } from '@xylabs/sdk-js'
|
|
6
|
+
import { Axios, isAxiosError } from 'axios'
|
|
7
7
|
import { v4 } from 'uuid'
|
|
8
8
|
import type * as z from 'zod'
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@ export class HttpRpcTransport<T extends RpcSchemaMap = RpcSchemaMap> implements
|
|
|
50
50
|
body.params = schemas[method].params.to.parse(params) as JsonRpcRequest
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
const res = await new AxiosJson().post(url, body)
|
|
53
|
+
const res = await new Axios(AxiosJson.axiosConfig()).post(url, body)
|
|
54
54
|
|
|
55
55
|
const json = res.data
|
|
56
56
|
if (isUndefinedOrNull(json) || (json as Partial<JsonRpcFailure>).error) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { JsonRpcEngine } from '@metamask/json-rpc-engine'
|
|
2
2
|
import type { JsonRpcParams, JsonRpcRequest } from '@metamask/utils'
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
assertEx, isObject, isString,
|
|
5
|
+
} from '@xylabs/sdk-js'
|
|
5
6
|
import { v4 } from 'uuid'
|
|
6
7
|
import type { ZodRawShape } from 'zod'
|
|
7
8
|
import type * as z from 'zod'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TimeSyncViewerMethods } from '@xyo-network/xl1-protocol-sdk'
|
|
2
|
+
|
|
3
|
+
import type { MethodName, RpcMethodName } from './RpcMethodName.ts'
|
|
4
|
+
|
|
5
|
+
export const TimeSyncViewerRpcNamespace = 'timeSyncViewer' as const
|
|
6
|
+
export type TimeSyncViewerRpcNamespace = typeof TimeSyncViewerRpcNamespace
|
|
7
|
+
|
|
8
|
+
export type TimeSyncViewerMethodName = MethodName<TimeSyncViewerMethods>
|
|
9
|
+
export type TimeSyncViewerRpcMethodName = RpcMethodName<TimeSyncViewerRpcNamespace,
|
|
10
|
+
TimeSyncViewerMethodName>
|
|
11
|
+
|
|
12
|
+
export type TimeSyncViewerRpcMethodHandlers = {
|
|
13
|
+
[K in TimeSyncViewerMethodName as TimeSyncViewerRpcMethodName]: (
|
|
14
|
+
params: Parameters<TimeSyncViewerMethods[K]>,
|
|
15
|
+
) => ReturnType<TimeSyncViewerMethods[K]>
|
|
16
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './DataLakeViewerRpc.ts'
|
|
1
2
|
export * from './ErrorCodes.ts'
|
|
2
3
|
export * from './JsonRpc.ts'
|
|
3
4
|
export * from './NetworkStakeViewerRpc.ts'
|
|
@@ -8,6 +9,7 @@ export * from './NetworkStakingStepRewardsTotalViewerRpc.ts'
|
|
|
8
9
|
export * from './NetworkStakingStepRewardsViewerRpc.ts'
|
|
9
10
|
export * from './RpcMethodName.ts'
|
|
10
11
|
export * from './schema/index.ts'
|
|
12
|
+
export * from './TimeSyncViewerRpc.ts'
|
|
11
13
|
export * from './XyoPermissions.ts'
|
|
12
14
|
export * from './XyoProviderRpc.ts'
|
|
13
15
|
export * from './XyoRunnerRpc.ts'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HashZod } from '@xylabs/
|
|
1
|
+
import { HashZod } from '@xylabs/sdk-js'
|
|
2
2
|
import { PayloadZod } from '@xyo-network/payload-model'
|
|
3
3
|
import * as z from 'zod'
|
|
4
4
|
|
|
5
|
-
import type { DataLakeViewerRpcMethodName } from '../
|
|
5
|
+
import type { DataLakeViewerRpcMethodName } from '../DataLakeViewerRpc.ts'
|
|
6
6
|
import { ArrayBufferToJsonZod, JsonToArrayBufferZod } from './common/index.ts'
|
|
7
7
|
import type { RpcSchemaMap } from './RpcSchemaMap.ts'
|
|
8
8
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AddressZod, BigIntToJsonZod, JsonToBigIntZod,
|
|
3
|
+
} from '@xylabs/sdk-js'
|
|
2
4
|
import z from 'zod'
|
|
3
5
|
|
|
4
6
|
import type { NetworkStakingStepRewardsByStakerViewerRpcMethodName } from '../NetworkStakingStepRewardsByStakerViewerRpc.ts'
|
|
5
|
-
import {
|
|
7
|
+
import { RewardsRangeOptionsZod } from './common/index.ts'
|
|
6
8
|
import type { RpcSchemaMap } from './RpcSchemaMap.ts'
|
|
7
9
|
|
|
8
10
|
export const NetworkStakingStepRewardsByStakerViewerRpcSchemas = {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AddressZod, BigIntToJsonZod, JsonToBigIntZod,
|
|
3
|
+
} from '@xylabs/sdk-js'
|
|
2
4
|
import z from 'zod'
|
|
3
5
|
|
|
4
6
|
import type { NetworkStakingStepRewardsByStepViewerRpcMethodName } from '../NetworkStakingStepRewardsByStepViewerRpc.ts'
|
|
5
|
-
import {
|
|
7
|
+
import { RewardsRangeOptionsZod } from './common/index.ts'
|
|
6
8
|
import type { RpcSchemaMap } from './RpcSchemaMap.ts'
|
|
7
9
|
|
|
8
10
|
export const NetworkStakingStepRewardsByStepViewerRpcSchemas = {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AddressZod, BigIntToJsonZod, JsonToBigIntZod,
|
|
3
|
-
} from '@xylabs/
|
|
3
|
+
} from '@xylabs/sdk-js'
|
|
4
|
+
import { StepIdentityZod } from '@xyo-network/xl1-protocol'
|
|
4
5
|
import z from 'zod'
|
|
5
6
|
|
|
6
7
|
import type { StepViewerMethodName } from '../StepViewerRpc.ts'
|
|
7
|
-
import {
|
|
8
|
-
JsonToStakeZod, StakeToJsonZod, StepIdentityZod,
|
|
9
|
-
} from './common/index.ts'
|
|
8
|
+
import { JsonToStakeZod, StakeToJsonZod } from './common/index.ts'
|
|
10
9
|
import type { RpcSchemaMap } from './RpcSchemaMap.ts'
|
|
11
10
|
|
|
12
11
|
export const StepViewerRpcSchemas = {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { TimePayloadZod } from '@xyo-network/xl1-protocol'
|
|
2
|
+
import * as z from 'zod'
|
|
3
|
+
|
|
4
|
+
import type { TimeSyncViewerRpcMethodName } from '../TimeSyncViewerRpc.ts'
|
|
5
|
+
import { TimeDomainZod } from './common/index.ts'
|
|
6
|
+
import type { RpcSchemaMap } from './RpcSchemaMap.ts'
|
|
7
|
+
|
|
8
|
+
export const TimeSyncViewerRpcSchemas = {
|
|
9
|
+
timeSyncViewer_convertTime: {
|
|
10
|
+
params: {
|
|
11
|
+
from: z.tuple([TimeDomainZod, TimeDomainZod, z.number()]),
|
|
12
|
+
to: z.tuple([TimeDomainZod, TimeDomainZod, z.number()]),
|
|
13
|
+
},
|
|
14
|
+
result: {
|
|
15
|
+
from: z.number(),
|
|
16
|
+
to: z.number(),
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
timeSyncViewer_currentTime: {
|
|
20
|
+
params: {
|
|
21
|
+
from: z.tuple([TimeDomainZod]),
|
|
22
|
+
to: z.tuple([TimeDomainZod]),
|
|
23
|
+
},
|
|
24
|
+
result: {
|
|
25
|
+
from: z.tuple([TimeDomainZod, z.number()]),
|
|
26
|
+
to: z.tuple([TimeDomainZod, z.number()]),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
timeSyncViewer_currentTimeAndHash: {
|
|
30
|
+
params: {
|
|
31
|
+
from: z.tuple([TimeDomainZod]),
|
|
32
|
+
to: z.tuple([TimeDomainZod]),
|
|
33
|
+
},
|
|
34
|
+
result: {
|
|
35
|
+
from: z.tuple([z.number(), z.nullable(z.string())]),
|
|
36
|
+
to: z.tuple([z.number(), z.nullable(z.string())]),
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
timeSyncViewer_currentTimePayload: {
|
|
40
|
+
params: {
|
|
41
|
+
from: z.tuple([]),
|
|
42
|
+
to: z.tuple([]),
|
|
43
|
+
},
|
|
44
|
+
result: {
|
|
45
|
+
from: TimePayloadZod,
|
|
46
|
+
to: TimePayloadZod,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
} satisfies RpcSchemaMap<TimeSyncViewerRpcMethodName>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { AddressZod } from '@xylabs/sdk-js'
|
|
1
2
|
import { asHydratedTransactionWithStorageMeta } from '@xyo-network/xl1-protocol'
|
|
2
3
|
import { z } from 'zod'
|
|
3
4
|
|
|
4
5
|
import type { XyoSignerRpcMethodName } from '../XyoSignerRpc.ts'
|
|
5
6
|
import {
|
|
6
|
-
AddressZod,
|
|
7
7
|
SignedHydratedTransactionZod,
|
|
8
8
|
UnsignedHydratedTransactionZod,
|
|
9
9
|
} from './common/index.ts'
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AddressZod,
|
|
2
3
|
BigIntToJsonZod, HashToJsonZod, HashZod, JsonToBigIntZod,
|
|
3
4
|
JsonToHashZod,
|
|
4
|
-
} from '@xylabs/
|
|
5
|
+
} from '@xylabs/sdk-js'
|
|
5
6
|
import { WithHashMetaZod } from '@xyo-network/payload-model'
|
|
6
7
|
import {
|
|
7
|
-
BlockNumberZod, BlockRangeZod, StepIdentityZod, XL1BlockNumberZod, XL1BlockRangeZod,
|
|
8
|
+
BlockNumberZod, BlockRangeZod, StepIdentityZod, TransferZod, XL1BlockNumberZod, XL1BlockRangeZod,
|
|
8
9
|
} from '@xyo-network/xl1-protocol'
|
|
9
10
|
import * as z from 'zod'
|
|
10
11
|
|
|
11
12
|
import type { XyoViewerRpcMethodName } from '../XyoViewerRpc.ts'
|
|
12
13
|
import {
|
|
13
|
-
AddressZod,
|
|
14
14
|
BlockBoundWitnessZod,
|
|
15
15
|
JsonToStakeZod,
|
|
16
16
|
SignedHydratedBlockZod,
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
StakeToJsonZod,
|
|
19
19
|
TransactionBoundWitnessZod,
|
|
20
20
|
TransferPairZod,
|
|
21
|
-
TransferZod,
|
|
22
21
|
} from './common/index.ts'
|
|
23
22
|
import type { RpcSchemaMap } from './RpcSchemaMap.ts'
|
|
24
23
|
|
|
@@ -373,16 +372,6 @@ export const XyoViewerRpcSchemas = {
|
|
|
373
372
|
from: JsonToStakeZod,
|
|
374
373
|
},
|
|
375
374
|
},
|
|
376
|
-
xyoViewer_stakedByStaker: {
|
|
377
|
-
params: {
|
|
378
|
-
to: z.tuple([AddressZod]),
|
|
379
|
-
from: z.tuple([AddressZod]),
|
|
380
|
-
},
|
|
381
|
-
result: {
|
|
382
|
-
to: z.array(AddressZod),
|
|
383
|
-
from: z.array(AddressZod),
|
|
384
|
-
},
|
|
385
|
-
},
|
|
386
375
|
xyoViewer_stakesByStaker: {
|
|
387
376
|
params: {
|
|
388
377
|
to: z.tuple([AddressZod]),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AddressZod, HashZod, HexZod,
|
|
3
|
+
} from '@xylabs/sdk-js'
|
|
2
4
|
import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
|
|
3
5
|
import {
|
|
4
6
|
PayloadZod, SchemaZod, StorageMetaZod,
|
|
5
7
|
} from '@xyo-network/payload-model'
|
|
6
8
|
import * as z from 'zod'
|
|
7
9
|
|
|
8
|
-
import { AddressZod } from './Address.ts'
|
|
9
|
-
|
|
10
10
|
const BoundWitnessRequiredFieldsZod = z.object({
|
|
11
11
|
addresses: z.array(AddressZod),
|
|
12
12
|
payload_hashes: z.array(HashZod),
|