@xyo-network/xl1-protocol 1.3.34 → 1.3.35

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.
Files changed (93) hide show
  1. package/dist/neutral/index.mjs +10 -10
  2. package/dist/neutral/index.mjs.map +1 -1
  3. package/dist/node/index.mjs +10 -10
  4. package/dist/node/index.mjs.map +1 -1
  5. package/dist/types/block/AllowedBlockPayload.d.ts +2 -2
  6. package/dist/types/block/AllowedBlockPayload.d.ts.map +1 -1
  7. package/dist/types/chain/ChainAnalyzer.d.ts +1 -1
  8. package/dist/types/chain/ChainAnalyzer.d.ts.map +1 -1
  9. package/dist/types/index.d.ts +12 -12
  10. package/dist/types/index.d.ts.map +1 -1
  11. package/dist/types/iterator/ChainIterator.d.ts +3 -3
  12. package/dist/types/iterator/ChainIterator.d.ts.map +1 -1
  13. package/dist/types/iterator/ChainIteratorEventData.d.ts +1 -1
  14. package/dist/types/iterator/ChainIteratorEventData.d.ts.map +1 -1
  15. package/dist/types/payload/elevatable/ChainStakeIntent.d.ts +1 -1
  16. package/dist/types/payload/elevatable/ChainStakeIntent.d.ts.map +1 -1
  17. package/dist/types/provider/v1/XyoNetwork.d.ts +1 -1
  18. package/dist/types/provider/v1/XyoNetwork.d.ts.map +1 -1
  19. package/dist/types/provider/v1/XyoProvider.d.ts +2 -2
  20. package/dist/types/provider/v1/XyoProvider.d.ts.map +1 -1
  21. package/dist/types/provider/v1/XyoRunner.d.ts +1 -1
  22. package/dist/types/provider/v1/XyoRunner.d.ts.map +1 -1
  23. package/dist/types/provider/v1/XyoSigner.d.ts +2 -2
  24. package/dist/types/provider/v1/XyoSigner.d.ts.map +1 -1
  25. package/dist/types/provider/v1/XyoViewer.d.ts +3 -3
  26. package/dist/types/provider/v1/XyoViewer.d.ts.map +1 -1
  27. package/dist/types/provider/v2/viewer/Account.d.ts +1 -1
  28. package/dist/types/provider/v2/viewer/Account.d.ts.map +1 -1
  29. package/dist/types/provider/v2/viewer/Block.d.ts +1 -1
  30. package/dist/types/provider/v2/viewer/Block.d.ts.map +1 -1
  31. package/dist/types/provider/v2/viewer/Chain.d.ts +1 -1
  32. package/dist/types/provider/v2/viewer/Chain.d.ts.map +1 -1
  33. package/dist/types/provider/v2/viewer/Transaction.d.ts +1 -1
  34. package/dist/types/provider/v2/viewer/Transaction.d.ts.map +1 -1
  35. package/dist/types/repository/TransactionReadRepository.d.ts +1 -1
  36. package/dist/types/repository/TransactionReadRepository.d.ts.map +1 -1
  37. package/dist/types/repository/TransactionRepositoryIterator.d.ts +1 -1
  38. package/dist/types/repository/TransactionRepositoryIterator.d.ts.map +1 -1
  39. package/dist/types/repository/TransactionWriteRepository.d.ts +1 -1
  40. package/dist/types/repository/TransactionWriteRepository.d.ts.map +1 -1
  41. package/dist/types/services/BlockProducer.d.ts +3 -3
  42. package/dist/types/services/BlockProducer.d.ts.map +1 -1
  43. package/dist/types/services/Election.d.ts +1 -1
  44. package/dist/types/services/Election.d.ts.map +1 -1
  45. package/dist/types/services/PendingTransactionsService.d.ts +1 -1
  46. package/dist/types/services/PendingTransactionsService.d.ts.map +1 -1
  47. package/dist/types/services/stakeIntent/StakeIntentService.d.ts +1 -1
  48. package/dist/types/services/stakeIntent/StakeIntentService.d.ts.map +1 -1
  49. package/dist/types/transaction/TransactionBoundWitness.d.ts +2 -2
  50. package/dist/types/transaction/TransactionBoundWitness.d.ts.map +1 -1
  51. package/dist/types/validation/block/BlockValidationFunction.d.ts +1 -1
  52. package/dist/types/validation/block/BlockValidationFunction.d.ts.map +1 -1
  53. package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts +1 -1
  54. package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts.map +1 -1
  55. package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts +1 -1
  56. package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts.map +1 -1
  57. package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts +1 -1
  58. package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts.map +1 -1
  59. package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts +1 -1
  60. package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map +1 -1
  61. package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts +1 -1
  62. package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +1 -1
  63. package/package.json +1 -1
  64. package/src/block/AllowedBlockPayload.ts +3 -3
  65. package/src/chain/ChainAnalyzer.ts +1 -1
  66. package/src/index.ts +12 -12
  67. package/src/iterator/ChainIterator.ts +3 -4
  68. package/src/iterator/ChainIteratorEventData.ts +1 -1
  69. package/src/payload/elevatable/ChainStakeIntent.ts +1 -2
  70. package/src/provider/v1/XyoNetwork.ts +1 -1
  71. package/src/provider/v1/XyoProvider.ts +2 -3
  72. package/src/provider/v1/XyoRunner.ts +1 -1
  73. package/src/provider/v1/XyoSigner.ts +2 -2
  74. package/src/provider/v1/XyoViewer.ts +3 -3
  75. package/src/provider/v2/viewer/Account.ts +1 -1
  76. package/src/provider/v2/viewer/Block.ts +1 -2
  77. package/src/provider/v2/viewer/Chain.ts +1 -2
  78. package/src/provider/v2/viewer/Transaction.ts +1 -2
  79. package/src/repository/TransactionReadRepository.ts +1 -2
  80. package/src/repository/TransactionRepositoryIterator.ts +1 -2
  81. package/src/repository/TransactionWriteRepository.ts +1 -2
  82. package/src/services/BlockProducer.ts +3 -3
  83. package/src/services/Election.ts +1 -2
  84. package/src/services/PendingTransactionsService.ts +1 -2
  85. package/src/services/stakeIntent/StakeIntentService.ts +1 -1
  86. package/src/transaction/TransactionBoundWitness.ts +2 -3
  87. package/src/validation/block/BlockValidationFunction.ts +1 -1
  88. package/src/validation/block/HydratedBlockStateValidationFunction.ts +1 -1
  89. package/src/validation/block/HydratedBlockValidationFunction.ts +1 -1
  90. package/src/validation/payload/InBlockPayloadValidationFunction.ts +1 -1
  91. package/src/validation/transaction/HydratedTransactionStateValidationFunction.ts +1 -1
  92. package/src/validation/transaction/HydratedTransactionValidationFunction.ts +1 -1
  93. package/tsconfig.json +0 -21
@@ -1,13 +1,3 @@
1
- // src/XL1.ts
2
- var XL1 = (value) => value;
3
- var MicroXL1 = (value) => value;
4
- var mXL1ToXL1 = (value) => {
5
- return XL1(BigInt(value) / BigInt(1e6));
6
- };
7
- var mXL1FromXL1 = (value) => {
8
- return MicroXL1(BigInt(value) * BigInt(1e6));
9
- };
10
-
11
1
  // src/block/AllowedBlockPayload.ts
12
2
  import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
13
3
  import { isHashStorageMeta, isSchema } from "@xyo-network/payload-model";
@@ -74,6 +64,16 @@ var asOptionalTransactionBoundWitness = AsObjectFactory4.createOptional(isTransa
74
64
  var asTransactionBoundWitnessWithStorageMeta = AsObjectFactory4.create(isTransactionBoundWitnessWithStorageMeta);
75
65
  var asOptionalTransactionBoundWitnessWithStorageMeta = AsObjectFactory4.createOptional(isTransactionBoundWitnessWithStorageMeta);
76
66
 
67
+ // src/XL1.ts
68
+ var XL1 = (value) => value;
69
+ var MicroXL1 = (value) => value;
70
+ var mXL1ToXL1 = (value) => {
71
+ return XL1(BigInt(value) / BigInt(1e6));
72
+ };
73
+ var mXL1FromXL1 = (value) => {
74
+ return MicroXL1(BigInt(value) * BigInt(1e6));
75
+ };
76
+
77
77
  // src/transaction/TransactionFeesFields.ts
78
78
  var minTransactionFees = {
79
79
  base: MicroXL1(1000n),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/XL1.ts","../../src/block/AllowedBlockPayload.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/transaction/TransactionBoundWitness.ts","../../src/transaction/TransactionFeesFields.ts","../../src/block/BlockBoundWitness.ts","../../src/constants/StepSizes.ts","../../src/constants/TransactionGasCosts.ts","../../src/fields/BlockNumber.ts","../../src/network/Status.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["export type XL1 = bigint & { readonly _tag: 'XL1' } // 1e-18\nexport type MicroXL1 = bigint & { readonly _tag: 'MicroXL1' } // 1e-12\n\nexport const XL1 = (value: bigint): XL1 => value as XL1\nexport const MicroXL1 = (value: bigint): MicroXL1 => value as MicroXL1\n\nexport const mXL1ToXL1 = (value: MicroXL1): XL1 => {\n return XL1(BigInt(value) / BigInt(1_000_000))\n}\n\nexport const mXL1FromXL1 = (value: XL1): MicroXL1 => {\n return MicroXL1(BigInt(value) * BigInt(1_000_000))\n}\n","import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport type { Schema, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isHashStorageMeta, isSchema } from '@xyo-network/payload-model'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { isSchemaPayload, SchemaSchema } from '@xyo-network/schema-payload-plugin'\n\nimport type {\n ChainStakeIntent, HashPayload, Transfer,\n} from '#payload'\nimport {\n ChainStakeIntentSchema, HashSchema, isChainStakeIntent, isHashPayload, isTransfer, TransferSchema,\n} from '#payload'\nimport { isTransactionBoundWitness, type TransactionBoundWitness } from '#transaction'\n\nexport type AllowedBlockPayload = Transfer | ChainStakeIntent | SchemaPayload | TransactionBoundWitness | HashPayload\nexport const AllowedBlockPayloadSchemas: Schema[] = [TransferSchema, ChainStakeIntentSchema, SchemaSchema, BoundWitnessSchema, HashSchema]\nexport type AllowedBlockPayloadSchema = typeof AllowedBlockPayloadSchemas[number]\n\nexport const isAllowedBlockPayloadSchema = (value: unknown): value is AllowedBlockPayloadSchema => {\n return isSchema(value) && AllowedBlockPayloadSchemas.includes(value)\n}\n\nexport const isAllowedBlockPayload = (value: unknown): value is AllowedBlockPayload => {\n return isTransfer(value) || isChainStakeIntent(value) || isSchemaPayload(value) || isTransactionBoundWitness(value) || isHashPayload(value)\n}\n\nexport const isAllowedBlockPayloadWithHashStorageMeta = (value: unknown): value is WithStorageMeta<AllowedBlockPayload> => {\n return isAllowedBlockPayload(value) && isHashStorageMeta(value)\n}\n","import { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '#fields'\n\nimport type { FromFields } from './Executable.ts'\n\nexport const ChainStakeIntentSchema = 'network.xyo.chain.stake.intent' as const\nexport type ChainStakeIntentSchema = typeof ChainStakeIntentSchema\n\nexport type Intent = 'producer' // | 'bank'\n\nexport interface ChainStakeIntentFields extends BlockDuration, FromFields {\n /*\n * The intent of the staking\n */\n intent: Intent\n}\n\nexport type ChainStakeIntent = Payload<ChainStakeIntentFields, ChainStakeIntentSchema>\n\nexport const isChainStakeIntent = (x?: unknown | null): x is ChainStakeIntent => {\n return isPayloadOfSchemaType<ChainStakeIntent>(ChainStakeIntentSchema)(x)\n && asNonNegativeInteger(x.nbf) !== undefined\n && asNonNegativeInteger(x.exp) !== undefined\n}\nexport const asChainStakeIntent = AsObjectFactory.create(isChainStakeIntent)\nexport const asOptionalChainStakeIntent = AsObjectFactory.createOptional(isChainStakeIntent)\n\nconst asNonNegativeInteger = (num: number) => {\n return (Number.isInteger(num) && num >= 0) ? num : undefined\n}\n","import type { Address } from '@xylabs/hex'\nimport type { EmptyObject } from '@xylabs/object'\nimport { isAnyPayload } from '@xyo-network/payload-model'\n\nexport interface FromFields {\n // the address that is treated as the source of this action\n from: Address\n}\n\nexport const hasFrom = (value: unknown): value is FromFields => {\n return (value as FromFields).from !== undefined\n}\n\nexport interface ExecutableFields {\n script: string[]\n}\n\nexport type Executable<T extends EmptyObject = EmptyObject> = T & ExecutableFields\nexport type OptionalExecutable<T extends EmptyObject = EmptyObject> = T & Partial<ExecutableFields>\n\nexport const isExecutable = <T extends EmptyObject>(value: T | undefined): value is Executable<T> => {\n return isAnyPayload(value) && Array.isArray((value as unknown as ExecutableFields).script)\n}\n\nexport const asExecutable = <T extends EmptyObject>(value: T | undefined): Executable<T> | undefined => {\n return isExecutable(value)\n ? value as unknown as Executable<T>\n : undefined\n}\n","import type { Hash } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const HashSchema = 'network.xyo.hash' as const\nexport type HashSchema = typeof HashSchema\n\nexport interface HashFields {\n hash: Hash\n}\n\nexport type HashPayload = Payload<HashFields, HashSchema>\n\nexport const isHashPayload = isPayloadOfSchemaType<HashPayload>(HashSchema)\n\nexport const asHashPayload = AsObjectFactory.create(isHashPayload)\nexport const asHashPayloadWithStorageMeta = AsObjectFactory.create(isHashPayload)\nexport const asOptionalHashPayload = AsObjectFactory.createOptional(isHashPayload)\n","import type {\n Address,\n Hex,\n} from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { FromFields } from './Executable.ts'\n\nexport const TransferSchema = 'network.xyo.transfer' as const\nexport type TransferSchema = typeof TransferSchema\n\nexport interface TransferFields extends FromFields {\n epoch: number\n // the amount that is being sent to another address\n transfers: Record<Address, Hex>\n}\n\n// if this payload is included in a boundwitness, it needs to be available for inspection to be included in block\nexport type Transfer = Payload<TransferFields, TransferSchema>\n\nexport const isTransfer = isPayloadOfSchemaType<Transfer>(TransferSchema)\n\nexport const asTransfer = AsObjectFactory.create(isTransfer)\nexport const asOptionalTransfer = AsObjectFactory.createOptional(isTransfer)\n","import type { Address } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness, Signed } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '#fields'\nimport type { FromFields, OptionalExecutable } from '#payload'\n\nimport type { TransactionFeesFields } from './TransactionFeesFields.ts'\n\nexport interface TransactionBoundWitnessFields extends BlockDuration, TransactionFeesFields {\n chain: Address\n}\n\nexport type TransactionBoundWitness = BoundWitness<TransactionBoundWitnessFields & OptionalExecutable & FromFields>\n\nexport const isTransactionBoundWitness = (value: unknown): value is TransactionBoundWitness => {\n const typedObj = value as TransactionBoundWitness\n return isBoundWitness(value)\n && typedObj.chain !== undefined\n && typedObj.fees !== undefined\n && typedObj.exp !== undefined\n && typedObj.nbf !== undefined\n}\n\nexport const isSignedTransactionBoundWitness = (value: unknown): value is Signed<TransactionBoundWitness> => {\n return isTransactionBoundWitness(value) && isSigned(value)\n}\n\nexport const isSigned = <T extends BoundWitness = BoundWitness>(value: unknown): value is Signed<T> =>\n isBoundWitness(value)\n && value.$signatures.length === value.addresses.length\n && value.addresses.length > 0\n\nexport const isTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<TransactionBoundWitness> =>\n isTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const isSignedTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<Signed<TransactionBoundWitness>> =>\n isSignedTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const asTransactionBoundWitness = AsObjectFactory.create(isTransactionBoundWitness)\nexport const asOptionalTransactionBoundWitness = AsObjectFactory.createOptional(isTransactionBoundWitness)\n\nexport const asTransactionBoundWitnessWithStorageMeta = AsObjectFactory.create(isTransactionBoundWitnessWithStorageMeta)\nexport const asOptionalTransactionBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isTransactionBoundWitnessWithStorageMeta)\n","import type { Hex } from '@xylabs/hex'\n\nimport { MicroXL1 } from '../XL1.ts'\n\nexport interface TransactionFeesBigInt {\n base: MicroXL1\n gasLimit: MicroXL1\n gasPrice: MicroXL1\n priority: MicroXL1\n}\n\nexport type TransactionFeesHex = {\n [K in keyof TransactionFeesBigInt]: Hex;\n}\n\nexport interface TransactionFeesFields {\n fees: TransactionFeesHex\n}\n\nexport const minTransactionFees: TransactionFeesBigInt = {\n base: MicroXL1(1000n), gasPrice: MicroXL1(1n), gasLimit: MicroXL1(1000n), priority: MicroXL1(0n),\n} as const\n\nexport const defaultTransactionFees: TransactionFeesBigInt = {\n base: minTransactionFees.base, gasPrice: MicroXL1(10n), gasLimit: MicroXL1(1_000_000n), priority: MicroXL1(0n),\n} as const\n","import type { Hash, Hex } from '@xylabs/hex'\nimport { isHex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface BlockBoundWitnessMeta {\n $epoch: number\n}\n\nexport interface BlockBoundWitnessFields {\n /** Block number */\n block: number\n /** Chain id - this should be \"0\" for the genesis block */\n chain: Hex\n /** Previous block hash if not block 0 */\n previous: Hash | null /* the previous block hash */\n /** Version of the protocol being used major * 1,000,000 + minor * 1,000 + patch */\n protocol: number\n /** Step hashes */\n step_hashes: Hex[]\n}\n\nexport type BlockBoundWitness = BoundWitness<BlockBoundWitnessFields & BlockBoundWitnessMeta>\n\nexport const isBlockBoundWitness = (value: unknown): value is BlockBoundWitness => {\n const typedObj = value as BlockBoundWitness\n return isBoundWitness(value)\n && Number.isInteger(typedObj.block)\n && isHex(typedObj.chain)\n}\n\nexport const isBlockBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<BlockBoundWitness> => {\n return isBlockBoundWitness(value) && isStorageMeta(value)\n}\n\nexport const asBlockBoundWitness = AsObjectFactory.create(isBlockBoundWitness)\nexport const asOptionalBlockBoundWitness = AsObjectFactory.createOptional(isBlockBoundWitness)\n\nexport const asBlockBoundWitnessWithStorageMeta = AsObjectFactory.create(isBlockBoundWitnessWithStorageMeta)\nexport const asOptionalBlockBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isBlockBoundWitnessWithStorageMeta)\n","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956] as const\n","import { MicroXL1 } from '../XL1.ts'\n\nexport const TransactionGasCosts = {\n /**\n * The cost of storing each character that is added to the chain\n * This includes the transaction JSON and all the elevated payloads' JSON\n */\n characterStorage: MicroXL1(10n),\n\n /** The cost of static validating every payload that will be included in the chain */\n payloadValidation: MicroXL1(1000n),\n\n /** The cost of validating each signature that will be included in the chain */\n signatureValidation: MicroXL1(1000n),\n\n /** The cost of validating each hash that will be included in the chain */\n hashValidation: MicroXL1(100n),\n\n /** The cost of validating a balance state, triggered by a Transfer payload or gas collection */\n balanceValidation: MicroXL1(100n),\n} as const\n\n/** Gas Calculation\n *\n * 1 Million microXL1 (mXL1) = 1 XL1\n *\n * Gas amount is calculated as follows:\n *\n * 1. Each byte in the transaction cost 10 gas\n * 2. Each payload validation in the transaction costs 1000 gas\n * 3. Each signature verification in the transaction costs 1000 gas\n * 4. Each hash validation in the transaction costs 100 gas\n * 5. Each balance validation in the transaction costs 100 gas\n * 6. Processing/Compute/Storage Cost?\n * 7. operation Costs?\n *\n * The total gas cost is calculated by multiplying the gas amount by the gas price.\n *\n * minGasPrice is initially set to 100 mXL1\n * minBase is initially set to 1000 mXL1\n * minPriority is always 0 mXL1, but can be set to increase the priority of the transaction\n *\n */\n","import type { Hex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithSources } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/payload-model'\n\nexport const BlockNumberSchema = 'network.xyo.chain.block.number' as const\nexport type BlockNumberSchema = typeof BlockNumberSchema\n\nexport interface BlockNumberFields {\n /**\n * The block number\n */\n block: Hex\n /**\n * The chain id\n */\n chain?: Hex\n}\n/**\n * The number of a block\n */\nexport type BlockNumber = Payload<BlockNumberFields, BlockNumberSchema>\n\n/**\n * Identity function for determining if an object is a BlockNumber\n */\nexport const isBlockNumber = isPayloadOfSchemaType<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumber = AsObjectFactory.create<BlockNumber>(isBlockNumber)\nexport const asOptionalBlockNumber = AsObjectFactory.createOptional<BlockNumber>(isBlockNumber)\n\n/**\n * Identity function for determining if an object is a BlockNumber with sources\n */\nexport const isBlockNumberWithSources = isPayloadOfSchemaTypeWithSources<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumberWithSources = AsObjectFactory.create<WithSources<BlockNumber>>(isBlockNumberWithSources)\nexport const asOptionalBlockNumberWithSources = AsObjectFactory.createOptional<WithSources<BlockNumber>>(isBlockNumberWithSources)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const NetworkStatusSchema = 'network.xyo.chain.status' as const\nexport type NetworkStatusSchema = typeof NetworkStatusSchema\n\nexport type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown'\n\nexport type NetworkStatusUpdate = {\n end: number\n start: number\n update: string\n}\n\nexport interface NetworkStatusFields {\n description: string\n state: NetworkStatusState\n updates?: NetworkStatusUpdate[]\n}\n\nexport type NetworkStatus = Payload<NetworkStatusFields, NetworkStatusSchema>\n\nexport const isNetworkStatus = isPayloadOfSchemaType<NetworkStatus>(NetworkStatusSchema)\n","import type { Address } from '@xylabs/hex'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainIdentificationPayloadSchema = 'network.xyo.chain.identification' as const\nexport type ChainIdentificationPayloadSchema = typeof ChainIdentificationPayloadSchema\n\n/**\n * Identification required to uniquely identify a chain\n */\nexport interface ChainIdentification {\n /** @field the id of the chain */\n id: Address\n}\n\nexport type ChainIdentificationPayload = Payload<ChainIdentification, ChainIdentificationPayloadSchema>\nexport const isChainIdentificationPayload = isPayloadOfSchemaType<ChainIdentificationPayload>(ChainIdentificationPayloadSchema)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainInformationPayloadSchema = 'network.xyo.chain.information' as const\nexport type ChainInformationPayloadSchema = typeof ChainInformationPayloadSchema\n\nimport type { ChainIdentification } from './ChainIdentification.ts'\n\n/**\n * Information required to produce a chain\n */\nexport interface ChainInformation extends ChainIdentification {\n // TODO: Add these fields which are currently promises on the smart contract\n // forkedAtBlockNumber: bigint\n // forkedAtHash: Hash\n // forkedChainId: Address\n}\n\nexport type ChainInformationPayload = Payload<ChainIdentification, ChainInformationPayloadSchema>\nexport const isChainInformationPayload = isPayloadOfSchemaType<ChainInformationPayload>(ChainInformationPayloadSchema)\n","import type { Hash } from '@xylabs/hex'\nimport type { JsonValue } from '@xylabs/object'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface ChainIndexingServiceStateFields<T extends JsonValue = JsonValue> {\n /**\n * The hash of the last block that this service has indexing\n */\n endBlockHash: Hash\n /**\n * The hash of the block that the service started indexing. If undefined, the service is\n * assumed to have started indexing from the genesis block\n */\n startBlockHash?: Hash\n /**\n * The indexed state for the range\n */\n state: T\n}\nexport const ChainIndexingServiceStateSchema = 'network.xyo.chain.indexing.service.state' as const\nexport type ChainIndexingServiceStateSchema = typeof ChainIndexingServiceStateSchema\n\n/**\n * The result of a ChainIndexingServiceState\n */\nexport type ChainIndexingServiceState<T extends JsonValue = JsonValue> = Payload<ChainIndexingServiceStateFields<T>, ChainIndexingServiceStateSchema>\n\n/**\n * Identity functions for determining if an object is an ChainIndexingServiceState\n */\nexport const isChainIndexingServiceState = <T extends JsonValue = JsonValue>(payload?: unknown): payload is ChainIndexingServiceState<T> => {\n return isPayloadOfSchemaType<ChainIndexingServiceState<T>>(ChainIndexingServiceStateSchema)(payload)\n}\nexport const asChainIndexingServiceState = AsObjectFactory.create<ChainIndexingServiceState<JsonValue>>(isChainIndexingServiceState)\n\nexport const isChainIndexingServiceStateWithStorageMeta\n= <T extends JsonValue = JsonValue>(value: unknown): value is WithStorageMeta<ChainIndexingServiceState<T>> =>\n isChainIndexingServiceState<T>(value) && isStorageMeta(value)\n\nexport const asChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.create<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n\nexport const asOptionalChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.createOptional<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n"],"mappings":";AAGO,IAAM,MAAM,CAAC,UAAuB;AACpC,IAAM,WAAW,CAAC,UAA4B;AAE9C,IAAM,YAAY,CAAC,UAAyB;AACjD,SAAO,IAAI,OAAO,KAAK,IAAI,OAAO,GAAS,CAAC;AAC9C;AAEO,IAAM,cAAc,CAAC,UAAyB;AACnD,SAAO,SAAS,OAAO,KAAK,IAAI,OAAO,GAAS,CAAC;AACnD;;;ACZA,SAAS,0BAA0B;AAEnC,SAAS,mBAAmB,gBAAgB;AAE5C,SAAS,iBAAiB,oBAAoB;;;ACJ9C,SAAS,uBAAuB;AAEhC,SAAS,6BAA6B;AAM/B,IAAM,yBAAyB;AAc/B,IAAM,qBAAqB,CAAC,MAA8C;AAC/E,SAAO,sBAAwC,sBAAsB,EAAE,CAAC,KACnE,qBAAqB,EAAE,GAAG,MAAM,UAChC,qBAAqB,EAAE,GAAG,MAAM;AACvC;AACO,IAAM,qBAAqB,gBAAgB,OAAO,kBAAkB;AACpE,IAAM,6BAA6B,gBAAgB,eAAe,kBAAkB;AAE3F,IAAM,uBAAuB,CAAC,QAAgB;AAC5C,SAAQ,OAAO,UAAU,GAAG,KAAK,OAAO,IAAK,MAAM;AACrD;;;AC9BA,SAAS,oBAAoB;AAOtB,IAAM,UAAU,CAAC,UAAwC;AAC9D,SAAQ,MAAqB,SAAS;AAC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A+B,EAAE,OAAO;AACrG;AACO,IAAM,8BAA8BD,iBAAgB,OAA6C,2BAA2B;AAE5H,IAAM,6CACX,CAAkC,UAClC,4BAA+B,KAAK,KAAKE,eAAc,KAAK;AAEvD,IAAM,6CACXF,iBAAgB,OAAmD,0CAA0C;AAExG,IAAM,qDACXA,iBAAgB,eAA2D,0CAA0C;","names":["AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isBoundWitness","isStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta"]}
1
+ {"version":3,"sources":["../../src/block/AllowedBlockPayload.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/transaction/TransactionBoundWitness.ts","../../src/XL1.ts","../../src/transaction/TransactionFeesFields.ts","../../src/block/BlockBoundWitness.ts","../../src/constants/StepSizes.ts","../../src/constants/TransactionGasCosts.ts","../../src/fields/BlockNumber.ts","../../src/network/Status.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport type { Schema, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isHashStorageMeta, isSchema } from '@xyo-network/payload-model'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { isSchemaPayload, SchemaSchema } from '@xyo-network/schema-payload-plugin'\n\nimport type {\n ChainStakeIntent, HashPayload, Transfer,\n} from '../payload/index.ts'\nimport {\n ChainStakeIntentSchema, HashSchema, isChainStakeIntent, isHashPayload, isTransfer, TransferSchema,\n} from '../payload/index.ts'\nimport { isTransactionBoundWitness, type TransactionBoundWitness } from '../transaction/index.ts'\n\nexport type AllowedBlockPayload = Transfer | ChainStakeIntent | SchemaPayload | TransactionBoundWitness | HashPayload\nexport const AllowedBlockPayloadSchemas: Schema[] = [TransferSchema, ChainStakeIntentSchema, SchemaSchema, BoundWitnessSchema, HashSchema]\nexport type AllowedBlockPayloadSchema = typeof AllowedBlockPayloadSchemas[number]\n\nexport const isAllowedBlockPayloadSchema = (value: unknown): value is AllowedBlockPayloadSchema => {\n return isSchema(value) && AllowedBlockPayloadSchemas.includes(value)\n}\n\nexport const isAllowedBlockPayload = (value: unknown): value is AllowedBlockPayload => {\n return isTransfer(value) || isChainStakeIntent(value) || isSchemaPayload(value) || isTransactionBoundWitness(value) || isHashPayload(value)\n}\n\nexport const isAllowedBlockPayloadWithHashStorageMeta = (value: unknown): value is WithStorageMeta<AllowedBlockPayload> => {\n return isAllowedBlockPayload(value) && isHashStorageMeta(value)\n}\n","import { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../../fields/index.ts'\nimport type { FromFields } from './Executable.ts'\n\nexport const ChainStakeIntentSchema = 'network.xyo.chain.stake.intent' as const\nexport type ChainStakeIntentSchema = typeof ChainStakeIntentSchema\n\nexport type Intent = 'producer' // | 'bank'\n\nexport interface ChainStakeIntentFields extends BlockDuration, FromFields {\n /*\n * The intent of the staking\n */\n intent: Intent\n}\n\nexport type ChainStakeIntent = Payload<ChainStakeIntentFields, ChainStakeIntentSchema>\n\nexport const isChainStakeIntent = (x?: unknown | null): x is ChainStakeIntent => {\n return isPayloadOfSchemaType<ChainStakeIntent>(ChainStakeIntentSchema)(x)\n && asNonNegativeInteger(x.nbf) !== undefined\n && asNonNegativeInteger(x.exp) !== undefined\n}\nexport const asChainStakeIntent = AsObjectFactory.create(isChainStakeIntent)\nexport const asOptionalChainStakeIntent = AsObjectFactory.createOptional(isChainStakeIntent)\n\nconst asNonNegativeInteger = (num: number) => {\n return (Number.isInteger(num) && num >= 0) ? num : undefined\n}\n","import type { Address } from '@xylabs/hex'\nimport type { EmptyObject } from '@xylabs/object'\nimport { isAnyPayload } from '@xyo-network/payload-model'\n\nexport interface FromFields {\n // the address that is treated as the source of this action\n from: Address\n}\n\nexport const hasFrom = (value: unknown): value is FromFields => {\n return (value as FromFields).from !== undefined\n}\n\nexport interface ExecutableFields {\n script: string[]\n}\n\nexport type Executable<T extends EmptyObject = EmptyObject> = T & ExecutableFields\nexport type OptionalExecutable<T extends EmptyObject = EmptyObject> = T & Partial<ExecutableFields>\n\nexport const isExecutable = <T extends EmptyObject>(value: T | undefined): value is Executable<T> => {\n return isAnyPayload(value) && Array.isArray((value as unknown as ExecutableFields).script)\n}\n\nexport const asExecutable = <T extends EmptyObject>(value: T | undefined): Executable<T> | undefined => {\n return isExecutable(value)\n ? value as unknown as Executable<T>\n : undefined\n}\n","import type { Hash } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const HashSchema = 'network.xyo.hash' as const\nexport type HashSchema = typeof HashSchema\n\nexport interface HashFields {\n hash: Hash\n}\n\nexport type HashPayload = Payload<HashFields, HashSchema>\n\nexport const isHashPayload = isPayloadOfSchemaType<HashPayload>(HashSchema)\n\nexport const asHashPayload = AsObjectFactory.create(isHashPayload)\nexport const asHashPayloadWithStorageMeta = AsObjectFactory.create(isHashPayload)\nexport const asOptionalHashPayload = AsObjectFactory.createOptional(isHashPayload)\n","import type {\n Address,\n Hex,\n} from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { FromFields } from './Executable.ts'\n\nexport const TransferSchema = 'network.xyo.transfer' as const\nexport type TransferSchema = typeof TransferSchema\n\nexport interface TransferFields extends FromFields {\n epoch: number\n // the amount that is being sent to another address\n transfers: Record<Address, Hex>\n}\n\n// if this payload is included in a boundwitness, it needs to be available for inspection to be included in block\nexport type Transfer = Payload<TransferFields, TransferSchema>\n\nexport const isTransfer = isPayloadOfSchemaType<Transfer>(TransferSchema)\n\nexport const asTransfer = AsObjectFactory.create(isTransfer)\nexport const asOptionalTransfer = AsObjectFactory.createOptional(isTransfer)\n","import type { Address } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness, Signed } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../fields/index.ts'\nimport type { FromFields, OptionalExecutable } from '../payload/index.ts'\nimport type { TransactionFeesFields } from './TransactionFeesFields.ts'\n\nexport interface TransactionBoundWitnessFields extends BlockDuration, TransactionFeesFields {\n chain: Address\n}\n\nexport type TransactionBoundWitness = BoundWitness<TransactionBoundWitnessFields & OptionalExecutable & FromFields>\n\nexport const isTransactionBoundWitness = (value: unknown): value is TransactionBoundWitness => {\n const typedObj = value as TransactionBoundWitness\n return isBoundWitness(value)\n && typedObj.chain !== undefined\n && typedObj.fees !== undefined\n && typedObj.exp !== undefined\n && typedObj.nbf !== undefined\n}\n\nexport const isSignedTransactionBoundWitness = (value: unknown): value is Signed<TransactionBoundWitness> => {\n return isTransactionBoundWitness(value) && isSigned(value)\n}\n\nexport const isSigned = <T extends BoundWitness = BoundWitness>(value: unknown): value is Signed<T> =>\n isBoundWitness(value)\n && value.$signatures.length === value.addresses.length\n && value.addresses.length > 0\n\nexport const isTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<TransactionBoundWitness> =>\n isTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const isSignedTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<Signed<TransactionBoundWitness>> =>\n isSignedTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const asTransactionBoundWitness = AsObjectFactory.create(isTransactionBoundWitness)\nexport const asOptionalTransactionBoundWitness = AsObjectFactory.createOptional(isTransactionBoundWitness)\n\nexport const asTransactionBoundWitnessWithStorageMeta = AsObjectFactory.create(isTransactionBoundWitnessWithStorageMeta)\nexport const asOptionalTransactionBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isTransactionBoundWitnessWithStorageMeta)\n","export type XL1 = bigint & { readonly _tag: 'XL1' } // 1e-18\nexport type MicroXL1 = bigint & { readonly _tag: 'MicroXL1' } // 1e-12\n\nexport const XL1 = (value: bigint): XL1 => value as XL1\nexport const MicroXL1 = (value: bigint): MicroXL1 => value as MicroXL1\n\nexport const mXL1ToXL1 = (value: MicroXL1): XL1 => {\n return XL1(BigInt(value) / BigInt(1_000_000))\n}\n\nexport const mXL1FromXL1 = (value: XL1): MicroXL1 => {\n return MicroXL1(BigInt(value) * BigInt(1_000_000))\n}\n","import type { Hex } from '@xylabs/hex'\n\nimport { MicroXL1 } from '../XL1.ts'\n\nexport interface TransactionFeesBigInt {\n base: MicroXL1\n gasLimit: MicroXL1\n gasPrice: MicroXL1\n priority: MicroXL1\n}\n\nexport type TransactionFeesHex = {\n [K in keyof TransactionFeesBigInt]: Hex;\n}\n\nexport interface TransactionFeesFields {\n fees: TransactionFeesHex\n}\n\nexport const minTransactionFees: TransactionFeesBigInt = {\n base: MicroXL1(1000n), gasPrice: MicroXL1(1n), gasLimit: MicroXL1(1000n), priority: MicroXL1(0n),\n} as const\n\nexport const defaultTransactionFees: TransactionFeesBigInt = {\n base: minTransactionFees.base, gasPrice: MicroXL1(10n), gasLimit: MicroXL1(1_000_000n), priority: MicroXL1(0n),\n} as const\n","import type { Hash, Hex } from '@xylabs/hex'\nimport { isHex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface BlockBoundWitnessMeta {\n $epoch: number\n}\n\nexport interface BlockBoundWitnessFields {\n /** Block number */\n block: number\n /** Chain id - this should be \"0\" for the genesis block */\n chain: Hex\n /** Previous block hash if not block 0 */\n previous: Hash | null /* the previous block hash */\n /** Version of the protocol being used major * 1,000,000 + minor * 1,000 + patch */\n protocol: number\n /** Step hashes */\n step_hashes: Hex[]\n}\n\nexport type BlockBoundWitness = BoundWitness<BlockBoundWitnessFields & BlockBoundWitnessMeta>\n\nexport const isBlockBoundWitness = (value: unknown): value is BlockBoundWitness => {\n const typedObj = value as BlockBoundWitness\n return isBoundWitness(value)\n && Number.isInteger(typedObj.block)\n && isHex(typedObj.chain)\n}\n\nexport const isBlockBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<BlockBoundWitness> => {\n return isBlockBoundWitness(value) && isStorageMeta(value)\n}\n\nexport const asBlockBoundWitness = AsObjectFactory.create(isBlockBoundWitness)\nexport const asOptionalBlockBoundWitness = AsObjectFactory.createOptional(isBlockBoundWitness)\n\nexport const asBlockBoundWitnessWithStorageMeta = AsObjectFactory.create(isBlockBoundWitnessWithStorageMeta)\nexport const asOptionalBlockBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isBlockBoundWitnessWithStorageMeta)\n","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956] as const\n","import { MicroXL1 } from '../XL1.ts'\n\nexport const TransactionGasCosts = {\n /**\n * The cost of storing each character that is added to the chain\n * This includes the transaction JSON and all the elevated payloads' JSON\n */\n characterStorage: MicroXL1(10n),\n\n /** The cost of static validating every payload that will be included in the chain */\n payloadValidation: MicroXL1(1000n),\n\n /** The cost of validating each signature that will be included in the chain */\n signatureValidation: MicroXL1(1000n),\n\n /** The cost of validating each hash that will be included in the chain */\n hashValidation: MicroXL1(100n),\n\n /** The cost of validating a balance state, triggered by a Transfer payload or gas collection */\n balanceValidation: MicroXL1(100n),\n} as const\n\n/** Gas Calculation\n *\n * 1 Million microXL1 (mXL1) = 1 XL1\n *\n * Gas amount is calculated as follows:\n *\n * 1. Each byte in the transaction cost 10 gas\n * 2. Each payload validation in the transaction costs 1000 gas\n * 3. Each signature verification in the transaction costs 1000 gas\n * 4. Each hash validation in the transaction costs 100 gas\n * 5. Each balance validation in the transaction costs 100 gas\n * 6. Processing/Compute/Storage Cost?\n * 7. operation Costs?\n *\n * The total gas cost is calculated by multiplying the gas amount by the gas price.\n *\n * minGasPrice is initially set to 100 mXL1\n * minBase is initially set to 1000 mXL1\n * minPriority is always 0 mXL1, but can be set to increase the priority of the transaction\n *\n */\n","import type { Hex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithSources } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/payload-model'\n\nexport const BlockNumberSchema = 'network.xyo.chain.block.number' as const\nexport type BlockNumberSchema = typeof BlockNumberSchema\n\nexport interface BlockNumberFields {\n /**\n * The block number\n */\n block: Hex\n /**\n * The chain id\n */\n chain?: Hex\n}\n/**\n * The number of a block\n */\nexport type BlockNumber = Payload<BlockNumberFields, BlockNumberSchema>\n\n/**\n * Identity function for determining if an object is a BlockNumber\n */\nexport const isBlockNumber = isPayloadOfSchemaType<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumber = AsObjectFactory.create<BlockNumber>(isBlockNumber)\nexport const asOptionalBlockNumber = AsObjectFactory.createOptional<BlockNumber>(isBlockNumber)\n\n/**\n * Identity function for determining if an object is a BlockNumber with sources\n */\nexport const isBlockNumberWithSources = isPayloadOfSchemaTypeWithSources<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumberWithSources = AsObjectFactory.create<WithSources<BlockNumber>>(isBlockNumberWithSources)\nexport const asOptionalBlockNumberWithSources = AsObjectFactory.createOptional<WithSources<BlockNumber>>(isBlockNumberWithSources)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const NetworkStatusSchema = 'network.xyo.chain.status' as const\nexport type NetworkStatusSchema = typeof NetworkStatusSchema\n\nexport type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown'\n\nexport type NetworkStatusUpdate = {\n end: number\n start: number\n update: string\n}\n\nexport interface NetworkStatusFields {\n description: string\n state: NetworkStatusState\n updates?: NetworkStatusUpdate[]\n}\n\nexport type NetworkStatus = Payload<NetworkStatusFields, NetworkStatusSchema>\n\nexport const isNetworkStatus = isPayloadOfSchemaType<NetworkStatus>(NetworkStatusSchema)\n","import type { Address } from '@xylabs/hex'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainIdentificationPayloadSchema = 'network.xyo.chain.identification' as const\nexport type ChainIdentificationPayloadSchema = typeof ChainIdentificationPayloadSchema\n\n/**\n * Identification required to uniquely identify a chain\n */\nexport interface ChainIdentification {\n /** @field the id of the chain */\n id: Address\n}\n\nexport type ChainIdentificationPayload = Payload<ChainIdentification, ChainIdentificationPayloadSchema>\nexport const isChainIdentificationPayload = isPayloadOfSchemaType<ChainIdentificationPayload>(ChainIdentificationPayloadSchema)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainInformationPayloadSchema = 'network.xyo.chain.information' as const\nexport type ChainInformationPayloadSchema = typeof ChainInformationPayloadSchema\n\nimport type { ChainIdentification } from './ChainIdentification.ts'\n\n/**\n * Information required to produce a chain\n */\nexport interface ChainInformation extends ChainIdentification {\n // TODO: Add these fields which are currently promises on the smart contract\n // forkedAtBlockNumber: bigint\n // forkedAtHash: Hash\n // forkedChainId: Address\n}\n\nexport type ChainInformationPayload = Payload<ChainIdentification, ChainInformationPayloadSchema>\nexport const isChainInformationPayload = isPayloadOfSchemaType<ChainInformationPayload>(ChainInformationPayloadSchema)\n","import type { Hash } from '@xylabs/hex'\nimport type { JsonValue } from '@xylabs/object'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface ChainIndexingServiceStateFields<T extends JsonValue = JsonValue> {\n /**\n * The hash of the last block that this service has indexing\n */\n endBlockHash: Hash\n /**\n * The hash of the block that the service started indexing. If undefined, the service is\n * assumed to have started indexing from the genesis block\n */\n startBlockHash?: Hash\n /**\n * The indexed state for the range\n */\n state: T\n}\nexport const ChainIndexingServiceStateSchema = 'network.xyo.chain.indexing.service.state' as const\nexport type ChainIndexingServiceStateSchema = typeof ChainIndexingServiceStateSchema\n\n/**\n * The result of a ChainIndexingServiceState\n */\nexport type ChainIndexingServiceState<T extends JsonValue = JsonValue> = Payload<ChainIndexingServiceStateFields<T>, ChainIndexingServiceStateSchema>\n\n/**\n * Identity functions for determining if an object is an ChainIndexingServiceState\n */\nexport const isChainIndexingServiceState = <T extends JsonValue = JsonValue>(payload?: unknown): payload is ChainIndexingServiceState<T> => {\n return isPayloadOfSchemaType<ChainIndexingServiceState<T>>(ChainIndexingServiceStateSchema)(payload)\n}\nexport const asChainIndexingServiceState = AsObjectFactory.create<ChainIndexingServiceState<JsonValue>>(isChainIndexingServiceState)\n\nexport const isChainIndexingServiceStateWithStorageMeta\n= <T extends JsonValue = JsonValue>(value: unknown): value is WithStorageMeta<ChainIndexingServiceState<T>> =>\n isChainIndexingServiceState<T>(value) && isStorageMeta(value)\n\nexport const asChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.create<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n\nexport const asOptionalChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.createOptional<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n"],"mappings":";AAAA,SAAS,0BAA0B;AAEnC,SAAS,m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B;AAEhC;AAAA,EACE,yBAAAC;AAAA,EACA;AAAA,OACK;AAEA,IAAM,oBAAoB;AAqB1B,IAAM,gBAAgBA,uBAAmC,iBAAiB;AAC1E,IAAM,gBAAgBD,iBAAgB,OAAoB,aAAa;AACvE,IAAM,wBAAwBA,iBAAgB,eAA4B,aAAa;AAKvF,IAAM,2BAA2B,iCAA8C,iBAAiB;AAChG,IAAM,2BAA2BA,iBAAgB,OAAiC,wBAAwB;AAC1G,IAAM,mCAAmCA,iBAAgB,eAAyC,wBAAwB;;;ACrCjI,SAAS,yBAAAE,8BAA6B;AAE/B,IAAM,sBAAsB;AAmB5B,IAAM,kBAAkBA,uBAAqC,mBAAmB;;;ACpBvF,SAAS,yBAAAC,8BAA6B;AAE/B,IAAM,mCAAmC;AAYzC,IAAM,+BAA+BA,uBAAkD,gCAAgC;;;ACf9H,SAAS,yBAAAC,8BAA6B;AAE/B,IAAM,gCAAgC;AAgBtC,IAAM,4BAA4BA,uBAA+C,6BAA6B;;;ACjBrH,SAAS,mBAAAC,wBAAuB;AAEhC,SAAS,yBAAAC,wBAAuB,iBAAAC,sBAAqB;AAiB9C,IAAM,kCAAkC;AAWxC,IAAM,8BAA8B,CAAkC,YAA+D;AAC1I,SAAOD,uBAAoD,+BAA+B,EAAE,OAAO;AACrG;AACO,IAAM,8BAA8BD,iBAAgB,OAA6C,2BAA2B;AAE5H,IAAM,6CACX,CAAkC,UAClC,4BAA+B,KAAK,KAAKE,eAAc,KAAK;AAEvD,IAAM,6CACXF,iBAAgB,OAAmD,0CAA0C;AAExG,IAAM,qDACXA,iBAAgB,eAA2D,0CAA0C;","names":["AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isBoundWitness","isStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta"]}
@@ -1,13 +1,3 @@
1
- // src/XL1.ts
2
- var XL1 = (value) => value;
3
- var MicroXL1 = (value) => value;
4
- var mXL1ToXL1 = (value) => {
5
- return XL1(BigInt(value) / BigInt(1e6));
6
- };
7
- var mXL1FromXL1 = (value) => {
8
- return MicroXL1(BigInt(value) * BigInt(1e6));
9
- };
10
-
11
1
  // src/block/AllowedBlockPayload.ts
12
2
  import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
13
3
  import { isHashStorageMeta, isSchema } from "@xyo-network/payload-model";
@@ -74,6 +64,16 @@ var asOptionalTransactionBoundWitness = AsObjectFactory4.createOptional(isTransa
74
64
  var asTransactionBoundWitnessWithStorageMeta = AsObjectFactory4.create(isTransactionBoundWitnessWithStorageMeta);
75
65
  var asOptionalTransactionBoundWitnessWithStorageMeta = AsObjectFactory4.createOptional(isTransactionBoundWitnessWithStorageMeta);
76
66
 
67
+ // src/XL1.ts
68
+ var XL1 = (value) => value;
69
+ var MicroXL1 = (value) => value;
70
+ var mXL1ToXL1 = (value) => {
71
+ return XL1(BigInt(value) / BigInt(1e6));
72
+ };
73
+ var mXL1FromXL1 = (value) => {
74
+ return MicroXL1(BigInt(value) * BigInt(1e6));
75
+ };
76
+
77
77
  // src/transaction/TransactionFeesFields.ts
78
78
  var minTransactionFees = {
79
79
  base: MicroXL1(1000n),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/XL1.ts","../../src/block/AllowedBlockPayload.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/transaction/TransactionBoundWitness.ts","../../src/transaction/TransactionFeesFields.ts","../../src/block/BlockBoundWitness.ts","../../src/constants/StepSizes.ts","../../src/constants/TransactionGasCosts.ts","../../src/fields/BlockNumber.ts","../../src/network/Status.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["export type XL1 = bigint & { readonly _tag: 'XL1' } // 1e-18\nexport type MicroXL1 = bigint & { readonly _tag: 'MicroXL1' } // 1e-12\n\nexport const XL1 = (value: bigint): XL1 => value as XL1\nexport const MicroXL1 = (value: bigint): MicroXL1 => value as MicroXL1\n\nexport const mXL1ToXL1 = (value: MicroXL1): XL1 => {\n return XL1(BigInt(value) / BigInt(1_000_000))\n}\n\nexport const mXL1FromXL1 = (value: XL1): MicroXL1 => {\n return MicroXL1(BigInt(value) * BigInt(1_000_000))\n}\n","import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport type { Schema, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isHashStorageMeta, isSchema } from '@xyo-network/payload-model'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { isSchemaPayload, SchemaSchema } from '@xyo-network/schema-payload-plugin'\n\nimport type {\n ChainStakeIntent, HashPayload, Transfer,\n} from '#payload'\nimport {\n ChainStakeIntentSchema, HashSchema, isChainStakeIntent, isHashPayload, isTransfer, TransferSchema,\n} from '#payload'\nimport { isTransactionBoundWitness, type TransactionBoundWitness } from '#transaction'\n\nexport type AllowedBlockPayload = Transfer | ChainStakeIntent | SchemaPayload | TransactionBoundWitness | HashPayload\nexport const AllowedBlockPayloadSchemas: Schema[] = [TransferSchema, ChainStakeIntentSchema, SchemaSchema, BoundWitnessSchema, HashSchema]\nexport type AllowedBlockPayloadSchema = typeof AllowedBlockPayloadSchemas[number]\n\nexport const isAllowedBlockPayloadSchema = (value: unknown): value is AllowedBlockPayloadSchema => {\n return isSchema(value) && AllowedBlockPayloadSchemas.includes(value)\n}\n\nexport const isAllowedBlockPayload = (value: unknown): value is AllowedBlockPayload => {\n return isTransfer(value) || isChainStakeIntent(value) || isSchemaPayload(value) || isTransactionBoundWitness(value) || isHashPayload(value)\n}\n\nexport const isAllowedBlockPayloadWithHashStorageMeta = (value: unknown): value is WithStorageMeta<AllowedBlockPayload> => {\n return isAllowedBlockPayload(value) && isHashStorageMeta(value)\n}\n","import { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '#fields'\n\nimport type { FromFields } from './Executable.ts'\n\nexport const ChainStakeIntentSchema = 'network.xyo.chain.stake.intent' as const\nexport type ChainStakeIntentSchema = typeof ChainStakeIntentSchema\n\nexport type Intent = 'producer' // | 'bank'\n\nexport interface ChainStakeIntentFields extends BlockDuration, FromFields {\n /*\n * The intent of the staking\n */\n intent: Intent\n}\n\nexport type ChainStakeIntent = Payload<ChainStakeIntentFields, ChainStakeIntentSchema>\n\nexport const isChainStakeIntent = (x?: unknown | null): x is ChainStakeIntent => {\n return isPayloadOfSchemaType<ChainStakeIntent>(ChainStakeIntentSchema)(x)\n && asNonNegativeInteger(x.nbf) !== undefined\n && asNonNegativeInteger(x.exp) !== undefined\n}\nexport const asChainStakeIntent = AsObjectFactory.create(isChainStakeIntent)\nexport const asOptionalChainStakeIntent = AsObjectFactory.createOptional(isChainStakeIntent)\n\nconst asNonNegativeInteger = (num: number) => {\n return (Number.isInteger(num) && num >= 0) ? num : undefined\n}\n","import type { Address } from '@xylabs/hex'\nimport type { EmptyObject } from '@xylabs/object'\nimport { isAnyPayload } from '@xyo-network/payload-model'\n\nexport interface FromFields {\n // the address that is treated as the source of this action\n from: Address\n}\n\nexport const hasFrom = (value: unknown): value is FromFields => {\n return (value as FromFields).from !== undefined\n}\n\nexport interface ExecutableFields {\n script: string[]\n}\n\nexport type Executable<T extends EmptyObject = EmptyObject> = T & ExecutableFields\nexport type OptionalExecutable<T extends EmptyObject = EmptyObject> = T & Partial<ExecutableFields>\n\nexport const isExecutable = <T extends EmptyObject>(value: T | undefined): value is Executable<T> => {\n return isAnyPayload(value) && Array.isArray((value as unknown as ExecutableFields).script)\n}\n\nexport const asExecutable = <T extends EmptyObject>(value: T | undefined): Executable<T> | undefined => {\n return isExecutable(value)\n ? value as unknown as Executable<T>\n : undefined\n}\n","import type { Hash } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const HashSchema = 'network.xyo.hash' as const\nexport type HashSchema = typeof HashSchema\n\nexport interface HashFields {\n hash: Hash\n}\n\nexport type HashPayload = Payload<HashFields, HashSchema>\n\nexport const isHashPayload = isPayloadOfSchemaType<HashPayload>(HashSchema)\n\nexport const asHashPayload = AsObjectFactory.create(isHashPayload)\nexport const asHashPayloadWithStorageMeta = AsObjectFactory.create(isHashPayload)\nexport const asOptionalHashPayload = AsObjectFactory.createOptional(isHashPayload)\n","import type {\n Address,\n Hex,\n} from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { FromFields } from './Executable.ts'\n\nexport const TransferSchema = 'network.xyo.transfer' as const\nexport type TransferSchema = typeof TransferSchema\n\nexport interface TransferFields extends FromFields {\n epoch: number\n // the amount that is being sent to another address\n transfers: Record<Address, Hex>\n}\n\n// if this payload is included in a boundwitness, it needs to be available for inspection to be included in block\nexport type Transfer = Payload<TransferFields, TransferSchema>\n\nexport const isTransfer = isPayloadOfSchemaType<Transfer>(TransferSchema)\n\nexport const asTransfer = AsObjectFactory.create(isTransfer)\nexport const asOptionalTransfer = AsObjectFactory.createOptional(isTransfer)\n","import type { Address } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness, Signed } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '#fields'\nimport type { FromFields, OptionalExecutable } from '#payload'\n\nimport type { TransactionFeesFields } from './TransactionFeesFields.ts'\n\nexport interface TransactionBoundWitnessFields extends BlockDuration, TransactionFeesFields {\n chain: Address\n}\n\nexport type TransactionBoundWitness = BoundWitness<TransactionBoundWitnessFields & OptionalExecutable & FromFields>\n\nexport const isTransactionBoundWitness = (value: unknown): value is TransactionBoundWitness => {\n const typedObj = value as TransactionBoundWitness\n return isBoundWitness(value)\n && typedObj.chain !== undefined\n && typedObj.fees !== undefined\n && typedObj.exp !== undefined\n && typedObj.nbf !== undefined\n}\n\nexport const isSignedTransactionBoundWitness = (value: unknown): value is Signed<TransactionBoundWitness> => {\n return isTransactionBoundWitness(value) && isSigned(value)\n}\n\nexport const isSigned = <T extends BoundWitness = BoundWitness>(value: unknown): value is Signed<T> =>\n isBoundWitness(value)\n && value.$signatures.length === value.addresses.length\n && value.addresses.length > 0\n\nexport const isTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<TransactionBoundWitness> =>\n isTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const isSignedTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<Signed<TransactionBoundWitness>> =>\n isSignedTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const asTransactionBoundWitness = AsObjectFactory.create(isTransactionBoundWitness)\nexport const asOptionalTransactionBoundWitness = AsObjectFactory.createOptional(isTransactionBoundWitness)\n\nexport const asTransactionBoundWitnessWithStorageMeta = AsObjectFactory.create(isTransactionBoundWitnessWithStorageMeta)\nexport const asOptionalTransactionBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isTransactionBoundWitnessWithStorageMeta)\n","import type { Hex } from '@xylabs/hex'\n\nimport { MicroXL1 } from '../XL1.ts'\n\nexport interface TransactionFeesBigInt {\n base: MicroXL1\n gasLimit: MicroXL1\n gasPrice: MicroXL1\n priority: MicroXL1\n}\n\nexport type TransactionFeesHex = {\n [K in keyof TransactionFeesBigInt]: Hex;\n}\n\nexport interface TransactionFeesFields {\n fees: TransactionFeesHex\n}\n\nexport const minTransactionFees: TransactionFeesBigInt = {\n base: MicroXL1(1000n), gasPrice: MicroXL1(1n), gasLimit: MicroXL1(1000n), priority: MicroXL1(0n),\n} as const\n\nexport const defaultTransactionFees: TransactionFeesBigInt = {\n base: minTransactionFees.base, gasPrice: MicroXL1(10n), gasLimit: MicroXL1(1_000_000n), priority: MicroXL1(0n),\n} as const\n","import type { Hash, Hex } from '@xylabs/hex'\nimport { isHex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface BlockBoundWitnessMeta {\n $epoch: number\n}\n\nexport interface BlockBoundWitnessFields {\n /** Block number */\n block: number\n /** Chain id - this should be \"0\" for the genesis block */\n chain: Hex\n /** Previous block hash if not block 0 */\n previous: Hash | null /* the previous block hash */\n /** Version of the protocol being used major * 1,000,000 + minor * 1,000 + patch */\n protocol: number\n /** Step hashes */\n step_hashes: Hex[]\n}\n\nexport type BlockBoundWitness = BoundWitness<BlockBoundWitnessFields & BlockBoundWitnessMeta>\n\nexport const isBlockBoundWitness = (value: unknown): value is BlockBoundWitness => {\n const typedObj = value as BlockBoundWitness\n return isBoundWitness(value)\n && Number.isInteger(typedObj.block)\n && isHex(typedObj.chain)\n}\n\nexport const isBlockBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<BlockBoundWitness> => {\n return isBlockBoundWitness(value) && isStorageMeta(value)\n}\n\nexport const asBlockBoundWitness = AsObjectFactory.create(isBlockBoundWitness)\nexport const asOptionalBlockBoundWitness = AsObjectFactory.createOptional(isBlockBoundWitness)\n\nexport const asBlockBoundWitnessWithStorageMeta = AsObjectFactory.create(isBlockBoundWitnessWithStorageMeta)\nexport const asOptionalBlockBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isBlockBoundWitnessWithStorageMeta)\n","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956] as const\n","import { MicroXL1 } from '../XL1.ts'\n\nexport const TransactionGasCosts = {\n /**\n * The cost of storing each character that is added to the chain\n * This includes the transaction JSON and all the elevated payloads' JSON\n */\n characterStorage: MicroXL1(10n),\n\n /** The cost of static validating every payload that will be included in the chain */\n payloadValidation: MicroXL1(1000n),\n\n /** The cost of validating each signature that will be included in the chain */\n signatureValidation: MicroXL1(1000n),\n\n /** The cost of validating each hash that will be included in the chain */\n hashValidation: MicroXL1(100n),\n\n /** The cost of validating a balance state, triggered by a Transfer payload or gas collection */\n balanceValidation: MicroXL1(100n),\n} as const\n\n/** Gas Calculation\n *\n * 1 Million microXL1 (mXL1) = 1 XL1\n *\n * Gas amount is calculated as follows:\n *\n * 1. Each byte in the transaction cost 10 gas\n * 2. Each payload validation in the transaction costs 1000 gas\n * 3. Each signature verification in the transaction costs 1000 gas\n * 4. Each hash validation in the transaction costs 100 gas\n * 5. Each balance validation in the transaction costs 100 gas\n * 6. Processing/Compute/Storage Cost?\n * 7. operation Costs?\n *\n * The total gas cost is calculated by multiplying the gas amount by the gas price.\n *\n * minGasPrice is initially set to 100 mXL1\n * minBase is initially set to 1000 mXL1\n * minPriority is always 0 mXL1, but can be set to increase the priority of the transaction\n *\n */\n","import type { Hex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithSources } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/payload-model'\n\nexport const BlockNumberSchema = 'network.xyo.chain.block.number' as const\nexport type BlockNumberSchema = typeof BlockNumberSchema\n\nexport interface BlockNumberFields {\n /**\n * The block number\n */\n block: Hex\n /**\n * The chain id\n */\n chain?: Hex\n}\n/**\n * The number of a block\n */\nexport type BlockNumber = Payload<BlockNumberFields, BlockNumberSchema>\n\n/**\n * Identity function for determining if an object is a BlockNumber\n */\nexport const isBlockNumber = isPayloadOfSchemaType<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumber = AsObjectFactory.create<BlockNumber>(isBlockNumber)\nexport const asOptionalBlockNumber = AsObjectFactory.createOptional<BlockNumber>(isBlockNumber)\n\n/**\n * Identity function for determining if an object is a BlockNumber with sources\n */\nexport const isBlockNumberWithSources = isPayloadOfSchemaTypeWithSources<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumberWithSources = AsObjectFactory.create<WithSources<BlockNumber>>(isBlockNumberWithSources)\nexport const asOptionalBlockNumberWithSources = AsObjectFactory.createOptional<WithSources<BlockNumber>>(isBlockNumberWithSources)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const NetworkStatusSchema = 'network.xyo.chain.status' as const\nexport type NetworkStatusSchema = typeof NetworkStatusSchema\n\nexport type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown'\n\nexport type NetworkStatusUpdate = {\n end: number\n start: number\n update: string\n}\n\nexport interface NetworkStatusFields {\n description: string\n state: NetworkStatusState\n updates?: NetworkStatusUpdate[]\n}\n\nexport type NetworkStatus = Payload<NetworkStatusFields, NetworkStatusSchema>\n\nexport const isNetworkStatus = isPayloadOfSchemaType<NetworkStatus>(NetworkStatusSchema)\n","import type { Address } from '@xylabs/hex'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainIdentificationPayloadSchema = 'network.xyo.chain.identification' as const\nexport type ChainIdentificationPayloadSchema = typeof ChainIdentificationPayloadSchema\n\n/**\n * Identification required to uniquely identify a chain\n */\nexport interface ChainIdentification {\n /** @field the id of the chain */\n id: Address\n}\n\nexport type ChainIdentificationPayload = Payload<ChainIdentification, ChainIdentificationPayloadSchema>\nexport const isChainIdentificationPayload = isPayloadOfSchemaType<ChainIdentificationPayload>(ChainIdentificationPayloadSchema)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainInformationPayloadSchema = 'network.xyo.chain.information' as const\nexport type ChainInformationPayloadSchema = typeof ChainInformationPayloadSchema\n\nimport type { ChainIdentification } from './ChainIdentification.ts'\n\n/**\n * Information required to produce a chain\n */\nexport interface ChainInformation extends ChainIdentification {\n // TODO: Add these fields which are currently promises on the smart contract\n // forkedAtBlockNumber: bigint\n // forkedAtHash: Hash\n // forkedChainId: Address\n}\n\nexport type ChainInformationPayload = Payload<ChainIdentification, ChainInformationPayloadSchema>\nexport const isChainInformationPayload = isPayloadOfSchemaType<ChainInformationPayload>(ChainInformationPayloadSchema)\n","import type { Hash } from '@xylabs/hex'\nimport type { JsonValue } from '@xylabs/object'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface ChainIndexingServiceStateFields<T extends JsonValue = JsonValue> {\n /**\n * The hash of the last block that this service has indexing\n */\n endBlockHash: Hash\n /**\n * The hash of the block that the service started indexing. If undefined, the service is\n * assumed to have started indexing from the genesis block\n */\n startBlockHash?: Hash\n /**\n * The indexed state for the range\n */\n state: T\n}\nexport const ChainIndexingServiceStateSchema = 'network.xyo.chain.indexing.service.state' as const\nexport type ChainIndexingServiceStateSchema = typeof ChainIndexingServiceStateSchema\n\n/**\n * The result of a ChainIndexingServiceState\n */\nexport type ChainIndexingServiceState<T extends JsonValue = JsonValue> = Payload<ChainIndexingServiceStateFields<T>, ChainIndexingServiceStateSchema>\n\n/**\n * Identity functions for determining if an object is an ChainIndexingServiceState\n */\nexport const isChainIndexingServiceState = <T extends JsonValue = JsonValue>(payload?: unknown): payload is ChainIndexingServiceState<T> => {\n return isPayloadOfSchemaType<ChainIndexingServiceState<T>>(ChainIndexingServiceStateSchema)(payload)\n}\nexport const asChainIndexingServiceState = AsObjectFactory.create<ChainIndexingServiceState<JsonValue>>(isChainIndexingServiceState)\n\nexport const isChainIndexingServiceStateWithStorageMeta\n= <T extends JsonValue = JsonValue>(value: unknown): value is WithStorageMeta<ChainIndexingServiceState<T>> =>\n isChainIndexingServiceState<T>(value) && isStorageMeta(value)\n\nexport const asChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.create<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n\nexport const asOptionalChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.createOptional<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n"],"mappings":";AAGO,IAAM,MAAM,CAAC,UAAuB;AACpC,IAAM,WAAW,CAAC,UAA4B;AAE9C,IAAM,YAAY,CAAC,UAAyB;AACjD,SAAO,IAAI,OAAO,KAAK,IAAI,OAAO,GAAS,CAAC;AAC9C;AAEO,IAAM,cAAc,CAAC,UAAyB;AACnD,SAAO,SAAS,OAAO,KAAK,IAAI,OAAO,GAAS,CAAC;AACnD;;;ACZA,SAAS,0BAA0B;AAEnC,SAAS,mBAAmB,gBAAgB;AAE5C,SAAS,iBAAiB,oBAAoB;;;ACJ9C,SAAS,uBAAuB;AAEhC,SAAS,6BAA6B;AAM/B,IAAM,yBAAyB;AAc/B,IAAM,qBAAqB,CAAC,MAA8C;AAC/E,SAAO,sBAAwC,sBAAsB,EAAE,CAAC,KACnE,qBAAqB,EAAE,GAAG,MAAM,UAChC,qBAAqB,EAAE,GAAG,MAAM;AACvC;AACO,IAAM,qBAAqB,gBAAgB,OAAO,kBAAkB;AACpE,IAAM,6BAA6B,gBAAgB,eAAe,kBAAkB;AAE3F,IAAM,uBAAuB,CAAC,QAAgB;AAC5C,SAAQ,OAAO,UAAU,GAAG,KAAK,OAAO,IAAK,MAAM;AACrD;;;AC9BA,SAAS,oBAAoB;AAOtB,IAAM,UAAU,CAAC,UAAwC;AAC9D,SAAQ,MAAqB,SAAS;AACxC;AASO,IAAM,eAAe,CAAwB,UAAiD;AACnG,SAAO,aAAa,KAAK,KAAK,MAAM,QAAS,MAAsC,MAAM;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kC,UAClC,4BAA+B,KAAK,KAAKE,eAAc,KAAK;AAEvD,IAAM,6CACXF,iBAAgB,OAAmD,0CAA0C;AAExG,IAAM,qDACXA,iBAAgB,eAA2D,0CAA0C;","names":["AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isBoundWitness","isStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta"]}
1
+ {"version":3,"sources":["../../src/block/AllowedBlockPayload.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/transaction/TransactionBoundWitness.ts","../../src/XL1.ts","../../src/transaction/TransactionFeesFields.ts","../../src/block/BlockBoundWitness.ts","../../src/constants/StepSizes.ts","../../src/constants/TransactionGasCosts.ts","../../src/fields/BlockNumber.ts","../../src/network/Status.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport type { Schema, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isHashStorageMeta, isSchema } from '@xyo-network/payload-model'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { isSchemaPayload, SchemaSchema } from '@xyo-network/schema-payload-plugin'\n\nimport type {\n ChainStakeIntent, HashPayload, Transfer,\n} from '../payload/index.ts'\nimport {\n ChainStakeIntentSchema, HashSchema, isChainStakeIntent, isHashPayload, isTransfer, TransferSchema,\n} from '../payload/index.ts'\nimport { isTransactionBoundWitness, type TransactionBoundWitness } from '../transaction/index.ts'\n\nexport type AllowedBlockPayload = Transfer | ChainStakeIntent | SchemaPayload | TransactionBoundWitness | HashPayload\nexport const AllowedBlockPayloadSchemas: Schema[] = [TransferSchema, ChainStakeIntentSchema, SchemaSchema, BoundWitnessSchema, HashSchema]\nexport type AllowedBlockPayloadSchema = typeof AllowedBlockPayloadSchemas[number]\n\nexport const isAllowedBlockPayloadSchema = (value: unknown): value is AllowedBlockPayloadSchema => {\n return isSchema(value) && AllowedBlockPayloadSchemas.includes(value)\n}\n\nexport const isAllowedBlockPayload = (value: unknown): value is AllowedBlockPayload => {\n return isTransfer(value) || isChainStakeIntent(value) || isSchemaPayload(value) || isTransactionBoundWitness(value) || isHashPayload(value)\n}\n\nexport const isAllowedBlockPayloadWithHashStorageMeta = (value: unknown): value is WithStorageMeta<AllowedBlockPayload> => {\n return isAllowedBlockPayload(value) && isHashStorageMeta(value)\n}\n","import { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../../fields/index.ts'\nimport type { FromFields } from './Executable.ts'\n\nexport const ChainStakeIntentSchema = 'network.xyo.chain.stake.intent' as const\nexport type ChainStakeIntentSchema = typeof ChainStakeIntentSchema\n\nexport type Intent = 'producer' // | 'bank'\n\nexport interface ChainStakeIntentFields extends BlockDuration, FromFields {\n /*\n * The intent of the staking\n */\n intent: Intent\n}\n\nexport type ChainStakeIntent = Payload<ChainStakeIntentFields, ChainStakeIntentSchema>\n\nexport const isChainStakeIntent = (x?: unknown | null): x is ChainStakeIntent => {\n return isPayloadOfSchemaType<ChainStakeIntent>(ChainStakeIntentSchema)(x)\n && asNonNegativeInteger(x.nbf) !== undefined\n && asNonNegativeInteger(x.exp) !== undefined\n}\nexport const asChainStakeIntent = AsObjectFactory.create(isChainStakeIntent)\nexport const asOptionalChainStakeIntent = AsObjectFactory.createOptional(isChainStakeIntent)\n\nconst asNonNegativeInteger = (num: number) => {\n return (Number.isInteger(num) && num >= 0) ? num : undefined\n}\n","import type { Address } from '@xylabs/hex'\nimport type { EmptyObject } from '@xylabs/object'\nimport { isAnyPayload } from '@xyo-network/payload-model'\n\nexport interface FromFields {\n // the address that is treated as the source of this action\n from: Address\n}\n\nexport const hasFrom = (value: unknown): value is FromFields => {\n return (value as FromFields).from !== undefined\n}\n\nexport interface ExecutableFields {\n script: string[]\n}\n\nexport type Executable<T extends EmptyObject = EmptyObject> = T & ExecutableFields\nexport type OptionalExecutable<T extends EmptyObject = EmptyObject> = T & Partial<ExecutableFields>\n\nexport const isExecutable = <T extends EmptyObject>(value: T | undefined): value is Executable<T> => {\n return isAnyPayload(value) && Array.isArray((value as unknown as ExecutableFields).script)\n}\n\nexport const asExecutable = <T extends EmptyObject>(value: T | undefined): Executable<T> | undefined => {\n return isExecutable(value)\n ? value as unknown as Executable<T>\n : undefined\n}\n","import type { Hash } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const HashSchema = 'network.xyo.hash' as const\nexport type HashSchema = typeof HashSchema\n\nexport interface HashFields {\n hash: Hash\n}\n\nexport type HashPayload = Payload<HashFields, HashSchema>\n\nexport const isHashPayload = isPayloadOfSchemaType<HashPayload>(HashSchema)\n\nexport const asHashPayload = AsObjectFactory.create(isHashPayload)\nexport const asHashPayloadWithStorageMeta = AsObjectFactory.create(isHashPayload)\nexport const asOptionalHashPayload = AsObjectFactory.createOptional(isHashPayload)\n","import type {\n Address,\n Hex,\n} from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { FromFields } from './Executable.ts'\n\nexport const TransferSchema = 'network.xyo.transfer' as const\nexport type TransferSchema = typeof TransferSchema\n\nexport interface TransferFields extends FromFields {\n epoch: number\n // the amount that is being sent to another address\n transfers: Record<Address, Hex>\n}\n\n// if this payload is included in a boundwitness, it needs to be available for inspection to be included in block\nexport type Transfer = Payload<TransferFields, TransferSchema>\n\nexport const isTransfer = isPayloadOfSchemaType<Transfer>(TransferSchema)\n\nexport const asTransfer = AsObjectFactory.create(isTransfer)\nexport const asOptionalTransfer = AsObjectFactory.createOptional(isTransfer)\n","import type { Address } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness, Signed } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../fields/index.ts'\nimport type { FromFields, OptionalExecutable } from '../payload/index.ts'\nimport type { TransactionFeesFields } from './TransactionFeesFields.ts'\n\nexport interface TransactionBoundWitnessFields extends BlockDuration, TransactionFeesFields {\n chain: Address\n}\n\nexport type TransactionBoundWitness = BoundWitness<TransactionBoundWitnessFields & OptionalExecutable & FromFields>\n\nexport const isTransactionBoundWitness = (value: unknown): value is TransactionBoundWitness => {\n const typedObj = value as TransactionBoundWitness\n return isBoundWitness(value)\n && typedObj.chain !== undefined\n && typedObj.fees !== undefined\n && typedObj.exp !== undefined\n && typedObj.nbf !== undefined\n}\n\nexport const isSignedTransactionBoundWitness = (value: unknown): value is Signed<TransactionBoundWitness> => {\n return isTransactionBoundWitness(value) && isSigned(value)\n}\n\nexport const isSigned = <T extends BoundWitness = BoundWitness>(value: unknown): value is Signed<T> =>\n isBoundWitness(value)\n && value.$signatures.length === value.addresses.length\n && value.addresses.length > 0\n\nexport const isTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<TransactionBoundWitness> =>\n isTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const isSignedTransactionBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<Signed<TransactionBoundWitness>> =>\n isSignedTransactionBoundWitness(value)\n && isStorageMeta(value)\n\nexport const asTransactionBoundWitness = AsObjectFactory.create(isTransactionBoundWitness)\nexport const asOptionalTransactionBoundWitness = AsObjectFactory.createOptional(isTransactionBoundWitness)\n\nexport const asTransactionBoundWitnessWithStorageMeta = AsObjectFactory.create(isTransactionBoundWitnessWithStorageMeta)\nexport const asOptionalTransactionBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isTransactionBoundWitnessWithStorageMeta)\n","export type XL1 = bigint & { readonly _tag: 'XL1' } // 1e-18\nexport type MicroXL1 = bigint & { readonly _tag: 'MicroXL1' } // 1e-12\n\nexport const XL1 = (value: bigint): XL1 => value as XL1\nexport const MicroXL1 = (value: bigint): MicroXL1 => value as MicroXL1\n\nexport const mXL1ToXL1 = (value: MicroXL1): XL1 => {\n return XL1(BigInt(value) / BigInt(1_000_000))\n}\n\nexport const mXL1FromXL1 = (value: XL1): MicroXL1 => {\n return MicroXL1(BigInt(value) * BigInt(1_000_000))\n}\n","import type { Hex } from '@xylabs/hex'\n\nimport { MicroXL1 } from '../XL1.ts'\n\nexport interface TransactionFeesBigInt {\n base: MicroXL1\n gasLimit: MicroXL1\n gasPrice: MicroXL1\n priority: MicroXL1\n}\n\nexport type TransactionFeesHex = {\n [K in keyof TransactionFeesBigInt]: Hex;\n}\n\nexport interface TransactionFeesFields {\n fees: TransactionFeesHex\n}\n\nexport const minTransactionFees: TransactionFeesBigInt = {\n base: MicroXL1(1000n), gasPrice: MicroXL1(1n), gasLimit: MicroXL1(1000n), priority: MicroXL1(0n),\n} as const\n\nexport const defaultTransactionFees: TransactionFeesBigInt = {\n base: minTransactionFees.base, gasPrice: MicroXL1(10n), gasLimit: MicroXL1(1_000_000n), priority: MicroXL1(0n),\n} as const\n","import type { Hash, Hex } from '@xylabs/hex'\nimport { isHex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport { isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface BlockBoundWitnessMeta {\n $epoch: number\n}\n\nexport interface BlockBoundWitnessFields {\n /** Block number */\n block: number\n /** Chain id - this should be \"0\" for the genesis block */\n chain: Hex\n /** Previous block hash if not block 0 */\n previous: Hash | null /* the previous block hash */\n /** Version of the protocol being used major * 1,000,000 + minor * 1,000 + patch */\n protocol: number\n /** Step hashes */\n step_hashes: Hex[]\n}\n\nexport type BlockBoundWitness = BoundWitness<BlockBoundWitnessFields & BlockBoundWitnessMeta>\n\nexport const isBlockBoundWitness = (value: unknown): value is BlockBoundWitness => {\n const typedObj = value as BlockBoundWitness\n return isBoundWitness(value)\n && Number.isInteger(typedObj.block)\n && isHex(typedObj.chain)\n}\n\nexport const isBlockBoundWitnessWithStorageMeta = (value: unknown): value is WithStorageMeta<BlockBoundWitness> => {\n return isBlockBoundWitness(value) && isStorageMeta(value)\n}\n\nexport const asBlockBoundWitness = AsObjectFactory.create(isBlockBoundWitness)\nexport const asOptionalBlockBoundWitness = AsObjectFactory.createOptional(isBlockBoundWitness)\n\nexport const asBlockBoundWitnessWithStorageMeta = AsObjectFactory.create(isBlockBoundWitnessWithStorageMeta)\nexport const asOptionalBlockBoundWitnessWithStorageMeta = AsObjectFactory.createOptional(isBlockBoundWitnessWithStorageMeta)\n","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956] as const\n","import { MicroXL1 } from '../XL1.ts'\n\nexport const TransactionGasCosts = {\n /**\n * The cost of storing each character that is added to the chain\n * This includes the transaction JSON and all the elevated payloads' JSON\n */\n characterStorage: MicroXL1(10n),\n\n /** The cost of static validating every payload that will be included in the chain */\n payloadValidation: MicroXL1(1000n),\n\n /** The cost of validating each signature that will be included in the chain */\n signatureValidation: MicroXL1(1000n),\n\n /** The cost of validating each hash that will be included in the chain */\n hashValidation: MicroXL1(100n),\n\n /** The cost of validating a balance state, triggered by a Transfer payload or gas collection */\n balanceValidation: MicroXL1(100n),\n} as const\n\n/** Gas Calculation\n *\n * 1 Million microXL1 (mXL1) = 1 XL1\n *\n * Gas amount is calculated as follows:\n *\n * 1. Each byte in the transaction cost 10 gas\n * 2. Each payload validation in the transaction costs 1000 gas\n * 3. Each signature verification in the transaction costs 1000 gas\n * 4. Each hash validation in the transaction costs 100 gas\n * 5. Each balance validation in the transaction costs 100 gas\n * 6. Processing/Compute/Storage Cost?\n * 7. operation Costs?\n *\n * The total gas cost is calculated by multiplying the gas amount by the gas price.\n *\n * minGasPrice is initially set to 100 mXL1\n * minBase is initially set to 1000 mXL1\n * minPriority is always 0 mXL1, but can be set to increase the priority of the transaction\n *\n */\n","import type { Hex } from '@xylabs/hex'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithSources } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/payload-model'\n\nexport const BlockNumberSchema = 'network.xyo.chain.block.number' as const\nexport type BlockNumberSchema = typeof BlockNumberSchema\n\nexport interface BlockNumberFields {\n /**\n * The block number\n */\n block: Hex\n /**\n * The chain id\n */\n chain?: Hex\n}\n/**\n * The number of a block\n */\nexport type BlockNumber = Payload<BlockNumberFields, BlockNumberSchema>\n\n/**\n * Identity function for determining if an object is a BlockNumber\n */\nexport const isBlockNumber = isPayloadOfSchemaType<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumber = AsObjectFactory.create<BlockNumber>(isBlockNumber)\nexport const asOptionalBlockNumber = AsObjectFactory.createOptional<BlockNumber>(isBlockNumber)\n\n/**\n * Identity function for determining if an object is a BlockNumber with sources\n */\nexport const isBlockNumberWithSources = isPayloadOfSchemaTypeWithSources<BlockNumber>(BlockNumberSchema)\nexport const asBlockNumberWithSources = AsObjectFactory.create<WithSources<BlockNumber>>(isBlockNumberWithSources)\nexport const asOptionalBlockNumberWithSources = AsObjectFactory.createOptional<WithSources<BlockNumber>>(isBlockNumberWithSources)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const NetworkStatusSchema = 'network.xyo.chain.status' as const\nexport type NetworkStatusSchema = typeof NetworkStatusSchema\n\nexport type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown'\n\nexport type NetworkStatusUpdate = {\n end: number\n start: number\n update: string\n}\n\nexport interface NetworkStatusFields {\n description: string\n state: NetworkStatusState\n updates?: NetworkStatusUpdate[]\n}\n\nexport type NetworkStatus = Payload<NetworkStatusFields, NetworkStatusSchema>\n\nexport const isNetworkStatus = isPayloadOfSchemaType<NetworkStatus>(NetworkStatusSchema)\n","import type { Address } from '@xylabs/hex'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainIdentificationPayloadSchema = 'network.xyo.chain.identification' as const\nexport type ChainIdentificationPayloadSchema = typeof ChainIdentificationPayloadSchema\n\n/**\n * Identification required to uniquely identify a chain\n */\nexport interface ChainIdentification {\n /** @field the id of the chain */\n id: Address\n}\n\nexport type ChainIdentificationPayload = Payload<ChainIdentification, ChainIdentificationPayloadSchema>\nexport const isChainIdentificationPayload = isPayloadOfSchemaType<ChainIdentificationPayload>(ChainIdentificationPayloadSchema)\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const ChainInformationPayloadSchema = 'network.xyo.chain.information' as const\nexport type ChainInformationPayloadSchema = typeof ChainInformationPayloadSchema\n\nimport type { ChainIdentification } from './ChainIdentification.ts'\n\n/**\n * Information required to produce a chain\n */\nexport interface ChainInformation extends ChainIdentification {\n // TODO: Add these fields which are currently promises on the smart contract\n // forkedAtBlockNumber: bigint\n // forkedAtHash: Hash\n // forkedChainId: Address\n}\n\nexport type ChainInformationPayload = Payload<ChainIdentification, ChainInformationPayloadSchema>\nexport const isChainInformationPayload = isPayloadOfSchemaType<ChainInformationPayload>(ChainInformationPayloadSchema)\n","import type { Hash } from '@xylabs/hex'\nimport type { JsonValue } from '@xylabs/object'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload, WithStorageMeta } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isStorageMeta } from '@xyo-network/payload-model'\n\nexport interface ChainIndexingServiceStateFields<T extends JsonValue = JsonValue> {\n /**\n * The hash of the last block that this service has indexing\n */\n endBlockHash: Hash\n /**\n * The hash of the block that the service started indexing. If undefined, the service is\n * assumed to have started indexing from the genesis block\n */\n startBlockHash?: Hash\n /**\n * The indexed state for the range\n */\n state: T\n}\nexport const ChainIndexingServiceStateSchema = 'network.xyo.chain.indexing.service.state' as const\nexport type ChainIndexingServiceStateSchema = typeof ChainIndexingServiceStateSchema\n\n/**\n * The result of a ChainIndexingServiceState\n */\nexport type ChainIndexingServiceState<T extends JsonValue = JsonValue> = Payload<ChainIndexingServiceStateFields<T>, ChainIndexingServiceStateSchema>\n\n/**\n * Identity functions for determining if an object is an ChainIndexingServiceState\n */\nexport const isChainIndexingServiceState = <T extends JsonValue = JsonValue>(payload?: unknown): payload is ChainIndexingServiceState<T> => {\n return isPayloadOfSchemaType<ChainIndexingServiceState<T>>(ChainIndexingServiceStateSchema)(payload)\n}\nexport const asChainIndexingServiceState = AsObjectFactory.create<ChainIndexingServiceState<JsonValue>>(isChainIndexingServiceState)\n\nexport const isChainIndexingServiceStateWithStorageMeta\n= <T extends JsonValue = JsonValue>(value: unknown): value is WithStorageMeta<ChainIndexingServiceState<T>> =>\n isChainIndexingServiceState<T>(value) && isStorageMeta(value)\n\nexport const asChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.create<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n\nexport const asOptionalChainIndexingServiceStateWithStorageMeta\n= AsObjectFactory.createOptional<WithStorageMeta<ChainIndexingServiceState>>(isChainIndexingServiceStateWithStorageMeta)\n"],"mappings":";AAAA,SAAS,0BAA0B;AAEnC,SAAS,mBAAmB,gBAAgB;AAE5C,SAAS,iBAAiB,oBAAoB;;;ACJ9C,SAAS,uBAAuB;AAEhC,SAAS,6BAA6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gBA,uBAAmC,iBAAiB;AAC1E,IAAM,gBAAgBD,iBAAgB,OAAoB,aAAa;AACvE,IAAM,wBAAwBA,iBAAgB,eAA4B,aAAa;AAKvF,IAAM,2BAA2B,iCAA8C,iBAAiB;AAChG,IAAM,2BAA2BA,iBAAgB,OAAiC,wBAAwB;AAC1G,IAAM,mCAAmCA,iBAAgB,eAAyC,wBAAwB;;;ACrCjI,SAAS,yBAAAE,8BAA6B;AAE/B,IAAM,sBAAsB;AAmB5B,IAAM,kBAAkBA,uBAAqC,mBAAmB;;;ACpBvF,SAAS,yBAAAC,8BAA6B;AAE/B,IAAM,mCAAmC;AAYzC,IAAM,+BAA+BA,uBAAkD,gCAAgC;;;ACf9H,SAAS,yBAAAC,8BAA6B;AAE/B,IAAM,gCAAgC;AAgBtC,IAAM,4BAA4BA,uBAA+C,6BAA6B;;;ACjBrH,SAAS,mBAAAC,wBAAuB;AAEhC,SAAS,yBAAAC,wBAAuB,iBAAAC,sBAAqB;AAiB9C,IAAM,kCAAkC;AAWxC,IAAM,8BAA8B,CAAkC,YAA+D;AAC1I,SAAOD,uBAAoD,+BAA+B,EAAE,OAAO;AACrG;AACO,IAAM,8BAA8BD,iBAAgB,OAA6C,2BAA2B;AAE5H,IAAM,6CACX,CAAkC,UAClC,4BAA+B,KAAK,KAAKE,eAAc,KAAK;AAEvD,IAAM,6CACXF,iBAAgB,OAAmD,0CAA0C;AAExG,IAAM,qDACXA,iBAAgB,eAA2D,0CAA0C;","names":["AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isBoundWitness","isStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta"]}
@@ -1,7 +1,7 @@
1
1
  import type { Schema, WithStorageMeta } from '@xyo-network/payload-model';
2
2
  import type { SchemaPayload } from '@xyo-network/schema-payload-plugin';
3
- import type { ChainStakeIntent, HashPayload, Transfer } from '#payload';
4
- import { type TransactionBoundWitness } from '#transaction';
3
+ import type { ChainStakeIntent, HashPayload, Transfer } from '../payload/index.ts';
4
+ import { type TransactionBoundWitness } from '../transaction/index.ts';
5
5
  export type AllowedBlockPayload = Transfer | ChainStakeIntent | SchemaPayload | TransactionBoundWitness | HashPayload;
6
6
  export declare const AllowedBlockPayloadSchemas: Schema[];
7
7
  export type AllowedBlockPayloadSchema = typeof AllowedBlockPayloadSchemas[number];
@@ -1 +1 @@
1
- {"version":3,"file":"AllowedBlockPayload.d.ts","sourceRoot":"","sources":["../../../src/block/AllowedBlockPayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGvE,OAAO,KAAK,EACV,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EACxC,MAAM,UAAU,CAAA;AAIjB,OAAO,EAA6B,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,gBAAgB,GAAG,aAAa,GAAG,uBAAuB,GAAG,WAAW,CAAA;AACrH,eAAO,MAAM,0BAA0B,EAAE,MAAM,EAA2F,CAAA;AAC1I,MAAM,MAAM,yBAAyB,GAAG,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAA;AAEjF,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,yBAErE,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,mBAE/D,CAAA;AAED,eAAO,MAAM,wCAAwC,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,mBAAmB,CAErH,CAAA"}
1
+ {"version":3,"file":"AllowedBlockPayload.d.ts","sourceRoot":"","sources":["../../../src/block/AllowedBlockPayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGvE,OAAO,KAAK,EACV,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EACxC,MAAM,qBAAqB,CAAA;AAI5B,OAAO,EAA6B,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAEjG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,gBAAgB,GAAG,aAAa,GAAG,uBAAuB,GAAG,WAAW,CAAA;AACrH,eAAO,MAAM,0BAA0B,EAAE,MAAM,EAA2F,CAAA;AAC1I,MAAM,MAAM,yBAAyB,GAAG,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAA;AAEjF,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,yBAErE,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,mBAE/D,CAAA;AAED,eAAO,MAAM,wCAAwC,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,mBAAmB,CAErH,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { Promisable } from '@xylabs/promise';
2
2
  import type { Payload } from '@xyo-network/payload-model';
3
- import type { HydratedBlock } from '#block';
3
+ import type { HydratedBlock } from '../block/index.ts';
4
4
  export interface ChainAnalyzer<T extends Payload = Payload> {
5
5
  onBlock(block: HydratedBlock): Promisable<boolean>;
6
6
  result(): T;
@@ -1 +1 @@
1
- {"version":3,"file":"ChainAnalyzer.d.ts","sourceRoot":"","sources":["../../../src/chain/ChainAnalyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE3C,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IACxD,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAClD,MAAM,IAAI,CAAC,CAAA;IACX,cAAc,IAAI,OAAO,CAAA;CAC1B"}
1
+ {"version":3,"file":"ChainAnalyzer.d.ts","sourceRoot":"","sources":["../../../src/chain/ChainAnalyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IACxD,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAClD,MAAM,IAAI,CAAC,CAAA;IACX,cAAc,IAAI,OAAO,CAAA;CAC1B"}
@@ -1,16 +1,16 @@
1
+ export * from './block/index.ts';
2
+ export * from './chain/index.ts';
3
+ export * from './constants/index.ts';
4
+ export * from './fields/index.ts';
1
5
  export * from './Initializable.ts';
6
+ export * from './iterator/index.ts';
7
+ export * from './network/index.ts';
2
8
  export * from './OpenTelemetryProviders.ts';
9
+ export * from './payload/index.ts';
10
+ export * from './provider/index.ts';
11
+ export * from './repository/index.ts';
12
+ export * from './services/index.ts';
13
+ export * from './transaction/index.ts';
14
+ export * from './validation/index.ts';
3
15
  export * from './XL1.ts';
4
- export * from '#block';
5
- export * from '#chain';
6
- export * from '#constants';
7
- export * from '#fields';
8
- export * from '#iterator';
9
- export * from '#network';
10
- export * from '#payload';
11
- export * from '#provider';
12
- export * from '#repository';
13
- export * from '#services';
14
- export * from '#transaction';
15
- export * from '#validation';
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,UAAU,CAAA"}
@@ -2,9 +2,9 @@ import type { BaseParams } from '@xylabs/base';
2
2
  import type { BaseEmitter } from '@xylabs/events';
3
3
  import type { Hash } from '@xylabs/hex';
4
4
  import type { ArchivistInstance } from '@xyo-network/archivist-model';
5
- import type { BlockBoundWitness } from '#block';
6
- import type { IterableRepository, ReadRepository } from '#repository';
7
- import type { BaseServiceParams, ChainIdentification } from '#services';
5
+ import type { BlockBoundWitness } from '../block/index.ts';
6
+ import type { IterableRepository, ReadRepository } from '../repository/index.ts';
7
+ import type { BaseServiceParams, ChainIdentification } from '../services/index.ts';
8
8
  import type { ChainIteratorEventData } from './ChainIteratorEventData.ts';
9
9
  export interface ChainIterator<TKey, THead> extends ReadRepository<TKey, BlockBoundWitness>, IterableRepository<TKey, BlockBoundWitness> {
10
10
  chainIdentification: ChainIdentification;
@@ -1 +1 @@
1
- {"version":3,"file":"ChainIterator.d.ts","sourceRoot":"","sources":["../../../src/iterator/ChainIterator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAEvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEzE,MAAM,WAAW,aAAa,CAAC,IAAI,EAAE,KAAK,CAAE,SAAQ,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACtI,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAA;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAA;IACjF,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC;AAED,MAAM,WAAW,q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CAAC,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACtI,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAA;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAA;IACjF,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC;AAED,MAAM,WAAW,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAE,SAAQ,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,sBAAsB,CAAC;CAAI;AAE3I,MAAM,WAAW,wBAAyB,SAAQ,aAAa,CAAC,MAAM,EAAE,iBAAiB,CAAC;CAAI;AAC9F,MAAM,WAAW,gCAAiC,SAAQ,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,CAAC;CAAI;AAE9G,MAAM,WAAW,iBAAkB,SAAQ,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC;CAAI;AACxE,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC;CAAI;AAExF,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,cAAc,EAAE,iBAAiB,CAAA;IACjC,IAAI,EAAE,iBAAiB,CAAA;CACxB"}
@@ -1,5 +1,5 @@
1
1
  import type { EventData } from '@xylabs/events';
2
- import type { BlockBoundWitness } from '#block';
2
+ import type { BlockBoundWitness } from '../block/index.ts';
3
3
  export type HeadEventArgs = {
4
4
  blocks: [BlockBoundWitness];
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ChainIteratorEventData.d.ts","sourceRoot":"","sources":["../../../src/iterator/ChainIteratorEventData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAE/C,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,EAAE,CAAC,iBAAiB,CAAC,CAAA;CAAE,CAAA;AAE3D,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;CAAI"}
1
+ {"version":3,"file":"ChainIteratorEventData.d.ts","sourceRoot":"","sources":["../../../src/iterator/ChainIteratorEventData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,EAAE,CAAC,iBAAiB,CAAC,CAAA;CAAE,CAAA;AAE3D,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;CAAI"}
@@ -1,5 +1,5 @@
1
1
  import type { Payload } from '@xyo-network/payload-model';
2
- import type { BlockDuration } from '#fields';
2
+ import type { BlockDuration } from '../../fields/index.ts';
3
3
  import type { FromFields } from './Executable.ts';
4
4
  export declare const ChainStakeIntentSchema: "network.xyo.chain.stake.intent";
5
5
  export type ChainStakeIntentSchema = typeof ChainStakeIntentSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"ChainStakeIntent.d.ts","sourceRoot":"","sources":["../../../../src/payload/elevatable/ChainStakeIntent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,eAAO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@ -1,5 +1,5 @@
1
1
  import type { Promisable } from '@xylabs/promise';
2
- import type { NetworkStatus } from '#network';
2
+ import type { NetworkStatus } from '../../network/index.ts';
3
3
  export interface XyoNetwork {
4
4
  status(): Promisable<NetworkStatus>;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"XyoNetwork.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoNetwork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,WAAW,UAAU;IACzB,MAAM,IAAI,UAAU,CAAC,aAAa,CAAC,CAAA;CACpC"}
1
+ {"version":3,"file":"XyoNetwork.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoNetwork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE3D,MAAM,WAAW,UAAU;IACzB,MAAM,IAAI,UAAU,CAAC,aAAa,CAAC,CAAA;CACpC"}
@@ -1,8 +1,8 @@
1
1
  import type { Address } from '@xylabs/hex';
2
2
  import type { Signed } from '@xyo-network/boundwitness-model';
3
3
  import type { Payload } from '@xyo-network/payload-model';
4
- import type { AllowedBlockPayload } from '#block';
5
- import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction';
4
+ import type { AllowedBlockPayload } from '../../block/index.ts';
5
+ import type { TransactionBoundWitness, TransactionFeesBigInt } from '../../transaction/index.ts';
6
6
  import type { XyoDataLakeProvider } from './XyoDataLake.ts';
7
7
  import type { XyoNetwork } from './XyoNetwork.ts';
8
8
  import type { XyoRunner } from './XyoRunner.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"XyoProvider.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoProvider.ts"],"names":[],"mappings":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AAC,EAAE,SAAS,CAAA;CACnB"}
@@ -1,6 +1,6 @@
1
1
  import type { Hash } from '@xylabs/hex';
2
2
  import type { Promisable } from '@xylabs/promise';
3
- import type { SignedHydratedTransaction } from '#transaction';
3
+ import type { SignedHydratedTransaction } from '../../transaction/index.ts';
4
4
  export interface XyoRunner {
5
5
  broadcastTransaction(transaction: SignedHydratedTransaction): Promisable<Hash>;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"XyoRunner.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAE7D,MAAM,WAAW,SAAS;IACxB,oBAAoB,CAAC,WAAW,EAAE,yBAAyB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAC/E"}
1
+ {"version":3,"file":"XyoRunner.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E,MAAM,WAAW,SAAS;IACxB,oBAAoB,CAAC,WAAW,EAAE,yBAAyB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAC/E"}
@@ -2,8 +2,8 @@ import type { Address } from '@xylabs/hex';
2
2
  import type { Promisable } from '@xylabs/promise';
3
3
  import type { Signed } from '@xyo-network/boundwitness-model';
4
4
  import type { Payload } from '@xyo-network/payload-model';
5
- import type { AllowedBlockPayload } from '#block';
6
- import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction';
5
+ import type { AllowedBlockPayload } from '../../block/index.ts';
6
+ import type { TransactionBoundWitness, TransactionFeesBigInt } from '../../transaction/index.ts';
7
7
  export interface XyoSigner {
8
8
  address(): Promisable<Address>;
9
9
  createSignedTransaction(chain: Address, elevatedPayloads: AllowedBlockPayload[], additionalPayloads: Payload[], nbf: number, exp: number, fees: TransactionFeesBigInt, from?: Address): Promisable<Signed<TransactionBoundWitness>>;
@@ -1 +1 @@
1
- {"version":3,"file":"XyoSigner.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElF,MAAM,WAAW,SAAS;IACxB,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;IAC9B,uBAAuB,CACrB,KAAK,EAAE,OAAO,EACd,gBAAgB,EAAE,mBAAmB,EAAE,EACvC,kBAAkB,EAAE,OAAO,EAAE,EAC7B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,EAC3B,IAAI,CAAC,EAAE,OAAO,GACb,UAAU,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAA;CAC/C"}
1
+ {"version":3,"file":"XyoSigner.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEhG,MAAM,WAAW,SAAS;IACxB,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;IAC9B,uBAAuB,CACrB,KAAK,EAAE,OAAO,EACd,gBAAgB,EAAE,mBAAmB,EAAE,EACvC,kBAAkB,EAAE,OAAO,EAAE,EAC7B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,EAC3B,IAAI,CAAC,EAAE,OAAO,GACb,UAAU,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAA;CAC/C"}
@@ -1,8 +1,8 @@
1
1
  import type { Address, Hash } from '@xylabs/hex';
2
2
  import type { Promisable } from '@xylabs/promise';
3
- import type { SignedHydratedBlock } from '#block';
4
- import type { Transfer } from '#payload';
5
- import type { SignedHydratedTransaction, TransactionBoundWitness } from '#transaction';
3
+ import type { SignedHydratedBlock } from '../../block/index.ts';
4
+ import type { Transfer } from '../../payload/index.ts';
5
+ import type { SignedHydratedTransaction, TransactionBoundWitness } from '../../transaction/index.ts';
6
6
  export interface XyoViewer {
7
7
  accountBalance: (address: Address) => Promisable<bigint>;
8
8
  accountHistory: (address: Address) => Promisable<[TransactionBoundWitness[], Transfer[]]>;
@@ -1 +1 @@
1
- {"version":3,"file":"XyoViewer.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAA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AAC,CAAA;IACvH,gCAAgC,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IAC7H,iBAAiB,CAAC,eAAe,EAAE,IAAI,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;CACvF"}
@@ -1,6 +1,6 @@
1
1
  import type { Hash } from '@xylabs/hex';
2
2
  import type { Promisable } from '@xylabs/promise';
3
- import type { Transfer } from '#payload';
3
+ import type { Transfer } from '../../../payload/index.ts';
4
4
  export interface AccountViewer {
5
5
  balance(): Promisable<bigint>;
6
6
  history(limit?: number, previous?: Hash): Promisable<Transfer[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,WAAW,aAAa;IAC5B,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC7B,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;CACjE"}
1
+ {"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEzD,MAAM,WAAW,aAAa;IAC5B,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC7B,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;CACjE"}
@@ -1,5 +1,5 @@
1
1
  import type { Address, Hash } from '@xylabs/hex';
2
- import type { SignedHydratedBlock } from '#block';
2
+ import type { SignedHydratedBlock } from '../../../block/index.ts';
3
3
  import type { TransactionViewer } from './Transaction.ts';
4
4
  export interface BlockViewer {
5
5
  chainId: Address;
@@ -1 +1 @@
1
- {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,mBAAmB,CAAA;IAC1B,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,CAAA;CAClD"}
1
+ {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,mBAAmB,CAAA;IAC1B,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,CAAA;CAClD"}
@@ -1,6 +1,6 @@
1
1
  import type { Address, Hash } from '@xylabs/hex';
2
2
  import type { Promisable } from '@xylabs/promise';
3
- import type { NetworkStatus } from '#network';
3
+ import type { NetworkStatus } from '../../../network/index.ts';
4
4
  import type { AccountViewer } from './Account.ts';
5
5
  import type { BlockViewer } from './Block.ts';
6
6
  export interface ChainViewer {
@@ -1 +1 @@
1
- {"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAAA;IACxC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAAA;IACrC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,IAAI,aAAa,CAAA;CACxB"}
1
+ {"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAAA;IACxC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAAA;IACrC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,IAAI,aAAa,CAAA;CACxB"}
@@ -1,4 +1,4 @@
1
- import type { SignedHydratedTransaction } from '#transaction';
1
+ import type { SignedHydratedTransaction } from '../../../transaction/index.ts';
2
2
  import type { BlockViewer } from './Block.ts';
3
3
  export interface TransactionViewer {
4
4
  block: BlockViewer;