@xyo-network/xl1-protocol 1.3.13 → 1.3.15

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ethereum.ts","../../src/network/Status.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/protocol/AllowedBlockPayload.ts","../../src/protocol/TransactionBoundWitness.ts","../../src/protocol/BlockBoundWitness.ts","../../src/protocol/BlockNumber.ts","../../src/protocol/Steps.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["import type { Hex } from '@xylabs/hex'\nimport { toHex } from '@xylabs/hex'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { getAddress } from 'ethers'\nimport { parseUnits } from 'ethers/utils'\n\nexport interface GasConfig {\n gasLimit?: number\n gasPrice?: bigint\n}\n\nexport const getDefaultGasConfig = (): GasConfig => {\n return {\n gasLimit: 2_000_000, // Set the gas limit\n gasPrice: parseUnits('100', 'gwei'),\n }\n}\n\nexport type EthAddress = Hex\n\nexport const ETH_ZERO_ADDRESS: EthAddress = '0x0000000000000000000000000000000000000000' as const\n\nexport const toEthAddress = (value: bigint | string | AccountInstance): EthAddress => {\n const address = (typeof value === 'object') ? value.address : value\n return getAddress(toHex(address, { prefix: true, bitLength: 160 })) as EthAddress\n}\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'\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 { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../../protocol/BlockDuration.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 { 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 './TransactionBoundWitness.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 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 {\n FromFields,\n OptionalExecutable,\n} from '../payload/index.ts'\nimport type { BlockDuration } from './BlockDuration.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","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","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","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956]\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":";;;;AACA,SAASA,aAAa;AAEtB,SAASC,kBAAkB;AAC3B,SAASC,kBAAkB;AAOpB,IAAMC,sBAAsB,6BAAA;AACjC,SAAO;IACLC,UAAU;IACVC,UAAUC,WAAW,OAAO,MAAA;EAC9B;AACF,GALmC;AAS5B,IAAMC,mBAA+B;AAErC,IAAMC,eAAe,wBAACC,UA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J,aAAAA;AAK1E,IAAMK,2BAA2BP,iCAA8CC,iBAAAA;AAC/E,IAAMO,2BAA2BV,iBAAgBM,OAAiCG,wBAAAA;AAClF,IAAME,mCAAmCX,iBAAgBQ,eAAyCC,wBAAAA;;;ACtClG,IAAMG,YAAY;EAAC;EAAI;EAAK;EAAM;EAAQ;EAAS;EAAW;;;;ACErE,SAASC,yBAAAA,8BAA6B;AAE/B,IAAMC,mCAAmC;AAYzC,IAAMC,+BAA+BF,uBAAkDC,gCAAAA;;;ACf9F,SAASE,yBAAAA,8BAA6B;AAE/B,IAAMC,gCAAgC;AAgBtC,IAAMC,4BAA4BF,uBAA+CC,6BAAAA;;;ACjBxF,SAASE,mBAAAA,wBAAuB;AAEhC,SAASC,yBAAAA,wBAAuBC,iBAAAA,sBAAqB;AAiB9C,IAAMC,kCAAkC;AAWxC,IAAMC,8BAA8B,wBAAkCC,YAAAA;AAC3E,SAAOC,uBAAoDH,+BAAAA,EAAiCE,OAAAA;AAC9F,GAF2C;AAGpC,IAAME,8BAA8BC,iBAAgBC,OAA6CL,2BAAAA;AAEjG,IAAMM,6CACX,wBAAkCC,UAClCP,4BAA+BO,KAAAA,KAAUC,eAAcD,KAAAA,GADvD;AAGK,IAAME,6CACXL,iBAAgBC,OAAmDC,0CAAAA;AAE9D,IAAMI,qDACXN,iBAAgBO,eAA2DL,0CAAAA;","names":["toHex","getAddress","parseUnits","getDefaultGasConfig","gasLimit","gasPrice","parseUnits","ETH_ZERO_ADDRESS","toEthAddress","value","address","getAddress","toHex","prefix","bitLength","isPayloadOfSchemaType","NetworkStatusSchema","isNetworkStatus","AsObjectFactory","isPayloadOfSchemaType","ChainStakeIntentSchema","isChainStakeIntent","x","isPayloadOfSchemaType","asNonNegativeInteger","nbf","undefined","exp","asChainStakeIntent","AsObjectFactory","create","asOptionalChainStakeIntent","createOptional","num","Number","isInteger","isAnyPayload","hasFrom","value","from","undefined","isExecutable","isAnyPayload","Array","isArray","script","asExecutable","AsObjectFactory","isPayloadOfSchemaType","HashSchema","isHashPayload","asHashPayload","create","asHashPayloadWithStorageMeta","asOptionalHashPayload","createOptional","AsObjectFactory","isPayloadOfSchemaType","TransferSchema","isTransfer","asTransfer","create","asOptionalTransfer","createOptional","BoundWitnessSchema","isHashStorageMeta","isSchema","isSchemaPayload","SchemaSchema","AsObjectFactory","isBoundWitness","isStorageMeta","isTransactionBoundWitness","value","typedObj","isBoundWitness","chain","undefined","fees","exp","nbf","isSignedTransactionBoundWitness","isSigned","$signatures","length","addresses","isTransactionBoundWitnessWithStorageMeta","isStorageMeta","isSignedTransactionBoundWitnessWithStorageMeta","asTransactionBoundWitness","AsObjectFactory","create","asOptionalTransactionBoundWitness","createOptional","asTransactionBoundWitnessWithStorageMeta","asOptionalTransactionBoundWitnessWithStorageMeta","AllowedBlockPayloadSchemas","TransferSchema","ChainStakeIntentSchema","SchemaSchema","BoundWitnessSchema","HashSchema","isAllowedBlockPayloadSchema","value","isSchema","includes","isAllowedBlockPayload","isTransfer","isChainStakeIntent","isSchemaPayload","isTransactionBoundWitness","isHashPayload","isAllowedBlockPayloadWithHashStorageMeta","isHashStorageMeta","isHex","AsObjectFactory","isBoundWitness","isStorageMeta","isBlockBoundWitness","value","typedObj","isBoundWitness","Number","isInteger","block","isHex","chain","isBlockBoundWitnessWithStorageMeta","isStorageMeta","asBlockBoundWitness","AsObjectFactory","create","asOptionalBlockBoundWitness","createOptional","asBlockBoundWitnessWithStorageMeta","asOptionalBlockBoundWitnessWithStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","BlockNumberSchema","isBlockNumber","asBlockNumber","create","asOptionalBlockNumber","createOptional","isBlockNumberWithSources","asBlockNumberWithSources","asOptionalBlockNumberWithSources","StepSizes","isPayloadOfSchemaType","ChainIdentificationPayloadSchema","isChainIdentificationPayload","isPayloadOfSchemaType","ChainInformationPayloadSchema","isChainInformationPayload","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta","ChainIndexingServiceStateSchema","isChainIndexingServiceState","payload","isPayloadOfSchemaType","asChainIndexingServiceState","AsObjectFactory","create","isChainIndexingServiceStateWithStorageMeta","value","isStorageMeta","asChainIndexingServiceStateWithStorageMeta","asOptionalChainIndexingServiceStateWithStorageMeta","createOptional"]}
1
+ {"version":3,"sources":["../../src/ethereum.ts","../../src/network/Status.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/protocol/AllowedBlockPayload.ts","../../src/protocol/TransactionBoundWitness.ts","../../src/protocol/BlockBoundWitness.ts","../../src/protocol/BlockNumber.ts","../../src/protocol/Steps.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["import type { Hex } from '@xylabs/hex'\nimport { toHex } from '@xylabs/hex'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { getAddress } from 'ethers'\nimport { parseUnits } from 'ethers/utils'\n\nexport interface GasConfig {\n gasLimit?: number\n gasPrice?: bigint\n}\n\nexport const getDefaultGasConfig = (): GasConfig => {\n return {\n gasLimit: 2_000_000, // Set the gas limit\n gasPrice: parseUnits('100', 'gwei'),\n }\n}\n\nexport type EthAddress = Hex\n\nexport const ETH_ZERO_ADDRESS: EthAddress = '0x0000000000000000000000000000000000000000' as const\n\nexport const toEthAddress = (value: bigint | string | AccountInstance): EthAddress => {\n const address = (typeof value === 'object') ? value.address : value\n return getAddress(toHex(address, { prefix: true, bitLength: 160 })) as EthAddress\n}\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 { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../../protocol/BlockDuration.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 { 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 './TransactionBoundWitness.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 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 {\n FromFields,\n OptionalExecutable,\n} from '../payload/index.ts'\nimport type { BlockDuration } from './BlockDuration.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","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","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","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956]\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":";;;;AACA,SAASA,aAAa;AAEtB,SAASC,kBAAkB;AAC3B,SAASC,kBAAkB;AAOpB,IAAMC,sBAAsB,6BAAA;AACjC,SAAO;IACLC,UAAU;IACVC,UAAUC,WAAW,OAAO,MAAA;EAC9B;AACF,GALmC;AAS5B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AAA;AAC1D,IAAMG,wBAAwBP,iBAAgBQ,eAA4BJ,aAAAA;AAK1E,IAAMK,2BAA2BP,iCAA8CC,iBAAAA;AAC/E,IAAMO,2BAA2BV,iBAAgBM,OAAiCG,wBAAAA;AAClF,IAAME,mCAAmCX,iBAAgBQ,eAAyCC,wBAAAA;;;ACtClG,IAAMG,YAAY;EAAC;EAAI;EAAK;EAAM;EAAQ;EAAS;EAAW;;;;ACErE,SAASC,yBAAAA,8BAA6B;AAE/B,IAAMC,mCAAmC;AAYzC,IAAMC,+BAA+BF,uBAAkDC,gCAAAA;;;ACf9F,SAASE,yBAAAA,8BAA6B;AAE/B,IAAMC,gCAAgC;AAgBtC,IAAMC,4BAA4BF,uBAA+CC,6BAAAA;;;ACjBxF,SAASE,mBAAAA,wBAAuB;AAEhC,SAASC,yBAAAA,wBAAuBC,iBAAAA,sBAAqB;AAiB9C,IAAMC,kCAAkC;AAWxC,IAAMC,8BAA8B,wBAAkCC,YAAAA;AAC3E,SAAOC,uBAAoDH,+BAAAA,EAAiCE,OAAAA;AAC9F,GAF2C;AAGpC,IAAME,8BAA8BC,iBAAgBC,OAA6CL,2BAAAA;AAEjG,IAAMM,6CACX,wBAAkCC,UAClCP,4BAA+BO,KAAAA,KAAUC,eAAcD,KAAAA,GADvD;AAGK,IAAME,6CACXL,iBAAgBC,OAAmDC,0CAAAA;AAE9D,IAAMI,qDACXN,iBAAgBO,eAA2DL,0CAAAA;","names":["toHex","getAddress","parseUnits","getDefaultGasConfig","gasLimit","gasPrice","parseUnits","ETH_ZERO_ADDRESS","toEthAddress","value","address","getAddress","toHex","prefix","bitLength","isPayloadOfSchemaType","NetworkStatusSchema","isNetworkStatus","AsObjectFactory","isPayloadOfSchemaType","ChainStakeIntentSchema","isChainStakeIntent","x","isPayloadOfSchemaType","asNonNegativeInteger","nbf","undefined","exp","asChainStakeIntent","AsObjectFactory","create","asOptionalChainStakeIntent","createOptional","num","Number","isInteger","isAnyPayload","hasFrom","value","from","undefined","isExecutable","isAnyPayload","Array","isArray","script","asExecutable","AsObjectFactory","isPayloadOfSchemaType","HashSchema","isHashPayload","asHashPayload","create","asHashPayloadWithStorageMeta","asOptionalHashPayload","createOptional","AsObjectFactory","isPayloadOfSchemaType","TransferSchema","isTransfer","asTransfer","create","asOptionalTransfer","createOptional","BoundWitnessSchema","isHashStorageMeta","isSchema","isSchemaPayload","SchemaSchema","AsObjectFactory","isBoundWitness","isStorageMeta","isTransactionBoundWitness","value","typedObj","isBoundWitness","chain","undefined","fees","exp","nbf","isSignedTransactionBoundWitness","isSigned","$signatures","length","addresses","isTransactionBoundWitnessWithStorageMeta","isStorageMeta","isSignedTransactionBoundWitnessWithStorageMeta","asTransactionBoundWitness","AsObjectFactory","create","asOptionalTransactionBoundWitness","createOptional","asTransactionBoundWitnessWithStorageMeta","asOptionalTransactionBoundWitnessWithStorageMeta","AllowedBlockPayloadSchemas","TransferSchema","ChainStakeIntentSchema","SchemaSchema","BoundWitnessSchema","HashSchema","isAllowedBlockPayloadSchema","value","isSchema","includes","isAllowedBlockPayload","isTransfer","isChainStakeIntent","isSchemaPayload","isTransactionBoundWitness","isHashPayload","isAllowedBlockPayloadWithHashStorageMeta","isHashStorageMeta","isHex","AsObjectFactory","isBoundWitness","isStorageMeta","isBlockBoundWitness","value","typedObj","isBoundWitness","Number","isInteger","block","isHex","chain","isBlockBoundWitnessWithStorageMeta","isStorageMeta","asBlockBoundWitness","AsObjectFactory","create","asOptionalBlockBoundWitness","createOptional","asBlockBoundWitnessWithStorageMeta","asOptionalBlockBoundWitnessWithStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","BlockNumberSchema","isBlockNumber","asBlockNumber","create","asOptionalBlockNumber","createOptional","isBlockNumberWithSources","asBlockNumberWithSources","asOptionalBlockNumberWithSources","StepSizes","isPayloadOfSchemaType","ChainIdentificationPayloadSchema","isChainIdentificationPayload","isPayloadOfSchemaType","ChainInformationPayloadSchema","isChainInformationPayload","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta","ChainIndexingServiceStateSchema","isChainIndexingServiceState","payload","isPayloadOfSchemaType","asChainIndexingServiceState","AsObjectFactory","create","isChainIndexingServiceStateWithStorageMeta","value","isStorageMeta","asChainIndexingServiceStateWithStorageMeta","asOptionalChainIndexingServiceStateWithStorageMeta","createOptional"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ethereum.ts","../../src/network/Status.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/protocol/AllowedBlockPayload.ts","../../src/protocol/TransactionBoundWitness.ts","../../src/protocol/BlockBoundWitness.ts","../../src/protocol/BlockNumber.ts","../../src/protocol/Steps.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["import type { Hex } from '@xylabs/hex'\nimport { toHex } from '@xylabs/hex'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { getAddress } from 'ethers'\nimport { parseUnits } from 'ethers/utils'\n\nexport interface GasConfig {\n gasLimit?: number\n gasPrice?: bigint\n}\n\nexport const getDefaultGasConfig = (): GasConfig => {\n return {\n gasLimit: 2_000_000, // Set the gas limit\n gasPrice: parseUnits('100', 'gwei'),\n }\n}\n\nexport type EthAddress = Hex\n\nexport const ETH_ZERO_ADDRESS: EthAddress = '0x0000000000000000000000000000000000000000' as const\n\nexport const toEthAddress = (value: bigint | string | AccountInstance): EthAddress => {\n const address = (typeof value === 'object') ? value.address : value\n return getAddress(toHex(address, { prefix: true, bitLength: 160 })) as EthAddress\n}\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'\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 { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../../protocol/BlockDuration.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 { 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 './TransactionBoundWitness.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 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 {\n FromFields,\n OptionalExecutable,\n} from '../payload/index.ts'\nimport type { BlockDuration } from './BlockDuration.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","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","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","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956]\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":";;;;AACA,SAASA,aAAa;AAEtB,SAASC,kBAAkB;AAC3B,SAASC,kBAAkB;AAOpB,IAAMC,sBAAsB,6BAAA;AACjC,SAAO;IACLC,UAAU;IACVC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iBAAAA;AACzD,IAAME,gBAAgBL,iBAAgBM,OAAoBF,aAAAA;AAC1D,IAAMG,wBAAwBP,iBAAgBQ,eAA4BJ,aAAAA;AAK1E,IAAMK,2BAA2BP,iCAA8CC,iBAAAA;AAC/E,IAAMO,2BAA2BV,iBAAgBM,OAAiCG,wBAAAA;AAClF,IAAME,mCAAmCX,iBAAgBQ,eAAyCC,wBAAAA;;;ACtClG,IAAMG,YAAY;EAAC;EAAI;EAAK;EAAM;EAAQ;EAAS;EAAW;;;;ACErE,SAASC,yBAAAA,8BAA6B;AAE/B,IAAMC,mCAAmC;AAYzC,IAAMC,+BAA+BF,uBAAkDC,gCAAAA;;;ACf9F,SAASE,yBAAAA,8BAA6B;AAE/B,IAAMC,gCAAgC;AAgBtC,IAAMC,4BAA4BF,uBAA+CC,6BAAAA;;;ACjBxF,SAASE,mBAAAA,wBAAuB;AAEhC,SAASC,yBAAAA,wBAAuBC,iBAAAA,sBAAqB;AAiB9C,IAAMC,kCAAkC;AAWxC,IAAMC,8BAA8B,wBAAkCC,YAAAA;AAC3E,SAAOC,uBAAoDH,+BAAAA,EAAiCE,OAAAA;AAC9F,GAF2C;AAGpC,IAAME,8BAA8BC,iBAAgBC,OAA6CL,2BAAAA;AAEjG,IAAMM,6CACX,wBAAkCC,UAClCP,4BAA+BO,KAAAA,KAAUC,eAAcD,KAAAA,GADvD;AAGK,IAAME,6CACXL,iBAAgBC,OAAmDC,0CAAAA;AAE9D,IAAMI,qDACXN,iBAAgBO,eAA2DL,0CAAAA;","names":["toHex","getAddress","parseUnits","getDefaultGasConfig","gasLimit","gasPrice","parseUnits","ETH_ZERO_ADDRESS","toEthAddress","value","address","getAddress","toHex","prefix","bitLength","isPayloadOfSchemaType","NetworkStatusSchema","isNetworkStatus","AsObjectFactory","isPayloadOfSchemaType","ChainStakeIntentSchema","isChainStakeIntent","x","isPayloadOfSchemaType","asNonNegativeInteger","nbf","undefined","exp","asChainStakeIntent","AsObjectFactory","create","asOptionalChainStakeIntent","createOptional","num","Number","isInteger","isAnyPayload","hasFrom","value","from","undefined","isExecutable","isAnyPayload","Array","isArray","script","asExecutable","AsObjectFactory","isPayloadOfSchemaType","HashSchema","isHashPayload","asHashPayload","create","asHashPayloadWithStorageMeta","asOptionalHashPayload","createOptional","AsObjectFactory","isPayloadOfSchemaType","TransferSchema","isTransfer","asTransfer","create","asOptionalTransfer","createOptional","BoundWitnessSchema","isHashStorageMeta","isSchema","isSchemaPayload","SchemaSchema","AsObjectFactory","isBoundWitness","isStorageMeta","isTransactionBoundWitness","value","typedObj","isBoundWitness","chain","undefined","fees","exp","nbf","isSignedTransactionBoundWitness","isSigned","$signatures","length","addresses","isTransactionBoundWitnessWithStorageMeta","isStorageMeta","isSignedTransactionBoundWitnessWithStorageMeta","asTransactionBoundWitness","AsObjectFactory","create","asOptionalTransactionBoundWitness","createOptional","asTransactionBoundWitnessWithStorageMeta","asOptionalTransactionBoundWitnessWithStorageMeta","AllowedBlockPayloadSchemas","TransferSchema","ChainStakeIntentSchema","SchemaSchema","BoundWitnessSchema","HashSchema","isAllowedBlockPayloadSchema","value","isSchema","includes","isAllowedBlockPayload","isTransfer","isChainStakeIntent","isSchemaPayload","isTransactionBoundWitness","isHashPayload","isAllowedBlockPayloadWithHashStorageMeta","isHashStorageMeta","isHex","AsObjectFactory","isBoundWitness","isStorageMeta","isBlockBoundWitness","value","typedObj","isBoundWitness","Number","isInteger","block","isHex","chain","isBlockBoundWitnessWithStorageMeta","isStorageMeta","asBlockBoundWitness","AsObjectFactory","create","asOptionalBlockBoundWitness","createOptional","asBlockBoundWitnessWithStorageMeta","asOptionalBlockBoundWitnessWithStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","BlockNumberSchema","isBlockNumber","asBlockNumber","create","asOptionalBlockNumber","createOptional","isBlockNumberWithSources","asBlockNumberWithSources","asOptionalBlockNumberWithSources","StepSizes","isPayloadOfSchemaType","ChainIdentificationPayloadSchema","isChainIdentificationPayload","isPayloadOfSchemaType","ChainInformationPayloadSchema","isChainInformationPayload","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta","ChainIndexingServiceStateSchema","isChainIndexingServiceState","payload","isPayloadOfSchemaType","asChainIndexingServiceState","AsObjectFactory","create","isChainIndexingServiceStateWithStorageMeta","value","isStorageMeta","asChainIndexingServiceStateWithStorageMeta","asOptionalChainIndexingServiceStateWithStorageMeta","createOptional"]}
1
+ {"version":3,"sources":["../../src/ethereum.ts","../../src/network/Status.ts","../../src/payload/elevatable/ChainStakeIntent.ts","../../src/payload/elevatable/Executable.ts","../../src/payload/elevatable/Hash.ts","../../src/payload/elevatable/TransferPayload.ts","../../src/protocol/AllowedBlockPayload.ts","../../src/protocol/TransactionBoundWitness.ts","../../src/protocol/BlockBoundWitness.ts","../../src/protocol/BlockNumber.ts","../../src/protocol/Steps.ts","../../src/services/Chain/ChainIdentification.ts","../../src/services/Chain/ChainInformation.ts","../../src/services/stakeIntent/ChainIndexingServiceStateSchema.ts"],"sourcesContent":["import type { Hex } from '@xylabs/hex'\nimport { toHex } from '@xylabs/hex'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { getAddress } from 'ethers'\nimport { parseUnits } from 'ethers/utils'\n\nexport interface GasConfig {\n gasLimit?: number\n gasPrice?: bigint\n}\n\nexport const getDefaultGasConfig = (): GasConfig => {\n return {\n gasLimit: 2_000_000, // Set the gas limit\n gasPrice: parseUnits('100', 'gwei'),\n }\n}\n\nexport type EthAddress = Hex\n\nexport const ETH_ZERO_ADDRESS: EthAddress = '0x0000000000000000000000000000000000000000' as const\n\nexport const toEthAddress = (value: bigint | string | AccountInstance): EthAddress => {\n const address = (typeof value === 'object') ? value.address : value\n return getAddress(toHex(address, { prefix: true, bitLength: 160 })) as EthAddress\n}\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 { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { BlockDuration } from '../../protocol/BlockDuration.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 { 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 './TransactionBoundWitness.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 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 {\n FromFields,\n OptionalExecutable,\n} from '../payload/index.ts'\nimport type { BlockDuration } from './BlockDuration.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","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","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","export const StepSizes = [10, 105, 1103, 11_576, 121_551, 1_276_282, 13_400_956]\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":";;;;AACA,SAASA,aAAa;AAEtB,SAASC,kBAAkB;AAC3B,SAASC,kBAAkB;AAOpB,IAAMC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C,oBAAoB;AAqB1B,IAAMC,gBAAgBH,uBAAmCE,iBAAAA;AACzD,IAAME,gBAAgBL,iBAAgBM,OAAoBF,aAAAA;AAC1D,IAAMG,wBAAwBP,iBAAgBQ,eAA4BJ,aAAAA;AAK1E,IAAMK,2BAA2BP,iCAA8CC,iBAAAA;AAC/E,IAAMO,2BAA2BV,iBAAgBM,OAAiCG,wBAAAA;AAClF,IAAME,mCAAmCX,iBAAgBQ,eAAyCC,wBAAAA;;;ACtClG,IAAMG,YAAY;EAAC;EAAI;EAAK;EAAM;EAAQ;EAAS;EAAW;;;;ACErE,SAASC,yBAAAA,8BAA6B;AAE/B,IAAMC,mCAAmC;AAYzC,IAAMC,+BAA+BF,uBAAkDC,gCAAAA;;;ACf9F,SAASE,yBAAAA,8BAA6B;AAE/B,IAAMC,gCAAgC;AAgBtC,IAAMC,4BAA4BF,uBAA+CC,6BAAAA;;;ACjBxF,SAASE,mBAAAA,wBAAuB;AAEhC,SAASC,yBAAAA,wBAAuBC,iBAAAA,sBAAqB;AAiB9C,IAAMC,kCAAkC;AAWxC,IAAMC,8BAA8B,wBAAkCC,YAAAA;AAC3E,SAAOC,uBAAoDH,+BAAAA,EAAiCE,OAAAA;AAC9F,GAF2C;AAGpC,IAAME,8BAA8BC,iBAAgBC,OAA6CL,2BAAAA;AAEjG,IAAMM,6CACX,wBAAkCC,UAClCP,4BAA+BO,KAAAA,KAAUC,eAAcD,KAAAA,GADvD;AAGK,IAAME,6CACXL,iBAAgBC,OAAmDC,0CAAAA;AAE9D,IAAMI,qDACXN,iBAAgBO,eAA2DL,0CAAAA;","names":["toHex","getAddress","parseUnits","getDefaultGasConfig","gasLimit","gasPrice","parseUnits","ETH_ZERO_ADDRESS","toEthAddress","value","address","getAddress","toHex","prefix","bitLength","isPayloadOfSchemaType","NetworkStatusSchema","isNetworkStatus","AsObjectFactory","isPayloadOfSchemaType","ChainStakeIntentSchema","isChainStakeIntent","x","isPayloadOfSchemaType","asNonNegativeInteger","nbf","undefined","exp","asChainStakeIntent","AsObjectFactory","create","asOptionalChainStakeIntent","createOptional","num","Number","isInteger","isAnyPayload","hasFrom","value","from","undefined","isExecutable","isAnyPayload","Array","isArray","script","asExecutable","AsObjectFactory","isPayloadOfSchemaType","HashSchema","isHashPayload","asHashPayload","create","asHashPayloadWithStorageMeta","asOptionalHashPayload","createOptional","AsObjectFactory","isPayloadOfSchemaType","TransferSchema","isTransfer","asTransfer","create","asOptionalTransfer","createOptional","BoundWitnessSchema","isHashStorageMeta","isSchema","isSchemaPayload","SchemaSchema","AsObjectFactory","isBoundWitness","isStorageMeta","isTransactionBoundWitness","value","typedObj","isBoundWitness","chain","undefined","fees","exp","nbf","isSignedTransactionBoundWitness","isSigned","$signatures","length","addresses","isTransactionBoundWitnessWithStorageMeta","isStorageMeta","isSignedTransactionBoundWitnessWithStorageMeta","asTransactionBoundWitness","AsObjectFactory","create","asOptionalTransactionBoundWitness","createOptional","asTransactionBoundWitnessWithStorageMeta","asOptionalTransactionBoundWitnessWithStorageMeta","AllowedBlockPayloadSchemas","TransferSchema","ChainStakeIntentSchema","SchemaSchema","BoundWitnessSchema","HashSchema","isAllowedBlockPayloadSchema","value","isSchema","includes","isAllowedBlockPayload","isTransfer","isChainStakeIntent","isSchemaPayload","isTransactionBoundWitness","isHashPayload","isAllowedBlockPayloadWithHashStorageMeta","isHashStorageMeta","isHex","AsObjectFactory","isBoundWitness","isStorageMeta","isBlockBoundWitness","value","typedObj","isBoundWitness","Number","isInteger","block","isHex","chain","isBlockBoundWitnessWithStorageMeta","isStorageMeta","asBlockBoundWitness","AsObjectFactory","create","asOptionalBlockBoundWitness","createOptional","asBlockBoundWitnessWithStorageMeta","asOptionalBlockBoundWitnessWithStorageMeta","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","BlockNumberSchema","isBlockNumber","asBlockNumber","create","asOptionalBlockNumber","createOptional","isBlockNumberWithSources","asBlockNumberWithSources","asOptionalBlockNumberWithSources","StepSizes","isPayloadOfSchemaType","ChainIdentificationPayloadSchema","isChainIdentificationPayload","isPayloadOfSchemaType","ChainInformationPayloadSchema","isChainInformationPayload","AsObjectFactory","isPayloadOfSchemaType","isStorageMeta","ChainIndexingServiceStateSchema","isChainIndexingServiceState","payload","isPayloadOfSchemaType","asChainIndexingServiceState","AsObjectFactory","create","isChainIndexingServiceStateWithStorageMeta","value","isStorageMeta","asChainIndexingServiceStateWithStorageMeta","asOptionalChainIndexingServiceStateWithStorageMeta","createOptional"]}
@@ -1,7 +1,7 @@
1
1
  import type { BaseParams } from '@xylabs/base';
2
2
  import type { Hash } from '@xylabs/hex';
3
3
  import type { ArchivistInstance } from '@xyo-network/archivist-model';
4
- import type { BaseEmitter } from '@xyo-network/module-event-emitter';
4
+ import type { ModuleBaseEmitter } from '@xyo-network/module-event-emitter';
5
5
  import type { ChainIteratorEventData } from './ChainIteratorEventData.ts';
6
6
  import type { BlockBoundWitness } from './protocol/index.ts';
7
7
  import type { IterableRepository, ReadRepository } from './repository/index.ts';
@@ -12,7 +12,7 @@ export interface ChainIterator<TKey, THead> extends ReadRepository<TKey, BlockBo
12
12
  previous(cursor?: TKey | undefined, limit?: number): Promise<BlockBoundWitness[]>;
13
13
  updateHead(head: THead): Promise<void>;
14
14
  }
15
- export interface EventingChainIterator<TKey, THead> extends ChainIterator<TKey, THead>, BaseEmitter<BaseParams, ChainIteratorEventData> {
15
+ export interface EventingChainIterator<TKey, THead> extends ChainIterator<TKey, THead>, ModuleBaseEmitter<BaseParams, ChainIteratorEventData> {
16
16
  }
17
17
  export interface ChainBlockNumberIterator extends ChainIterator<number, BlockBoundWitness> {
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ChainIterator.d.ts","sourceRoot":"","sources":["../../src/ChainIterator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KA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Aa,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,iBAAiB,CAAC,UAAU,EAAE,sBAAsB,CAAC;CAAI;AAEjJ,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,4 +1,4 @@
1
- import type { EventData } from '@xyo-network/module-events';
1
+ import type { EventData } from '@xylabs/events';
2
2
  import type { BlockBoundWitness } from './protocol/index.ts';
3
3
  export type HeadEventArgs = {
4
4
  blocks: [BlockBoundWitness];
@@ -1 +1 @@
1
- {"version":3,"file":"ChainIteratorEventData.d.ts","sourceRoot":"","sources":["../../src/ChainIteratorEventData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,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;CAAG"}
1
+ {"version":3,"file":"ChainIteratorEventData.d.ts","sourceRoot":"","sources":["../../src/ChainIteratorEventData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,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"}
@@ -0,0 +1,2 @@
1
+ export type NetworkId = 'mainnet' | 'sequence' | 'local';
2
+ //# sourceMappingURL=NetworkId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworkId.d.ts","sourceRoot":"","sources":["../../../src/network/NetworkId.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { Payload } from '@xyo-network/payload-model';
2
2
  export declare const NetworkStatusSchema: "network.xyo.chain.status";
3
3
  export type NetworkStatusSchema = typeof NetworkStatusSchema;
4
- export type NetworkStatusState = 'online' | 'offline' | 'degraded';
4
+ export type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown';
5
5
  export type NetworkStatusUpdate = {
6
6
  end: number;
7
7
  start: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/network/Status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,eAAO,MAAM,mBAAmB,EAAG,0BAAmC,CAAA;AACtE,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;AAElE,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,kBAAkB,CAAA;IACzB,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAChC;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAE7E,eAAO,MAAM,eAAe,4CAA4D,CAAA"}
1
+ {"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/network/Status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,eAAO,MAAM,mBAAmB,EAAG,0BAAmC,CAAA;AACtE,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAA;AAE9E,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,kBAAkB,CAAA;IACzB,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAChC;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAE7E,eAAO,MAAM,eAAe,4CAA4D,CAAA"}
@@ -1,2 +1,3 @@
1
+ export * from './NetworkId.ts';
1
2
  export * from './Status.ts';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/network/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/network/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/xl1-protocol",
4
- "version": "1.3.13",
4
+ "version": "1.3.15",
5
5
  "description": "XYO Layer One Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -31,19 +31,20 @@
31
31
  "types": "./dist/types/index.d.ts",
32
32
  "dependencies": {
33
33
  "@opentelemetry/api": "^1.9.0",
34
- "@xylabs/base": "^4.9.15",
35
- "@xylabs/hex": "^4.9.15",
36
- "@xylabs/logger": "^4.9.15",
37
- "@xylabs/object": "^4.9.15",
38
- "@xylabs/promise": "^4.9.15",
39
- "@xyo-network/account-model": "^3.15.5",
40
- "@xyo-network/archivist-model": "^3.15.5",
41
- "@xyo-network/boundwitness-model": "^3.15.5",
42
- "@xyo-network/module-event-emitter": "^3.15.5",
43
- "@xyo-network/module-events": "^3.15.5",
44
- "@xyo-network/payload-model": "^3.15.5",
45
- "@xyo-network/schema-payload-plugin": "^3.15.5",
46
- "@xyo-network/wallet-model": "^3.15.5",
34
+ "@xylabs/base": "^4.9.17",
35
+ "@xylabs/events": "^4.9.17",
36
+ "@xylabs/hex": "^4.9.17",
37
+ "@xylabs/logger": "^4.9.17",
38
+ "@xylabs/object": "^4.9.17",
39
+ "@xylabs/promise": "^4.9.17",
40
+ "@xyo-network/account-model": "^3.15.7",
41
+ "@xyo-network/archivist-model": "^3.15.7",
42
+ "@xyo-network/boundwitness-model": "^3.15.7",
43
+ "@xyo-network/module-event-emitter": "^3.15.7",
44
+ "@xyo-network/module-events": "^3.15.7",
45
+ "@xyo-network/payload-model": "^3.15.7",
46
+ "@xyo-network/schema-payload-plugin": "^3.15.7",
47
+ "@xyo-network/wallet-model": "^3.15.7",
47
48
  "ethers": "6.14.0"
48
49
  },
49
50
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  import type { BaseParams } from '@xylabs/base'
2
2
  import type { Hash } from '@xylabs/hex'
3
3
  import type { ArchivistInstance } from '@xyo-network/archivist-model'
4
- import type { BaseEmitter } from '@xyo-network/module-event-emitter'
4
+ import type { ModuleBaseEmitter } from '@xyo-network/module-event-emitter'
5
5
 
6
6
  import type { ChainIteratorEventData } from './ChainIteratorEventData.ts'
7
7
  import type { BlockBoundWitness } from './protocol/index.ts'
@@ -15,7 +15,7 @@ export interface ChainIterator<TKey, THead> extends ReadRepository<TKey, BlockBo
15
15
  updateHead(head: THead): Promise<void>
16
16
  }
17
17
 
18
- export interface EventingChainIterator<TKey, THead> extends ChainIterator<TKey, THead>, BaseEmitter<BaseParams, ChainIteratorEventData> { }
18
+ export interface EventingChainIterator<TKey, THead> extends ChainIterator<TKey, THead>, ModuleBaseEmitter<BaseParams, ChainIteratorEventData> { }
19
19
 
20
20
  export interface ChainBlockNumberIterator extends ChainIterator<number, BlockBoundWitness> { }
21
21
  export interface EventingChainBlockNumberIterator extends EventingChainIterator<number, BlockBoundWitness> { }
@@ -1,4 +1,4 @@
1
- import type { EventData } from '@xyo-network/module-events'
1
+ import type { EventData } from '@xylabs/events'
2
2
 
3
3
  import type { BlockBoundWitness } from './protocol/index.ts'
4
4
 
@@ -8,4 +8,4 @@ export interface HeadEventData extends EventData {
8
8
  headUpdated: HeadEventArgs
9
9
  }
10
10
 
11
- export interface ChainIteratorEventData extends HeadEventData {}
11
+ export interface ChainIteratorEventData extends HeadEventData { }
@@ -0,0 +1 @@
1
+ export type NetworkId = 'mainnet' | 'sequence' | 'local'
@@ -4,7 +4,7 @@ import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
4
4
  export const NetworkStatusSchema = 'network.xyo.chain.status' as const
5
5
  export type NetworkStatusSchema = typeof NetworkStatusSchema
6
6
 
7
- export type NetworkStatusState = 'online' | 'offline' | 'degraded'
7
+ export type NetworkStatusState = 'online' | 'offline' | 'degraded' | 'unknown'
8
8
 
9
9
  export type NetworkStatusUpdate = {
10
10
  end: number
@@ -1 +1,2 @@
1
+ export * from './NetworkId.ts'
1
2
  export * from './Status.ts'