@xyo-network/xl1-protocol 1.25.32 → 1.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/index.d.ts +4 -24
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +5 -2047
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +17 -14
- package/src/index.ts +4 -24
- package/LICENSE +0 -165
- package/README.md +0 -81
- package/dist/neutral/BlockNumber/BlockNumber.d.ts +0 -35
- package/dist/neutral/BlockNumber/BlockNumber.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/EthBlockNumber.d.ts +0 -46
- package/dist/neutral/BlockNumber/EthBlockNumber.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/Numberish.d.ts +0 -6
- package/dist/neutral/BlockNumber/Numberish.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/XL1BlockNumber.d.ts +0 -46
- package/dist/neutral/BlockNumber/XL1BlockNumber.d.ts.map +0 -1
- package/dist/neutral/BlockNumber/index.d.ts +0 -5
- package/dist/neutral/BlockNumber/index.d.ts.map +0 -1
- package/dist/neutral/Initializable.d.ts +0 -9
- package/dist/neutral/Initializable.d.ts.map +0 -1
- package/dist/neutral/OpenTelemetryProviders.d.ts +0 -7
- package/dist/neutral/OpenTelemetryProviders.d.ts.map +0 -1
- package/dist/neutral/RecordKeyType.d.ts +0 -4
- package/dist/neutral/RecordKeyType.d.ts.map +0 -1
- package/dist/neutral/Step/StepHash.d.ts +0 -11
- package/dist/neutral/Step/StepHash.d.ts.map +0 -1
- package/dist/neutral/Step/StepIdentity.d.ts +0 -19
- package/dist/neutral/Step/StepIdentity.d.ts.map +0 -1
- package/dist/neutral/Step/StepSizes.d.ts +0 -12
- package/dist/neutral/Step/StepSizes.d.ts.map +0 -1
- package/dist/neutral/Step/index.d.ts +0 -4
- package/dist/neutral/Step/index.d.ts.map +0 -1
- package/dist/neutral/TransferPayload.d.ts +0 -79
- package/dist/neutral/TransferPayload.d.ts.map +0 -1
- package/dist/neutral/amount/ShiftedBigIntConfig.d.ts +0 -9
- package/dist/neutral/amount/ShiftedBigIntConfig.d.ts.map +0 -1
- package/dist/neutral/amount/XL1AmountInstance.d.ts +0 -16
- package/dist/neutral/amount/XL1AmountInstance.d.ts.map +0 -1
- package/dist/neutral/amount/index.d.ts +0 -3
- package/dist/neutral/amount/index.d.ts.map +0 -1
- package/dist/neutral/block/AllowedBlockPayload.d.ts +0 -40
- package/dist/neutral/block/AllowedBlockPayload.d.ts.map +0 -1
- package/dist/neutral/block/BlockBoundWitness.d.ts +0 -544
- package/dist/neutral/block/BlockBoundWitness.d.ts.map +0 -1
- package/dist/neutral/block/HydratedBlock.d.ts +0 -1466
- package/dist/neutral/block/HydratedBlock.d.ts.map +0 -1
- package/dist/neutral/block/index.d.ts +0 -6
- package/dist/neutral/block/index.d.ts.map +0 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitness.d.ts +0 -168
- package/dist/neutral/block/signed/SignedBlockBoundWitness.d.ts.map +0 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts +0 -286
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts.map +0 -1
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts +0 -343
- package/dist/neutral/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts.map +0 -1
- package/dist/neutral/block/signed/index.d.ts +0 -4
- package/dist/neutral/block/signed/index.d.ts.map +0 -1
- package/dist/neutral/block/unsigned/UnsignedBlockBoundWitness.d.ts +0 -168
- package/dist/neutral/block/unsigned/UnsignedBlockBoundWitness.d.ts.map +0 -1
- package/dist/neutral/block/unsigned/index.d.ts +0 -2
- package/dist/neutral/block/unsigned/index.d.ts.map +0 -1
- package/dist/neutral/chain/Chain.d.ts +0 -4
- package/dist/neutral/chain/Chain.d.ts.map +0 -1
- package/dist/neutral/chain/ChainAnalyzer.d.ts +0 -10
- package/dist/neutral/chain/ChainAnalyzer.d.ts.map +0 -1
- package/dist/neutral/chain/ChainId.d.ts +0 -4
- package/dist/neutral/chain/ChainId.d.ts.map +0 -1
- package/dist/neutral/chain/index.d.ts +0 -4
- package/dist/neutral/chain/index.d.ts.map +0 -1
- package/dist/neutral/fields/Addressable.d.ts +0 -6
- package/dist/neutral/fields/Addressable.d.ts.map +0 -1
- package/dist/neutral/fields/BlockDuration.d.ts +0 -25
- package/dist/neutral/fields/BlockDuration.d.ts.map +0 -1
- package/dist/neutral/fields/BlockNumber.d.ts +0 -32
- package/dist/neutral/fields/BlockNumber.d.ts.map +0 -1
- package/dist/neutral/fields/ChainReference.d.ts +0 -11
- package/dist/neutral/fields/ChainReference.d.ts.map +0 -1
- package/dist/neutral/fields/index.d.ts +0 -5
- package/dist/neutral/fields/index.d.ts.map +0 -1
- package/dist/neutral/map/AsyncMap.d.ts +0 -42
- package/dist/neutral/map/AsyncMap.d.ts.map +0 -1
- package/dist/neutral/map/MapType.d.ts +0 -17
- package/dist/neutral/map/MapType.d.ts.map +0 -1
- package/dist/neutral/map/SyncMap.d.ts +0 -41
- package/dist/neutral/map/SyncMap.d.ts.map +0 -1
- package/dist/neutral/map/index.d.ts +0 -4
- package/dist/neutral/map/index.d.ts.map +0 -1
- package/dist/neutral/model/AccountBalance.d.ts +0 -133
- package/dist/neutral/model/AccountBalance.d.ts.map +0 -1
- package/dist/neutral/model/ArrayBuffer.d.ts +0 -6
- package/dist/neutral/model/ArrayBuffer.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/BlockRange.d.ts +0 -32
- package/dist/neutral/model/BlockRange/BlockRange.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/EthBlockRange.d.ts +0 -32
- package/dist/neutral/model/BlockRange/EthBlockRange.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/Numberish.d.ts +0 -4
- package/dist/neutral/model/BlockRange/Numberish.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/Range.d.ts +0 -18
- package/dist/neutral/model/BlockRange/Range.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/XL1BlockRange.d.ts +0 -32
- package/dist/neutral/model/BlockRange/XL1BlockRange.d.ts.map +0 -1
- package/dist/neutral/model/BlockRange/index.d.ts +0 -5
- package/dist/neutral/model/BlockRange/index.d.ts.map +0 -1
- package/dist/neutral/model/BlockRate.d.ts +0 -290
- package/dist/neutral/model/BlockRate.d.ts.map +0 -1
- package/dist/neutral/model/ChainQualification.d.ts +0 -57
- package/dist/neutral/model/ChainQualification.d.ts.map +0 -1
- package/dist/neutral/model/Context/BaseContext.d.ts +0 -5
- package/dist/neutral/model/Context/BaseContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/BaseContext.zod.d.ts +0 -26
- package/dist/neutral/model/Context/BaseContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/BlockContext.d.ts +0 -9
- package/dist/neutral/model/Context/BlockContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/BlockContext.zod.d.ts +0 -33
- package/dist/neutral/model/Context/BlockContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/CachingContext.d.ts +0 -5
- package/dist/neutral/model/Context/CachingContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/CachingContext.zod.d.ts +0 -10
- package/dist/neutral/model/Context/CachingContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/ChainContext.d.ts +0 -9
- package/dist/neutral/model/Context/ChainContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/ChainContext.zod.d.ts +0 -115
- package/dist/neutral/model/Context/ChainContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/HeadContext.d.ts +0 -5
- package/dist/neutral/model/Context/HeadContext.d.ts.map +0 -1
- package/dist/neutral/model/Context/HeadContext.zod.d.ts +0 -70
- package/dist/neutral/model/Context/HeadContext.zod.d.ts.map +0 -1
- package/dist/neutral/model/Context/index.d.ts +0 -11
- package/dist/neutral/model/Context/index.d.ts.map +0 -1
- package/dist/neutral/model/GatewayName.d.ts +0 -6
- package/dist/neutral/model/GatewayName.d.ts.map +0 -1
- package/dist/neutral/model/HydratedTransaction.d.ts +0 -2300
- package/dist/neutral/model/HydratedTransaction.d.ts.map +0 -1
- package/dist/neutral/model/OpCodes.d.ts +0 -3
- package/dist/neutral/model/OpCodes.d.ts.map +0 -1
- package/dist/neutral/model/PayloadMap.d.ts +0 -10
- package/dist/neutral/model/PayloadMap.d.ts.map +0 -1
- package/dist/neutral/model/Permission.d.ts +0 -59
- package/dist/neutral/model/Permission.d.ts.map +0 -1
- package/dist/neutral/model/Position.d.ts +0 -13
- package/dist/neutral/model/Position.d.ts.map +0 -1
- package/dist/neutral/model/PositionId.d.ts +0 -6
- package/dist/neutral/model/PositionId.d.ts.map +0 -1
- package/dist/neutral/model/RangeMultipliers.d.ts +0 -10
- package/dist/neutral/model/RangeMultipliers.d.ts.map +0 -1
- package/dist/neutral/model/RewardShare.d.ts +0 -3
- package/dist/neutral/model/RewardShare.d.ts.map +0 -1
- package/dist/neutral/model/RewardsRangeOptions.d.ts +0 -16
- package/dist/neutral/model/RewardsRangeOptions.d.ts.map +0 -1
- package/dist/neutral/model/Sequence.d.ts +0 -15
- package/dist/neutral/model/Sequence.d.ts.map +0 -1
- package/dist/neutral/model/Stake.d.ts +0 -121
- package/dist/neutral/model/Stake.d.ts.map +0 -1
- package/dist/neutral/model/StakeShare.d.ts +0 -3
- package/dist/neutral/model/StakeShare.d.ts.map +0 -1
- package/dist/neutral/model/TimeDomain.d.ts +0 -4
- package/dist/neutral/model/TimeDomain.d.ts.map +0 -1
- package/dist/neutral/model/TransferPair.d.ts +0 -12
- package/dist/neutral/model/TransferPair.d.ts.map +0 -1
- package/dist/neutral/model/addresses.d.ts +0 -28
- package/dist/neutral/model/addresses.d.ts.map +0 -1
- package/dist/neutral/model/defaultRewardRatio.d.ts +0 -3
- package/dist/neutral/model/defaultRewardRatio.d.ts.map +0 -1
- package/dist/neutral/model/defaultTransactionFees.d.ts +0 -4
- package/dist/neutral/model/defaultTransactionFees.d.ts.map +0 -1
- package/dist/neutral/model/index.d.ts +0 -28
- package/dist/neutral/model/index.d.ts.map +0 -1
- package/dist/neutral/model/minTransactionFees.d.ts +0 -4
- package/dist/neutral/model/minTransactionFees.d.ts.map +0 -1
- package/dist/neutral/model/rewards.d.ts +0 -15
- package/dist/neutral/model/rewards.d.ts.map +0 -1
- package/dist/neutral/model/version.d.ts +0 -11
- package/dist/neutral/model/version.d.ts.map +0 -1
- package/dist/neutral/network/NetworkId.d.ts +0 -12
- package/dist/neutral/network/NetworkId.d.ts.map +0 -1
- package/dist/neutral/network/Status.d.ts +0 -26
- package/dist/neutral/network/Status.d.ts.map +0 -1
- package/dist/neutral/network/index.d.ts +0 -3
- package/dist/neutral/network/index.d.ts.map +0 -1
- package/dist/neutral/payload/StepIdentityPayload.d.ts +0 -20
- package/dist/neutral/payload/StepIdentityPayload.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeCompletion.d.ts +0 -23
- package/dist/neutral/payload/elevatable/Bridge/BridgeCompletion.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts +0 -33
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts +0 -45
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts +0 -31
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts +0 -33
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Bridge/index.d.ts +0 -6
- package/dist/neutral/payload/elevatable/Bridge/index.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/ChainStakeIntent.d.ts +0 -24
- package/dist/neutral/payload/elevatable/ChainStakeIntent.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Executable.d.ts +0 -20
- package/dist/neutral/payload/elevatable/Executable.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Hash.d.ts +0 -21
- package/dist/neutral/payload/elevatable/Hash.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/StepComplete.d.ts +0 -22
- package/dist/neutral/payload/elevatable/StepComplete.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/Time.d.ts +0 -71
- package/dist/neutral/payload/elevatable/Time.d.ts.map +0 -1
- package/dist/neutral/payload/elevatable/index.d.ts +0 -7
- package/dist/neutral/payload/elevatable/index.d.ts.map +0 -1
- package/dist/neutral/payload/index.d.ts +0 -3
- package/dist/neutral/payload/index.d.ts.map +0 -1
- package/dist/neutral/permissions/InvokerPermission.d.ts +0 -53
- package/dist/neutral/permissions/InvokerPermission.d.ts.map +0 -1
- package/dist/neutral/permissions/XyoPermissions.d.ts +0 -33
- package/dist/neutral/permissions/XyoPermissions.d.ts.map +0 -1
- package/dist/neutral/permissions/index.d.ts +0 -3
- package/dist/neutral/permissions/index.d.ts.map +0 -1
- package/dist/neutral/provider/Provider.d.ts +0 -6
- package/dist/neutral/provider/Provider.d.ts.map +0 -1
- package/dist/neutral/provider/ProviderMoniker.d.ts +0 -9
- package/dist/neutral/provider/ProviderMoniker.d.ts.map +0 -1
- package/dist/neutral/provider/index.d.ts +0 -3
- package/dist/neutral/provider/index.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/Provider.d.ts +0 -10
- package/dist/neutral/providers/DataLake/Provider.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/Runner.d.ts +0 -15
- package/dist/neutral/providers/DataLake/Runner.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/Viewer.d.ts +0 -14
- package/dist/neutral/providers/DataLake/Viewer.d.ts.map +0 -1
- package/dist/neutral/providers/DataLake/index.d.ts +0 -4
- package/dist/neutral/providers/DataLake/index.d.ts.map +0 -1
- package/dist/neutral/providers/TransactionHelper.d.ts +0 -9
- package/dist/neutral/providers/TransactionHelper.d.ts.map +0 -1
- package/dist/neutral/providers/XyoClient.d.ts +0 -23
- package/dist/neutral/providers/XyoClient.d.ts.map +0 -1
- package/dist/neutral/providers/XyoConnection.d.ts +0 -18
- package/dist/neutral/providers/XyoConnection.d.ts.map +0 -1
- package/dist/neutral/providers/XyoGateway.d.ts +0 -20
- package/dist/neutral/providers/XyoGateway.d.ts.map +0 -1
- package/dist/neutral/providers/XyoGatewayRunner.d.ts +0 -55
- package/dist/neutral/providers/XyoGatewayRunner.d.ts.map +0 -1
- package/dist/neutral/providers/XyoNetwork.d.ts +0 -7
- package/dist/neutral/providers/XyoNetwork.d.ts.map +0 -1
- package/dist/neutral/providers/XyoRunner.d.ts +0 -17
- package/dist/neutral/providers/XyoRunner.d.ts.map +0 -1
- package/dist/neutral/providers/index.d.ts +0 -9
- package/dist/neutral/providers/index.d.ts.map +0 -1
- package/dist/neutral/providers/signer/XyoSigner.d.ts +0 -25
- package/dist/neutral/providers/signer/XyoSigner.d.ts.map +0 -1
- package/dist/neutral/providers/signer/index.d.ts +0 -2
- package/dist/neutral/providers/signer/index.d.ts.map +0 -1
- package/dist/neutral/repository/Repository.d.ts +0 -27
- package/dist/neutral/repository/Repository.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionReadRepository.d.ts +0 -7
- package/dist/neutral/repository/TransactionReadRepository.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionRepository.d.ts +0 -13
- package/dist/neutral/repository/TransactionRepository.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionRepositoryIterator.d.ts +0 -7
- package/dist/neutral/repository/TransactionRepositoryIterator.d.ts.map +0 -1
- package/dist/neutral/repository/TransactionWriteRepository.d.ts +0 -6
- package/dist/neutral/repository/TransactionWriteRepository.d.ts.map +0 -1
- package/dist/neutral/repository/index.d.ts +0 -6
- package/dist/neutral/repository/index.d.ts.map +0 -1
- package/dist/neutral/runners/Block.d.ts +0 -17
- package/dist/neutral/runners/Block.d.ts.map +0 -1
- package/dist/neutral/runners/Finalization.d.ts +0 -16
- package/dist/neutral/runners/Finalization.d.ts.map +0 -1
- package/dist/neutral/runners/Mempool.d.ts +0 -27
- package/dist/neutral/runners/Mempool.d.ts.map +0 -1
- package/dist/neutral/runners/index.d.ts +0 -4
- package/dist/neutral/runners/index.d.ts.map +0 -1
- package/dist/neutral/transaction/TransactionBoundWitness.d.ts +0 -2127
- package/dist/neutral/transaction/TransactionBoundWitness.d.ts.map +0 -1
- package/dist/neutral/transaction/TransactionFees.d.ts +0 -138
- package/dist/neutral/transaction/TransactionFees.d.ts.map +0 -1
- package/dist/neutral/transaction/TransactionGasCosts.d.ts +0 -38
- package/dist/neutral/transaction/TransactionGasCosts.d.ts.map +0 -1
- package/dist/neutral/transaction/index.d.ts +0 -4
- package/dist/neutral/transaction/index.d.ts.map +0 -1
- package/dist/neutral/validation/block/BlockValidationFunction.d.ts +0 -8
- package/dist/neutral/validation/block/BlockValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts +0 -22
- package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/block/HydratedBlockValidationFunction.d.ts +0 -17
- package/dist/neutral/validation/block/HydratedBlockValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/block/error.d.ts +0 -22
- package/dist/neutral/validation/block/error.d.ts.map +0 -1
- package/dist/neutral/validation/block/index.d.ts +0 -5
- package/dist/neutral/validation/block/index.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/BoundWitnessValidationFunction.d.ts +0 -6
- package/dist/neutral/validation/boundwitness/BoundWitnessValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts +0 -8
- package/dist/neutral/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/error.d.ts +0 -13
- package/dist/neutral/validation/boundwitness/error.d.ts.map +0 -1
- package/dist/neutral/validation/boundwitness/index.d.ts +0 -4
- package/dist/neutral/validation/boundwitness/index.d.ts.map +0 -1
- package/dist/neutral/validation/error.d.ts +0 -11
- package/dist/neutral/validation/error.d.ts.map +0 -1
- package/dist/neutral/validation/index.d.ts +0 -6
- package/dist/neutral/validation/index.d.ts.map +0 -1
- package/dist/neutral/validation/payload/InBlockPayloadValidationFunction.d.ts +0 -11
- package/dist/neutral/validation/payload/InBlockPayloadValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/payload/error.d.ts +0 -12
- package/dist/neutral/validation/payload/error.d.ts.map +0 -1
- package/dist/neutral/validation/payload/index.d.ts +0 -3
- package/dist/neutral/validation/payload/index.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/HydratedTransactionStateValidationFunction.d.ts +0 -19
- package/dist/neutral/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/HydratedTransactionValidationFunction.d.ts +0 -18
- package/dist/neutral/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/error.d.ts +0 -8
- package/dist/neutral/validation/transaction/error.d.ts.map +0 -1
- package/dist/neutral/validation/transaction/index.d.ts +0 -4
- package/dist/neutral/validation/transaction/index.d.ts.map +0 -1
- package/dist/neutral/viewers/Block.d.ts +0 -33
- package/dist/neutral/viewers/Block.d.ts.map +0 -1
- package/dist/neutral/viewers/BlockInvalidation.d.ts +0 -69
- package/dist/neutral/viewers/BlockInvalidation.d.ts.map +0 -1
- package/dist/neutral/viewers/BlockReward.d.ts +0 -16
- package/dist/neutral/viewers/BlockReward.d.ts.map +0 -1
- package/dist/neutral/viewers/BlockValidation.d.ts +0 -69
- package/dist/neutral/viewers/BlockValidation.d.ts.map +0 -1
- package/dist/neutral/viewers/ChainContract.d.ts +0 -24
- package/dist/neutral/viewers/ChainContract.d.ts.map +0 -1
- package/dist/neutral/viewers/ChainStakeViewer.d.ts +0 -11
- package/dist/neutral/viewers/ChainStakeViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/Finalization.d.ts +0 -21
- package/dist/neutral/viewers/Finalization.d.ts.map +0 -1
- package/dist/neutral/viewers/Fork.d.ts +0 -9
- package/dist/neutral/viewers/Fork.d.ts.map +0 -1
- package/dist/neutral/viewers/Mempool.d.ts +0 -33
- package/dist/neutral/viewers/Mempool.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/NetworkStakeViewer.d.ts +0 -17
- package/dist/neutral/viewers/NetworkStake/NetworkStakeViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByPositionViewer.d.ts +0 -14
- package/dist/neutral/viewers/NetworkStake/Rewards/ByPositionViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStakerViewer.d.ts +0 -15
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStakerViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStepViewer.d.ts +0 -15
- package/dist/neutral/viewers/NetworkStake/Rewards/ByStepViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/Options.d.ts +0 -20
- package/dist/neutral/viewers/NetworkStake/Rewards/Options.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/TotalViewer.d.ts +0 -15
- package/dist/neutral/viewers/NetworkStake/Rewards/TotalViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/Viewer.d.ts +0 -20
- package/dist/neutral/viewers/NetworkStake/Rewards/Viewer.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/index.d.ts +0 -8
- package/dist/neutral/viewers/NetworkStake/Rewards/index.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.d.ts +0 -7
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/MethodsTemplate.d.ts +0 -10
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/MethodsTemplate.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/index.d.ts +0 -3
- package/dist/neutral/viewers/NetworkStake/Rewards/templates/index.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStake/index.d.ts +0 -3
- package/dist/neutral/viewers/NetworkStake/index.d.ts.map +0 -1
- package/dist/neutral/viewers/NetworkStakeStepReward.d.ts +0 -42
- package/dist/neutral/viewers/NetworkStakeStepReward.d.ts.map +0 -1
- package/dist/neutral/viewers/Stake.d.ts +0 -39
- package/dist/neutral/viewers/Stake.d.ts.map +0 -1
- package/dist/neutral/viewers/StakeEvents.d.ts +0 -44
- package/dist/neutral/viewers/StakeEvents.d.ts.map +0 -1
- package/dist/neutral/viewers/StakeIntent.d.ts +0 -17
- package/dist/neutral/viewers/StakeIntent.d.ts.map +0 -1
- package/dist/neutral/viewers/StakeTotals.d.ts +0 -20
- package/dist/neutral/viewers/StakeTotals.d.ts.map +0 -1
- package/dist/neutral/viewers/StepStake.d.ts +0 -15
- package/dist/neutral/viewers/StepStake.d.ts.map +0 -1
- package/dist/neutral/viewers/StepViewer.d.ts +0 -39
- package/dist/neutral/viewers/StepViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/TimeSync.d.ts +0 -22
- package/dist/neutral/viewers/TimeSync.d.ts.map +0 -1
- package/dist/neutral/viewers/Transaction.d.ts +0 -23
- package/dist/neutral/viewers/Transaction.d.ts.map +0 -1
- package/dist/neutral/viewers/TransactionInvalidation.d.ts +0 -67
- package/dist/neutral/viewers/TransactionInvalidation.d.ts.map +0 -1
- package/dist/neutral/viewers/TransactionValidation.d.ts +0 -68
- package/dist/neutral/viewers/TransactionValidation.d.ts.map +0 -1
- package/dist/neutral/viewers/TransferBalance.d.ts +0 -35
- package/dist/neutral/viewers/TransferBalance.d.ts.map +0 -1
- package/dist/neutral/viewers/WindowedBlock.d.ts +0 -19
- package/dist/neutral/viewers/WindowedBlock.d.ts.map +0 -1
- package/dist/neutral/viewers/XyoViewer.d.ts +0 -57
- package/dist/neutral/viewers/XyoViewer.d.ts.map +0 -1
- package/dist/neutral/viewers/index.d.ts +0 -24
- package/dist/neutral/viewers/index.d.ts.map +0 -1
- package/dist/neutral/xl1/AttoXL1.d.ts +0 -15
- package/dist/neutral/xl1/AttoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/FemtoXL1.d.ts +0 -15
- package/dist/neutral/xl1/FemtoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/MicroXL1.d.ts +0 -15
- package/dist/neutral/xl1/MicroXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/MilliXL1.d.ts +0 -15
- package/dist/neutral/xl1/MilliXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/NanoXL1.d.ts +0 -15
- package/dist/neutral/xl1/NanoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/PicoXL1.d.ts +0 -15
- package/dist/neutral/xl1/PicoXL1.d.ts.map +0 -1
- package/dist/neutral/xl1/XL1.d.ts +0 -15
- package/dist/neutral/xl1/XL1.d.ts.map +0 -1
- package/dist/neutral/xl1/XL1Units.d.ts +0 -10
- package/dist/neutral/xl1/XL1Units.d.ts.map +0 -1
- package/dist/neutral/xl1/index.d.ts +0 -9
- package/dist/neutral/xl1/index.d.ts.map +0 -1
- package/dist/neutral/xl1/isXL1Factory.d.ts +0 -12
- package/dist/neutral/xl1/isXL1Factory.d.ts.map +0 -1
- package/dist/neutral/xl1/xl1MaxValue.d.ts +0 -3
- package/dist/neutral/xl1/xl1MaxValue.d.ts.map +0 -1
- package/src/BlockNumber/BlockNumber.ts +0 -24
- package/src/BlockNumber/EthBlockNumber.ts +0 -25
- package/src/BlockNumber/Numberish.ts +0 -9
- package/src/BlockNumber/XL1BlockNumber.ts +0 -25
- package/src/BlockNumber/index.ts +0 -4
- package/src/Initializable.ts +0 -13
- package/src/OpenTelemetryProviders.ts +0 -7
- package/src/RecordKeyType.ts +0 -5
- package/src/Step/StepHash.ts +0 -10
- package/src/Step/StepIdentity.ts +0 -46
- package/src/Step/StepSizes.ts +0 -47
- package/src/Step/index.ts +0 -3
- package/src/TransferPayload.ts +0 -35
- package/src/amount/ShiftedBigIntConfig.ts +0 -8
- package/src/amount/XL1AmountInstance.ts +0 -19
- package/src/amount/index.ts +0 -2
- package/src/block/AllowedBlockPayload.ts +0 -73
- package/src/block/BlockBoundWitness.ts +0 -72
- package/src/block/HydratedBlock.ts +0 -135
- package/src/block/index.ts +0 -5
- package/src/block/signed/SignedBlockBoundWitness.ts +0 -22
- package/src/block/signed/SignedBlockBoundWitnessWithHashMeta.ts +0 -35
- package/src/block/signed/SignedBlockBoundWitnessWithStorageMeta.ts +0 -41
- package/src/block/signed/index.ts +0 -3
- package/src/block/unsigned/UnsignedBlockBoundWitness.ts +0 -22
- package/src/block/unsigned/index.ts +0 -1
- package/src/chain/Chain.ts +0 -7
- package/src/chain/ChainAnalyzer.ts +0 -11
- package/src/chain/ChainId.ts +0 -4
- package/src/chain/index.ts +0 -3
- package/src/fields/Addressable.ts +0 -7
- package/src/fields/BlockDuration.ts +0 -25
- package/src/fields/BlockNumber.ts +0 -40
- package/src/fields/ChainReference.ts +0 -11
- package/src/fields/index.ts +0 -4
- package/src/map/AsyncMap.ts +0 -38
- package/src/map/MapType.ts +0 -27
- package/src/map/SyncMap.ts +0 -38
- package/src/map/index.ts +0 -3
- package/src/model/AccountBalance.ts +0 -58
- package/src/model/ArrayBuffer.ts +0 -44
- package/src/model/BlockRange/BlockRange.ts +0 -43
- package/src/model/BlockRange/EthBlockRange.ts +0 -43
- package/src/model/BlockRange/Numberish.ts +0 -6
- package/src/model/BlockRange/Range.ts +0 -17
- package/src/model/BlockRange/XL1BlockRange.ts +0 -43
- package/src/model/BlockRange/index.ts +0 -4
- package/src/model/BlockRate.ts +0 -108
- package/src/model/ChainQualification.ts +0 -48
- package/src/model/Context/BaseContext.ts +0 -6
- package/src/model/Context/BaseContext.zod.ts +0 -36
- package/src/model/Context/BlockContext.ts +0 -12
- package/src/model/Context/BlockContext.zod.ts +0 -20
- package/src/model/Context/CachingContext.ts +0 -6
- package/src/model/Context/CachingContext.zod.ts +0 -4
- package/src/model/Context/ChainContext.ts +0 -12
- package/src/model/Context/ChainContext.zod.ts +0 -17
- package/src/model/Context/HeadContext.ts +0 -6
- package/src/model/Context/HeadContext.zod.ts +0 -13
- package/src/model/Context/index.ts +0 -10
- package/src/model/GatewayName.ts +0 -4
- package/src/model/HydratedTransaction.ts +0 -169
- package/src/model/OpCodes.ts +0 -2
- package/src/model/PayloadMap.ts +0 -13
- package/src/model/Permission.ts +0 -29
- package/src/model/Position.ts +0 -21
- package/src/model/PositionId.ts +0 -4
- package/src/model/RangeMultipliers.ts +0 -13
- package/src/model/RewardShare.ts +0 -2
- package/src/model/RewardsRangeOptions.ts +0 -13
- package/src/model/Sequence.ts +0 -21
- package/src/model/Stake.ts +0 -47
- package/src/model/StakeShare.ts +0 -2
- package/src/model/TimeDomain.ts +0 -8
- package/src/model/TransferPair.ts +0 -7
- package/src/model/addresses.ts +0 -36
- package/src/model/defaultRewardRatio.ts +0 -3
- package/src/model/defaultTransactionFees.ts +0 -11
- package/src/model/index.ts +0 -27
- package/src/model/minTransactionFees.ts +0 -10
- package/src/model/rewards.ts +0 -18
- package/src/model/spec/fixtures/index.ts +0 -2
- package/src/model/spec/fixtures/signedHydratedTransaction.ts +0 -58
- package/src/model/spec/fixtures/unsignedHydratedTransaction.ts +0 -62
- package/src/model/version.ts +0 -10
- package/src/network/NetworkId.ts +0 -6
- package/src/network/Status.ts +0 -30
- package/src/network/index.ts +0 -2
- package/src/payload/StepIdentityPayload.ts +0 -25
- package/src/payload/elevatable/Bridge/BridgeCompletion.ts +0 -28
- package/src/payload/elevatable/Bridge/BridgeDestinationObservation.ts +0 -38
- package/src/payload/elevatable/Bridge/BridgeDetails.ts +0 -69
- package/src/payload/elevatable/Bridge/BridgeIntent.ts +0 -36
- package/src/payload/elevatable/Bridge/BridgeSourceObservation.ts +0 -37
- package/src/payload/elevatable/Bridge/index.ts +0 -5
- package/src/payload/elevatable/ChainStakeIntent.ts +0 -45
- package/src/payload/elevatable/Executable.ts +0 -35
- package/src/payload/elevatable/Hash.ts +0 -25
- package/src/payload/elevatable/StepComplete.ts +0 -31
- package/src/payload/elevatable/Time.ts +0 -61
- package/src/payload/elevatable/index.ts +0 -6
- package/src/payload/index.ts +0 -2
- package/src/permissions/InvokerPermission.ts +0 -58
- package/src/permissions/XyoPermissions.ts +0 -41
- package/src/permissions/index.ts +0 -2
- package/src/provider/Provider.ts +0 -6
- package/src/provider/ProviderMoniker.ts +0 -15
- package/src/provider/index.ts +0 -2
- package/src/providers/DataLake/Provider.ts +0 -12
- package/src/providers/DataLake/Runner.ts +0 -16
- package/src/providers/DataLake/Viewer.ts +0 -16
- package/src/providers/DataLake/index.ts +0 -3
- package/src/providers/TransactionHelper.ts +0 -16
- package/src/providers/XyoClient.ts +0 -26
- package/src/providers/XyoConnection.ts +0 -19
- package/src/providers/XyoGateway.ts +0 -23
- package/src/providers/XyoGatewayRunner.ts +0 -76
- package/src/providers/XyoNetwork.ts +0 -8
- package/src/providers/XyoRunner.ts +0 -20
- package/src/providers/index.ts +0 -8
- package/src/providers/signer/XyoSigner.ts +0 -39
- package/src/providers/signer/index.ts +0 -1
- package/src/repository/Repository.ts +0 -32
- package/src/repository/TransactionReadRepository.ts +0 -6
- package/src/repository/TransactionRepository.ts +0 -12
- package/src/repository/TransactionRepositoryIterator.ts +0 -6
- package/src/repository/TransactionWriteRepository.ts +0 -5
- package/src/repository/index.ts +0 -5
- package/src/runners/Block.ts +0 -22
- package/src/runners/Finalization.ts +0 -19
- package/src/runners/Mempool.ts +0 -32
- package/src/runners/index.ts +0 -3
- package/src/transaction/TransactionBoundWitness.ts +0 -187
- package/src/transaction/TransactionFees.ts +0 -73
- package/src/transaction/TransactionGasCosts.ts +0 -42
- package/src/transaction/index.ts +0 -3
- package/src/validation/block/BlockValidationFunction.ts +0 -13
- package/src/validation/block/HydratedBlockStateValidationFunction.ts +0 -31
- package/src/validation/block/HydratedBlockValidationFunction.ts +0 -22
- package/src/validation/block/error.ts +0 -50
- package/src/validation/block/index.ts +0 -4
- package/src/validation/boundwitness/BoundWitnessValidationFunction.ts +0 -9
- package/src/validation/boundwitness/HydratedBoundWitnessValidationFunction.ts +0 -15
- package/src/validation/boundwitness/error.ts +0 -29
- package/src/validation/boundwitness/index.ts +0 -3
- package/src/validation/error.ts +0 -25
- package/src/validation/index.ts +0 -5
- package/src/validation/payload/InBlockPayloadValidationFunction.ts +0 -17
- package/src/validation/payload/error.ts +0 -24
- package/src/validation/payload/index.ts +0 -2
- package/src/validation/transaction/HydratedTransactionStateValidationFunction.ts +0 -27
- package/src/validation/transaction/HydratedTransactionValidationFunction.ts +0 -23
- package/src/validation/transaction/error.ts +0 -15
- package/src/validation/transaction/index.ts +0 -3
- package/src/viewers/Block.ts +0 -44
- package/src/viewers/BlockInvalidation.ts +0 -80
- package/src/viewers/BlockReward.ts +0 -19
- package/src/viewers/BlockValidation.ts +0 -80
- package/src/viewers/ChainContract.ts +0 -29
- package/src/viewers/ChainStakeViewer.ts +0 -14
- package/src/viewers/Finalization.ts +0 -24
- package/src/viewers/Fork.ts +0 -11
- package/src/viewers/Mempool.ts +0 -41
- package/src/viewers/NetworkStake/NetworkStakeViewer.ts +0 -20
- package/src/viewers/NetworkStake/Rewards/ByPositionViewer.ts +0 -18
- package/src/viewers/NetworkStake/Rewards/ByStakerViewer.ts +0 -20
- package/src/viewers/NetworkStake/Rewards/ByStepViewer.ts +0 -18
- package/src/viewers/NetworkStake/Rewards/Options.ts +0 -24
- package/src/viewers/NetworkStake/Rewards/TotalViewer.ts +0 -17
- package/src/viewers/NetworkStake/Rewards/Viewer.ts +0 -21
- package/src/viewers/NetworkStake/Rewards/index.ts +0 -7
- package/src/viewers/NetworkStake/Rewards/templates/ByIndexMethodsTemplate.ts +0 -7
- package/src/viewers/NetworkStake/Rewards/templates/MethodsTemplate.ts +0 -10
- package/src/viewers/NetworkStake/Rewards/templates/index.ts +0 -2
- package/src/viewers/NetworkStake/index.ts +0 -4
- package/src/viewers/NetworkStakeStepReward.ts +0 -83
- package/src/viewers/Stake.ts +0 -45
- package/src/viewers/StakeEvents.ts +0 -55
- package/src/viewers/StakeIntent.ts +0 -22
- package/src/viewers/StakeTotals.ts +0 -22
- package/src/viewers/StepStake.ts +0 -28
- package/src/viewers/StepViewer.ts +0 -57
- package/src/viewers/TimeSync.ts +0 -27
- package/src/viewers/Transaction.ts +0 -27
- package/src/viewers/TransactionInvalidation.ts +0 -70
- package/src/viewers/TransactionValidation.ts +0 -71
- package/src/viewers/TransferBalance.ts +0 -39
- package/src/viewers/WindowedBlock.ts +0 -22
- package/src/viewers/XyoViewer.ts +0 -74
- package/src/viewers/index.ts +0 -23
- package/src/xl1/AttoXL1.ts +0 -19
- package/src/xl1/FemtoXL1.ts +0 -20
- package/src/xl1/MicroXL1.ts +0 -20
- package/src/xl1/MilliXL1.ts +0 -20
- package/src/xl1/NanoXL1.ts +0 -20
- package/src/xl1/PicoXL1.ts +0 -20
- package/src/xl1/XL1.ts +0 -20
- package/src/xl1/XL1Units.ts +0 -26
- package/src/xl1/index.ts +0 -8
- package/src/xl1/isXL1Factory.ts +0 -56
- package/src/xl1/xl1MaxValue.ts +0 -2
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Address, Hash, Logger, Promisable,
|
|
3
|
-
} from '@xylabs/sdk-js'
|
|
4
|
-
import type { Payload } from '@xyo-network/sdk-js'
|
|
5
|
-
|
|
6
|
-
import type { AllowedBlockPayload } from '../block/index.ts'
|
|
7
|
-
import type { XL1BlockNumber } from '../BlockNumber/index.ts'
|
|
8
|
-
import type { ChainId } from '../chain/index.ts'
|
|
9
|
-
import type {
|
|
10
|
-
SignedHydratedTransaction, SignedHydratedTransactionWithHashMeta,
|
|
11
|
-
UnsignedHydratedTransaction,
|
|
12
|
-
} from '../model/index.ts'
|
|
13
|
-
import type { TransactionFeesBigInt } from '../transaction/index.ts'
|
|
14
|
-
import type { AttoXL1 } from '../xl1/index.ts'
|
|
15
|
-
import type { XyoSigner } from './signer/index.ts'
|
|
16
|
-
import type { XyoGatewayProvider } from './XyoGateway.ts'
|
|
17
|
-
|
|
18
|
-
/** ConfirmSubmittedTransactionOptions type. */
|
|
19
|
-
export type ConfirmSubmittedTransactionOptions = {
|
|
20
|
-
/**
|
|
21
|
-
* Number of attempts to confirm the transaction.
|
|
22
|
-
* Defaults to 20.
|
|
23
|
-
*/
|
|
24
|
-
attempts?: number
|
|
25
|
-
/**
|
|
26
|
-
* Delay in milliseconds between confirmation attempts.
|
|
27
|
-
* Defaults to 1000 (1 second).
|
|
28
|
-
*/
|
|
29
|
-
delay?: number
|
|
30
|
-
/**
|
|
31
|
-
* Optional logger instance for logging progress.
|
|
32
|
-
*/
|
|
33
|
-
logger?: Logger
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** Options for Transaction. */
|
|
37
|
-
export interface TransactionOptions {
|
|
38
|
-
chain?: ChainId
|
|
39
|
-
exp?: XL1BlockNumber
|
|
40
|
-
fees?: TransactionFeesBigInt
|
|
41
|
-
from?: Address
|
|
42
|
-
nbf?: XL1BlockNumber
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** Moniker identifier for the XyoGatewayRunner provider. */
|
|
46
|
-
export const XyoGatewayRunnerMoniker = 'XyoGatewayRunner' as const
|
|
47
|
-
/** Type literal for the XyoGatewayRunner provider moniker. */
|
|
48
|
-
export type XyoGatewayRunnerMoniker = typeof XyoGatewayRunnerMoniker
|
|
49
|
-
|
|
50
|
-
/** XyoGatewayRunnerMethods interface. */
|
|
51
|
-
export interface XyoGatewayRunnerMethods {
|
|
52
|
-
|
|
53
|
-
addPayloadsToChain(
|
|
54
|
-
onChain: AllowedBlockPayload[],
|
|
55
|
-
offChain: Payload[],
|
|
56
|
-
options?: TransactionOptions
|
|
57
|
-
): Promisable<[Hash, SignedHydratedTransactionWithHashMeta]>
|
|
58
|
-
|
|
59
|
-
addTransactionToChain(
|
|
60
|
-
tx: UnsignedHydratedTransaction | SignedHydratedTransaction,
|
|
61
|
-
offChain?: Payload[]
|
|
62
|
-
): Promisable<[Hash, SignedHydratedTransactionWithHashMeta]>
|
|
63
|
-
|
|
64
|
-
confirmSubmittedTransaction(txHash: Hash, options?: ConfirmSubmittedTransactionOptions): Promisable<SignedHydratedTransaction>
|
|
65
|
-
|
|
66
|
-
send(to: Address, amount: AttoXL1, options?: TransactionOptions): Promisable<Hash>
|
|
67
|
-
sendMany(transfers: Record<Address, AttoXL1>, options?: TransactionOptions): Promisable<Hash>
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** Runner interface for executing XyoGateway operations. */
|
|
71
|
-
export interface XyoGatewayRunner extends XyoGatewayRunnerMethods, XyoGatewayProvider<XyoGatewayRunnerMoniker> {
|
|
72
|
-
/**
|
|
73
|
-
* Returns the signer for this gateway.
|
|
74
|
-
*/
|
|
75
|
-
signer: XyoSigner
|
|
76
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Hash, Promisable } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
import type { SignedHydratedTransaction } from '../model/index.ts'
|
|
4
|
-
import type { Provider } from '../provider/index.ts'
|
|
5
|
-
import type { MempoolRunner } from '../runners/index.ts'
|
|
6
|
-
|
|
7
|
-
/** XyoRunnerMethods interface. */
|
|
8
|
-
export interface XyoRunnerMethods {
|
|
9
|
-
broadcastTransaction(transaction: SignedHydratedTransaction): Promisable<Hash>
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** Moniker identifier for the XyoRunner provider. */
|
|
13
|
-
export const XyoRunnerMoniker = 'XyoRunner' as const
|
|
14
|
-
/** Type literal for the XyoRunner provider moniker. */
|
|
15
|
-
export type XyoRunnerMoniker = typeof XyoRunnerMoniker
|
|
16
|
-
|
|
17
|
-
/** Runner interface for executing Xyo operations. */
|
|
18
|
-
export interface XyoRunner extends XyoRunnerMethods, Provider<XyoRunnerMoniker> {
|
|
19
|
-
mempool: MempoolRunner
|
|
20
|
-
}
|
package/src/providers/index.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './DataLake/index.ts'
|
|
2
|
-
export * from './signer/index.ts'
|
|
3
|
-
export * from './XyoClient.ts'
|
|
4
|
-
export * from './XyoConnection.ts'
|
|
5
|
-
export * from './XyoGateway.ts'
|
|
6
|
-
export * from './XyoGatewayRunner.ts'
|
|
7
|
-
export * from './XyoNetwork.ts'
|
|
8
|
-
export * from './XyoRunner.ts'
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Address, Promisable } from '@xylabs/sdk-js'
|
|
2
|
-
import type { Payload, Signed } from '@xyo-network/sdk-js'
|
|
3
|
-
|
|
4
|
-
import type { AllowedBlockPayload } from '../../block/index.ts'
|
|
5
|
-
import type { ChainId } from '../../chain/index.ts'
|
|
6
|
-
import type { SignedHydratedTransactionWithHashMeta } from '../../model/index.ts'
|
|
7
|
-
import type { Provider } from '../../provider/index.ts'
|
|
8
|
-
import type { TransactionBoundWitness, TransactionFeesBigInt } from '../../transaction/index.ts'
|
|
9
|
-
|
|
10
|
-
/** Moniker identifier for the XyoSigner provider. */
|
|
11
|
-
export const XyoSignerMoniker = 'XyoSigner' as const
|
|
12
|
-
/** Type literal for the XyoSigner provider moniker. */
|
|
13
|
-
export type XyoSignerMoniker = typeof XyoSignerMoniker
|
|
14
|
-
|
|
15
|
-
/** XyoSignerMethods interface. */
|
|
16
|
-
export interface XyoSignerMethods {
|
|
17
|
-
address(): Promisable<Address>
|
|
18
|
-
// The tx passed in must have all the payloads (on and off chain) in the payloads array
|
|
19
|
-
// Returns the signed transaction and the payloads array excluding the off-chain payloads.
|
|
20
|
-
// The return value is ready to be broadcast to block producers
|
|
21
|
-
signTransaction(tx: [TransactionBoundWitness, Payload[]]): Promisable<SignedHydratedTransactionWithHashMeta>
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** XyoSigner interface. */
|
|
25
|
-
export interface XyoSigner extends XyoSignerMethods, Provider<XyoSignerMoniker> {}
|
|
26
|
-
|
|
27
|
-
/** XyoSignerDeprecated interface. */
|
|
28
|
-
export interface XyoSignerDeprecated {
|
|
29
|
-
/** @deprecated use signTransaction instead */
|
|
30
|
-
createSignedTransaction(
|
|
31
|
-
chain: ChainId,
|
|
32
|
-
elevatedPayloads: AllowedBlockPayload[],
|
|
33
|
-
additionalPayloads: Payload[],
|
|
34
|
-
nbf: number,
|
|
35
|
-
exp: number,
|
|
36
|
-
fees: TransactionFeesBigInt,
|
|
37
|
-
from?: Address,
|
|
38
|
-
): Promisable<Signed<TransactionBoundWitness>>
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './XyoSigner.ts'
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Hash, Promisable } from '@xylabs/sdk-js'
|
|
2
|
-
import type {
|
|
3
|
-
NextOptions, Payload, WithStorageMeta,
|
|
4
|
-
} from '@xyo-network/sdk-js'
|
|
5
|
-
|
|
6
|
-
/** ReadRepository interface. */
|
|
7
|
-
export interface ReadRepository<TId, TData> {
|
|
8
|
-
get(id: TId): Promisable<TData>
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** IterableRepository interface. */
|
|
12
|
-
export interface IterableRepository<TId, TData> {
|
|
13
|
-
next(id: TId): Promisable<TData>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/** WriteRepository interface. */
|
|
17
|
-
export interface WriteRepository<TData, TResp> {
|
|
18
|
-
insert(data: TData): Promisable<TResp>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** PayloadReadRepository interface. */
|
|
22
|
-
export interface PayloadReadRepository<TId = Hash, TData extends Payload = Payload> extends ReadRepository<TId[], WithStorageMeta<TData>[]> {}
|
|
23
|
-
/** PayloadWriteRepository interface. */
|
|
24
|
-
export interface PayloadWriteRepository<TData extends Payload = Payload> extends WriteRepository<TData[], WithStorageMeta<TData>[]> {}
|
|
25
|
-
|
|
26
|
-
/** PayloadIterableRepository interface. */
|
|
27
|
-
export interface PayloadIterableRepository<TId = Hash, TData extends Payload = Payload>
|
|
28
|
-
extends IterableRepository<NextOptions<TId>, WithStorageMeta<TData>[]> {}
|
|
29
|
-
|
|
30
|
-
/** PayloadRepository interface. */
|
|
31
|
-
export interface PayloadRepository<TId = Hash, TData extends Payload = Payload>
|
|
32
|
-
extends PayloadReadRepository<TId, TData>, PayloadWriteRepository<TData>, PayloadIterableRepository<TId, TData> {}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SignedHydratedTransaction } from '../model/index.ts'
|
|
2
|
-
import type { TransactionBoundWitness } from '../transaction/index.ts'
|
|
3
|
-
import type { ReadRepository } from './Repository.ts'
|
|
4
|
-
|
|
5
|
-
/** TransactionReadRepository interface. */
|
|
6
|
-
export interface TransactionReadRepository extends ReadRepository<TransactionBoundWitness, SignedHydratedTransaction | undefined> {}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { TransactionReadRepository } from './TransactionReadRepository.ts'
|
|
2
|
-
import type { TransactionRepositoryIterator } from './TransactionRepositoryIterator.ts'
|
|
3
|
-
import type { TransactionWriteRepository } from './TransactionWriteRepository.ts'
|
|
4
|
-
|
|
5
|
-
/** TransactionRepository interface. */
|
|
6
|
-
export interface TransactionRepository extends TransactionReadRepository, TransactionWriteRepository {}
|
|
7
|
-
|
|
8
|
-
/** ReadonlyIterableTransactionRepository interface. */
|
|
9
|
-
export interface ReadonlyIterableTransactionRepository extends TransactionReadRepository, TransactionRepositoryIterator {}
|
|
10
|
-
|
|
11
|
-
/** IterableTransactionRepository interface. */
|
|
12
|
-
export interface IterableTransactionRepository extends TransactionRepository, TransactionRepositoryIterator {}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SignedHydratedTransactionWithStorageMeta } from '../model/index.ts'
|
|
2
|
-
import type { TransactionBoundWitness } from '../transaction/index.ts'
|
|
3
|
-
import type { IterableRepository } from './Repository.ts'
|
|
4
|
-
|
|
5
|
-
/** TransactionRepositoryIterator interface. */
|
|
6
|
-
export interface TransactionRepositoryIterator extends IterableRepository<TransactionBoundWitness, SignedHydratedTransactionWithStorageMeta | undefined> {}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SignedHydratedTransaction } from '../model/index.ts'
|
|
2
|
-
import type { WriteRepository } from './Repository.ts'
|
|
3
|
-
|
|
4
|
-
/** TransactionWriteRepository interface. */
|
|
5
|
-
export interface TransactionWriteRepository extends WriteRepository<SignedHydratedTransaction, boolean> {}
|
package/src/repository/index.ts
DELETED
package/src/runners/Block.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { WithHashMeta } from '@xyo-network/sdk-js'
|
|
2
|
-
|
|
3
|
-
import type {
|
|
4
|
-
BlockBoundWitness, SignedBlockBoundWitnessWithHashMeta, SignedHydratedBlockWithHashMeta,
|
|
5
|
-
} from '../block/index.ts'
|
|
6
|
-
import type { Provider } from '../provider/index.ts'
|
|
7
|
-
|
|
8
|
-
/** BlockRunnerMethods interface. */
|
|
9
|
-
export interface BlockRunnerMethods {
|
|
10
|
-
produceNextBlock(head: SignedBlockBoundWitnessWithHashMeta, force: true): Promise<SignedHydratedBlockWithHashMeta>
|
|
11
|
-
produceNextBlock(head: SignedBlockBoundWitnessWithHashMeta, force?: false): Promise<SignedHydratedBlockWithHashMeta | undefined>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** Moniker identifier for the BlockRunner provider. */
|
|
15
|
-
export const BlockRunnerMoniker = 'BlockRunner' as const
|
|
16
|
-
/** Type literal for the BlockRunner provider moniker. */
|
|
17
|
-
export type BlockRunnerMoniker = typeof BlockRunnerMoniker
|
|
18
|
-
|
|
19
|
-
/** Runner interface for executing Block operations. */
|
|
20
|
-
export interface BlockRunner extends BlockRunnerMethods, Provider<BlockRunnerMoniker> {
|
|
21
|
-
next(head: WithHashMeta<BlockBoundWitness>): Promise<SignedHydratedBlockWithHashMeta | undefined>
|
|
22
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Hash } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
import type { SignedHydratedBlockWithHashMeta } from '../block/index.ts'
|
|
4
|
-
import type { Provider } from '../provider/index.ts'
|
|
5
|
-
|
|
6
|
-
/** FinalizationRunnerMethods interface. */
|
|
7
|
-
export interface FinalizationRunnerMethods {
|
|
8
|
-
finalizeBlocks(blocks: SignedHydratedBlockWithHashMeta[]): Promise<Hash[]>
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** Moniker identifier for the FinalizationRunner provider. */
|
|
12
|
-
export const FinalizationRunnerMoniker = 'FinalizationRunner' as const
|
|
13
|
-
/** Type literal for the FinalizationRunner provider moniker. */
|
|
14
|
-
export type FinalizationRunnerMoniker = typeof FinalizationRunnerMoniker
|
|
15
|
-
|
|
16
|
-
/** Runner interface for executing Finalization operations. */
|
|
17
|
-
export interface FinalizationRunner extends FinalizationRunnerMethods, Provider<FinalizationRunnerMoniker> {
|
|
18
|
-
finalizeBlock(block: SignedHydratedBlockWithHashMeta): Promise<Hash>
|
|
19
|
-
}
|
package/src/runners/Mempool.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Hash } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
import type { SignedHydratedBlock } from '../block/index.ts'
|
|
4
|
-
import type { SignedHydratedTransaction } from '../model/index.ts'
|
|
5
|
-
import type { Provider } from '../provider/index.ts'
|
|
6
|
-
|
|
7
|
-
/** MempoolRunnerMethods interface. */
|
|
8
|
-
export interface MempoolRunnerMethods {
|
|
9
|
-
submitBlocks(blocks: SignedHydratedBlock[]): Promise<Hash[]>
|
|
10
|
-
submitTransactions(transactions: SignedHydratedTransaction[]): Promise<Hash[]>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** Moniker identifier for the MempoolRunner provider. */
|
|
14
|
-
export const MempoolRunnerMoniker = 'MempoolRunner' as const
|
|
15
|
-
/** Type literal for the MempoolRunner provider moniker. */
|
|
16
|
-
export type MempoolRunnerMoniker = typeof MempoolRunnerMoniker
|
|
17
|
-
|
|
18
|
-
/** DEFAULT_MAX_EXP_AHEAD constant. */
|
|
19
|
-
export const DEFAULT_MAX_EXP_AHEAD = 1000
|
|
20
|
-
|
|
21
|
-
/** Options for MempoolPrune. */
|
|
22
|
-
export interface MempoolPruneOptions {
|
|
23
|
-
batchSize?: number
|
|
24
|
-
maxCheck?: number
|
|
25
|
-
maxPrune?: number
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** Runner interface for executing Mempool operations. */
|
|
29
|
-
export interface MempoolRunner extends MempoolRunnerMethods, Provider<MempoolRunnerMoniker> {
|
|
30
|
-
prunePendingBlocks(options?: MempoolPruneOptions): Promise<[number, number]>
|
|
31
|
-
prunePendingTransactions(options?: MempoolPruneOptions): Promise<[number, number]>
|
|
32
|
-
}
|
package/src/runners/index.ts
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AddressZod,
|
|
3
|
-
zodAsFactory, zodIsFactory, zodToFactory,
|
|
4
|
-
} from '@xylabs/sdk-js'
|
|
5
|
-
import {
|
|
6
|
-
BoundWitnessZod, HashMetaZod, SignedBoundWitnessZod, StorageMetaZod,
|
|
7
|
-
UnsignedBoundWitnessZod,
|
|
8
|
-
WithHashMetaZod,
|
|
9
|
-
WithStorageMetaZod,
|
|
10
|
-
} from '@xyo-network/sdk-js'
|
|
11
|
-
import { z } from 'zod'
|
|
12
|
-
|
|
13
|
-
import { XL1BlockNumberZod } from '../BlockNumber/index.ts'
|
|
14
|
-
import { ChainZod } from '../chain/index.ts'
|
|
15
|
-
import { TransactionFeesHexZod } from './TransactionFees.ts'
|
|
16
|
-
|
|
17
|
-
/** BlockStartZod constant. */
|
|
18
|
-
export const BlockStartZod = z.object({ nbf: XL1BlockNumberZod })
|
|
19
|
-
/** BlockEndZod constant. */
|
|
20
|
-
export const BlockEndZod = z.object({ exp: XL1BlockNumberZod })
|
|
21
|
-
/** BlockDurationZod constant. */
|
|
22
|
-
export const BlockDurationZod = z.object({ nbf: XL1BlockNumberZod, exp: XL1BlockNumberZod })
|
|
23
|
-
/** BlockScriptsZod constant. */
|
|
24
|
-
export const BlockScriptsZod = z.object({ script: z.array(z.string()).optional() })
|
|
25
|
-
|
|
26
|
-
/** TransactionFeesZod constant. */
|
|
27
|
-
export const TransactionFeesZod = z.object({ fees: TransactionFeesHexZod })
|
|
28
|
-
|
|
29
|
-
/** TransactionBoundWitnessIdentityFields constant. */
|
|
30
|
-
export const TransactionBoundWitnessIdentityFields = z.object({ chain: ChainZod, from: AddressZod })
|
|
31
|
-
|
|
32
|
-
/** TransactionBoundWitnessFieldsZod constant. */
|
|
33
|
-
export const TransactionBoundWitnessFieldsZod = z.object()
|
|
34
|
-
.safeExtend(BlockDurationZod.shape)
|
|
35
|
-
.safeExtend(TransactionFeesZod.shape)
|
|
36
|
-
.safeExtend(TransactionBoundWitnessIdentityFields.shape)
|
|
37
|
-
.safeExtend(BlockScriptsZod.shape)
|
|
38
|
-
|
|
39
|
-
/** TransactionBoundWitnessFields type. */
|
|
40
|
-
export type TransactionBoundWitnessFields = z.infer<typeof TransactionBoundWitnessFieldsZod>
|
|
41
|
-
|
|
42
|
-
/** TransactionBoundWitnessZod constant. */
|
|
43
|
-
export const TransactionBoundWitnessZod = BoundWitnessZod
|
|
44
|
-
.safeExtend(TransactionBoundWitnessFieldsZod.shape)
|
|
45
|
-
|
|
46
|
-
/** TransactionBoundWitness type. */
|
|
47
|
-
export type TransactionBoundWitness = z.infer<typeof TransactionBoundWitnessZod>
|
|
48
|
-
|
|
49
|
-
/** Type guard that checks if a value is a valid TransactionBoundWitness. */
|
|
50
|
-
export const isTransactionBoundWitness = zodIsFactory(TransactionBoundWitnessZod)
|
|
51
|
-
/** Converts a value to TransactionBoundWitness, throwing if invalid. */
|
|
52
|
-
export const asTransactionBoundWitness = zodAsFactory(TransactionBoundWitnessZod, 'asTransactionBoundWitness')
|
|
53
|
-
/** toTransactionBoundWitness constant. */
|
|
54
|
-
export const toTransactionBoundWitness = zodToFactory(TransactionBoundWitnessZod, 'toTransactionBoundWitness')
|
|
55
|
-
|
|
56
|
-
/** TransactionBoundWitnessWithHashMetaZod constant. */
|
|
57
|
-
export const TransactionBoundWitnessWithHashMetaZod = TransactionBoundWitnessZod
|
|
58
|
-
.safeExtend(HashMetaZod.shape)
|
|
59
|
-
|
|
60
|
-
/** TransactionBoundWitnessWithHashMeta type. */
|
|
61
|
-
export type TransactionBoundWitnessWithHashMeta = z.infer<typeof TransactionBoundWitnessWithHashMetaZod>
|
|
62
|
-
|
|
63
|
-
/** Type guard that checks if a value is a valid TransactionBoundWitnessWithHashMeta. */
|
|
64
|
-
export const isTransactionBoundWitnessWithHashMeta = zodIsFactory(TransactionBoundWitnessWithHashMetaZod)
|
|
65
|
-
/** Converts a value to TransactionBoundWitnessWithHashMeta, throwing if invalid. */
|
|
66
|
-
export const asTransactionBoundWitnessWithHashMeta = zodAsFactory(TransactionBoundWitnessWithHashMetaZod, 'asTransactionBoundWitnessWithHashMeta')
|
|
67
|
-
/** toTransactionBoundWitnessWithHashMeta constant. */
|
|
68
|
-
export const toTransactionBoundWitnessWithHashMeta = zodToFactory(TransactionBoundWitnessWithHashMetaZod, 'toTransactionBoundWitnessWithHashMeta')
|
|
69
|
-
|
|
70
|
-
/** TransactionBoundWitnessWithStorageMetaZod constant. */
|
|
71
|
-
export const TransactionBoundWitnessWithStorageMetaZod = TransactionBoundWitnessZod
|
|
72
|
-
.safeExtend(StorageMetaZod.shape)
|
|
73
|
-
|
|
74
|
-
/** TransactionBoundWitnessWithStorageMeta type. */
|
|
75
|
-
export type TransactionBoundWitnessWithStorageMeta = z.infer<typeof TransactionBoundWitnessWithStorageMetaZod>
|
|
76
|
-
|
|
77
|
-
/** Type guard that checks if a value is a valid TransactionBoundWitnessWithStorageMeta. */
|
|
78
|
-
export const isTransactionBoundWitnessWithStorageMeta = zodIsFactory(TransactionBoundWitnessWithStorageMetaZod)
|
|
79
|
-
/** Converts a value to TransactionBoundWitnessWithStorageMeta, throwing if invalid. */
|
|
80
|
-
export const asTransactionBoundWitnessWithStorageMeta = zodAsFactory(TransactionBoundWitnessWithStorageMetaZod, 'asTransactionBoundWitnessWithStorageMeta')
|
|
81
|
-
/** toTransactionBoundWitnessWithStorageMeta constant. */
|
|
82
|
-
export const toTransactionBoundWitnessWithStorageMeta = zodToFactory(TransactionBoundWitnessWithStorageMetaZod, 'toTransactionBoundWitnessWithStorageMeta')
|
|
83
|
-
|
|
84
|
-
/** UnsignedTransactionBoundWitnessZod constant. */
|
|
85
|
-
export const UnsignedTransactionBoundWitnessZod = UnsignedBoundWitnessZod
|
|
86
|
-
.safeExtend(TransactionBoundWitnessFieldsZod.shape)
|
|
87
|
-
|
|
88
|
-
/** UnsignedTransactionBoundWitness type. */
|
|
89
|
-
export type UnsignedTransactionBoundWitness = z.infer<typeof UnsignedTransactionBoundWitnessZod>
|
|
90
|
-
|
|
91
|
-
/** Type guard that checks if a value is a valid UnsignedTransactionBoundWitness. */
|
|
92
|
-
export const isUnsignedTransactionBoundWitness = zodIsFactory(UnsignedTransactionBoundWitnessZod)
|
|
93
|
-
/** Converts a value to UnsignedTransactionBoundWitness, throwing if invalid. */
|
|
94
|
-
export const asUnsignedTransactionBoundWitness = zodAsFactory(UnsignedTransactionBoundWitnessZod, 'asUnsignedTransactionBoundWitness')
|
|
95
|
-
/** toUnsignedTransactionBoundWitness constant. */
|
|
96
|
-
export const toUnsignedTransactionBoundWitness = zodToFactory(UnsignedTransactionBoundWitnessZod, 'toUnsignedTransactionBoundWitness')
|
|
97
|
-
|
|
98
|
-
/** UnsignedTransactionBoundWitnessWithHashMetaZod constant. */
|
|
99
|
-
export const UnsignedTransactionBoundWitnessWithHashMetaZod = UnsignedTransactionBoundWitnessZod.safeExtend(HashMetaZod.shape)
|
|
100
|
-
|
|
101
|
-
/** UnsignedTransactionBoundWitnessWithHashMeta type. */
|
|
102
|
-
export type UnsignedTransactionBoundWitnessWithHashMeta = z.infer<typeof UnsignedTransactionBoundWitnessWithHashMetaZod>
|
|
103
|
-
|
|
104
|
-
/** Type guard that checks if a value is a valid UnsignedTransactionBoundWitnessWithHashMeta. */
|
|
105
|
-
export const isUnsignedTransactionBoundWitnessWithHashMeta = zodIsFactory(UnsignedTransactionBoundWitnessWithHashMetaZod)
|
|
106
|
-
/** Converts a value to UnsignedTransactionBoundWitnessWithHashMeta, throwing if invalid. */
|
|
107
|
-
export const asUnsignedTransactionBoundWitnessWithHashMeta = zodAsFactory(
|
|
108
|
-
UnsignedTransactionBoundWitnessWithHashMetaZod,
|
|
109
|
-
'asUnsignedTransactionBoundWitnessWithHashMeta',
|
|
110
|
-
)
|
|
111
|
-
/** toUnsignedTransactionBoundWitnessWithHashMeta constant. */
|
|
112
|
-
export const toUnsignedTransactionBoundWitnessWithHashMeta = zodToFactory(
|
|
113
|
-
UnsignedTransactionBoundWitnessWithHashMetaZod,
|
|
114
|
-
'toUnsignedTransactionBoundWitnessWithHashMeta',
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
/** UnsignedTransactionBoundWitnessWithStorageMetaZod constant. */
|
|
118
|
-
export const UnsignedTransactionBoundWitnessWithStorageMetaZod = UnsignedTransactionBoundWitnessZod
|
|
119
|
-
.safeExtend(StorageMetaZod.shape)
|
|
120
|
-
|
|
121
|
-
/** UnsignedTransactionBoundWitnessWithStorageMeta type. */
|
|
122
|
-
export type UnsignedTransactionBoundWitnessWithStorageMeta = z.infer<typeof UnsignedTransactionBoundWitnessWithStorageMetaZod>
|
|
123
|
-
|
|
124
|
-
/** Type guard that checks if a value is a valid UnsignedTransactionBoundWitnessWithStorageMeta. */
|
|
125
|
-
export const isUnsignedTransactionBoundWitnessWithStorageMeta = zodIsFactory(UnsignedTransactionBoundWitnessWithStorageMetaZod)
|
|
126
|
-
/** Converts a value to UnsignedTransactionBoundWitnessWithStorageMeta, throwing if invalid. */
|
|
127
|
-
export const asUnsignedTransactionBoundWitnessWithStorageMeta = zodAsFactory(
|
|
128
|
-
UnsignedTransactionBoundWitnessWithStorageMetaZod,
|
|
129
|
-
'asUnsignedTransactionBoundWitnessWithStorageMeta',
|
|
130
|
-
)
|
|
131
|
-
/** toUnsignedTransactionBoundWitnessWithStorageMeta constant. */
|
|
132
|
-
export const toUnsignedTransactionBoundWitnessWithStorageMeta = zodToFactory(
|
|
133
|
-
UnsignedTransactionBoundWitnessWithStorageMetaZod,
|
|
134
|
-
'toUnsignedTransactionBoundWitnessWithStorageMeta',
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
/** SignedTransactionBoundWitnessZod constant. */
|
|
138
|
-
export const SignedTransactionBoundWitnessZod = SignedBoundWitnessZod
|
|
139
|
-
.safeExtend(TransactionBoundWitnessFieldsZod.shape)
|
|
140
|
-
|
|
141
|
-
/** SignedTransactionBoundWitness type. */
|
|
142
|
-
export type SignedTransactionBoundWitness = z.infer<typeof SignedTransactionBoundWitnessZod>
|
|
143
|
-
|
|
144
|
-
/** Type guard that checks if a value is a valid SignedTransactionBoundWitness. */
|
|
145
|
-
export const isSignedTransactionBoundWitness = zodIsFactory(SignedTransactionBoundWitnessZod)
|
|
146
|
-
/** Converts a value to SignedTransactionBoundWitness, throwing if invalid. */
|
|
147
|
-
export const asSignedTransactionBoundWitness = zodAsFactory(SignedTransactionBoundWitnessZod, 'asSignedTransactionBoundWitness')
|
|
148
|
-
/** toSignedTransactionBoundWitness constant. */
|
|
149
|
-
export const toSignedTransactionBoundWitness = zodToFactory(SignedTransactionBoundWitnessZod, 'toSignedTransactionBoundWitness')
|
|
150
|
-
|
|
151
|
-
/** SignedTransactionBoundWitnessWithHashMetaZod constant. */
|
|
152
|
-
export const SignedTransactionBoundWitnessWithHashMetaZod = WithHashMetaZod(SignedTransactionBoundWitnessZod)
|
|
153
|
-
|
|
154
|
-
/** SignedTransactionBoundWitnessWithHashMeta type. */
|
|
155
|
-
export type SignedTransactionBoundWitnessWithHashMeta = z.infer<typeof SignedTransactionBoundWitnessWithHashMetaZod>
|
|
156
|
-
|
|
157
|
-
/** Type guard that checks if a value is a valid SignedTransactionBoundWitnessWithHashMeta. */
|
|
158
|
-
export const isSignedTransactionBoundWitnessWithHashMeta = zodIsFactory(SignedTransactionBoundWitnessWithHashMetaZod)
|
|
159
|
-
/** Converts a value to SignedTransactionBoundWitnessWithHashMeta, throwing if invalid. */
|
|
160
|
-
export const asSignedTransactionBoundWitnessWithHashMeta = zodAsFactory(
|
|
161
|
-
SignedTransactionBoundWitnessWithHashMetaZod,
|
|
162
|
-
'asSignedTransactionBoundWitnessWithHashMeta',
|
|
163
|
-
)
|
|
164
|
-
/** toSignedTransactionBoundWitnessWithHashMeta constant. */
|
|
165
|
-
export const toSignedTransactionBoundWitnessWithHashMeta = zodToFactory(
|
|
166
|
-
SignedTransactionBoundWitnessWithHashMetaZod,
|
|
167
|
-
'toSignedTransactionBoundWitnessWithHashMeta',
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
/** SignedTransactionBoundWitnessWithStorageMetaZod constant. */
|
|
171
|
-
export const SignedTransactionBoundWitnessWithStorageMetaZod = WithStorageMetaZod(SignedTransactionBoundWitnessZod)
|
|
172
|
-
|
|
173
|
-
/** SignedTransactionBoundWitnessWithStorageMeta type. */
|
|
174
|
-
export type SignedTransactionBoundWitnessWithStorageMeta = z.infer<typeof SignedTransactionBoundWitnessWithStorageMetaZod>
|
|
175
|
-
|
|
176
|
-
/** Type guard that checks if a value is a valid SignedTransactionBoundWitnessWithStorageMeta. */
|
|
177
|
-
export const isSignedTransactionBoundWitnessWithStorageMeta = zodIsFactory(SignedTransactionBoundWitnessWithStorageMetaZod)
|
|
178
|
-
/** Converts a value to SignedTransactionBoundWitnessWithStorageMeta, throwing if invalid. */
|
|
179
|
-
export const asSignedTransactionBoundWitnessWithStorageMeta = zodAsFactory(
|
|
180
|
-
SignedTransactionBoundWitnessWithStorageMetaZod,
|
|
181
|
-
'asSignedTransactionBoundWitnessWithStorageMeta',
|
|
182
|
-
)
|
|
183
|
-
/** toSignedTransactionBoundWitnessWithStorageMeta constant. */
|
|
184
|
-
export const toSignedTransactionBoundWitnessWithStorageMeta = zodToFactory(
|
|
185
|
-
SignedTransactionBoundWitnessWithStorageMetaZod,
|
|
186
|
-
'toSignedTransactionBoundWitnessWithStorageMeta',
|
|
187
|
-
)
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BigIntToJsonZod, HexZod, JsonToBigIntZod,
|
|
3
|
-
zodAsFactory, zodIsFactory, zodToFactory,
|
|
4
|
-
} from '@xylabs/sdk-js'
|
|
5
|
-
import { z } from 'zod'
|
|
6
|
-
|
|
7
|
-
import { asAttoXL1 } from '../xl1/index.ts'
|
|
8
|
-
|
|
9
|
-
/** AttoZod constant. */
|
|
10
|
-
export const AttoZod = z.bigint()
|
|
11
|
-
/** JsonToAttoZod constant. */
|
|
12
|
-
export const JsonToAttoZod = JsonToBigIntZod.transform(v => asAttoXL1(v))
|
|
13
|
-
|
|
14
|
-
/** AttoToJsonZod constant. */
|
|
15
|
-
|
|
16
|
-
/** TransactionFeesHexZod constant. */
|
|
17
|
-
export const TransactionFeesHexZod = z.object({
|
|
18
|
-
base: HexZod,
|
|
19
|
-
gasLimit: HexZod,
|
|
20
|
-
gasPrice: HexZod,
|
|
21
|
-
priority: HexZod,
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
/** TransactionFeesHex type. */
|
|
25
|
-
export type TransactionFeesHex = z.infer<typeof TransactionFeesHexZod>
|
|
26
|
-
|
|
27
|
-
/** Type guard that checks if a value is a valid TransactionFeesHex. */
|
|
28
|
-
export const isTransactionFeesHex = zodIsFactory(TransactionFeesHexZod)
|
|
29
|
-
/** Converts a value to TransactionFeesHex, throwing if invalid. */
|
|
30
|
-
export const asTransactionFeesHex = zodAsFactory(TransactionFeesHexZod, 'asTransactionFeesHex')
|
|
31
|
-
/** toTransactionFeesHex constant. */
|
|
32
|
-
export const toTransactionFeesHex = zodToFactory(TransactionFeesHexZod, 'toTransactionFeesHex')
|
|
33
|
-
|
|
34
|
-
/** TransactionFeesBigIntZod constant. */
|
|
35
|
-
export const TransactionFeesBigIntZod = z.object({
|
|
36
|
-
base: AttoZod,
|
|
37
|
-
gasLimit: AttoZod,
|
|
38
|
-
gasPrice: AttoZod,
|
|
39
|
-
priority: AttoZod,
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
/** TransactionFeesBigInt type. */
|
|
43
|
-
export type TransactionFeesBigInt = z.infer<typeof TransactionFeesBigIntZod>
|
|
44
|
-
|
|
45
|
-
/** Type guard that checks if a value is a valid TransactionFeesBigInt. */
|
|
46
|
-
export const isTransactionFeesBigInt = zodIsFactory(TransactionFeesBigIntZod)
|
|
47
|
-
/** Converts a value to TransactionFeesBigInt, throwing if invalid. */
|
|
48
|
-
export const asTransactionFeesBigInt = zodAsFactory(TransactionFeesBigIntZod, 'asTransactionFeesBigInt')
|
|
49
|
-
/** toTransactionFeesBigInt constant. */
|
|
50
|
-
export const toTransactionFeesBigInt = zodToFactory(TransactionFeesBigIntZod, 'toTransactionFeesBigInt')
|
|
51
|
-
|
|
52
|
-
/** TransactionFeesJsonToBigIntZod constant. */
|
|
53
|
-
export const TransactionFeesJsonToBigIntZod = TransactionFeesHexZod.transform(val => ({
|
|
54
|
-
base: JsonToBigIntZod.parse(val.base),
|
|
55
|
-
gasLimit: JsonToBigIntZod.parse(val.gasLimit),
|
|
56
|
-
gasPrice: JsonToBigIntZod.parse(val.gasPrice),
|
|
57
|
-
priority: JsonToBigIntZod.parse(val.priority),
|
|
58
|
-
}))
|
|
59
|
-
|
|
60
|
-
/** TransactionFeesBigIntToJsonZod constant. */
|
|
61
|
-
export const TransactionFeesBigIntToJsonZod = TransactionFeesBigIntZod.transform(val => ({
|
|
62
|
-
base: BigIntToJsonZod.parse(val.base),
|
|
63
|
-
gasLimit: BigIntToJsonZod.parse(val.gasLimit),
|
|
64
|
-
gasPrice: BigIntToJsonZod.parse(val.gasPrice),
|
|
65
|
-
priority: BigIntToJsonZod.parse(val.priority),
|
|
66
|
-
}))
|
|
67
|
-
|
|
68
|
-
/** TransactionFeesJsonToBigIntZodType type. */
|
|
69
|
-
export type TransactionFeesJsonToBigIntZodType = z.infer<typeof TransactionFeesJsonToBigIntZod>
|
|
70
|
-
/** TransactionFeesBigIntToJsonZodType type. */
|
|
71
|
-
export type TransactionFeesBigIntToJsonZodType = z.infer<typeof TransactionFeesBigIntToJsonZod>
|
|
72
|
-
|
|
73
|
-
export { BigIntToJsonZod as AttoToJsonZod } from '@xylabs/sdk-js'
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/** TransactionGasCosts constant. */
|
|
2
|
-
export const TransactionGasCosts = {
|
|
3
|
-
/**
|
|
4
|
-
* The cost of storing each character that is added to the chain
|
|
5
|
-
* This includes the transaction JSON and all the elevated payloads' JSON
|
|
6
|
-
*/
|
|
7
|
-
characterStorage: 10n,
|
|
8
|
-
|
|
9
|
-
/** The cost of static validating every payload that will be included in the chain */
|
|
10
|
-
payloadValidation: 1000n,
|
|
11
|
-
|
|
12
|
-
/** The cost of validating each signature that will be included in the chain */
|
|
13
|
-
signatureValidation: 1000n,
|
|
14
|
-
|
|
15
|
-
/** The cost of validating each hash that will be included in the chain */
|
|
16
|
-
hashValidation: 100n,
|
|
17
|
-
|
|
18
|
-
/** The cost of validating a balance state, triggered by a Transfer payload or gas collection */
|
|
19
|
-
balanceValidation: 100n,
|
|
20
|
-
} as const
|
|
21
|
-
|
|
22
|
-
/** Gas Calculation
|
|
23
|
-
*
|
|
24
|
-
* 1 Million microXL1 (mXL1) = 1 XL1
|
|
25
|
-
*
|
|
26
|
-
* Gas amount is calculated as follows:
|
|
27
|
-
*
|
|
28
|
-
* 1. Each byte in the transaction cost 10 gas
|
|
29
|
-
* 2. Each payload validation in the transaction costs 1000 gas
|
|
30
|
-
* 3. Each signature verification in the transaction costs 1000 gas
|
|
31
|
-
* 4. Each hash validation in the transaction costs 100 gas
|
|
32
|
-
* 5. Each balance validation in the transaction costs 100 gas
|
|
33
|
-
* 6. Processing/Compute/Storage Cost?
|
|
34
|
-
* 7. operation Costs?
|
|
35
|
-
*
|
|
36
|
-
* The total gas cost is calculated by multiplying the gas amount by the gas price.
|
|
37
|
-
*
|
|
38
|
-
* minGasPrice is initially set to 100 mXL1
|
|
39
|
-
* minBase is initially set to 1000 mXL1
|
|
40
|
-
* minPriority is always 0 mXL1, but can be set to increase the priority of the transaction
|
|
41
|
-
*
|
|
42
|
-
*/
|
package/src/transaction/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Promisable } from '@xylabs/sdk-js'
|
|
2
|
-
|
|
3
|
-
import type { BlockBoundWitness } from '../../block/index.ts'
|
|
4
|
-
import type { ChainId } from '../../chain/index.ts'
|
|
5
|
-
import type { BaseContext } from '../../model/index.ts'
|
|
6
|
-
import type { BlockValidationError } from './error.ts'
|
|
7
|
-
|
|
8
|
-
/** Function type for BlockValidator operations. */
|
|
9
|
-
export type BlockValidatorFunction = (
|
|
10
|
-
context: BaseContext,
|
|
11
|
-
block: BlockBoundWitness,
|
|
12
|
-
chainId?: ChainId,
|
|
13
|
-
) => Promisable<BlockValidationError[]>
|