@evefrontier/dapp-kit 0.1.8 → 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.
- package/README.md +28 -25
- package/dist/config/dapp-kit.d.ts +4 -0
- package/dist/config/dapp-kit.d.ts.map +1 -0
- package/dist/config/dapp-kit.js +14 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +1 -0
- package/dist/graphql/client.d.ts +277 -0
- package/dist/graphql/client.d.ts.map +1 -0
- package/dist/graphql/client.js +346 -0
- package/dist/graphql/index.d.ts +4 -0
- package/dist/graphql/index.d.ts.map +1 -0
- package/dist/graphql/index.js +16 -0
- package/dist/graphql/queries.d.ts +103 -0
- package/dist/graphql/queries.d.ts.map +1 -0
- package/{graphql/queries.ts → dist/graphql/queries.js} +113 -223
- package/dist/graphql/types.d.ts +396 -0
- package/dist/graphql/types.d.ts.map +1 -0
- package/dist/graphql/types.js +4 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +8 -0
- package/dist/hooks/useCharacterDirectory.d.ts +16 -0
- package/dist/hooks/useCharacterDirectory.d.ts.map +1 -0
- package/dist/hooks/useCharacterDirectory.js +23 -0
- package/dist/hooks/useCharacterSearch.d.ts +24 -0
- package/dist/hooks/useCharacterSearch.d.ts.map +1 -0
- package/dist/hooks/useCharacterSearch.js +24 -0
- package/dist/hooks/useConnection.d.ts +51 -0
- package/dist/hooks/useConnection.d.ts.map +1 -0
- package/{hooks/useConnection.ts → dist/hooks/useConnection.js} +8 -10
- package/dist/hooks/useEntityRole.d.ts +26 -0
- package/dist/hooks/useEntityRole.d.ts.map +1 -0
- package/dist/hooks/useEntityRole.js +91 -0
- package/dist/hooks/useNotification.d.ts +72 -0
- package/dist/hooks/useNotification.d.ts.map +1 -0
- package/{hooks/useNotification.ts → dist/hooks/useNotification.js} +8 -12
- package/dist/hooks/useSmartObject.d.ts +44 -0
- package/dist/hooks/useSmartObject.d.ts.map +1 -0
- package/dist/hooks/useSmartObject.js +50 -0
- package/dist/hooks/useSponsoredTransaction.d.ts +147 -0
- package/dist/hooks/useSponsoredTransaction.d.ts.map +1 -0
- package/dist/hooks/useSponsoredTransaction.js +240 -0
- package/dist/hooks/useTypeNames.d.ts +11 -0
- package/dist/hooks/useTypeNames.d.ts.map +1 -0
- package/dist/hooks/useTypeNames.js +24 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/providers/EveFrontierProvider.d.ts +23 -0
- package/dist/providers/EveFrontierProvider.d.ts.map +1 -0
- package/dist/providers/EveFrontierProvider.js +23 -0
- package/dist/providers/NotificationProvider.d.ts +14 -0
- package/dist/providers/NotificationProvider.d.ts.map +1 -0
- package/dist/providers/NotificationProvider.js +66 -0
- package/dist/providers/SmartObjectProvider.d.ts +31 -0
- package/dist/providers/SmartObjectProvider.d.ts.map +1 -0
- package/dist/providers/SmartObjectProvider.js +80 -0
- package/dist/providers/VaultProvider.d.ts +10 -0
- package/dist/providers/VaultProvider.d.ts.map +1 -0
- package/dist/providers/VaultProvider.js +79 -0
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +4 -0
- package/dist/providers/smartObject/useEntityData.d.ts +29 -0
- package/dist/providers/smartObject/useEntityData.d.ts.map +1 -0
- package/dist/providers/smartObject/useEntityData.js +135 -0
- package/dist/providers/smartObject/useEntitySubscription.d.ts +14 -0
- package/dist/providers/smartObject/useEntitySubscription.d.ts.map +1 -0
- package/dist/providers/smartObject/useEntitySubscription.js +58 -0
- package/dist/providers/smartObject/useObjectSelection.d.ts +11 -0
- package/dist/providers/smartObject/useObjectSelection.d.ts.map +1 -0
- package/dist/providers/smartObject/useObjectSelection.js +27 -0
- package/dist/providers/smartObject/usePollingBackstop.d.ts +18 -0
- package/dist/providers/smartObject/usePollingBackstop.d.ts.map +1 -0
- package/dist/providers/smartObject/usePollingBackstop.js +38 -0
- package/dist/types/character.d.ts +21 -0
- package/dist/types/character.d.ts.map +1 -0
- package/dist/types/character.js +1 -0
- package/dist/types/contexts.d.ts +61 -0
- package/dist/types/contexts.d.ts.map +1 -0
- package/dist/types/contexts.js +6 -0
- package/dist/types/entity.d.ts +245 -0
- package/dist/types/entity.d.ts.map +1 -0
- package/dist/types/entity.js +6 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/sponsoredTransaction.d.ts +26 -0
- package/dist/types/sponsoredTransaction.d.ts.map +1 -0
- package/dist/types/sponsoredTransaction.js +10 -0
- package/dist/types/types.d.ts +110 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/types.js +41 -0
- package/dist/types/worldApiReturnTypes.d.ts +68 -0
- package/dist/types/worldApiReturnTypes.d.ts.map +1 -0
- package/dist/types/worldApiReturnTypes.js +1 -0
- package/{utils/burnRate.ts → dist/utils/burnRate.d.ts} +4 -29
- package/dist/utils/burnRate.d.ts.map +1 -0
- package/dist/utils/burnRate.js +25 -0
- package/dist/utils/characters.d.ts +26 -0
- package/dist/utils/characters.d.ts.map +1 -0
- package/dist/utils/characters.js +84 -0
- package/dist/utils/constants.d.ts +153 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +190 -0
- package/dist/utils/datahub.d.ts +40 -0
- package/dist/utils/datahub.d.ts.map +1 -0
- package/{utils/datahub.ts → dist/utils/datahub.js} +32 -25
- package/dist/utils/entity.d.ts +58 -0
- package/dist/utils/entity.d.ts.map +1 -0
- package/dist/utils/entity.js +386 -0
- package/dist/utils/errors.d.ts +18 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +128 -0
- package/dist/utils/events/entityEvents.d.ts +44 -0
- package/dist/utils/events/entityEvents.d.ts.map +1 -0
- package/dist/utils/events/entityEvents.js +95 -0
- package/dist/utils/events/entitySubscription.d.ts +30 -0
- package/dist/utils/events/entitySubscription.d.ts.map +1 -0
- package/dist/utils/events/entitySubscription.js +84 -0
- package/dist/utils/events/graphqlEventStream.d.ts +90 -0
- package/dist/utils/events/graphqlEventStream.d.ts.map +1 -0
- package/dist/utils/events/graphqlEventStream.js +198 -0
- package/dist/utils/events/refetchScheduler.d.ts +30 -0
- package/dist/utils/events/refetchScheduler.d.ts.map +1 -0
- package/dist/utils/events/refetchScheduler.js +57 -0
- package/dist/utils/events/sseClient.d.ts +42 -0
- package/dist/utils/events/sseClient.d.ts.map +1 -0
- package/dist/utils/events/sseClient.js +97 -0
- package/dist/utils/fuel.d.ts +231 -0
- package/dist/utils/fuel.d.ts.map +1 -0
- package/dist/utils/fuel.js +652 -0
- package/dist/utils/grid.d.ts +115 -0
- package/dist/utils/grid.d.ts.map +1 -0
- package/dist/utils/grid.js +115 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +22 -0
- package/dist/utils/inventory.d.ts +3 -0
- package/dist/utils/inventory.d.ts.map +1 -0
- package/dist/utils/inventory.js +12 -0
- package/dist/utils/logger.d.ts +25 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +228 -0
- package/dist/utils/mapping.d.ts +30 -0
- package/dist/utils/mapping.d.ts.map +1 -0
- package/dist/utils/mapping.js +73 -0
- package/dist/utils/mvr/worldTypes.d.ts +35 -0
- package/dist/utils/mvr/worldTypes.d.ts.map +1 -0
- package/dist/utils/mvr/worldTypes.js +54 -0
- package/dist/utils/role.d.ts +116 -0
- package/dist/utils/role.d.ts.map +1 -0
- package/dist/utils/role.js +120 -0
- package/dist/utils/smartObject.d.ts +24 -0
- package/dist/utils/smartObject.d.ts.map +1 -0
- package/dist/utils/smartObject.js +24 -0
- package/dist/utils/utils.d.ts +133 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +213 -0
- package/dist/wallet/features.d.ts +28 -0
- package/dist/wallet/features.d.ts.map +1 -0
- package/dist/wallet/features.js +22 -0
- package/dist/wallet/index.d.ts +9 -0
- package/dist/wallet/index.d.ts.map +1 -0
- package/dist/wallet/index.js +9 -0
- package/dist/wallet/utils.d.ts +71 -0
- package/dist/wallet/utils.d.ts.map +1 -0
- package/dist/wallet/utils.js +79 -0
- package/package.json +69 -35
- package/config/dapp-kit.ts +0 -20
- package/config/index.ts +0 -1
- package/graphql/client.ts +0 -578
- package/graphql/index.ts +0 -39
- package/graphql/types.ts +0 -468
- package/hooks/index.ts +0 -15
- package/hooks/useSmartObject.ts +0 -66
- package/hooks/useSponsoredTransaction.ts +0 -442
- package/index.ts +0 -88
- package/providers/EveFrontierProvider.tsx +0 -41
- package/providers/NotificationProvider.tsx +0 -108
- package/providers/SmartObjectProvider.tsx +0 -296
- package/providers/VaultProvider.tsx +0 -108
- package/providers/index.ts +0 -10
- package/types/contexts.ts +0 -67
- package/types/global.d.ts +0 -7
- package/types/index.ts +0 -4
- package/types/sponsoredTransaction.ts +0 -70
- package/types/types.ts +0 -198
- package/types/worldApiReturnTypes.ts +0 -144
- package/utils/__tests__/burnRate.test.ts +0 -121
- package/utils/__tests__/character.test.ts +0 -112
- package/utils/__tests__/characterOwnedObjects.test.ts +0 -225
- package/utils/__tests__/config.test.ts +0 -424
- package/utils/__tests__/datahub.test.ts +0 -58
- package/utils/__tests__/logger.test.ts +0 -145
- package/utils/__tests__/mapping.test.ts +0 -439
- package/utils/__tests__/utils.test.ts +0 -299
- package/utils/character.ts +0 -46
- package/utils/characterOwnedObjects.ts +0 -53
- package/utils/config.ts +0 -151
- package/utils/constants.ts +0 -254
- package/utils/errors.ts +0 -171
- package/utils/index.ts +0 -47
- package/utils/logger.ts +0 -300
- package/utils/mapping.ts +0 -118
- package/utils/transforms.ts +0 -263
- package/utils/utils.ts +0 -270
- package/wallet/features.ts +0 -136
- package/wallet/index.ts +0 -26
- package/wallet/utils.ts +0 -117
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed world entity (world-contracts `core::entity::Entity` plus its
|
|
3
|
+
* components). u64 and fixed-point values stay as decimal strings, as in the
|
|
4
|
+
* GraphQL JSON, so no precision is lost.
|
|
5
|
+
*/
|
|
6
|
+
/** @category Types */
|
|
7
|
+
export interface EntityMetadata {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
/** Character identity component. @category Types */
|
|
13
|
+
export interface EntityIdentity {
|
|
14
|
+
tribeId: number;
|
|
15
|
+
/** Wallet address bound to the character */
|
|
16
|
+
owner: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A number as the decimal string GraphQL returns, so no precision is lost. On a
|
|
20
|
+
* `fuelFactor` grid power and fuel are fixed point at 10^4 (`150000` is 15 MW);
|
|
21
|
+
* on a `pools` grid power is plain MW and fuel is fixed point at 10^9 (1e-9 kg).
|
|
22
|
+
* See {@link PowerGridModel}.
|
|
23
|
+
*
|
|
24
|
+
* @category Types
|
|
25
|
+
*/
|
|
26
|
+
export type FixedPoint = string;
|
|
27
|
+
/**
|
|
28
|
+
* Which world-contracts power maths a grid's values follow:
|
|
29
|
+
* - `fuelFactor`: up to dev-v1.1.11. One fuel pool (`fuel_*`, `fuel_sources`),
|
|
30
|
+
* burn through `fuel_factor` (impulse over containment burden), power and fuel
|
|
31
|
+
* at 10^4.
|
|
32
|
+
* - `pools`: dev-v1.1.16 onward. Fuel bays pooled by fuel type, each Generator
|
|
33
|
+
* burning its own type at `usable_impulse` with output scaled by volatility,
|
|
34
|
+
* power in plain MW, fuel at 10^9 (1e-9 kg).
|
|
35
|
+
*
|
|
36
|
+
* dev-v1.1.12 to v1.1.15 store the `pools` layout at 10^4; the layout alone
|
|
37
|
+
* cannot tell them apart, so they read as `pools` and are not supported.
|
|
38
|
+
*
|
|
39
|
+
* @category Types
|
|
40
|
+
*/
|
|
41
|
+
export type PowerGridModel = 'fuelFactor' | 'pools';
|
|
42
|
+
/** A quantity of one fuel type and its stats, on a `pools` grid. @category Types */
|
|
43
|
+
export interface EntityFuel {
|
|
44
|
+
/** Null while empty */
|
|
45
|
+
fuelType: string | null;
|
|
46
|
+
quantity: FixedPoint;
|
|
47
|
+
impulse: FixedPoint;
|
|
48
|
+
/** Stored only; burn ignores it */
|
|
49
|
+
containmentBurden: FixedPoint;
|
|
50
|
+
volatility: FixedPoint;
|
|
51
|
+
}
|
|
52
|
+
/** A fuel bay on a `pools` grid. Fuel as of the grid's `lastSettledMs`. @category Types */
|
|
53
|
+
export interface EntityFuelBay {
|
|
54
|
+
capacity: FixedPoint;
|
|
55
|
+
/** Only online bays feed the grid */
|
|
56
|
+
online: boolean;
|
|
57
|
+
fuel: EntityFuel;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* How a module takes power: `Firm` modules all get their full requirement or
|
|
61
|
+
* none do; `Elastic` modules share what is left, in connect order.
|
|
62
|
+
*
|
|
63
|
+
* @category Types
|
|
64
|
+
*/
|
|
65
|
+
export type EntityDrawKind = 'Firm' | 'Elastic';
|
|
66
|
+
/** @category Types */
|
|
67
|
+
export interface EntityPowerModule {
|
|
68
|
+
desiredOnline: boolean;
|
|
69
|
+
activeDraw: FixedPoint;
|
|
70
|
+
powerReq: FixedPoint;
|
|
71
|
+
drawKind: EntityDrawKind;
|
|
72
|
+
/** Stored on chain; the v1 grant rules ignore it */
|
|
73
|
+
priority: string;
|
|
74
|
+
/** Stored on chain; the v1 grant rules ignore it */
|
|
75
|
+
lineLoss: FixedPoint;
|
|
76
|
+
}
|
|
77
|
+
/** @category Types */
|
|
78
|
+
export interface EntityGenerator {
|
|
79
|
+
online: boolean;
|
|
80
|
+
maxOutputMw: FixedPoint;
|
|
81
|
+
/** Divides the fuel's containment burden */
|
|
82
|
+
containmentReduction: FixedPoint;
|
|
83
|
+
/** Fuel per second burned while the grid has no fuel impulse */
|
|
84
|
+
baseFuelRate: FixedPoint;
|
|
85
|
+
/** `pools` grids only: the one fuel type it burns */
|
|
86
|
+
fuelType?: string;
|
|
87
|
+
/** `pools` grids only: most impulse it can use, at 10^9 */
|
|
88
|
+
impulseLimit?: FixedPoint;
|
|
89
|
+
/** `pools` grids only: volatility that gives full rated output, at 10^9 */
|
|
90
|
+
volatilityLimit?: FixedPoint;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Power grid component. Fuel values are as of `lastSettledMs`; they only
|
|
94
|
+
* update on the next transaction that touches the grid.
|
|
95
|
+
*
|
|
96
|
+
* @category Types
|
|
97
|
+
*/
|
|
98
|
+
export interface EntityPowerGrid {
|
|
99
|
+
/** Which contract maths the values follow; `fuelFactor` when unset */
|
|
100
|
+
model?: PowerGridModel;
|
|
101
|
+
/** Power On/Off as of the last settle (`on_at_last_settled` on a `pools` grid) */
|
|
102
|
+
on: boolean;
|
|
103
|
+
/** In online bays on a `pools` grid */
|
|
104
|
+
fuelQuantity: FixedPoint;
|
|
105
|
+
/** Of online bays on a `pools` grid */
|
|
106
|
+
fuelCapacity: FixedPoint;
|
|
107
|
+
/** Generators' output as of the last settle (`capacity_mw`) */
|
|
108
|
+
capacityMw: FixedPoint;
|
|
109
|
+
lastSettledMs: string;
|
|
110
|
+
/** Pooled fuel impulse; 0 means generators burn their base rate */
|
|
111
|
+
fuelImpulse: FixedPoint;
|
|
112
|
+
/** Pooled fuel containment burden */
|
|
113
|
+
fuelContainmentBurden: FixedPoint;
|
|
114
|
+
/** Keyed by module component id, in connect order */
|
|
115
|
+
modules: Record<string, EntityPowerModule>;
|
|
116
|
+
/** Keyed by generator component id */
|
|
117
|
+
generators: Record<string, EntityGenerator>;
|
|
118
|
+
/** Fuel source (fuel bay) component id → capacity */
|
|
119
|
+
fuelSources: Record<string, FixedPoint>;
|
|
120
|
+
/** `pools` grids only: fuel bays by component id, in install order */
|
|
121
|
+
bays?: Record<string, EntityFuelBay>;
|
|
122
|
+
}
|
|
123
|
+
/** @category Types */
|
|
124
|
+
export interface EntityLayoutSection {
|
|
125
|
+
id: string;
|
|
126
|
+
/** Component ids installed in this section */
|
|
127
|
+
moduleIds: string[];
|
|
128
|
+
}
|
|
129
|
+
/** @category Types */
|
|
130
|
+
export interface EntityLayout {
|
|
131
|
+
/** Shell object id; null when the creation has no shell (dark) */
|
|
132
|
+
shellId: string | null;
|
|
133
|
+
sections: EntityLayoutSection[];
|
|
134
|
+
}
|
|
135
|
+
/** @category Types */
|
|
136
|
+
export interface EntityInventoryItem {
|
|
137
|
+
typeId: string;
|
|
138
|
+
quantity: string;
|
|
139
|
+
/** Volume per unit */
|
|
140
|
+
volume: string;
|
|
141
|
+
}
|
|
142
|
+
/** @category Types */
|
|
143
|
+
export interface EntityInventory {
|
|
144
|
+
componentId: string;
|
|
145
|
+
name: string | null;
|
|
146
|
+
/** Kind of inventory, not an item type */
|
|
147
|
+
typeId: string;
|
|
148
|
+
capacity: string;
|
|
149
|
+
used: string;
|
|
150
|
+
items: EntityInventoryItem[];
|
|
151
|
+
}
|
|
152
|
+
/** @category Types */
|
|
153
|
+
export interface EntityGenericModule {
|
|
154
|
+
componentId: string;
|
|
155
|
+
name: string | null;
|
|
156
|
+
typeId: string;
|
|
157
|
+
}
|
|
158
|
+
/** Any installed component, unparsed. @category Types */
|
|
159
|
+
export interface EntityComponent {
|
|
160
|
+
id: string;
|
|
161
|
+
name: string | null;
|
|
162
|
+
/** Inner type as `module::Struct`, e.g. `power_grid::PowerGrid` */
|
|
163
|
+
kind: string;
|
|
164
|
+
/** Full Move type of the component value */
|
|
165
|
+
type: string;
|
|
166
|
+
json: unknown;
|
|
167
|
+
}
|
|
168
|
+
/** One requirement an action checks before it runs. @category Types */
|
|
169
|
+
export interface EntityActionRequirement {
|
|
170
|
+
/** Move type of the requirement, e.g. `<package>::power_grid::OperateGrid` */
|
|
171
|
+
typeName: string;
|
|
172
|
+
/** Component the requirement is checked against */
|
|
173
|
+
componentId: string;
|
|
174
|
+
}
|
|
175
|
+
/** An action registered on the entity, with what it requires. @category Types */
|
|
176
|
+
export interface EntityAction {
|
|
177
|
+
name: string;
|
|
178
|
+
/** Which action map it is in: admin or owner */
|
|
179
|
+
scope: 'admin' | 'owner';
|
|
180
|
+
requirements: EntityActionRequirement[];
|
|
181
|
+
}
|
|
182
|
+
/** @category Types */
|
|
183
|
+
export interface EntityData {
|
|
184
|
+
id: string;
|
|
185
|
+
/** Latest object version, used to detect changes between polls */
|
|
186
|
+
version: number;
|
|
187
|
+
key: {
|
|
188
|
+
id: string;
|
|
189
|
+
tenant: string;
|
|
190
|
+
};
|
|
191
|
+
accessCapId: string | null;
|
|
192
|
+
/** True while the entity is locked by an in-flight request */
|
|
193
|
+
inFlight: boolean;
|
|
194
|
+
metadata: EntityMetadata | null;
|
|
195
|
+
identity: EntityIdentity | null;
|
|
196
|
+
powerGrid: EntityPowerGrid | null;
|
|
197
|
+
layout: EntityLayout | null;
|
|
198
|
+
inventories: EntityInventory[];
|
|
199
|
+
genericModules: EntityGenericModule[];
|
|
200
|
+
/** Character ids allowed to control the entity; null when it has no access list */
|
|
201
|
+
controllers: string[] | null;
|
|
202
|
+
/** Every installed component, including the parsed ones */
|
|
203
|
+
components: EntityComponent[];
|
|
204
|
+
/** Names of admin actions */
|
|
205
|
+
adminActions: string[];
|
|
206
|
+
/** Names of owner actions */
|
|
207
|
+
ownerActions: string[];
|
|
208
|
+
/** Every admin and owner action with its requirements */
|
|
209
|
+
actions: EntityAction[];
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Who controls an entity, resolved from the holder of its AccessCap.
|
|
213
|
+
*
|
|
214
|
+
* @category Types
|
|
215
|
+
*/
|
|
216
|
+
export interface EntityOwner {
|
|
217
|
+
/**
|
|
218
|
+
* - `wallet`: the cap is held by an address with no object at it
|
|
219
|
+
* - `character`: the cap is parked on an Entity; `walletAddress` is null if
|
|
220
|
+
* it has no Identity
|
|
221
|
+
* - `object`: held by some other object, e.g. an `ObjectOwner` dynamic-field
|
|
222
|
+
* wrapper; no wallet is resolved
|
|
223
|
+
* - `none`: the cap is not address-owned (shared, immutable) or not found
|
|
224
|
+
*/
|
|
225
|
+
kind: 'wallet' | 'character' | 'object' | 'none';
|
|
226
|
+
/** Address holding the AccessCap: a wallet, or a Character entity's id */
|
|
227
|
+
holder: string | null;
|
|
228
|
+
/** The holder wallet, or the Character's Identity.owner */
|
|
229
|
+
walletAddress: string | null;
|
|
230
|
+
/** The Character entity when the cap is parked on one */
|
|
231
|
+
character: EntityData | null;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* A character as listed by world events, for search.
|
|
235
|
+
*
|
|
236
|
+
* @category Types
|
|
237
|
+
*/
|
|
238
|
+
export interface CharacterSummary {
|
|
239
|
+
characterId: string;
|
|
240
|
+
/** Latest metadata name; empty when the character has never been named */
|
|
241
|
+
name: string;
|
|
242
|
+
/** Wallet address bound to the character */
|
|
243
|
+
walletAddress: string;
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../types/entity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sBAAsB;AACtB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,oDAAoD;AACpD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAA;AAE/B;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,OAAO,CAAA;AAEnD,oFAAoF;AACpF,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAA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,EAAE,CAAA;IAC7B,6BAA6B;IAC7B,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,6BAA6B;IAC7B,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,yDAAyD;IACzD,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;OAOG;IACH,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAA;IAChD,0EAA0E;IAC1E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,yDAAyD;IACzD,SAAS,EAAE,UAAU,GAAG,IAAI,CAAA;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAA;IACZ,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,wBAAwB,CAAA;AACtC,cAAc,SAAS,CAAA;AACvB,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SponsoredTransactionArgs, SponsoredTransactionOutput } from '../wallet/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Available sponsored transaction actions
|
|
4
|
+
*
|
|
5
|
+
* @external SponsoredTransactionActions is defined in @evefrontier/wallet-core to ensure consistency between wallet and dapp-kit
|
|
6
|
+
* @category Types
|
|
7
|
+
*
|
|
8
|
+
* TODO: This typedoc is not working when re-exported from wallet-core
|
|
9
|
+
*/
|
|
10
|
+
export { SponsoredTransactionActions } from '@evefrontier/wallet-core/sponsored-transaction';
|
|
11
|
+
/** @category Types */
|
|
12
|
+
export type SendSponsoredTransactionFn = (input: SponsoredTransactionArgs, options?: {
|
|
13
|
+
onSuccess?: (data: SponsoredTransactionOutput) => void;
|
|
14
|
+
onError?: (error: Error) => void;
|
|
15
|
+
}) => Promise<SponsoredTransactionOutput>;
|
|
16
|
+
/**
|
|
17
|
+
* Feature identifier for sponsored transactions.
|
|
18
|
+
* Wallets implementing this feature can request gas sponsorship from
|
|
19
|
+
* the EVE Frontier sponsored-transaction backend service.
|
|
20
|
+
*
|
|
21
|
+
* TODO: This typedoc is not working when re-exported from wallet-core
|
|
22
|
+
* @category Wallet
|
|
23
|
+
*/
|
|
24
|
+
export type { SponsoredTransactionMetadata } from '@evefrontier/wallet-core/sponsored-transaction';
|
|
25
|
+
export { EVEFRONTIER_SPONSORED_TRANSACTION } from '@evefrontier/wallet-core/wallet-features';
|
|
26
|
+
//# sourceMappingURL=sponsoredTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sponsoredTransaction.d.ts","sourceRoot":"","sources":["../../types/sponsoredTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,WAAW,CAAA;AAElB;;;;;;;GAOG;AACH,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAA;AAE5F,sBAAsB;AACtB,MAAM,MAAM,0BAA0B,GAAG,CACvC,KAAK,EAAE,wBAAwB,EAC/B,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAA;IACtD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC,KACE,OAAO,CAAC,0BAA0B,CAAC,CAAA;AAMxC;;;;;;;GAOG;AACH,YAAY,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAA;AAElG,OAAO,EAAE,iCAAiC,EAAE,MAAM,0CAA0C,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available sponsored transaction actions
|
|
3
|
+
*
|
|
4
|
+
* @external SponsoredTransactionActions is defined in @evefrontier/wallet-core to ensure consistency between wallet and dapp-kit
|
|
5
|
+
* @category Types
|
|
6
|
+
*
|
|
7
|
+
* TODO: This typedoc is not working when re-exported from wallet-core
|
|
8
|
+
*/
|
|
9
|
+
export { SponsoredTransactionActions } from '@evefrontier/wallet-core/sponsored-transaction';
|
|
10
|
+
export { EVEFRONTIER_SPONSORED_TRANSACTION } from '@evefrontier/wallet-core/wallet-features';
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { SUI_GRAPHQL_NETWORKS } from '../utils/index.js';
|
|
2
|
+
/** @category Types */
|
|
3
|
+
export declare enum QueryParams {
|
|
4
|
+
ITEM_ID = "itemId",
|
|
5
|
+
TENANT = "tenant"
|
|
6
|
+
}
|
|
7
|
+
/** @category Types */
|
|
8
|
+
export type SuiGraphqlNetwork = (typeof SUI_GRAPHQL_NETWORKS)[number];
|
|
9
|
+
/** @category Types */
|
|
10
|
+
export declare enum State {
|
|
11
|
+
NULL = "NULL",
|
|
12
|
+
UNANCHORED = "UNANCHORED",
|
|
13
|
+
ANCHORED = "anchored",// Anchored + offline
|
|
14
|
+
ONLINE = "online",// Anchored + online
|
|
15
|
+
DESTROYED = "destroyed"
|
|
16
|
+
}
|
|
17
|
+
/** @category Types */
|
|
18
|
+
export declare enum ActionTypes {
|
|
19
|
+
UNANCHOR = "Unanchor",
|
|
20
|
+
ANCHOR = "Anchor",
|
|
21
|
+
BRING_ONLINE = "Online unit",
|
|
22
|
+
BRING_OFFLINE = "Offline unit",
|
|
23
|
+
DESTROY = "Destroy"
|
|
24
|
+
}
|
|
25
|
+
/** @category Types */
|
|
26
|
+
export declare enum Severity {
|
|
27
|
+
Error = "error",
|
|
28
|
+
Warning = "warning",
|
|
29
|
+
Info = "info",
|
|
30
|
+
Success = "success"
|
|
31
|
+
}
|
|
32
|
+
/** @category Types */
|
|
33
|
+
export interface Notify {
|
|
34
|
+
type: Severity;
|
|
35
|
+
message: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
namespace?: string;
|
|
38
|
+
namespaceLabel?: string;
|
|
39
|
+
}
|
|
40
|
+
/** @category Types */
|
|
41
|
+
export interface DetailedSmartCharacterResponse {
|
|
42
|
+
address: string;
|
|
43
|
+
name: string;
|
|
44
|
+
id: string;
|
|
45
|
+
tribeId: number;
|
|
46
|
+
portrait: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Game item/type information from the EVE Frontier Datahub API.
|
|
50
|
+
*
|
|
51
|
+
* Contains metadata about items, assemblies, and other game objects
|
|
52
|
+
* including display names, descriptions, icons, and physical properties.
|
|
53
|
+
*
|
|
54
|
+
* @category Types
|
|
55
|
+
*/
|
|
56
|
+
export interface DatahubGameInfo {
|
|
57
|
+
/** The type ID (matches on-chain type_id) */
|
|
58
|
+
id: number;
|
|
59
|
+
/** Display name of the item/type */
|
|
60
|
+
name: string;
|
|
61
|
+
/** Description text */
|
|
62
|
+
description: string;
|
|
63
|
+
/** Mass in kg */
|
|
64
|
+
mass: number;
|
|
65
|
+
/** Radius in meters */
|
|
66
|
+
radius: number;
|
|
67
|
+
/** Volume in cubic meters */
|
|
68
|
+
volume: number;
|
|
69
|
+
/** Portion size for stacking */
|
|
70
|
+
portionSize: number;
|
|
71
|
+
/** Category group name (e.g., "Structures") */
|
|
72
|
+
groupName: string;
|
|
73
|
+
/** Category group ID */
|
|
74
|
+
groupId: number;
|
|
75
|
+
/** Top-level category name */
|
|
76
|
+
categoryName: string;
|
|
77
|
+
/** Top-level category ID */
|
|
78
|
+
categoryId: number;
|
|
79
|
+
/** URL to the item's icon image */
|
|
80
|
+
iconUrl: string;
|
|
81
|
+
}
|
|
82
|
+
export type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug';
|
|
83
|
+
export type GlobalProcess = {
|
|
84
|
+
env?: Record<string, string | undefined>;
|
|
85
|
+
cwd?: () => string;
|
|
86
|
+
};
|
|
87
|
+
export type GlobalWithProcess = typeof globalThis & {
|
|
88
|
+
process?: GlobalProcess;
|
|
89
|
+
};
|
|
90
|
+
export interface StackFrame {
|
|
91
|
+
filePath: string;
|
|
92
|
+
lineNumber?: number;
|
|
93
|
+
columnNumber?: number;
|
|
94
|
+
}
|
|
95
|
+
export type LoggerFn = (...args: unknown[]) => void;
|
|
96
|
+
export interface Logger {
|
|
97
|
+
debug: LoggerFn;
|
|
98
|
+
info: LoggerFn;
|
|
99
|
+
warn: LoggerFn;
|
|
100
|
+
error: LoggerFn;
|
|
101
|
+
/**
|
|
102
|
+
* Create a scoped logger that inherits the current options.
|
|
103
|
+
*/
|
|
104
|
+
child: (scope: string) => Logger;
|
|
105
|
+
}
|
|
106
|
+
export interface CreateLoggerOptions {
|
|
107
|
+
scope?: string;
|
|
108
|
+
level?: LogLevel;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAMpD,sBAAsB;AACtB,oBAAY,WAAW;IACrB,OAAO,WAAW;IAClB,MAAM,WAAW;CAClB;AAED,sBAAsB;AACtB,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AAMrE,sBAAsB;AACtB,oBAAY,KAAK;IACf,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,QAAQ,aAAa,CAAE,qBAAqB;IAC5C,MAAM,WAAW,CAAE,oBAAoB;IACvC,SAAS,cAAc;CACxB;AAED,sBAAsB;AACtB,oBAAY,WAAW;IACrB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,YAAY,gBAAg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AAO,CAAA;AAErE,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IACxC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,UAAU,GAAG;IAClD,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,CAAA;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;AAEnD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,QAAQ,CAAA;IACf,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,QAAQ,CAAA;IACf;;OAEG;IACH,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,QAAQ,CAAA;CACjB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// =========================================
|
|
2
|
+
// Query Parameters
|
|
3
|
+
// =========================================
|
|
4
|
+
/** @category Types */
|
|
5
|
+
export var QueryParams;
|
|
6
|
+
(function (QueryParams) {
|
|
7
|
+
QueryParams["ITEM_ID"] = "itemId";
|
|
8
|
+
QueryParams["TENANT"] = "tenant";
|
|
9
|
+
})(QueryParams || (QueryParams = {}));
|
|
10
|
+
// =========================================
|
|
11
|
+
// Assembly State and Actions
|
|
12
|
+
// =========================================
|
|
13
|
+
/** @category Types */
|
|
14
|
+
export var State;
|
|
15
|
+
(function (State) {
|
|
16
|
+
State["NULL"] = "NULL";
|
|
17
|
+
State["UNANCHORED"] = "UNANCHORED";
|
|
18
|
+
State["ANCHORED"] = "anchored";
|
|
19
|
+
State["ONLINE"] = "online";
|
|
20
|
+
State["DESTROYED"] = "destroyed";
|
|
21
|
+
})(State || (State = {}));
|
|
22
|
+
/** @category Types */
|
|
23
|
+
export var ActionTypes;
|
|
24
|
+
(function (ActionTypes) {
|
|
25
|
+
ActionTypes["UNANCHOR"] = "Unanchor";
|
|
26
|
+
ActionTypes["ANCHOR"] = "Anchor";
|
|
27
|
+
ActionTypes["BRING_ONLINE"] = "Online unit";
|
|
28
|
+
ActionTypes["BRING_OFFLINE"] = "Offline unit";
|
|
29
|
+
ActionTypes["DESTROY"] = "Destroy";
|
|
30
|
+
})(ActionTypes || (ActionTypes = {}));
|
|
31
|
+
// =========================================
|
|
32
|
+
// UI Related Types
|
|
33
|
+
// =========================================
|
|
34
|
+
/** @category Types */
|
|
35
|
+
export var Severity;
|
|
36
|
+
(function (Severity) {
|
|
37
|
+
Severity["Error"] = "error";
|
|
38
|
+
Severity["Warning"] = "warning";
|
|
39
|
+
Severity["Info"] = "info";
|
|
40
|
+
Severity["Success"] = "success";
|
|
41
|
+
})(Severity || (Severity = {}));
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { MoveObjectData, RawSuiObjectData } from '../graphql/types.js';
|
|
2
|
+
import { type DatahubGameInfo, State } from './types.js';
|
|
3
|
+
/** @category Types */
|
|
4
|
+
export interface InventoryItem {
|
|
5
|
+
id: string;
|
|
6
|
+
item_id: string;
|
|
7
|
+
location: {
|
|
8
|
+
location_hash: string;
|
|
9
|
+
};
|
|
10
|
+
quantity: number;
|
|
11
|
+
tenant: string;
|
|
12
|
+
type_id: number;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
/** @category Types */
|
|
16
|
+
export interface EphemeralInventory {
|
|
17
|
+
ownerId: string;
|
|
18
|
+
ownerName: string;
|
|
19
|
+
storageCapacity: bigint;
|
|
20
|
+
usedCapacity: bigint;
|
|
21
|
+
ephemeralInventoryItems: InventoryItem[];
|
|
22
|
+
}
|
|
23
|
+
/** @category Types */
|
|
24
|
+
export interface StorageModule {
|
|
25
|
+
mainInventory: {
|
|
26
|
+
capacity: string;
|
|
27
|
+
usedCapacity: string;
|
|
28
|
+
items: InventoryItem[];
|
|
29
|
+
};
|
|
30
|
+
ephemeralInventories: EphemeralInventory[];
|
|
31
|
+
}
|
|
32
|
+
/** @category Types */
|
|
33
|
+
export type TurretModule = {};
|
|
34
|
+
/** @category Types */
|
|
35
|
+
export interface GateModule {
|
|
36
|
+
destinationId: string | undefined;
|
|
37
|
+
destinationGate: RawSuiObjectData | null;
|
|
38
|
+
}
|
|
39
|
+
/** @category Types */
|
|
40
|
+
export interface NetworkNodeModule {
|
|
41
|
+
fuel: FuelResponse;
|
|
42
|
+
energyProduction: number;
|
|
43
|
+
energyMaxCapacity: number;
|
|
44
|
+
totalReservedEnergy: number;
|
|
45
|
+
linkedAssemblies: SmartAssemblyResponse[];
|
|
46
|
+
}
|
|
47
|
+
/** @category Types */
|
|
48
|
+
export interface SmartAssemblyResponse {
|
|
49
|
+
id: string;
|
|
50
|
+
item_id: number;
|
|
51
|
+
type: string;
|
|
52
|
+
typeDetails?: DatahubGameInfo;
|
|
53
|
+
name: string;
|
|
54
|
+
state: State;
|
|
55
|
+
character?: SmartCharacterResponse;
|
|
56
|
+
solarSystem?: SolarSystem;
|
|
57
|
+
isParentNodeOnline?: boolean;
|
|
58
|
+
energySourceId?: string;
|
|
59
|
+
energyUsage: number;
|
|
60
|
+
typeId: number;
|
|
61
|
+
_raw?: MoveObjectData;
|
|
62
|
+
}
|
|
63
|
+
/** @category Types */
|
|
64
|
+
export interface DetailedAssemblyResponse extends SmartAssemblyResponse {
|
|
65
|
+
description: string;
|
|
66
|
+
dappURL: string;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=worldApiReturnTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AM,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,gBAAgB,EAAE,qBAAqB,EAAE,CAAA;CAC1C;AAyDD,sBAAsB;AACtB,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,CAAA;IACZ,SAAS,CAAC,EAAE,sBAAsB,CAAA;IAClC,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB;AAED,sBAAsB;AACtB,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { State } from './types.js';
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
const MS_PER_HOUR = 3600000;
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Result of adjusting raw burn time for efficiency.
|
|
5
3
|
* - burnTimePerUnitMs: efficiency-adjusted milliseconds to burn one unit
|
|
6
4
|
* - unitsPerHour: how many units are burned per hour at this rate
|
|
7
5
|
*/
|
|
8
6
|
export interface AdjustedBurnRate {
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
burnTimePerUnitMs: number;
|
|
8
|
+
unitsPerHour: number;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
10
|
/**
|
|
14
11
|
* Takes raw burn time (ms per unit at 100%) and efficiency (0–100 scale),
|
|
15
12
|
* returns efficiency-adjusted burn time per unit and units burned per hour.
|
|
@@ -20,27 +17,5 @@ export interface AdjustedBurnRate {
|
|
|
20
17
|
* @returns { burnTimePerUnitMs, unitsPerHour }
|
|
21
18
|
* @category Utilities - Formatting
|
|
22
19
|
*/
|
|
23
|
-
export function getAdjustedBurnRate(
|
|
24
|
-
|
|
25
|
-
efficiencyPercent: number | null | undefined,
|
|
26
|
-
): AdjustedBurnRate {
|
|
27
|
-
const raw =
|
|
28
|
-
Number.isFinite(rawBurnTimeMs) && rawBurnTimeMs >= 0 ? rawBurnTimeMs : 0;
|
|
29
|
-
|
|
30
|
-
const validEfficiency =
|
|
31
|
-
efficiencyPercent != null &&
|
|
32
|
-
Number.isFinite(efficiencyPercent) &&
|
|
33
|
-
efficiencyPercent > 0 &&
|
|
34
|
-
efficiencyPercent <= 100;
|
|
35
|
-
|
|
36
|
-
const burnTimePerUnitMs = validEfficiency
|
|
37
|
-
? raw * (efficiencyPercent / 100)
|
|
38
|
-
: raw;
|
|
39
|
-
|
|
40
|
-
const unitsPerHour =
|
|
41
|
-
burnTimePerUnitMs > 0 && Number.isFinite(burnTimePerUnitMs)
|
|
42
|
-
? MS_PER_HOUR / burnTimePerUnitMs
|
|
43
|
-
: 0;
|
|
44
|
-
|
|
45
|
-
return { burnTimePerUnitMs, unitsPerHour };
|
|
46
|
-
}
|
|
20
|
+
export declare function getAdjustedBurnRate(rawBurnTimeMs: number, efficiencyPercent: number | null | undefined): AdjustedBurnRate;
|
|
21
|
+
//# sourceMappingURL=burnRate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"burnRate.d.ts","sourceRoot":"","sources":["../../utils/burnRate.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC3C,gBAAgB,CAoBlB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const MS_PER_HOUR = 3600000;
|
|
2
|
+
/**
|
|
3
|
+
* Takes raw burn time (ms per unit at 100%) and efficiency (0–100 scale),
|
|
4
|
+
* returns efficiency-adjusted burn time per unit and units burned per hour.
|
|
5
|
+
* E.g. raw 3600000 ms, 90% efficient → burn time 3240000 ms, ~1.11 units/hour.
|
|
6
|
+
*
|
|
7
|
+
* @param rawBurnTimeMs - Milliseconds to burn one unit at 100% efficiency. If non-finite or negative, treated as 0 so both returned fields are finite and consistent.
|
|
8
|
+
* @param efficiencyPercent - Efficiency as percentage on a 0–100 scale (e.g. 90 for 90%). Values outside [0, 100] are treated as invalid; when null/undefined, not finite, ≤0, or >100, raw is used as-is for burn time.
|
|
9
|
+
* @returns { burnTimePerUnitMs, unitsPerHour }
|
|
10
|
+
* @category Utilities - Formatting
|
|
11
|
+
*/
|
|
12
|
+
export function getAdjustedBurnRate(rawBurnTimeMs, efficiencyPercent) {
|
|
13
|
+
const raw = Number.isFinite(rawBurnTimeMs) && rawBurnTimeMs >= 0 ? rawBurnTimeMs : 0;
|
|
14
|
+
const validEfficiency = efficiencyPercent != null &&
|
|
15
|
+
Number.isFinite(efficiencyPercent) &&
|
|
16
|
+
efficiencyPercent > 0 &&
|
|
17
|
+
efficiencyPercent <= 100;
|
|
18
|
+
const burnTimePerUnitMs = validEfficiency
|
|
19
|
+
? raw * (efficiencyPercent / 100)
|
|
20
|
+
: raw;
|
|
21
|
+
const unitsPerHour = burnTimePerUnitMs > 0 && Number.isFinite(burnTimePerUnitMs)
|
|
22
|
+
? MS_PER_HOUR / burnTimePerUnitMs
|
|
23
|
+
: 0;
|
|
24
|
+
return { burnTimePerUnitMs, unitsPerHour };
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CharacterSummary } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the list of every character from world events: `CharacterCreated`
|
|
4
|
+
* gives the character's wallet, and the latest `MetadataChanged`
|
|
5
|
+
* for that character gives its name. There is no on-chain name index, so the
|
|
6
|
+
* whole list is fetched and searched client-side.
|
|
7
|
+
*
|
|
8
|
+
* @category Utilities - Characters
|
|
9
|
+
* @param tenant - Tenant whose tier to use when VITE_EVE_WORLD_TIER is unset
|
|
10
|
+
* @returns Every character, in creation order
|
|
11
|
+
* @throws If a GraphQL response has errors
|
|
12
|
+
*/
|
|
13
|
+
export declare function fetchCharacterDirectory(tenant?: string): Promise<CharacterSummary[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Searches characters by name, case-insensitively, with prefix matches first.
|
|
16
|
+
* A query starting with `0x` matches nothing: an address is not searched, it
|
|
17
|
+
* is entered in full.
|
|
18
|
+
*
|
|
19
|
+
* @category Utilities - Characters
|
|
20
|
+
* @param characters - From {@link fetchCharacterDirectory}
|
|
21
|
+
* @param query - Search text
|
|
22
|
+
* @param limit - Maximum number of results
|
|
23
|
+
* @returns Matching characters
|
|
24
|
+
*/
|
|
25
|
+
export declare function searchCharacters(characters: CharacterSummary[], query: string, limit?: number): CharacterSummary[];
|
|
26
|
+
//# sourceMappingURL=characters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"characters.d.ts","sourceRoot":"","sources":["../../utils/characters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAgChD;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA2B7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,gBAAgB,EAAE,EAC9B,KAAK,EAAE,MAAM,EACb,KAAK,SAAK,GACT,gBAAgB,EAAE,CAYpB"}
|