@xyo-network/chain-sdk 4.0.6 → 4.2.1

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 (140) hide show
  1. package/dist/browser/modules/ethereum/block/findContractDeploymentBlock.d.ts +25 -0
  2. package/dist/browser/modules/ethereum/block/findContractDeploymentBlock.d.ts.map +1 -0
  3. package/dist/browser/modules/ethereum/block/index.d.ts +1 -0
  4. package/dist/browser/modules/ethereum/block/index.d.ts.map +1 -1
  5. package/dist/browser/modules/ethereum/drivers/EvmStakeEventZod.d.ts +12 -12
  6. package/dist/browser/modules/ethereum/drivers/EvmStakeEventsViewer.d.ts +44 -14
  7. package/dist/browser/modules/ethereum/drivers/EvmStakeEventsViewer.d.ts.map +1 -1
  8. package/dist/browser/modules/ethereum/drivers/EvmStakeViewer.d.ts +1 -1
  9. package/dist/browser/modules/ethereum/drivers/EvmStakeViewer.d.ts.map +1 -1
  10. package/dist/browser/modules/ethereum/index.d.ts +2 -0
  11. package/dist/browser/modules/ethereum/index.d.ts.map +1 -1
  12. package/dist/browser/modules/ethereum/indexing/EvmEventIndexModel.d.ts +107 -0
  13. package/dist/browser/modules/ethereum/indexing/EvmEventIndexModel.d.ts.map +1 -0
  14. package/dist/browser/modules/ethereum/indexing/EvmEventIndexPaths.d.ts +6 -0
  15. package/dist/browser/modules/ethereum/indexing/EvmEventIndexPaths.d.ts.map +1 -0
  16. package/dist/browser/modules/ethereum/indexing/EvmEventIndexPublishRunner.d.ts +9 -0
  17. package/dist/browser/modules/ethereum/indexing/EvmEventIndexPublishRunner.d.ts.map +1 -0
  18. package/dist/browser/modules/ethereum/indexing/RestStakeEventsViewer.d.ts +54 -0
  19. package/dist/browser/modules/ethereum/indexing/RestStakeEventsViewer.d.ts.map +1 -0
  20. package/dist/browser/modules/ethereum/indexing/index.d.ts +5 -0
  21. package/dist/browser/modules/ethereum/indexing/index.d.ts.map +1 -0
  22. package/dist/browser/modules/ethereum/providers/AbstractEvmProvider.d.ts +4 -1
  23. package/dist/browser/modules/ethereum/providers/AbstractEvmProvider.d.ts.map +1 -1
  24. package/dist/browser/modules/ethereum/providers/AbstractEvmViewer.d.ts +5 -1
  25. package/dist/browser/modules/ethereum/providers/AbstractEvmViewer.d.ts.map +1 -1
  26. package/dist/browser/modules/ethereum/providers/EvmChainContractViewer.d.ts +1 -2
  27. package/dist/browser/modules/ethereum/providers/EvmChainContractViewer.d.ts.map +1 -1
  28. package/dist/browser/modules/ethereum/providers/EvmStakeTotalsViewer.d.ts +1 -1
  29. package/dist/browser/modules/ethereum/providers/EvmStakeTotalsViewer.d.ts.map +1 -1
  30. package/dist/browser/modules/ethereum/rpc/index.d.ts +4 -0
  31. package/dist/browser/modules/ethereum/rpc/index.d.ts.map +1 -0
  32. package/dist/browser/modules/ethereum/rpc/isRpcRangeLimitError.d.ts +15 -0
  33. package/dist/browser/modules/ethereum/rpc/isRpcRangeLimitError.d.ts.map +1 -0
  34. package/dist/browser/modules/ethereum/rpc/isRpcRateLimitError.d.ts +1 -1
  35. package/dist/browser/modules/services/ChainValidator/XyoValidator.d.ts +7 -1
  36. package/dist/browser/modules/services/ChainValidator/XyoValidator.d.ts.map +1 -1
  37. package/dist/browser/modules/services/Election/BaseElectionService.d.ts +1 -0
  38. package/dist/browser/modules/services/Election/BaseElectionService.d.ts.map +1 -1
  39. package/dist/browser/modules/services/NetworkStakeStepReward/BaseNetworkStakeStepRewardService.d.ts +1 -2
  40. package/dist/browser/modules/services/NetworkStakeStepReward/BaseNetworkStakeStepRewardService.d.ts.map +1 -1
  41. package/dist/browser/modules/services/implementation/processPendingBlocks.d.ts +4 -4
  42. package/dist/browser/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +5 -2
  43. package/dist/browser/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
  44. package/dist/browser/modules/services/simple/block/runner/producerTuning.d.ts +13 -0
  45. package/dist/browser/modules/services/simple/block/runner/producerTuning.d.ts.map +1 -0
  46. package/dist/neutral/ethereum.mjs +469 -95
  47. package/dist/neutral/ethereum.mjs.map +4 -4
  48. package/dist/neutral/modules/ethereum/block/findContractDeploymentBlock.d.ts +25 -0
  49. package/dist/neutral/modules/ethereum/block/findContractDeploymentBlock.d.ts.map +1 -0
  50. package/dist/neutral/modules/ethereum/block/index.d.ts +1 -0
  51. package/dist/neutral/modules/ethereum/block/index.d.ts.map +1 -1
  52. package/dist/neutral/modules/ethereum/drivers/EvmStakeEventZod.d.ts +12 -12
  53. package/dist/neutral/modules/ethereum/drivers/EvmStakeEventsViewer.d.ts +44 -14
  54. package/dist/neutral/modules/ethereum/drivers/EvmStakeEventsViewer.d.ts.map +1 -1
  55. package/dist/neutral/modules/ethereum/drivers/EvmStakeViewer.d.ts +1 -1
  56. package/dist/neutral/modules/ethereum/drivers/EvmStakeViewer.d.ts.map +1 -1
  57. package/dist/neutral/modules/ethereum/index.d.ts +2 -0
  58. package/dist/neutral/modules/ethereum/index.d.ts.map +1 -1
  59. package/dist/neutral/modules/ethereum/indexing/EvmEventIndexModel.d.ts +107 -0
  60. package/dist/neutral/modules/ethereum/indexing/EvmEventIndexModel.d.ts.map +1 -0
  61. package/dist/neutral/modules/ethereum/indexing/EvmEventIndexPaths.d.ts +6 -0
  62. package/dist/neutral/modules/ethereum/indexing/EvmEventIndexPaths.d.ts.map +1 -0
  63. package/dist/neutral/modules/ethereum/indexing/EvmEventIndexPublishRunner.d.ts +9 -0
  64. package/dist/neutral/modules/ethereum/indexing/EvmEventIndexPublishRunner.d.ts.map +1 -0
  65. package/dist/neutral/modules/ethereum/indexing/RestStakeEventsViewer.d.ts +54 -0
  66. package/dist/neutral/modules/ethereum/indexing/RestStakeEventsViewer.d.ts.map +1 -0
  67. package/dist/neutral/modules/ethereum/indexing/index.d.ts +5 -0
  68. package/dist/neutral/modules/ethereum/indexing/index.d.ts.map +1 -0
  69. package/dist/neutral/modules/ethereum/providers/AbstractEvmProvider.d.ts +4 -1
  70. package/dist/neutral/modules/ethereum/providers/AbstractEvmProvider.d.ts.map +1 -1
  71. package/dist/neutral/modules/ethereum/providers/AbstractEvmViewer.d.ts +5 -1
  72. package/dist/neutral/modules/ethereum/providers/AbstractEvmViewer.d.ts.map +1 -1
  73. package/dist/neutral/modules/ethereum/providers/EvmChainContractViewer.d.ts +1 -2
  74. package/dist/neutral/modules/ethereum/providers/EvmChainContractViewer.d.ts.map +1 -1
  75. package/dist/neutral/modules/ethereum/providers/EvmStakeTotalsViewer.d.ts +1 -1
  76. package/dist/neutral/modules/ethereum/providers/EvmStakeTotalsViewer.d.ts.map +1 -1
  77. package/dist/neutral/modules/ethereum/rpc/index.d.ts +4 -0
  78. package/dist/neutral/modules/ethereum/rpc/index.d.ts.map +1 -0
  79. package/dist/neutral/modules/ethereum/rpc/isRpcRangeLimitError.d.ts +15 -0
  80. package/dist/neutral/modules/ethereum/rpc/isRpcRangeLimitError.d.ts.map +1 -0
  81. package/dist/neutral/modules/ethereum/rpc/isRpcRateLimitError.d.ts +1 -1
  82. package/dist/neutral/modules/services/ChainValidator/XyoValidator.d.ts +7 -1
  83. package/dist/neutral/modules/services/ChainValidator/XyoValidator.d.ts.map +1 -1
  84. package/dist/neutral/modules/services/Election/BaseElectionService.d.ts +1 -0
  85. package/dist/neutral/modules/services/Election/BaseElectionService.d.ts.map +1 -1
  86. package/dist/neutral/modules/services/NetworkStakeStepReward/BaseNetworkStakeStepRewardService.d.ts +1 -2
  87. package/dist/neutral/modules/services/NetworkStakeStepReward/BaseNetworkStakeStepRewardService.d.ts.map +1 -1
  88. package/dist/neutral/modules/services/implementation/processPendingBlocks.d.ts +4 -4
  89. package/dist/neutral/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +5 -2
  90. package/dist/neutral/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
  91. package/dist/neutral/modules/services/simple/block/runner/producerTuning.d.ts +13 -0
  92. package/dist/neutral/modules/services/simple/block/runner/producerTuning.d.ts.map +1 -0
  93. package/dist/neutral/services.mjs +46 -13
  94. package/dist/neutral/services.mjs.map +4 -4
  95. package/dist/node/modules/ethereum/block/findContractDeploymentBlock.d.ts +25 -0
  96. package/dist/node/modules/ethereum/block/findContractDeploymentBlock.d.ts.map +1 -0
  97. package/dist/node/modules/ethereum/block/index.d.ts +1 -0
  98. package/dist/node/modules/ethereum/block/index.d.ts.map +1 -1
  99. package/dist/node/modules/ethereum/drivers/EvmStakeEventZod.d.ts +12 -12
  100. package/dist/node/modules/ethereum/drivers/EvmStakeEventsViewer.d.ts +44 -14
  101. package/dist/node/modules/ethereum/drivers/EvmStakeEventsViewer.d.ts.map +1 -1
  102. package/dist/node/modules/ethereum/drivers/EvmStakeViewer.d.ts +1 -1
  103. package/dist/node/modules/ethereum/drivers/EvmStakeViewer.d.ts.map +1 -1
  104. package/dist/node/modules/ethereum/index.d.ts +2 -0
  105. package/dist/node/modules/ethereum/index.d.ts.map +1 -1
  106. package/dist/node/modules/ethereum/indexing/EvmEventIndexModel.d.ts +107 -0
  107. package/dist/node/modules/ethereum/indexing/EvmEventIndexModel.d.ts.map +1 -0
  108. package/dist/node/modules/ethereum/indexing/EvmEventIndexPaths.d.ts +6 -0
  109. package/dist/node/modules/ethereum/indexing/EvmEventIndexPaths.d.ts.map +1 -0
  110. package/dist/node/modules/ethereum/indexing/EvmEventIndexPublishRunner.d.ts +9 -0
  111. package/dist/node/modules/ethereum/indexing/EvmEventIndexPublishRunner.d.ts.map +1 -0
  112. package/dist/node/modules/ethereum/indexing/RestStakeEventsViewer.d.ts +54 -0
  113. package/dist/node/modules/ethereum/indexing/RestStakeEventsViewer.d.ts.map +1 -0
  114. package/dist/node/modules/ethereum/indexing/index.d.ts +5 -0
  115. package/dist/node/modules/ethereum/indexing/index.d.ts.map +1 -0
  116. package/dist/node/modules/ethereum/providers/AbstractEvmProvider.d.ts +4 -1
  117. package/dist/node/modules/ethereum/providers/AbstractEvmProvider.d.ts.map +1 -1
  118. package/dist/node/modules/ethereum/providers/AbstractEvmViewer.d.ts +5 -1
  119. package/dist/node/modules/ethereum/providers/AbstractEvmViewer.d.ts.map +1 -1
  120. package/dist/node/modules/ethereum/providers/EvmChainContractViewer.d.ts +1 -2
  121. package/dist/node/modules/ethereum/providers/EvmChainContractViewer.d.ts.map +1 -1
  122. package/dist/node/modules/ethereum/providers/EvmStakeTotalsViewer.d.ts +1 -1
  123. package/dist/node/modules/ethereum/providers/EvmStakeTotalsViewer.d.ts.map +1 -1
  124. package/dist/node/modules/ethereum/rpc/index.d.ts +4 -0
  125. package/dist/node/modules/ethereum/rpc/index.d.ts.map +1 -0
  126. package/dist/node/modules/ethereum/rpc/isRpcRangeLimitError.d.ts +15 -0
  127. package/dist/node/modules/ethereum/rpc/isRpcRangeLimitError.d.ts.map +1 -0
  128. package/dist/node/modules/ethereum/rpc/isRpcRateLimitError.d.ts +1 -1
  129. package/dist/node/modules/services/ChainValidator/XyoValidator.d.ts +7 -1
  130. package/dist/node/modules/services/ChainValidator/XyoValidator.d.ts.map +1 -1
  131. package/dist/node/modules/services/Election/BaseElectionService.d.ts +1 -0
  132. package/dist/node/modules/services/Election/BaseElectionService.d.ts.map +1 -1
  133. package/dist/node/modules/services/NetworkStakeStepReward/BaseNetworkStakeStepRewardService.d.ts +1 -2
  134. package/dist/node/modules/services/NetworkStakeStepReward/BaseNetworkStakeStepRewardService.d.ts.map +1 -1
  135. package/dist/node/modules/services/implementation/processPendingBlocks.d.ts +4 -4
  136. package/dist/node/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +5 -2
  137. package/dist/node/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
  138. package/dist/node/modules/services/simple/block/runner/producerTuning.d.ts +13 -0
  139. package/dist/node/modules/services/simple/block/runner/producerTuning.d.ts.map +1 -0
  140. package/package.json +21 -45
@@ -46,7 +46,7 @@ export declare const asEvmStakeEvent: {
46
46
  };
47
47
  };
48
48
  export declare const toEvmStakeEvent: {
49
- <T>(value: T): (T & {
49
+ (value: unknown): {
50
50
  address: string;
51
51
  args: [string, string, bigint, bigint];
52
52
  blockHash: string;
@@ -54,8 +54,8 @@ export declare const toEvmStakeEvent: {
54
54
  eventName: "StakeAdded" | "StakeRemoved" | "StakeWithdrawn";
55
55
  transactionHash: string;
56
56
  transactionIndex: number;
57
- }) | undefined;
58
- <T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
57
+ } | undefined;
58
+ (value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
59
59
  address: string;
60
60
  args: [string, string, bigint, bigint];
61
61
  blockHash: string;
@@ -105,7 +105,7 @@ export declare const asEvmStakeAddedEvent: {
105
105
  };
106
106
  };
107
107
  export declare const toEvmStakeAddedEvent: {
108
- <T>(value: T): (T & {
108
+ (value: unknown): {
109
109
  address: string;
110
110
  args: [string, string, bigint, bigint];
111
111
  blockHash: string;
@@ -113,8 +113,8 @@ export declare const toEvmStakeAddedEvent: {
113
113
  transactionHash: string;
114
114
  transactionIndex: number;
115
115
  eventName: "StakeAdded";
116
- }) | undefined;
117
- <T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
116
+ } | undefined;
117
+ (value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
118
118
  address: string;
119
119
  args: [string, string, bigint, bigint];
120
120
  blockHash: string;
@@ -164,7 +164,7 @@ export declare const asEvmStakeRemovedEvent: {
164
164
  };
165
165
  };
166
166
  export declare const toEvmStakeRemovedEvent: {
167
- <T>(value: T): (T & {
167
+ (value: unknown): {
168
168
  address: string;
169
169
  args: [string, string, bigint, bigint];
170
170
  blockHash: string;
@@ -172,8 +172,8 @@ export declare const toEvmStakeRemovedEvent: {
172
172
  transactionHash: string;
173
173
  transactionIndex: number;
174
174
  eventName: "StakeRemoved";
175
- }) | undefined;
176
- <T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
175
+ } | undefined;
176
+ (value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
177
177
  address: string;
178
178
  args: [string, string, bigint, bigint];
179
179
  blockHash: string;
@@ -223,7 +223,7 @@ export declare const asEvmStakeWithdrawnEvent: {
223
223
  };
224
224
  };
225
225
  export declare const toEvmStakeWithdrawnEvent: {
226
- <T>(value: T): (T & {
226
+ (value: unknown): {
227
227
  address: string;
228
228
  args: [string, string, bigint, bigint];
229
229
  blockHash: string;
@@ -231,8 +231,8 @@ export declare const toEvmStakeWithdrawnEvent: {
231
231
  transactionHash: string;
232
232
  transactionIndex: number;
233
233
  eventName: "StakeWithdrawn";
234
- }) | undefined;
235
- <T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
234
+ } | undefined;
235
+ (value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
236
236
  address: string;
237
237
  args: [string, string, bigint, bigint];
238
238
  blockHash: string;
@@ -1,23 +1,35 @@
1
1
  import type { EthAddress, Promisable } from '@ariestools/sdk';
2
- import { type IAddressStakingEvents, type TypedEventLog } from '@xyo-network/typechain';
2
+ import { type IAddressStakingEvents } from '@xyo-network/typechain';
3
3
  import { type StakeEvent, type StakeEventFilter, type StakeEventName, type StakeEventsViewer } from '@xyo-network/xl1-sdk';
4
- import type { ReturnTypeForOverload } from '../model/index.js';
5
4
  import type { EvmViewerParams } from '../providers/index.js';
6
5
  import { AbstractEvmViewer } from '../providers/index.js';
7
- type StakeAddedLogEvent = TypedEventLog<ReturnTypeForOverload<IAddressStakingEvents['getEvent'], 'StakeAdded'>>;
8
- type StakeRemovedLogEvent = TypedEventLog<ReturnTypeForOverload<IAddressStakingEvents['getEvent'], 'StakeRemoved'>>;
9
- type StakeWithdrawnLogEvent = TypedEventLog<ReturnTypeForOverload<IAddressStakingEvents['getEvent'], 'StakeWithdrawn'>>;
10
- type StakeLogEvent = StakeAddedLogEvent | StakeRemovedLogEvent | StakeWithdrawnLogEvent;
11
- /** Default max blocks per eth_getLogs / queryFilter call (public RPC safe). */
12
- export declare const DEFAULT_EVENT_QUERY_BLOCK_CHUNK_SIZE = 2000;
6
+ /**
7
+ * Starting max blocks per eth_getLogs / queryFilter call. Providers that cap
8
+ * the range reject with an explicit error and the fetcher adapts downward,
9
+ * jumping straight to an advertised limit when the error states one.
10
+ */
11
+ export declare const DEFAULT_EVENT_QUERY_START_CHUNK_SIZE = 100000;
12
+ /** Floor for adaptive chunk shrinking — a range error below this is rethrown. */
13
+ export declare const MIN_EVENT_QUERY_BLOCK_CHUNK_SIZE = 1000;
13
14
  /** Default attempts (including first) when eth_getLogs hits provider rate limits. */
14
15
  export declare const DEFAULT_EVENT_QUERY_MAX_ATTEMPTS = 8;
15
16
  /** Initial backoff after a rate-limit response before retrying eth_getLogs. */
16
17
  export declare const DEFAULT_EVENT_QUERY_INITIAL_DELAY_MS = 1000;
18
+ /**
19
+ * Structural view of a parsed stake event log — satisfied by both ethers
20
+ * `EventLog` (address-only sweep) and typechain `TypedEventLog` (live
21
+ * listeners). Full shape validation happens via `EvmStakeEventZod`.
22
+ */
23
+ interface StakeEventLogLike {
24
+ blockNumber: number;
25
+ eventName: string;
26
+ }
17
27
  export interface EvmStakeEventsParams extends EvmViewerParams {
18
28
  /**
19
- * Max blocks per eth_getLogs / queryFilter call when loading historical stake events.
20
- * Defaults to {@link DEFAULT_EVENT_QUERY_BLOCK_CHUNK_SIZE}.
29
+ * Fixed max blocks per eth_getLogs / queryFilter call when loading
30
+ * historical stake events. When omitted the fetcher starts at
31
+ * {@link DEFAULT_EVENT_QUERY_START_CHUNK_SIZE} and adapts down to the
32
+ * provider's actual range limit.
21
33
  */
22
34
  eventQueryBlockChunkSize?: number;
23
35
  /**
@@ -34,25 +46,43 @@ export interface EvmStakeEventsParams extends EvmViewerParams {
34
46
  export declare class EvmStakeEventsViewer extends AbstractEvmViewer<EvmStakeEventsParams, IAddressStakingEvents> implements StakeEventsViewer {
35
47
  static readonly connectionTypes: readonly ["evm-rpc"];
36
48
  static readonly defaultMoniker: "StakeEventsViewer";
37
- static readonly dependencies: never[];
49
+ static readonly dependencies: "EvmChainViewer"[];
38
50
  static readonly monikers: "StakeEventsViewer"[];
39
51
  static readonly surface: "node";
40
52
  moniker: "StakeEventsViewer";
41
- /** Set at start when `params.deploymentBlock` is omitted (estimated 2025-06-01). */
53
+ /**
54
+ * Current adaptive chunk size — shrinks when the provider rejects a range
55
+ * and persists across loads so the tail catch-up reuses the learned limit.
56
+ */
57
+ private adaptiveChunkSize?;
58
+ /** Set at start when `params.deploymentBlock` is omitted (getCode binary search, date-estimate fallback). */
42
59
  private defaultDeploymentBlock;
43
60
  private eventCache;
44
61
  get deploymentBlock(): number;
45
62
  get eventQueryBlockChunkSize(): number;
46
63
  get eventQueryInitialDelayMs(): number;
47
64
  get eventQueryMaxAttempts(): number;
65
+ /**
66
+ * Fixed eth_getLogs range: explicit param (deprecated), else the bound evm-rpc
67
+ * connection profile's `eventQueryBlockChunkSize`. Undefined → adaptive sizing.
68
+ */
69
+ protected get fixedEventQueryBlockChunkSize(): number | undefined;
48
70
  positionCount(range: [number, number | 'latest']): Promise<number>;
49
71
  stakeEvents<TName extends StakeEventName>(range?: [number, number | 'latest'], filter?: StakeEventFilter<TName>): Promisable<StakeEvent<TName>[]>;
50
72
  protected connectContract(address: EthAddress): IAddressStakingEvents;
51
- protected onEventHandler(staked: string, staker: string, id: bigint, amount: bigint, event: StakeLogEvent, throwOnInvalid?: boolean): StakeEvent | undefined;
73
+ protected onEventHandler(staked: string, staker: string, id: bigint, amount: bigint, event: StakeEventLogLike, throwOnInvalid?: boolean): StakeEvent | undefined;
52
74
  protected startHandler(): Promise<void>;
53
75
  private attachLiveListeners;
76
+ /**
77
+ * Loads all stake events for the range with a single address-only sweep —
78
+ * one eth_getLogs pass per chunk covers all three event types (demuxed by
79
+ * event name client-side) instead of three filtered sweeps over the same
80
+ * blocks. Chunk size adapts to the provider: on a range/result-limit error
81
+ * the chunk shrinks (to the advertised limit when the error states one,
82
+ * halving otherwise) and the window is retried; rate limits retry at the
83
+ * same size with backoff.
84
+ */
54
85
  private loadHistoricalEvents;
55
- private stakeEventsNative;
56
86
  }
57
87
  export {};
58
88
  //# sourceMappingURL=EvmStakeEventsViewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EvmStakeEventsViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/drivers/EvmStakeEventsViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAM7D,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAEL,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAC3D,KAAK,iBAAiB,EAEvB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAIzD,KAAK,kBAAkB,GAAG,aAAa,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC,CAAA;AAC/G,KAAK,oBAAoB,GAAG,aAAa,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,CAAC,CAAA;AACnH,KAAK,sBAAsB,GAAG,aAAa,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAA;AACvH,KAAK,aAAa,GAAG,kBAAkB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAEvF,+EAA+E;AAC/E,eAAO,MAAM,oCAAoC,OAAO,CAAA;AAExD,qFAAqF;AACrF,eAAO,MAAM,gCAAgC,IAAI,CAAA;AAEjD,+EAA+E;AAC/E,eAAO,MAAM,oCAAoC,OAAO,CAAA;AAExD,MAAM,WAAW,oBAAqB,SAAQ,eAA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AA2B;IACzD,MAAM,CAAC,QAAQ,CAAC,YAAY,qBAA0B;IACtD,MAAM,CAAC,QAAQ,CAAC,QAAQ,wBAA6B;IACrD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAS;IACzC,OAAO,sBAAsC;IAE7C;;;OAGG;IACH,OAAO,CAAC,iBAAiB,CAAC,CAAQ;IAElC,6GAA6G;IAC7G,OAAO,CAAC,sBAAsB,CAAI;IAElC,OAAO,CAAC,UAAU,CAAgC;IAElD,IAAI,eAAe,WAElB;IAED,IAAI,wBAAwB,WAE3B;IAED,IAAI,wBAAwB,WAE3B;IAED,IAAI,qBAAqB,WAExB;IAED;;;OAGG;IACH,SAAS,KAAK,6BAA6B,IAAI,MAAM,GAAG,SAAS,CAIhE;IAEK,aAAa,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAMxE,WAAW,CAAC,KAAK,SAAS,cAAc,EACtC,KAAK,GAAE,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAiB,EAClD,MAAM,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAC/B,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;cA4Bf,eAAe,CAAC,OAAO,EAAE,UAAU;IAItD,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,cAAc,UAAQ,GAAG,UAAU,GAAG,SAAS;cAgCrI,YAAY;YAwBvB,mBAAmB;IAYjC;;;;;;;;OAQG;YACW,oBAAoB;CA6DnC"}
@@ -8,7 +8,7 @@ export interface EvmStakeViewerParams extends EvmViewerParams {
8
8
  export declare class EvmStakeViewer extends AbstractEvmViewer<EvmStakeViewerParams, IAddressStaking> implements StakeViewer {
9
9
  static readonly connectionTypes: readonly ["evm-rpc"];
10
10
  static readonly defaultMoniker: "StakeViewer";
11
- static readonly dependencies: never[];
11
+ static readonly dependencies: ("EvmChainViewer" | "StakeEventsViewer")[];
12
12
  static readonly monikers: "StakeViewer"[];
13
13
  static readonly surface: "node";
14
14
  readonly moniker: "StakeViewer";
@@ -1 +1 @@
1
- {"version":3,"file":"EvmStakeViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/drivers/EvmStakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,UAAU,EAAE,UAAU,EAChC,MAAM,iBAAiB,CAAA;AAKxB,OAAO,EAAE,KAAK,eAAe,EAA4B,MAAM,wBAAwB,CAAA;AACvF,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAezD,MAAM,WAAW,oBAAqB,SAAQ,eAAe;CAE5D;AAED,qBACa,cAAe,SAAQ,iBAAiB,CAAC,oBAAoB,EAAE,eAAe,CAAE,YAAW,WAAW;IACjH,MAAM,CAAC,QAAQ,CAAC,eAAe,uBAAuB;IACtD,MAAM,CAAC,QAAQ,CAAC,cAAc,gBAAqB;IACnD,MAAM,CAAC,QAAQ,CAAC,YAAY,UAAK;IACjC,MAAM,CAAC,QAAQ,CAAC,QAAQ,kBAAuB;IAC/C,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAS;IACzC,QAAQ,CAAC,OAAO,gBAAgC;IAEhD,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,gBAAgB,CAAI;IAE5B,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,kBAAkB,CAAoB;IAE9C,IAAI,WAAW,sBAEd;IAEK,MAAM,IAAI,OA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7C,mBAAmB,IAAI,MAAM;IAIvB,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAM1B,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAMvD,aAAa,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAIvC,eAAe,IAAI,OAAO;IAIpB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAexC,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAS/D,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,GAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAkB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAe1G,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,GAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAkB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAchH,mBAAmB,IAAI,OAAO;IAIxB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAM5B,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAMzD,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;cAItB,eAAe,CAAC,OAAO,EAAE,UAAU;cAI7B,YAAY;IAyCrC,OAAO,CAAC,yBAAyB;CA6BlC"}
@@ -5,6 +5,8 @@ export * from './createChainContract.js';
5
5
  export * from './createChainRewardsContract.js';
6
6
  export * from './drivers/index.js';
7
7
  export * from './ethereum.js';
8
+ export * from './indexing/index.js';
8
9
  export * from './nextContractAddress.js';
9
10
  export * from './providers/index.js';
11
+ export * from './rpc/index.js';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/ethereum/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/ethereum/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,107 @@
1
+ import { z } from 'zod/mini';
2
+ /** JSON-safe representation of one raw EVM contract log. */
3
+ export declare const EvmEventIndexLogZod: z.ZodMiniObject<{
4
+ address: z.ZodMiniString<string>;
5
+ blockHash: z.ZodMiniString<string>;
6
+ blockNumber: z.ZodMiniNumber<number>;
7
+ data: z.ZodMiniString<string>;
8
+ index: z.ZodMiniNumber<number>;
9
+ topics: z.ZodMiniArray<z.ZodMiniString<string>>;
10
+ transactionHash: z.ZodMiniString<string>;
11
+ transactionIndex: z.ZodMiniNumber<number>;
12
+ }, z.core.$strip>;
13
+ export type EvmEventIndexLog = z.infer<typeof EvmEventIndexLogZod>;
14
+ /** One immutable, address-scoped range of finalized EVM logs. */
15
+ export declare const EvmEventIndexFrameZod: z.ZodMiniObject<{
16
+ fromBlock: z.ZodMiniNumber<number>;
17
+ logs: z.ZodMiniArray<z.ZodMiniObject<{
18
+ address: z.ZodMiniString<string>;
19
+ blockHash: z.ZodMiniString<string>;
20
+ blockNumber: z.ZodMiniNumber<number>;
21
+ data: z.ZodMiniString<string>;
22
+ index: z.ZodMiniNumber<number>;
23
+ topics: z.ZodMiniArray<z.ZodMiniString<string>>;
24
+ transactionHash: z.ZodMiniString<string>;
25
+ transactionIndex: z.ZodMiniNumber<number>;
26
+ }, z.core.$strip>>;
27
+ toBlock: z.ZodMiniNumber<number>;
28
+ }, z.core.$strip>;
29
+ export type EvmEventIndexFrame = z.infer<typeof EvmEventIndexFrameZod>;
30
+ /** Static description of one contract event index. */
31
+ export declare const EvmEventIndexManifestZod: z.ZodMiniObject<{
32
+ address: z.ZodMiniString<string>;
33
+ chainId: z.ZodMiniString<string>;
34
+ deploymentBlock: z.ZodMiniNumber<number>;
35
+ frameSize: z.ZodMiniNumber<number>;
36
+ layout: z.ZodMiniLiteral<"evm-contract-events-v1">;
37
+ }, z.core.$strip>;
38
+ export type EvmEventIndexManifest = z.infer<typeof EvmEventIndexManifestZod>;
39
+ /** Mutable pointer written after all frames through `block` are durable. */
40
+ export declare const EvmEventIndexHeadZod: z.ZodMiniObject<{
41
+ address: z.ZodMiniString<string>;
42
+ block: z.ZodMiniNumber<number>;
43
+ chainId: z.ZodMiniString<string>;
44
+ hash: z.ZodMiniString<string>;
45
+ }, z.core.$strip>;
46
+ export type EvmEventIndexHead = z.infer<typeof EvmEventIndexHeadZod>;
47
+ export declare const asEvmEventIndexFrame: {
48
+ <T>(value: T): (T & {
49
+ fromBlock: number;
50
+ logs: {
51
+ address: string;
52
+ blockHash: string;
53
+ blockNumber: number;
54
+ data: string;
55
+ index: number;
56
+ topics: string[];
57
+ transactionHash: string;
58
+ transactionIndex: number;
59
+ }[];
60
+ toBlock: number;
61
+ }) | undefined;
62
+ <T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
63
+ fromBlock: number;
64
+ logs: {
65
+ address: string;
66
+ blockHash: string;
67
+ blockNumber: number;
68
+ data: string;
69
+ index: number;
70
+ topics: string[];
71
+ transactionHash: string;
72
+ transactionIndex: number;
73
+ }[];
74
+ toBlock: number;
75
+ };
76
+ };
77
+ export declare const asEvmEventIndexHead: {
78
+ <T>(value: T): (T & {
79
+ address: string;
80
+ block: number;
81
+ chainId: string;
82
+ hash: string;
83
+ }) | undefined;
84
+ <T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
85
+ address: string;
86
+ block: number;
87
+ chainId: string;
88
+ hash: string;
89
+ };
90
+ };
91
+ export declare const asEvmEventIndexManifest: {
92
+ <T>(value: T): (T & {
93
+ address: string;
94
+ chainId: string;
95
+ deploymentBlock: number;
96
+ frameSize: number;
97
+ layout: "evm-contract-events-v1";
98
+ }) | undefined;
99
+ <T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
100
+ address: string;
101
+ chainId: string;
102
+ deploymentBlock: number;
103
+ frameSize: number;
104
+ layout: "evm-contract-events-v1";
105
+ };
106
+ };
107
+ //# sourceMappingURL=EvmEventIndexModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvmEventIndexModel.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/indexing/EvmEventIndexModel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAK5B,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB;;;;;;;;;iBAS9B,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAElE,iEAAiE;AACjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;iBAIhC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,sDAAsD;AACtD,eAAO,MAAM,wBAAwB;;;;;;iBAMnC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEpE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA8D,CAAA;AAC/F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;CAA4D,CAAA;AAC5F,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAAoE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { EthAddress } from '@ariestools/sdk';
2
+ export declare function evmEventIndexFramePath(address: EthAddress, frameIndex: number): string;
3
+ export declare function evmEventIndexHeadPath(address: EthAddress): string;
4
+ export declare function evmEventIndexManifestPath(address: EthAddress): string;
5
+ export declare function evmEventIndexTailPath(address: EthAddress): string;
6
+ //# sourceMappingURL=EvmEventIndexPaths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvmEventIndexPaths.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/indexing/EvmEventIndexPaths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAMjD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEtF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEjE;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAErE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEjE"}
@@ -0,0 +1,9 @@
1
+ import type { Provider } from '@xyo-network/xl1-sdk';
2
+ import type { EvmEventIndexHead } from './EvmEventIndexModel.js';
3
+ export declare const EvmEventIndexPublishRunnerMoniker: "EvmEventIndexPublishRunner";
4
+ export type EvmEventIndexPublishRunnerMoniker = typeof EvmEventIndexPublishRunnerMoniker;
5
+ /** Publishes finalized raw logs for a configured EVM contract. */
6
+ export interface EvmEventIndexPublishRunner extends Provider<EvmEventIndexPublishRunnerMoniker> {
7
+ publishFinalizedEvents(): Promise<EvmEventIndexHead | null>;
8
+ }
9
+ //# sourceMappingURL=EvmEventIndexPublishRunner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvmEventIndexPublishRunner.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/indexing/EvmEventIndexPublishRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,eAAO,MAAM,iCAAiC,EAAG,4BAAqC,CAAA;AACtF,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF,kEAAkE;AAClE,MAAM,WAAW,0BAA2B,SAAQ,QAAQ,CAAC,iCAAiC,CAAC;IAC7F,sBAAsB,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAC5D"}
@@ -0,0 +1,54 @@
1
+ import type { EthAddress } from '@ariestools/sdk';
2
+ import type { CreatableProviderParams, StakeEvent, StakeEventFilter, StakeEventName, StakeEventsViewer } from '@xyo-network/xl1-sdk';
3
+ import { AbstractCreatableProvider } from '@xyo-network/xl1-sdk';
4
+ export interface RestStakeEventsViewerParams extends CreatableProviderParams {
5
+ /** Staking contract address; defaults to `config.chain.id`. */
6
+ address: EthAddress;
7
+ /** Public base URL of the bucket containing the EVM event index. */
8
+ eventIndexBaseUrl: string;
9
+ /** Optional fetch override for tests, authentication, or a custom HTTP agent. */
10
+ fetchFn?: typeof globalThis.fetch;
11
+ }
12
+ /**
13
+ * StakeEventsViewer backed by the finalized contract-event index rather than eth_getLogs.
14
+ * Raw indexed logs remain contract-generic; this viewer applies the staking ABI at the edge.
15
+ */
16
+ export declare class RestStakeEventsViewer extends AbstractCreatableProvider<RestStakeEventsViewerParams> implements StakeEventsViewer {
17
+ static readonly connectionTypes: readonly ["rest"];
18
+ static readonly defaultMoniker: "StakeEventsViewer";
19
+ static readonly dependencies: never[];
20
+ static readonly monikers: "StakeEventsViewer"[];
21
+ static readonly surface: "node";
22
+ moniker: "StakeEventsViewer";
23
+ private readonly completeFrames;
24
+ private readonly contractInterface;
25
+ private currentHead?;
26
+ private manifestPromise?;
27
+ private stakeEventCache;
28
+ private syncPromise?;
29
+ private tailFrame?;
30
+ get address(): EthAddress;
31
+ get eventIndexBaseUrl(): string;
32
+ protected get fetchFn(): typeof globalThis.fetch;
33
+ static paramsHandler(params: Partial<RestStakeEventsViewerParams>): Promise<{
34
+ address: EthAddress;
35
+ eventIndexBaseUrl: string;
36
+ fetchFn: typeof fetch | undefined;
37
+ context: import("@xyo-network/xl1-sdk").CreatableProviderContextType;
38
+ name?: import("@ariestools/sdk").CreatableName;
39
+ statusReporter?: import("@ariestools/sdk").CreatableStatusReporter<void> | undefined;
40
+ logger?: import("@ariestools/sdk").Logger;
41
+ meterProvider?: import("@opentelemetry/api").MeterProvider;
42
+ traceProvider?: import("@opentelemetry/api").TracerProvider;
43
+ }>;
44
+ positionCount(range: [number, number | 'latest']): Promise<number>;
45
+ stakeEvents<TName extends StakeEventName>(range?: [number, number | 'latest'], filter?: StakeEventFilter<TName>): Promise<StakeEvent<TName>[]>;
46
+ private decodeIndexedStakeEvents;
47
+ private fetchJson;
48
+ private getManifest;
49
+ private matchesFilter;
50
+ private stakeEventFromLog;
51
+ private sync;
52
+ private syncFromHead;
53
+ }
54
+ //# sourceMappingURL=RestStakeEventsViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RestStakeEventsViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/indexing/RestStakeEventsViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAKjD,OAAO,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EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAKlE,WAAW,CAAC,KAAK,SAAS,cAAc,EAC5C,KAAK,GAAE,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAiB,EAClD,MAAM,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAC/B,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;IAK/B,OAAO,CAAC,wBAAwB;YAalB,SAAS;YAMT,WAAW;IAUzB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,iBAAiB;YAgBX,IAAI;YAOJ,YAAY;CAmC3B"}
@@ -0,0 +1,5 @@
1
+ export * from './EvmEventIndexModel.js';
2
+ export * from './EvmEventIndexPaths.js';
3
+ export * from './EvmEventIndexPublishRunner.js';
4
+ export * from './RestStakeEventsViewer.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/indexing/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA"}
@@ -3,11 +3,14 @@ import type { CreatableProviderParams } from '@xyo-network/xl1-sdk';
3
3
  import { AbstractCreatableProvider } from '@xyo-network/xl1-sdk';
4
4
  import type { BaseContract } from 'ethers';
5
5
  export interface EvmProviderParams extends CreatableProviderParams {
6
- address: EthAddress;
6
+ /** Contract address; defaults to `config.chain.id` (the staking contract) when omitted. */
7
+ address?: EthAddress;
7
8
  deploymentBlock?: number;
8
9
  }
9
10
  export declare abstract class AbstractEvmProvider<TParams extends EvmProviderParams, TContract extends BaseContract> extends AbstractCreatableProvider<TParams> {
10
11
  protected _contract: TContract;
12
+ private _address?;
13
+ get address(): EthAddress;
11
14
  protected get contract(): TContract;
12
15
  createHandler(): Promise<void>;
13
16
  protected abstract connectContract(address: EthAddress): TContract;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractEvmProvider.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/providers/AbstractEvmProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,iBAAiB,CAAA;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE1C,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;IAChE,OAAO,EAAE,UAAU,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,8BAAsB,mBAAmB,CAAC,OAAO,SAAS,iBAAiB,EAAE,SAAS,SAAS,YAAY,CAAE,SAC3G,yBAAyB,CAAC,OAAO,CAAC;IAClC,SAAS,CAAC,SAAS,EAAG,SAAS,CAAA;IAE/B,SAAS,KAAK,QAAQ,cAErB;IAEc,aAAa;IAK5B,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS;CACnE"}
1
+ {"version":3,"file":"AbstractEvmProvider.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/providers/AbstractEvmProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EACK,KAAK,UAAU,EAC1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE1C,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;IAChE,2FAA2F;IAC3F,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,8BAAsB,mBAAmB,CAAC,OAAO,SAAS,iBAAiB,EAAE,SAAS,SAAS,YAAY,CAAE,SAC3G,yBAAyB,CAAC,OAAO,CAAC;IAClC,SAAS,CAAC,SAAS,EAAG,SAAS,CAAA;IAE/B,OAAO,CAAC,QAAQ,CAAC,CAAY;IAE7B,IAAI,OAAO,IAAI,UAAU,CAExB;IAED,SAAS,KAAK,QAAQ,cAErB;IAEc,aAAa;IAO5B,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS;CACnE"}
@@ -1,8 +1,12 @@
1
1
  import type { BaseContract, Provider } from 'ethers';
2
2
  import { AbstractEvmProvider, type EvmProviderParams } from './AbstractEvmProvider.js';
3
3
  export interface EvmViewerParams extends EvmProviderParams {
4
- provider: Provider;
4
+ /** Explicit ethers provider; defaults to the process EvmChainViewer when omitted. */
5
+ provider?: Provider;
5
6
  }
6
7
  export declare abstract class AbstractEvmViewer<TParams extends EvmViewerParams, TContract extends BaseContract> extends AbstractEvmProvider<TParams, TContract> {
8
+ private _provider?;
9
+ protected get provider(): Provider;
10
+ createHandler(): Promise<void>;
7
11
  }
8
12
  //# sourceMappingURL=AbstractEvmViewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractEvmViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/providers/AbstractEvmViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEpD,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEtF,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,QAAQ,EAAE,QAAQ,CAAA;CACnB;AAED,8BAAsB,iBAAiB,CAAC,OAAO,SAAS,eAAe,EAAE,SAAS,SAAS,YAAY,CAAE,SACvG,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC;CAAG"}
1
+ {"version":3,"file":"AbstractEvmViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/providers/AbstractEvmViewer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEpD,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEtF,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,qFAAqF;IACrF,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED,8BAAsB,iBAAiB,CAAC,OAAO,SAAS,eAAe,EAAE,SAAS,SAAS,YAAY,CAAE,SACvG,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC;IACvC,OAAO,CAAC,SAAS,CAAC,CAAU;IAE5B,SAAS,KAAK,QAAQ,IAAI,QAAQ,CAEjC;IAEc,aAAa;CAQ7B"}
@@ -11,7 +11,7 @@ export interface EvmChainContractViewerParams extends EvmViewerParams {
11
11
  export declare class EvmChainContractViewer extends AbstractEvmViewer<EvmChainContractViewerParams, IStakedXyoChain> implements ChainContractViewer {
12
12
  static readonly connectionTypes: readonly ["evm-rpc"];
13
13
  static readonly defaultMoniker: "ChainContractViewer";
14
- static readonly dependencies: never[];
14
+ static readonly dependencies: "EvmChainViewer"[];
15
15
  static readonly monikers: "ChainContractViewer"[];
16
16
  static readonly surface: "node";
17
17
  moniker: "ChainContractViewer";
@@ -22,7 +22,6 @@ export declare class EvmChainContractViewer extends AbstractEvmViewer<EvmChainCo
22
22
  private _minWithdrawalBlocks?;
23
23
  private _rewardsContract?;
24
24
  private _stakingTokenAddress?;
25
- get address(): EthAddress;
26
25
  chainId(): import("@ariestools/sdk").BrandedHex;
27
26
  chainIdAtBlockNumber(blockNumber: XL1BlockNumber): Promise<import("@ariestools/sdk").BrandedHex>;
28
27
  forkedAtBlockNumber(): Promise<XL1BlockNumber | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"Ev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AAO,CAAC,gBAAgB,CAAC,CAAkB;IAC3C,OAAO,CAAC,oBAAoB,CAAC,CAAkB;IAE/C,OAAO;IAID,oBAAoB,CAAC,WAAW,EAAE,cAAc;IAehD,mBAAmB;IAYnB,YAAY;IAKZ,yBAAyB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAUzD,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAOjC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC;IAKtC,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAOnC,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC;cAO1B,eAAe,CAAC,OAAO,EAAE,UAAU;CAGvD"}
@@ -11,7 +11,7 @@ export interface EvmChainStakeViewerParams extends EvmViewerParams {
11
11
  export declare class EvmStakeTotalsViewer extends AbstractEvmViewer<EvmChainStakeViewerParams, IStakedXyoChain> implements StakeTotalsViewer {
12
12
  static readonly connectionTypes: readonly ["evm-rpc"];
13
13
  static readonly defaultMoniker: "StakeTotalsViewer";
14
- static readonly dependencies: never[];
14
+ static readonly dependencies: "EvmChainViewer"[];
15
15
  static readonly monikers: "StakeTotalsViewer"[];
16
16
  static readonly surface: "node";
17
17
  moniker: "StakeTotalsViewer";
@@ -1 +1 @@
1
- {"version":3,"file":"EvmStakeTotalsViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/providers/EvmStakeTotalsViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAO7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,MAAM,WAAW,yBAA0B,SAAQ,eAAe;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WAAW,yBAA0B,SAAQ,eAAe;CAAG;AAErE;;GAEG;AACH,qBACa,oBAAqB,SAAQ,iBAAiB,CAAC,yBAAyB,EAAE,eAAe,CAAE,YAAW,iBAAiB;IAClI,MAAM,CAAC,QAAQ,CAAC,eAAe,uBAAuB;IACtD,MAAM,CAAC,QAAQ,CAAC,cAAc,sBAA2B;IACzD,MAAM,CAAC,QAAQ,CAAC,YAAY,qBAA0B;IACtD,MAAM,CAAC,QAAQ,CAAC,QAAQ,wBAA6B;IACrD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAS;IAChC,OAAO,sBAAsC;IAEhD,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAIhD,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjD,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1B,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjD,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAI5B,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;cAIrC,eAAe,CAAC,OAAO,EAAE,UAAU;CAGvD"}
@@ -0,0 +1,4 @@
1
+ export * from './isRpcRangeLimitError.js';
2
+ export * from './isRpcRateLimitError.js';
3
+ export * from './withRpcRateLimitBackoff.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/rpc/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Detection for JSON-RPC `eth_getLogs` block-range / result-size limit errors
3
+ * (e.g. Infura "range 100000 exceeds limit of 10000", "query returned more
4
+ * than 10000 results", Alchemy "Log response size exceeded"). Walks nested
5
+ * ethers error wrappers the same way `isRpcRateLimitError` does.
6
+ */
7
+ /** True when the error reports an eth_getLogs block-range or result-size cap. */
8
+ export declare function isRpcRangeLimitError(error: unknown): boolean;
9
+ /**
10
+ * Extracts the provider's advertised range limit when the error message
11
+ * states one (e.g. "range 100000 exceeds limit of 10000" → 10000), so an
12
+ * adaptive fetcher can jump straight to the allowed size instead of halving.
13
+ */
14
+ export declare function rpcRangeLimitFromError(error: unknown): number | undefined;
15
+ //# sourceMappingURL=isRpcRangeLimitError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isRpcRangeLimitError.d.ts","sourceRoot":"","sources":["../../../../../src/modules/ethereum/rpc/isRpcRangeLimitError.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmDH,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CASzE"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Detect Infura / Alchemy / generic JSON-RPC rate-limit and overload responses.
2
+ * Detect Infura / Alchemy / QuickNode / generic JSON-RPC rate-limit and overload responses.
3
3
  * Walks nested ethers error wrappers (`error`, `info`, `value`, `data`).
4
4
  */
5
5
  export declare function isRpcRateLimitError(error: unknown): boolean;
@@ -4,10 +4,16 @@ import { AbstractCreatableProvider } from '@xyo-network/xl1-sdk';
4
4
  import type { BaseServiceParams } from '../model/index.js';
5
5
  import type { Validator } from './model/index.js';
6
6
  export interface XyoValidatorParams extends BaseServiceParams {
7
- blockViewer: BlockViewer;
7
+ blockViewer?: BlockViewer;
8
8
  validateHydratedBlockState: HydratedBlockStateValidationFunction;
9
9
  }
10
+ export declare const ValidatorMoniker = "Validator";
10
11
  export declare class XyoValidator<TParams extends XyoValidatorParams = XyoValidatorParams> extends AbstractCreatableProvider<TParams> implements Validator {
12
+ static readonly connectionTypes: readonly [];
13
+ static readonly defaultMoniker = "Validator";
14
+ static readonly dependencies: "BlockViewer"[];
15
+ static readonly monikers: string[];
16
+ static readonly surface: "node";
11
17
  moniker: string;
12
18
  private _blockViewer?;
13
19
  protected get blockViewer(): BlockViewer<"BlockViewer">;
@@ -1 +1 @@
1
- {"version":3,"file":"XyoValidator.d.ts","sourceRoot":"","sources":["../../../../../src/modules/services/ChainValidator/XyoValidator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EAAE,oCAAoC,EACjD,wCAAwC,EACzC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,yBAAyB,EAAsB,MAAM,sBAAsB,CAAA;AAEpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAG3D,WAAW,EAAE,WAAW,CAAA;IAKxB,0BAA0B,EAAE,oCAAoC,CAAA;CACjE;AAED,qBAAa,YAAY,CAAC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,CAAE,SAAQ,yBAAyB,CAAC,OAAO,CAAE,YAAW,SAAS;IAChJ,OAAO,SAAc;IACrB,OAAO,CAAC,YAAY,CAAC,CAAa;IASlC,SAAS,KAAK,WAAW,+BAExB;IAkBc,aAAa;IAI5B,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;IAK9D,0BAA0B,CAAC,mBAAmB,EAAE,wCAAwC,GAAG,OAAO,CAAC,OAAO,CAAC;CAQlH"}
1
+ {"version":3,"file":"XyoValidator.d.ts","sourceRoot":"","sources":["../../../../../src/modules/services/ChainValidator/XyoValidator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EAAE,oCAAoC,EACjD,wCAAwC,EACzC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,yBAAyB,EAC1B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAG3D,WAAW,CAAC,EAAE,WAAW,CAAA;IAKzB,0BAA0B,EAAE,oCAAoC,CAAA;CACjE;AAED,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAE3C,qBACa,YAAY,CAAC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,CAAE,SAAQ,yBAAyB,CAAC,OAAO,CAAE,YAAW,SAAS;IAChJ,MAAM,CAAC,QAAQ,CAAC,eAAe,cAAc;IAC7C,MAAM,CAAC,QAAQ,CAAC,cAAc,eAAmB;IACjD,MAAM,CAAC,QAAQ,CAAC,YAAY,kBAAuB;IACnD,MAAM,CAAC,QAAQ,CAAC,QAAQ,WAAqB;IAC7C,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAS;IACzC,OAAO,SAA8B;IACrC,OAAO,CAAC,YAAY,CAAC,CAAa;IASlC,SAAS,KAAK,WAAW,+BAExB;IAkBc,aAAa;IAK5B,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;IAK9D,0BAA0B,CAAC,mBAAmB,EAAE,wCAAwC,GAAG,OAAO,CAAC,OAAO,CAAC;CAQlH"}
@@ -8,6 +8,7 @@ export interface BaseElectionServicesParams extends BaseServiceParams {
8
8
  stakeIntentService?: StakeIntentService;
9
9
  }
10
10
  export declare class BaseElectionService extends AbstractCreatableProvider<BaseElectionServicesParams> implements ElectionService {
11
+ static readonly connectionTypes: readonly [];
11
12
  static readonly defaultMoniker = "Election";
12
13
  static readonly dependencies: never[];
13
14
  static readonly monikers: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"BaseElectionService.d.ts","sourceRoot":"","sources":["../../../../../src/modules/services/Election/BaseElectionService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EACL,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAC9C,MAAM,sBAAsB,CAAA;AAI7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC;AAED,qBACa,mBAAoB,SAAQ,yBAAyB,CAAC,0BAA0B,CAAE,YAAW,eAAe;IACvH,MAAM,CAAC,QAAQ,CAAC,cAAc,cAAa;IAC3C,MAAM,CAAC,QAAQ,CAAC,YAAY,UAAK;IACjC,MAAM,CAAC,QAAQ,CAAC,QAAQ,WAAe;IACvC,OAAO,SAAqC;IAC5C,IAAI,WAAW,+BAEd;IAED,IAAI,gBAAgB,qBAEnB;IAED,IAAI,kBAAkB,uBAErB;IAEK,+BAA+B,CAAC,OAAO,EAAE,YAAY,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAStG,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,SAAI,GAAG,UAAU,EAAE;CAMjH"}
1
+ {"version":3,"file":"BaseElectionService.d.ts","sourceRoot":"","sources":["../../../../../src/modules/services/Election/BaseElectionService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EACL,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAC9C,MAAM,sBAAsB,CAAA;AAI7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC;AAED,qBACa,mBAAoB,SAAQ,yBAAyB,CAAC,0BAA0B,CAAE,YAAW,eAAe;IACvH,MAAM,CAAC,QAAQ,CAAC,eAAe,cAAc;IAC7C,MAAM,CAAC,QAAQ,CAAC,cAAc,cAAa;IAC3C,MAAM,CAAC,QAAQ,CAAC,YAAY,UAAK;IACjC,MAAM,CAAC,QAAQ,CAAC,QAAQ,WAAe;IACvC,OAAO,SAAqC;IAC5C,IAAI,WAAW,+BAEd;IAED,IAAI,gBAAgB,qBAEnB;IAED,IAAI,kBAAkB,uBAErB;IAEK,+BAA+B,CAAC,OAAO,EAAE,YAAY,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAStG,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,SAAI,GAAG,UAAU,EAAE;CAMjH"}