@xyo-network/xl1-protocol 1.25.26 → 1.25.28
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/BlockNumber/BlockNumber.d.ts +7 -0
- package/dist/neutral/BlockNumber/BlockNumber.d.ts.map +1 -1
- package/dist/neutral/BlockNumber/EthBlockNumber.d.ts +7 -0
- package/dist/neutral/BlockNumber/EthBlockNumber.d.ts.map +1 -1
- package/dist/neutral/BlockNumber/Numberish.d.ts +2 -0
- package/dist/neutral/BlockNumber/Numberish.d.ts.map +1 -1
- package/dist/neutral/BlockNumber/XL1BlockNumber.d.ts +7 -0
- package/dist/neutral/BlockNumber/XL1BlockNumber.d.ts.map +1 -1
- package/dist/neutral/Initializable.d.ts +1 -0
- package/dist/neutral/Initializable.d.ts.map +1 -1
- package/dist/neutral/OpenTelemetryProviders.d.ts +1 -0
- package/dist/neutral/OpenTelemetryProviders.d.ts.map +1 -1
- package/dist/neutral/RecordKeyType.d.ts +2 -0
- package/dist/neutral/RecordKeyType.d.ts.map +1 -1
- package/dist/neutral/Step/StepHash.d.ts +2 -0
- package/dist/neutral/Step/StepHash.d.ts.map +1 -1
- package/dist/neutral/Step/StepIdentity.d.ts +4 -0
- package/dist/neutral/Step/StepIdentity.d.ts.map +1 -1
- package/dist/neutral/Step/StepSizes.d.ts +5 -0
- package/dist/neutral/Step/StepSizes.d.ts.map +1 -1
- package/dist/neutral/TransferPayload.d.ts +7 -0
- package/dist/neutral/TransferPayload.d.ts.map +1 -1
- package/dist/neutral/amount/ShiftedBigIntConfig.d.ts +1 -0
- package/dist/neutral/amount/ShiftedBigIntConfig.d.ts.map +1 -1
- package/dist/neutral/amount/XL1AmountInstance.d.ts +16 -0
- package/dist/neutral/amount/XL1AmountInstance.d.ts.map +1 -0
- package/dist/neutral/amount/index.d.ts +2 -4
- package/dist/neutral/amount/index.d.ts.map +1 -1
- package/dist/neutral/block/AllowedBlockPayload.d.ts +7 -0
- package/dist/neutral/block/AllowedBlockPayload.d.ts.map +1 -1
- package/dist/neutral/block/BlockBoundWitness.d.ts +15 -0
- package/dist/neutral/block/BlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/block/HydratedBlock.d.ts +37 -0
- package/dist/neutral/block/HydratedBlock.d.ts.map +1 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitness.d.ts +5 -0
- package/dist/neutral/block/signed/SignedBlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts +7 -0
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts.map +1 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts +7 -0
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts.map +1 -1
- package/dist/neutral/block/unsigned/UnsignedBlockBoundWitness.d.ts +5 -0
- package/dist/neutral/block/unsigned/UnsignedBlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/chain/Chain.d.ts +1 -0
- package/dist/neutral/chain/Chain.d.ts.map +1 -1
- package/dist/neutral/chain/ChainAnalyzer.d.ts +1 -0
- package/dist/neutral/chain/ChainAnalyzer.d.ts.map +1 -1
- package/dist/neutral/chain/ChainId.d.ts +1 -0
- package/dist/neutral/chain/ChainId.d.ts.map +1 -1
- package/dist/neutral/fields/Addressable.d.ts +1 -0
- package/dist/neutral/fields/Addressable.d.ts.map +1 -1
- package/dist/neutral/fields/BlockDuration.d.ts +2 -0
- package/dist/neutral/fields/BlockDuration.d.ts.map +1 -1
- package/dist/neutral/fields/BlockNumber.d.ts +5 -0
- package/dist/neutral/fields/BlockNumber.d.ts.map +1 -1
- package/dist/neutral/index.mjs +152 -319
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/map/AsyncMap.d.ts +6 -0
- package/dist/neutral/map/AsyncMap.d.ts.map +1 -1
- package/dist/neutral/map/MapType.d.ts +7 -0
- package/dist/neutral/map/MapType.d.ts.map +1 -1
- package/dist/neutral/map/SyncMap.d.ts +6 -0
- package/dist/neutral/map/SyncMap.d.ts.map +1 -1
- package/dist/neutral/model/AccountBalance.d.ts +12 -0
- package/dist/neutral/model/AccountBalance.d.ts.map +1 -1
- package/dist/neutral/model/ArrayBuffer.d.ts +2 -0
- package/dist/neutral/model/ArrayBuffer.d.ts.map +1 -1
- package/dist/neutral/model/BlockRange/BlockRange.d.ts +10 -0
- package/dist/neutral/model/BlockRange/BlockRange.d.ts.map +1 -1
- package/dist/neutral/model/BlockRange/EthBlockRange.d.ts +10 -0
- package/dist/neutral/model/BlockRange/EthBlockRange.d.ts.map +1 -1
- package/dist/neutral/model/BlockRange/Numberish.d.ts +1 -0
- package/dist/neutral/model/BlockRange/Numberish.d.ts.map +1 -1
- package/dist/neutral/model/BlockRange/Range.d.ts +5 -0
- package/dist/neutral/model/BlockRange/Range.d.ts.map +1 -1
- package/dist/neutral/model/BlockRange/XL1BlockRange.d.ts +10 -0
- package/dist/neutral/model/BlockRange/XL1BlockRange.d.ts.map +1 -1
- package/dist/neutral/model/BlockRate.d.ts +27 -0
- package/dist/neutral/model/BlockRate.d.ts.map +1 -1
- package/dist/neutral/model/ChainQualification.d.ts +15 -0
- package/dist/neutral/model/ChainQualification.d.ts.map +1 -1
- package/dist/neutral/model/Context/BaseContext.d.ts +1 -0
- package/dist/neutral/model/Context/BaseContext.d.ts.map +1 -1
- package/dist/neutral/model/Context/BaseContext.zod.d.ts +7 -0
- package/dist/neutral/model/Context/BaseContext.zod.d.ts.map +1 -1
- package/dist/neutral/model/Context/BlockContext.d.ts +3 -0
- package/dist/neutral/model/Context/BlockContext.d.ts.map +1 -1
- package/dist/neutral/model/Context/BlockContext.zod.d.ts +3 -0
- package/dist/neutral/model/Context/BlockContext.zod.d.ts.map +1 -1
- package/dist/neutral/model/Context/CachingContext.d.ts +1 -0
- package/dist/neutral/model/Context/CachingContext.d.ts.map +1 -1
- package/dist/neutral/model/Context/CachingContext.zod.d.ts +1 -0
- package/dist/neutral/model/Context/CachingContext.zod.d.ts.map +1 -1
- package/dist/neutral/model/Context/ChainContext.d.ts +3 -0
- package/dist/neutral/model/Context/ChainContext.d.ts.map +1 -1
- package/dist/neutral/model/Context/ChainContext.zod.d.ts +3 -0
- package/dist/neutral/model/Context/ChainContext.zod.d.ts.map +1 -1
- package/dist/neutral/model/Context/HeadContext.d.ts +1 -0
- package/dist/neutral/model/Context/HeadContext.d.ts.map +1 -1
- package/dist/neutral/model/Context/HeadContext.zod.d.ts +2 -0
- package/dist/neutral/model/Context/HeadContext.zod.d.ts.map +1 -1
- package/dist/neutral/model/GatewayName.d.ts +1 -0
- package/dist/neutral/model/GatewayName.d.ts.map +1 -1
- package/dist/neutral/model/HydratedTransaction.d.ts +45 -0
- package/dist/neutral/model/HydratedTransaction.d.ts.map +1 -1
- package/dist/neutral/model/OpCodes.d.ts +1 -0
- package/dist/neutral/model/OpCodes.d.ts.map +1 -1
- package/dist/neutral/model/PayloadMap.d.ts +3 -0
- package/dist/neutral/model/PayloadMap.d.ts.map +1 -1
- package/dist/neutral/model/Permission.d.ts +6 -0
- package/dist/neutral/model/Permission.d.ts.map +1 -1
- package/dist/neutral/model/Position.d.ts +1 -0
- package/dist/neutral/model/Position.d.ts.map +1 -1
- package/dist/neutral/model/PositionId.d.ts +1 -0
- package/dist/neutral/model/PositionId.d.ts.map +1 -1
- package/dist/neutral/model/RangeMultipliers.d.ts +4 -0
- package/dist/neutral/model/RangeMultipliers.d.ts.map +1 -1
- package/dist/neutral/model/RewardShare.d.ts +1 -0
- package/dist/neutral/model/RewardShare.d.ts.map +1 -1
- package/dist/neutral/model/RewardsRangeOptions.d.ts +1 -0
- package/dist/neutral/model/RewardsRangeOptions.d.ts.map +1 -1
- package/dist/neutral/model/Sequence.d.ts +6 -0
- package/dist/neutral/model/Sequence.d.ts.map +1 -1
- package/dist/neutral/model/Stake.d.ts +3 -0
- package/dist/neutral/model/Stake.d.ts.map +1 -1
- package/dist/neutral/model/StakeShare.d.ts +1 -0
- package/dist/neutral/model/StakeShare.d.ts.map +1 -1
- package/dist/neutral/model/TimeDomain.d.ts +1 -0
- package/dist/neutral/model/TimeDomain.d.ts.map +1 -1
- package/dist/neutral/model/TransferPair.d.ts +1 -0
- package/dist/neutral/model/TransferPair.d.ts.map +1 -1
- package/dist/neutral/model/addresses.d.ts +5 -0
- package/dist/neutral/model/addresses.d.ts.map +1 -1
- package/dist/neutral/model/defaultRewardRatio.d.ts +1 -0
- package/dist/neutral/model/defaultRewardRatio.d.ts.map +1 -1
- package/dist/neutral/model/defaultTransactionFees.d.ts +1 -0
- package/dist/neutral/model/defaultTransactionFees.d.ts.map +1 -1
- package/dist/neutral/model/minTransactionFees.d.ts +1 -0
- package/dist/neutral/model/minTransactionFees.d.ts.map +1 -1
- package/dist/neutral/model/rewards.d.ts +7 -0
- package/dist/neutral/model/rewards.d.ts.map +1 -1
- package/dist/neutral/model/version.d.ts +5 -0
- package/dist/neutral/model/version.d.ts.map +1 -1
- package/dist/neutral/network/NetworkId.d.ts +2 -0
- package/dist/neutral/network/NetworkId.d.ts.map +1 -1
- package/dist/neutral/network/Status.d.ts +7 -0
- package/dist/neutral/network/Status.d.ts.map +1 -1
- package/dist/neutral/payload/StepIdentityPayload.d.ts +5 -0
- package/dist/neutral/payload/StepIdentityPayload.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts +5 -0
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts +6 -0
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts +5 -0
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/ChainStakeIntent.d.ts +8 -0
- package/dist/neutral/payload/elevatable/ChainStakeIntent.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Executable.d.ts +7 -0
- package/dist/neutral/payload/elevatable/Executable.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Hash.d.ts +7 -0
- package/dist/neutral/payload/elevatable/Hash.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/StepComplete.d.ts +5 -0
- package/dist/neutral/payload/elevatable/StepComplete.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Time.d.ts +13 -0
- package/dist/neutral/payload/elevatable/Time.d.ts.map +1 -1
- package/dist/neutral/permissions/InvokerPermission.d.ts +2 -0
- package/dist/neutral/permissions/InvokerPermission.d.ts.map +1 -1
- package/dist/neutral/permissions/XyoPermissions.d.ts +1 -0
- package/dist/neutral/permissions/XyoPermissions.d.ts.map +1 -1
- package/dist/neutral/provider/Provider.d.ts +1 -0
- package/dist/neutral/provider/Provider.d.ts.map +1 -1
- package/dist/neutral/provider/ProviderMoniker.d.ts +4 -0
- package/dist/neutral/provider/ProviderMoniker.d.ts.map +1 -1
- package/dist/neutral/providers/DataLake/Provider.d.ts +2 -0
- package/dist/neutral/providers/DataLake/Provider.d.ts.map +1 -1
- package/dist/neutral/providers/DataLake/Runner.d.ts +4 -0
- package/dist/neutral/providers/DataLake/Runner.d.ts.map +1 -1
- package/dist/neutral/providers/DataLake/Viewer.d.ts +4 -0
- package/dist/neutral/providers/DataLake/Viewer.d.ts.map +1 -1
- package/dist/neutral/providers/TransactionHelper.d.ts +1 -0
- package/dist/neutral/providers/TransactionHelper.d.ts.map +1 -1
- package/dist/neutral/providers/XyoClient.d.ts +1 -0
- package/dist/neutral/providers/XyoClient.d.ts.map +1 -1
- package/dist/neutral/providers/XyoConnection.d.ts +3 -0
- package/dist/neutral/providers/XyoConnection.d.ts.map +1 -1
- package/dist/neutral/providers/XyoGateway.d.ts +5 -0
- package/dist/neutral/providers/XyoGateway.d.ts.map +1 -1
- package/dist/neutral/providers/XyoGatewayRunner.d.ts +6 -0
- package/dist/neutral/providers/XyoGatewayRunner.d.ts.map +1 -1
- package/dist/neutral/providers/XyoNetwork.d.ts +1 -0
- package/dist/neutral/providers/XyoNetwork.d.ts.map +1 -1
- package/dist/neutral/providers/XyoRunner.d.ts +4 -0
- package/dist/neutral/providers/XyoRunner.d.ts.map +1 -1
- package/dist/neutral/providers/signer/XyoSigner.d.ts +5 -0
- package/dist/neutral/providers/signer/XyoSigner.d.ts.map +1 -1
- package/dist/neutral/repository/Repository.d.ts +7 -0
- package/dist/neutral/repository/Repository.d.ts.map +1 -1
- package/dist/neutral/repository/TransactionReadRepository.d.ts +1 -0
- package/dist/neutral/repository/TransactionReadRepository.d.ts.map +1 -1
- package/dist/neutral/repository/TransactionRepository.d.ts +3 -0
- package/dist/neutral/repository/TransactionRepository.d.ts.map +1 -1
- package/dist/neutral/repository/TransactionRepositoryIterator.d.ts +1 -0
- package/dist/neutral/repository/TransactionRepositoryIterator.d.ts.map +1 -1
- package/dist/neutral/repository/TransactionWriteRepository.d.ts +1 -0
- package/dist/neutral/repository/TransactionWriteRepository.d.ts.map +1 -1
- package/dist/neutral/runners/Block.d.ts +4 -0
- package/dist/neutral/runners/Block.d.ts.map +1 -1
- package/dist/neutral/runners/Finalization.d.ts +4 -0
- package/dist/neutral/runners/Finalization.d.ts.map +1 -1
- package/dist/neutral/runners/Mempool.d.ts +6 -0
- package/dist/neutral/runners/Mempool.d.ts.map +1 -1
- package/dist/neutral/transaction/TransactionBoundWitness.d.ts +53 -0
- package/dist/neutral/transaction/TransactionBoundWitness.d.ts.map +1 -1
- package/dist/neutral/transaction/TransactionFees.d.ts +18 -1
- package/dist/neutral/transaction/TransactionFees.d.ts.map +1 -1
- package/dist/neutral/transaction/TransactionGasCosts.d.ts +1 -0
- package/dist/neutral/transaction/TransactionGasCosts.d.ts.map +1 -1
- package/dist/neutral/validation/block/BlockValidationFunction.d.ts +1 -0
- package/dist/neutral/validation/block/BlockValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts +2 -0
- package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/block/HydratedBlockValidationFunction.d.ts +1 -0
- package/dist/neutral/validation/block/HydratedBlockValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/block/error.d.ts +6 -0
- package/dist/neutral/validation/block/error.d.ts.map +1 -1
- package/dist/neutral/validation/boundwitness/BoundWitnessValidationFunction.d.ts +1 -0
- package/dist/neutral/validation/boundwitness/BoundWitnessValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts +2 -0
- package/dist/neutral/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/boundwitness/error.d.ts +4 -0
- package/dist/neutral/validation/boundwitness/error.d.ts.map +1 -1
- package/dist/neutral/validation/error.d.ts +2 -0
- package/dist/neutral/validation/error.d.ts.map +1 -1
- package/dist/neutral/validation/payload/InBlockPayloadValidationFunction.d.ts +2 -0
- package/dist/neutral/validation/payload/InBlockPayloadValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/payload/error.d.ts +2 -0
- package/dist/neutral/validation/payload/error.d.ts.map +1 -1
- package/dist/neutral/validation/transaction/HydratedTransactionStateValidationFunction.d.ts +1 -0
- package/dist/neutral/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/transaction/HydratedTransactionValidationFunction.d.ts +1 -0
- package/dist/neutral/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +1 -1
- package/dist/neutral/validation/transaction/error.d.ts +2 -0
- package/dist/neutral/validation/transaction/error.d.ts.map +1 -1
- package/dist/neutral/viewers/Block.d.ts +4 -0
- package/dist/neutral/viewers/Block.d.ts.map +1 -1
- package/dist/neutral/viewers/BlockInvalidation.d.ts +10 -0
- package/dist/neutral/viewers/BlockInvalidation.d.ts.map +1 -1
- package/dist/neutral/viewers/BlockReward.d.ts +4 -0
- package/dist/neutral/viewers/BlockReward.d.ts.map +1 -1
- package/dist/neutral/viewers/BlockValidation.d.ts +10 -0
- package/dist/neutral/viewers/BlockValidation.d.ts.map +1 -1
- package/dist/neutral/viewers/ChainContract.d.ts +4 -0
- package/dist/neutral/viewers/ChainContract.d.ts.map +1 -1
- package/dist/neutral/viewers/ChainStakeViewer.d.ts +3 -0
- package/dist/neutral/viewers/ChainStakeViewer.d.ts.map +1 -1
- package/dist/neutral/viewers/Finalization.d.ts +4 -0
- package/dist/neutral/viewers/Finalization.d.ts.map +1 -1
- package/dist/neutral/viewers/Fork.d.ts +2 -0
- package/dist/neutral/viewers/Fork.d.ts.map +1 -1
- package/dist/neutral/viewers/Mempool.d.ts +8 -0
- package/dist/neutral/viewers/Mempool.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/NetworkStakeViewer.d.ts +4 -0
- package/dist/neutral/viewers/NetworkStake/NetworkStakeViewer.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByPositionViewer.d.ts +4 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/ByPositionViewer.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStakerViewer.d.ts +4 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStakerViewer.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStepViewer.d.ts +4 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStepViewer.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/Options.d.ts +4 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/Options.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/TotalViewer.d.ts +4 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/TotalViewer.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/Viewer.d.ts +4 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/Viewer.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.d.ts +1 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/MethodsTemplate.d.ts +1 -0
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/MethodsTemplate.d.ts.map +1 -1
- package/dist/neutral/viewers/NetworkStakeStepReward.d.ts +7 -0
- package/dist/neutral/viewers/NetworkStakeStepReward.d.ts.map +1 -1
- package/dist/neutral/viewers/Stake.d.ts +8 -0
- package/dist/neutral/viewers/Stake.d.ts.map +1 -1
- package/dist/neutral/viewers/StakeEvents.d.ts +11 -0
- package/dist/neutral/viewers/StakeEvents.d.ts.map +1 -1
- package/dist/neutral/viewers/StakeIntent.d.ts +4 -0
- package/dist/neutral/viewers/StakeIntent.d.ts.map +1 -1
- package/dist/neutral/viewers/StakeTotals.d.ts +4 -0
- package/dist/neutral/viewers/StakeTotals.d.ts.map +1 -1
- package/dist/neutral/viewers/StepStake.d.ts +3 -0
- package/dist/neutral/viewers/StepStake.d.ts.map +1 -1
- package/dist/neutral/viewers/StepViewer.d.ts +7 -0
- package/dist/neutral/viewers/StepViewer.d.ts.map +1 -1
- package/dist/neutral/viewers/TimeSync.d.ts +4 -0
- package/dist/neutral/viewers/TimeSync.d.ts.map +1 -1
- package/dist/neutral/viewers/Transaction.d.ts +4 -0
- package/dist/neutral/viewers/Transaction.d.ts.map +1 -1
- package/dist/neutral/viewers/TransactionInvalidation.d.ts +10 -0
- package/dist/neutral/viewers/TransactionInvalidation.d.ts.map +1 -1
- package/dist/neutral/viewers/TransactionValidation.d.ts +10 -0
- package/dist/neutral/viewers/TransactionValidation.d.ts.map +1 -1
- package/dist/neutral/viewers/TransferBalance.d.ts +6 -0
- package/dist/neutral/viewers/TransferBalance.d.ts.map +1 -1
- package/dist/neutral/viewers/WindowedBlock.d.ts +4 -0
- package/dist/neutral/viewers/WindowedBlock.d.ts.map +1 -1
- package/dist/neutral/viewers/XyoViewer.d.ts +6 -0
- package/dist/neutral/viewers/XyoViewer.d.ts.map +1 -1
- package/dist/neutral/xl1/AttoXL1.d.ts +6 -0
- package/dist/neutral/xl1/AttoXL1.d.ts.map +1 -1
- package/dist/neutral/xl1/FemtoXL1.d.ts +6 -0
- package/dist/neutral/xl1/FemtoXL1.d.ts.map +1 -1
- package/dist/neutral/xl1/MicroXL1.d.ts +6 -0
- package/dist/neutral/xl1/MicroXL1.d.ts.map +1 -1
- package/dist/neutral/xl1/MilliXL1.d.ts +6 -0
- package/dist/neutral/xl1/MilliXL1.d.ts.map +1 -1
- package/dist/neutral/xl1/NanoXL1.d.ts +6 -0
- package/dist/neutral/xl1/NanoXL1.d.ts.map +1 -1
- package/dist/neutral/xl1/PicoXL1.d.ts +6 -0
- package/dist/neutral/xl1/PicoXL1.d.ts.map +1 -1
- package/dist/neutral/xl1/XL1.d.ts +6 -0
- package/dist/neutral/xl1/XL1.d.ts.map +1 -1
- package/dist/neutral/xl1/XL1Units.d.ts +1 -0
- package/dist/neutral/xl1/XL1Units.d.ts.map +1 -1
- package/dist/neutral/xl1/isXL1Factory.d.ts +5 -0
- package/dist/neutral/xl1/isXL1Factory.d.ts.map +1 -1
- package/dist/neutral/xl1/xl1MaxValue.d.ts +1 -0
- package/dist/neutral/xl1/xl1MaxValue.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/BlockNumber/BlockNumber.ts +7 -0
- package/src/BlockNumber/EthBlockNumber.ts +7 -0
- package/src/BlockNumber/Numberish.ts +2 -0
- package/src/BlockNumber/XL1BlockNumber.ts +7 -0
- package/src/Initializable.ts +2 -1
- package/src/OpenTelemetryProviders.ts +1 -0
- package/src/RecordKeyType.ts +4 -1
- package/src/Step/StepHash.ts +2 -1
- package/src/Step/StepIdentity.ts +4 -1
- package/src/Step/StepSizes.ts +5 -0
- package/src/TransferPayload.ts +7 -0
- package/src/amount/ShiftedBigIntConfig.ts +1 -0
- package/src/amount/XL1AmountInstance.ts +19 -0
- package/src/amount/index.ts +2 -4
- package/src/block/AllowedBlockPayload.ts +7 -0
- package/src/block/BlockBoundWitness.ts +17 -2
- package/src/block/HydratedBlock.ts +37 -0
- package/src/block/signed/SignedBlockBoundWitness.ts +5 -0
- package/src/block/signed/SignedBlockBoundWitnessWithHashMeta.ts +7 -0
- package/src/block/signed/SignedBlockBoundWitnessWithStorageMeta.ts +7 -0
- package/src/block/unsigned/UnsignedBlockBoundWitness.ts +5 -0
- package/src/chain/Chain.ts +1 -0
- package/src/chain/ChainAnalyzer.ts +1 -0
- package/src/chain/ChainId.ts +1 -0
- package/src/fields/Addressable.ts +1 -0
- package/src/fields/BlockDuration.ts +2 -0
- package/src/fields/BlockNumber.ts +5 -0
- package/src/map/AsyncMap.ts +6 -0
- package/src/map/MapType.ts +7 -0
- package/src/map/SyncMap.ts +6 -0
- package/src/model/AccountBalance.ts +12 -0
- package/src/model/ArrayBuffer.ts +2 -0
- package/src/model/BlockRange/BlockRange.ts +11 -0
- package/src/model/BlockRange/EthBlockRange.ts +11 -0
- package/src/model/BlockRange/Numberish.ts +1 -0
- package/src/model/BlockRange/Range.ts +5 -0
- package/src/model/BlockRange/XL1BlockRange.ts +11 -0
- package/src/model/BlockRate.ts +27 -0
- package/src/model/ChainQualification.ts +15 -0
- package/src/model/Context/BaseContext.ts +1 -0
- package/src/model/Context/BaseContext.zod.ts +7 -0
- package/src/model/Context/BlockContext.ts +3 -0
- package/src/model/Context/BlockContext.zod.ts +3 -0
- package/src/model/Context/CachingContext.ts +1 -0
- package/src/model/Context/CachingContext.zod.ts +1 -0
- package/src/model/Context/ChainContext.ts +3 -0
- package/src/model/Context/ChainContext.zod.ts +3 -0
- package/src/model/Context/HeadContext.ts +1 -0
- package/src/model/Context/HeadContext.zod.ts +2 -0
- package/src/model/GatewayName.ts +1 -0
- package/src/model/HydratedTransaction.ts +45 -0
- package/src/model/OpCodes.ts +1 -0
- package/src/model/PayloadMap.ts +3 -0
- package/src/model/Permission.ts +6 -0
- package/src/model/Position.ts +1 -0
- package/src/model/PositionId.ts +1 -0
- package/src/model/RangeMultipliers.ts +4 -0
- package/src/model/RewardShare.ts +1 -0
- package/src/model/RewardsRangeOptions.ts +1 -0
- package/src/model/Sequence.ts +6 -0
- package/src/model/Stake.ts +3 -0
- package/src/model/StakeShare.ts +1 -0
- package/src/model/TimeDomain.ts +1 -0
- package/src/model/TransferPair.ts +1 -0
- package/src/model/addresses.ts +5 -0
- package/src/model/defaultRewardRatio.ts +1 -0
- package/src/model/defaultTransactionFees.ts +1 -0
- package/src/model/minTransactionFees.ts +1 -0
- package/src/model/rewards.ts +7 -0
- package/src/model/version.ts +5 -0
- package/src/network/NetworkId.ts +2 -0
- package/src/network/Status.ts +7 -0
- package/src/payload/StepIdentityPayload.ts +5 -0
- package/src/payload/elevatable/Bridge/BridgeDestinationObservation.ts +5 -0
- package/src/payload/elevatable/Bridge/BridgeIntent.ts +6 -0
- package/src/payload/elevatable/Bridge/BridgeSourceObservation.ts +5 -0
- package/src/payload/elevatable/ChainStakeIntent.ts +8 -0
- package/src/payload/elevatable/Executable.ts +7 -0
- package/src/payload/elevatable/Hash.ts +7 -0
- package/src/payload/elevatable/StepComplete.ts +5 -0
- package/src/payload/elevatable/Time.ts +13 -0
- package/src/permissions/InvokerPermission.ts +2 -0
- package/src/permissions/XyoPermissions.ts +1 -0
- package/src/provider/Provider.ts +1 -0
- package/src/provider/ProviderMoniker.ts +4 -0
- package/src/providers/DataLake/Provider.ts +2 -0
- package/src/providers/DataLake/Runner.ts +4 -0
- package/src/providers/DataLake/Viewer.ts +4 -0
- package/src/providers/TransactionHelper.ts +1 -0
- package/src/providers/XyoClient.ts +1 -0
- package/src/providers/XyoConnection.ts +3 -0
- package/src/providers/XyoGateway.ts +5 -0
- package/src/providers/XyoGatewayRunner.ts +6 -0
- package/src/providers/XyoNetwork.ts +1 -0
- package/src/providers/XyoRunner.ts +4 -0
- package/src/providers/signer/XyoSigner.ts +5 -0
- package/src/repository/Repository.ts +7 -0
- package/src/repository/TransactionReadRepository.ts +1 -0
- package/src/repository/TransactionRepository.ts +3 -0
- package/src/repository/TransactionRepositoryIterator.ts +1 -0
- package/src/repository/TransactionWriteRepository.ts +1 -0
- package/src/runners/Block.ts +4 -0
- package/src/runners/Finalization.ts +4 -0
- package/src/runners/Mempool.ts +6 -0
- package/src/transaction/TransactionBoundWitness.ts +53 -0
- package/src/transaction/TransactionFees.ts +20 -2
- package/src/transaction/TransactionGasCosts.ts +1 -0
- package/src/validation/block/BlockValidationFunction.ts +1 -0
- package/src/validation/block/HydratedBlockStateValidationFunction.ts +2 -0
- package/src/validation/block/HydratedBlockValidationFunction.ts +1 -0
- package/src/validation/block/error.ts +6 -0
- package/src/validation/boundwitness/BoundWitnessValidationFunction.ts +1 -0
- package/src/validation/boundwitness/HydratedBoundWitnessValidationFunction.ts +2 -0
- package/src/validation/boundwitness/error.ts +4 -0
- package/src/validation/error.ts +2 -0
- package/src/validation/payload/InBlockPayloadValidationFunction.ts +2 -0
- package/src/validation/payload/error.ts +2 -0
- package/src/validation/transaction/HydratedTransactionStateValidationFunction.ts +1 -0
- package/src/validation/transaction/HydratedTransactionValidationFunction.ts +1 -0
- package/src/validation/transaction/error.ts +2 -0
- package/src/viewers/Block.ts +4 -0
- package/src/viewers/BlockInvalidation.ts +10 -0
- package/src/viewers/BlockReward.ts +4 -0
- package/src/viewers/BlockValidation.ts +10 -0
- package/src/viewers/ChainContract.ts +4 -0
- package/src/viewers/ChainStakeViewer.ts +3 -0
- package/src/viewers/Finalization.ts +4 -0
- package/src/viewers/Fork.ts +2 -0
- package/src/viewers/Mempool.ts +8 -0
- package/src/viewers/NetworkStake/NetworkStakeViewer.ts +4 -0
- package/src/viewers/NetworkStake/Rewards/ByPositionViewer.ts +4 -0
- package/src/viewers/NetworkStake/Rewards/ByStakerViewer.ts +4 -0
- package/src/viewers/NetworkStake/Rewards/ByStepViewer.ts +4 -0
- package/src/viewers/NetworkStake/Rewards/Options.ts +4 -0
- package/src/viewers/NetworkStake/Rewards/TotalViewer.ts +4 -0
- package/src/viewers/NetworkStake/Rewards/Viewer.ts +4 -0
- package/src/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.ts +1 -0
- package/src/viewers/NetworkStake/Rewards/templates/MethodsTemplate.ts +1 -0
- package/src/viewers/NetworkStakeStepReward.ts +7 -0
- package/src/viewers/Stake.ts +8 -0
- package/src/viewers/StakeEvents.ts +11 -0
- package/src/viewers/StakeIntent.ts +4 -0
- package/src/viewers/StakeTotals.ts +4 -0
- package/src/viewers/StepStake.ts +3 -0
- package/src/viewers/StepViewer.ts +7 -0
- package/src/viewers/TimeSync.ts +4 -0
- package/src/viewers/Transaction.ts +4 -0
- package/src/viewers/TransactionInvalidation.ts +10 -0
- package/src/viewers/TransactionValidation.ts +10 -0
- package/src/viewers/TransferBalance.ts +6 -0
- package/src/viewers/WindowedBlock.ts +4 -0
- package/src/viewers/XyoViewer.ts +6 -0
- package/src/xl1/AttoXL1.ts +6 -0
- package/src/xl1/FemtoXL1.ts +6 -0
- package/src/xl1/MicroXL1.ts +6 -0
- package/src/xl1/MilliXL1.ts +6 -0
- package/src/xl1/NanoXL1.ts +6 -0
- package/src/xl1/PicoXL1.ts +6 -0
- package/src/xl1/XL1.ts +6 -0
- package/src/xl1/XL1Units.ts +1 -0
- package/src/xl1/isXL1Factory.ts +5 -0
- package/src/xl1/xl1MaxValue.ts +1 -0
- package/dist/neutral/amount/ShiftedBigInt.d.ts +0 -16
- package/dist/neutral/amount/ShiftedBigInt.d.ts.map +0 -1
- package/dist/neutral/amount/XL1Amount.d.ts +0 -37
- package/dist/neutral/amount/XL1Amount.d.ts.map +0 -1
- package/dist/neutral/amount/splitOnDecimal.d.ts +0 -2
- package/dist/neutral/amount/splitOnDecimal.d.ts.map +0 -1
- package/dist/neutral/amount/splitOnDecimalToString.d.ts +0 -2
- package/dist/neutral/amount/splitOnDecimalToString.d.ts.map +0 -1
- package/src/amount/ShiftedBigInt.ts +0 -71
- package/src/amount/XL1Amount.ts +0 -124
- package/src/amount/splitOnDecimal.ts +0 -5
- package/src/amount/splitOnDecimalToString.ts +0 -39
|
@@ -6,6 +6,7 @@ import type { XL1BlockNumber } from '../BlockNumber/index.ts'
|
|
|
6
6
|
import type { ChainId } from '../chain/index.ts'
|
|
7
7
|
import type { Provider } from '../provider/index.ts'
|
|
8
8
|
|
|
9
|
+
/** ChainContractViewerMethods interface. */
|
|
9
10
|
export interface ChainContractViewerMethods {
|
|
10
11
|
chainId(): Promisable<ChainId>
|
|
11
12
|
forkedAtBlockNumber(): Promisable<XL1BlockNumber | null>
|
|
@@ -16,9 +17,12 @@ export interface ChainContractViewerMethods {
|
|
|
16
17
|
stakingTokenAddress(): Promisable<Address>
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
/** Moniker identifier for the ChainContractViewer provider. */
|
|
19
21
|
export const ChainContractViewerMoniker = 'ChainContractViewer' as const
|
|
22
|
+
/** Type literal for the ChainContractViewer provider moniker. */
|
|
20
23
|
export type ChainContractViewerMoniker = typeof ChainContractViewerMoniker
|
|
21
24
|
|
|
25
|
+
/** Viewer interface for reading ChainContract data. */
|
|
22
26
|
export interface ChainContractViewer extends ChainContractViewerMethods, Provider<ChainContractViewerMoniker> {
|
|
23
27
|
chainIdAtBlockNumber(blockNumber: XL1BlockNumber | 'latest'): Promisable<ChainId>
|
|
24
28
|
forkedChainContractViewer(): Promisable<ChainContractViewer | null>
|
|
@@ -2,9 +2,12 @@ import type { Provider } from '../provider/index.ts'
|
|
|
2
2
|
import type { ChainContractViewer } from './ChainContract.ts'
|
|
3
3
|
import type { StakeTotalsViewer } from './StakeTotals.ts'
|
|
4
4
|
|
|
5
|
+
/** Moniker identifier for the ChainStakeViewer provider. */
|
|
5
6
|
export const ChainStakeViewerMoniker = 'ChainStakeViewer' as const
|
|
7
|
+
/** Type literal for the ChainStakeViewer provider moniker. */
|
|
6
8
|
export type ChainStakeViewerMoniker = typeof ChainStakeViewerMoniker
|
|
7
9
|
|
|
10
|
+
/** Viewer interface for reading ChainStake data. */
|
|
8
11
|
export interface ChainStakeViewer extends Omit<ChainContractViewer, 'moniker'>, Omit<StakeTotalsViewer, 'moniker'>,
|
|
9
12
|
Provider<ChainStakeViewerMoniker> {
|
|
10
13
|
|
|
@@ -5,13 +5,17 @@ import type { XL1BlockNumber } from '../BlockNumber/index.ts'
|
|
|
5
5
|
import type { ChainId } from '../chain/index.ts'
|
|
6
6
|
import type { Provider } from '../provider/index.ts'
|
|
7
7
|
|
|
8
|
+
/** FinalizationViewerMethods interface. */
|
|
8
9
|
export interface FinalizationViewerMethods {
|
|
9
10
|
head(): Promisable<SignedHydratedBlockWithHashMeta>
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
/** Moniker identifier for the FinalizationViewer provider. */
|
|
12
14
|
export const FinalizationViewerMoniker = 'FinalizationViewer' as const
|
|
15
|
+
/** Type literal for the FinalizationViewer provider moniker. */
|
|
13
16
|
export type FinalizationViewerMoniker = typeof FinalizationViewerMoniker
|
|
14
17
|
|
|
18
|
+
/** Viewer interface for reading Finalization data. */
|
|
15
19
|
export interface FinalizationViewer extends FinalizationViewerMethods, Provider<FinalizationViewerMoniker> {
|
|
16
20
|
chainId(): Promisable<ChainId>
|
|
17
21
|
headBlock(): Promisable<SignedBlockBoundWitnessWithHashMeta>
|
package/src/viewers/Fork.ts
CHANGED
|
@@ -2,8 +2,10 @@ import type { Promisable } from '@xylabs/sdk-js'
|
|
|
2
2
|
|
|
3
3
|
import type { ChainId } from '../chain/index.ts'
|
|
4
4
|
|
|
5
|
+
/** ForkHistory type. */
|
|
5
6
|
export type ForkHistory = Record<number, ChainId>
|
|
6
7
|
|
|
8
|
+
/** ForkViewerMethods interface. */
|
|
7
9
|
export interface ForkViewerMethods {
|
|
8
10
|
forkHistory(): Promisable<ForkHistory>
|
|
9
11
|
}
|
package/src/viewers/Mempool.ts
CHANGED
|
@@ -6,28 +6,36 @@ import type { SignedHydratedTransactionWithHashMeta } from '../model/index.ts'
|
|
|
6
6
|
import { XL1BlockRangeZod } from '../model/index.ts'
|
|
7
7
|
import type { Provider } from '../provider/index.ts'
|
|
8
8
|
|
|
9
|
+
/** PendingTransactionsOptionsZod constant. */
|
|
9
10
|
export const PendingTransactionsOptionsZod = z.object({
|
|
10
11
|
cursor: HashZod.optional(),
|
|
11
12
|
limit: z.number().int().positive().optional(),
|
|
12
13
|
window: XL1BlockRangeZod.optional(),
|
|
13
14
|
})
|
|
14
15
|
|
|
16
|
+
/** PendingTransactionsOptions type. */
|
|
15
17
|
export type PendingTransactionsOptions = z.infer<typeof PendingTransactionsOptionsZod>
|
|
16
18
|
|
|
19
|
+
/** PendingBlocksOptionsZod constant. */
|
|
17
20
|
export const PendingBlocksOptionsZod = z.object({
|
|
18
21
|
cursor: HashZod.optional(),
|
|
19
22
|
limit: z.number().int().positive().optional(),
|
|
20
23
|
window: XL1BlockRangeZod.optional(),
|
|
21
24
|
})
|
|
22
25
|
|
|
26
|
+
/** PendingBlocksOptions type. */
|
|
23
27
|
export type PendingBlocksOptions = z.infer<typeof PendingBlocksOptionsZod>
|
|
24
28
|
|
|
29
|
+
/** MempoolViewerMethods interface. */
|
|
25
30
|
export interface MempoolViewerMethods {
|
|
26
31
|
pendingBlocks(options?: PendingBlocksOptions): Promise<SignedHydratedBlockWithHashMeta[]>
|
|
27
32
|
pendingTransactions(options?: PendingTransactionsOptions): Promise<SignedHydratedTransactionWithHashMeta[]>
|
|
28
33
|
}
|
|
29
34
|
|
|
35
|
+
/** Moniker identifier for the MempoolViewer provider. */
|
|
30
36
|
export const MempoolViewerMoniker = 'MempoolViewer' as const
|
|
37
|
+
/** Type literal for the MempoolViewer provider moniker. */
|
|
31
38
|
export type MempoolViewerMoniker = typeof MempoolViewerMoniker
|
|
32
39
|
|
|
40
|
+
/** Viewer interface for reading Mempool data. */
|
|
33
41
|
export interface MempoolViewer extends MempoolViewerMethods, Provider<MempoolViewerMoniker> {}
|
|
@@ -3,14 +3,18 @@ import type { Promisable } from '@xylabs/sdk-js'
|
|
|
3
3
|
import type { Provider } from '../../provider/index.ts'
|
|
4
4
|
import type { NetworkStakeStepRewardsViewer } from './Rewards/index.ts'
|
|
5
5
|
|
|
6
|
+
/** NetworkStakeViewerMethods interface. */
|
|
6
7
|
export interface NetworkStakeViewerMethods {
|
|
7
8
|
/** @returns the active stake and the number of active validators [active, block] */
|
|
8
9
|
active(blockNumber?: number): Promisable<[bigint, number]>
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
/** Moniker identifier for the NetworkStakeViewer provider. */
|
|
11
13
|
export const NetworkStakeViewerMoniker = 'NetworkStakeViewer' as const
|
|
14
|
+
/** Type literal for the NetworkStakeViewer provider moniker. */
|
|
12
15
|
export type NetworkStakeViewerMoniker = typeof NetworkStakeViewerMoniker
|
|
13
16
|
|
|
17
|
+
/** Viewer interface for reading NetworkStake data. */
|
|
14
18
|
export interface NetworkStakeViewer extends NetworkStakeViewerMethods, Provider<NetworkStakeViewerMoniker> {
|
|
15
19
|
stepRewards?: NetworkStakeStepRewardsViewer
|
|
16
20
|
}
|
|
@@ -4,11 +4,15 @@ import type { NetworkStakeStepRewardsByIndexViewerMethodsTemplate } from './temp
|
|
|
4
4
|
|
|
5
5
|
// Viewers are client objects that can nest other viewers and ViewerMethods objects consist only of methods that return data.
|
|
6
6
|
|
|
7
|
+
/** NetworkStakeStepRewardsByPositionViewerMethods interface. */
|
|
7
8
|
export interface NetworkStakeStepRewardsByPositionViewerMethods extends
|
|
8
9
|
NetworkStakeStepRewardsByIndexViewerMethodsTemplate<NetworkStakeStepRewardsByPositionViewerOptions, number> {}
|
|
9
10
|
|
|
11
|
+
/** Moniker identifier for the NetworkStakeStepRewardsByPositionViewer provider. */
|
|
10
12
|
export const NetworkStakeStepRewardsByPositionViewerMoniker = 'NetworkStakeStepRewardsByPositionViewer' as const
|
|
13
|
+
/** Type literal for the NetworkStakeStepRewardsByPositionViewer provider moniker. */
|
|
11
14
|
export type NetworkStakeStepRewardsByPositionViewerMoniker = typeof NetworkStakeStepRewardsByPositionViewerMoniker
|
|
12
15
|
|
|
16
|
+
/** Viewer interface for reading NetworkStakeStepRewardsByPosition data. */
|
|
13
17
|
export interface NetworkStakeStepRewardsByPositionViewer extends NetworkStakeStepRewardsByPositionViewerMethods,
|
|
14
18
|
Provider<NetworkStakeStepRewardsByPositionViewerMoniker> {}
|
|
@@ -6,11 +6,15 @@ import type { NetworkStakeStepRewardsByIndexViewerMethodsTemplate } from './temp
|
|
|
6
6
|
|
|
7
7
|
// Viewers are client objects that can nest other viewers and ViewerMethods objects consist only of methods that return data.
|
|
8
8
|
|
|
9
|
+
/** NetworkStakeStepRewardsByStakerViewerMethods interface. */
|
|
9
10
|
export interface NetworkStakeStepRewardsByStakerViewerMethods
|
|
10
11
|
extends NetworkStakeStepRewardsByIndexViewerMethodsTemplate<NetworkStakeStepRewardsByStakerViewerOptions, Address> {}
|
|
11
12
|
|
|
13
|
+
/** Moniker identifier for the NetworkStakeStepRewardsByStakerViewer provider. */
|
|
12
14
|
export const NetworkStakeStepRewardsByStakerViewerMoniker = 'NetworkStakeStepRewardsByStakerViewer' as const
|
|
15
|
+
/** Type literal for the NetworkStakeStepRewardsByStakerViewer provider moniker. */
|
|
13
16
|
export type NetworkStakeStepRewardsByStakerViewerMoniker = typeof NetworkStakeStepRewardsByStakerViewerMoniker
|
|
14
17
|
|
|
18
|
+
/** Viewer interface for reading NetworkStakeStepRewardsByStaker data. */
|
|
15
19
|
export interface NetworkStakeStepRewardsByStakerViewer extends NetworkStakeStepRewardsByStakerViewerMethods,
|
|
16
20
|
Provider<NetworkStakeStepRewardsByStakerViewerMoniker> {}
|
|
@@ -5,10 +5,14 @@ import type { NetworkStakeStepRewardsByIndexViewerMethodsTemplate } from './temp
|
|
|
5
5
|
|
|
6
6
|
// Viewers are client objects that can nest other viewers and ViewerMethods objects consist only of methods that return data.
|
|
7
7
|
|
|
8
|
+
/** NetworkStakeStepRewardsByStepViewerMethods interface. */
|
|
8
9
|
export interface NetworkStakeStepRewardsByStepViewerMethods extends
|
|
9
10
|
NetworkStakeStepRewardsByIndexViewerMethodsTemplate<NetworkStakeStepRewardsByStepViewerOptions, StepIdentityString> {}
|
|
10
11
|
|
|
12
|
+
/** Moniker identifier for the NetworkStakeStepRewardsByStepViewer provider. */
|
|
11
13
|
export const NetworkStakeStepRewardsByStepViewerMoniker = 'NetworkStakeStepRewardsByStepViewer' as const
|
|
14
|
+
/** Type literal for the NetworkStakeStepRewardsByStepViewer provider moniker. */
|
|
12
15
|
export type NetworkStakeStepRewardsByStepViewerMoniker = typeof NetworkStakeStepRewardsByStepViewerMoniker
|
|
13
16
|
|
|
17
|
+
/** Viewer interface for reading NetworkStakeStepRewardsByStep data. */
|
|
14
18
|
export interface NetworkStakeStepRewardsByStepViewer extends NetworkStakeStepRewardsByStepViewerMethods, Provider<NetworkStakeStepRewardsByStepViewerMoniker> {}
|
|
@@ -3,18 +3,22 @@ import type { Address } from '@xylabs/sdk-js'
|
|
|
3
3
|
import type { BlockRange } from '../../../model/index.ts'
|
|
4
4
|
import type { StepIdentity } from '../../../Step/index.ts'
|
|
5
5
|
|
|
6
|
+
/** Options for NetworkStakeStepRewardsRange. */
|
|
6
7
|
export interface NetworkStakeStepRewardsRangeOptions {
|
|
7
8
|
range?: BlockRange
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
/** Options for NetworkStakeStepRewardsByStepViewer. */
|
|
10
12
|
export interface NetworkStakeStepRewardsByStepViewerOptions extends NetworkStakeStepRewardsRangeOptions {
|
|
11
13
|
steps?: StepIdentity[]
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
/** Options for NetworkStakeStepRewardsByStakerViewer. */
|
|
14
17
|
export interface NetworkStakeStepRewardsByStakerViewerOptions extends NetworkStakeStepRewardsRangeOptions {
|
|
15
18
|
stakers?: Address[]
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
/** Options for NetworkStakeStepRewardsByPositionViewer. */
|
|
18
22
|
export interface NetworkStakeStepRewardsByPositionViewerOptions extends NetworkStakeStepRewardsRangeOptions {
|
|
19
23
|
positions?: number[]
|
|
20
24
|
}
|
|
@@ -5,9 +5,13 @@ import type { NetworkStakeStepRewardsViewerMethodsTemplate } from './templates/i
|
|
|
5
5
|
|
|
6
6
|
// Viewers are client objects that can nest other viewers and ViewerMethods objects consist only of methods that return data.
|
|
7
7
|
|
|
8
|
+
/** NetworkStakeStepRewardsTotalViewerMethods interface. */
|
|
8
9
|
export interface NetworkStakeStepRewardsTotalViewerMethods extends NetworkStakeStepRewardsViewerMethodsTemplate<NetworkStakeStepRewardsRangeOptions, AttoXL1> {}
|
|
9
10
|
|
|
11
|
+
/** Moniker identifier for the NetworkStakeStepRewardsTotalViewer provider. */
|
|
10
12
|
export const NetworkStakeStepRewardsTotalViewerMoniker = 'NetworkStakeStepRewardsTotalViewer' as const
|
|
13
|
+
/** Type literal for the NetworkStakeStepRewardsTotalViewer provider moniker. */
|
|
11
14
|
export type NetworkStakeStepRewardsTotalViewerMoniker = typeof NetworkStakeStepRewardsTotalViewerMoniker
|
|
12
15
|
|
|
16
|
+
/** Viewer interface for reading NetworkStakeStepRewardsTotal data. */
|
|
13
17
|
export interface NetworkStakeStepRewardsTotalViewer extends NetworkStakeStepRewardsTotalViewerMethods, Provider<NetworkStakeStepRewardsTotalViewerMoniker> {}
|
|
@@ -4,11 +4,15 @@ import type { NetworkStakeStepRewardsByStakerViewer } from './ByStakerViewer.ts'
|
|
|
4
4
|
import type { NetworkStakeStepRewardsByStepViewer } from './ByStepViewer.ts'
|
|
5
5
|
import type { NetworkStakeStepRewardsTotalViewer } from './TotalViewer.ts'
|
|
6
6
|
|
|
7
|
+
/** NetworkStakeStepRewardsViewerMethods interface. */
|
|
7
8
|
export interface NetworkStakeStepRewardsViewerMethods {}
|
|
8
9
|
|
|
10
|
+
/** Moniker identifier for the NetworkStakeStepRewardsViewer provider. */
|
|
9
11
|
export const NetworkStakeStepRewardsViewerMoniker = 'NetworkStakeStepRewardsViewer' as const
|
|
12
|
+
/** Type literal for the NetworkStakeStepRewardsViewer provider moniker. */
|
|
10
13
|
export type NetworkStakeStepRewardsViewerMoniker = typeof NetworkStakeStepRewardsViewerMoniker
|
|
11
14
|
|
|
15
|
+
/** Viewer interface for reading NetworkStakeStepRewards data. */
|
|
12
16
|
export interface NetworkStakeStepRewardsViewer extends NetworkStakeStepRewardsViewerMethods, Provider<NetworkStakeStepRewardsViewerMoniker> {
|
|
13
17
|
position?: NetworkStakeStepRewardsByPositionViewer
|
|
14
18
|
staker?: NetworkStakeStepRewardsByStakerViewer
|
|
@@ -2,5 +2,6 @@ import type { RecordKeyType } from '../../../../RecordKeyType.ts'
|
|
|
2
2
|
import type { AttoXL1 } from '../../../../xl1/index.ts'
|
|
3
3
|
import type { NetworkStakeStepRewardsViewerMethodsTemplate } from './MethodsTemplate.ts'
|
|
4
4
|
|
|
5
|
+
/** NetworkStakeStepRewardsByIndexViewerMethodsTemplate interface. */
|
|
5
6
|
export interface NetworkStakeStepRewardsByIndexViewerMethodsTemplate<TOptions, TResultIndex extends RecordKeyType>
|
|
6
7
|
extends NetworkStakeStepRewardsViewerMethodsTemplate<TOptions, Record<TResultIndex, AttoXL1>> {}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Promisable } from '@xylabs/sdk-js'
|
|
2
2
|
|
|
3
|
+
/** NetworkStakeStepRewardsViewerMethodsTemplate interface. */
|
|
3
4
|
export interface NetworkStakeStepRewardsViewerMethodsTemplate<TOptions, TResult> {
|
|
4
5
|
bonus(options?: TOptions): Promisable<TResult>
|
|
5
6
|
claimed(options?: TOptions): Promisable<TResult>
|
|
@@ -4,6 +4,7 @@ import type { Provider } from '../provider/index.ts'
|
|
|
4
4
|
import type { StepIdentity, StepIdentityString } from '../Step/index.ts'
|
|
5
5
|
import type { AttoXL1 } from '../xl1/index.ts'
|
|
6
6
|
|
|
7
|
+
/** NetworkStakeStepAddressRewardViewerMethods interface. */
|
|
7
8
|
export interface NetworkStakeStepAddressRewardViewerMethods {
|
|
8
9
|
// the step rewards for a specific network stakers for all of history
|
|
9
10
|
networkStakeStepRewardAddressHistory(address: Address): Promisable<Record<Address, AttoXL1>>
|
|
@@ -18,6 +19,7 @@ export interface NetworkStakeStepAddressRewardViewerMethods {
|
|
|
18
19
|
networkStakeStepRewardWeightForAddress(context: StepIdentity, address: Address): Promisable<bigint>
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
/** NetworkStakeStepPoolRewardViewerMethods interface. */
|
|
21
23
|
export interface NetworkStakeStepPoolRewardViewerMethods {
|
|
22
24
|
|
|
23
25
|
// all the step rewards for all the network stakers for a given step and block
|
|
@@ -27,6 +29,7 @@ export interface NetworkStakeStepPoolRewardViewerMethods {
|
|
|
27
29
|
networkStakeStepRewardPoolShares(context: StepIdentity): Promisable<Record<Address, bigint>>
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
/** NetworkStakeStepRewardPositionViewerMethods interface. */
|
|
30
33
|
export interface NetworkStakeStepRewardPositionViewerMethods {
|
|
31
34
|
// estimate the current weight for a given position at a given step
|
|
32
35
|
networkStakeStepRewardPositionWeight(context: StepIdentity, position: number): Promisable<bigint>
|
|
@@ -35,6 +38,7 @@ export interface NetworkStakeStepRewardPositionViewerMethods {
|
|
|
35
38
|
networkStakeStepRewardPotentialPositionLoss(context: StepIdentity, position: number): Promisable<AttoXL1>
|
|
36
39
|
}
|
|
37
40
|
|
|
41
|
+
/** NetworkStakeStepRewardViewerMethods interface. */
|
|
38
42
|
export interface NetworkStakeStepRewardViewerMethods extends
|
|
39
43
|
NetworkStakeStepPoolRewardViewerMethods,
|
|
40
44
|
NetworkStakeStepAddressRewardViewerMethods,
|
|
@@ -70,7 +74,10 @@ export interface NetworkStakeStepRewardViewerMethods extends
|
|
|
70
74
|
networkStakeStepRewardsForStepLevel(stepLevel: number, range: [number, number]): Promisable<AttoXL1>
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
/** Moniker identifier for the NetworkStakeStepRewardViewer provider. */
|
|
73
78
|
export const NetworkStakeStepRewardViewerMoniker = 'NetworkStakeStepRewardViewer' as const
|
|
79
|
+
/** Type literal for the NetworkStakeStepRewardViewer provider moniker. */
|
|
74
80
|
export type NetworkStakeStepRewardViewerMoniker = typeof NetworkStakeStepRewardViewerMoniker
|
|
75
81
|
|
|
82
|
+
/** Viewer interface for reading NetworkStakeStepReward data. */
|
|
76
83
|
export interface NetworkStakeStepRewardViewer extends NetworkStakeStepRewardViewerMethods, Provider<NetworkStakeStepRewardViewerMoniker> {}
|
package/src/viewers/Stake.ts
CHANGED
|
@@ -4,10 +4,12 @@ import type { Position } from '../model/index.ts'
|
|
|
4
4
|
import type { Provider } from '../provider/index.ts'
|
|
5
5
|
import type { StakeEventsViewer } from './StakeEvents.ts'
|
|
6
6
|
|
|
7
|
+
/** StakeViewerProperties interface. */
|
|
7
8
|
export interface StakeViewerProperties {
|
|
8
9
|
stakeEvents: StakeEventsViewer
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
/** StakeViewerMethods interface. */
|
|
11
13
|
export interface StakeViewerMethods {
|
|
12
14
|
minWithdrawalBlocks(): Promisable<number>
|
|
13
15
|
rewardsContract(): Promisable<Address>
|
|
@@ -18,18 +20,24 @@ export interface StakeViewerMethods {
|
|
|
18
20
|
stakingTokenAddress(): Promisable<Address>
|
|
19
21
|
}
|
|
20
22
|
|
|
23
|
+
/** Moniker identifier for the StakeViewer provider. */
|
|
21
24
|
export const StakeViewerMoniker = 'StakeViewer' as const
|
|
25
|
+
/** Type literal for the StakeViewer provider moniker. */
|
|
22
26
|
export type StakeViewerMoniker = typeof StakeViewerMoniker
|
|
23
27
|
|
|
28
|
+
/** Viewer interface for reading Stake data. */
|
|
24
29
|
export interface StakeViewer extends StakeViewerMethods, StakeViewerProperties, Provider<StakeViewerMoniker> {
|
|
25
30
|
activeStakes(): Promisable<Position[]>
|
|
26
31
|
removedStakes(): Promisable<Position[]>
|
|
27
32
|
withdrawnStakes(): Promisable<Position[]>
|
|
28
33
|
}
|
|
29
34
|
|
|
35
|
+
/** Moniker identifier for the StakeRunner provider. */
|
|
30
36
|
export const StakeRunnerMoniker = 'StakeRunner' as const
|
|
37
|
+
/** Type literal for the StakeRunner provider moniker. */
|
|
31
38
|
export type StakeRunnerMoniker = typeof StakeRunnerMoniker
|
|
32
39
|
|
|
40
|
+
/** Runner interface for executing Stake operations. */
|
|
33
41
|
export interface StakeRunner extends Provider<StakeRunnerMoniker> {
|
|
34
42
|
addStake(staked: string, amount: bigint): Promise<boolean>
|
|
35
43
|
removeStake(slot: bigint): Promise<boolean>
|
|
@@ -4,20 +4,25 @@ import type {
|
|
|
4
4
|
|
|
5
5
|
import type { Provider } from '../provider/index.ts'
|
|
6
6
|
|
|
7
|
+
/** StakeEventNames constant. */
|
|
7
8
|
export const StakeEventNames = ['StakeAdded', 'StakeRemoved', 'StakeWithdrawn'] as const
|
|
9
|
+
/** StakeEventName type. */
|
|
8
10
|
export type StakeEventName = typeof StakeEventNames[number]
|
|
9
11
|
|
|
12
|
+
/** ExternalEvent interface. */
|
|
10
13
|
export interface ExternalEvent<TName extends string = string, TArgs extends JsonObject = {}> {
|
|
11
14
|
args: TArgs
|
|
12
15
|
name: TName
|
|
13
16
|
time: number // usually block number
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
/** EventFilter interface. */
|
|
16
20
|
export interface EventFilter<TName extends string = string> {
|
|
17
21
|
name?: TName
|
|
18
22
|
time?: [number, number]
|
|
19
23
|
}
|
|
20
24
|
|
|
25
|
+
/** StakeEventArgs interface. */
|
|
21
26
|
export interface StakeEventArgs {
|
|
22
27
|
amount: bigint
|
|
23
28
|
id: number
|
|
@@ -25,19 +30,25 @@ export interface StakeEventArgs {
|
|
|
25
30
|
staker: Address
|
|
26
31
|
}
|
|
27
32
|
|
|
33
|
+
/** StakeEventFilterArgs type. */
|
|
28
34
|
export type StakeEventFilterArgs = Partial<Pick<StakeEventArgs, 'staker' | 'staked' | 'id'>>
|
|
29
35
|
|
|
36
|
+
/** StakeEventFilter interface. */
|
|
30
37
|
export interface StakeEventFilter<TName extends StakeEventName = StakeEventName> extends EventFilter<TName> {
|
|
31
38
|
args?: StakeEventFilterArgs
|
|
32
39
|
}
|
|
33
40
|
|
|
41
|
+
/** StakeEvent interface. */
|
|
34
42
|
export interface StakeEvent<TName extends StakeEventName = StakeEventName> extends ExternalEvent<TName> {
|
|
35
43
|
args: StakeEventArgs
|
|
36
44
|
}
|
|
37
45
|
|
|
46
|
+
/** Moniker identifier for the StakeEventsViewer provider. */
|
|
38
47
|
export const StakeEventsViewerMoniker = 'StakeEventsViewer' as const
|
|
48
|
+
/** Type literal for the StakeEventsViewer provider moniker. */
|
|
39
49
|
export type StakeEventsViewerMoniker = typeof StakeEventsViewerMoniker
|
|
40
50
|
|
|
51
|
+
/** Viewer interface for reading StakeEvents data. */
|
|
41
52
|
export interface StakeEventsViewer extends Provider<StakeEventsViewerMoniker> {
|
|
42
53
|
positionCount(range: [number, number | 'latest']): Promisable<number>
|
|
43
54
|
stakeEvents<TName extends StakeEventName>(range: [number, number | 'latest'], filter?: StakeEventFilter<TName>): Promisable<StakeEvent<TName>[]>
|
|
@@ -6,13 +6,17 @@ import type { ChainQualified, XL1BlockRange } from '../model/index.ts'
|
|
|
6
6
|
import type { ChainStakeIntent } from '../payload/index.ts'
|
|
7
7
|
import type { Provider } from '../provider/index.ts'
|
|
8
8
|
|
|
9
|
+
/** StakeIntentViewerMethods interface. */
|
|
9
10
|
export interface StakeIntentViewerMethods {
|
|
10
11
|
qualifiedIntentByAddress(address: Address, headOrRange?: Hash | XL1BlockRange): Promisable<ChainQualified<ChainStakeIntent | null>>
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
/** Moniker identifier for the StakeIntentViewer provider. */
|
|
13
15
|
export const StakeIntentViewerMoniker = 'StakeIntentViewer' as const
|
|
16
|
+
/** Type literal for the StakeIntentViewer provider moniker. */
|
|
14
17
|
export type StakeIntentViewerMoniker = typeof StakeIntentViewerMoniker
|
|
15
18
|
|
|
19
|
+
/** Viewer interface for reading StakeIntent data. */
|
|
16
20
|
export interface StakeIntentViewer extends StakeIntentViewerMethods, Provider<StakeIntentViewerMoniker> {
|
|
17
21
|
intentByAddress(address: Address, headOrRange?: Hash | XL1BlockRange): Promisable<ChainStakeIntent | null>
|
|
18
22
|
}
|
|
@@ -2,6 +2,7 @@ import type { Address, Promisable } from '@xylabs/sdk-js'
|
|
|
2
2
|
|
|
3
3
|
import type { Provider } from '../provider/index.ts'
|
|
4
4
|
|
|
5
|
+
/** StakeTotalsViewerMethods interface. */
|
|
5
6
|
export interface StakeTotalsViewerMethods {
|
|
6
7
|
active(time?: number): Promisable<bigint>
|
|
7
8
|
activeByStaked(staked: Address, time?: number): Promisable<bigint>
|
|
@@ -12,7 +13,10 @@ export interface StakeTotalsViewerMethods {
|
|
|
12
13
|
withdrawnByStaker(staker: Address, time?: number): Promisable<bigint>
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
/** Moniker identifier for the StakeTotalsViewer provider. */
|
|
15
17
|
export const StakeTotalsViewerMoniker = 'StakeTotalsViewer' as const
|
|
18
|
+
/** Type literal for the StakeTotalsViewer provider moniker. */
|
|
16
19
|
export type StakeTotalsViewerMoniker = typeof StakeTotalsViewerMoniker
|
|
17
20
|
|
|
21
|
+
/** Viewer interface for reading StakeTotals data. */
|
|
18
22
|
export interface StakeTotalsViewer extends StakeTotalsViewerMethods, Provider<StakeTotalsViewerMoniker> {}
|
package/src/viewers/StepStake.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Address, Promisable } from '@xylabs/sdk-js'
|
|
|
3
3
|
import type { Provider } from '../provider/index.ts'
|
|
4
4
|
import type { StepIdentity } from '../Step/index.ts'
|
|
5
5
|
|
|
6
|
+
/** StepStakeViewerMethods interface. */
|
|
6
7
|
export interface StepStakeViewerMethods {
|
|
7
8
|
// this is the prorated stake for all addresses in the step
|
|
8
9
|
stepStake: (step: StepIdentity) => Promisable<Record<Address, bigint>>
|
|
@@ -20,6 +21,8 @@ export interface StepStakeViewerMethods {
|
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
export const StepStakeViewerMoniker = 'StepStakeViewer' as const
|
|
24
|
+
/** Type literal for the StepStakeViewer provider moniker. */
|
|
23
25
|
export type StepStakeViewerMoniker = typeof StepStakeViewerMoniker
|
|
24
26
|
|
|
27
|
+
/** Viewer interface for reading StepStake data. */
|
|
25
28
|
export interface StepStakeViewer extends StepStakeViewerMethods, Provider<StepStakeViewerMoniker> {}
|
|
@@ -5,21 +5,25 @@ import type { Provider } from '../provider/index.ts'
|
|
|
5
5
|
import type { StepIdentity } from '../Step/index.ts'
|
|
6
6
|
import type { NetworkStakeStepRewardsViewer } from './NetworkStake/index.ts'
|
|
7
7
|
|
|
8
|
+
/** Options for PagedPositions. */
|
|
8
9
|
export interface PagedPositionsOptions {
|
|
9
10
|
cursor?: PositionId
|
|
10
11
|
limit?: number
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
/** Options for PagedStakers. */
|
|
13
15
|
export interface PagedStakersOptions {
|
|
14
16
|
cursor?: Address
|
|
15
17
|
limit?: number
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
/** StepStatistics interface. */
|
|
18
21
|
export interface StepStatistics {
|
|
19
22
|
endTime: number
|
|
20
23
|
startTime: number
|
|
21
24
|
}
|
|
22
25
|
|
|
26
|
+
/** StepViewerMethods interface. */
|
|
23
27
|
export interface StepViewerMethods {
|
|
24
28
|
|
|
25
29
|
// the total number of positions for a given step
|
|
@@ -42,9 +46,12 @@ export interface StepViewerMethods {
|
|
|
42
46
|
weight(step: StepIdentity, positionId?: PositionId): Promisable<bigint>
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
/** Moniker identifier for the StepViewer provider. */
|
|
45
50
|
export const StepViewerMoniker = 'StepViewer' as const
|
|
51
|
+
/** Type literal for the StepViewer provider moniker. */
|
|
46
52
|
export type StepViewerMoniker = typeof StepViewerMoniker
|
|
47
53
|
|
|
54
|
+
/** Viewer interface for reading Step data. */
|
|
48
55
|
export interface StepViewer extends StepViewerMethods, Provider<StepViewerMoniker> {
|
|
49
56
|
rewards?: NetworkStakeStepRewardsViewer
|
|
50
57
|
}
|
package/src/viewers/TimeSync.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Promisable } from '@xylabs/sdk-js'
|
|
|
3
3
|
import type { TimeDomain, TimePayload } from '../payload/index.ts'
|
|
4
4
|
import type { Provider } from '../provider/index.ts'
|
|
5
5
|
|
|
6
|
+
/** TimeSyncViewerMethods interface. */
|
|
6
7
|
export interface TimeSyncViewerMethods {
|
|
7
8
|
/** Convert time between different domains */
|
|
8
9
|
convertTime(fromDomain: TimeDomain, toDomain: TimeDomain, from: number): Promisable<number>
|
|
@@ -17,7 +18,10 @@ export interface TimeSyncViewerMethods {
|
|
|
17
18
|
currentTimePayload(): Promisable<TimePayload>
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
/** Moniker identifier for the TimeSyncViewer provider. */
|
|
20
22
|
export const TimeSyncViewerMoniker = 'TimeSyncViewer' as const
|
|
23
|
+
/** Type literal for the TimeSyncViewer provider moniker. */
|
|
21
24
|
export type TimeSyncViewerMoniker = typeof TimeSyncViewerMoniker
|
|
22
25
|
|
|
26
|
+
/** Viewer interface for reading TimeSync data. */
|
|
23
27
|
export interface TimeSyncViewer extends TimeSyncViewerMethods, Provider<TimeSyncViewerMoniker> {}
|
|
@@ -3,6 +3,7 @@ import type { Hash, Promisable } from '@xylabs/sdk-js'
|
|
|
3
3
|
import type { SignedHydratedTransaction, SignedHydratedTransactionWithHashMeta } from '../model/index.ts'
|
|
4
4
|
import type { Provider, ProviderMoniker } from '../provider/index.ts'
|
|
5
5
|
|
|
6
|
+
/** TransactionViewerMethods interface. */
|
|
6
7
|
export interface TransactionViewerMethods {
|
|
7
8
|
byHash(transactionHash: Hash): Promisable<SignedHydratedTransactionWithHashMeta | null>
|
|
8
9
|
|
|
@@ -14,9 +15,12 @@ export interface TransactionViewerMethods {
|
|
|
14
15
|
transactionByHash(transactionHash: Hash): Promisable<SignedHydratedTransaction | null>
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
/** Moniker identifier for the TransactionViewer provider. */
|
|
17
19
|
export const TransactionViewerMoniker = 'TransactionViewer' as const
|
|
20
|
+
/** Type literal for the TransactionViewer provider moniker. */
|
|
18
21
|
export type TransactionViewerMoniker = typeof TransactionViewerMoniker
|
|
19
22
|
|
|
23
|
+
/** Viewer interface for reading Transaction data. */
|
|
20
24
|
export interface TransactionViewer<TMoniker extends ProviderMoniker = TransactionViewerMoniker> extends TransactionViewerMethods, Provider<TMoniker> {
|
|
21
25
|
byBlockHashAndIndex(blockHash: Hash, transactionIndex: number): Promisable<SignedHydratedTransactionWithHashMeta | null>
|
|
22
26
|
byBlockNumberAndIndex(blockNumber: number, transactionIndex: number): Promisable<SignedHydratedTransactionWithHashMeta | null>
|
|
@@ -9,15 +9,20 @@ import {
|
|
|
9
9
|
import type { Provider } from '../provider/index.ts'
|
|
10
10
|
import type { HydratedTransactionValidationError } from '../validation/index.ts'
|
|
11
11
|
|
|
12
|
+
/** TransactionInvalidationQualificationZod constant. */
|
|
12
13
|
export const TransactionInvalidationQualificationZod = ChainQualificationZod
|
|
14
|
+
/** TransactionInvalidationQualification type. */
|
|
13
15
|
export type TransactionInvalidationQualification = z.infer<typeof TransactionInvalidationQualificationZod>
|
|
16
|
+
/** Type guard that checks if a value is a valid TransactionInvalidationQualification. */
|
|
14
17
|
export const isTransactionInvalidationQualification = zodIsFactory(TransactionInvalidationQualificationZod)
|
|
15
18
|
|
|
19
|
+
/** TransactionInvalidationConfigFieldsZod constant. */
|
|
16
20
|
export const TransactionInvalidationConfigFieldsZod = z.object({
|
|
17
21
|
state: z.boolean().optional(),
|
|
18
22
|
value: z.boolean().optional(),
|
|
19
23
|
})
|
|
20
24
|
|
|
25
|
+
/** TransactionInvalidationConfigZod constant. */
|
|
21
26
|
export const TransactionInvalidationConfigZod = z.union([
|
|
22
27
|
TransactionInvalidationConfigFieldsZod.extend(ChainQualifiedHeadConfigZod.shape),
|
|
23
28
|
TransactionInvalidationConfigFieldsZod.extend(ChainQualifiedRangeConfigZod.shape),
|
|
@@ -25,7 +30,9 @@ export const TransactionInvalidationConfigZod = z.union([
|
|
|
25
30
|
z.object({}),
|
|
26
31
|
])
|
|
27
32
|
|
|
33
|
+
/** TransactionInvalidationConfig type. */
|
|
28
34
|
export type TransactionInvalidationConfig = z.infer<typeof TransactionInvalidationConfigZod>
|
|
35
|
+
/** Type guard that checks if a value is a valid TransactionInvalidationConfig. */
|
|
29
36
|
export const isTransactionInvalidationConfig = zodIsFactory(TransactionInvalidationConfigZod)
|
|
30
37
|
|
|
31
38
|
/**
|
|
@@ -39,9 +46,12 @@ export interface TransactionInvalidationViewerMethods {
|
|
|
39
46
|
): Promisable<[(HydratedTransactionValidationError[] | SignedHydratedTransactionWithHashMeta)[], TransactionInvalidationQualification]>
|
|
40
47
|
}
|
|
41
48
|
|
|
49
|
+
/** Moniker identifier for the TransactionInvalidationViewer provider. */
|
|
42
50
|
export const TransactionInvalidationViewerMoniker = 'TransactionInvalidationViewer' as const
|
|
51
|
+
/** Type literal for the TransactionInvalidationViewer provider moniker. */
|
|
43
52
|
export type TransactionInvalidationViewerMoniker = typeof TransactionInvalidationViewerMoniker
|
|
44
53
|
|
|
54
|
+
/** Viewer interface for reading TransactionInvalidation data. */
|
|
45
55
|
export interface TransactionInvalidationViewer extends TransactionInvalidationViewerMethods, Provider<TransactionInvalidationViewerMoniker> {
|
|
46
56
|
invalidateTransaction(
|
|
47
57
|
block: SignedHydratedTransaction,
|
|
@@ -9,15 +9,20 @@ import {
|
|
|
9
9
|
import type { Provider } from '../provider/index.ts'
|
|
10
10
|
import type { HydratedTransactionValidationError } from '../validation/index.ts'
|
|
11
11
|
|
|
12
|
+
/** TransactionValidationQualificationZod constant. */
|
|
12
13
|
export const TransactionValidationQualificationZod = ChainQualificationZod
|
|
14
|
+
/** TransactionValidationQualification type. */
|
|
13
15
|
export type TransactionValidationQualification = z.infer<typeof TransactionValidationQualificationZod>
|
|
16
|
+
/** Type guard that checks if a value is a valid TransactionValidationQualification. */
|
|
14
17
|
export const isTransactionValidationQualification = zodIsFactory(TransactionValidationQualificationZod)
|
|
15
18
|
|
|
19
|
+
/** TransactionValidationConfigFieldsZod constant. */
|
|
16
20
|
export const TransactionValidationConfigFieldsZod = z.object({
|
|
17
21
|
value: z.boolean().optional(),
|
|
18
22
|
state: z.boolean().optional(),
|
|
19
23
|
})
|
|
20
24
|
|
|
25
|
+
/** TransactionValidationConfigZod constant. */
|
|
21
26
|
export const TransactionValidationConfigZod = z.union([
|
|
22
27
|
TransactionValidationConfigFieldsZod.extend(ChainQualifiedHeadConfigZod.shape),
|
|
23
28
|
TransactionValidationConfigFieldsZod.extend(ChainQualifiedRangeConfigZod.shape),
|
|
@@ -25,9 +30,12 @@ export const TransactionValidationConfigZod = z.union([
|
|
|
25
30
|
z.object({}),
|
|
26
31
|
])
|
|
27
32
|
|
|
33
|
+
/** TransactionValidationConfig type. */
|
|
28
34
|
export type TransactionValidationConfig = z.infer<typeof TransactionValidationConfigZod>
|
|
35
|
+
/** Type guard that checks if a value is a valid TransactionValidationConfig. */
|
|
29
36
|
export const isTransactionValidationConfig = zodIsFactory(TransactionValidationConfigZod)
|
|
30
37
|
|
|
38
|
+
/** TransactionValidationViewerMethods interface. */
|
|
31
39
|
export interface TransactionValidationViewerMethods {
|
|
32
40
|
qualifiedValidateTransactions(
|
|
33
41
|
blocks: SignedHydratedTransaction[],
|
|
@@ -35,7 +43,9 @@ export interface TransactionValidationViewerMethods {
|
|
|
35
43
|
): Promisable<[(HydratedTransactionValidationError[] | SignedHydratedTransactionWithHashMeta)[], TransactionValidationQualification]>
|
|
36
44
|
}
|
|
37
45
|
|
|
46
|
+
/** Moniker identifier for the TransactionValidationViewer provider. */
|
|
38
47
|
export const TransactionValidationViewerMoniker = 'TransactionValidationViewer' as const
|
|
48
|
+
/** Type literal for the TransactionValidationViewer provider moniker. */
|
|
39
49
|
export type TransactionValidationViewerMoniker = typeof TransactionValidationViewerMoniker
|
|
40
50
|
|
|
41
51
|
/**
|
|
@@ -8,13 +8,16 @@ import type { TransactionBoundWitness } from '../transaction/index.ts'
|
|
|
8
8
|
import type { Transfer } from '../TransferPayload.ts'
|
|
9
9
|
import type { AttoXL1 } from '../xl1/index.ts'
|
|
10
10
|
|
|
11
|
+
/** TransferBalanceHistoryItem type. */
|
|
11
12
|
export type TransferBalanceHistoryItem = [
|
|
12
13
|
Signed<BlockBoundWitness> /* block */,
|
|
13
14
|
Signed<TransactionBoundWitness> | null,
|
|
14
15
|
Transfer, /* the actual transfer payload */
|
|
15
16
|
]
|
|
17
|
+
/** TransferPair type. */
|
|
16
18
|
export type TransferPair = [Address, Address]
|
|
17
19
|
|
|
20
|
+
/** TransferBalancesViewerMethods interface. */
|
|
18
21
|
export interface TransferBalancesViewerMethods {
|
|
19
22
|
transferBalances(address: Address[]): Promisable<Partial<Record<Address, Record<Address, AttoXL1>>>>
|
|
20
23
|
transferBalancesHistories(address: Address[]): Promisable<Partial<Record<Address, Record<Address, TransferBalanceHistoryItem[]>>>>
|
|
@@ -22,9 +25,12 @@ export interface TransferBalancesViewerMethods {
|
|
|
22
25
|
transferPairBalancesHistories(address: TransferPair[]): Promisable<Partial<Record<Address, Record<Address, TransferBalanceHistoryItem[]>>>>
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
/** Moniker identifier for the TransferBalanceViewer provider. */
|
|
25
29
|
export const TransferBalanceViewerMoniker = 'TransferBalanceViewer' as const
|
|
30
|
+
/** Type literal for the TransferBalanceViewer provider moniker. */
|
|
26
31
|
export type TransferBalanceViewerMoniker = typeof TransferBalanceViewerMoniker
|
|
27
32
|
|
|
33
|
+
/** Viewer interface for reading TransferBalance data. */
|
|
28
34
|
export interface TransferBalanceViewer extends TransferBalancesViewerMethods, Provider<TransferBalanceViewerMoniker> {
|
|
29
35
|
transferBalance(address: Address): Promisable<AttoXL1>
|
|
30
36
|
transferBalanceHistory(address: Address, range?: XL1BlockRange): Promisable<TransferBalanceHistoryItem[]>
|