@xyo-network/xl1-rpc 1.16.22 → 1.16.24
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/index.mjs +708 -882
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts +12 -0
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts.map +1 -0
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts +12 -0
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts.map +1 -0
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/index.d.ts +3 -0
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/index.d.ts.map +1 -0
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts +9 -1
- 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/types/AccountBalanceViewerRpc.d.ts +10 -0
- package/dist/neutral/types/AccountBalanceViewerRpc.d.ts.map +1 -0
- package/dist/neutral/types/index.d.ts +1 -0
- package/dist/neutral/types/index.d.ts.map +1 -1
- package/dist/neutral/types/schema/AccountBalanceViewerRpcSchemas.d.ts +132 -0
- package/dist/neutral/types/schema/AccountBalanceViewerRpcSchemas.d.ts.map +1 -0
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts +264 -8
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/DataLakeViewerRpcSchema.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsByPositionViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsByStakerViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsByStepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsTotalViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/StepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/TimeSyncViewerRpcSchema.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoPermissionsRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoRunnerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoSignerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts +136 -8
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/index.d.ts +1 -1
- package/dist/neutral/types/schema/index.d.ts.map +1 -1
- package/dist/node/engine/rpcMethodHandlersFromViewer.d.ts.map +1 -1
- package/dist/node/index-node.mjs +708 -882
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts +12 -0
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts.map +1 -0
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts +12 -0
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts.map +1 -0
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/index.d.ts +3 -0
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/index.d.ts.map +1 -0
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts +9 -1
- 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/types/AccountBalanceViewerRpc.d.ts +10 -0
- package/dist/node/types/AccountBalanceViewerRpc.d.ts.map +1 -0
- package/dist/node/types/index.d.ts +1 -0
- package/dist/node/types/index.d.ts.map +1 -1
- package/dist/node/types/schema/AccountBalanceViewerRpcSchemas.d.ts +132 -0
- package/dist/node/types/schema/AccountBalanceViewerRpcSchemas.d.ts.map +1 -0
- package/dist/node/types/schema/AllRpcSchemas.d.ts +264 -8
- package/dist/node/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/DataLakeViewerRpcSchema.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsByPositionViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsByStakerViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsByStepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsTotalViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/StepViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/TimeSyncViewerRpcSchema.d.ts.map +1 -1
- package/dist/node/types/schema/XyoPermissionsRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/XyoRunnerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/XyoSignerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts +136 -8
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/index.d.ts +1 -1
- package/dist/node/types/schema/index.d.ts.map +1 -1
- package/package.json +8 -9
- package/src/engine/rpcMethodHandlersFromViewer.ts +2 -0
- package/src/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.ts +23 -0
- package/src/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.ts +31 -0
- package/src/provider/viewer/JsonRpcAccountBalanceViewer/index.ts +2 -0
- package/src/provider/viewer/JsonRpcXyoViewer.ts +27 -6
- package/src/provider/viewer/index.ts +1 -0
- package/src/types/AccountBalanceViewerRpc.ts +16 -0
- package/src/types/index.ts +1 -0
- package/src/types/schema/AccountBalanceViewerRpcSchemas.ts +33 -0
- package/src/types/schema/AllRpcSchemas.ts +2 -0
- package/src/types/schema/DataLakeViewerRpcSchema.ts +1 -1
- package/src/types/schema/RewardsByPositionViewerRpcSchemas.ts +1 -1
- package/src/types/schema/RewardsByStakerViewerRpcSchemas.ts +1 -1
- package/src/types/schema/RewardsByStepViewerRpcSchemas.ts +1 -1
- package/src/types/schema/RewardsTotalViewerRpcSchemas.ts +1 -1
- package/src/types/schema/StepViewerRpcSchemas.ts +1 -1
- package/src/types/schema/TimeSyncViewerRpcSchema.ts +1 -1
- package/src/types/schema/XyoPermissionsRpcSchemas.ts +3 -3
- package/src/types/schema/XyoRunnerRpcSchemas.ts +1 -1
- package/src/types/schema/XyoSignerRpcSchemas.ts +1 -4
- package/src/types/schema/XyoViewerRpcSchemas.ts +32 -19
- package/src/types/schema/index.ts +1 -1
- package/dist/neutral/types/schema/common/ArrayBuffer.d.ts +0 -4
- package/dist/neutral/types/schema/common/ArrayBuffer.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/BlockBoundWitness.d.ts +0 -44
- package/dist/neutral/types/schema/common/BlockBoundWitness.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/BoundWitness.d.ts +0 -123
- package/dist/neutral/types/schema/common/BoundWitness.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/Chain.d.ts +0 -4
- package/dist/neutral/types/schema/common/Chain.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/HydratedBlock.d.ts +0 -133
- package/dist/neutral/types/schema/common/HydratedBlock.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/HydratedTransaction.d.ts +0 -210
- package/dist/neutral/types/schema/common/HydratedTransaction.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/Json.d.ts +0 -7
- package/dist/neutral/types/schema/common/Json.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/Permission.d.ts +0 -53
- package/dist/neutral/types/schema/common/Permission.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/RewardsRangeOptions.d.ts +0 -11
- package/dist/neutral/types/schema/common/RewardsRangeOptions.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/Sequence.d.ts +0 -9
- package/dist/neutral/types/schema/common/Sequence.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/Stake.d.ts +0 -62
- package/dist/neutral/types/schema/common/Stake.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/TimeDomain.d.ts +0 -3
- package/dist/neutral/types/schema/common/TimeDomain.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/TransactionBoundWitness.d.ts +0 -75
- package/dist/neutral/types/schema/common/TransactionBoundWitness.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/TransactionFees.d.ts +0 -53
- package/dist/neutral/types/schema/common/TransactionFees.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/TransferPair.d.ts +0 -3
- package/dist/neutral/types/schema/common/TransferPair.d.ts.map +0 -1
- package/dist/neutral/types/schema/common/index.d.ts +0 -16
- package/dist/neutral/types/schema/common/index.d.ts.map +0 -1
- package/dist/node/types/schema/common/ArrayBuffer.d.ts +0 -4
- package/dist/node/types/schema/common/ArrayBuffer.d.ts.map +0 -1
- package/dist/node/types/schema/common/BlockBoundWitness.d.ts +0 -44
- package/dist/node/types/schema/common/BlockBoundWitness.d.ts.map +0 -1
- package/dist/node/types/schema/common/BoundWitness.d.ts +0 -123
- package/dist/node/types/schema/common/BoundWitness.d.ts.map +0 -1
- package/dist/node/types/schema/common/Chain.d.ts +0 -4
- package/dist/node/types/schema/common/Chain.d.ts.map +0 -1
- package/dist/node/types/schema/common/HydratedBlock.d.ts +0 -133
- package/dist/node/types/schema/common/HydratedBlock.d.ts.map +0 -1
- package/dist/node/types/schema/common/HydratedTransaction.d.ts +0 -210
- package/dist/node/types/schema/common/HydratedTransaction.d.ts.map +0 -1
- package/dist/node/types/schema/common/Json.d.ts +0 -7
- package/dist/node/types/schema/common/Json.d.ts.map +0 -1
- package/dist/node/types/schema/common/Permission.d.ts +0 -53
- package/dist/node/types/schema/common/Permission.d.ts.map +0 -1
- package/dist/node/types/schema/common/RewardsRangeOptions.d.ts +0 -11
- package/dist/node/types/schema/common/RewardsRangeOptions.d.ts.map +0 -1
- package/dist/node/types/schema/common/Sequence.d.ts +0 -9
- package/dist/node/types/schema/common/Sequence.d.ts.map +0 -1
- package/dist/node/types/schema/common/Stake.d.ts +0 -62
- package/dist/node/types/schema/common/Stake.d.ts.map +0 -1
- package/dist/node/types/schema/common/TimeDomain.d.ts +0 -3
- package/dist/node/types/schema/common/TimeDomain.d.ts.map +0 -1
- package/dist/node/types/schema/common/TransactionBoundWitness.d.ts +0 -75
- package/dist/node/types/schema/common/TransactionBoundWitness.d.ts.map +0 -1
- package/dist/node/types/schema/common/TransactionFees.d.ts +0 -53
- package/dist/node/types/schema/common/TransactionFees.d.ts.map +0 -1
- package/dist/node/types/schema/common/TransferPair.d.ts +0 -3
- package/dist/node/types/schema/common/TransferPair.d.ts.map +0 -1
- package/dist/node/types/schema/common/index.d.ts +0 -16
- package/dist/node/types/schema/common/index.d.ts.map +0 -1
- package/src/types/schema/common/ArrayBuffer.ts +0 -42
- package/src/types/schema/common/BlockBoundWitness.ts +0 -36
- package/src/types/schema/common/BoundWitness.ts +0 -56
- package/src/types/schema/common/Chain.ts +0 -5
- package/src/types/schema/common/HydratedBlock.ts +0 -32
- package/src/types/schema/common/HydratedTransaction.ts +0 -37
- package/src/types/schema/common/Json.ts +0 -19
- package/src/types/schema/common/Permission.ts +0 -23
- package/src/types/schema/common/RewardsRangeOptions.ts +0 -10
- package/src/types/schema/common/Sequence.ts +0 -15
- package/src/types/schema/common/Stake.ts +0 -43
- package/src/types/schema/common/TimeDomain.ts +0 -7
- package/src/types/schema/common/TransactionBoundWitness.ts +0 -42
- package/src/types/schema/common/TransactionFees.ts +0 -45
- package/src/types/schema/common/TransferPair.ts +0 -6
- package/src/types/schema/common/index.ts +0 -15
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { AddressZod, HexZod } from '@xylabs/sdk-js'
|
|
2
|
-
import type { PositionId } from '@xyo-network/xl1-protocol'
|
|
3
|
-
import * as z from 'zod'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
AttoToJsonZod, AttoZod, JsonToAttoZod,
|
|
7
|
-
} from './TransactionFees.ts'
|
|
8
|
-
|
|
9
|
-
export const StakeZod = z.object({
|
|
10
|
-
amount: AttoZod,
|
|
11
|
-
// the block number when the stake was added
|
|
12
|
-
addBlock: z.number(),
|
|
13
|
-
// the unique id for the stake item
|
|
14
|
-
id: z.number(),
|
|
15
|
-
// the block number when the stake was removed (set to 0 if not removed)
|
|
16
|
-
removeBlock: z.number(),
|
|
17
|
-
// the address that is being staked
|
|
18
|
-
staked: AddressZod,
|
|
19
|
-
// the address that owns the stake
|
|
20
|
-
staker: AddressZod,
|
|
21
|
-
// the block number when the stake was withdrawn (set to 0 if not withdrawn)
|
|
22
|
-
withdrawBlock: z.number(),
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
export const StakeToJsonZod = StakeZod.transform(val => ({
|
|
26
|
-
addBlock: val.addBlock,
|
|
27
|
-
amount: AttoToJsonZod.parse(val.amount),
|
|
28
|
-
id: val.id,
|
|
29
|
-
removeBlock: val.removeBlock,
|
|
30
|
-
staked: AddressZod.parse(val.staked),
|
|
31
|
-
staker: AddressZod.parse(val.staker),
|
|
32
|
-
withdrawBlock: val.withdrawBlock,
|
|
33
|
-
}))
|
|
34
|
-
|
|
35
|
-
export const JsonToStakeZod = StakeZod.extend({ amount: HexZod }).transform(val => ({
|
|
36
|
-
addBlock: val.addBlock,
|
|
37
|
-
amount: JsonToAttoZod.parse(val.amount),
|
|
38
|
-
id: val.id as PositionId,
|
|
39
|
-
removeBlock: val.removeBlock,
|
|
40
|
-
staked: val.staked,
|
|
41
|
-
staker: val.staker,
|
|
42
|
-
withdrawBlock: val.withdrawBlock,
|
|
43
|
-
}))
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { StorageMetaZod } from '@xyo-network/payload-model'
|
|
2
|
-
import { BlockNumberZod } from '@xyo-network/xl1-protocol'
|
|
3
|
-
import * as z from 'zod'
|
|
4
|
-
|
|
5
|
-
import { SignedBoundWitnessZod, UnsignedBoundWitnessZod } from './BoundWitness.ts'
|
|
6
|
-
import { ChainZod } from './Chain.ts'
|
|
7
|
-
import { TransactionFeesHexZod } from './TransactionFees.ts'
|
|
8
|
-
|
|
9
|
-
export const BlockStartZod = z.object({ nbf: BlockNumberZod })
|
|
10
|
-
export const BlockEndZod = z.object({ exp: BlockNumberZod })
|
|
11
|
-
export const BlockDurationZod = z.object({ nbf: BlockNumberZod, exp: BlockNumberZod })
|
|
12
|
-
export const BlockScriptsZod = z.object({ script: z.array(z.string()).optional() })
|
|
13
|
-
|
|
14
|
-
export const WithTransactionFeesZod = z.object({ fees: TransactionFeesHexZod })
|
|
15
|
-
|
|
16
|
-
const TransactionBoundWitnessFields = z.object({ chain: ChainZod, from: ChainZod })
|
|
17
|
-
|
|
18
|
-
// It seems like zod marked all of merge as deprecated even though just multiple merges should have been deprecated
|
|
19
|
-
|
|
20
|
-
export const TransactionBoundWitnessZod = UnsignedBoundWitnessZod
|
|
21
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
22
|
-
.merge(StorageMetaZod.partial())
|
|
23
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
24
|
-
.merge(BlockDurationZod)
|
|
25
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
26
|
-
.merge(WithTransactionFeesZod)
|
|
27
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
28
|
-
.merge(TransactionBoundWitnessFields)
|
|
29
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
30
|
-
.merge(BlockScriptsZod)
|
|
31
|
-
|
|
32
|
-
export const SignedTransactionBoundWitnessZod = SignedBoundWitnessZod
|
|
33
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
34
|
-
.merge(StorageMetaZod.partial())
|
|
35
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
36
|
-
.merge(BlockDurationZod)
|
|
37
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
38
|
-
.merge(WithTransactionFeesZod)
|
|
39
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
40
|
-
.merge(TransactionBoundWitnessFields)
|
|
41
|
-
// eslint-disable-next-line sonarjs/deprecation
|
|
42
|
-
.merge(BlockScriptsZod.partial())
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BigIntToJsonZod, HexZod, JsonToBigIntZod,
|
|
3
|
-
} from '@xylabs/sdk-js'
|
|
4
|
-
import { asAttoXL1 } from '@xyo-network/xl1-protocol'
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const AttoZod = z.bigint()
|
|
8
|
-
export const JsonToAttoZod = JsonToBigIntZod.transform(v => asAttoXL1(v))
|
|
9
|
-
// eslint-disable-next-line unicorn/prefer-export-from
|
|
10
|
-
export const AttoToJsonZod = BigIntToJsonZod
|
|
11
|
-
|
|
12
|
-
export const TransactionFeesHexZod = z.object({
|
|
13
|
-
base: HexZod,
|
|
14
|
-
gasLimit: HexZod,
|
|
15
|
-
gasPrice: HexZod,
|
|
16
|
-
priority: HexZod,
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export type TransactionFeesHexZodType = z.infer<typeof TransactionFeesHexZod>
|
|
20
|
-
|
|
21
|
-
export const TransactionFeesBigIntZod = z.object({
|
|
22
|
-
base: AttoZod,
|
|
23
|
-
gasLimit: AttoZod,
|
|
24
|
-
gasPrice: AttoZod,
|
|
25
|
-
priority: AttoZod,
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
export type TransactionFeesBigIntZodType = z.infer<typeof TransactionFeesBigIntZod>
|
|
29
|
-
|
|
30
|
-
export const TransactionFeesJsonToBigIntZod = TransactionFeesHexZod.transform(val => ({
|
|
31
|
-
base: JsonToBigIntZod.parse(val.base),
|
|
32
|
-
gasLimit: JsonToBigIntZod.parse(val.gasLimit),
|
|
33
|
-
gasPrice: JsonToBigIntZod.parse(val.gasPrice),
|
|
34
|
-
priority: JsonToBigIntZod.parse(val.priority),
|
|
35
|
-
}))
|
|
36
|
-
|
|
37
|
-
export const TransactionFeesBigIntToJsonZod = TransactionFeesBigIntZod.transform(val => ({
|
|
38
|
-
base: BigIntToJsonZod.parse(val.base),
|
|
39
|
-
gasLimit: BigIntToJsonZod.parse(val.gasLimit),
|
|
40
|
-
gasPrice: BigIntToJsonZod.parse(val.gasPrice),
|
|
41
|
-
priority: BigIntToJsonZod.parse(val.priority),
|
|
42
|
-
}))
|
|
43
|
-
|
|
44
|
-
export type TransactionFeesJsonToBigIntZodType = z.infer<typeof TransactionFeesJsonToBigIntZod>
|
|
45
|
-
export type TransactionFeesBigIntToJsonZodType = z.infer<typeof TransactionFeesBigIntToJsonZod>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './ArrayBuffer.ts'
|
|
2
|
-
export * from './BlockBoundWitness.ts'
|
|
3
|
-
export * from './BoundWitness.ts'
|
|
4
|
-
export * from './Chain.ts'
|
|
5
|
-
export * from './HydratedBlock.ts'
|
|
6
|
-
export * from './HydratedTransaction.ts'
|
|
7
|
-
export * from './Json.ts'
|
|
8
|
-
export * from './Permission.ts'
|
|
9
|
-
export * from './RewardsRangeOptions.ts'
|
|
10
|
-
export * from './Sequence.ts'
|
|
11
|
-
export * from './Stake.ts'
|
|
12
|
-
export * from './TimeDomain.ts'
|
|
13
|
-
export * from './TransactionBoundWitness.ts'
|
|
14
|
-
export * from './TransactionFees.ts'
|
|
15
|
-
export * from './TransferPair.ts'
|