@evefrontier/dapp-kit 0.1.9 → 0.2.0-alpha.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 (211) hide show
  1. package/README.md +28 -25
  2. package/dist/config/dapp-kit.d.ts +4 -0
  3. package/dist/config/dapp-kit.d.ts.map +1 -0
  4. package/dist/config/dapp-kit.js +14 -0
  5. package/dist/config/index.d.ts +2 -0
  6. package/dist/config/index.d.ts.map +1 -0
  7. package/dist/config/index.js +1 -0
  8. package/dist/graphql/client.d.ts +277 -0
  9. package/dist/graphql/client.d.ts.map +1 -0
  10. package/dist/graphql/client.js +346 -0
  11. package/dist/graphql/index.d.ts +4 -0
  12. package/dist/graphql/index.d.ts.map +1 -0
  13. package/dist/graphql/index.js +16 -0
  14. package/dist/graphql/queries.d.ts +103 -0
  15. package/dist/graphql/queries.d.ts.map +1 -0
  16. package/{graphql/queries.ts → dist/graphql/queries.js} +113 -223
  17. package/dist/graphql/types.d.ts +396 -0
  18. package/dist/graphql/types.d.ts.map +1 -0
  19. package/dist/graphql/types.js +4 -0
  20. package/dist/hooks/index.d.ts +10 -0
  21. package/dist/hooks/index.d.ts.map +1 -0
  22. package/dist/hooks/index.js +8 -0
  23. package/dist/hooks/useCharacterDirectory.d.ts +16 -0
  24. package/dist/hooks/useCharacterDirectory.d.ts.map +1 -0
  25. package/dist/hooks/useCharacterDirectory.js +23 -0
  26. package/dist/hooks/useCharacterSearch.d.ts +24 -0
  27. package/dist/hooks/useCharacterSearch.d.ts.map +1 -0
  28. package/dist/hooks/useCharacterSearch.js +24 -0
  29. package/dist/hooks/useConnection.d.ts +51 -0
  30. package/dist/hooks/useConnection.d.ts.map +1 -0
  31. package/{hooks/useConnection.ts → dist/hooks/useConnection.js} +8 -10
  32. package/dist/hooks/useEntityRole.d.ts +26 -0
  33. package/dist/hooks/useEntityRole.d.ts.map +1 -0
  34. package/dist/hooks/useEntityRole.js +91 -0
  35. package/dist/hooks/useNotification.d.ts +72 -0
  36. package/dist/hooks/useNotification.d.ts.map +1 -0
  37. package/{hooks/useNotification.ts → dist/hooks/useNotification.js} +8 -12
  38. package/dist/hooks/useSmartObject.d.ts +44 -0
  39. package/dist/hooks/useSmartObject.d.ts.map +1 -0
  40. package/dist/hooks/useSmartObject.js +50 -0
  41. package/dist/hooks/useSponsoredTransaction.d.ts +147 -0
  42. package/dist/hooks/useSponsoredTransaction.d.ts.map +1 -0
  43. package/dist/hooks/useSponsoredTransaction.js +240 -0
  44. package/dist/hooks/useTypeNames.d.ts +11 -0
  45. package/dist/hooks/useTypeNames.d.ts.map +1 -0
  46. package/dist/hooks/useTypeNames.js +24 -0
  47. package/dist/index.d.ts +11 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +29 -0
  50. package/dist/providers/EveFrontierProvider.d.ts +23 -0
  51. package/dist/providers/EveFrontierProvider.d.ts.map +1 -0
  52. package/dist/providers/EveFrontierProvider.js +23 -0
  53. package/dist/providers/NotificationProvider.d.ts +14 -0
  54. package/dist/providers/NotificationProvider.d.ts.map +1 -0
  55. package/dist/providers/NotificationProvider.js +66 -0
  56. package/dist/providers/SmartObjectProvider.d.ts +31 -0
  57. package/dist/providers/SmartObjectProvider.d.ts.map +1 -0
  58. package/dist/providers/SmartObjectProvider.js +80 -0
  59. package/dist/providers/VaultProvider.d.ts +10 -0
  60. package/dist/providers/VaultProvider.d.ts.map +1 -0
  61. package/dist/providers/VaultProvider.js +79 -0
  62. package/dist/providers/index.d.ts +5 -0
  63. package/dist/providers/index.d.ts.map +1 -0
  64. package/dist/providers/index.js +4 -0
  65. package/dist/providers/smartObject/useEntityData.d.ts +29 -0
  66. package/dist/providers/smartObject/useEntityData.d.ts.map +1 -0
  67. package/dist/providers/smartObject/useEntityData.js +135 -0
  68. package/dist/providers/smartObject/useEntitySubscription.d.ts +14 -0
  69. package/dist/providers/smartObject/useEntitySubscription.d.ts.map +1 -0
  70. package/dist/providers/smartObject/useEntitySubscription.js +58 -0
  71. package/dist/providers/smartObject/useObjectSelection.d.ts +11 -0
  72. package/dist/providers/smartObject/useObjectSelection.d.ts.map +1 -0
  73. package/dist/providers/smartObject/useObjectSelection.js +27 -0
  74. package/dist/providers/smartObject/usePollingBackstop.d.ts +18 -0
  75. package/dist/providers/smartObject/usePollingBackstop.d.ts.map +1 -0
  76. package/dist/providers/smartObject/usePollingBackstop.js +38 -0
  77. package/dist/types/character.d.ts +21 -0
  78. package/dist/types/character.d.ts.map +1 -0
  79. package/dist/types/character.js +1 -0
  80. package/dist/types/contexts.d.ts +61 -0
  81. package/dist/types/contexts.d.ts.map +1 -0
  82. package/dist/types/contexts.js +6 -0
  83. package/dist/types/entity.d.ts +245 -0
  84. package/dist/types/entity.d.ts.map +1 -0
  85. package/dist/types/entity.js +6 -0
  86. package/dist/types/index.d.ts +6 -0
  87. package/dist/types/index.d.ts.map +1 -0
  88. package/dist/types/index.js +5 -0
  89. package/dist/types/sponsoredTransaction.d.ts +26 -0
  90. package/dist/types/sponsoredTransaction.d.ts.map +1 -0
  91. package/dist/types/sponsoredTransaction.js +10 -0
  92. package/dist/types/types.d.ts +110 -0
  93. package/dist/types/types.d.ts.map +1 -0
  94. package/dist/types/types.js +41 -0
  95. package/dist/types/worldApiReturnTypes.d.ts +68 -0
  96. package/dist/types/worldApiReturnTypes.d.ts.map +1 -0
  97. package/dist/types/worldApiReturnTypes.js +1 -0
  98. package/{utils/burnRate.ts → dist/utils/burnRate.d.ts} +4 -29
  99. package/dist/utils/burnRate.d.ts.map +1 -0
  100. package/dist/utils/burnRate.js +25 -0
  101. package/dist/utils/characters.d.ts +26 -0
  102. package/dist/utils/characters.d.ts.map +1 -0
  103. package/dist/utils/characters.js +84 -0
  104. package/dist/utils/constants.d.ts +153 -0
  105. package/dist/utils/constants.d.ts.map +1 -0
  106. package/dist/utils/constants.js +190 -0
  107. package/dist/utils/datahub.d.ts +40 -0
  108. package/dist/utils/datahub.d.ts.map +1 -0
  109. package/{utils/datahub.ts → dist/utils/datahub.js} +32 -25
  110. package/dist/utils/entity.d.ts +58 -0
  111. package/dist/utils/entity.d.ts.map +1 -0
  112. package/dist/utils/entity.js +386 -0
  113. package/dist/utils/errors.d.ts +18 -0
  114. package/dist/utils/errors.d.ts.map +1 -0
  115. package/dist/utils/errors.js +128 -0
  116. package/dist/utils/events/entityEvents.d.ts +44 -0
  117. package/dist/utils/events/entityEvents.d.ts.map +1 -0
  118. package/dist/utils/events/entityEvents.js +95 -0
  119. package/dist/utils/events/entitySubscription.d.ts +30 -0
  120. package/dist/utils/events/entitySubscription.d.ts.map +1 -0
  121. package/dist/utils/events/entitySubscription.js +84 -0
  122. package/dist/utils/events/graphqlEventStream.d.ts +90 -0
  123. package/dist/utils/events/graphqlEventStream.d.ts.map +1 -0
  124. package/dist/utils/events/graphqlEventStream.js +198 -0
  125. package/dist/utils/events/refetchScheduler.d.ts +30 -0
  126. package/dist/utils/events/refetchScheduler.d.ts.map +1 -0
  127. package/dist/utils/events/refetchScheduler.js +57 -0
  128. package/dist/utils/events/sseClient.d.ts +42 -0
  129. package/dist/utils/events/sseClient.d.ts.map +1 -0
  130. package/dist/utils/events/sseClient.js +97 -0
  131. package/dist/utils/fuel.d.ts +231 -0
  132. package/dist/utils/fuel.d.ts.map +1 -0
  133. package/dist/utils/fuel.js +652 -0
  134. package/dist/utils/grid.d.ts +115 -0
  135. package/dist/utils/grid.d.ts.map +1 -0
  136. package/dist/utils/grid.js +115 -0
  137. package/dist/utils/index.d.ts +15 -0
  138. package/dist/utils/index.d.ts.map +1 -0
  139. package/dist/utils/index.js +22 -0
  140. package/dist/utils/inventory.d.ts +3 -0
  141. package/dist/utils/inventory.d.ts.map +1 -0
  142. package/dist/utils/inventory.js +12 -0
  143. package/dist/utils/logger.d.ts +25 -0
  144. package/dist/utils/logger.d.ts.map +1 -0
  145. package/dist/utils/logger.js +228 -0
  146. package/dist/utils/mapping.d.ts +30 -0
  147. package/dist/utils/mapping.d.ts.map +1 -0
  148. package/dist/utils/mapping.js +73 -0
  149. package/dist/utils/mvr/worldTypes.d.ts +35 -0
  150. package/dist/utils/mvr/worldTypes.d.ts.map +1 -0
  151. package/dist/utils/mvr/worldTypes.js +54 -0
  152. package/dist/utils/role.d.ts +116 -0
  153. package/dist/utils/role.d.ts.map +1 -0
  154. package/dist/utils/role.js +120 -0
  155. package/dist/utils/smartObject.d.ts +24 -0
  156. package/dist/utils/smartObject.d.ts.map +1 -0
  157. package/dist/utils/smartObject.js +24 -0
  158. package/dist/utils/utils.d.ts +133 -0
  159. package/dist/utils/utils.d.ts.map +1 -0
  160. package/dist/utils/utils.js +213 -0
  161. package/dist/wallet/features.d.ts +28 -0
  162. package/dist/wallet/features.d.ts.map +1 -0
  163. package/dist/wallet/features.js +22 -0
  164. package/dist/wallet/index.d.ts +9 -0
  165. package/dist/wallet/index.d.ts.map +1 -0
  166. package/dist/wallet/index.js +9 -0
  167. package/dist/wallet/utils.d.ts +71 -0
  168. package/dist/wallet/utils.d.ts.map +1 -0
  169. package/dist/wallet/utils.js +79 -0
  170. package/package.json +69 -35
  171. package/config/dapp-kit.ts +0 -20
  172. package/config/index.ts +0 -1
  173. package/graphql/client.ts +0 -578
  174. package/graphql/index.ts +0 -39
  175. package/graphql/types.ts +0 -468
  176. package/hooks/index.ts +0 -15
  177. package/hooks/useSmartObject.ts +0 -66
  178. package/hooks/useSponsoredTransaction.ts +0 -442
  179. package/index.ts +0 -88
  180. package/providers/EveFrontierProvider.tsx +0 -41
  181. package/providers/NotificationProvider.tsx +0 -108
  182. package/providers/SmartObjectProvider.tsx +0 -296
  183. package/providers/VaultProvider.tsx +0 -108
  184. package/providers/index.ts +0 -10
  185. package/types/contexts.ts +0 -67
  186. package/types/global.d.ts +0 -7
  187. package/types/index.ts +0 -4
  188. package/types/sponsoredTransaction.ts +0 -70
  189. package/types/types.ts +0 -198
  190. package/types/worldApiReturnTypes.ts +0 -144
  191. package/utils/__tests__/burnRate.test.ts +0 -121
  192. package/utils/__tests__/character.test.ts +0 -112
  193. package/utils/__tests__/characterOwnedObjects.test.ts +0 -225
  194. package/utils/__tests__/config.test.ts +0 -424
  195. package/utils/__tests__/datahub.test.ts +0 -58
  196. package/utils/__tests__/logger.test.ts +0 -145
  197. package/utils/__tests__/mapping.test.ts +0 -439
  198. package/utils/__tests__/utils.test.ts +0 -299
  199. package/utils/character.ts +0 -46
  200. package/utils/characterOwnedObjects.ts +0 -53
  201. package/utils/config.ts +0 -151
  202. package/utils/constants.ts +0 -254
  203. package/utils/errors.ts +0 -171
  204. package/utils/index.ts +0 -47
  205. package/utils/logger.ts +0 -300
  206. package/utils/mapping.ts +0 -118
  207. package/utils/transforms.ts +0 -263
  208. package/utils/utils.ts +0 -270
  209. package/wallet/features.ts +0 -136
  210. package/wallet/index.ts +0 -26
  211. package/wallet/utils.ts +0 -117
@@ -0,0 +1,231 @@
1
+ import type { EntityPowerGrid } from '../types/index.js';
2
+ /**
3
+ * Port of world-contracts `power::fuel_math` and the fuel parts of
4
+ * `power::power_grid`, for both grid models (see {@link PowerGridModel}).
5
+ * Integer maths in bigint, with the contract's rounding, so results match the
6
+ * chain to the unit.
7
+ *
8
+ * - `fuelFactor` (up to dev-v1.1.11): `fuel_burn`, `fuel_left`, `used_mw`,
9
+ * `effective_capacity_mw`. Power, fuel and fuel stats are fixed point at
10
+ * {@link FUEL_SCALE} (4 decimals): 150000 is 15 MW.
11
+ * - `pools` (dev-v1.1.16 onward): `project`, `step`, `pool_rates`,
12
+ * `capacity_of` and friends. Power is plain MW; fuel and fuel stats are fixed
13
+ * point at {@link POOLS_FUEL_SCALE} (1e-9 kg).
14
+ */
15
+ /** Fixed-point scale of power, fuel and fuel stats on a `fuelFactor` grid (`fuel_math::SCALE` up to dev-v1.1.11). @category Utilities - Power */
16
+ export declare const FUEL_SCALE = 10000n;
17
+ /** Fixed-point scale of fuel and fuel stats on a `pools` grid (`fuel_math::SCALE` from dev-v1.1.16): 1e-9 kg. @category Utilities - Power */
18
+ export declare const POOLS_FUEL_SCALE = 1000000000n;
19
+ /**
20
+ * Fixed-point scale of the grid's power values: {@link FUEL_SCALE} on a
21
+ * `fuelFactor` grid, 1 (plain MW) on a `pools` grid.
22
+ *
23
+ * @category Utilities - Power
24
+ */
25
+ export declare function powerScale(grid: EntityPowerGrid): bigint;
26
+ /**
27
+ * Fixed-point scale of the grid's fuel values: {@link FUEL_SCALE} on a
28
+ * `fuelFactor` grid, {@link POOLS_FUEL_SCALE} on a `pools` grid.
29
+ *
30
+ * @category Utilities - Power
31
+ */
32
+ export declare function fuelScale(grid: EntityPowerGrid): bigint;
33
+ /**
34
+ * What a whole unit of the grid's fuel is: abstract `units` on a `fuelFactor`
35
+ * grid, `kg` on a `pools` grid.
36
+ *
37
+ * @category Utilities - Power
38
+ */
39
+ export declare function fuelUnit(grid: EntityPowerGrid): 'units' | 'kg';
40
+ /**
41
+ * A power value of this grid at {@link FUEL_SCALE}, whatever the grid's model:
42
+ * plain MW on a `pools` grid becomes MW × 10^4. For display with
43
+ * {@link fromFixed}.
44
+ *
45
+ * @category Utilities - Power
46
+ */
47
+ export declare function normalizeMw(grid: EntityPowerGrid, value: bigint | string): bigint;
48
+ /**
49
+ * A fuel value of this grid at {@link FUEL_SCALE}, whatever the grid's model:
50
+ * 1e-9 kg on a `pools` grid becomes kg × 10^4, rounded down. For display with
51
+ * {@link fromFixed}; see {@link fuelUnit} for what one unit is.
52
+ *
53
+ * @category Utilities - Power
54
+ */
55
+ export declare function normalizeFuel(grid: EntityPowerGrid, value: bigint | string): bigint;
56
+ /**
57
+ * Fuel burned per second of load: `impulse / max(1, burden / containment_reduction)`,
58
+ * clamped to [1, 100]. All values at {@link FUEL_SCALE}. Port of `fuel_math::fuel_factor`.
59
+ *
60
+ * @category Utilities - Power
61
+ */
62
+ export declare function fuelFactor(impulse: bigint, containmentBurden: bigint, containmentReduction: bigint): bigint;
63
+ /** Inputs of {@link generatorBurn}, as in `fuel_math::generator_burn`. @category Utilities - Power */
64
+ export interface GeneratorBurnInput {
65
+ impulse: bigint;
66
+ containmentBurden: bigint;
67
+ capacityMw: bigint;
68
+ maxOutputMw: bigint;
69
+ containmentReduction: bigint;
70
+ baseFuelRate: bigint;
71
+ load: bigint;
72
+ elapsedMs: bigint;
73
+ }
74
+ /**
75
+ * One online generator's burn over `elapsedMs`, rounded up. With no fuel
76
+ * impulse it burns its base rate instead. Port of `fuel_math::generator_burn`.
77
+ *
78
+ * @category Utilities - Power
79
+ */
80
+ export declare function generatorBurn(input: GeneratorBurnInput): bigint;
81
+ /**
82
+ * MW in use at the last settle: the sum of nonzero module draws. Port of
83
+ * `power_grid::used_mw`.
84
+ *
85
+ * @category Utilities - Power
86
+ */
87
+ export declare function usedMw(grid: EntityPowerGrid): bigint;
88
+ /**
89
+ * Fuel burned between the last settle and `nowMs`, capped at what is left.
90
+ * Port of `power_grid::fuel_burn` (`fuelFactor`), or the settled fuel in
91
+ * online bays less `projected_fuel` (`pools`). No load means no burn.
92
+ *
93
+ * @category Utilities - Power
94
+ * @param grid - Parsed power grid
95
+ * @param nowMs - Current time in ms since the epoch
96
+ */
97
+ export declare function fuelBurn(grid: EntityPowerGrid, nowMs: number): bigint;
98
+ /**
99
+ * Fuel left now (in online bays, on a `pools` grid), with the burn since the
100
+ * last settle applied. The same number `power_grid::projected_fuel` returns.
101
+ *
102
+ * @category Utilities - Power
103
+ */
104
+ export declare function projectedFuel(grid: EntityPowerGrid, nowMs: number): bigint;
105
+ /**
106
+ * Fuel the grid burns per hour, or 0 when nothing draws. Rounded up per
107
+ * generator, as the contract rounds a single settle. On a `fuelFactor` grid
108
+ * at the load stored at the last settle; on a `pools` grid at the load now
109
+ * (`nowMs`, default the last settle), as `projected_pools`' burn rates.
110
+ *
111
+ * @category Utilities - Power
112
+ */
113
+ export declare function fuelBurnPerHour(grid: EntityPowerGrid, nowMs?: number): bigint;
114
+ /**
115
+ * Time from `nowMs` until the grid stops burning at its current grants: the
116
+ * fuel runs out (`fuelFactor`), or every pool in use runs dry or a run-out
117
+ * trips the grid (`pools`, stepping through each pool's run-out as `project`
118
+ * does). Null when nothing burns.
119
+ *
120
+ * @category Utilities - Power
121
+ */
122
+ export declare function msUntilEmpty(grid: EntityPowerGrid, nowMs: number): number | null;
123
+ /**
124
+ * A fixed-point value as a number of whole units: `150000` → `15`.
125
+ *
126
+ * @category Utilities - Power
127
+ * @param value - Fixed-point value
128
+ * @param scale - Its scale; {@link FUEL_SCALE} by default. Pass the result of
129
+ * {@link normalizeMw} or {@link normalizeFuel} to display any grid's values.
130
+ */
131
+ export declare function fromFixed(value: bigint | string, scale?: bigint): number;
132
+ /**
133
+ * A grid as it stands at `nowMs`: whether it is on, its generators' output,
134
+ * each module's draw and each generator's output (plain MW on a `pools` grid,
135
+ * at {@link FUEL_SCALE} on a `fuelFactor` one), and the fuel left.
136
+ *
137
+ * @category Utilities - Power
138
+ */
139
+ export interface GridProjection {
140
+ /** On a `pools` grid, false once a run-out has tripped it */
141
+ on: boolean;
142
+ /** Generators' output, ignoring On/Off (`projected_capacity_mw`) */
143
+ capacityMw: bigint;
144
+ /** Each module's draw by component id; 0 once nothing can feed it */
145
+ draws: Record<string, bigint>;
146
+ /** Each generator's output by component id; 0 while off or out of fuel */
147
+ outputs: Record<string, bigint>;
148
+ fuelNow: bigint;
149
+ }
150
+ /**
151
+ * Where the grid stands at `nowMs`. On a `fuelFactor` grid: the stored state,
152
+ * with draws and output zeroed once the fuel has run out. On a `pools` grid:
153
+ * `power_grid::project`, stepping through each pool's run-out, re-granting and
154
+ * tripping as a settle would.
155
+ *
156
+ * @category Utilities - Power
157
+ */
158
+ export declare function projectGrid(grid: EntityPowerGrid, nowMs: number): GridProjection;
159
+ /**
160
+ * Who burns the fuel and where it comes from, per hour at the grants in force
161
+ * at `nowMs`. All values at the grid's fuel scale (see {@link fuelScale}).
162
+ *
163
+ * @category Utilities - Power
164
+ */
165
+ export interface BurnBreakdown {
166
+ /** The whole grid; the same as {@link fuelBurnPerHour} at `nowMs` */
167
+ perHour: bigint;
168
+ /** By generator component id: what it burns. 0 while it supplies nothing. */
169
+ generators: Record<string, bigint>;
170
+ /** By fuel source (fuel bay) component id: what is drawn from it, and the fuel it holds now */
171
+ sources: Record<string, {
172
+ perHour: bigint;
173
+ fuelNow: bigint;
174
+ }>;
175
+ /**
176
+ * By module component id: its share of the burn, by draw. What switching it
177
+ * off would save, give or take rounding; 0 for a module drawing nothing.
178
+ */
179
+ modules: Record<string, bigint>;
180
+ /**
181
+ * `pools` grids only, by generator component id: the usable impulse it burns
182
+ * at (its pool's impulse, capped at its limit), for each generator burning.
183
+ * Empty on a `fuelFactor` grid.
184
+ */
185
+ impulses: Record<string, bigint>;
186
+ }
187
+ /**
188
+ * Split the grid's burn per hour by generator, fuel source and module.
189
+ *
190
+ * On a `pools` grid each generator burns `generator_burn` over an hour at its
191
+ * own output and usable impulse; each online bay feeds its pool's burn in
192
+ * proportion to what it holds, as `take_from_online_bays` takes it. On a
193
+ * `fuelFactor` grid each online generator burns `generator_burn` at the one
194
+ * pool, and the sources, which only record a capacity, share it by capacity.
195
+ *
196
+ * @category Utilities - Power
197
+ */
198
+ export declare function burnBreakdown(grid: EntityPowerGrid, nowMs: number): BurnBreakdown;
199
+ /**
200
+ * The usable impulse every burning generator shares, at the grid's fuel scale;
201
+ * null when nothing burns, when burning generators use different impulses, or
202
+ * on a `fuelFactor` grid.
203
+ *
204
+ * @category Utilities - Power
205
+ */
206
+ export declare function sharedBurnImpulse(burn: BurnBreakdown): bigint | null;
207
+ /**
208
+ * Share of rated output a pool's volatility allows, at {@link POOLS_FUEL_SCALE}:
209
+ * `min(volatility × SCALE ÷ volatility_limit, SCALE)`, at least 1 while the
210
+ * volatility is above zero. Port of `fuel_math::volatility_share`.
211
+ *
212
+ * @category Utilities - Power
213
+ */
214
+ export declare function volatilityShare(poolVolatility: bigint, volatilityLimit: bigint): bigint;
215
+ /**
216
+ * Plain MW a generator sends out at `share`: `max_output_mw × share ÷ SCALE`,
217
+ * floored, but at least 1 MW while both are above zero. Port of
218
+ * `fuel_math::generator_output`.
219
+ *
220
+ * @category Utilities - Power
221
+ */
222
+ export declare function generatorOutput(maxOutputMw: bigint, share: bigint): bigint;
223
+ /**
224
+ * One online generator's burn over `elapsedMs`, at {@link POOLS_FUEL_SCALE},
225
+ * rounded up: its load (`load × output ÷ capacity`) over `usableImpulse`.
226
+ * Capped at u64 max. Port of the dev-v1.1.16+ `fuel_math::generator_burn`.
227
+ *
228
+ * @category Utilities - Power
229
+ */
230
+ export declare function poolGeneratorBurn(usableImpulse: bigint, capacityMw: bigint, outputMw: bigint, load: bigint, elapsedMs: bigint): bigint;
231
+ //# sourceMappingURL=fuel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fuel.d.ts","sourceRoot":"","sources":["../../utils/fuel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,eAAe,EAAkB,MAAM,UAAU,CAAA;AAEhF;;;;;;;;;;;;GAYG;AAEH,iJAAiJ;AACjJ,eAAO,MAAM,UAAU,SAAU,CAAA;AAEjC,6IAA6I;AAC7I,eAAO,MAAM,gBAAgB,cAAiB,CAAA;AAgB9C;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,GAAG,IAAI,CAE9D;AAKD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,MAAM,CAER;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,EACf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