@xyo-network/xl1-protocol 1.25.32 → 1.26.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/neutral/index.d.ts +4 -24
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +5 -2047
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +17 -14
- package/src/index.ts +4 -24
- package/LICENSE +0 -165
- package/README.md +0 -81
- package/dist/neutral/BlockNumber/BlockNumber.d.ts +0 -35
- package/dist/neutral/BlockNumber/BlockNumber.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/EthBlockNumber.d.ts +0 -46
- package/dist/neutral/BlockNumber/EthBlockNumber.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/Numberish.d.ts +0 -6
- package/dist/neutral/BlockNumber/Numberish.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/XL1BlockNumber.d.ts +0 -46
- package/dist/neutral/BlockNumber/XL1BlockNumber.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/index.d.ts +0 -5
- package/dist/neutral/BlockNumber/index.d.ts.map +0 -1
- package/dist/neutral/Initializable.d.ts +0 -9
- package/dist/neutral/Initializable.d.ts.map +0 -1
- package/dist/neutral/OpenTelemetryProviders.d.ts +0 -7
- package/dist/neutral/OpenTelemetryProviders.d.ts.map +0 -1
- package/dist/neutral/RecordKeyType.d.ts +0 -4
- package/dist/neutral/RecordKeyType.d.ts.map +0 -1
- package/dist/neutral/Step/StepHash.d.ts +0 -11
- package/dist/neutral/Step/StepHash.d.ts.map +0 -1
- package/dist/neutral/Step/StepIdentity.d.ts +0 -19
- package/dist/neutral/Step/StepIdentity.d.ts.map +0 -1
- package/dist/neutral/Step/StepSizes.d.ts +0 -12
- package/dist/neutral/Step/StepSizes.d.ts.map +0 -1
- package/dist/neutral/Step/index.d.ts +0 -4
- package/dist/neutral/Step/index.d.ts.map +0 -1
- package/dist/neutral/TransferPayload.d.ts +0 -79
- package/dist/neutral/TransferPayload.d.ts.map +0 -1
- package/dist/neutral/amount/ShiftedBigIntConfig.d.ts +0 -9
- package/dist/neutral/amount/ShiftedBigIntConfig.d.ts.map +0 -1
- package/dist/neutral/amount/XL1AmountInstance.d.ts +0 -16
- package/dist/neutral/amount/XL1AmountInstance.d.ts.map +0 -1
- package/dist/neutral/amount/index.d.ts +0 -3
- package/dist/neutral/amount/index.d.ts.map +0 -1
- package/dist/neutral/block/AllowedBlockPayload.d.ts +0 -40
- package/dist/neutral/block/AllowedBlockPayload.d.ts.map +0 -1
- package/dist/neutral/block/BlockBoundWitness.d.ts +0 -544
- package/dist/neutral/block/BlockBoundWitness.d.ts.map +0 -1
- package/dist/neutral/block/HydratedBlock.d.ts +0 -1466
- package/dist/neutral/block/HydratedBlock.d.ts.map +0 -1
- package/dist/neutral/block/index.d.ts +0 -6
- package/dist/neutral/block/index.d.ts.map +0 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitness.d.ts +0 -168
- package/dist/neutral/block/signed/SignedBlockBoundWitness.d.ts.map +0 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts +0 -286
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts.map +0 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts +0 -343
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts.map +0 -1
- package/dist/neutral/block/signed/index.d.ts +0 -4
- package/dist/neutral/block/signed/index.d.ts.map +0 -1
- package/dist/neutral/block/unsigned/UnsignedBlockBoundWitness.d.ts +0 -168
- package/dist/neutral/block/unsigned/UnsignedBlockBoundWitness.d.ts.map +0 -1
- package/dist/neutral/block/unsigned/index.d.ts +0 -2
- package/dist/neutral/block/unsigned/index.d.ts.map +0 -1
- package/dist/neutral/chain/Chain.d.ts +0 -4
- package/dist/neutral/chain/Chain.d.ts.map +0 -1
- package/dist/neutral/chain/ChainAnalyzer.d.ts +0 -10
- package/dist/neutral/chain/ChainAnalyzer.d.ts.map +0 -1
- package/dist/neutral/chain/ChainId.d.ts +0 -4
- package/dist/neutral/chain/ChainId.d.ts.map +0 -1
- package/dist/neutral/chain/index.d.ts +0 -4
- package/dist/neutral/chain/index.d.ts.map +0 -1
- package/dist/neutral/fields/Addressable.d.ts +0 -6
- package/dist/neutral/fields/Addressable.d.ts.map +0 -1
- package/dist/neutral/fields/BlockDuration.d.ts +0 -25
- package/dist/neutral/fields/BlockDuration.d.ts.map +0 -1
- package/dist/neutral/fields/BlockNumber.d.ts +0 -32
- package/dist/neutral/fields/BlockNumber.d.ts.map +0 -1
- package/dist/neutral/fields/ChainReference.d.ts +0 -11
- package/dist/neutral/fields/ChainReference.d.ts.map +0 -1
- package/dist/neutral/fields/index.d.ts +0 -5
- package/dist/neutral/fields/index.d.ts.map +0 -1
- package/dist/neutral/map/AsyncMap.d.ts +0 -42
- package/dist/neutral/map/AsyncMap.d.ts.map +0 -1
- package/dist/neutral/map/MapType.d.ts +0 -17
- package/dist/neutral/map/MapType.d.ts.map +0 -1
- package/dist/neutral/map/SyncMap.d.ts +0 -41
- package/dist/neutral/map/SyncMap.d.ts.map +0 -1
- package/dist/neutral/map/index.d.ts +0 -4
- package/dist/neutral/map/index.d.ts.map +0 -1
- package/dist/neutral/model/AccountBalance.d.ts +0 -133
- package/dist/neutral/model/AccountBalance.d.ts.map +0 -1
- package/dist/neutral/model/ArrayBuffer.d.ts +0 -6
- package/dist/neutral/model/ArrayBuffer.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/BlockRange.d.ts +0 -32
- package/dist/neutral/model/BlockRange/BlockRange.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/EthBlockRange.d.ts +0 -32
- package/dist/neutral/model/BlockRange/EthBlockRange.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/Numberish.d.ts +0 -4
- package/dist/neutral/model/BlockRange/Numberish.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/Range.d.ts +0 -18
- package/dist/neutral/model/BlockRange/Range.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/XL1BlockRange.d.ts +0 -32
- package/dist/neutral/model/BlockRange/XL1BlockRange.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/index.d.ts +0 -5
- package/dist/neutral/model/BlockRange/index.d.ts.map +0 -1
- package/dist/neutral/model/BlockRate.d.ts +0 -290
- package/dist/neutral/model/BlockRate.d.ts.map +0 -1
- package/dist/neutral/model/ChainQualification.d.ts +0 -57
- package/dist/neutral/model/ChainQualification.d.ts.map +0 -1
- package/dist/neutral/model/Context/BaseContext.d.ts +0 -5
- package/dist/neutral/model/Context/BaseContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/BaseContext.zod.d.ts +0 -26
- package/dist/neutral/model/Context/BaseContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/BlockContext.d.ts +0 -9
- package/dist/neutral/model/Context/BlockContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/BlockContext.zod.d.ts +0 -33
- package/dist/neutral/model/Context/BlockContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/CachingContext.d.ts +0 -5
- package/dist/neutral/model/Context/CachingContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/CachingContext.zod.d.ts +0 -10
- package/dist/neutral/model/Context/CachingContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/ChainContext.d.ts +0 -9
- package/dist/neutral/model/Context/ChainContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/ChainContext.zod.d.ts +0 -115
- package/dist/neutral/model/Context/ChainContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/HeadContext.d.ts +0 -5
- package/dist/neutral/model/Context/HeadContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/HeadContext.zod.d.ts +0 -70
- package/dist/neutral/model/Context/HeadContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/index.d.ts +0 -11
- package/dist/neutral/model/Context/index.d.ts.map +0 -1
- package/dist/neutral/model/GatewayName.d.ts +0 -6
- package/dist/neutral/model/GatewayName.d.ts.map +0 -1
- package/dist/neutral/model/HydratedTransaction.d.ts +0 -2300
- package/dist/neutral/model/HydratedTransaction.d.ts.map +0 -1
- package/dist/neutral/model/OpCodes.d.ts +0 -3
- package/dist/neutral/model/OpCodes.d.ts.map +0 -1
- package/dist/neutral/model/PayloadMap.d.ts +0 -10
- package/dist/neutral/model/PayloadMap.d.ts.map +0 -1
- package/dist/neutral/model/Permission.d.ts +0 -59
- package/dist/neutral/model/Permission.d.ts.map +0 -1
- package/dist/neutral/model/Position.d.ts +0 -13
- package/dist/neutral/model/Position.d.ts.map +0 -1
- package/dist/neutral/model/PositionId.d.ts +0 -6
- package/dist/neutral/model/PositionId.d.ts.map +0 -1
- package/dist/neutral/model/RangeMultipliers.d.ts +0 -10
- package/dist/neutral/model/RangeMultipliers.d.ts.map +0 -1
- package/dist/neutral/model/RewardShare.d.ts +0 -3
- package/dist/neutral/model/RewardShare.d.ts.map +0 -1
- package/dist/neutral/model/RewardsRangeOptions.d.ts +0 -16
- package/dist/neutral/model/RewardsRangeOptions.d.ts.map +0 -1
- package/dist/neutral/model/Sequence.d.ts +0 -15
- package/dist/neutral/model/Sequence.d.ts.map +0 -1
- package/dist/neutral/model/Stake.d.ts +0 -121
- package/dist/neutral/model/Stake.d.ts.map +0 -1
- package/dist/neutral/model/StakeShare.d.ts +0 -3
- package/dist/neutral/model/StakeShare.d.ts.map +0 -1
- package/dist/neutral/model/TimeDomain.d.ts +0 -4
- package/dist/neutral/model/TimeDomain.d.ts.map +0 -1
- package/dist/neutral/model/TransferPair.d.ts +0 -12
- package/dist/neutral/model/TransferPair.d.ts.map +0 -1
- package/dist/neutral/model/addresses.d.ts +0 -28
- package/dist/neutral/model/addresses.d.ts.map +0 -1
- package/dist/neutral/model/defaultRewardRatio.d.ts +0 -3
- package/dist/neutral/model/defaultRewardRatio.d.ts.map +0 -1
- package/dist/neutral/model/defaultTransactionFees.d.ts +0 -4
- package/dist/neutral/model/defaultTransactionFees.d.ts.map +0 -1
- package/dist/neutral/model/index.d.ts +0 -28
- package/dist/neutral/model/index.d.ts.map +0 -1
- package/dist/neutral/model/minTransactionFees.d.ts +0 -4
- package/dist/neutral/model/minTransactionFees.d.ts.map +0 -1
- package/dist/neutral/model/rewards.d.ts +0 -15
- package/dist/neutral/model/rewards.d.ts.map +0 -1
- package/dist/neutral/model/version.d.ts +0 -11
- package/dist/neutral/model/version.d.ts.map +0 -1
- package/dist/neutral/network/NetworkId.d.ts +0 -12
- package/dist/neutral/network/NetworkId.d.ts.map +0 -1
- package/dist/neutral/network/Status.d.ts +0 -26
- package/dist/neutral/network/Status.d.ts.map +0 -1
- package/dist/neutral/network/index.d.ts +0 -3
- package/dist/neutral/network/index.d.ts.map +0 -1
- package/dist/neutral/payload/StepIdentityPayload.d.ts +0 -20
- package/dist/neutral/payload/StepIdentityPayload.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeCompletion.d.ts +0 -23
- package/dist/neutral/payload/elevatable/Bridge/BridgeCompletion.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts +0 -33
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts +0 -45
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts +0 -31
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts +0 -33
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/index.d.ts +0 -6
- package/dist/neutral/payload/elevatable/Bridge/index.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/ChainStakeIntent.d.ts +0 -24
- package/dist/neutral/payload/elevatable/ChainStakeIntent.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Executable.d.ts +0 -20
- package/dist/neutral/payload/elevatable/Executable.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Hash.d.ts +0 -21
- package/dist/neutral/payload/elevatable/Hash.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/StepComplete.d.ts +0 -22
- package/dist/neutral/payload/elevatable/StepComplete.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Time.d.ts +0 -71
- package/dist/neutral/payload/elevatable/Time.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/index.d.ts +0 -7
- package/dist/neutral/payload/elevatable/index.d.ts.map +0 -1
- package/dist/neutral/payload/index.d.ts +0 -3
- package/dist/neutral/payload/index.d.ts.map +0 -1
- package/dist/neutral/permissions/InvokerPermission.d.ts +0 -53
- package/dist/neutral/permissions/InvokerPermission.d.ts.map +0 -1
- package/dist/neutral/permissions/XyoPermissions.d.ts +0 -33
- package/dist/neutral/permissions/XyoPermissions.d.ts.map +0 -1
- package/dist/neutral/permissions/index.d.ts +0 -3
- package/dist/neutral/permissions/index.d.ts.map +0 -1
- package/dist/neutral/provider/Provider.d.ts +0 -6
- package/dist/neutral/provider/Provider.d.ts.map +0 -1
- package/dist/neutral/provider/ProviderMoniker.d.ts +0 -9
- package/dist/neutral/provider/ProviderMoniker.d.ts.map +0 -1
- package/dist/neutral/provider/index.d.ts +0 -3
- package/dist/neutral/provider/index.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/Provider.d.ts +0 -10
- package/dist/neutral/providers/DataLake/Provider.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/Runner.d.ts +0 -15
- package/dist/neutral/providers/DataLake/Runner.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/Viewer.d.ts +0 -14
- package/dist/neutral/providers/DataLake/Viewer.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/index.d.ts +0 -4
- package/dist/neutral/providers/DataLake/index.d.ts.map +0 -1
- package/dist/neutral/providers/TransactionHelper.d.ts +0 -9
- package/dist/neutral/providers/TransactionHelper.d.ts.map +0 -1
- package/dist/neutral/providers/XyoClient.d.ts +0 -23
- package/dist/neutral/providers/XyoClient.d.ts.map +0 -1
- package/dist/neutral/providers/XyoConnection.d.ts +0 -18
- package/dist/neutral/providers/XyoConnection.d.ts.map +0 -1
- package/dist/neutral/providers/XyoGateway.d.ts +0 -20
- package/dist/neutral/providers/XyoGateway.d.ts.map +0 -1
- package/dist/neutral/providers/XyoGatewayRunner.d.ts +0 -55
- package/dist/neutral/providers/XyoGatewayRunner.d.ts.map +0 -1
- package/dist/neutral/providers/XyoNetwork.d.ts +0 -7
- package/dist/neutral/providers/XyoNetwork.d.ts.map +0 -1
- package/dist/neutral/providers/XyoRunner.d.ts +0 -17
- package/dist/neutral/providers/XyoRunner.d.ts.map +0 -1
- package/dist/neutral/providers/index.d.ts +0 -9
- package/dist/neutral/providers/index.d.ts.map +0 -1
- package/dist/neutral/providers/signer/XyoSigner.d.ts +0 -25
- package/dist/neutral/providers/signer/XyoSigner.d.ts.map +0 -1
- package/dist/neutral/providers/signer/index.d.ts +0 -2
- package/dist/neutral/providers/signer/index.d.ts.map +0 -1
- package/dist/neutral/repository/Repository.d.ts +0 -27
- package/dist/neutral/repository/Repository.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionReadRepository.d.ts +0 -7
- package/dist/neutral/repository/TransactionReadRepository.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionRepository.d.ts +0 -13
- package/dist/neutral/repository/TransactionRepository.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionRepositoryIterator.d.ts +0 -7
- package/dist/neutral/repository/TransactionRepositoryIterator.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionWriteRepository.d.ts +0 -6
- package/dist/neutral/repository/TransactionWriteRepository.d.ts.map +0 -1
- package/dist/neutral/repository/index.d.ts +0 -6
- package/dist/neutral/repository/index.d.ts.map +0 -1
- package/dist/neutral/runners/Block.d.ts +0 -17
- package/dist/neutral/runners/Block.d.ts.map +0 -1
- package/dist/neutral/runners/Finalization.d.ts +0 -16
- package/dist/neutral/runners/Finalization.d.ts.map +0 -1
- package/dist/neutral/runners/Mempool.d.ts +0 -27
- package/dist/neutral/runners/Mempool.d.ts.map +0 -1
- package/dist/neutral/runners/index.d.ts +0 -4
- package/dist/neutral/runners/index.d.ts.map +0 -1
- package/dist/neutral/transaction/TransactionBoundWitness.d.ts +0 -2127
- package/dist/neutral/transaction/TransactionBoundWitness.d.ts.map +0 -1
- package/dist/neutral/transaction/TransactionFees.d.ts +0 -138
- package/dist/neutral/transaction/TransactionFees.d.ts.map +0 -1
- package/dist/neutral/transaction/TransactionGasCosts.d.ts +0 -38
- package/dist/neutral/transaction/TransactionGasCosts.d.ts.map +0 -1
- package/dist/neutral/transaction/index.d.ts +0 -4
- package/dist/neutral/transaction/index.d.ts.map +0 -1
- package/dist/neutral/validation/block/BlockValidationFunction.d.ts +0 -8
- package/dist/neutral/validation/block/BlockValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts +0 -22
- package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/block/HydratedBlockValidationFunction.d.ts +0 -17
- package/dist/neutral/validation/block/HydratedBlockValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/block/error.d.ts +0 -22
- package/dist/neutral/validation/block/error.d.ts.map +0 -1
- package/dist/neutral/validation/block/index.d.ts +0 -5
- package/dist/neutral/validation/block/index.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/BoundWitnessValidationFunction.d.ts +0 -6
- package/dist/neutral/validation/boundwitness/BoundWitnessValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts +0 -8
- package/dist/neutral/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/error.d.ts +0 -13
- package/dist/neutral/validation/boundwitness/error.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/index.d.ts +0 -4
- package/dist/neutral/validation/boundwitness/index.d.ts.map +0 -1
- package/dist/neutral/validation/error.d.ts +0 -11
- package/dist/neutral/validation/error.d.ts.map +0 -1
- package/dist/neutral/validation/index.d.ts +0 -6
- package/dist/neutral/validation/index.d.ts.map +0 -1
- package/dist/neutral/validation/payload/InBlockPayloadValidationFunction.d.ts +0 -11
- package/dist/neutral/validation/payload/InBlockPayloadValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/payload/error.d.ts +0 -12
- package/dist/neutral/validation/payload/error.d.ts.map +0 -1
- package/dist/neutral/validation/payload/index.d.ts +0 -3
- package/dist/neutral/validation/payload/index.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/HydratedTransactionStateValidationFunction.d.ts +0 -19
- package/dist/neutral/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/HydratedTransactionValidationFunction.d.ts +0 -18
- package/dist/neutral/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/error.d.ts +0 -8
- package/dist/neutral/validation/transaction/error.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/index.d.ts +0 -4
- package/dist/neutral/validation/transaction/index.d.ts.map +0 -1
- package/dist/neutral/viewers/Block.d.ts +0 -33
- package/dist/neutral/viewers/Block.d.ts.map +0 -1
- package/dist/neutral/viewers/BlockInvalidation.d.ts +0 -69
- package/dist/neutral/viewers/BlockInvalidation.d.ts.map +0 -1
- package/dist/neutral/viewers/BlockReward.d.ts +0 -16
- package/dist/neutral/viewers/BlockReward.d.ts.map +0 -1
- package/dist/neutral/viewers/BlockValidation.d.ts +0 -69
- package/dist/neutral/viewers/BlockValidation.d.ts.map +0 -1
- package/dist/neutral/viewers/ChainContract.d.ts +0 -24
- package/dist/neutral/viewers/ChainContract.d.ts.map +0 -1
- package/dist/neutral/viewers/ChainStakeViewer.d.ts +0 -11
- package/dist/neutral/viewers/ChainStakeViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/Finalization.d.ts +0 -21
- package/dist/neutral/viewers/Finalization.d.ts.map +0 -1
- package/dist/neutral/viewers/Fork.d.ts +0 -9
- package/dist/neutral/viewers/Fork.d.ts.map +0 -1
- package/dist/neutral/viewers/Mempool.d.ts +0 -33
- package/dist/neutral/viewers/Mempool.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/NetworkStakeViewer.d.ts +0 -17
- package/dist/neutral/viewers/NetworkStake/NetworkStakeViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByPositionViewer.d.ts +0 -14
- package/dist/neutral/viewers/NetworkStake/Rewards/ByPositionViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStakerViewer.d.ts +0 -15
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStakerViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStepViewer.d.ts +0 -15
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStepViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/Options.d.ts +0 -20
- package/dist/neutral/viewers/NetworkStake/Rewards/Options.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/TotalViewer.d.ts +0 -15
- package/dist/neutral/viewers/NetworkStake/Rewards/TotalViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/Viewer.d.ts +0 -20
- package/dist/neutral/viewers/NetworkStake/Rewards/Viewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/index.d.ts +0 -8
- package/dist/neutral/viewers/NetworkStake/Rewards/index.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.d.ts +0 -7
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/MethodsTemplate.d.ts +0 -10
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/MethodsTemplate.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/index.d.ts +0 -3
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/index.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/index.d.ts +0 -3
- package/dist/neutral/viewers/NetworkStake/index.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStakeStepReward.d.ts +0 -42
- package/dist/neutral/viewers/NetworkStakeStepReward.d.ts.map +0 -1
- package/dist/neutral/viewers/Stake.d.ts +0 -39
- package/dist/neutral/viewers/Stake.d.ts.map +0 -1
- package/dist/neutral/viewers/StakeEvents.d.ts +0 -44
- package/dist/neutral/viewers/StakeEvents.d.ts.map +0 -1
- package/dist/neutral/viewers/StakeIntent.d.ts +0 -17
- package/dist/neutral/viewers/StakeIntent.d.ts.map +0 -1
- package/dist/neutral/viewers/StakeTotals.d.ts +0 -20
- package/dist/neutral/viewers/StakeTotals.d.ts.map +0 -1
- package/dist/neutral/viewers/StepStake.d.ts +0 -15
- package/dist/neutral/viewers/StepStake.d.ts.map +0 -1
- package/dist/neutral/viewers/StepViewer.d.ts +0 -39
- package/dist/neutral/viewers/StepViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/TimeSync.d.ts +0 -22
- package/dist/neutral/viewers/TimeSync.d.ts.map +0 -1
- package/dist/neutral/viewers/Transaction.d.ts +0 -23
- package/dist/neutral/viewers/Transaction.d.ts.map +0 -1
- package/dist/neutral/viewers/TransactionInvalidation.d.ts +0 -67
- package/dist/neutral/viewers/TransactionInvalidation.d.ts.map +0 -1
- package/dist/neutral/viewers/TransactionValidation.d.ts +0 -68
- package/dist/neutral/viewers/TransactionValidation.d.ts.map +0 -1
- package/dist/neutral/viewers/TransferBalance.d.ts +0 -35
- package/dist/neutral/viewers/TransferBalance.d.ts.map +0 -1
- package/dist/neutral/viewers/WindowedBlock.d.ts +0 -19
- package/dist/neutral/viewers/WindowedBlock.d.ts.map +0 -1
- package/dist/neutral/viewers/XyoViewer.d.ts +0 -57
- package/dist/neutral/viewers/XyoViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/index.d.ts +0 -24
- package/dist/neutral/viewers/index.d.ts.map +0 -1
- package/dist/neutral/xl1/AttoXL1.d.ts +0 -15
- package/dist/neutral/xl1/AttoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/FemtoXL1.d.ts +0 -15
- package/dist/neutral/xl1/FemtoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/MicroXL1.d.ts +0 -15
- package/dist/neutral/xl1/MicroXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/MilliXL1.d.ts +0 -15
- package/dist/neutral/xl1/MilliXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/NanoXL1.d.ts +0 -15
- package/dist/neutral/xl1/NanoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/PicoXL1.d.ts +0 -15
- package/dist/neutral/xl1/PicoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/XL1.d.ts +0 -15
- package/dist/neutral/xl1/XL1.d.ts.map +0 -1
- package/dist/neutral/xl1/XL1Units.d.ts +0 -10
- package/dist/neutral/xl1/XL1Units.d.ts.map +0 -1
- package/dist/neutral/xl1/index.d.ts +0 -9
- package/dist/neutral/xl1/index.d.ts.map +0 -1
- package/dist/neutral/xl1/isXL1Factory.d.ts +0 -12
- package/dist/neutral/xl1/isXL1Factory.d.ts.map +0 -1
- package/dist/neutral/xl1/xl1MaxValue.d.ts +0 -3
- package/dist/neutral/xl1/xl1MaxValue.d.ts.map +0 -1
- package/src/BlockNumber/BlockNumber.ts +0 -24
- package/src/BlockNumber/EthBlockNumber.ts +0 -25
- package/src/BlockNumber/Numberish.ts +0 -9
- package/src/BlockNumber/XL1BlockNumber.ts +0 -25
- package/src/BlockNumber/index.ts +0 -4
- package/src/Initializable.ts +0 -13
- package/src/OpenTelemetryProviders.ts +0 -7
- package/src/RecordKeyType.ts +0 -5
- package/src/Step/StepHash.ts +0 -10
- package/src/Step/StepIdentity.ts +0 -46
- package/src/Step/StepSizes.ts +0 -47
- package/src/Step/index.ts +0 -3
- package/src/TransferPayload.ts +0 -35
- package/src/amount/ShiftedBigIntConfig.ts +0 -8
- package/src/amount/XL1AmountInstance.ts +0 -19
- package/src/amount/index.ts +0 -2
- package/src/block/AllowedBlockPayload.ts +0 -73
- package/src/block/BlockBoundWitness.ts +0 -72
- package/src/block/HydratedBlock.ts +0 -135
- package/src/block/index.ts +0 -5
- package/src/block/signed/SignedBlockBoundWitness.ts +0 -22
- package/src/block/signed/SignedBlockBoundWitnessWithHashMeta.ts +0 -35
- package/src/block/signed/SignedBlockBoundWitnessWithStorageMeta.ts +0 -41
- package/src/block/signed/index.ts +0 -3
- package/src/block/unsigned/UnsignedBlockBoundWitness.ts +0 -22
- package/src/block/unsigned/index.ts +0 -1
- package/src/chain/Chain.ts +0 -7
- package/src/chain/ChainAnalyzer.ts +0 -11
- package/src/chain/ChainId.ts +0 -4
- package/src/chain/index.ts +0 -3
- package/src/fields/Addressable.ts +0 -7
- package/src/fields/BlockDuration.ts +0 -25
- package/src/fields/BlockNumber.ts +0 -40
- package/src/fields/ChainReference.ts +0 -11
- package/src/fields/index.ts +0 -4
- package/src/map/AsyncMap.ts +0 -38
- package/src/map/MapType.ts +0 -27
- package/src/map/SyncMap.ts +0 -38
- package/src/map/index.ts +0 -3
- package/src/model/AccountBalance.ts +0 -58
- package/src/model/ArrayBuffer.ts +0 -44
- package/src/model/BlockRange/BlockRange.ts +0 -43
- package/src/model/BlockRange/EthBlockRange.ts +0 -43
- package/src/model/BlockRange/Numberish.ts +0 -6
- package/src/model/BlockRange/Range.ts +0 -17
- package/src/model/BlockRange/XL1BlockRange.ts +0 -43
- package/src/model/BlockRange/index.ts +0 -4
- package/src/model/BlockRate.ts +0 -108
- package/src/model/ChainQualification.ts +0 -48
- package/src/model/Context/BaseContext.ts +0 -6
- package/src/model/Context/BaseContext.zod.ts +0 -36
- package/src/model/Context/BlockContext.ts +0 -12
- package/src/model/Context/BlockContext.zod.ts +0 -20
- package/src/model/Context/CachingContext.ts +0 -6
- package/src/model/Context/CachingContext.zod.ts +0 -4
- package/src/model/Context/ChainContext.ts +0 -12
- package/src/model/Context/ChainContext.zod.ts +0 -17
- package/src/model/Context/HeadContext.ts +0 -6
- package/src/model/Context/HeadContext.zod.ts +0 -13
- package/src/model/Context/index.ts +0 -10
- package/src/model/GatewayName.ts +0 -4
- package/src/model/HydratedTransaction.ts +0 -169
- package/src/model/OpCodes.ts +0 -2
- package/src/model/PayloadMap.ts +0 -13
- package/src/model/Permission.ts +0 -29
- package/src/model/Position.ts +0 -21
- package/src/model/PositionId.ts +0 -4
- package/src/model/RangeMultipliers.ts +0 -13
- package/src/model/RewardShare.ts +0 -2
- package/src/model/RewardsRangeOptions.ts +0 -13
- package/src/model/Sequence.ts +0 -21
- package/src/model/Stake.ts +0 -47
- package/src/model/StakeShare.ts +0 -2
- package/src/model/TimeDomain.ts +0 -8
- package/src/model/TransferPair.ts +0 -7
- package/src/model/addresses.ts +0 -36
- package/src/model/defaultRewardRatio.ts +0 -3
- package/src/model/defaultTransactionFees.ts +0 -11
- package/src/model/index.ts +0 -27
- package/src/model/minTransactionFees.ts +0 -10
- package/src/model/rewards.ts +0 -18
- package/src/model/spec/fixtures/index.ts +0 -2
- package/src/model/spec/fixtures/signedHydratedTransaction.ts +0 -58
- package/src/model/spec/fixtures/unsignedHydratedTransaction.ts +0 -62
- package/src/model/version.ts +0 -10
- package/src/network/NetworkId.ts +0 -6
- package/src/network/Status.ts +0 -30
- package/src/network/index.ts +0 -2
- package/src/payload/StepIdentityPayload.ts +0 -25
- package/src/payload/elevatable/Bridge/BridgeCompletion.ts +0 -28
- package/src/payload/elevatable/Bridge/BridgeDestinationObservation.ts +0 -38
- package/src/payload/elevatable/Bridge/BridgeDetails.ts +0 -69
- package/src/payload/elevatable/Bridge/BridgeIntent.ts +0 -36
- package/src/payload/elevatable/Bridge/BridgeSourceObservation.ts +0 -37
- package/src/payload/elevatable/Bridge/index.ts +0 -5
- package/src/payload/elevatable/ChainStakeIntent.ts +0 -45
- package/src/payload/elevatable/Executable.ts +0 -35
- package/src/payload/elevatable/Hash.ts +0 -25
- package/src/payload/elevatable/StepComplete.ts +0 -31
- package/src/payload/elevatable/Time.ts +0 -61
- package/src/payload/elevatable/index.ts +0 -6
- package/src/payload/index.ts +0 -2
- package/src/permissions/InvokerPermission.ts +0 -58
- package/src/permissions/XyoPermissions.ts +0 -41
- package/src/permissions/index.ts +0 -2
- package/src/provider/Provider.ts +0 -6
- package/src/provider/ProviderMoniker.ts +0 -15
- package/src/provider/index.ts +0 -2
- package/src/providers/DataLake/Provider.ts +0 -12
- package/src/providers/DataLake/Runner.ts +0 -16
- package/src/providers/DataLake/Viewer.ts +0 -16
- package/src/providers/DataLake/index.ts +0 -3
- package/src/providers/TransactionHelper.ts +0 -16
- package/src/providers/XyoClient.ts +0 -26
- package/src/providers/XyoConnection.ts +0 -19
- package/src/providers/XyoGateway.ts +0 -23
- package/src/providers/XyoGatewayRunner.ts +0 -76
- package/src/providers/XyoNetwork.ts +0 -8
- package/src/providers/XyoRunner.ts +0 -20
- package/src/providers/index.ts +0 -8
- package/src/providers/signer/XyoSigner.ts +0 -39
- package/src/providers/signer/index.ts +0 -1
- package/src/repository/Repository.ts +0 -32
- package/src/repository/TransactionReadRepository.ts +0 -6
- package/src/repository/TransactionRepository.ts +0 -12
- package/src/repository/TransactionRepositoryIterator.ts +0 -6
- package/src/repository/TransactionWriteRepository.ts +0 -5
- package/src/repository/index.ts +0 -5
- package/src/runners/Block.ts +0 -22
- package/src/runners/Finalization.ts +0 -19
- package/src/runners/Mempool.ts +0 -32
- package/src/runners/index.ts +0 -3
- package/src/transaction/TransactionBoundWitness.ts +0 -187
- package/src/transaction/TransactionFees.ts +0 -73
- package/src/transaction/TransactionGasCosts.ts +0 -42
- package/src/transaction/index.ts +0 -3
- package/src/validation/block/BlockValidationFunction.ts +0 -13
- package/src/validation/block/HydratedBlockStateValidationFunction.ts +0 -31
- package/src/validation/block/HydratedBlockValidationFunction.ts +0 -22
- package/src/validation/block/error.ts +0 -50
- package/src/validation/block/index.ts +0 -4
- package/src/validation/boundwitness/BoundWitnessValidationFunction.ts +0 -9
- package/src/validation/boundwitness/HydratedBoundWitnessValidationFunction.ts +0 -15
- package/src/validation/boundwitness/error.ts +0 -29
- package/src/validation/boundwitness/index.ts +0 -3
- package/src/validation/error.ts +0 -25
- package/src/validation/index.ts +0 -5
- package/src/validation/payload/InBlockPayloadValidationFunction.ts +0 -17
- package/src/validation/payload/error.ts +0 -24
- package/src/validation/payload/index.ts +0 -2
- package/src/validation/transaction/HydratedTransactionStateValidationFunction.ts +0 -27
- package/src/validation/transaction/HydratedTransactionValidationFunction.ts +0 -23
- package/src/validation/transaction/error.ts +0 -15
- package/src/validation/transaction/index.ts +0 -3
- package/src/viewers/Block.ts +0 -44
- package/src/viewers/BlockInvalidation.ts +0 -80
- package/src/viewers/BlockReward.ts +0 -19
- package/src/viewers/BlockValidation.ts +0 -80
- package/src/viewers/ChainContract.ts +0 -29
- package/src/viewers/ChainStakeViewer.ts +0 -14
- package/src/viewers/Finalization.ts +0 -24
- package/src/viewers/Fork.ts +0 -11
- package/src/viewers/Mempool.ts +0 -41
- package/src/viewers/NetworkStake/NetworkStakeViewer.ts +0 -20
- package/src/viewers/NetworkStake/Rewards/ByPositionViewer.ts +0 -18
- package/src/viewers/NetworkStake/Rewards/ByStakerViewer.ts +0 -20
- package/src/viewers/NetworkStake/Rewards/ByStepViewer.ts +0 -18
- package/src/viewers/NetworkStake/Rewards/Options.ts +0 -24
- package/src/viewers/NetworkStake/Rewards/TotalViewer.ts +0 -17
- package/src/viewers/NetworkStake/Rewards/Viewer.ts +0 -21
- package/src/viewers/NetworkStake/Rewards/index.ts +0 -7
- package/src/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.ts +0 -7
- package/src/viewers/NetworkStake/Rewards/templates/MethodsTemplate.ts +0 -10
- package/src/viewers/NetworkStake/Rewards/templates/index.ts +0 -2
- package/src/viewers/NetworkStake/index.ts +0 -4
- package/src/viewers/NetworkStakeStepReward.ts +0 -83
- package/src/viewers/Stake.ts +0 -45
- package/src/viewers/StakeEvents.ts +0 -55
- package/src/viewers/StakeIntent.ts +0 -22
- package/src/viewers/StakeTotals.ts +0 -22
- package/src/viewers/StepStake.ts +0 -28
- package/src/viewers/StepViewer.ts +0 -57
- package/src/viewers/TimeSync.ts +0 -27
- package/src/viewers/Transaction.ts +0 -27
- package/src/viewers/TransactionInvalidation.ts +0 -70
- package/src/viewers/TransactionValidation.ts +0 -71
- package/src/viewers/TransferBalance.ts +0 -39
- package/src/viewers/WindowedBlock.ts +0 -22
- package/src/viewers/XyoViewer.ts +0 -74
- package/src/viewers/index.ts +0 -23
- package/src/xl1/AttoXL1.ts +0 -19
- package/src/xl1/FemtoXL1.ts +0 -20
- package/src/xl1/MicroXL1.ts +0 -20
- package/src/xl1/MilliXL1.ts +0 -20
- package/src/xl1/NanoXL1.ts +0 -20
- package/src/xl1/PicoXL1.ts +0 -20
- package/src/xl1/XL1.ts +0 -20
- package/src/xl1/XL1Units.ts +0 -26
- package/src/xl1/index.ts +0 -8
- package/src/xl1/isXL1Factory.ts +0 -56
- package/src/xl1/xl1MaxValue.ts +0 -2
package/src/model/OpCodes.ts
DELETED
package/src/model/PayloadMap.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Hash } from '@xylabs/sdk-js'
|
|
2
|
-
import type { Payload } from '@xyo-network/sdk-js'
|
|
3
|
-
|
|
4
|
-
import type {
|
|
5
|
-
MapType, MapTypeRead, MapTypeWrite,
|
|
6
|
-
} from '../map/index.ts'
|
|
7
|
-
|
|
8
|
-
/** PayloadMapWrite type. */
|
|
9
|
-
export type PayloadMapWrite<T extends Payload = Payload> = MapTypeWrite<Hash, T>
|
|
10
|
-
/** PayloadMapRead type. */
|
|
11
|
-
export type PayloadMapRead<T extends Payload = Payload> = MapTypeRead<Hash, T>
|
|
12
|
-
/** PayloadMap type. */
|
|
13
|
-
export type PayloadMap<T extends Payload = Payload> = MapType<Hash, T>
|
package/src/model/Permission.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
/** CaveatTypesZod constant. */
|
|
4
|
-
export const CaveatTypesZod = z.enum(['chain', 'expiration', 'filteredResponse', 'rateLimit', 'restrictReturnedAccounts'])
|
|
5
|
-
|
|
6
|
-
/** CaveatsZod constant. */
|
|
7
|
-
export const CaveatsZod = z.object({
|
|
8
|
-
type: CaveatTypesZod,
|
|
9
|
-
value: z.json(),
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
/** PermissionZod constant. */
|
|
13
|
-
export const PermissionZod = z.object({
|
|
14
|
-
parentCapability: z.string(),
|
|
15
|
-
caveats: CaveatsZod.array().optional(),
|
|
16
|
-
invoker: z.string(),
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
/** InvokerPermissionZod constant. */
|
|
20
|
-
export const InvokerPermissionZod = PermissionZod.safeExtend({ date: z.number().optional() })
|
|
21
|
-
|
|
22
|
-
/** PermissionRequestZod constant. */
|
|
23
|
-
export const PermissionRequestZod = z.record(z.string(), z.record(z.string(), z.any()))
|
|
24
|
-
|
|
25
|
-
/** RequestedPermissionZod constant. */
|
|
26
|
-
export const RequestedPermissionZod = z.object({
|
|
27
|
-
parentCapability: z.string(),
|
|
28
|
-
date: z.number().optional(),
|
|
29
|
-
})
|
package/src/model/Position.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Address } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
import type { PositionId } from './PositionId.ts'
|
|
4
|
-
|
|
5
|
-
/** Position type. */
|
|
6
|
-
export type Position = {
|
|
7
|
-
// the block number when the stake was added
|
|
8
|
-
addBlock: number
|
|
9
|
-
// the amount that is staked
|
|
10
|
-
amount: bigint
|
|
11
|
-
// the unique id for the stake item
|
|
12
|
-
id: PositionId
|
|
13
|
-
// the block number when the stake was removed (set to 0 if not removed)
|
|
14
|
-
removeBlock: number
|
|
15
|
-
// the address that is being staked
|
|
16
|
-
staked: Address
|
|
17
|
-
// the address that owns the stake
|
|
18
|
-
staker: Address
|
|
19
|
-
// the block number when the stake was withdrawn (set to 0 if not withdrawn)
|
|
20
|
-
withdrawBlock: number
|
|
21
|
-
}
|
package/src/model/PositionId.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BlockRangeKey, EthBlockRangeKey, XL1BlockRangeKey,
|
|
3
|
-
} from './BlockRange/index.ts'
|
|
4
|
-
|
|
5
|
-
/** BigFraction type. */
|
|
6
|
-
export type BigFraction = [bigint, bigint] // numerator, denominator
|
|
7
|
-
|
|
8
|
-
/** RangeMultipliers type. */
|
|
9
|
-
export type RangeMultipliers = Record<BlockRangeKey, BigFraction>
|
|
10
|
-
/** EthRangeMultipliers type. */
|
|
11
|
-
export type EthRangeMultipliers = Record<EthBlockRangeKey, BigFraction>
|
|
12
|
-
/** XL1RangeMultipliers type. */
|
|
13
|
-
export type XL1RangeMultipliers = Record<XL1BlockRangeKey, BigFraction>
|
package/src/model/RewardShare.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AddressZod } from '@xylabs/sdk-js'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
|
|
4
|
-
import { StepIdentityZod } from '../Step/index.ts'
|
|
5
|
-
import { BlockRangeZod } from './BlockRange/index.ts'
|
|
6
|
-
|
|
7
|
-
/** RewardsRangeOptionsZod constant. */
|
|
8
|
-
export const RewardsRangeOptionsZod = z.object({
|
|
9
|
-
positions: z.array(z.number()).optional(),
|
|
10
|
-
range: BlockRangeZod.optional(),
|
|
11
|
-
steps: z.array(StepIdentityZod).optional(),
|
|
12
|
-
stakers: z.array(AddressZod).optional(),
|
|
13
|
-
})
|
package/src/model/Sequence.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { HexRegExMinMax, toHex } from '@xylabs/sdk-js'
|
|
2
|
-
import type { LocalSequence, QualifiedSequence } from '@xyo-network/sdk-js'
|
|
3
|
-
import { SequenceConstants } from '@xyo-network/sdk-js'
|
|
4
|
-
import { z } from 'zod'
|
|
5
|
-
|
|
6
|
-
const LocalSequenceRegex = new RegExp(HexRegExMinMax(SequenceConstants.localSequenceBytes, SequenceConstants.localSequenceBytes))
|
|
7
|
-
/** LocalSequenceToStringZod constant. */
|
|
8
|
-
export const LocalSequenceToStringZod = z.string().regex(LocalSequenceRegex)
|
|
9
|
-
/** LocalSequenceFromStringZod constant. */
|
|
10
|
-
export const LocalSequenceFromStringZod = z.string().regex(LocalSequenceRegex).transform<LocalSequence>(v => toHex(v) as LocalSequence)
|
|
11
|
-
|
|
12
|
-
const QualifiedSequenceRegex = new RegExp(HexRegExMinMax(SequenceConstants.qualifiedSequenceBytes, SequenceConstants.qualifiedSequenceBytes))
|
|
13
|
-
/** QualifiedSequenceToStringZod constant. */
|
|
14
|
-
export const QualifiedSequenceToStringZod = z.string().regex(QualifiedSequenceRegex)
|
|
15
|
-
/** QualifiedSequenceFromStringZod constant. */
|
|
16
|
-
export const QualifiedSequenceFromStringZod = z.string().regex(QualifiedSequenceRegex).transform<QualifiedSequence>(v => toHex(v) as QualifiedSequence)
|
|
17
|
-
|
|
18
|
-
/** SequenceToStringZod constant. */
|
|
19
|
-
export const SequenceToStringZod = z.union([LocalSequenceToStringZod, QualifiedSequenceToStringZod])
|
|
20
|
-
/** SequenceFromStringZod constant. */
|
|
21
|
-
export const SequenceFromStringZod = z.union([LocalSequenceFromStringZod, QualifiedSequenceFromStringZod])
|
package/src/model/Stake.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { AddressZod, HexZod } from '@xylabs/sdk-js'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
AttoToJsonZod, AttoZod, JsonToAttoZod,
|
|
6
|
-
} from '../transaction/index.ts'
|
|
7
|
-
import type { PositionId } from './PositionId.ts'
|
|
8
|
-
|
|
9
|
-
/** StakeZod constant. */
|
|
10
|
-
export const StakeZod = z.object({
|
|
11
|
-
amount: AttoZod,
|
|
12
|
-
// the block number when the stake was added
|
|
13
|
-
addBlock: z.number(),
|
|
14
|
-
// the unique id for the stake item
|
|
15
|
-
id: z.number(),
|
|
16
|
-
// the block number when the stake was removed (set to 0 if not removed)
|
|
17
|
-
removeBlock: z.number(),
|
|
18
|
-
// the address that is being staked
|
|
19
|
-
staked: AddressZod,
|
|
20
|
-
// the address that owns the stake
|
|
21
|
-
staker: AddressZod,
|
|
22
|
-
// the block number when the stake was withdrawn (set to 0 if not withdrawn)
|
|
23
|
-
withdrawBlock: z.number(),
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
/** StakeToJsonZod constant. */
|
|
27
|
-
export const StakeToJsonZod = StakeZod.transform(val => ({
|
|
28
|
-
addBlock: val.addBlock,
|
|
29
|
-
amount: AttoToJsonZod.parse(val.amount),
|
|
30
|
-
id: val.id,
|
|
31
|
-
removeBlock: val.removeBlock,
|
|
32
|
-
staked: AddressZod.parse(val.staked),
|
|
33
|
-
staker: AddressZod.parse(val.staker),
|
|
34
|
-
withdrawBlock: val.withdrawBlock,
|
|
35
|
-
}))
|
|
36
|
-
|
|
37
|
-
// we intentionally use extend and not safeExtend here to ensure all fields are present
|
|
38
|
-
/** JsonToStakeZod constant. */
|
|
39
|
-
export const JsonToStakeZod = StakeZod.extend({ amount: HexZod }).transform(val => ({
|
|
40
|
-
addBlock: val.addBlock,
|
|
41
|
-
amount: JsonToAttoZod.parse(val.amount),
|
|
42
|
-
id: val.id as PositionId,
|
|
43
|
-
removeBlock: val.removeBlock,
|
|
44
|
-
staked: val.staked,
|
|
45
|
-
staker: val.staker,
|
|
46
|
-
withdrawBlock: val.withdrawBlock,
|
|
47
|
-
}))
|
package/src/model/StakeShare.ts
DELETED
package/src/model/TimeDomain.ts
DELETED
package/src/model/addresses.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Address, EthAddress } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The Zero Address is used as a marker address for various protocol operations.
|
|
5
|
-
*/
|
|
6
|
-
export const XYO_ZERO_ADDRESS = '0000000000000000000000000000000000000000' as const as Address
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The Bridge Address is used as a marker address for bridge transactions.
|
|
10
|
-
*/
|
|
11
|
-
export const XYO_BRIDGE_ADDRESS = '3012193230121932301219323012193230121932' as const as Address
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The Network Staking Address is used as a marker address for staking the network.
|
|
15
|
-
*/
|
|
16
|
-
export const XYO_NETWORK_STAKING_ADDRESS = '1969196919691969196919691969196919691969' as const as Address
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The Step Reward Address is used as a marker address for step rewards.
|
|
20
|
-
*/
|
|
21
|
-
export const XYO_STEP_REWARD_ADDRESS = '1216197612161976121619761216197612161976' as const as Address
|
|
22
|
-
|
|
23
|
-
/** XL1_ETH_MAIN_ERC20_CONTRACT_ADDRESS constant. */
|
|
24
|
-
export const XL1_ETH_MAIN_ERC20_CONTRACT_ADDRESS = '0xf72aE3E0DA743033AbD7A407557D684c1aE66aed' as const as EthAddress
|
|
25
|
-
|
|
26
|
-
/** XL1_ETH_MAIN_SUB_GOVERNOR_ADDRESS constant. */
|
|
27
|
-
export const XL1_ETH_MAIN_SUB_GOVERNOR_ADDRESS = '0xbA296Bc5D0949C0484f08c56c30FB95CC4675A29' as const as EthAddress
|
|
28
|
-
|
|
29
|
-
/** XL1_ETH_MAIN_REWARDS_ADDRESS constant. */
|
|
30
|
-
export const XL1_ETH_MAIN_REWARDS_ADDRESS = '0x1a546e091FB4EFb274DC584334a28b8754c4ece7' as const as EthAddress
|
|
31
|
-
|
|
32
|
-
/** XL1_ETH_MAIN_STAKED_XYO_CHAIN_ADDRESS constant. */
|
|
33
|
-
export const XL1_ETH_MAIN_STAKED_XYO_CHAIN_ADDRESS = '0x319e667cED10452A117472811130444dED357F26' as const as EthAddress
|
|
34
|
-
|
|
35
|
-
/** XL1_ETH_MAIN_GOVERNANCE_ADDRESS constant. */
|
|
36
|
-
export const XL1_ETH_MAIN_GOVERNANCE_ADDRESS = '0x7595710956d6B14b4f2F51a8dF41379eEeC9074E' as const as EthAddress
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { TransactionFeesBigInt } from '../transaction/index.ts'
|
|
2
|
-
import { AttoXL1, AttoXL1ConvertFactor } from '../xl1/index.ts'
|
|
3
|
-
import { minTransactionFees } from './minTransactionFees.ts'
|
|
4
|
-
|
|
5
|
-
/** defaultTransactionFees value. */
|
|
6
|
-
export const defaultTransactionFees: TransactionFeesBigInt = {
|
|
7
|
-
base: minTransactionFees.base,
|
|
8
|
-
gasPrice: AttoXL1(10n * AttoXL1ConvertFactor.nano),
|
|
9
|
-
gasLimit: AttoXL1(1_000_000n * AttoXL1ConvertFactor.nano),
|
|
10
|
-
priority: minTransactionFees.priority,
|
|
11
|
-
} as const
|
package/src/model/index.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export * from './AccountBalance.ts'
|
|
2
|
-
export * from './addresses.ts'
|
|
3
|
-
export * from './ArrayBuffer.ts'
|
|
4
|
-
export * from './BlockRange/index.ts'
|
|
5
|
-
export * from './BlockRate.ts'
|
|
6
|
-
export * from './ChainQualification.ts'
|
|
7
|
-
export * from './Context/index.ts'
|
|
8
|
-
export * from './defaultRewardRatio.ts'
|
|
9
|
-
export * from './defaultTransactionFees.ts'
|
|
10
|
-
export * from './GatewayName.ts'
|
|
11
|
-
export * from './HydratedTransaction.ts'
|
|
12
|
-
export * from './minTransactionFees.ts'
|
|
13
|
-
export * from './OpCodes.ts'
|
|
14
|
-
export * from './PayloadMap.ts'
|
|
15
|
-
export * from './Permission.ts'
|
|
16
|
-
export * from './Position.ts'
|
|
17
|
-
export * from './PositionId.ts'
|
|
18
|
-
export * from './PositionId.ts'
|
|
19
|
-
export * from './RangeMultipliers.ts'
|
|
20
|
-
export * from './rewards.ts'
|
|
21
|
-
export * from './RewardShare.ts'
|
|
22
|
-
export * from './RewardsRangeOptions.ts'
|
|
23
|
-
export * from './Sequence.ts'
|
|
24
|
-
export * from './Stake.ts'
|
|
25
|
-
export * from './TimeDomain.ts'
|
|
26
|
-
export * from './TransferPair.ts'
|
|
27
|
-
export * from './version.ts'
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TransactionFeesBigInt } from '../transaction/index.ts'
|
|
2
|
-
import { AttoXL1, AttoXL1ConvertFactor } from '../xl1/index.ts'
|
|
3
|
-
|
|
4
|
-
/** minTransactionFees value. */
|
|
5
|
-
export const minTransactionFees: TransactionFeesBigInt = {
|
|
6
|
-
base: AttoXL1(1000n * AttoXL1ConvertFactor.nano),
|
|
7
|
-
gasPrice: AttoXL1(10n * AttoXL1ConvertFactor.nano),
|
|
8
|
-
gasLimit: AttoXL1(1_000_000n * AttoXL1ConvertFactor.nano),
|
|
9
|
-
priority: AttoXL1(0n * AttoXL1ConvertFactor.nano),
|
|
10
|
-
} as const
|
package/src/model/rewards.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { toFixedPoint } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
import { asAttoXL1 } from '../xl1/index.ts'
|
|
4
|
-
|
|
5
|
-
/** XL1_REWARDS_PLACES constant. */
|
|
6
|
-
export const XL1_REWARDS_PLACES = 18 as const
|
|
7
|
-
/** XL1_REWARDS_STARTING_REWARD constant. */
|
|
8
|
-
export const XL1_REWARDS_STARTING_REWARD = asAttoXL1(toFixedPoint(500n, XL1_REWARDS_PLACES))
|
|
9
|
-
/** XL1_REWARDS_BLOCKS_PER_STEP constant. */
|
|
10
|
-
export const XL1_REWARDS_BLOCKS_PER_STEP = 1_000_000
|
|
11
|
-
/** XL1_REWARDS_STEP_FACTOR_NUMERATOR constant. */
|
|
12
|
-
export const XL1_REWARDS_STEP_FACTOR_NUMERATOR = 95n
|
|
13
|
-
/** XL1_REWARDS_STEP_FACTOR_DENOMINATOR constant. */
|
|
14
|
-
export const XL1_REWARDS_STEP_FACTOR_DENOMINATOR = 100n
|
|
15
|
-
/** XL1_REWARDS_MIN_BLOCK_REWARD constant. */
|
|
16
|
-
export const XL1_REWARDS_MIN_BLOCK_REWARD = asAttoXL1(toFixedPoint(10n, XL1_REWARDS_PLACES))
|
|
17
|
-
/** XL1_REWARDS_CREATOR_REWARD constant. */
|
|
18
|
-
export const XL1_REWARDS_CREATOR_REWARD = asAttoXL1(toFixedPoint(20_000_000_000n, XL1_REWARDS_PLACES))
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export const signedHydratedTransactionWithHashMeta = [
|
|
2
|
-
{
|
|
3
|
-
schema: 'network.xyo.boundwitness',
|
|
4
|
-
addresses: [
|
|
5
|
-
'ae2966ff28d3b82e91dbec3fb1e285152ba2e782',
|
|
6
|
-
],
|
|
7
|
-
payload_hashes: [
|
|
8
|
-
'7c4deb6830f9c2f45d61691467825dd1ec08c22b1ac178d8b0737af714a4a636',
|
|
9
|
-
'b0a65744aac6d5a1cc79af5e51d6631618c2b6672f294b1972760019a9b4e174',
|
|
10
|
-
],
|
|
11
|
-
payload_schemas: [
|
|
12
|
-
'network.xyo.boundwitness',
|
|
13
|
-
'network.xyo.stock.market.tzero.snapshot',
|
|
14
|
-
],
|
|
15
|
-
previous_hashes: [
|
|
16
|
-
null,
|
|
17
|
-
],
|
|
18
|
-
$signatures: [
|
|
19
|
-
'fa229bc173704cdbe226f44e15f1f7a7df44fdfe575ffc96ce6f24574b21065f02c3a4d8f84beb01dfd26d70128ca0cb2f69b4f9ec912c2310e4ee5f999619d3',
|
|
20
|
-
],
|
|
21
|
-
nbf: 250_042,
|
|
22
|
-
exp: 250_052,
|
|
23
|
-
fees: {
|
|
24
|
-
base: 'e8d4a51000',
|
|
25
|
-
gasLimit: '038d7ea4c68000',
|
|
26
|
-
gasPrice: '02540be400',
|
|
27
|
-
priority: '00',
|
|
28
|
-
},
|
|
29
|
-
chain: 'dd381fbb392c85160d8b0453e446757b12384046',
|
|
30
|
-
from: 'ae2966ff28d3b82e91dbec3fb1e285152ba2e782',
|
|
31
|
-
_dataHash: 'c3afe940115d0bc2581567d59586f42e5be3f2fe6b42520834a0ec3920dee98b',
|
|
32
|
-
_hash: 'f8b6222c9361e60ddff5982b4e88d3746c2e072edaf58611368b0ad651ee67c2',
|
|
33
|
-
_sequence: '00000000000000000000000051ee67c2',
|
|
34
|
-
},
|
|
35
|
-
[{
|
|
36
|
-
askPrice: 0.28,
|
|
37
|
-
askPriceRate: null,
|
|
38
|
-
askQtyBookTotal: 140_619,
|
|
39
|
-
askQuantity: 716,
|
|
40
|
-
bidPrice: 0.18,
|
|
41
|
-
bidPriceRate: null,
|
|
42
|
-
bidQtyBookTotal: 7688,
|
|
43
|
-
bidQuantity: 2,
|
|
44
|
-
high: null,
|
|
45
|
-
lastPrice: null,
|
|
46
|
-
lastQuantity: null,
|
|
47
|
-
low: null,
|
|
48
|
-
open: null,
|
|
49
|
-
prevClosePx: 0.28,
|
|
50
|
-
schema: 'network.xyo.stock.market.tzero.snapshot',
|
|
51
|
-
symbol: 'XYLB',
|
|
52
|
-
timestamp: '2026-01-19T17:22:02.108746148-05:00',
|
|
53
|
-
volume: 0,
|
|
54
|
-
_dataHash: 'b0a65744aac6d5a1cc79af5e51d6631618c2b6672f294b1972760019a9b4e174',
|
|
55
|
-
_hash: 'b0a65744aac6d5a1cc79af5e51d6631618c2b6672f294b1972760019a9b4e174',
|
|
56
|
-
_sequence: '0000019bd859cdf500000001a9b4e174',
|
|
57
|
-
}],
|
|
58
|
-
]
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export const unsignedHydratedTransactionWithHashMeta = [
|
|
2
|
-
{
|
|
3
|
-
$signatures: [],
|
|
4
|
-
addresses: [],
|
|
5
|
-
chain: '944ac6a2ffc27ab773f34193e43f20ab7542b0ea',
|
|
6
|
-
exp: 11,
|
|
7
|
-
fees: {
|
|
8
|
-
base: 'e8d4a51000',
|
|
9
|
-
gasLimit: '038d7ea4c68000',
|
|
10
|
-
gasPrice: '02540be400',
|
|
11
|
-
priority: '00',
|
|
12
|
-
},
|
|
13
|
-
from: 'c5c9d2a8e8d0b0eba521aec623ffcb9e0982f513',
|
|
14
|
-
nbf: 1,
|
|
15
|
-
payload_hashes: [
|
|
16
|
-
'01bbcd4c58fd88488882ba54e13e92603f13c34695eda64780502acc80c3fcc1',
|
|
17
|
-
'ff127a824dc672ff5b7a32d2c7deffcdde3cc417ad112510532f24a2e948516a',
|
|
18
|
-
'92693e6fefeed94eb80872ba9e2c86d7861fc84e4bc5b775ebe9966e68c26767',
|
|
19
|
-
'85009387d332dffa781bbf6fa107715f36f9d6b3294c5cc8fd1ce8ada207d2bb',
|
|
20
|
-
],
|
|
21
|
-
payload_schemas: [
|
|
22
|
-
'network.xyo.hash',
|
|
23
|
-
'network.xyo.hash',
|
|
24
|
-
'network.xyo.id',
|
|
25
|
-
'network.xyo.id',
|
|
26
|
-
],
|
|
27
|
-
previous_hashes: [],
|
|
28
|
-
schema: 'network.xyo.boundwitness',
|
|
29
|
-
script: [
|
|
30
|
-
'elevate|01bbcd4c58fd88488882ba54e13e92603f13c34695eda64780502acc80c3fcc1',
|
|
31
|
-
'elevate|ff127a824dc672ff5b7a32d2c7deffcdde3cc417ad112510532f24a2e948516a',
|
|
32
|
-
],
|
|
33
|
-
_dataHash: '214029ca586455e66fea02896c6d69739e400917c08e4e8ec1e9818c4a19bb17',
|
|
34
|
-
_hash: '59aacdd66055a63e6a0686a33f155be5b6afca0630a9abfee7ae9e79f057eec8',
|
|
35
|
-
},
|
|
36
|
-
[
|
|
37
|
-
{
|
|
38
|
-
hash: '92693e6fefeed94eb80872ba9e2c86d7861fc84e4bc5b775ebe9966e68c26767',
|
|
39
|
-
schema: 'network.xyo.hash',
|
|
40
|
-
_dataHash: '01bbcd4c58fd88488882ba54e13e92603f13c34695eda64780502acc80c3fcc1',
|
|
41
|
-
_hash: '01bbcd4c58fd88488882ba54e13e92603f13c34695eda64780502acc80c3fcc1',
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
hash: '85009387d332dffa781bbf6fa107715f36f9d6b3294c5cc8fd1ce8ada207d2bb',
|
|
45
|
-
schema: 'network.xyo.hash',
|
|
46
|
-
_dataHash: 'ff127a824dc672ff5b7a32d2c7deffcdde3cc417ad112510532f24a2e948516a',
|
|
47
|
-
_hash: 'ff127a824dc672ff5b7a32d2c7deffcdde3cc417ad112510532f24a2e948516a',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
salt: 'Hello from Sample 0 - 2026-01-15T22:41:36.587Z',
|
|
51
|
-
schema: 'network.xyo.id',
|
|
52
|
-
_dataHash: '92693e6fefeed94eb80872ba9e2c86d7861fc84e4bc5b775ebe9966e68c26767',
|
|
53
|
-
_hash: '92693e6fefeed94eb80872ba9e2c86d7861fc84e4bc5b775ebe9966e68c26767',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
salt: 'Hello from Sample 1 - 2026-01-15T22:41:36.587Z',
|
|
57
|
-
schema: 'network.xyo.id',
|
|
58
|
-
_dataHash: '85009387d332dffa781bbf6fa107715f36f9d6b3294c5cc8fd1ce8ada207d2bb',
|
|
59
|
-
_hash: '85009387d332dffa781bbf6fa107715f36f9d6b3294c5cc8fd1ce8ada207d2bb',
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
]
|
package/src/model/version.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** XL1_PROTOCOL_VERSION_MAJOR constant. */
|
|
2
|
-
export const XL1_PROTOCOL_VERSION_MAJOR = 1 as const
|
|
3
|
-
/** XL1_PROTOCOL_VERSION_MINOR constant. */
|
|
4
|
-
export const XL1_PROTOCOL_VERSION_MINOR = 2 as const
|
|
5
|
-
/** XL1_PROTOCOL_VERSION_PATCH constant. */
|
|
6
|
-
export const XL1_PROTOCOL_VERSION_PATCH = 0 as const
|
|
7
|
-
/** XL1_PROTOCOL_VERSION_STRING constant. */
|
|
8
|
-
export const XL1_PROTOCOL_VERSION_STRING = `${XL1_PROTOCOL_VERSION_MAJOR}.${XL1_PROTOCOL_VERSION_MINOR}.${XL1_PROTOCOL_VERSION_PATCH}` as const
|
|
9
|
-
/** XL1_PROTOCOL_VERSION constant. */
|
|
10
|
-
export const XL1_PROTOCOL_VERSION = XL1_PROTOCOL_VERSION_MAJOR * 1_000_000 + XL1_PROTOCOL_VERSION_MINOR * 1000 + XL1_PROTOCOL_VERSION_PATCH
|
package/src/network/NetworkId.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { GatewayName } from '../model/index.ts'
|
|
2
|
-
|
|
3
|
-
/** Default network identifiers for mainnet, sequence, and local environments. */
|
|
4
|
-
export type DefaultNetworkIds = ('mainnet' & { __gatewayName: true }) | ('sequence' & { __gatewayName: true }) | ('local' & { __gatewayName: true })
|
|
5
|
-
/** A network identifier, either a custom gateway name or one of the default network IDs. */
|
|
6
|
-
export type NetworkId<T extends GatewayName | void = void> = | T extends void ? DefaultNetworkIds : T | DefaultNetworkIds
|
package/src/network/Status.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Payload } from '@xyo-network/sdk-js'
|
|
2
|
-
import { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-js'
|
|
3
|
-
|
|
4
|
-
/** Schema identifier for network status payloads. */
|
|
5
|
-
export const NetworkStatusSchema = asSchema('network.xyo.chain.status', true)
|
|
6
|
-
/** Schema type for NetworkStatus payloads. */
|
|
7
|
-
export type NetworkStatusSchema = typeof NetworkStatusSchema
|
|
8
|
-
|
|
9
|
-
/** Possible states of the network: online, offline, degraded, or unknown. */
|
|
10
|
-
export type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown'
|
|
11
|
-
|
|
12
|
-
/** Represents a single network status update with a time range and description. */
|
|
13
|
-
export type NetworkStatusUpdate = {
|
|
14
|
-
end: number
|
|
15
|
-
start: number
|
|
16
|
-
update: string
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** Fields describing the current network status, including state and optional updates. */
|
|
20
|
-
export interface NetworkStatusFields {
|
|
21
|
-
description: string
|
|
22
|
-
state: NetworkStatusState
|
|
23
|
-
updates?: NetworkStatusUpdate[]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** A payload representing the current network status. */
|
|
27
|
-
export type NetworkStatus = Payload<NetworkStatusFields, NetworkStatusSchema>
|
|
28
|
-
|
|
29
|
-
/** Type guard that checks whether a value is a NetworkStatus payload. */
|
|
30
|
-
export const isNetworkStatus = isPayloadOfSchemaType<NetworkStatus>(NetworkStatusSchema)
|
package/src/network/index.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AsObjectFactory } from '@xylabs/sdk-js'
|
|
2
|
-
import type { Payload } from '@xyo-network/sdk-js'
|
|
3
|
-
import { asSchema, isPayloadOfZodType } from '@xyo-network/sdk-js'
|
|
4
|
-
import type { z } from 'zod'
|
|
5
|
-
|
|
6
|
-
import { StepIdentityZod } from '../Step/index.ts'
|
|
7
|
-
|
|
8
|
-
/** Schema identifier for step identity payloads. */
|
|
9
|
-
export const StepIdentitySchema = asSchema('network.xyo.chain.step.identity', true)
|
|
10
|
-
/** Schema type for StepIdentity payloads. */
|
|
11
|
-
export type StepIdentitySchema = typeof StepIdentitySchema
|
|
12
|
-
|
|
13
|
-
/** Fields for a step identity, inferred from the StepIdentityZod schema. */
|
|
14
|
-
export type StepIdentityFields = z.infer<typeof StepIdentityZod>
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* A Step Identity Payload
|
|
18
|
-
*/
|
|
19
|
-
export type StepIdentityPayload = Payload<StepIdentityFields, StepIdentitySchema>
|
|
20
|
-
|
|
21
|
-
/** Type guard that checks whether a value is a StepIdentityPayload. */
|
|
22
|
-
export const isStepIdentityPayload = isPayloadOfZodType<StepIdentityPayload>(StepIdentityZod, StepIdentitySchema)
|
|
23
|
-
|
|
24
|
-
/** Casts a value to StepIdentityPayload or returns undefined if it does not match. */
|
|
25
|
-
export const asStepIdentityPayload = AsObjectFactory.create(isStepIdentityPayload)
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Hash } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Final confirmation tying the intent and the observation together.
|
|
5
|
-
*/
|
|
6
|
-
export interface BridgeCompletionFields {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Block number, event ID, or timestamp when the bridge was completed
|
|
10
|
-
*/
|
|
11
|
-
completedAt?: Hash
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Reference to observed destination confirmation hash
|
|
15
|
-
*/
|
|
16
|
-
destObservation: Hash
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Reference to source intent hash
|
|
20
|
-
*/
|
|
21
|
-
srcIntent?: Hash
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Reference to observed source confirmation hash
|
|
25
|
-
*/
|
|
26
|
-
srcObservation: Hash
|
|
27
|
-
|
|
28
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { AsObjectFactory, HexZod } from '@xylabs/sdk-js'
|
|
2
|
-
import type { Payload } from '@xyo-network/sdk-js'
|
|
3
|
-
import { asSchema, isPayloadOfZodType } from '@xyo-network/sdk-js'
|
|
4
|
-
import type { z } from 'zod'
|
|
5
|
-
|
|
6
|
-
import { BridgeDetailsFieldsZod } from './BridgeDetails.ts'
|
|
7
|
-
|
|
8
|
-
/** Schema identifier for BridgeDestinationObservation payloads. */
|
|
9
|
-
export const BridgeDestinationObservationSchema = asSchema('network.xyo.chain.bridge.observation.destination', true)
|
|
10
|
-
/** Schema type for BridgeDestinationObservation payloads. */
|
|
11
|
-
export type BridgeDestinationObservationSchema = typeof BridgeDestinationObservationSchema
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Represents an observation that confirms a bridge action occurred on the destination chain.
|
|
15
|
-
*/
|
|
16
|
-
export const BridgeDestinationObservationFieldsZod = BridgeDetailsFieldsZod.extend({
|
|
17
|
-
/**
|
|
18
|
-
* Destination chain confirmation
|
|
19
|
-
*/
|
|
20
|
-
destConfirmation: HexZod.optional().describe('Destination chain confirmation'),
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
/** BridgeDestinationObservationFields type. */
|
|
24
|
-
export type BridgeDestinationObservationFields = z.infer<typeof BridgeDestinationObservationFieldsZod>
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Represents an observation that confirms a bridge action occurred on the destination chain.
|
|
28
|
-
*/
|
|
29
|
-
export type BridgeDestinationObservation = Payload<BridgeDestinationObservationFields, BridgeDestinationObservationSchema>
|
|
30
|
-
|
|
31
|
-
/** Type guard that checks if a value is a valid BridgeDestinationObservation. */
|
|
32
|
-
export const isBridgeDestinationObservation = isPayloadOfZodType<BridgeDestinationObservation>(
|
|
33
|
-
BridgeDestinationObservationFieldsZod,
|
|
34
|
-
BridgeDestinationObservationSchema,
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
/** Converts a value to BridgeDestinationObservation, throwing if invalid. */
|
|
38
|
-
export const asBridgeDestinationObservation = AsObjectFactory.create(isBridgeDestinationObservation)
|