@xyo-network/xl1-protocol-sdk 1.16.5 → 1.16.6

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 (101) hide show
  1. package/dist/neutral/ChainServiceCollectionV2.d.ts +3 -3
  2. package/dist/neutral/ChainServiceCollectionV2.d.ts.map +1 -1
  3. package/dist/neutral/block/primitives/transfers/transfersSummary.d.ts.map +1 -1
  4. package/dist/neutral/index.d.ts +1 -1
  5. package/dist/neutral/index.d.ts.map +1 -1
  6. package/dist/neutral/index.mjs +15 -15
  7. package/dist/neutral/index.mjs.map +1 -1
  8. package/dist/neutral/primitives/summary/balances/balancesSummary.d.ts.map +1 -1
  9. package/dist/neutral/primitives/summary/transfers/transfersSummary.d.ts.map +1 -1
  10. package/dist/neutral/provider/viewer/XyoViewer.d.ts +1 -1
  11. package/dist/neutral/provider/viewer/XyoViewer.d.ts.map +1 -1
  12. package/dist/neutral/services/AccountBalanceService.d.ts +2 -13
  13. package/dist/neutral/services/AccountBalanceService.d.ts.map +1 -1
  14. package/dist/neutral/services/Chain/ChainService.d.ts +1 -1
  15. package/dist/neutral/services/Chain/ChainService.d.ts.map +1 -1
  16. package/dist/neutral/services/Chain/interfaces/ChainStakeViewer.d.ts +1 -1
  17. package/dist/neutral/services/Chain/interfaces/ChainStakeViewer.d.ts.map +1 -1
  18. package/dist/neutral/services/NetworkStakeService.d.ts +1 -1
  19. package/dist/neutral/services/NetworkStakeService.d.ts.map +1 -1
  20. package/dist/neutral/services/StepStakeService.d.ts +1 -1
  21. package/dist/neutral/services/StepStakeService.d.ts.map +1 -1
  22. package/dist/neutral/services/TimeSyncService.d.ts +1 -1
  23. package/dist/neutral/services/TimeSyncService.d.ts.map +1 -1
  24. package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts +1 -4
  25. package/dist/neutral/validation/block/HydratedBlockStateValidationFunction.d.ts.map +1 -1
  26. package/dist/neutral/viewers/AccountBalance.d.ts +25 -0
  27. package/dist/neutral/viewers/AccountBalance.d.ts.map +1 -0
  28. package/dist/neutral/viewers/Block.d.ts.map +1 -0
  29. package/dist/neutral/viewers/Chain.d.ts.map +1 -0
  30. package/dist/neutral/viewers/ChainContract.d.ts.map +1 -0
  31. package/dist/neutral/viewers/Fork.d.ts.map +1 -0
  32. package/dist/neutral/viewers/NetworkStakeStepReward.d.ts.map +1 -0
  33. package/dist/neutral/{interfaces/viewers/StakeViewer.d.ts → viewers/Stake.d.ts} +2 -2
  34. package/dist/neutral/viewers/Stake.d.ts.map +1 -0
  35. package/dist/neutral/{interfaces/viewers/StakeTotalsViewer.d.ts → viewers/StakeTotals.d.ts} +1 -1
  36. package/dist/neutral/viewers/StakeTotals.d.ts.map +1 -0
  37. package/dist/neutral/viewers/StepStake.d.ts.map +1 -0
  38. package/dist/neutral/viewers/TimeSync.d.ts.map +1 -0
  39. package/dist/neutral/viewers/Transaction.d.ts.map +1 -0
  40. package/dist/neutral/viewers/TransferBalance.d.ts.map +1 -0
  41. package/dist/neutral/{interfaces/viewers → viewers}/index.d.ts +2 -2
  42. package/dist/neutral/viewers/index.d.ts.map +1 -0
  43. package/package.json +15 -15
  44. package/src/ChainServiceCollectionV2.ts +3 -3
  45. package/src/block/primitives/frames/calculateFramesFromRange.ts +3 -3
  46. package/src/block/primitives/frames/spec/calculateFramesFromRange.spec.ts +7 -8
  47. package/src/block/primitives/frames/spec/deepCalculateFramesFromRange.spec.ts +9 -9
  48. package/src/block/primitives/transfers/transfersSummary.ts +4 -2
  49. package/src/index.ts +1 -1
  50. package/src/primitives/step/spec/completedStepRewardAddress.spec.ts +4 -4
  51. package/src/primitives/step/stepBlockRange.ts +1 -1
  52. package/src/primitives/summary/balances/balancesSummary.ts +4 -2
  53. package/src/primitives/summary/transfers/transfersSummary.ts +4 -2
  54. package/src/provider/viewer/XyoViewer.ts +1 -1
  55. package/src/services/AccountBalanceService.ts +2 -19
  56. package/src/services/Chain/ChainService.ts +1 -1
  57. package/src/services/Chain/interfaces/ChainStakeViewer.ts +1 -1
  58. package/src/services/NetworkStakeService.ts +1 -1
  59. package/src/services/StepStakeService.ts +1 -1
  60. package/src/services/TimeSyncService.ts +1 -1
  61. package/src/validation/block/HydratedBlockStateValidationFunction.ts +1 -7
  62. package/src/viewers/AccountBalance.ts +31 -0
  63. package/src/{interfaces/viewers/StakeViewer.ts → viewers/Stake.ts} +1 -1
  64. package/src/{interfaces/viewers → viewers}/index.ts +2 -2
  65. package/dist/neutral/interfaces/index.d.ts +0 -2
  66. package/dist/neutral/interfaces/index.d.ts.map +0 -1
  67. package/dist/neutral/interfaces/viewers/AccountBalance.d.ts +0 -19
  68. package/dist/neutral/interfaces/viewers/AccountBalance.d.ts.map +0 -1
  69. package/dist/neutral/interfaces/viewers/Block.d.ts.map +0 -1
  70. package/dist/neutral/interfaces/viewers/Chain.d.ts.map +0 -1
  71. package/dist/neutral/interfaces/viewers/ChainContract.d.ts.map +0 -1
  72. package/dist/neutral/interfaces/viewers/Fork.d.ts.map +0 -1
  73. package/dist/neutral/interfaces/viewers/NetworkStakeStepReward.d.ts.map +0 -1
  74. package/dist/neutral/interfaces/viewers/StakeTotalsViewer.d.ts.map +0 -1
  75. package/dist/neutral/interfaces/viewers/StakeViewer.d.ts.map +0 -1
  76. package/dist/neutral/interfaces/viewers/StepStake.d.ts.map +0 -1
  77. package/dist/neutral/interfaces/viewers/TimeSync.d.ts.map +0 -1
  78. package/dist/neutral/interfaces/viewers/Transaction.d.ts.map +0 -1
  79. package/dist/neutral/interfaces/viewers/TransferBalance.d.ts.map +0 -1
  80. package/dist/neutral/interfaces/viewers/index.d.ts.map +0 -1
  81. package/src/interfaces/index.ts +0 -1
  82. package/src/interfaces/viewers/AccountBalance.ts +0 -25
  83. /package/dist/neutral/{interfaces/viewers → viewers}/Block.d.ts +0 -0
  84. /package/dist/neutral/{interfaces/viewers → viewers}/Chain.d.ts +0 -0
  85. /package/dist/neutral/{interfaces/viewers → viewers}/ChainContract.d.ts +0 -0
  86. /package/dist/neutral/{interfaces/viewers → viewers}/Fork.d.ts +0 -0
  87. /package/dist/neutral/{interfaces/viewers → viewers}/NetworkStakeStepReward.d.ts +0 -0
  88. /package/dist/neutral/{interfaces/viewers → viewers}/StepStake.d.ts +0 -0
  89. /package/dist/neutral/{interfaces/viewers → viewers}/TimeSync.d.ts +0 -0
  90. /package/dist/neutral/{interfaces/viewers → viewers}/Transaction.d.ts +0 -0
  91. /package/dist/neutral/{interfaces/viewers → viewers}/TransferBalance.d.ts +0 -0
  92. /package/src/{interfaces/viewers → viewers}/Block.ts +0 -0
  93. /package/src/{interfaces/viewers → viewers}/Chain.ts +0 -0
  94. /package/src/{interfaces/viewers → viewers}/ChainContract.ts +0 -0
  95. /package/src/{interfaces/viewers → viewers}/Fork.ts +0 -0
  96. /package/src/{interfaces/viewers → viewers}/NetworkStakeStepReward.ts +0 -0
  97. /package/src/{interfaces/viewers/StakeTotalsViewer.ts → viewers/StakeTotals.ts} +0 -0
  98. /package/src/{interfaces/viewers → viewers}/StepStake.ts +0 -0
  99. /package/src/{interfaces/viewers → viewers}/TimeSync.ts +0 -0
  100. /package/src/{interfaces/viewers → viewers}/Transaction.ts +0 -0
  101. /package/src/{interfaces/viewers → viewers}/TransferBalance.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"balancesSummary.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/summary/balances/balancesSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAO1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAIxE,wBAAsB,eAAe,CACnC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAiB3C"}
1
+ {"version":3,"file":"balancesSummary.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/summary/balances/balancesSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAS1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAIxE,wBAAsB,eAAe,CACnC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAiB3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"transfersSummary.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/summary/transfers/transfersSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAO1C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAA;AAK1E,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAqBrE"}
1
+ {"version":3,"file":"transfersSummary.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/summary/transfers/transfersSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAS1C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAA;AAK1E,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAqBrE"}
@@ -1,4 +1,4 @@
1
- import type { AccountBalanceViewerMethods, BlockViewierMethods, ChainViewerMethods, ForkViewerMethods, NetworkStakeStepRewardViewer, StakeViewerMethods, TransactionViewerMethods, TransferBalanceViewerMethods } from '../../interfaces/index.ts';
1
+ import type { AccountBalanceViewerMethods, BlockViewierMethods, ChainViewerMethods, ForkViewerMethods, NetworkStakeStepRewardViewer, StakeViewerMethods, TransactionViewerMethods, TransferBalanceViewerMethods } from '../../viewers/index.ts';
2
2
  import type { NetworkStakeViewer } from './NetworkStake/index.ts';
3
3
  import type { StepViewer } from './StepViewer.ts';
4
4
  export interface XyoViewerMethods extends AccountBalanceViewerMethods, TransferBalanceViewerMethods, NetworkStakeStepRewardViewer, ChainViewerMethods, BlockViewierMethods, TransactionViewerMethods, StakeViewerMethods, ForkViewerMethods {
@@ -1 +1 @@
1
- {"version":3,"file":"XyoViewer.d.ts","sourceRoot":"","sources":["../../../../src/provider/viewer/XyoViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B,EAAE,4BAA4B,EACjG,4BAA4B,EAC5B,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,iBAAiB;CACzG;AAED,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB"}
1
+ {"version":3,"file":"XyoViewer.d.ts","sourceRoot":"","sources":["../../../../src/provider/viewer/XyoViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B,EAAE,4BAA4B,EACjG,4BAA4B,EAC5B,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,iBAAiB;CACzG;AAED,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB"}
@@ -1,16 +1,5 @@
1
- import type { Address, Hash, Hex } from '@xylabs/hex';
2
- import type { Promisable } from '@xylabs/promise';
3
- import type { AttoXL1 } from '@xyo-network/xl1-protocol';
1
+ import type { AccountBalancesViewerMethods, AccountBalanceViewerMethods } from '../viewers/index.ts';
4
2
  import type { ServiceInterface } from './Service.ts';
5
- export interface AccountBalanceProvider {
6
- getBalanceValue: (address: Address) => bigint;
7
- }
8
- export interface AccountBalanceService extends AccountBalanceProvider, ServiceInterface {
9
- getBalanceValues?: Record<Address, bigint>;
10
- getBalance(address: Address): Hex;
11
- getBalances(): Record<Address, Hex>;
12
- }
13
- export interface AccountBalanceServiceV2 extends ServiceInterface {
14
- balances(head: Hash, addresses: Address[]): Promisable<Partial<Record<Address, AttoXL1>>>;
3
+ export interface AccountBalanceService extends AccountBalancesViewerMethods, AccountBalanceViewerMethods, ServiceInterface {
15
4
  }
16
5
  //# sourceMappingURL=AccountBalanceService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountBalanceService.d.ts","sourceRoot":"","sources":["../../../src/services/AccountBalanceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,GAAG,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;CAC9C;AAED,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB,EAAE,gBAAgB;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAE1C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,CAAA;IACjC,WAAW,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;CACpC;AAED,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;CAC1F"}
1
+ {"version":3,"file":"AccountBalanceService.d.ts","sourceRoot":"","sources":["../../../src/services/AccountBalanceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AACpG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,qBAAsB,SAAQ,4BAA4B,EAAE,2BAA2B,EAAE,gBAAgB;CACzH"}
@@ -1,4 +1,4 @@
1
- import type { ChainContractViewer } from '../../interfaces/index.ts';
1
+ import type { ChainContractViewer } from '../../viewers/index.ts';
2
2
  import type { BaseChainService } from './BaseChainService.ts';
3
3
  import type { ChainStaker, ChainStakeViewer } from './interfaces/index.ts';
4
4
  export interface ChainService extends ChainContractViewer, ChainStakeViewer, ChainStaker, BaseChainService {
@@ -1 +1 @@
1
- {"version":3,"file":"ChainService.d.ts","sourceRoot":"","sources":["../../../../src/services/Chain/ChainService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE1E,MAAM,WAAW,YAAa,SAAQ,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB;CAAG"}
1
+ {"version":3,"file":"ChainService.d.ts","sourceRoot":"","sources":["../../../../src/services/Chain/ChainService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE1E,MAAM,WAAW,YAAa,SAAQ,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB;CAAG"}
@@ -1,4 +1,4 @@
1
- import type { ChainContractViewer, StakeTotalsViewer } from '../../../interfaces/index.ts';
1
+ import type { ChainContractViewer, StakeTotalsViewer } from '../../../viewers/index.ts';
2
2
  export interface ChainStakeViewer extends ChainContractViewer, StakeTotalsViewer {
3
3
  }
4
4
  //# sourceMappingURL=ChainStakeViewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChainStakeViewer.d.ts","sourceRoot":"","sources":["../../../../../src/services/Chain/interfaces/ChainStakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAE1F,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB,EAAE,iBAAiB;CAE/E"}
1
+ {"version":3,"file":"ChainStakeViewer.d.ts","sourceRoot":"","sources":["../../../../../src/services/Chain/interfaces/ChainStakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAEvF,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB,EAAE,iBAAiB;CAE/E"}
@@ -1,4 +1,4 @@
1
- import type { NetworkStakeStepRewardViewer } from '../interfaces/index.ts';
1
+ import type { NetworkStakeStepRewardViewer } from '../viewers/index.ts';
2
2
  import type { ServiceInterface } from './Service.ts';
3
3
  export interface NetworkStakeStepRewardService extends NetworkStakeStepRewardViewer, ServiceInterface {
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/NetworkStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,6BAA8B,SAAQ,4BAA4B,EAAE,gBAAgB;CAAG"}
1
+ {"version":3,"file":"NetworkStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/NetworkStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,6BAA8B,SAAQ,4BAA4B,EAAE,gBAAgB;CAAG"}
@@ -1,4 +1,4 @@
1
- import type { StepStakeViewer } from '../interfaces/index.ts';
1
+ import type { StepStakeViewer } from '../viewers/index.ts';
2
2
  import type { ServiceInterface } from './Service.ts';
3
3
  export interface StepStakeService extends ServiceInterface, StepStakeViewer {
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StepStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/StepStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,EAAE,eAAe;CAAG"}
1
+ {"version":3,"file":"StepStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/StepStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,EAAE,eAAe;CAAG"}
@@ -1,4 +1,4 @@
1
- import type { TimeSyncViewerMethods } from '../interfaces/index.ts';
1
+ import type { TimeSyncViewerMethods } from '../viewers/index.ts';
2
2
  import type { ServiceInterface } from './Service.ts';
3
3
  export interface TimeSyncService extends ServiceInterface, TimeSyncViewerMethods {
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TimeSyncService.d.ts","sourceRoot":"","sources":["../../../src/services/TimeSyncService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,qBAAqB;CAAG"}
1
+ {"version":3,"file":"TimeSyncService.d.ts","sourceRoot":"","sources":["../../../src/services/TimeSyncService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,qBAAqB;CAAG"}
@@ -1,6 +1,6 @@
1
1
  import type { Promisable } from '@xylabs/promise';
2
2
  import type { ChainId, HydratedBlock } from '@xyo-network/xl1-protocol';
3
- import type { AccountBalanceService, AccountBalanceServiceV2 } from '../../services/index.ts';
3
+ import type { AccountBalanceService } from '../../services/index.ts';
4
4
  import type { HydratedBlockStateValidationError } from './error.ts';
5
5
  /**
6
6
  * A function that validates a hydrated block against chain state.
@@ -12,7 +12,4 @@ import type { HydratedBlockStateValidationError } from './error.ts';
12
12
  export type HydratedBlockStateValidationFunction = (hydratedBlock: HydratedBlock, chainId: ChainId, services: {
13
13
  accountBalance: AccountBalanceService;
14
14
  }) => Promisable<HydratedBlockStateValidationError[]>;
15
- export type HydratedBlockStateValidationFunctionV2 = (hydratedBlock: HydratedBlock, chainId: ChainId, services: {
16
- accountBalance: AccountBalanceServiceV2;
17
- }) => Promisable<HydratedBlockStateValidationError[]>;
18
15
  //# sourceMappingURL=HydratedBlockStateValidationFunction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HydratedBlockStateValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/HydratedBlockStateValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAC7F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAA;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG,CACjD,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;IAAE,cAAc,EAAE,qBAAqB,CAAA;CAAE,KAChD,UAAU,CAAC,iCAAiC,EAAE,CAAC,CAAA;AAEpD,MAAM,MAAM,sCAAsC,GAAG,CACnD,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;IAAE,cAAc,EAAE,uBAAuB,CAAA;CAAE,KAClD,UAAU,CAAC,iCAAiC,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"HydratedBlockStateValidationFunction.d.ts","sourceRoot":"","sources":["../../../../src/validation/block/HydratedBlockStateValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAA;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG,CACjD,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;IAAE,cAAc,EAAE,qBAAqB,CAAA;CAAE,KAChD,UAAU,CAAC,iCAAiC,EAAE,CAAC,CAAA"}
@@ -0,0 +1,25 @@
1
+ import type { Address, Hash } from '@xylabs/hex';
2
+ import type { Promisable } from '@xylabs/promise';
3
+ import type { Signed } from '@xyo-network/boundwitness-model';
4
+ import type { WithStorageMeta } from '@xyo-network/payload-model';
5
+ import type { AttoXL1, BlockBoundWitness, TransactionBoundWitness, Transfer, XL1BlockRange } from '@xyo-network/xl1-protocol';
6
+ export type AccountBalanceHistoryItem = [
7
+ WithStorageMeta<Signed<BlockBoundWitness>>,
8
+ WithStorageMeta<Signed<TransactionBoundWitness>> | null,
9
+ WithStorageMeta<Transfer>
10
+ ];
11
+ export interface AccountBalancesViewerMethods {
12
+ accountBalances(address: Address[], head?: Hash): Promisable<Partial<Record<Address, AttoXL1>>>;
13
+ accountBalances(address: Address[], range?: XL1BlockRange): Promisable<Partial<Record<Address, AttoXL1>>>;
14
+ accountBalancesHistories(address: Address[], head?: Hash): Promisable<Partial<Record<Address, AccountBalanceHistoryItem[]>>>;
15
+ accountBalancesHistories(address: Address[], range?: XL1BlockRange): Promisable<Partial<Record<Address, AccountBalanceHistoryItem[]>>>;
16
+ }
17
+ export interface AccountBalanceViewerMethods {
18
+ accountBalance(address: Address, head?: Hash): Promisable<AttoXL1>;
19
+ accountBalance(address: Address, range?: XL1BlockRange): Promisable<AttoXL1>;
20
+ accountBalanceHistory(address: Address, head?: Hash): Promisable<AccountBalanceHistoryItem[]>;
21
+ accountBalanceHistory(address: Address, range?: XL1BlockRange): Promisable<AccountBalanceHistoryItem[]>;
22
+ }
23
+ export interface AccountBalanceViewer extends AccountBalanceViewerMethods {
24
+ }
25
+ //# sourceMappingURL=AccountBalance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountBalance.d.ts","sourceRoot":"","sources":["../../../src/viewers/AccountBalance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EACV,OAAO,EACP,iBAAiB,EAAE,uBAAuB,EAAE,QAAQ,EACpD,aAAa,EACd,MAAM,2BAA2B,CAAA;AAElC,MAAM,MAAM,yBAAyB,GAAG;IACtC,eAAe,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC1C,eAAe,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,GAAG,IAAI;IACvD,eAAe,CAAC,QAAQ,CAAC;CAC1B,CAAA;AAED,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IAC/F,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACzG,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAAC,CAAA;IAC5H,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAAC,CAAA;CACvI;AAED,MAAM,WAAW,2BAA2B;IAC1C,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAClE,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAC5E,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAA;IAC7F,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAA;CACxG;AAED,MAAM,WAAW,oBAAqB,SAAQ,2BAA2B;CAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../src/viewers/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IACzD,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IACpE,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC,CAAA;IAErE,YAAY,IAAI,UAAU,CAAC,aAAa,CAAC,CAAA;IACzC,gBAAgB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IACpC,kBAAkB,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;CACzC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../src/viewers/Chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,WAAW,kBAAkB;IACjC,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;CAC/B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChainContract.d.ts","sourceRoot":"","sources":["../../../src/viewers/ChainContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACtC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAC/B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IACjC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACtC,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACvC;AAED,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;CAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fork.d.ts","sourceRoot":"","sources":["../../../src/viewers/Fork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEjD,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IACpE,WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;CACvC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworkStakeStepReward.d.ts","sourceRoot":"","sources":["../../../src/viewers/NetworkStakeStepReward.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,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEjF,MAAM,WAAW,0CAA0C;IAEzD,oCAAoC,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAG3F,mCAAmC,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAGjH,kCAAkC,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC,oBAAoB,CAAA,MAAM,EAAE,kBAAkB,CAAA,MAAM,CAAC,CAAC,CAAA;IAG/I,sCAAsC,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACpG;AAED,MAAM,WAAW,uCAAuC;IAGtD,iCAAiC,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAG7F,gCAAgC,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;CAC7F;AAED,MAAM,WAAW,2CAA2C;IAE1D,oCAAoC,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAGjG,2CAA2C,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACzG;AAED,MAAM,WAAW,4BAA6B,SAC5C,uCAAuC,EACvC,0CAA0C,EAC1C,2CAA2C;IAE3C,sCAAsC,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG5E,iCAAiC,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAG1G,6BAA6B,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAGxE,wCAAwC,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAG/G,gCAAgC,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG3E,iCAAiC,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAE5E,wCAAwC,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG9E,kCAAkC,CAAC,QAAQ,EAAE,MAAM,EACjD,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAGpF,+BAA+B,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG5E,mCAAmC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACpG"}
@@ -1,6 +1,6 @@
1
1
  import type { Address } from '@xylabs/hex';
2
2
  import type { Promisable } from '@xylabs/promise';
3
- import type { Position } from '../../model/index.ts';
3
+ import type { Position } from '../model/index.ts';
4
4
  export interface StakeViewerMethods {
5
5
  stakeById(id: number): Promisable<Position>;
6
6
  stakeByStaker(staker: Address, slot: number): Promisable<Position>;
@@ -8,4 +8,4 @@ export interface StakeViewerMethods {
8
8
  stakesByStaked(staked: Address): Promisable<Position[]>;
9
9
  stakesByStaker(staker: Address): Promisable<Position[]>;
10
10
  }
11
- //# sourceMappingURL=StakeViewer.d.ts.map
11
+ //# sourceMappingURL=Stake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stake.d.ts","sourceRoot":"","sources":["../../../src/viewers/Stake.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,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC3C,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAElE,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IACtD,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;IACvD,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;CACxD"}
@@ -11,4 +11,4 @@ export interface StakeTotalsViewerMethods {
11
11
  }
12
12
  export interface StakeTotalsViewer extends StakeTotalsViewerMethods {
13
13
  }
14
- //# sourceMappingURL=StakeTotalsViewer.d.ts.map
14
+ //# sourceMappingURL=StakeTotals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StakeTotals.d.ts","sourceRoot":"","sources":["../../../src/viewers/StakeTotals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,WAAW,wBAAwB;IACvC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC5B,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACnD,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACpD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC7B,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACpD,SAAS,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC/B,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;CAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepStake.d.ts","sourceRoot":"","sources":["../../../src/viewers/StepStake.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,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,MAAM,WAAW,sBAAsB;IAErC,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAGtE,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,KAAK,UAAU,CAAC,MAAM,CAAC,CAAA;CAClF;AAUD,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;CAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeSync.d.ts","sourceRoot":"","sources":["../../../src/viewers/TimeSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAExE,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAE3F,8CAA8C;IAC9C,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAE7D,8CAA8C;IAC9C,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC,CAAA;IAEzE,6EAA6E;IAC7E,kBAAkB,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;CAC9C;AAED,MAAM,WAAW,cAAe,SAAQ,qBAAqB;CAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/viewers/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAE1E,MAAM,WAAW,wBAAwB;IACvC,8BAA8B,CAAC,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IACvH,gCAAgC,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IAC7H,iBAAiB,CAAC,eAAe,EAAE,IAAI,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;CACvF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransferBalance.d.ts","sourceRoot":"","sources":["../../../src/viewers/TransferBalance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,EACV,OAAO,EACP,iBAAiB,EAAE,uBAAuB,EAAE,QAAQ,EACpD,aAAa,EACd,MAAM,2BAA2B,CAAA;AAElC,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,CAAC,iBAAiB,CAAC;IACzB,MAAM,CAAC,uBAAuB,CAAC,GAAG,IAAI;IACtC,QAAQ;CACT,CAAA;AACD,MAAM,MAAM,YAAY,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAA,OAAO,CAAC,CAAA;AAEhE,MAAM,WAAW,6BAA6B;IAC5C,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IACpG,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAClI,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7G,6BAA6B,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;CAC5I;AAED,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IACtD,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,0BAA0B,EAAE,CAAC,CAAA;IACzG,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAC/D,0BAA0B,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,0BAA0B,EAAE,CAAC,CAAA;CAC5F"}
@@ -4,8 +4,8 @@ export * from './Chain.ts';
4
4
  export * from './ChainContract.ts';
5
5
  export * from './Fork.ts';
6
6
  export * from './NetworkStakeStepReward.ts';
7
- export * from './StakeTotalsViewer.ts';
8
- export * from './StakeViewer.ts';
7
+ export * from './Stake.ts';
8
+ export * from './StakeTotals.ts';
9
9
  export * from './StepStake.ts';
10
10
  export * from './TimeSync.ts';
11
11
  export * from './Transaction.ts';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,WAAW,CAAA;AACzB,cAAc,6BAA6B,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,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-sdk",
4
- "version": "1.16.5",
4
+ "version": "1.16.6",
5
5
  "description": "XYO Layer One SDK Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -36,19 +36,19 @@
36
36
  "src"
37
37
  ],
38
38
  "dependencies": {
39
- "@xylabs/array": "~5.0.22",
40
- "@xylabs/arraybuffer": "~5.0.22",
41
- "@xylabs/assert": "~5.0.22",
42
- "@xylabs/base": "~5.0.22",
43
- "@xylabs/creatable": "~5.0.22",
44
- "@xylabs/delay": "~5.0.22",
45
- "@xylabs/events": "~5.0.22",
46
- "@xylabs/hex": "~5.0.22",
47
- "@xylabs/logger": "~5.0.22",
48
- "@xylabs/object": "~5.0.22",
49
- "@xylabs/promise": "~5.0.22",
50
- "@xylabs/telemetry": "~5.0.22",
51
- "@xylabs/typeof": "~5.0.22",
39
+ "@xylabs/array": "~5.0.24",
40
+ "@xylabs/arraybuffer": "~5.0.24",
41
+ "@xylabs/assert": "~5.0.24",
42
+ "@xylabs/base": "~5.0.24",
43
+ "@xylabs/creatable": "~5.0.24",
44
+ "@xylabs/delay": "~5.0.24",
45
+ "@xylabs/events": "~5.0.24",
46
+ "@xylabs/hex": "~5.0.24",
47
+ "@xylabs/logger": "~5.0.24",
48
+ "@xylabs/object": "~5.0.24",
49
+ "@xylabs/promise": "~5.0.24",
50
+ "@xylabs/telemetry": "~5.0.24",
51
+ "@xylabs/typeof": "~5.0.24",
52
52
  "@xyo-network/account-model": "~5.1.19",
53
53
  "@xyo-network/archivist-memory": "~5.1.19",
54
54
  "@xyo-network/archivist-model": "~5.1.19",
@@ -58,7 +58,7 @@
58
58
  "@xyo-network/payload-model": "~5.1.19",
59
59
  "@xyo-network/wallet": "~5.1.19",
60
60
  "@xyo-network/wallet-model": "~5.1.19",
61
- "@xyo-network/xl1-protocol": "~1.13.1",
61
+ "@xyo-network/xl1-protocol": "~1.13.5",
62
62
  "async-mutex": "~0.5.0",
63
63
  "ethers": "~6.15.0",
64
64
  "lru-cache": "^11.2.2",
@@ -1,13 +1,13 @@
1
1
  import type { ArchivistInstance, WriteArchivist } from '@xyo-network/archivist-model'
2
2
  import type { WalletInstance } from '@xyo-network/wallet-model'
3
3
 
4
- import type { ChainContractViewer } from './interfaces/index.ts'
5
4
  import type {
6
- AccountBalanceServiceV2, BlockProducerService, BlockRewardService,
5
+ AccountBalanceService, BlockProducerService, BlockRewardService,
7
6
  ChainStaker, ChainStakeViewer, ElectionService, EventingChainBlockNumberIteratorService,
8
7
  PendingTransactionsService,
9
8
  StakeIntentService,
10
9
  } from './services/index.ts'
10
+ import type { ChainContractViewer } from './viewers/index.ts'
11
11
 
12
12
  export interface ChainServiceCollectionV2 {
13
13
 
@@ -18,7 +18,7 @@ export interface ChainServiceCollectionV2 {
18
18
  /**
19
19
  * Services for working with account balances
20
20
  */
21
- balance: AccountBalanceServiceV2
21
+ balance: AccountBalanceService
22
22
  /**
23
23
  * The archivist which the chain data is stored in
24
24
  */
@@ -14,14 +14,14 @@ export function calculateFramesFromRange(range: XL1BlockRange, step: number): [
14
14
  // if the start is not aligned with the range, add a remaining block
15
15
  if (start !== range[0]) {
16
16
  start += size
17
- remaining.push([range[0], asXL1BlockNumber(Math.min(start - 1, range[1]))])
17
+ remaining.push([range[0], asXL1BlockNumber(Math.min(start - 1, range[1]), true)])
18
18
  }
19
19
 
20
20
  for (let i = start; i <= range[1]; i += size) {
21
21
  if ((i + size - 1) <= range[1]) {
22
- fitted.push([asXL1BlockNumber(i), asXL1BlockNumber(Math.min(i + size - 1, range[1]))])
22
+ fitted.push([asXL1BlockNumber(i, true), asXL1BlockNumber(Math.min(i + size - 1, range[1]), true)])
23
23
  } else {
24
- remaining.push([asXL1BlockNumber(i), range[1]])
24
+ remaining.push([asXL1BlockNumber(i, true), range[1]])
25
25
  }
26
26
  }
27
27
  return [fitted, remaining]
@@ -1,6 +1,5 @@
1
- import type { XL1BlockRange } from '@xyo-network/xl1-protocol'
2
1
  import {
3
- asXL1BlockNumber, stepSize, XL1_BLOCK_NUMBER_ZERO,
2
+ asXL1BlockRange, stepSize, XL1_BLOCK_NUMBER_ZERO,
4
3
  } from '@xyo-network/xl1-protocol'
5
4
  import {
6
5
  describe, expect, it,
@@ -11,7 +10,7 @@ import { calculateFramesFromRange } from '../calculateFramesFromRange.ts'
11
10
  describe('calculateFramesFromRange', () => {
12
11
  it('handles range aligned with step size', () => {
13
12
  const step = 1 // 31
14
- const range: XL1BlockRange = [XL1_BLOCK_NUMBER_ZERO, asXL1BlockNumber(stepSize(step) - 1)]
13
+ const range = asXL1BlockRange([XL1_BLOCK_NUMBER_ZERO, stepSize(step) - 1], true)
15
14
  const [fitted, remaining] = calculateFramesFromRange(range, step)
16
15
 
17
16
  expect(fitted).toEqual([[0, 30]])
@@ -20,7 +19,7 @@ describe('calculateFramesFromRange', () => {
20
19
 
21
20
  it('handles range starting at step boundary but incomplete', () => {
22
21
  const step = 1
23
- const range: XL1BlockRange = [asXL1BlockNumber(stepSize(step)), asXL1BlockNumber(stepSize(step) + 1)]
22
+ const range = asXL1BlockRange([stepSize(step), stepSize(step) + 1], true)
24
23
  const [fitted, remaining] = calculateFramesFromRange(range, step)
25
24
 
26
25
  expect(fitted).toEqual([])
@@ -31,7 +30,7 @@ describe('calculateFramesFromRange', () => {
31
30
  const step = 1
32
31
  const multiplier = 2
33
32
  const additional = 1
34
- const range: XL1BlockRange = [asXL1BlockNumber(stepSize(step)), asXL1BlockNumber((stepSize(step) + additional) * multiplier)]
33
+ const range = asXL1BlockRange([stepSize(step), (stepSize(step) + additional) * multiplier], true)
35
34
  const [fitted, remaining] = calculateFramesFromRange(range, step)
36
35
 
37
36
  expect(fitted).toEqual([[31, 61]])
@@ -42,7 +41,7 @@ describe('calculateFramesFromRange', () => {
42
41
  const step = 5
43
42
  const multiplier = 2
44
43
  const additional = 17
45
- const range: XL1BlockRange = [asXL1BlockNumber(stepSize(step)), asXL1BlockNumber((stepSize(step) + additional) * multiplier)]
44
+ const range = asXL1BlockRange([stepSize(step), (stepSize(step) + additional) * multiplier], true)
46
45
  const [fitted, remaining] = calculateFramesFromRange(range, step)
47
46
 
48
47
  expect(fitted).toEqual([[510_511, 1_021_021]])
@@ -53,7 +52,7 @@ describe('calculateFramesFromRange', () => {
53
52
  const step = 1
54
53
  const multiplier = 2
55
54
  const additional = 1
56
- const range: XL1BlockRange = [asXL1BlockNumber(stepSize(step) - additional), asXL1BlockNumber((stepSize(step) + additional) * multiplier)]
55
+ const range = asXL1BlockRange([stepSize(step) - additional, (stepSize(step) + additional) * multiplier], true)
57
56
  const [fitted, remaining] = calculateFramesFromRange(range, step)
58
57
 
59
58
  expect(fitted).toEqual([[31, 61]])
@@ -64,7 +63,7 @@ describe('calculateFramesFromRange', () => {
64
63
  const step = 5
65
64
  const multiplier = 2
66
65
  const additional = 17
67
- const range: XL1BlockRange = [asXL1BlockNumber(stepSize(step) - additional), asXL1BlockNumber((stepSize(step) + additional) * multiplier)]
66
+ const range = asXL1BlockRange([stepSize(step) - additional, (stepSize(step) + additional) * multiplier], true)
68
67
  const [fitted, remaining] = calculateFramesFromRange(range, step)
69
68
 
70
69
  expect(fitted).toEqual([[510_511, 1_021_021]])
@@ -7,7 +7,7 @@ import { deepCalculateFramesFromRange } from '../deepCalculateFramesFromRange.ts
7
7
 
8
8
  describe('deepCalculateFramesFromRange', () => {
9
9
  it('calculates frames for a simple range with one step level', () => {
10
- const range = asXL1BlockRange([0, 9])
10
+ const range = asXL1BlockRange([0, 9], true)
11
11
  const result = deepCalculateFramesFromRange(range)
12
12
 
13
13
  // With step 0 (size 10), this should fit in one frame
@@ -15,7 +15,7 @@ describe('deepCalculateFramesFromRange', () => {
15
15
  })
16
16
 
17
17
  it('calculates frames for a range spanning multiple step sizes', () => {
18
- const range = asXL1BlockRange([0, 250])
18
+ const range = asXL1BlockRange([0, 250], true)
19
19
  const result = deepCalculateFramesFromRange(range)
20
20
 
21
21
  expect(result).toContainEqual([0, 210])
@@ -25,49 +25,49 @@ describe('deepCalculateFramesFromRange', () => {
25
25
  })
26
26
 
27
27
  it('calculates frames for range with multiple step levels - [0, 1500]', () => {
28
- const range = asXL1BlockRange([0, 1500])
28
+ const range = asXL1BlockRange([0, 1500], true)
29
29
  const result = deepCalculateFramesFromRange(range)
30
30
  expect(result).toMatchSnapshot(result)
31
31
  expect(result.length).toEqual(19)
32
32
  })
33
33
 
34
34
  it('calculates frames for range with multiple step levels - [0, 3000]', () => {
35
- const range = asXL1BlockRange([0, 3000])
35
+ const range = asXL1BlockRange([0, 3000], true)
36
36
  const result = deepCalculateFramesFromRange(range)
37
37
  expect(result).toMatchSnapshot(result)
38
38
  expect(result.length).toEqual(31)
39
39
  })
40
40
 
41
41
  it('calculates frames for range with multiple step levels = [45, 1599]', () => {
42
- const range = asXL1BlockRange([45, 1599])
42
+ const range = asXL1BlockRange([45, 1599], true)
43
43
  const result = deepCalculateFramesFromRange(range)
44
44
  expect(result).toMatchSnapshot(result)
45
45
  expect(result.length).toEqual(43)
46
46
  })
47
47
 
48
48
  it('calculates frames for range with multiple step levels = [45, 3333]', () => {
49
- const range = asXL1BlockRange([45, 3333])
49
+ const range = asXL1BlockRange([45, 3333], true)
50
50
  const result = deepCalculateFramesFromRange(range)
51
51
  expect(result).toMatchSnapshot(result)
52
52
  expect(result.length).toEqual(85)
53
53
  })
54
54
 
55
55
  it('calculates frames for range with multiple step levels - [23_145, 230_102_040]', () => {
56
- const range = asXL1BlockRange([23_145, 230_102_040])
56
+ const range = asXL1BlockRange([23_145, 230_102_040], true)
57
57
  const result = deepCalculateFramesFromRange(range)
58
58
  expect(result).toMatchSnapshot(result)
59
59
  expect(result.length).toEqual(742)
60
60
  })
61
61
 
62
62
  it('calculates frames for range with multiple step levels - [23_145, 34_548_554_394]', () => {
63
- const range = asXL1BlockRange([23_145, 34_548_554_394])
63
+ const range = asXL1BlockRange([23_145, 34_548_554_394], true)
64
64
  const result = deepCalculateFramesFromRange(range)
65
65
  expect(result).toMatchSnapshot(result)
66
66
  expect(result.length).toEqual(1468)
67
67
  })
68
68
 
69
69
  it('calculates frames for range with multiple step levels - [23_145, 4_598_734_539_845]', () => {
70
- const range = asXL1BlockRange([23_145, 4_598_734_539_845])
70
+ const range = asXL1BlockRange([23_145, 4_598_734_539_845], true)
71
71
  const result = deepCalculateFramesFromRange(range)
72
72
  expect(result).toMatchSnapshot(result)
73
73
  expect(result.length).toEqual(2445)
@@ -2,7 +2,9 @@ import type { Address, Hash } from '@xylabs/hex'
2
2
  import { asAddress } from '@xylabs/hex'
3
3
  import { spanRootAsync } from '@xylabs/telemetry'
4
4
  import { isDefined } from '@xylabs/typeof'
5
- import { asBlockBoundWitnessWithStorageMeta, asXL1BlockNumber } from '@xyo-network/xl1-protocol'
5
+ import {
6
+ asBlockBoundWitnessWithStorageMeta, asXL1BlockNumber, asXL1BlockRange,
7
+ } from '@xyo-network/xl1-protocol'
6
8
 
7
9
  import type { TransfersStepSummaryContext } from '../../../model/index.ts'
8
10
  import { parseSignedBigInt } from '../../../SignedBigInt.ts'
@@ -18,7 +20,7 @@ export async function transfersSummary(
18
20
  const headResult = await transferContext.store.chainMap.get(headHash)
19
21
  const headBoundWitness = asBlockBoundWitnessWithStorageMeta(headResult, () => `Head block not found for hash: ${transferContext.head}`, { required: true })
20
22
  const rangeStart = asXL1BlockNumber(isDefined(transferContext.windowSize) ? Math.max(headBoundWitness.block - transferContext.windowSize + 1, 0) : 0)
21
- const ranges = deepCalculateFramesFromRange([rangeStart, asXL1BlockNumber(headBoundWitness.block)])
23
+ const ranges = deepCalculateFramesFromRange(asXL1BlockRange([rangeStart, headBoundWitness.block], true))
22
24
  const summaries = await Promise.all(ranges.map(range => transfersStepSummaryFromRange(transferContext, range)))
23
25
  const transfers: Partial<Record<Address, Partial<Record<Address, bigint>>>> = {}
24
26
  for (let summary of summaries) {
package/src/index.ts CHANGED
@@ -5,7 +5,6 @@ export * from './constants.ts'
5
5
  export * from './driver/index.ts'
6
6
  export * from './eip-712/index.ts'
7
7
  export * from './instances/index.ts'
8
- export * from './interfaces/index.ts'
9
8
  export * from './map/index.ts'
10
9
  export * from './model/index.ts'
11
10
  export * from './multipliers.ts'
@@ -18,4 +17,5 @@ export * from './simple/index.ts'
18
17
  export * from './time/index.ts'
19
18
  export * from './transaction/index.ts'
20
19
  export * from './validation/index.ts'
20
+ export * from './viewers/index.ts'
21
21
  export * from './wallet/index.ts'
@@ -7,22 +7,22 @@ import { completedStepRewardAddress } from '../completedStepRewardAddress.ts'
7
7
 
8
8
  describe('completedStepRewardAddress', () => {
9
9
  it('should get index [single entry - step size]', () => {
10
- const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311), step: 2311 })
10
+ const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311, true), step: 2311 })
11
11
  expect (address).toBe('93d321ab2e01ce14bbe601d3c49b330d250c5ab1')
12
12
  })
13
13
 
14
14
  it('should get index [single entry - step ordinal]', () => {
15
- const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311), step: 3 })
15
+ const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311, true), step: 3 })
16
16
  expect (address).toBe('93d321ab2e01ce14bbe601d3c49b330d250c5ab1')
17
17
  })
18
18
 
19
19
  it('should get index [single entry - step size]', () => {
20
- const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311 * 2), step: 2311 })
20
+ const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311 * 2, true), step: 2311 })
21
21
  expect (address).toBe('04c602f975a00794efd01e5fe07266cc1945f321')
22
22
  })
23
23
 
24
24
  it('should get index [single entry - step ordinal]', () => {
25
- const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311 * 2), step: 3 })
25
+ const address = completedStepRewardAddress({ block: asXL1BlockNumber(2311 * 2, true), step: 3 })
26
26
  expect (address).toBe('04c602f975a00794efd01e5fe07266cc1945f321')
27
27
  })
28
28
  })
@@ -4,5 +4,5 @@ import { asXL1BlockRange, StepSizes } from '@xyo-network/xl1-protocol'
4
4
  export function stepBlockRange({ block, step }: StepIdentity): XL1BlockRange {
5
5
  const stepSize = StepSizes[step]
6
6
  const start = block - stepSize
7
- return asXL1BlockRange([start, start + stepSize - 1])
7
+ return asXL1BlockRange([start, start + stepSize - 1], true)
8
8
  }
@@ -2,7 +2,9 @@ import type { Address } from '@xylabs/hex'
2
2
  import { asAddress } from '@xylabs/hex'
3
3
  import { spanRootAsync } from '@xylabs/telemetry'
4
4
  import { isDefined } from '@xylabs/typeof'
5
- import { asBlockBoundWitnessWithStorageMeta, asXL1BlockNumber } from '@xyo-network/xl1-protocol'
5
+ import {
6
+ asBlockBoundWitnessWithStorageMeta, asXL1BlockNumber, asXL1BlockRange,
7
+ } from '@xyo-network/xl1-protocol'
6
8
 
7
9
  import { deepCalculateFramesFromRange } from '../../../block/index.ts'
8
10
  import type { BalanceStepSummaryContext } from '../../../model/index.ts'
@@ -17,7 +19,7 @@ export async function balancesSummary(
17
19
  const headResult = await context.store.chainMap.get(headHash)
18
20
  const headBoundWitness = asBlockBoundWitnessWithStorageMeta(headResult, () => `Head block not found for hash: ${headHash}`, { required: true })
19
21
  const rangeStart = asXL1BlockNumber(isDefined(context.windowSize) ? Math.max(headBoundWitness.block - context.windowSize + 1, 0) : 0)
20
- const ranges = deepCalculateFramesFromRange([rangeStart, asXL1BlockNumber(headBoundWitness.block)])
22
+ const ranges = deepCalculateFramesFromRange(asXL1BlockRange([rangeStart, headBoundWitness.block], true))
21
23
  const summaries = await Promise.all(ranges.map(range => balancesStepSummaryFromRange(context, range)))
22
24
  const balances: Partial<Record<Address, bigint>> = {}
23
25
  for (let summary of summaries) {