@xyo-network/xl1-protocol 1.3.27 → 1.3.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/neutral/index.mjs +30 -0
  2. package/dist/neutral/index.mjs.map +1 -1
  3. package/dist/node/index.mjs +30 -0
  4. package/dist/node/index.mjs.map +1 -1
  5. package/dist/types/ChainIterator.d.ts +3 -3
  6. package/dist/types/ChainIterator.d.ts.map +1 -1
  7. package/dist/types/ChainIteratorEventData.d.ts +1 -1
  8. package/dist/types/ChainIteratorEventData.d.ts.map +1 -1
  9. package/dist/types/Xl1.d.ts +9 -0
  10. package/dist/types/Xl1.d.ts.map +1 -0
  11. package/dist/types/block/AllowedBlockPayload.d.ts +2 -2
  12. package/dist/types/block/AllowedBlockPayload.d.ts.map +1 -1
  13. package/dist/types/chain/ChainAnalyzer.d.ts +1 -1
  14. package/dist/types/chain/ChainAnalyzer.d.ts.map +1 -1
  15. package/dist/types/index.d.ts +1 -0
  16. package/dist/types/index.d.ts.map +1 -1
  17. package/dist/types/provider/v1/XyoNetwork.d.ts +1 -1
  18. package/dist/types/provider/v1/XyoNetwork.d.ts.map +1 -1
  19. package/dist/types/provider/v1/XyoProvider.d.ts +2 -2
  20. package/dist/types/provider/v1/XyoProvider.d.ts.map +1 -1
  21. package/dist/types/provider/v1/XyoRunner.d.ts +1 -1
  22. package/dist/types/provider/v1/XyoRunner.d.ts.map +1 -1
  23. package/dist/types/provider/v1/XyoSigner.d.ts +2 -2
  24. package/dist/types/provider/v1/XyoSigner.d.ts.map +1 -1
  25. package/dist/types/provider/v1/XyoViewer.d.ts +3 -3
  26. package/dist/types/provider/v1/XyoViewer.d.ts.map +1 -1
  27. package/dist/types/provider/v2/viewer/Account.d.ts +1 -1
  28. package/dist/types/provider/v2/viewer/Account.d.ts.map +1 -1
  29. package/dist/types/provider/v2/viewer/Block.d.ts +1 -1
  30. package/dist/types/provider/v2/viewer/Block.d.ts.map +1 -1
  31. package/dist/types/provider/v2/viewer/Chain.d.ts +1 -1
  32. package/dist/types/provider/v2/viewer/Chain.d.ts.map +1 -1
  33. package/dist/types/provider/v2/viewer/Transaction.d.ts +1 -1
  34. package/dist/types/provider/v2/viewer/Transaction.d.ts.map +1 -1
  35. package/dist/types/repository/TransactionReadRepository.d.ts +1 -1
  36. package/dist/types/repository/TransactionReadRepository.d.ts.map +1 -1
  37. package/dist/types/repository/TransactionRepositoryIterator.d.ts +1 -1
  38. package/dist/types/repository/TransactionRepositoryIterator.d.ts.map +1 -1
  39. package/dist/types/repository/TransactionWriteRepository.d.ts +1 -1
  40. package/dist/types/repository/TransactionWriteRepository.d.ts.map +1 -1
  41. package/dist/types/services/BlockProducer.d.ts +2 -2
  42. package/dist/types/services/BlockProducer.d.ts.map +1 -1
  43. package/dist/types/services/Election.d.ts +1 -1
  44. package/dist/types/services/Election.d.ts.map +1 -1
  45. package/dist/types/services/PendingTransactionsService.d.ts +1 -1
  46. package/dist/types/services/PendingTransactionsService.d.ts.map +1 -1
  47. package/dist/types/services/stakeIntent/StakeIntentService.d.ts +1 -1
  48. package/dist/types/services/stakeIntent/StakeIntentService.d.ts.map +1 -1
  49. package/dist/types/transaction/TransactionFeesFields.d.ts +15 -5
  50. package/dist/types/transaction/TransactionFeesFields.d.ts.map +1 -1
  51. package/dist/types/validation/block/BlockValidationFunction.d.ts +1 -1
  52. package/dist/types/validation/block/BlockValidationFunction.d.ts.map +1 -1
  53. package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts +1 -1
  54. package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts.map +1 -1
  55. package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts +1 -1
  56. package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts.map +1 -1
  57. package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts +1 -1
  58. package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts.map +1 -1
  59. package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts +1 -1
  60. package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map +1 -1
  61. package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts +1 -1
  62. package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +1 -1
  63. package/package.json +2 -2
  64. package/src/ChainIterator.ts +3 -4
  65. package/src/ChainIteratorEventData.ts +1 -1
  66. package/src/Xl1.ts +5 -0
  67. package/src/block/AllowedBlockPayload.ts +3 -3
  68. package/src/chain/ChainAnalyzer.ts +1 -1
  69. package/src/index.ts +1 -0
  70. package/src/provider/v1/XyoNetwork.ts +1 -1
  71. package/src/provider/v1/XyoProvider.ts +2 -3
  72. package/src/provider/v1/XyoRunner.ts +1 -1
  73. package/src/provider/v1/XyoSigner.ts +2 -2
  74. package/src/provider/v1/XyoViewer.ts +3 -3
  75. package/src/provider/v2/viewer/Account.ts +1 -1
  76. package/src/provider/v2/viewer/Block.ts +1 -2
  77. package/src/provider/v2/viewer/Chain.ts +1 -2
  78. package/src/provider/v2/viewer/Transaction.ts +1 -2
  79. package/src/repository/TransactionReadRepository.ts +1 -2
  80. package/src/repository/TransactionRepositoryIterator.ts +1 -2
  81. package/src/repository/TransactionWriteRepository.ts +1 -2
  82. package/src/services/BlockProducer.ts +2 -3
  83. package/src/services/Election.ts +1 -2
  84. package/src/services/PendingTransactionsService.ts +1 -2
  85. package/src/services/stakeIntent/StakeIntentService.ts +1 -1
  86. package/src/transaction/TransactionFeesFields.ts +23 -5
  87. package/src/validation/block/BlockValidationFunction.ts +1 -1
  88. package/src/validation/block/HydratedBlockStateValidationFunction.ts +1 -1
  89. package/src/validation/block/HydratedBlockValidationFunction.ts +1 -1
  90. package/src/validation/payload/InBlockPayloadValidationFunction.ts +1 -1
  91. package/src/validation/transaction/HydratedTransactionStateValidationFunction.ts +1 -1
  92. package/src/validation/transaction/HydratedTransactionValidationFunction.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAAA;IACxC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAAA;IACrC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,IAAI,aAAa,CAAA;CACxB"}
1
+ {"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAAA;IACxC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAAA;IACrC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,IAAI,aAAa,CAAA;CACxB"}
@@ -1,4 +1,4 @@
1
- import type { SignedHydratedTransaction } from '#transaction';
1
+ import type { SignedHydratedTransaction } from '../../../transaction/index.ts';
2
2
  import type { BlockViewer } from './Block.ts';
3
3
  export interface TransactionViewer {
4
4
  block: BlockViewer;
@@ -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,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
+ {"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../../../src/provider/v2/viewer/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AAC9E,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 '#transaction';
1
+ import type { HydratedTransaction, TransactionBoundWitness } from '../transaction/index.ts';
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,cAAc,CAAA;AAEhF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,yBAA0B,SAAQ,cAAc,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;CAAG"}
1
+ {"version":3,"file":"TransactionReadRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionReadRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAC3F,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 '#transaction';
1
+ import type { HydratedTransaction, TransactionBoundWitness } from '../transaction/index.ts';
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,cAAc,CAAA;AAEhF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;CAAG"}
1
+ {"version":3,"file":"TransactionRepositoryIterator.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionRepositoryIterator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAC3F,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 '#transaction';
1
+ import type { HydratedTransaction } from '../transaction/index.ts';
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,cAAc,CAAA;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,WAAW,0BAA2B,SAAQ,eAAe,CAAC,mBAAmB,EAAE,OAAO,CAAC;CAAG"}
1
+ {"version":3,"file":"TransactionWriteRepository.d.ts","sourceRoot":"","sources":["../../../src/repository/TransactionWriteRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,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 '#block';
2
- import type { IterableRepository } from '#repository';
3
1
  import type { Addressable } from '../Addressable.ts';
2
+ import type { BlockBoundWitness, HydratedBlock } from '../block/index.ts';
3
+ import type { IterableRepository } from '../repository/index.ts';
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,QAAQ,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAA;AAEpF,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,iBAAiB;CAAG"}
1
+ {"version":3,"file":"BlockProducer.d.ts","sourceRoot":"","sources":["../../../src/services/BlockProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAA;AAEpF,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,iBAAiB;CAAG"}
@@ -1,5 +1,5 @@
1
1
  import type { Address } from '@xylabs/hex';
2
- import type { BlockBoundWitness } from '#block';
2
+ import type { BlockBoundWitness } from '../block/index.ts';
3
3
  import type { Service } from './Service.ts';
4
4
  export interface ElectionService extends Service {
5
5
  /**
@@ -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,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
+ {"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,mBAAmB,CAAA;AAC1D,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 '#transaction';
2
+ import type { HydratedTransaction } from '../transaction/index.ts';
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,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
+ {"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,yBAAyB,CAAA;AAClE,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,5 +1,5 @@
1
1
  import type { Address } from '@xylabs/hex';
2
- import type { Intent } from '#payload';
2
+ import type { Intent } from '../../payload/index.ts';
3
3
  export interface StakeIntentService {
4
4
  /**
5
5
  * Gets the declared ranges for an address based on historical on-chain data
@@ -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,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
+ {"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,wBAAwB,CAAA;AAEpD,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,16 +1,26 @@
1
1
  import type { Hex } from '@xylabs/hex';
2
+ import { MicroXL1 } from '../Xl1.ts';
2
3
  export interface TransactionFeesBigInt {
3
- base: bigint;
4
- gasLimit: bigint;
5
- gasPrice: bigint;
6
- priority: bigint;
4
+ base: MicroXL1;
5
+ gasLimit: MicroXL1;
6
+ gasPrice: MicroXL1;
7
+ priority: MicroXL1;
7
8
  }
9
+ export declare const TransactionGasCosts: {
10
+ readonly byte: MicroXL1;
11
+ readonly payloadValidation: MicroXL1;
12
+ readonly signatureValidation: MicroXL1;
13
+ readonly hashValidation: MicroXL1;
14
+ readonly balanceValidation: MicroXL1;
15
+ };
8
16
  export type TransactionFeesHex = {
9
17
  [K in keyof TransactionFeesBigInt]: Hex;
10
18
  };
11
19
  export interface TransactionFeesFields {
12
20
  fees: TransactionFeesHex;
13
21
  }
22
+ export declare const minTransactionFees: TransactionFeesBigInt;
23
+ export declare const defaultTransactionFees: TransactionFeesBigInt;
14
24
  /** Gas Calculation
15
25
  *
16
26
  * 1 Million microXL1 (mXL1) = 1 XL1
@@ -29,7 +39,7 @@ export interface TransactionFeesFields {
29
39
  *
30
40
  * minGasPrice is initially set to 100 mXL1
31
41
  * minBase is initially set to 1000 mXL1
32
- * minPriority is alway 0 mXL1, but can be set to increase the priority of the transaction
42
+ * minPriority is always 0 mXL1, but can be set to increase the priority of the transaction
33
43
  *
34
44
  */
35
45
  //# sourceMappingURL=TransactionFeesFields.d.ts.map
@@ -1 +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"}
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,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,QAAQ,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACnB;AAED,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG;KAC9B,CAAC,IAAI,MAAM,qBAAqB,GAAG,GAAG;CACxC,CAAA;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,kBAAkB,CAAA;CACzB;AAED,eAAO,MAAM,kBAAkB,EAAE,qBAEvB,CAAA;AAEV,eAAO,MAAM,sBAAsB,EAAE,qBAE3B,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;GAoBG"}
@@ -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 '#block';
3
+ import type { BlockBoundWitness } from '../../block/index.ts';
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,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
+ {"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,sBAAsB,CAAA;AAE7D,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 '#block';
4
+ import type { HydratedBlock } from '../../block/index.ts';
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,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
+ {"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,sBAAsB,CAAA;AAEzD;;;;;;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 '#block';
3
+ import type { HydratedBlock } from '../../block/index.ts';
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,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
+ {"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,sBAAsB,CAAA;AAEzD;;;;;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 '#block';
3
+ import type { HydratedBlock } from '../../block/index.ts';
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,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
+ {"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,sBAAsB,CAAA;AAEzD,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 '#transaction';
4
+ import type { TransactionBoundWitness } from '../../transaction/index.ts';
5
5
  /**
6
6
  * A function that validates a hydrated transaction against chain state.
7
7
  * @param hydratedTransaction The hydrated transaction to validate.
@@ -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,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
+ {"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,4BAA4B,CAAA;AAEzE;;;;;;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 '#transaction';
3
+ import type { HydratedTransaction, HydratedTransactionWithHashStorageMeta, TransactionBoundWitness } from '../../transaction/index.ts';
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,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"}
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,4BAA4B,CAAA;AAEnC;;;;;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.27",
4
+ "version": "1.3.29",
5
5
  "description": "XYO Layer One Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -46,7 +46,7 @@
46
46
  "ethers": "6.14.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "^22.15.19",
49
+ "@types/node": "^22.15.20",
50
50
  "@xylabs/eslint-config-flat": "^6.5.7",
51
51
  "@xylabs/ts-scripts-yarn3": "^6.5.7",
52
52
  "@xylabs/tsconfig": "^6.5.7",
@@ -3,11 +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 '#block'
7
- import type { IterableRepository, ReadRepository } from '#repository'
8
- import type { BaseServiceParams, ChainIdentification } from '#services'
9
-
6
+ import type { BlockBoundWitness } from './block/index.ts'
10
7
  import type { ChainIteratorEventData } from './ChainIteratorEventData.ts'
8
+ import type { IterableRepository, ReadRepository } from './repository/index.ts'
9
+ import type { BaseServiceParams, ChainIdentification } from './services/index.ts'
11
10
 
12
11
  export interface ChainIterator<TKey, THead> extends ReadRepository<TKey, BlockBoundWitness>, IterableRepository<TKey, BlockBoundWitness> {
13
12
  chainIdentification: ChainIdentification
@@ -1,6 +1,6 @@
1
1
  import type { EventData } from '@xylabs/events'
2
2
 
3
- import type { BlockBoundWitness } from '#block'
3
+ import type { BlockBoundWitness } from './block/index.ts'
4
4
 
5
5
  export type HeadEventArgs = { blocks: [BlockBoundWitness] }
6
6
 
package/src/Xl1.ts ADDED
@@ -0,0 +1,5 @@
1
+ export type XL1 = bigint & { readonly _tag: 'XL1' } // 1e-18
2
+ export type MicroXL1 = bigint & { readonly _tag: 'MicroXL1' } // 1e-12
3
+
4
+ export const XL1 = (value: bigint): XL1 => value as XL1
5
+ export const MicroXL1 = (value: bigint): MicroXL1 => value as MicroXL1
@@ -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 '#payload'
9
+ } from '../payload/index.ts'
10
10
  import {
11
11
  ChainStakeIntentSchema, HashSchema, isChainStakeIntent, isHashPayload, isTransfer, TransferSchema,
12
- } from '#payload'
13
- import { isTransactionBoundWitness, type TransactionBoundWitness } from '#transaction'
12
+ } from '../payload/index.ts'
13
+ import { isTransactionBoundWitness, type TransactionBoundWitness } from '../transaction/index.ts'
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 '#block'
4
+ import type { HydratedBlock } from '../block/index.ts'
5
5
 
6
6
  export interface ChainAnalyzer<T extends Payload = Payload> {
7
7
  onBlock(block: HydratedBlock): Promisable<boolean>
package/src/index.ts CHANGED
@@ -16,3 +16,4 @@ export * from './services/index.ts'
16
16
  export * from './Steps.ts'
17
17
  export * from './transaction/index.ts'
18
18
  export * from './validation/index.ts'
19
+ export * from './Xl1.ts'
@@ -1,6 +1,6 @@
1
1
  import type { Promisable } from '@xylabs/promise'
2
2
 
3
- import type { NetworkStatus } from '#network'
3
+ import type { NetworkStatus } from '../../network/index.ts'
4
4
 
5
5
  export interface XyoNetwork {
6
6
  status(): Promisable<NetworkStatus>
@@ -2,9 +2,8 @@ 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 '#block'
6
- import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction'
7
-
5
+ import type { AllowedBlockPayload } from '../../block/index.ts'
6
+ import type { TransactionBoundWitness, TransactionFeesBigInt } from '../../transaction/index.ts'
8
7
  import type { XyoDataLakeProvider } from './XyoDataLake.ts'
9
8
  import type { XyoNetwork } from './XyoNetwork.ts'
10
9
  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 '#transaction'
4
+ import type { SignedHydratedTransaction } from '../../transaction/index.ts'
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 '#block'
7
- import type { TransactionBoundWitness, TransactionFeesBigInt } from '#transaction'
6
+ import type { AllowedBlockPayload } from '../../block/index.ts'
7
+ import type { TransactionBoundWitness, TransactionFeesBigInt } from '../../transaction/index.ts'
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 '#block'
5
- import type { Transfer } from '#payload'
6
- import type { SignedHydratedTransaction, TransactionBoundWitness } from '#transaction'
4
+ import type { SignedHydratedBlock } from '../../block/index.ts'
5
+ import type { Transfer } from '../../payload/index.ts'
6
+ import type { SignedHydratedTransaction, TransactionBoundWitness } from '../../transaction/index.ts'
7
7
 
8
8
  export interface XyoViewer {
9
9
  accountBalance: (address: Address) => Promisable<bigint>
@@ -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 { Transfer } from '#payload'
4
+ import type { Transfer } from '../../../payload/index.ts'
5
5
 
6
6
  export interface AccountViewer {
7
7
  balance(): Promisable<bigint>
@@ -1,7 +1,6 @@
1
1
  import type { Address, Hash } from '@xylabs/hex'
2
2
 
3
- import type { SignedHydratedBlock } from '#block'
4
-
3
+ import type { SignedHydratedBlock } from '../../../block/index.ts'
5
4
  import type { TransactionViewer } from './Transaction.ts'
6
5
 
7
6
  export interface BlockViewer {
@@ -1,8 +1,7 @@
1
1
  import type { Address, Hash } from '@xylabs/hex'
2
2
  import type { Promisable } from '@xylabs/promise'
3
3
 
4
- import type { NetworkStatus } from '#network'
5
-
4
+ import type { NetworkStatus } from '../../../network/index.ts'
6
5
  import type { AccountViewer } from './Account.ts'
7
6
  import type { BlockViewer } from './Block.ts'
8
7
 
@@ -1,5 +1,4 @@
1
- import type { SignedHydratedTransaction } from '#transaction'
2
-
1
+ import type { SignedHydratedTransaction } from '../../../transaction/index.ts'
3
2
  import type { BlockViewer } from './Block.ts'
4
3
 
5
4
  export interface TransactionViewer {
@@ -1,5 +1,4 @@
1
- import type { HydratedTransaction, TransactionBoundWitness } from '#transaction'
2
-
1
+ import type { HydratedTransaction, TransactionBoundWitness } from '../transaction/index.ts'
3
2
  import type { ReadRepository } from './Repository.ts'
4
3
 
5
4
  export interface TransactionReadRepository extends ReadRepository<TransactionBoundWitness, HydratedTransaction> {}
@@ -1,5 +1,4 @@
1
- import type { HydratedTransaction, TransactionBoundWitness } from '#transaction'
2
-
1
+ import type { HydratedTransaction, TransactionBoundWitness } from '../transaction/index.ts'
3
2
  import type { IterableRepository } from './Repository.ts'
4
3
 
5
4
  export interface TransactionRepositoryIterator extends IterableRepository<TransactionBoundWitness, HydratedTransaction> {}
@@ -1,5 +1,4 @@
1
- import type { HydratedTransaction } from '#transaction'
2
-
1
+ import type { HydratedTransaction } from '../transaction/index.ts'
3
2
  import type { WriteRepository } from './Repository.ts'
4
3
 
5
4
  export interface TransactionWriteRepository extends WriteRepository<HydratedTransaction, boolean> {}
@@ -1,7 +1,6 @@
1
- import type { BlockBoundWitness, HydratedBlock } from '#block'
2
- import type { IterableRepository } from '#repository'
3
-
4
1
  import type { Addressable } from '../Addressable.ts'
2
+ import type { BlockBoundWitness, HydratedBlock } from '../block/index.ts'
3
+ import type { IterableRepository } from '../repository/index.ts'
5
4
 
6
5
  export type NextBlockProducer = IterableRepository<BlockBoundWitness, HydratedBlock>
7
6
 
@@ -1,7 +1,6 @@
1
1
  import type { Address } from '@xylabs/hex'
2
2
 
3
- import type { BlockBoundWitness } from '#block'
4
-
3
+ import type { BlockBoundWitness } from '../block/index.ts'
5
4
  import type { Service } from './Service.ts'
6
5
 
7
6
  export interface ElectionService extends Service {
@@ -1,7 +1,6 @@
1
1
  import type { Hash } from '@xylabs/hex'
2
2
 
3
- import type { HydratedTransaction } from '#transaction'
4
-
3
+ import type { HydratedTransaction } from '../transaction/index.ts'
5
4
  import type { Service } from './Service.ts'
6
5
 
7
6
  export interface PendingTransactionsService extends Service {
@@ -1,6 +1,6 @@
1
1
  import type { Address } from '@xylabs/hex'
2
2
 
3
- import type { Intent } from '#payload'
3
+ import type { Intent } from '../../payload/index.ts'
4
4
 
5
5
  export interface StakeIntentService {
6
6
 
@@ -1,12 +1,22 @@
1
1
  import type { Hex } from '@xylabs/hex'
2
2
 
3
+ import { MicroXL1 } from '../Xl1.ts'
4
+
3
5
  export interface TransactionFeesBigInt {
4
- base: bigint // In mXL1
5
- gasLimit: bigint // In mXL1
6
- gasPrice: bigint // In mXL1
7
- priority: bigint // In mXL1
6
+ base: MicroXL1
7
+ gasLimit: MicroXL1
8
+ gasPrice: MicroXL1
9
+ priority: MicroXL1
8
10
  }
9
11
 
12
+ export const TransactionGasCosts = {
13
+ byte: MicroXL1(10n),
14
+ payloadValidation: MicroXL1(1000n),
15
+ signatureValidation: MicroXL1(1000n),
16
+ hashValidation: MicroXL1(100n),
17
+ balanceValidation: MicroXL1(100n),
18
+ } as const
19
+
10
20
  export type TransactionFeesHex = {
11
21
  [K in keyof TransactionFeesBigInt]: Hex;
12
22
  }
@@ -15,6 +25,14 @@ export interface TransactionFeesFields {
15
25
  fees: TransactionFeesHex
16
26
  }
17
27
 
28
+ export const minTransactionFees: TransactionFeesBigInt = {
29
+ base: MicroXL1(1000n), gasPrice: MicroXL1(1n), gasLimit: MicroXL1(1000n), priority: MicroXL1(0n),
30
+ } as const
31
+
32
+ export const defaultTransactionFees: TransactionFeesBigInt = {
33
+ base: minTransactionFees.base, gasPrice: MicroXL1(10n), gasLimit: MicroXL1(1_000_000n), priority: MicroXL1(0n),
34
+ } as const
35
+
18
36
  /** Gas Calculation
19
37
  *
20
38
  * 1 Million microXL1 (mXL1) = 1 XL1
@@ -33,6 +51,6 @@ export interface TransactionFeesFields {
33
51
  *
34
52
  * minGasPrice is initially set to 100 mXL1
35
53
  * minBase is initially set to 1000 mXL1
36
- * minPriority is alway 0 mXL1, but can be set to increase the priority of the transaction
54
+ * minPriority is always 0 mXL1, but can be set to increase the priority of the transaction
37
55
  *
38
56
  */
@@ -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 '#block'
4
+ import type { BlockBoundWitness } from '../../block/index.ts'
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 '#block'
5
+ import type { HydratedBlock } from '../../block/index.ts'
6
6
 
7
7
  /**
8
8
  * A function that validates a hydrated block against chain state.
@@ -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 { HydratedBlock } from '#block'
4
+ import type { HydratedBlock } from '../../block/index.ts'
5
5
 
6
6
  /**
7
7
  * A function that validates a hydrated block.
@@ -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 '#block'
4
+ import type { HydratedBlock } from '../../block/index.ts'
5
5
 
6
6
  export type InBlockPayloadValidationFunction = (
7
7
  payload: WithHashStorageMeta<Payload>, block: HydratedBlock