@xyo-network/xl1-protocol 1.3.20 → 1.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/index.mjs +56 -74
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/index.mjs +56 -74
- package/dist/node/index.mjs.map +1 -1
- package/dist/types/BlockDuration.d.ts.map +1 -0
- package/dist/types/ChainIterator.d.ts +3 -3
- package/dist/types/ChainIterator.d.ts.map +1 -1
- package/dist/types/ChainIteratorEventData.d.ts +1 -1
- package/dist/types/ChainIteratorEventData.d.ts.map +1 -1
- package/dist/types/ChainReference.d.ts.map +1 -0
- package/dist/types/Initializable.d.ts.map +1 -0
- package/dist/types/Steps.d.ts.map +1 -0
- package/dist/types/{protocol → block}/AllowedBlockPayload.d.ts +2 -2
- package/dist/types/block/AllowedBlockPayload.d.ts.map +1 -0
- package/dist/types/block/BlockBoundWitness.d.ts.map +1 -0
- package/dist/types/block/HydratedBlock.d.ts.map +1 -0
- package/dist/types/block/index.d.ts +4 -0
- package/dist/types/block/index.d.ts.map +1 -0
- package/dist/types/{protocol → chain}/ChainAnalyzer.d.ts +1 -1
- package/dist/types/chain/ChainAnalyzer.d.ts.map +1 -0
- package/dist/types/chain/index.d.ts +1 -2
- package/dist/types/chain/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/payload/elevatable/ChainStakeIntent.d.ts +1 -1
- package/dist/types/payload/elevatable/ChainStakeIntent.d.ts.map +1 -1
- package/dist/types/provider/v1/XyoNetwork.d.ts +1 -1
- package/dist/types/provider/v1/XyoNetwork.d.ts.map +1 -1
- package/dist/types/provider/v1/XyoProvider.d.ts +2 -1
- package/dist/types/provider/v1/XyoProvider.d.ts.map +1 -1
- package/dist/types/provider/v1/XyoRunner.d.ts +1 -1
- package/dist/types/provider/v1/XyoRunner.d.ts.map +1 -1
- package/dist/types/provider/v1/XyoSigner.d.ts +2 -1
- package/dist/types/provider/v1/XyoSigner.d.ts.map +1 -1
- package/dist/types/provider/v1/XyoViewer.d.ts +3 -2
- package/dist/types/provider/v1/XyoViewer.d.ts.map +1 -1
- package/dist/types/provider/v2/viewer/Account.d.ts +1 -1
- package/dist/types/provider/v2/viewer/Account.d.ts.map +1 -1
- package/dist/types/provider/v2/viewer/Block.d.ts +1 -1
- package/dist/types/provider/v2/viewer/Block.d.ts.map +1 -1
- package/dist/types/provider/v2/viewer/Chain.d.ts +1 -1
- package/dist/types/provider/v2/viewer/Chain.d.ts.map +1 -1
- package/dist/types/provider/v2/viewer/Transaction.d.ts +1 -1
- package/dist/types/provider/v2/viewer/Transaction.d.ts.map +1 -1
- package/dist/types/provider/v2/viewer/Xyo.d.ts +1 -1
- package/dist/types/provider/v2/viewer/Xyo.d.ts.map +1 -1
- package/dist/types/repository/TransactionReadRepository.d.ts +1 -1
- package/dist/types/repository/TransactionReadRepository.d.ts.map +1 -1
- package/dist/types/repository/TransactionRepositoryIterator.d.ts +1 -1
- package/dist/types/repository/TransactionRepositoryIterator.d.ts.map +1 -1
- package/dist/types/repository/TransactionWriteRepository.d.ts +1 -1
- package/dist/types/repository/TransactionWriteRepository.d.ts.map +1 -1
- package/dist/types/services/BlockProducer.d.ts +2 -2
- package/dist/types/services/BlockProducer.d.ts.map +1 -1
- package/dist/types/{chain → services}/ChainServiceCollection.d.ts +6 -1
- package/dist/types/services/ChainServiceCollection.d.ts.map +1 -0
- package/dist/types/services/Election.d.ts +1 -1
- package/dist/types/services/Election.d.ts.map +1 -1
- package/dist/types/services/PendingTransactionsService.d.ts +1 -1
- package/dist/types/services/PendingTransactionsService.d.ts.map +1 -1
- package/dist/types/services/index.d.ts +1 -0
- package/dist/types/services/index.d.ts.map +1 -1
- package/dist/types/services/stakeIntent/StakeIntentService.d.ts +1 -1
- package/dist/types/services/stakeIntent/StakeIntentService.d.ts.map +1 -1
- package/dist/types/transaction/HydratedTransaction.d.ts.map +1 -0
- package/dist/types/{protocol → transaction}/TransactionBoundWitness.d.ts +2 -2
- package/dist/types/transaction/TransactionBoundWitness.d.ts.map +1 -0
- package/dist/types/transaction/TransactionFeesFields.d.ts.map +1 -0
- package/dist/types/transaction/index.d.ts +4 -0
- package/dist/types/transaction/index.d.ts.map +1 -0
- package/dist/types/validation/block/BlockValidationFunction.d.ts +1 -1
- package/dist/types/validation/block/BlockValidationFunction.d.ts.map +1 -1
- package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts +1 -1
- package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts.map +1 -1
- package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts +1 -1
- package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts.map +1 -1
- package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts +1 -1
- package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts.map +1 -1
- package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts +1 -1
- package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map +1 -1
- package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts +1 -2
- package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +1 -1
- package/eslint.config.mjs +6 -2
- package/knip.config.ts +1 -1
- package/package.json +1 -3
- package/src/ChainIterator.ts +4 -3
- package/src/ChainIteratorEventData.ts +1 -1
- package/src/{protocol → block}/AllowedBlockPayload.ts +3 -3
- package/src/block/index.ts +3 -0
- package/src/{protocol → chain}/ChainAnalyzer.ts +1 -1
- package/src/chain/index.ts +1 -2
- package/src/index.ts +5 -3
- package/src/payload/elevatable/ChainStakeIntent.ts +1 -1
- package/src/provider/v1/XyoNetwork.ts +1 -1
- package/src/provider/v1/XyoProvider.ts +3 -3
- package/src/provider/v1/XyoRunner.ts +1 -1
- package/src/provider/v1/XyoSigner.ts +2 -3
- package/src/provider/v1/XyoViewer.ts +3 -4
- package/src/provider/v2/viewer/Account.ts +1 -1
- package/src/provider/v2/viewer/Block.ts +2 -1
- package/src/provider/v2/viewer/Chain.ts +2 -1
- package/src/provider/v2/viewer/Transaction.ts +2 -1
- package/src/provider/v2/viewer/Xyo.ts +1 -1
- package/src/repository/TransactionReadRepository.ts +2 -1
- package/src/repository/TransactionRepositoryIterator.ts +2 -1
- package/src/repository/TransactionWriteRepository.ts +2 -1
- package/src/services/BlockProducer.ts +3 -2
- package/src/{chain → services}/ChainServiceCollection.ts +7 -4
- package/src/services/Election.ts +2 -1
- package/src/services/PendingTransactionsService.ts +2 -1
- package/src/services/index.ts +1 -0
- package/src/services/stakeIntent/StakeIntentService.ts +1 -1
- package/src/{protocol → transaction}/TransactionBoundWitness.ts +3 -2
- package/src/transaction/index.ts +3 -0
- package/src/validation/block/BlockValidationFunction.ts +1 -1
- package/src/validation/block/HydratedBlockStateValidationFunction.ts +1 -1
- package/src/validation/block/HydratedBlockValidationFunction.ts +1 -1
- package/src/validation/payload/InBlockPayloadValidationFunction.ts +1 -1
- package/src/validation/transaction/HydratedTransactionStateValidationFunction.ts +1 -1
- package/src/validation/transaction/HydratedTransactionValidationFunction.ts +3 -2
- package/dist/types/chain/ChainServiceCollection.d.ts.map +0 -1
- package/dist/types/chain/Initializable.d.ts.map +0 -1
- package/dist/types/protocol/AllowedBlockPayload.d.ts.map +0 -1
- package/dist/types/protocol/BlockBoundWitness.d.ts.map +0 -1
- package/dist/types/protocol/BlockDuration.d.ts.map +0 -1
- package/dist/types/protocol/BlockNumber.d.ts +0 -37
- package/dist/types/protocol/BlockNumber.d.ts.map +0 -1
- package/dist/types/protocol/ChainAnalyzer.d.ts.map +0 -1
- package/dist/types/protocol/ChainReference.d.ts.map +0 -1
- package/dist/types/protocol/HydratedBlock.d.ts.map +0 -1
- package/dist/types/protocol/HydratedTransaction.d.ts.map +0 -1
- package/dist/types/protocol/Issuer.d.ts +0 -5
- package/dist/types/protocol/Issuer.d.ts.map +0 -1
- package/dist/types/protocol/Steps.d.ts.map +0 -1
- package/dist/types/protocol/TransactionBoundWitness.d.ts.map +0 -1
- package/dist/types/protocol/TransactionFeesFields.d.ts.map +0 -1
- package/dist/types/protocol/index.d.ts +0 -13
- package/dist/types/protocol/index.d.ts.map +0 -1
- package/knip.log +0 -491
- package/src/protocol/BlockNumber.ts +0 -39
- package/src/protocol/Issuer.ts +0 -5
- package/src/protocol/index.ts +0 -12
- /package/dist/types/{protocol/BlockDuration.d.ts → BlockDuration.d.ts} +0 -0
- /package/dist/types/{protocol/ChainReference.d.ts → ChainReference.d.ts} +0 -0
- /package/dist/types/{chain/Initializable.d.ts → Initializable.d.ts} +0 -0
- /package/dist/types/{protocol/Steps.d.ts → Steps.d.ts} +0 -0
- /package/dist/types/{protocol → block}/BlockBoundWitness.d.ts +0 -0
- /package/dist/types/{protocol → block}/HydratedBlock.d.ts +0 -0
- /package/dist/types/{protocol → transaction}/HydratedTransaction.d.ts +0 -0
- /package/dist/types/{protocol → transaction}/TransactionFeesFields.d.ts +0 -0
- /package/src/{protocol/BlockDuration.ts → BlockDuration.ts} +0 -0
- /package/src/{protocol/ChainReference.ts → ChainReference.ts} +0 -0
- /package/src/{chain/Initializable.ts → Initializable.ts} +0 -0
- /package/src/{protocol/Steps.ts → Steps.ts} +0 -0
- /package/src/{protocol → block}/BlockBoundWitness.ts +0 -0
- /package/src/{protocol → block}/HydratedBlock.ts +0 -0
- /package/src/{protocol → transaction}/HydratedTransaction.ts +0 -0
- /package/src/{protocol → transaction}/TransactionFeesFields.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StakeIntentService.d.ts","sourceRoot":"","sources":["../../../../src/services/stakeIntent/StakeIntentService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StakeIntentService.d.ts","sourceRoot":"","sources":["../../../../src/services/stakeIntent/StakeIntentService.ts"],"names":[],"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C,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAA;AAE3D,MAAM,MAAM,sCAAsC,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IACnG,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAA;AAEnE,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,mBAAmB,CAAA;AAEjJ,MAAM,MAAM,wCAAwC,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IACrG,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,yBAAyB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { BoundWitness, Signed } from '@xyo-network/boundwitness-model';
|
|
3
3
|
import type { WithStorageMeta } from '@xyo-network/payload-model';
|
|
4
|
-
import type { FromFields, OptionalExecutable } from '
|
|
5
|
-
import type { BlockDuration } from '
|
|
4
|
+
import type { FromFields, OptionalExecutable } from '#payload';
|
|
5
|
+
import type { BlockDuration } from '../BlockDuration.ts';
|
|
6
6
|
import type { TransactionFeesFields } from './TransactionFeesFields.ts';
|
|
7
7
|
export interface TransactionBoundWitnessFields extends BlockDuration, TransactionFeesFields {
|
|
8
8
|
chain: Address;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionBoundWitness.d.ts","sourceRo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E,CAAA;AACxH,eAAO,MAAM,gDAAgD,+HAA2E,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionFeesFields.d.ts","sourceRoot":"","sources":["../../../src/transaction/TransactionFeesFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG;KAC9B,CAAC,IAAI,MAAM,qBAAqB,GAAG,GAAG;CACxC,CAAA;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,kBAAkB,CAAA;CACzB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transaction/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
|
-
import type { BlockBoundWitness } from '
|
|
3
|
+
import type { BlockBoundWitness } from '#block';
|
|
4
4
|
export type BlockValidatorFunction = (block: BlockBoundWitness, chainId?: Address) => Promisable<Error[]>;
|
|
5
5
|
//# sourceMappingURL=BlockValidationFunction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/BlockValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BlockValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/BlockValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAE/C,MAAM,MAAM,sBAAsB,GAAG,CACnC,KAAK,EAAE,iBAAiB,EACxB,OAAO,CAAC,EAAE,OAAO,KACd,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { ReadArchivist } from '@xyo-network/archivist-model';
|
|
4
|
-
import type { HydratedBlock } from '
|
|
4
|
+
import type { HydratedBlock } from '#block';
|
|
5
5
|
/**
|
|
6
6
|
* A function that validates a hydrated block against chain state.
|
|
7
7
|
* @param hydratedBlock The hydrated block to validate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HydratedBlockStateValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/HydratedBlockStateValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HydratedBlockStateValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/HydratedBlockStateValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG,CACjD,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,aAAa,KACrB,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
|
-
import type { HydratedBlock } from '
|
|
3
|
+
import type { HydratedBlock } from '#block';
|
|
4
4
|
/**
|
|
5
5
|
* A function that validates a hydrated block.
|
|
6
6
|
* @param hydratedBlock The hydrated block to validate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HydratedBlockValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/HydratedBlockValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HydratedBlockValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/HydratedBlockValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAC3C,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE,OAAO,KACd,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Promisable } from '@xylabs/promise';
|
|
2
2
|
import type { Payload, WithHashStorageMeta } from '@xyo-network/payload-model';
|
|
3
|
-
import type { HydratedBlock } from '
|
|
3
|
+
import type { HydratedBlock } from '#block';
|
|
4
4
|
export type InBlockPayloadValidationFunction = (payload: WithHashStorageMeta<Payload>, block: HydratedBlock) => Promisable<Error[]>;
|
|
5
5
|
//# sourceMappingURL=InBlockPayloadValidationFunction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InBlockPayloadValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/payload/InBlockPayloadValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"InBlockPayloadValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/payload/InBlockPayloadValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE3C,MAAM,MAAM,gCAAgC,GAAG,CAC7C,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,aAAa,KACxD,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { HydratedBoundWitnessWithStorageMeta, ReadArchivist } from '@xyo-network/archivist-model';
|
|
4
|
-
import type { TransactionBoundWitness } from '
|
|
4
|
+
import type { TransactionBoundWitness } from '#transaction';
|
|
5
5
|
/**
|
|
6
6
|
* A function that validates a hydrated transaction against chain state.
|
|
7
7
|
* @param hydratedTransaction The hydrated transaction to validate.
|
package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HydratedTransactionStateValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/transaction/HydratedTransactionStateValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEtG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HydratedTransactionStateValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/transaction/HydratedTransactionStateValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEtG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAE3D;;;;;;GAMG;AACH,MAAM,MAAM,0CAA0C,CAAC,CAAC,SAAS,uBAAuB,GAAG,uBAAuB,IAAI,CACpH,mBAAmB,EAAE,mCAAmC,CAAC,CAAC,CAAC,EAC3D,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,aAAa,KACrB,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
|
-
import type { HydratedTransaction, HydratedTransactionWithHashStorageMeta } from '
|
|
4
|
-
import type { TransactionBoundWitness } from '../../protocol/TransactionBoundWitness.ts';
|
|
3
|
+
import type { HydratedTransaction, HydratedTransactionWithHashStorageMeta, TransactionBoundWitness } from '#transaction';
|
|
5
4
|
/**
|
|
6
5
|
* A function that validates a hydrated transaction.
|
|
7
6
|
* @param bw The hydrated transaction to validate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HydratedTransactionValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/transaction/HydratedTransactionValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"HydratedTransactionValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/transaction/HydratedTransactionValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EACV,mBAAmB,EAAE,sCAAsC,EAAE,uBAAuB,EACrF,MAAM,cAAc,CAAA;AAErB;;;;;GAKG;AACH,MAAM,MAAM,oCAAoC,CAAC,CAAC,SAAS,uBAAuB,GAAG,uBAAuB,IAAI,CAC9G,mBAAmB,EAAE,sCAAsC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EACnF,OAAO,CAAC,EAAE,OAAO,KACd,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA"}
|
package/eslint.config.mjs
CHANGED
|
@@ -13,12 +13,16 @@ export default [
|
|
|
13
13
|
workspacesConfig,
|
|
14
14
|
rulesConfig,
|
|
15
15
|
typescriptConfig,
|
|
16
|
-
importConfig,
|
|
17
16
|
sonarConfig,
|
|
18
17
|
{
|
|
18
|
+
...importConfig,
|
|
19
19
|
rules: {
|
|
20
|
+
...importConfig.rules,
|
|
21
|
+
'import-x/no-internal-modules': ['warn', { allow: ['vitest/config', 'ethers/utils', '*/index.ts'] }],
|
|
20
22
|
'import-x/no-unresolved': ['off'],
|
|
21
|
-
'import-x/no-
|
|
23
|
+
'import-x/no-relative-packages': ['error'],
|
|
24
|
+
'import-x/no-self-import': ['error'],
|
|
25
|
+
'import-x/no-useless-path-segments': ['warn'],
|
|
22
26
|
'sonarjs/prefer-single-boolean-return': ['off'],
|
|
23
27
|
},
|
|
24
28
|
},
|
package/knip.config.ts
CHANGED
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.
|
|
4
|
+
"version": "1.3.22",
|
|
5
5
|
"description": "XYO Layer One Protocol",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -55,8 +55,6 @@
|
|
|
55
55
|
"eslint": "^9.27.0",
|
|
56
56
|
"eslint-import-resolver-typescript": "^4.3.5",
|
|
57
57
|
"knip": "^5.56.0",
|
|
58
|
-
"react": "^19.1.0",
|
|
59
|
-
"rimraf": "^6.0.1",
|
|
60
58
|
"typescript": "^5.8.3",
|
|
61
59
|
"vite": "^6.3.5",
|
|
62
60
|
"vite-plugin-top-level-await": "^1.5.0",
|
package/src/ChainIterator.ts
CHANGED
|
@@ -3,10 +3,11 @@ import type { BaseEmitter } from '@xylabs/events'
|
|
|
3
3
|
import type { Hash } from '@xylabs/hex'
|
|
4
4
|
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
5
5
|
|
|
6
|
+
import type { BlockBoundWitness } from '#block'
|
|
7
|
+
import type { IterableRepository, ReadRepository } from '#repository'
|
|
8
|
+
import type { BaseServiceParams, ChainIdentification } from '#services'
|
|
9
|
+
|
|
6
10
|
import type { ChainIteratorEventData } from './ChainIteratorEventData.ts'
|
|
7
|
-
import type { BlockBoundWitness } from './protocol/index.ts'
|
|
8
|
-
import type { IterableRepository, ReadRepository } from './repository/index.ts'
|
|
9
|
-
import type { BaseServiceParams, ChainIdentification } from './services/index.ts'
|
|
10
11
|
|
|
11
12
|
export interface ChainIterator<TKey, THead> extends ReadRepository<TKey, BlockBoundWitness>, IterableRepository<TKey, BlockBoundWitness> {
|
|
12
13
|
chainIdentification: ChainIdentification
|
|
@@ -6,11 +6,11 @@ import { isSchemaPayload, SchemaSchema } from '@xyo-network/schema-payload-plugi
|
|
|
6
6
|
|
|
7
7
|
import type {
|
|
8
8
|
ChainStakeIntent, HashPayload, Transfer,
|
|
9
|
-
} from '
|
|
9
|
+
} from '#payload'
|
|
10
10
|
import {
|
|
11
11
|
ChainStakeIntentSchema, HashSchema, isChainStakeIntent, isHashPayload, isTransfer, TransferSchema,
|
|
12
|
-
} from '
|
|
13
|
-
import { isTransactionBoundWitness, type TransactionBoundWitness } from '
|
|
12
|
+
} from '#payload'
|
|
13
|
+
import { isTransactionBoundWitness, type TransactionBoundWitness } from '#transaction'
|
|
14
14
|
|
|
15
15
|
export type AllowedBlockPayload = Transfer | ChainStakeIntent | SchemaPayload | TransactionBoundWitness | HashPayload
|
|
16
16
|
export const AllowedBlockPayloadSchemas: Schema[] = [TransferSchema, ChainStakeIntentSchema, SchemaSchema, BoundWitnessSchema, HashSchema]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Promisable } from '@xylabs/promise'
|
|
2
2
|
import type { Payload } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import type { HydratedBlock } from '
|
|
4
|
+
import type { HydratedBlock } from '#block'
|
|
5
5
|
|
|
6
6
|
export interface ChainAnalyzer<T extends Payload = Payload> {
|
|
7
7
|
onBlock(block: HydratedBlock): Promisable<boolean>
|
package/src/chain/index.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './Initializable.ts'
|
|
1
|
+
export * from './ChainAnalyzer.ts'
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export * from './Addressable.ts'
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './block/index.ts'
|
|
3
|
+
export * from './BlockDuration.ts'
|
|
3
4
|
export * from './ChainIterator.ts'
|
|
4
5
|
export * from './ChainIteratorEventData.ts'
|
|
5
6
|
export * from './ethereum.ts'
|
|
7
|
+
export * from './Initializable.ts'
|
|
6
8
|
export * from './network/index.ts'
|
|
7
9
|
export * from './OpenTelemetryProviders.ts'
|
|
8
10
|
export * from './payload/index.ts'
|
|
9
|
-
export * from './protocol/index.ts'
|
|
10
11
|
export * from './provider/index.ts'
|
|
11
12
|
export * from './repository/index.ts'
|
|
12
13
|
export * from './services/index.ts'
|
|
13
|
-
export * from './
|
|
14
|
+
export * from './Steps.ts'
|
|
15
|
+
export * from './transaction/index.ts'
|
|
@@ -2,7 +2,7 @@ import { AsObjectFactory } from '@xylabs/object'
|
|
|
2
2
|
import type { Payload } from '@xyo-network/payload-model'
|
|
3
3
|
import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
|
-
import type { BlockDuration } from '../../
|
|
5
|
+
import type { BlockDuration } from '../../BlockDuration.ts'
|
|
6
6
|
import type { FromFields } from './Executable.ts'
|
|
7
7
|
|
|
8
8
|
export const ChainStakeIntentSchema = 'network.xyo.chain.stake.intent' as const
|
|
@@ -2,9 +2,9 @@ import type { Address } from '@xylabs/hex'
|
|
|
2
2
|
import type { Signed } from '@xyo-network/boundwitness-model'
|
|
3
3
|
import type { Payload } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import type { AllowedBlockPayload } from '#block'
|
|
6
|
+
import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction'
|
|
7
|
+
|
|
8
8
|
import type { XyoDataLakeProvider } from './XyoDataLake.ts'
|
|
9
9
|
import type { XyoNetwork } from './XyoNetwork.ts'
|
|
10
10
|
import type { XyoRunner } from './XyoRunner.ts'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type { SignedHydratedTransaction } from '
|
|
4
|
+
import type { SignedHydratedTransaction } from '#transaction'
|
|
5
5
|
|
|
6
6
|
export interface XyoRunner {
|
|
7
7
|
broadcastTransaction(transaction: SignedHydratedTransaction): Promisable<Hash>
|
|
@@ -3,9 +3,8 @@ import type { Promisable } from '@xylabs/promise'
|
|
|
3
3
|
import type { Signed } from '@xyo-network/boundwitness-model'
|
|
4
4
|
import type { Payload } from '@xyo-network/payload-model'
|
|
5
5
|
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
} from '../../protocol/index.ts'
|
|
6
|
+
import type { AllowedBlockPayload } from '#block'
|
|
7
|
+
import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction'
|
|
9
8
|
|
|
10
9
|
export interface XyoSigner {
|
|
11
10
|
address(): Promisable<Address>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { Address, Hash } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
} from '../../protocol/index.ts'
|
|
4
|
+
import type { SignedHydratedBlock } from '#block'
|
|
5
|
+
import type { Transfer } from '#payload'
|
|
6
|
+
import type { SignedHydratedTransaction, TransactionBoundWitness } from '#transaction'
|
|
8
7
|
|
|
9
8
|
export interface XyoViewer {
|
|
10
9
|
accountBalance: (address: Address) => Promisable<bigint>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Address, Hash } from '@xylabs/hex'
|
|
2
2
|
|
|
3
|
-
import type { SignedHydratedBlock } from '
|
|
3
|
+
import type { SignedHydratedBlock } from '#block'
|
|
4
|
+
|
|
4
5
|
import type { TransactionViewer } from './Transaction.ts'
|
|
5
6
|
|
|
6
7
|
export interface BlockViewer {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Address, Hash } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type { NetworkStatus } from '
|
|
4
|
+
import type { NetworkStatus } from '#network'
|
|
5
|
+
|
|
5
6
|
import type { AccountViewer } from './Account.ts'
|
|
6
7
|
import type { BlockViewer } from './Block.ts'
|
|
7
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type { XyoWallet } from '../../v1/
|
|
4
|
+
import type { XyoWallet } from '../../v1/index.ts'
|
|
5
5
|
import type { ChainViewer } from './Chain.ts'
|
|
6
6
|
import type { DataLakeViewer } from './DataLake.ts'
|
|
7
7
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { HydratedTransaction, TransactionBoundWitness } from '
|
|
1
|
+
import type { HydratedTransaction, TransactionBoundWitness } from '#transaction'
|
|
2
|
+
|
|
2
3
|
import type { ReadRepository } from './Repository.ts'
|
|
3
4
|
|
|
4
5
|
export interface TransactionReadRepository extends ReadRepository<TransactionBoundWitness, HydratedTransaction> {}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { HydratedTransaction, TransactionBoundWitness } from '
|
|
1
|
+
import type { HydratedTransaction, TransactionBoundWitness } from '#transaction'
|
|
2
|
+
|
|
2
3
|
import type { IterableRepository } from './Repository.ts'
|
|
3
4
|
|
|
4
5
|
export interface TransactionRepositoryIterator extends IterableRepository<TransactionBoundWitness, HydratedTransaction> {}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { HydratedTransaction } from '
|
|
1
|
+
import type { HydratedTransaction } from '#transaction'
|
|
2
|
+
|
|
2
3
|
import type { WriteRepository } from './Repository.ts'
|
|
3
4
|
|
|
4
5
|
export interface TransactionWriteRepository extends WriteRepository<HydratedTransaction, boolean> {}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { BlockBoundWitness, HydratedBlock } from '#block'
|
|
2
|
+
import type { IterableRepository } from '#repository'
|
|
3
|
+
|
|
1
4
|
import type { Addressable } from '../Addressable.ts'
|
|
2
|
-
import type { BlockBoundWitness, HydratedBlock } from '../protocol/index.ts'
|
|
3
|
-
import type { IterableRepository } from '../repository/index.ts'
|
|
4
5
|
|
|
5
6
|
export type NextBlockProducer = IterableRepository<BlockBoundWitness, HydratedBlock>
|
|
6
7
|
|
|
@@ -2,11 +2,14 @@ import type { ArchivistInstance, WriteArchivist } from '@xyo-network/archivist-m
|
|
|
2
2
|
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
3
3
|
|
|
4
4
|
import type { EventingChainBlockNumberIterator } from '../ChainIterator.ts'
|
|
5
|
+
import type { AccountBalanceService } from './AccountBalanceService.ts'
|
|
6
|
+
import type { BlockProducer } from './BlockProducer.ts'
|
|
7
|
+
import type { BlockRewardService } from './BlockReward.ts'
|
|
5
8
|
import type {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from '
|
|
9
|
+
ChainContractViewer, ChainInformation, ChainStaker, ChainStakeViewer,
|
|
10
|
+
} from './Chain/index.ts'
|
|
11
|
+
import type { ElectionService } from './Election.ts'
|
|
12
|
+
import type { StakeIntentService } from './stakeIntent/index.ts'
|
|
10
13
|
|
|
11
14
|
export interface ChainServiceCollection {
|
|
12
15
|
|
package/src/services/Election.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex'
|
|
2
2
|
|
|
3
|
-
import type { HydratedTransaction } from '
|
|
3
|
+
import type { HydratedTransaction } from '#transaction'
|
|
4
|
+
|
|
4
5
|
import type { Service } from './Service.ts'
|
|
5
6
|
|
|
6
7
|
export interface PendingTransactionsService extends Service {
|
package/src/services/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './AccountBalanceService.ts'
|
|
|
2
2
|
export * from './BlockProducer.ts'
|
|
3
3
|
export * from './BlockReward.ts'
|
|
4
4
|
export * from './Chain/index.ts'
|
|
5
|
+
export * from './ChainServiceCollection.ts'
|
|
5
6
|
export * from './Election.ts'
|
|
6
7
|
export * from './Params.ts'
|
|
7
8
|
export * from './PendingTransactionsService.ts'
|
|
@@ -8,8 +8,9 @@ import { isStorageMeta } from '@xyo-network/payload-model'
|
|
|
8
8
|
import type {
|
|
9
9
|
FromFields,
|
|
10
10
|
OptionalExecutable,
|
|
11
|
-
} from '
|
|
12
|
-
|
|
11
|
+
} from '#payload'
|
|
12
|
+
|
|
13
|
+
import type { BlockDuration } from '../BlockDuration.ts'
|
|
13
14
|
import type { TransactionFeesFields } from './TransactionFeesFields.ts'
|
|
14
15
|
|
|
15
16
|
export interface TransactionBoundWitnessFields extends BlockDuration, TransactionFeesFields {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type { BlockBoundWitness } from '
|
|
4
|
+
import type { BlockBoundWitness } from '#block'
|
|
5
5
|
|
|
6
6
|
export type BlockValidatorFunction = (
|
|
7
7
|
block: BlockBoundWitness,
|
|
@@ -2,7 +2,7 @@ import type { Address } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { ReadArchivist } from '@xyo-network/archivist-model'
|
|
4
4
|
|
|
5
|
-
import type { HydratedBlock } from '
|
|
5
|
+
import type { HydratedBlock } from '#block'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A function that validates a hydrated block against chain state.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Promisable } from '@xylabs/promise'
|
|
2
2
|
import type { Payload, WithHashStorageMeta } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import type { HydratedBlock } from '
|
|
4
|
+
import type { HydratedBlock } from '#block'
|
|
5
5
|
|
|
6
6
|
export type InBlockPayloadValidationFunction = (
|
|
7
7
|
payload: WithHashStorageMeta<Payload>, block: HydratedBlock
|
|
@@ -2,7 +2,7 @@ import type { Address } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { HydratedBoundWitnessWithStorageMeta, ReadArchivist } from '@xyo-network/archivist-model'
|
|
4
4
|
|
|
5
|
-
import type { TransactionBoundWitness } from '
|
|
5
|
+
import type { TransactionBoundWitness } from '#transaction'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A function that validates a hydrated transaction against chain state.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type {
|
|
5
|
+
HydratedTransaction, HydratedTransactionWithHashStorageMeta, TransactionBoundWitness,
|
|
6
|
+
} from '#transaction'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* A function that validates a hydrated transaction.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChainServiceCollection.d.ts","sourceRoot":"","sources":["../../../src/chain/ChainServiceCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAA;AAC3E,OAAO,KAAK,EACV,qBAAqB,EAAE,aAAa,EACpC,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EACzG,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,sBAAsB;IAErC,OAAO,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,cAAc,EAAE,qBAAqB,CAAA;IACrC;;OAEG;IACH,cAAc,EAAE,iBAAiB,CAAA;IACjC,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;IAClC;;OAEG;IACH,aAAa,CAAC,EAAE,gCAAgC,CAAA;IAChD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,WAAW,EAAE,WAAW,CAAA;IACxB,8BAA8B,EAAE,cAAc,CAAA;IAC9C,eAAe,EAAE,eAAe,CAAA;IAChC,QAAQ,EAAE,aAAa,CAAA;IACvB,aAAa,EAAE,kBAAkB,CAAA;IACjC;;OAEG;IACH,kBAAkB,EAAE,kBAAkB,CAAA;CACvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Initializable.d.ts","sourceRoot":"","sources":["../../../src/chain/Initializable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AllowedBlockPayload.d.ts","sourceRoot":"","sources":["../../../src/protocol/AllowedBlockPayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,eAA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