@xyo-network/xl1-protocol 1.3.35 → 1.3.36
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/index.d.ts +503 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +10 -10
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/index.mjs +10 -10
- package/dist/node/index.mjs.map +1 -1
- package/dist/types/block/AllowedBlockPayload.d.ts +2 -2
- package/dist/types/block/AllowedBlockPayload.d.ts.map +1 -1
- package/dist/types/chain/ChainAnalyzer.d.ts +1 -1
- package/dist/types/chain/ChainAnalyzer.d.ts.map +1 -1
- package/dist/types/index.d.ts +12 -12
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/iterator/ChainIterator.d.ts +3 -3
- package/dist/types/iterator/ChainIterator.d.ts.map +1 -1
- package/dist/types/iterator/ChainIteratorEventData.d.ts +1 -1
- package/dist/types/iterator/ChainIteratorEventData.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 -2
- 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 -2
- package/dist/types/provider/v1/XyoSigner.d.ts.map +1 -1
- package/dist/types/provider/v1/XyoViewer.d.ts +3 -3
- 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/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 +3 -3
- package/dist/types/services/BlockProducer.d.ts.map +1 -1
- 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/stakeIntent/StakeIntentService.d.ts +1 -1
- package/dist/types/services/stakeIntent/StakeIntentService.d.ts.map +1 -1
- package/dist/types/transaction/TransactionBoundWitness.d.ts +2 -2
- package/dist/types/transaction/TransactionBoundWitness.d.ts.map +1 -1
- 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 -1
- package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +1 -1
- package/package.json +9 -3
- package/rollup.dts.config.mjs +37 -0
- package/src/block/AllowedBlockPayload.ts +3 -3
- package/src/chain/ChainAnalyzer.ts +1 -1
- package/src/index.ts +12 -12
- package/src/iterator/ChainIterator.ts +4 -3
- package/src/iterator/ChainIteratorEventData.ts +1 -1
- package/src/payload/elevatable/ChainStakeIntent.ts +2 -1
- package/src/provider/v1/XyoNetwork.ts +1 -1
- package/src/provider/v1/XyoProvider.ts +3 -2
- package/src/provider/v1/XyoRunner.ts +1 -1
- package/src/provider/v1/XyoSigner.ts +2 -2
- package/src/provider/v1/XyoViewer.ts +3 -3
- 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/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 -3
- package/src/services/Election.ts +2 -1
- package/src/services/PendingTransactionsService.ts +2 -1
- package/src/services/stakeIntent/StakeIntentService.ts +1 -1
- package/src/transaction/TransactionBoundWitness.ts +3 -2
- 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 +1 -1
- package/tsconfig.json +21 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,yBAAyB,CAAA;CACjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HydratedTransaction, TransactionBoundWitness } from '
|
|
1
|
+
import type { HydratedTransaction, TransactionBoundWitness } from '#transaction';
|
|
2
2
|
import type { ReadRepository } from './Repository.ts';
|
|
3
3
|
export interface TransactionReadRepository extends ReadRepository<TransactionBoundWitness, HydratedTransaction> {
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionReadRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionReadRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TransactionReadRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionReadRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEhF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,yBAA0B,SAAQ,cAAc,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;CAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HydratedTransaction, TransactionBoundWitness } from '
|
|
1
|
+
import type { HydratedTransaction, TransactionBoundWitness } from '#transaction';
|
|
2
2
|
import type { IterableRepository } from './Repository.ts';
|
|
3
3
|
export interface TransactionRepositoryIterator extends IterableRepository<TransactionBoundWitness, HydratedTransaction> {
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionRepositoryIterator.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionRepositoryIterator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TransactionRepositoryIterator.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionRepositoryIterator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEhF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;CAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HydratedTransaction } from '
|
|
1
|
+
import type { HydratedTransaction } from '#transaction';
|
|
2
2
|
import type { WriteRepository } from './Repository.ts';
|
|
3
3
|
export interface TransactionWriteRepository extends WriteRepository<HydratedTransaction, boolean> {
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionWriteRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionWriteRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TransactionWriteRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionWriteRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,WAAW,0BAA2B,SAAQ,eAAe,CAAC,mBAAmB,EAAE,OAAO,CAAC;CAAG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BlockBoundWitness, HydratedBlock } from '
|
|
2
|
-
import type { Addressable } from '
|
|
3
|
-
import type { IterableRepository } from '
|
|
1
|
+
import type { BlockBoundWitness, HydratedBlock } from '#block';
|
|
2
|
+
import type { Addressable } from '#fields';
|
|
3
|
+
import type { IterableRepository } from '#repository';
|
|
4
4
|
export type NextBlockProducer = IterableRepository<BlockBoundWitness, HydratedBlock>;
|
|
5
5
|
export interface BlockProducer extends Addressable, NextBlockProducer {
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockProducer.d.ts","sourceRoot":"","sources":["../../../src/services/BlockProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BlockProducer.d.ts","sourceRoot":"","sources":["../../../src/services/BlockProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAA;AAEpF,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,iBAAiB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Election.d.ts","sourceRoot":"","sources":["../../../src/services/Election.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Election.d.ts","sourceRoot":"","sources":["../../../src/services/Election.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAE/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,MAAM,WAAW,eAAgB,SAAQ,OAAO;IAE9C;;;OAGG;IACH,+BAA+B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;CAEhF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex';
|
|
2
|
-
import type { HydratedTransaction } from '
|
|
2
|
+
import type { HydratedTransaction } from '#transaction';
|
|
3
3
|
import type { Service } from './Service.ts';
|
|
4
4
|
export interface PendingTransactionsService extends Service {
|
|
5
5
|
getPendingTransactions(head: Hash, limit: number, timeout?: number): Promise<HydratedTransaction[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PendingTransactionsService.d.ts","sourceRoot":"","sources":["../../../src/services/PendingTransactionsService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PendingTransactionsService.d.ts","sourceRoot":"","sources":["../../../src/services/PendingTransactionsService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAEvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,MAAM,WAAW,0BAA2B,SAAQ,OAAO;IACzD,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAA;CACpG"}
|
|
@@ -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":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC,MAAM,WAAW,kBAAkB;IAEjC;;;;OAIG;IACH,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAE7G;;;;MAIE;IACF,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IAEhF;;;;;OAKG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACpF"}
|
|
@@ -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 { BlockDuration } from '
|
|
5
|
-
import type { FromFields, OptionalExecutable } from '
|
|
4
|
+
import type { BlockDuration } from '#fields';
|
|
5
|
+
import type { FromFields, OptionalExecutable } from '#payload';
|
|
6
6
|
import type { TransactionFeesFields } from './TransactionFeesFields.ts';
|
|
7
7
|
export interface TransactionBoundWitnessFields extends BlockDuration, TransactionFeesFields {
|
|
8
8
|
chain: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/transaction/TransactionBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TransactionBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/transaction/TransactionBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,MAAM,WAAW,6BAA8B,SAAQ,aAAa,EAAE,qBAAqB;IACzF,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,6BAA6B,GAAG,kBAAkB,GAAG,UAAU,CAAC,CAAA;AAEnH,eAAO,MAAM,yBAAyB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,uBAOnE,CAAA;AAED,eAAO,MAAM,+BAA+B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,uBAAuB,CAEvG,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,OAAO,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,CAAC,CAGnE,CAAA;AAE/B,eAAO,MAAM,wCAAwC,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,uBAAuB,CAEjG,CAAA;AAEzB,eAAO,MAAM,8CAA8C,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAE/G,CAAA;AAEzB,eAAO,MAAM,yBAAyB;;;CAAoD,CAAA;AAC1F,eAAO,MAAM,iCAAiC,8GAA4D,CAAA;AAE1G,eAAO,MAAM,wCAAwC;;;CAAmE,CAAA;AACxH,eAAO,MAAM,gDAAgD,+HAA2E,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,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
|
-
import type { HydratedTransaction, HydratedTransactionWithHashStorageMeta, TransactionBoundWitness } from '
|
|
3
|
+
import type { HydratedTransaction, HydratedTransactionWithHashStorageMeta, TransactionBoundWitness } from '#transaction';
|
|
4
4
|
/**
|
|
5
5
|
* A function that validates a hydrated transaction.
|
|
6
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,EACV,mBAAmB,EAAE,sCAAsC,EAAE,uBAAuB,EACrF,MAAM,
|
|
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/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.36",
|
|
5
5
|
"description": "XYO Layer One Protocol",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"types": "./dist/
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
26
|
"default": "./dist/neutral/index.mjs"
|
|
27
27
|
},
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"module": "./dist/neutral/index.mjs",
|
|
31
|
-
"types": "./dist/
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"scripts": {
|
|
33
|
+
"package-compile": "package-compile-only && rollup --config rollup.dts.config.mjs"
|
|
34
|
+
},
|
|
32
35
|
"dependencies": {
|
|
33
36
|
"@opentelemetry/api": "^1.9.0",
|
|
34
37
|
"@xylabs/base": "^4.10.0",
|
|
@@ -46,6 +49,7 @@
|
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
|
|
52
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
49
53
|
"@types/node": "^22.15.21",
|
|
50
54
|
"@xylabs/eslint-config-flat": "^6.5.7",
|
|
51
55
|
"@xylabs/ts-scripts-yarn3": "^6.5.7",
|
|
@@ -55,6 +59,8 @@
|
|
|
55
59
|
"eslint": "^9.27.0",
|
|
56
60
|
"eslint-import-resolver-typescript": "^4.3.5",
|
|
57
61
|
"knip": "^5.57.0",
|
|
62
|
+
"rollup": "^4.41.0",
|
|
63
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
58
64
|
"typescript": "^5.8.3",
|
|
59
65
|
"vite": "^6.3.5",
|
|
60
66
|
"vite-tsconfig-paths": "^5.1.4",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import dts from 'rollup-plugin-dts'
|
|
2
|
+
import alias from '@rollup/plugin-alias'
|
|
3
|
+
|
|
4
|
+
import { readFileSync } from 'node:fs'
|
|
5
|
+
import PATH from 'node:path'
|
|
6
|
+
|
|
7
|
+
export function parseTsconfigAliases(tsconfigPath = './tsconfig.json') {
|
|
8
|
+
const tsconfig = JSON.parse(readFileSync(tsconfigPath, 'utf8'))
|
|
9
|
+
const baseUrl = tsconfig.compilerOptions?.baseUrl || '.'
|
|
10
|
+
const paths = tsconfig.compilerOptions?.paths || {}
|
|
11
|
+
|
|
12
|
+
return Object.entries(paths).map(([alias, targets]) => {
|
|
13
|
+
const find = alias.replace(/\/\*$/, '')
|
|
14
|
+
const replacement = PATH.resolve(
|
|
15
|
+
baseUrl,
|
|
16
|
+
targets[0].replace(/\/\*$/, ''),
|
|
17
|
+
)
|
|
18
|
+
return { find, replacement }
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const aliasEntries = parseTsconfigAliases()
|
|
23
|
+
|
|
24
|
+
export default [
|
|
25
|
+
{
|
|
26
|
+
input: 'src/index.ts',
|
|
27
|
+
output: {
|
|
28
|
+
file: 'dist/index.d.ts',
|
|
29
|
+
format: 'es',
|
|
30
|
+
sourcemap: true,
|
|
31
|
+
},
|
|
32
|
+
plugins: [
|
|
33
|
+
alias({ entries: aliasEntries }),
|
|
34
|
+
dts(),
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
]
|
|
@@ -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/index.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from './block/index.ts'
|
|
2
|
-
export * from './chain/index.ts'
|
|
3
|
-
export * from './constants/index.ts'
|
|
4
|
-
export * from './fields/index.ts'
|
|
5
1
|
export * from './Initializable.ts'
|
|
6
|
-
export * from './iterator/index.ts'
|
|
7
|
-
export * from './network/index.ts'
|
|
8
2
|
export * from './OpenTelemetryProviders.ts'
|
|
9
|
-
export * from './payload/index.ts'
|
|
10
|
-
export * from './provider/index.ts'
|
|
11
|
-
export * from './repository/index.ts'
|
|
12
|
-
export * from './services/index.ts'
|
|
13
|
-
export * from './transaction/index.ts'
|
|
14
|
-
export * from './validation/index.ts'
|
|
15
3
|
export * from './XL1.ts'
|
|
4
|
+
export * from '#block'
|
|
5
|
+
export * from '#chain'
|
|
6
|
+
export * from '#constants'
|
|
7
|
+
export * from '#fields'
|
|
8
|
+
export * from '#iterator'
|
|
9
|
+
export * from '#network'
|
|
10
|
+
export * from '#payload'
|
|
11
|
+
export * from '#provider'
|
|
12
|
+
export * from '#repository'
|
|
13
|
+
export * from '#services'
|
|
14
|
+
export * from '#transaction'
|
|
15
|
+
export * from '#validation'
|
|
@@ -3,9 +3,10 @@ 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 '
|
|
7
|
-
import type { IterableRepository, ReadRepository } from '
|
|
8
|
-
import type { BaseServiceParams, ChainIdentification } from '
|
|
6
|
+
import type { BlockBoundWitness } from '#block'
|
|
7
|
+
import type { IterableRepository, ReadRepository } from '#repository'
|
|
8
|
+
import type { BaseServiceParams, ChainIdentification } from '#services'
|
|
9
|
+
|
|
9
10
|
import type { ChainIteratorEventData } from './ChainIteratorEventData.ts'
|
|
10
11
|
|
|
11
12
|
export interface ChainIterator<TKey, THead> extends ReadRepository<TKey, BlockBoundWitness>, IterableRepository<TKey, BlockBoundWitness> {
|
|
@@ -2,7 +2,8 @@ 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 '#fields'
|
|
6
|
+
|
|
6
7
|
import type { FromFields } from './Executable.ts'
|
|
7
8
|
|
|
8
9
|
export const ChainStakeIntentSchema = 'network.xyo.chain.stake.intent' as const
|
|
@@ -2,8 +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 { AllowedBlockPayload } from '
|
|
6
|
-
import type { TransactionBoundWitness, TransactionFeesBigInt } from '
|
|
5
|
+
import type { AllowedBlockPayload } from '#block'
|
|
6
|
+
import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction'
|
|
7
|
+
|
|
7
8
|
import type { XyoDataLakeProvider } from './XyoDataLake.ts'
|
|
8
9
|
import type { XyoNetwork } from './XyoNetwork.ts'
|
|
9
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,8 +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 { AllowedBlockPayload } from '
|
|
7
|
-
import type { TransactionBoundWitness, TransactionFeesBigInt } from '
|
|
6
|
+
import type { AllowedBlockPayload } from '#block'
|
|
7
|
+
import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction'
|
|
8
8
|
|
|
9
9
|
export interface XyoSigner {
|
|
10
10
|
address(): Promisable<Address>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Address, Hash } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type { SignedHydratedBlock } from '
|
|
5
|
-
import type { Transfer } from '
|
|
6
|
-
import type { SignedHydratedTransaction, TransactionBoundWitness } from '
|
|
4
|
+
import type { SignedHydratedBlock } from '#block'
|
|
5
|
+
import type { Transfer } from '#payload'
|
|
6
|
+
import type { SignedHydratedTransaction, TransactionBoundWitness } from '#transaction'
|
|
7
7
|
|
|
8
8
|
export interface XyoViewer {
|
|
9
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,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,6 @@
|
|
|
1
|
-
import type { BlockBoundWitness, HydratedBlock } from '
|
|
2
|
-
import type { Addressable } from '
|
|
3
|
-
import type { IterableRepository } from '
|
|
1
|
+
import type { BlockBoundWitness, HydratedBlock } from '#block'
|
|
2
|
+
import type { Addressable } from '#fields'
|
|
3
|
+
import type { IterableRepository } from '#repository'
|
|
4
4
|
|
|
5
5
|
export type NextBlockProducer = IterableRepository<BlockBoundWitness, HydratedBlock>
|
|
6
6
|
|
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 {
|
|
@@ -5,8 +5,9 @@ import { isBoundWitness } from '@xyo-network/boundwitness-model'
|
|
|
5
5
|
import type { WithStorageMeta } from '@xyo-network/payload-model'
|
|
6
6
|
import { isStorageMeta } from '@xyo-network/payload-model'
|
|
7
7
|
|
|
8
|
-
import type { BlockDuration } from '
|
|
9
|
-
import type { FromFields, OptionalExecutable } from '
|
|
8
|
+
import type { BlockDuration } from '#fields'
|
|
9
|
+
import type { FromFields, OptionalExecutable } from '#payload'
|
|
10
|
+
|
|
10
11
|
import type { TransactionFeesFields } from './TransactionFeesFields.ts'
|
|
11
12
|
|
|
12
13
|
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.
|