@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
package/src/model/version.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/** XL1_PROTOCOL_VERSION_MAJOR constant. */
|
|
1
2
|
export const XL1_PROTOCOL_VERSION_MAJOR = 1 as const
|
|
3
|
+
/** XL1_PROTOCOL_VERSION_MINOR constant. */
|
|
2
4
|
export const XL1_PROTOCOL_VERSION_MINOR = 2 as const
|
|
5
|
+
/** XL1_PROTOCOL_VERSION_PATCH constant. */
|
|
3
6
|
export const XL1_PROTOCOL_VERSION_PATCH = 0 as const
|
|
7
|
+
/** XL1_PROTOCOL_VERSION_STRING constant. */
|
|
4
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. */
|
|
5
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
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { GatewayName } from '../model/index.ts'
|
|
2
2
|
|
|
3
|
+
/** Default network identifiers for mainnet, sequence, and local environments. */
|
|
3
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. */
|
|
4
6
|
export type NetworkId<T extends GatewayName | void = void> = | T extends void ? DefaultNetworkIds : T | DefaultNetworkIds
|
package/src/network/Status.ts
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import type { Payload } from '@xyo-network/sdk-js'
|
|
2
2
|
import { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-js'
|
|
3
3
|
|
|
4
|
+
/** Schema identifier for network status payloads. */
|
|
4
5
|
export const NetworkStatusSchema = asSchema('network.xyo.chain.status', true)
|
|
6
|
+
/** Schema type for NetworkStatus payloads. */
|
|
5
7
|
export type NetworkStatusSchema = typeof NetworkStatusSchema
|
|
6
8
|
|
|
9
|
+
/** Possible states of the network: online, offline, degraded, or unknown. */
|
|
7
10
|
export type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown'
|
|
8
11
|
|
|
12
|
+
/** Represents a single network status update with a time range and description. */
|
|
9
13
|
export type NetworkStatusUpdate = {
|
|
10
14
|
end: number
|
|
11
15
|
start: number
|
|
12
16
|
update: string
|
|
13
17
|
}
|
|
14
18
|
|
|
19
|
+
/** Fields describing the current network status, including state and optional updates. */
|
|
15
20
|
export interface NetworkStatusFields {
|
|
16
21
|
description: string
|
|
17
22
|
state: NetworkStatusState
|
|
18
23
|
updates?: NetworkStatusUpdate[]
|
|
19
24
|
}
|
|
20
25
|
|
|
26
|
+
/** A payload representing the current network status. */
|
|
21
27
|
export type NetworkStatus = Payload<NetworkStatusFields, NetworkStatusSchema>
|
|
22
28
|
|
|
29
|
+
/** Type guard that checks whether a value is a NetworkStatus payload. */
|
|
23
30
|
export const isNetworkStatus = isPayloadOfSchemaType<NetworkStatus>(NetworkStatusSchema)
|
|
@@ -5,9 +5,12 @@ import type { z } from 'zod'
|
|
|
5
5
|
|
|
6
6
|
import { StepIdentityZod } from '../Step/index.ts'
|
|
7
7
|
|
|
8
|
+
/** Schema identifier for step identity payloads. */
|
|
8
9
|
export const StepIdentitySchema = asSchema('network.xyo.chain.step.identity', true)
|
|
10
|
+
/** Schema type for StepIdentity payloads. */
|
|
9
11
|
export type StepIdentitySchema = typeof StepIdentitySchema
|
|
10
12
|
|
|
13
|
+
/** Fields for a step identity, inferred from the StepIdentityZod schema. */
|
|
11
14
|
export type StepIdentityFields = z.infer<typeof StepIdentityZod>
|
|
12
15
|
|
|
13
16
|
/**
|
|
@@ -15,6 +18,8 @@ export type StepIdentityFields = z.infer<typeof StepIdentityZod>
|
|
|
15
18
|
*/
|
|
16
19
|
export type StepIdentityPayload = Payload<StepIdentityFields, StepIdentitySchema>
|
|
17
20
|
|
|
21
|
+
/** Type guard that checks whether a value is a StepIdentityPayload. */
|
|
18
22
|
export const isStepIdentityPayload = isPayloadOfZodType<StepIdentityPayload>(StepIdentityZod, StepIdentitySchema)
|
|
19
23
|
|
|
24
|
+
/** Casts a value to StepIdentityPayload or returns undefined if it does not match. */
|
|
20
25
|
export const asStepIdentityPayload = AsObjectFactory.create(isStepIdentityPayload)
|
|
@@ -5,7 +5,9 @@ import type { z } from 'zod'
|
|
|
5
5
|
|
|
6
6
|
import { BridgeDetailsFieldsZod } from './BridgeDetails.ts'
|
|
7
7
|
|
|
8
|
+
/** Schema identifier for BridgeDestinationObservation payloads. */
|
|
8
9
|
export const BridgeDestinationObservationSchema = asSchema('network.xyo.chain.bridge.observation.destination', true)
|
|
10
|
+
/** Schema type for BridgeDestinationObservation payloads. */
|
|
9
11
|
export type BridgeDestinationObservationSchema = typeof BridgeDestinationObservationSchema
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -18,6 +20,7 @@ export const BridgeDestinationObservationFieldsZod = BridgeDetailsFieldsZod.exte
|
|
|
18
20
|
destConfirmation: HexZod.optional().describe('Destination chain confirmation'),
|
|
19
21
|
})
|
|
20
22
|
|
|
23
|
+
/** BridgeDestinationObservationFields type. */
|
|
21
24
|
export type BridgeDestinationObservationFields = z.infer<typeof BridgeDestinationObservationFieldsZod>
|
|
22
25
|
|
|
23
26
|
/**
|
|
@@ -25,9 +28,11 @@ export type BridgeDestinationObservationFields = z.infer<typeof BridgeDestinatio
|
|
|
25
28
|
*/
|
|
26
29
|
export type BridgeDestinationObservation = Payload<BridgeDestinationObservationFields, BridgeDestinationObservationSchema>
|
|
27
30
|
|
|
31
|
+
/** Type guard that checks if a value is a valid BridgeDestinationObservation. */
|
|
28
32
|
export const isBridgeDestinationObservation = isPayloadOfZodType<BridgeDestinationObservation>(
|
|
29
33
|
BridgeDestinationObservationFieldsZod,
|
|
30
34
|
BridgeDestinationObservationSchema,
|
|
31
35
|
)
|
|
32
36
|
|
|
37
|
+
/** Converts a value to BridgeDestinationObservation, throwing if invalid. */
|
|
33
38
|
export const asBridgeDestinationObservation = AsObjectFactory.create(isBridgeDestinationObservation)
|
|
@@ -5,7 +5,9 @@ import { z } from 'zod'
|
|
|
5
5
|
|
|
6
6
|
import { BridgeDetailsFieldsZod } from './BridgeDetails.ts'
|
|
7
7
|
|
|
8
|
+
/** Schema identifier for BridgeIntent payloads. */
|
|
8
9
|
export const BridgeIntentSchema = asSchema('network.xyo.chain.bridge.intent', true)
|
|
10
|
+
/** Schema type for BridgeIntent payloads. */
|
|
9
11
|
export type BridgeIntentSchema = typeof BridgeIntentSchema
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -18,13 +20,17 @@ export const BridgeIntentFieldsZod = BridgeDetailsFieldsZod.extend({
|
|
|
18
20
|
nonce: z.string().describe('Unique identifier for replay protection'),
|
|
19
21
|
})
|
|
20
22
|
|
|
23
|
+
/** BridgeIntentFields type. */
|
|
21
24
|
export type BridgeIntentFields = z.infer<typeof BridgeIntentFieldsZod>
|
|
22
25
|
|
|
26
|
+
/** BridgeIntent type. */
|
|
23
27
|
export type BridgeIntent = Payload<BridgeIntentFields, BridgeIntentSchema>
|
|
24
28
|
|
|
29
|
+
/** Type guard that checks if a value is a valid BridgeIntent. */
|
|
25
30
|
export const isBridgeIntent = isPayloadOfZodType<BridgeIntent>(
|
|
26
31
|
BridgeIntentFieldsZod,
|
|
27
32
|
BridgeIntentSchema,
|
|
28
33
|
)
|
|
29
34
|
|
|
35
|
+
/** Converts a value to BridgeIntent, throwing if invalid. */
|
|
30
36
|
export const asBridgeIntent = AsObjectFactory.create(isBridgeIntent)
|
|
@@ -5,7 +5,9 @@ import type { z } from 'zod'
|
|
|
5
5
|
|
|
6
6
|
import { BridgeDetailsFieldsZod } from './BridgeDetails.ts'
|
|
7
7
|
|
|
8
|
+
/** Schema identifier for BridgeSourceObservation payloads. */
|
|
8
9
|
export const BridgeSourceObservationSchema = asSchema('network.xyo.chain.bridge.observation.source', true)
|
|
10
|
+
/** Schema type for BridgeSourceObservation payloads. */
|
|
9
11
|
export type BridgeSourceObservationSchema = typeof BridgeSourceObservationSchema
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -18,15 +20,18 @@ export const BridgeSourceObservationFieldsZod = BridgeDetailsFieldsZod.extend({
|
|
|
18
20
|
srcConfirmation: HexZod.optional().describe('Source chain confirmation'),
|
|
19
21
|
})
|
|
20
22
|
|
|
23
|
+
/** BridgeSourceObservationFields type. */
|
|
21
24
|
export type BridgeSourceObservationFields = z.infer<typeof BridgeSourceObservationFieldsZod>
|
|
22
25
|
/**
|
|
23
26
|
* Represents an observation that confirms a bridge action occurred on the source chain.
|
|
24
27
|
*/
|
|
25
28
|
export type BridgeSourceObservation = Payload<BridgeSourceObservationFields, BridgeSourceObservationSchema>
|
|
26
29
|
|
|
30
|
+
/** Type guard that checks if a value is a valid BridgeSourceObservation. */
|
|
27
31
|
export const isBridgeSourceObservation = isPayloadOfZodType<BridgeSourceObservation>(
|
|
28
32
|
BridgeSourceObservationFieldsZod,
|
|
29
33
|
BridgeSourceObservationSchema,
|
|
30
34
|
)
|
|
31
35
|
|
|
36
|
+
/** Converts a value to BridgeSourceObservation, throwing if invalid. */
|
|
32
37
|
export const asBridgeSourceObservation = AsObjectFactory.create(isBridgeSourceObservation)
|
|
@@ -7,11 +7,15 @@ import {
|
|
|
7
7
|
import type { BlockDuration } from '../../fields/index.ts'
|
|
8
8
|
import type { FromFields } from './Executable.ts'
|
|
9
9
|
|
|
10
|
+
/** Schema identifier for chain stake intent payloads. */
|
|
10
11
|
export const ChainStakeIntentSchema = asSchema('network.xyo.chain.stake.intent', true)
|
|
12
|
+
/** Schema type for ChainStakeIntent payloads. */
|
|
11
13
|
export type ChainStakeIntentSchema = typeof ChainStakeIntentSchema
|
|
12
14
|
|
|
15
|
+
/** The type of staking intent, currently limited to 'producer'. */
|
|
13
16
|
export type Intent = 'producer' // | 'bank'
|
|
14
17
|
|
|
18
|
+
/** Fields for a chain stake intent, including the staking intent type and source address. */
|
|
15
19
|
export interface ChainStakeIntentFields extends BlockDuration, FromFields {
|
|
16
20
|
/*
|
|
17
21
|
* The intent of the staking
|
|
@@ -19,15 +23,19 @@ export interface ChainStakeIntentFields extends BlockDuration, FromFields {
|
|
|
19
23
|
intent: Intent
|
|
20
24
|
}
|
|
21
25
|
|
|
26
|
+
/** A payload representing an intent to stake on the chain. */
|
|
22
27
|
export type ChainStakeIntent = Payload<ChainStakeIntentFields, ChainStakeIntentSchema>
|
|
23
28
|
|
|
29
|
+
/** Type guard that checks whether a value is a valid ChainStakeIntent with non-negative nbf and exp. */
|
|
24
30
|
export const isChainStakeIntent = (x?: unknown | null): x is ChainStakeIntent => {
|
|
25
31
|
return isPayloadOfSchemaType<ChainStakeIntent>(ChainStakeIntentSchema)(x)
|
|
26
32
|
&& asNonNegativeInteger(x.nbf) !== undefined
|
|
27
33
|
&& asNonNegativeInteger(x.exp) !== undefined
|
|
28
34
|
}
|
|
35
|
+
/** Casts a value to ChainStakeIntent or returns undefined if it does not match. */
|
|
29
36
|
export const asChainStakeIntent = AsObjectFactory.create(isChainStakeIntent)
|
|
30
37
|
|
|
38
|
+
/** Type guard that checks whether a value is a ChainStakeIntent with storage metadata. */
|
|
31
39
|
export const isChainStakeIntentWithStorageMeta = (x?: unknown | null): x is WithStorageMeta<ChainStakeIntent> => {
|
|
32
40
|
return isChainStakeIntent(x) && isStorageMeta(x)
|
|
33
41
|
}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
import type { Address, EmptyObject } from '@xylabs/sdk-js'
|
|
2
2
|
import { isAnyPayload } from '@xyo-network/sdk-js'
|
|
3
3
|
|
|
4
|
+
/** FromFields interface. */
|
|
4
5
|
export interface FromFields {
|
|
5
6
|
// the address that is treated as the source of this action
|
|
6
7
|
from: Address
|
|
7
8
|
}
|
|
8
9
|
|
|
10
|
+
/** hasFrom constant. */
|
|
9
11
|
export const hasFrom = (value: unknown): value is FromFields => {
|
|
10
12
|
return (value as FromFields).from !== undefined
|
|
11
13
|
}
|
|
12
14
|
|
|
15
|
+
/** ExecutableFields interface. */
|
|
13
16
|
export interface ExecutableFields {
|
|
14
17
|
script: string[]
|
|
15
18
|
}
|
|
16
19
|
|
|
20
|
+
/** Executable type. */
|
|
17
21
|
export type Executable<T extends EmptyObject = EmptyObject> = T & ExecutableFields
|
|
22
|
+
/** OptionalExecutable type. */
|
|
18
23
|
export type OptionalExecutable<T extends EmptyObject = EmptyObject> = T & Partial<ExecutableFields>
|
|
19
24
|
|
|
25
|
+
/** Type guard that checks if a value is a valid Executable. */
|
|
20
26
|
export const isExecutable = <T extends EmptyObject>(value: T | undefined): value is Executable<T> => {
|
|
21
27
|
return isAnyPayload(value) && Array.isArray((value as unknown as ExecutableFields).script)
|
|
22
28
|
}
|
|
23
29
|
|
|
30
|
+
/** Converts a value to Executable, throwing if invalid. */
|
|
24
31
|
export const asExecutable = <T extends EmptyObject>(value: T | undefined): Executable<T> | undefined => {
|
|
25
32
|
return isExecutable(value)
|
|
26
33
|
? value as unknown as Executable<T>
|
|
@@ -3,16 +3,23 @@ import { AsObjectFactory } from '@xylabs/sdk-js'
|
|
|
3
3
|
import type { Payload } from '@xyo-network/sdk-js'
|
|
4
4
|
import { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-js'
|
|
5
5
|
|
|
6
|
+
/** Schema identifier for hash payloads. */
|
|
6
7
|
export const HashSchema = asSchema('network.xyo.hash', true)
|
|
8
|
+
/** Schema type for Hash payloads. */
|
|
7
9
|
export type HashSchema = typeof HashSchema
|
|
8
10
|
|
|
11
|
+
/** Fields for a hash payload containing a single hash value. */
|
|
9
12
|
export interface HashFields {
|
|
10
13
|
hash: Hash
|
|
11
14
|
}
|
|
12
15
|
|
|
16
|
+
/** A payload containing a hash value. */
|
|
13
17
|
export type HashPayload = Payload<HashFields, HashSchema>
|
|
14
18
|
|
|
19
|
+
/** Type guard that checks whether a value is a HashPayload. */
|
|
15
20
|
export const isHashPayload = isPayloadOfSchemaType<HashPayload>(HashSchema)
|
|
16
21
|
|
|
22
|
+
/** Casts a value to HashPayload or returns undefined if it does not match. */
|
|
17
23
|
export const asHashPayload = AsObjectFactory.create(isHashPayload)
|
|
24
|
+
/** Casts a value to HashPayload with storage metadata or returns undefined. */
|
|
18
25
|
export const asHashPayloadWithStorageMeta = AsObjectFactory.create(isHashPayload)
|
|
@@ -5,7 +5,9 @@ import { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-js'
|
|
|
5
5
|
|
|
6
6
|
import type { FromFields } from './Executable.ts'
|
|
7
7
|
|
|
8
|
+
/** Schema identifier for StepComplete payloads. */
|
|
8
9
|
export const StepCompleteSchema = asSchema('network.xyo.chain.step.complete', true)
|
|
10
|
+
/** Schema type for StepComplete payloads. */
|
|
9
11
|
export type StepCompleteSchema = typeof StepCompleteSchema
|
|
10
12
|
|
|
11
13
|
/* This records the completion of a step in the network - needed for network staking rewards */
|
|
@@ -19,8 +21,11 @@ export interface StepCompleteFields extends FromFields {
|
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
// if this payload is included in a boundwitness, it needs to be available for inspection to be included in block
|
|
24
|
+
/** StepComplete type. */
|
|
22
25
|
export type StepComplete = Payload<StepCompleteFields, StepCompleteSchema>
|
|
23
26
|
|
|
27
|
+
/** Type guard that checks if a value is a valid StepComplete. */
|
|
24
28
|
export const isStepComplete = isPayloadOfSchemaType<StepComplete>(StepCompleteSchema)
|
|
25
29
|
|
|
30
|
+
/** Converts a value to StepComplete, throwing if invalid. */
|
|
26
31
|
export const asStepComplete = AsObjectFactory.create(isStepComplete)
|
|
@@ -5,11 +5,15 @@ import {
|
|
|
5
5
|
import { z } from 'zod'
|
|
6
6
|
|
|
7
7
|
// xl1 = xl1 block number, epoch = epoch number, ethereum = ethereum block number
|
|
8
|
+
/** Supported time domains: xl1 block number, epoch timestamp, or ethereum block number. */
|
|
8
9
|
export type TimeDomain = 'xl1' | 'epoch' | 'ethereum'
|
|
9
10
|
|
|
11
|
+
/** Schema identifier for time payloads. */
|
|
10
12
|
export const TimeSchema = asSchema('network.xyo.time', true)
|
|
13
|
+
/** Schema type for Time payloads. */
|
|
11
14
|
export type TimeSchema = typeof TimeSchema
|
|
12
15
|
|
|
16
|
+
/** Zod schema for XL1 time fields including block number and hash. */
|
|
13
17
|
export const XL1TimeFieldsZod = z.object({
|
|
14
18
|
// block number
|
|
15
19
|
xl1: z.number().optional(),
|
|
@@ -17,6 +21,7 @@ export const XL1TimeFieldsZod = z.object({
|
|
|
17
21
|
xl1Hash: HashZod.optional(),
|
|
18
22
|
})
|
|
19
23
|
|
|
24
|
+
/** Zod schema for Ethereum time fields including block number and hash. */
|
|
20
25
|
export const EthereumTimeFieldsZod = z.object({
|
|
21
26
|
// block number
|
|
22
27
|
ethereum: z.number().optional(),
|
|
@@ -24,25 +29,33 @@ export const EthereumTimeFieldsZod = z.object({
|
|
|
24
29
|
ethereumHash: HashZod.optional(),
|
|
25
30
|
})
|
|
26
31
|
|
|
32
|
+
/** Zod schema for epoch time fields in milliseconds. */
|
|
27
33
|
export const EpochTimeFieldsZod = z.object({
|
|
28
34
|
// in milliseconds
|
|
29
35
|
epoch: z.number(),
|
|
30
36
|
})
|
|
31
37
|
|
|
38
|
+
/** Combined Zod schema for all time fields across XL1, Ethereum, and epoch domains. */
|
|
32
39
|
export const TimeFieldsZod = XL1TimeFieldsZod.extend(XL1TimeFieldsZod.shape).extend(EthereumTimeFieldsZod.shape).extend(EpochTimeFieldsZod.shape)
|
|
33
40
|
|
|
41
|
+
/** Zod schema for a complete time payload including schema and all time fields. */
|
|
34
42
|
export const TimePayloadZod = PayloadZodOfSchema(TimeSchema).extend(TimeFieldsZod.shape)
|
|
35
43
|
|
|
44
|
+
/** A payload containing time information across multiple domains. */
|
|
36
45
|
export type TimePayload = z.infer<typeof TimePayloadZod>
|
|
37
46
|
|
|
38
47
|
// to prevent scaling problems, we use double the current time as a max safe epoch
|
|
48
|
+
/** Checks whether a value is a safe epoch timestamp (less than double the current time). */
|
|
39
49
|
export const isSafeEpoch = (value: unknown): value is number => {
|
|
40
50
|
return typeof value === 'number' && value < 2 * Date.now()
|
|
41
51
|
}
|
|
42
52
|
|
|
53
|
+
/** Type guard that checks whether a value is a valid TimePayload with a safe epoch. */
|
|
43
54
|
export const isTimePayload = (value: unknown): value is TimePayload => {
|
|
44
55
|
return isPayloadOfSchemaType<TimePayload>(TimeSchema)(value) && isSafeEpoch(value.epoch)
|
|
45
56
|
}
|
|
46
57
|
|
|
58
|
+
/** Casts a value to TimePayload or returns undefined if it does not match. */
|
|
47
59
|
export const asTimePayload = AsObjectFactory.create(isTimePayload)
|
|
60
|
+
/** Casts a value to TimePayload with storage metadata or returns undefined. */
|
|
48
61
|
export const asTimePayloadWithStorageMeta = AsObjectFactory.create(isTimePayload)
|
|
@@ -24,6 +24,7 @@ export interface RequestedPermission {
|
|
|
24
24
|
parentCapability: string
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/** CaveatTypes type. */
|
|
27
28
|
export type CaveatTypes = 'chain' | 'expiration' | 'filteredResponse' | 'rateLimit' | 'restrictReturnedAccounts'
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -50,6 +51,7 @@ export interface Permission {
|
|
|
50
51
|
parentCapability: string
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
/** InvokerPermission interface. */
|
|
53
55
|
export interface InvokerPermission extends Permission {
|
|
54
56
|
/** Time at which the permission was granted */
|
|
55
57
|
date?: number
|
package/src/provider/Provider.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { assertEx, isString } from '@xylabs/sdk-js'
|
|
2
2
|
|
|
3
|
+
/** Type literal for the Provider provider moniker. */
|
|
3
4
|
export type ProviderMoniker = string
|
|
4
5
|
|
|
6
|
+
/** Moniker identifier for the asProvider provider. */
|
|
5
7
|
export const asProviderMoniker = <T>(value: T) => {
|
|
6
8
|
const moniker = isString(value) ? (value as unknown as ProviderMoniker) : undefined
|
|
7
9
|
return assertEx(moniker)
|
|
8
10
|
}
|
|
9
11
|
|
|
12
|
+
/** Moniker identifier for the DefaultProvider provider. */
|
|
10
13
|
export const DefaultProviderMoniker = 'Provider' as const
|
|
14
|
+
/** Type literal for the DefaultProvider provider moniker. */
|
|
11
15
|
export type DefaultProviderMoniker = typeof DefaultProviderMoniker
|
|
@@ -2,8 +2,10 @@ import type { Payload, Schema } from '@xyo-network/sdk-js'
|
|
|
2
2
|
|
|
3
3
|
import type { Provider, ProviderMoniker } from '../../provider/index.ts'
|
|
4
4
|
|
|
5
|
+
/** DataLakeData type. */
|
|
5
6
|
export type DataLakeData = Payload | ArrayBuffer
|
|
6
7
|
|
|
8
|
+
/** DataLakeProvider interface. */
|
|
7
9
|
export interface DataLakeProvider<TMoniker extends ProviderMoniker = ProviderMoniker> extends Provider<TMoniker> {
|
|
8
10
|
allowedSchemas?: Schema[]
|
|
9
11
|
disallowedSchemas?: Schema[]
|
|
@@ -4,9 +4,13 @@ import type { WriteArchivistFunctions } from '@xyo-network/sdk-js'
|
|
|
4
4
|
import type { DataLakeData, DataLakeProvider } from './Provider.ts'
|
|
5
5
|
import type { DataLakeViewer, DataLakeViewerMethods } from './Viewer.ts'
|
|
6
6
|
|
|
7
|
+
/** Moniker identifier for the DataLakeRunner provider. */
|
|
7
8
|
export const DataLakeRunnerMoniker = 'DataLakeRunner' as const
|
|
9
|
+
/** Type literal for the DataLakeRunner provider moniker. */
|
|
8
10
|
export type DataLakeRunnerMoniker = typeof DataLakeRunnerMoniker
|
|
9
11
|
|
|
12
|
+
/** DataLakeRunnerMethods interface. */
|
|
10
13
|
export interface DataLakeRunnerMethods extends WriteArchivistFunctions<DataLakeData, DataLakeData, DataLakeData, Hash>, DataLakeViewerMethods {}
|
|
11
14
|
|
|
15
|
+
/** Runner interface for executing DataLake operations. */
|
|
12
16
|
export interface DataLakeRunner extends DataLakeProvider<DataLakeRunnerMoniker>, DataLakeRunnerMethods, Omit<DataLakeViewer, 'moniker'> {}
|
|
@@ -3,10 +3,14 @@ import type { ReadArchivistFunctions, Sequence } from '@xyo-network/sdk-js'
|
|
|
3
3
|
|
|
4
4
|
import type { DataLakeData, DataLakeProvider } from './Provider.ts'
|
|
5
5
|
|
|
6
|
+
/** Moniker identifier for the DataLakeViewer provider. */
|
|
6
7
|
export const DataLakeViewerMoniker = 'DataLakeViewer' as const
|
|
8
|
+
/** Type literal for the DataLakeViewer provider moniker. */
|
|
7
9
|
export type DataLakeViewerMoniker = typeof DataLakeViewerMoniker
|
|
8
10
|
|
|
11
|
+
/** DataLakeViewerMethods interface. */
|
|
9
12
|
export interface DataLakeViewerMethods extends ReadArchivistFunctions<DataLakeData, Hash, Sequence> {}
|
|
10
13
|
|
|
14
|
+
/** Viewer interface for reading DataLake data. */
|
|
11
15
|
export interface DataLakeViewer extends DataLakeProvider<DataLakeViewerMoniker>, DataLakeViewerMethods {
|
|
12
16
|
}
|
|
@@ -3,6 +3,7 @@ import type { Payload } from '@xyo-network/sdk-js'
|
|
|
3
3
|
|
|
4
4
|
import type { UnsignedHydratedTransaction } from '../model/index.ts'
|
|
5
5
|
|
|
6
|
+
/** TransactionHelper interface. */
|
|
6
7
|
export interface TransactionHelper {
|
|
7
8
|
// build tx, sign tx, send tx
|
|
8
9
|
addPayloadsToChain(onChain: Payload[], offChain: Payload[]): void
|
|
@@ -14,6 +14,7 @@ export interface XyoRpcGatewayConfig extends XyoGatewayConfig {
|
|
|
14
14
|
networkEndpoint: string
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/** XyoClient interface. */
|
|
17
18
|
export interface XyoClient {
|
|
18
19
|
gateways: Readonly<Partial<Record<GatewayName, XyoGatewayRunner>>>
|
|
19
20
|
permissions: XyoPermissions
|
|
@@ -4,9 +4,12 @@ import type { DataLakeRunner, DataLakeViewer } from './DataLake/index.ts'
|
|
|
4
4
|
import type { XyoNetwork } from './XyoNetwork.ts'
|
|
5
5
|
import type { XyoRunner } from './XyoRunner.ts'
|
|
6
6
|
|
|
7
|
+
/** Moniker identifier for the XyoConnection provider. */
|
|
7
8
|
export const XyoConnectionMoniker = 'XyoConnection' as const
|
|
9
|
+
/** Type literal for the XyoConnection provider moniker. */
|
|
8
10
|
export type XyoConnectionMoniker = typeof XyoConnectionMoniker
|
|
9
11
|
|
|
12
|
+
/** XyoConnection interface. */
|
|
10
13
|
export interface XyoConnection extends Provider<XyoConnectionMoniker> {
|
|
11
14
|
network?: XyoNetwork
|
|
12
15
|
networkStake?: NetworkStakeViewer
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { Provider, ProviderMoniker } from '../provider/index.ts'
|
|
2
2
|
import type { XyoConnection } from './XyoConnection.ts'
|
|
3
3
|
|
|
4
|
+
/** Moniker identifier for the XyoGateway provider. */
|
|
4
5
|
export const XyoGatewayMoniker = 'XyoGateway' as const
|
|
6
|
+
/** Type literal for the XyoGateway provider moniker. */
|
|
5
7
|
export type XyoGatewayMoniker = typeof XyoGatewayMoniker
|
|
6
8
|
|
|
9
|
+
/** XyoGatewayMethods interface. */
|
|
7
10
|
export interface XyoGatewayMethods {}
|
|
8
11
|
|
|
12
|
+
/** XyoGatewayProvider interface. */
|
|
9
13
|
export interface XyoGatewayProvider<
|
|
10
14
|
TMoniker extends ProviderMoniker = ProviderMoniker> extends XyoGatewayMethods, Provider<TMoniker> {
|
|
11
15
|
/**
|
|
@@ -14,5 +18,6 @@ export interface XyoGatewayProvider<
|
|
|
14
18
|
connection: XyoConnection
|
|
15
19
|
}
|
|
16
20
|
|
|
21
|
+
/** XyoGateway interface. */
|
|
17
22
|
export interface XyoGateway extends XyoGatewayProvider<XyoGatewayMoniker>, Provider<XyoGatewayMoniker> {
|
|
18
23
|
}
|
|
@@ -15,6 +15,7 @@ import type { AttoXL1 } from '../xl1/index.ts'
|
|
|
15
15
|
import type { XyoSigner } from './signer/index.ts'
|
|
16
16
|
import type { XyoGatewayProvider } from './XyoGateway.ts'
|
|
17
17
|
|
|
18
|
+
/** ConfirmSubmittedTransactionOptions type. */
|
|
18
19
|
export type ConfirmSubmittedTransactionOptions = {
|
|
19
20
|
/**
|
|
20
21
|
* Number of attempts to confirm the transaction.
|
|
@@ -32,6 +33,7 @@ export type ConfirmSubmittedTransactionOptions = {
|
|
|
32
33
|
logger?: Logger
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
/** Options for Transaction. */
|
|
35
37
|
export interface TransactionOptions {
|
|
36
38
|
chain?: ChainId
|
|
37
39
|
exp?: XL1BlockNumber
|
|
@@ -40,9 +42,12 @@ export interface TransactionOptions {
|
|
|
40
42
|
nbf?: XL1BlockNumber
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
/** Moniker identifier for the XyoGatewayRunner provider. */
|
|
43
46
|
export const XyoGatewayRunnerMoniker = 'XyoGatewayRunner' as const
|
|
47
|
+
/** Type literal for the XyoGatewayRunner provider moniker. */
|
|
44
48
|
export type XyoGatewayRunnerMoniker = typeof XyoGatewayRunnerMoniker
|
|
45
49
|
|
|
50
|
+
/** XyoGatewayRunnerMethods interface. */
|
|
46
51
|
export interface XyoGatewayRunnerMethods {
|
|
47
52
|
|
|
48
53
|
addPayloadsToChain(
|
|
@@ -62,6 +67,7 @@ export interface XyoGatewayRunnerMethods {
|
|
|
62
67
|
sendMany(transfers: Record<Address, AttoXL1>, options?: TransactionOptions): Promisable<Hash>
|
|
63
68
|
}
|
|
64
69
|
|
|
70
|
+
/** Runner interface for executing XyoGateway operations. */
|
|
65
71
|
export interface XyoGatewayRunner extends XyoGatewayRunnerMethods, XyoGatewayProvider<XyoGatewayRunnerMoniker> {
|
|
66
72
|
/**
|
|
67
73
|
* Returns the signer for this gateway.
|
|
@@ -4,13 +4,17 @@ import type { SignedHydratedTransaction } from '../model/index.ts'
|
|
|
4
4
|
import type { Provider } from '../provider/index.ts'
|
|
5
5
|
import type { MempoolRunner } from '../runners/index.ts'
|
|
6
6
|
|
|
7
|
+
/** XyoRunnerMethods interface. */
|
|
7
8
|
export interface XyoRunnerMethods {
|
|
8
9
|
broadcastTransaction(transaction: SignedHydratedTransaction): Promisable<Hash>
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
/** Moniker identifier for the XyoRunner provider. */
|
|
11
13
|
export const XyoRunnerMoniker = 'XyoRunner' as const
|
|
14
|
+
/** Type literal for the XyoRunner provider moniker. */
|
|
12
15
|
export type XyoRunnerMoniker = typeof XyoRunnerMoniker
|
|
13
16
|
|
|
17
|
+
/** Runner interface for executing Xyo operations. */
|
|
14
18
|
export interface XyoRunner extends XyoRunnerMethods, Provider<XyoRunnerMoniker> {
|
|
15
19
|
mempool: MempoolRunner
|
|
16
20
|
}
|
|
@@ -7,9 +7,12 @@ import type { SignedHydratedTransactionWithHashMeta } from '../../model/index.ts
|
|
|
7
7
|
import type { Provider } from '../../provider/index.ts'
|
|
8
8
|
import type { TransactionBoundWitness, TransactionFeesBigInt } from '../../transaction/index.ts'
|
|
9
9
|
|
|
10
|
+
/** Moniker identifier for the XyoSigner provider. */
|
|
10
11
|
export const XyoSignerMoniker = 'XyoSigner' as const
|
|
12
|
+
/** Type literal for the XyoSigner provider moniker. */
|
|
11
13
|
export type XyoSignerMoniker = typeof XyoSignerMoniker
|
|
12
14
|
|
|
15
|
+
/** XyoSignerMethods interface. */
|
|
13
16
|
export interface XyoSignerMethods {
|
|
14
17
|
address(): Promisable<Address>
|
|
15
18
|
// The tx passed in must have all the payloads (on and off chain) in the payloads array
|
|
@@ -18,8 +21,10 @@ export interface XyoSignerMethods {
|
|
|
18
21
|
signTransaction(tx: [TransactionBoundWitness, Payload[]]): Promisable<SignedHydratedTransactionWithHashMeta>
|
|
19
22
|
}
|
|
20
23
|
|
|
24
|
+
/** XyoSigner interface. */
|
|
21
25
|
export interface XyoSigner extends XyoSignerMethods, Provider<XyoSignerMoniker> {}
|
|
22
26
|
|
|
27
|
+
/** XyoSignerDeprecated interface. */
|
|
23
28
|
export interface XyoSignerDeprecated {
|
|
24
29
|
/** @deprecated use signTransaction instead */
|
|
25
30
|
createSignedTransaction(
|
|
@@ -3,23 +3,30 @@ import type {
|
|
|
3
3
|
NextOptions, Payload, WithStorageMeta,
|
|
4
4
|
} from '@xyo-network/sdk-js'
|
|
5
5
|
|
|
6
|
+
/** ReadRepository interface. */
|
|
6
7
|
export interface ReadRepository<TId, TData> {
|
|
7
8
|
get(id: TId): Promisable<TData>
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
/** IterableRepository interface. */
|
|
10
12
|
export interface IterableRepository<TId, TData> {
|
|
11
13
|
next(id: TId): Promisable<TData>
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
/** WriteRepository interface. */
|
|
14
17
|
export interface WriteRepository<TData, TResp> {
|
|
15
18
|
insert(data: TData): Promisable<TResp>
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
/** PayloadReadRepository interface. */
|
|
18
22
|
export interface PayloadReadRepository<TId = Hash, TData extends Payload = Payload> extends ReadRepository<TId[], WithStorageMeta<TData>[]> {}
|
|
23
|
+
/** PayloadWriteRepository interface. */
|
|
19
24
|
export interface PayloadWriteRepository<TData extends Payload = Payload> extends WriteRepository<TData[], WithStorageMeta<TData>[]> {}
|
|
20
25
|
|
|
26
|
+
/** PayloadIterableRepository interface. */
|
|
21
27
|
export interface PayloadIterableRepository<TId = Hash, TData extends Payload = Payload>
|
|
22
28
|
extends IterableRepository<NextOptions<TId>, WithStorageMeta<TData>[]> {}
|
|
23
29
|
|
|
30
|
+
/** PayloadRepository interface. */
|
|
24
31
|
export interface PayloadRepository<TId = Hash, TData extends Payload = Payload>
|
|
25
32
|
extends PayloadReadRepository<TId, TData>, PayloadWriteRepository<TData>, PayloadIterableRepository<TId, TData> {}
|
|
@@ -2,4 +2,5 @@ import type { SignedHydratedTransaction } from '../model/index.ts'
|
|
|
2
2
|
import type { TransactionBoundWitness } from '../transaction/index.ts'
|
|
3
3
|
import type { ReadRepository } from './Repository.ts'
|
|
4
4
|
|
|
5
|
+
/** TransactionReadRepository interface. */
|
|
5
6
|
export interface TransactionReadRepository extends ReadRepository<TransactionBoundWitness, SignedHydratedTransaction | undefined> {}
|
|
@@ -2,8 +2,11 @@ import type { TransactionReadRepository } from './TransactionReadRepository.ts'
|
|
|
2
2
|
import type { TransactionRepositoryIterator } from './TransactionRepositoryIterator.ts'
|
|
3
3
|
import type { TransactionWriteRepository } from './TransactionWriteRepository.ts'
|
|
4
4
|
|
|
5
|
+
/** TransactionRepository interface. */
|
|
5
6
|
export interface TransactionRepository extends TransactionReadRepository, TransactionWriteRepository {}
|
|
6
7
|
|
|
8
|
+
/** ReadonlyIterableTransactionRepository interface. */
|
|
7
9
|
export interface ReadonlyIterableTransactionRepository extends TransactionReadRepository, TransactionRepositoryIterator {}
|
|
8
10
|
|
|
11
|
+
/** IterableTransactionRepository interface. */
|
|
9
12
|
export interface IterableTransactionRepository extends TransactionRepository, TransactionRepositoryIterator {}
|
|
@@ -2,4 +2,5 @@ import type { SignedHydratedTransactionWithStorageMeta } from '../model/index.ts
|
|
|
2
2
|
import type { TransactionBoundWitness } from '../transaction/index.ts'
|
|
3
3
|
import type { IterableRepository } from './Repository.ts'
|
|
4
4
|
|
|
5
|
+
/** TransactionRepositoryIterator interface. */
|
|
5
6
|
export interface TransactionRepositoryIterator extends IterableRepository<TransactionBoundWitness, SignedHydratedTransactionWithStorageMeta | undefined> {}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SignedHydratedTransaction } from '../model/index.ts'
|
|
2
2
|
import type { WriteRepository } from './Repository.ts'
|
|
3
3
|
|
|
4
|
+
/** TransactionWriteRepository interface. */
|
|
4
5
|
export interface TransactionWriteRepository extends WriteRepository<SignedHydratedTransaction, boolean> {}
|