@antseed/ants 0.1.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/LICENSE +674 -0
- package/dist/ants-web/assets/index-BunPfgXh.css +1 -0
- package/dist/ants-web/assets/index-zCPoF694.js +40 -0
- package/dist/ants-web/index.html +13 -0
- package/dist/api-types.d.ts +400 -0
- package/dist/api-types.js +8 -0
- package/dist/api-types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs.d.ts +23 -0
- package/dist/jobs.js +70 -0
- package/dist/jobs.js.map +1 -0
- package/dist/routes.d.ts +12 -0
- package/dist/routes.js +64 -0
- package/dist/routes.js.map +1 -0
- package/dist/server.d.ts +29 -0
- package/dist/server.js +90 -0
- package/dist/server.js.map +1 -0
- package/dist/service/context.d.ts +146 -0
- package/dist/service/context.js +321 -0
- package/dist/service/context.js.map +1 -0
- package/dist/service/emissions.d.ts +3 -0
- package/dist/service/emissions.js +62 -0
- package/dist/service/emissions.js.map +1 -0
- package/dist/service/explorer.d.ts +9 -0
- package/dist/service/explorer.js +44 -0
- package/dist/service/explorer.js.map +1 -0
- package/dist/service/format.d.ts +8 -0
- package/dist/service/format.js +41 -0
- package/dist/service/format.js.map +1 -0
- package/dist/service/index.d.ts +20 -0
- package/dist/service/index.js +15 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/indexer.d.ts +150 -0
- package/dist/service/indexer.js +189 -0
- package/dist/service/indexer.js.map +1 -0
- package/dist/service/json.d.ts +3 -0
- package/dist/service/json.js +8 -0
- package/dist/service/json.js.map +1 -0
- package/dist/service/overview.d.ts +9 -0
- package/dist/service/overview.js +98 -0
- package/dist/service/overview.js.map +1 -0
- package/dist/service/pool-merge.d.ts +26 -0
- package/dist/service/pool-merge.js +101 -0
- package/dist/service/pool-merge.js.map +1 -0
- package/dist/service/pools.d.ts +12 -0
- package/dist/service/pools.js +287 -0
- package/dist/service/pools.js.map +1 -0
- package/dist/service/positions.d.ts +62 -0
- package/dist/service/positions.js +281 -0
- package/dist/service/positions.js.map +1 -0
- package/dist/service/rate-limit.d.ts +17 -0
- package/dist/service/rate-limit.js +42 -0
- package/dist/service/rate-limit.js.map +1 -0
- package/dist/service/rewards.d.ts +46 -0
- package/dist/service/rewards.js +399 -0
- package/dist/service/rewards.js.map +1 -0
- package/dist/service/rpc-provider.d.ts +31 -0
- package/dist/service/rpc-provider.js +99 -0
- package/dist/service/rpc-provider.js.map +1 -0
- package/dist/service/seller.d.ts +14 -0
- package/dist/service/seller.js +104 -0
- package/dist/service/seller.js.map +1 -0
- package/dist/service/steps.d.ts +6 -0
- package/dist/service/steps.js +24 -0
- package/dist/service/steps.js.map +1 -0
- package/dist/service/usage.d.ts +10 -0
- package/dist/service/usage.js +77 -0
- package/dist/service/usage.js.map +1 -0
- package/dist/service/verification.d.ts +12 -0
- package/dist/service/verification.js +69 -0
- package/dist/service/verification.js.map +1 -0
- package/dist/view-cache.d.ts +18 -0
- package/dist/view-cache.js +39 -0
- package/dist/view-cache.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>ANTS · AntSeed staking</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-zCPoF694.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BunPfgXh.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire contract between the ANTS dashboard server and its web client. Every
|
|
3
|
+
* on-chain amount is a decimal string in base units (ANTS: 18 decimals, USDC:
|
|
4
|
+
* 6 decimals) so the JSON survives without bigint support. The same shapes
|
|
5
|
+
* are printed by the CLI's `--json` flags.
|
|
6
|
+
*/
|
|
7
|
+
export type ProtocolPhase = 'legacy' | 'deployed' | 'active';
|
|
8
|
+
export interface EpochInfo {
|
|
9
|
+
current: number;
|
|
10
|
+
/** First recognized-usage epoch (gate `effectiveEpoch`), null before the stack is deployed. */
|
|
11
|
+
effective: number | null;
|
|
12
|
+
genesis: number;
|
|
13
|
+
epochDuration: number;
|
|
14
|
+
nextBoundaryAt: number;
|
|
15
|
+
secondsToBoundary: number;
|
|
16
|
+
}
|
|
17
|
+
export interface WalletSummary {
|
|
18
|
+
address: string;
|
|
19
|
+
ants: string;
|
|
20
|
+
eth: string;
|
|
21
|
+
transfersEnabled: boolean;
|
|
22
|
+
whitelisted: boolean;
|
|
23
|
+
canTransfer: boolean;
|
|
24
|
+
totalActiveStake: string;
|
|
25
|
+
positionCount: number;
|
|
26
|
+
agentId: number;
|
|
27
|
+
sellerBound: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface NetworkSummary {
|
|
30
|
+
totalActiveStake: string;
|
|
31
|
+
totalPowerWeight: string;
|
|
32
|
+
epochEmission: string;
|
|
33
|
+
stakerBudget: string;
|
|
34
|
+
usageBuyerBudget: string;
|
|
35
|
+
usageSellerBudget: string;
|
|
36
|
+
antsTotalSupply: string;
|
|
37
|
+
antsMaxSupply: string;
|
|
38
|
+
}
|
|
39
|
+
export interface OverviewView {
|
|
40
|
+
phase: ProtocolPhase;
|
|
41
|
+
chainId: string;
|
|
42
|
+
evmChainId: number;
|
|
43
|
+
rpcUrl: string;
|
|
44
|
+
addresses: Record<string, string>;
|
|
45
|
+
epoch: EpochInfo;
|
|
46
|
+
wallet: WalletSummary;
|
|
47
|
+
network: NetworkSummary | null;
|
|
48
|
+
notices: string[];
|
|
49
|
+
}
|
|
50
|
+
export type PositionState = 'pending' | 'active' | 'matured' | 'closed' | 'withdrawn';
|
|
51
|
+
export interface PositionView {
|
|
52
|
+
id: number;
|
|
53
|
+
/** Why a closed position closed and what replaced it (indexer-sourced rows only). */
|
|
54
|
+
closedBy?: 'split' | 'merge' | 'move' | 'withdraw' | null;
|
|
55
|
+
replacementIds?: number[];
|
|
56
|
+
agentId: number;
|
|
57
|
+
owner: string;
|
|
58
|
+
amount: string;
|
|
59
|
+
weightAmount: string;
|
|
60
|
+
stakeStartEpoch: number;
|
|
61
|
+
stakeEndEpoch: number;
|
|
62
|
+
closedAtEpoch: number;
|
|
63
|
+
withdrawn: boolean;
|
|
64
|
+
state: PositionState;
|
|
65
|
+
withdrawableEpoch: number;
|
|
66
|
+
changePending: boolean;
|
|
67
|
+
maxLocked: boolean;
|
|
68
|
+
/** On-chain early-exit slash for a withdrawal now; null while a change is pending (projected value is in `projectedSlashBps`). */
|
|
69
|
+
slashBps: number | null;
|
|
70
|
+
projectedSlashBps: number;
|
|
71
|
+
slashedAmount: string;
|
|
72
|
+
returnedAmount: string;
|
|
73
|
+
pendingReward: string;
|
|
74
|
+
epochsRemaining: number;
|
|
75
|
+
}
|
|
76
|
+
export interface PoolConfigView {
|
|
77
|
+
minStakeEpochs: number;
|
|
78
|
+
maxStakeEpochs: number;
|
|
79
|
+
stakeActivationDelay: number;
|
|
80
|
+
maxSlashBps: number;
|
|
81
|
+
minEarlyExitSlashBps: number;
|
|
82
|
+
restakedRewardWeightBonusBps: number;
|
|
83
|
+
moveWeightPenaltyBps: number;
|
|
84
|
+
}
|
|
85
|
+
export type DataSource = 'indexer' | 'chain';
|
|
86
|
+
export interface PositionsView {
|
|
87
|
+
currentEpoch: number;
|
|
88
|
+
config: PoolConfigView;
|
|
89
|
+
/** Open positions from the chain; closed ones (split, merge, move sources) from the indexer when available. */
|
|
90
|
+
positions: PositionView[];
|
|
91
|
+
totals: {
|
|
92
|
+
activeStake: string;
|
|
93
|
+
pendingRewards: string;
|
|
94
|
+
open: number;
|
|
95
|
+
};
|
|
96
|
+
/** Where closed positions came from; 'chain' means only open positions are listed. */
|
|
97
|
+
historySource: DataSource;
|
|
98
|
+
}
|
|
99
|
+
export interface EpochAmount {
|
|
100
|
+
epoch: number;
|
|
101
|
+
amount: string;
|
|
102
|
+
claimed?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface RewardsView {
|
|
105
|
+
currentEpoch: number;
|
|
106
|
+
firstRewardedEpoch: number | null;
|
|
107
|
+
staker: {
|
|
108
|
+
total: string;
|
|
109
|
+
positions: Array<{
|
|
110
|
+
id: number;
|
|
111
|
+
agentId: number;
|
|
112
|
+
amount: string;
|
|
113
|
+
closed: boolean;
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
116
|
+
sellerUsage: {
|
|
117
|
+
total: string;
|
|
118
|
+
agentId: number;
|
|
119
|
+
epochs: EpochAmount[];
|
|
120
|
+
claimable: boolean;
|
|
121
|
+
};
|
|
122
|
+
buyerUsage: {
|
|
123
|
+
total: string;
|
|
124
|
+
epochs: EpochAmount[];
|
|
125
|
+
operator: string | null;
|
|
126
|
+
claimable: boolean;
|
|
127
|
+
recipient: string | null;
|
|
128
|
+
};
|
|
129
|
+
legacy: {
|
|
130
|
+
seller: string;
|
|
131
|
+
buyer: string;
|
|
132
|
+
contract: string | null;
|
|
133
|
+
buyerClaimable: boolean;
|
|
134
|
+
};
|
|
135
|
+
locked: {
|
|
136
|
+
locked: string;
|
|
137
|
+
claimable: string;
|
|
138
|
+
policy: string | null;
|
|
139
|
+
pool: string | null;
|
|
140
|
+
};
|
|
141
|
+
total: string;
|
|
142
|
+
}
|
|
143
|
+
/** One epoch's settled USDC volume for a seller (6 decimals). */
|
|
144
|
+
export interface EpochVolume {
|
|
145
|
+
epoch: number;
|
|
146
|
+
usdc: string;
|
|
147
|
+
}
|
|
148
|
+
/** Explorer-sourced seller profile (Antscan); null fields when the explorer has no record. */
|
|
149
|
+
export interface SellerProfile {
|
|
150
|
+
name: string | null;
|
|
151
|
+
providers: string[];
|
|
152
|
+
modelsServed: number | null;
|
|
153
|
+
uniqueBuyers: number | null;
|
|
154
|
+
requestCount: string | null;
|
|
155
|
+
lifetimeVolumeUsdc: string | null;
|
|
156
|
+
ghostRate: number | null;
|
|
157
|
+
lastSettledAt: number | null;
|
|
158
|
+
}
|
|
159
|
+
export interface PoolView {
|
|
160
|
+
agentId: number;
|
|
161
|
+
seller: string | null;
|
|
162
|
+
profile: SellerProfile | null;
|
|
163
|
+
hasPool: boolean;
|
|
164
|
+
/** Whether a seller binding exists so `stake` into this agent will succeed. */
|
|
165
|
+
stakeable: boolean;
|
|
166
|
+
activeStake: string;
|
|
167
|
+
/** Pool power (weight) this epoch. */
|
|
168
|
+
weight: string;
|
|
169
|
+
/** Pool power as a share of all pools' power this epoch. */
|
|
170
|
+
powerShareBps: number;
|
|
171
|
+
securityShareBps: number;
|
|
172
|
+
/** Settled USDC volume: current epoch first, then previous epochs. */
|
|
173
|
+
volumes: EpochVolume[];
|
|
174
|
+
usagePoints: string;
|
|
175
|
+
weightedUsagePoints: string;
|
|
176
|
+
lastEpochUsagePoints: string;
|
|
177
|
+
/** Last epoch's staker emission for the pool; estimated from usage until a claim settles it. */
|
|
178
|
+
lastEpochEmission: string | null;
|
|
179
|
+
lastEpochEmissionSettled: boolean;
|
|
180
|
+
/** Staker ANTS per 1,000 units of pool power last epoch (estimated until settled; null with no usage). */
|
|
181
|
+
lastEpochRewardPer1kPower: string | null;
|
|
182
|
+
/** Projected staker ANTS per 1,000 units of pool power this epoch from current usage. */
|
|
183
|
+
projectedRewardPer1kPower: string | null;
|
|
184
|
+
yourStake: string;
|
|
185
|
+
/** Your power in this pool this epoch (sum of your positions' weight). */
|
|
186
|
+
yourPower: string;
|
|
187
|
+
/** Your power as a share of the pool's power. */
|
|
188
|
+
yourPoolShareBps: number;
|
|
189
|
+
yourPositionIds: number[];
|
|
190
|
+
}
|
|
191
|
+
export interface PoolsView {
|
|
192
|
+
currentEpoch: number;
|
|
193
|
+
firstRewardedEpoch: number | null;
|
|
194
|
+
totalActiveStake: string;
|
|
195
|
+
totalPowerWeight: string;
|
|
196
|
+
/** Network settled USDC volume for the same epochs as each pool's `volumes`. */
|
|
197
|
+
networkVolumes: EpochVolume[];
|
|
198
|
+
stakerBudget: string;
|
|
199
|
+
yourTotalPower: string;
|
|
200
|
+
/** Your power as a share of all pools' power. */
|
|
201
|
+
yourNetworkShareBps: number;
|
|
202
|
+
explorer: string | null;
|
|
203
|
+
/** 'indexer' = full pool statistics from the explorer; 'chain' = only the pools this wallet stakes in, read live. */
|
|
204
|
+
source: DataSource;
|
|
205
|
+
sourceError: string | null;
|
|
206
|
+
pools: PoolView[];
|
|
207
|
+
}
|
|
208
|
+
export interface UsageEpochView {
|
|
209
|
+
epoch: number;
|
|
210
|
+
buyerPoints: string;
|
|
211
|
+
weightedBuyerPoints: string;
|
|
212
|
+
sellerPoints: string;
|
|
213
|
+
agentId: number;
|
|
214
|
+
totalBuyerPoints: string;
|
|
215
|
+
totalSellerPoints: string;
|
|
216
|
+
totalPoolPoints: string;
|
|
217
|
+
totalWeightedPoolPoints: string;
|
|
218
|
+
}
|
|
219
|
+
export interface UsageView {
|
|
220
|
+
currentEpoch: number;
|
|
221
|
+
firstRewardedEpoch: number | null;
|
|
222
|
+
epochs: UsageEpochView[];
|
|
223
|
+
totals: {
|
|
224
|
+
buyerPoints: string;
|
|
225
|
+
buyerWeightedPoints: string;
|
|
226
|
+
networkBuyerPoints: string;
|
|
227
|
+
networkSellerPoints: string;
|
|
228
|
+
};
|
|
229
|
+
pointsPolicy: string | null;
|
|
230
|
+
poolWeightPolicy: string | null;
|
|
231
|
+
minimumAccountedPoolPower: string | null;
|
|
232
|
+
/** Per-epoch rows come from the indexer; without one the list is empty. */
|
|
233
|
+
source: DataSource;
|
|
234
|
+
sourceError: string | null;
|
|
235
|
+
}
|
|
236
|
+
/** `shareBps` is a share of the epoch emission in `EmissionsView.shareDenominator` units (100,000 = 100%). */
|
|
237
|
+
export interface MinterView {
|
|
238
|
+
name: string;
|
|
239
|
+
id: string;
|
|
240
|
+
controller: string;
|
|
241
|
+
shareBps: number;
|
|
242
|
+
editable: boolean;
|
|
243
|
+
epochBudget: string;
|
|
244
|
+
}
|
|
245
|
+
export interface EmissionsView {
|
|
246
|
+
currentEpoch: number;
|
|
247
|
+
effectiveEpoch: number | null;
|
|
248
|
+
genesis: number;
|
|
249
|
+
epochDuration: number;
|
|
250
|
+
halvingInterval: number;
|
|
251
|
+
initialEmission: string;
|
|
252
|
+
currentRate: string;
|
|
253
|
+
cumulativeThroughCurrent: string;
|
|
254
|
+
shareDenominator: number;
|
|
255
|
+
minters: MinterView[];
|
|
256
|
+
emissionsReserve: string | null;
|
|
257
|
+
legacyEscrow: string | null;
|
|
258
|
+
/** Share values below use `shareDenominator` units of the epoch emission, not basis points. */
|
|
259
|
+
dynamicStaker: {
|
|
260
|
+
minShareBps: number;
|
|
261
|
+
maxShareBps: number;
|
|
262
|
+
stakeShareTarget: string;
|
|
263
|
+
} | null;
|
|
264
|
+
dynamicUsage: {
|
|
265
|
+
buyerMinShareBps: number;
|
|
266
|
+
buyerMaxShareBps: number;
|
|
267
|
+
sellerMinShareBps: number;
|
|
268
|
+
sellerMaxShareBps: number;
|
|
269
|
+
volumeShareTarget: string;
|
|
270
|
+
} | null;
|
|
271
|
+
legacy: {
|
|
272
|
+
contract: string;
|
|
273
|
+
sellerPct: number;
|
|
274
|
+
buyerPct: number;
|
|
275
|
+
reservePct: number;
|
|
276
|
+
teamPct: number;
|
|
277
|
+
currentEpoch: number;
|
|
278
|
+
} | null;
|
|
279
|
+
}
|
|
280
|
+
export interface VerificationView {
|
|
281
|
+
registry: {
|
|
282
|
+
address: string;
|
|
283
|
+
verifier: string;
|
|
284
|
+
verifierHash: string;
|
|
285
|
+
blockhashStore: string;
|
|
286
|
+
sellerProgramVKey: string;
|
|
287
|
+
periodStartBlock: number;
|
|
288
|
+
periodEndBlock: number;
|
|
289
|
+
thresholdBps: number;
|
|
290
|
+
} | null;
|
|
291
|
+
seller: {
|
|
292
|
+
seller: string;
|
|
293
|
+
provenWashVolume: string;
|
|
294
|
+
totalSellerVolume: string;
|
|
295
|
+
provenWashShareBps: number;
|
|
296
|
+
evidenceDigest: string;
|
|
297
|
+
isProvenWashTrader: boolean;
|
|
298
|
+
} | null;
|
|
299
|
+
policies: Array<{
|
|
300
|
+
address: string;
|
|
301
|
+
washTradingRegistry: string | null;
|
|
302
|
+
}>;
|
|
303
|
+
pointsPolicy: string | null;
|
|
304
|
+
enforced: boolean;
|
|
305
|
+
}
|
|
306
|
+
export interface ProofStatusView {
|
|
307
|
+
proofId: string;
|
|
308
|
+
staged: boolean;
|
|
309
|
+
finalized: boolean;
|
|
310
|
+
authenticatedBlockReferenceCount: number;
|
|
311
|
+
authenticatedBlockChunkCount: number;
|
|
312
|
+
}
|
|
313
|
+
export interface SellerView {
|
|
314
|
+
address: string;
|
|
315
|
+
agentId: number;
|
|
316
|
+
identityRegistered: boolean;
|
|
317
|
+
registryBound: boolean;
|
|
318
|
+
eligible: boolean;
|
|
319
|
+
legacyStake: string;
|
|
320
|
+
legacyEligibilityEnabled: boolean | null;
|
|
321
|
+
minPoolStake: string | null;
|
|
322
|
+
poolActiveStake: string;
|
|
323
|
+
starter: {
|
|
324
|
+
contract: string | null;
|
|
325
|
+
initialized: boolean;
|
|
326
|
+
remaining: string;
|
|
327
|
+
amount: string;
|
|
328
|
+
endEpoch: number;
|
|
329
|
+
legacyEligible: boolean;
|
|
330
|
+
expired: boolean;
|
|
331
|
+
claimable: boolean;
|
|
332
|
+
} | null;
|
|
333
|
+
}
|
|
334
|
+
export interface JobStep {
|
|
335
|
+
at: number;
|
|
336
|
+
label: string;
|
|
337
|
+
hash?: string;
|
|
338
|
+
}
|
|
339
|
+
export interface JobView {
|
|
340
|
+
id: string;
|
|
341
|
+
kind: string;
|
|
342
|
+
status: 'running' | 'done' | 'failed';
|
|
343
|
+
steps: JobStep[];
|
|
344
|
+
result?: unknown;
|
|
345
|
+
error?: string;
|
|
346
|
+
startedAt: number;
|
|
347
|
+
finishedAt?: number;
|
|
348
|
+
}
|
|
349
|
+
export interface StakeRequest {
|
|
350
|
+
agentId: number;
|
|
351
|
+
amount: string;
|
|
352
|
+
epochs: number;
|
|
353
|
+
}
|
|
354
|
+
export interface MoveRequest {
|
|
355
|
+
positionIds: number[];
|
|
356
|
+
toAgentId: number;
|
|
357
|
+
}
|
|
358
|
+
export interface SplitRequest {
|
|
359
|
+
positionId: number;
|
|
360
|
+
amount: string;
|
|
361
|
+
}
|
|
362
|
+
export interface MergeRequest {
|
|
363
|
+
positionIds: number[];
|
|
364
|
+
}
|
|
365
|
+
export interface ExtendRequest {
|
|
366
|
+
positionId: number;
|
|
367
|
+
epochs: number;
|
|
368
|
+
}
|
|
369
|
+
export interface MaxLockRequest {
|
|
370
|
+
positionId: number;
|
|
371
|
+
enable: boolean;
|
|
372
|
+
}
|
|
373
|
+
export interface WithdrawRequest {
|
|
374
|
+
positionIds: number[];
|
|
375
|
+
acceptSlashing: boolean;
|
|
376
|
+
maxSlashedAmount?: string;
|
|
377
|
+
}
|
|
378
|
+
export type RewardBucket = 'staker' | 'seller' | 'buyer' | 'legacy' | 'locked';
|
|
379
|
+
export interface ClaimRequest {
|
|
380
|
+
buckets: RewardBucket[];
|
|
381
|
+
recipient?: string;
|
|
382
|
+
}
|
|
383
|
+
export interface RestakeRequest {
|
|
384
|
+
positionIds?: number[];
|
|
385
|
+
epochs: number;
|
|
386
|
+
}
|
|
387
|
+
export interface StakeUsageRequest {
|
|
388
|
+
side: 'seller' | 'buyer';
|
|
389
|
+
epochs: number;
|
|
390
|
+
stakeAgentId?: number;
|
|
391
|
+
}
|
|
392
|
+
/** Restake staker + seller usage (+ buyer usage when operator) rewards in one job; `targetAgentId` moves the new positions into that pool. */
|
|
393
|
+
export interface CompoundRequest {
|
|
394
|
+
epochs: number;
|
|
395
|
+
targetAgentId?: number;
|
|
396
|
+
stakeAgentId?: number;
|
|
397
|
+
}
|
|
398
|
+
export interface SubmitProofRequest {
|
|
399
|
+
artifact: unknown;
|
|
400
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire contract between the ANTS dashboard server and its web client. Every
|
|
3
|
+
* on-chain amount is a decimal string in base units (ANTS: 18 decimals, USDC:
|
|
4
|
+
* 6 decimals) so the JSON survives without bigint support. The same shapes
|
|
5
|
+
* are printed by the CLI's `--json` flags.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=api-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-types.js","sourceRoot":"","sources":["../src/api-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { pathToFileURL } from 'node:url';
|
|
2
|
+
import { createAntsServer } from './server.js';
|
|
3
|
+
export { createAntsServer, resolveAntsChain } from './server.js';
|
|
4
|
+
export * from './service/index.js';
|
|
5
|
+
const DEFAULT_PORT = 3119;
|
|
6
|
+
const isMain = process.argv[1] ? import.meta.url === pathToFileURL(process.argv[1]).href : false;
|
|
7
|
+
if (isMain) {
|
|
8
|
+
const port = Number(process.env['ANTSEED_ANTS_PORT']) || DEFAULT_PORT;
|
|
9
|
+
createAntsServer({ port, dataDir: process.env['ANTSEED_DATA_DIR'] || undefined }).then(async (server) => {
|
|
10
|
+
const url = await server.listen();
|
|
11
|
+
console.log(`[ants] Dashboard running at ${url}`);
|
|
12
|
+
}).catch((error) => {
|
|
13
|
+
console.error('[ants] Failed to start:', error);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEjE,cAAc,oBAAoB,CAAC;AAEnC,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAEjG,IAAI,MAAM,EAAE,CAAC;IACX,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,IAAI,YAAY,CAAC;IACtE,gBAAgB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACtG,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACjB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/jobs.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { JobView } from './api-types.js';
|
|
2
|
+
import type { StepReporter } from './service/steps.js';
|
|
3
|
+
/**
|
|
4
|
+
* In-memory job runner for multi-transaction actions. The dashboard starts a
|
|
5
|
+
* job, then polls it for step-by-step progress (transaction hashes included)
|
|
6
|
+
* instead of holding one HTTP request open across several confirmations.
|
|
7
|
+
*/
|
|
8
|
+
export declare class JobRunner {
|
|
9
|
+
private readonly options;
|
|
10
|
+
private readonly jobs;
|
|
11
|
+
private active;
|
|
12
|
+
/** `onFinish` runs after every job, successful or not, before its final status is visible. */
|
|
13
|
+
constructor(options?: {
|
|
14
|
+
onFinish?: () => void;
|
|
15
|
+
});
|
|
16
|
+
list(): JobView[];
|
|
17
|
+
get(id: string): JobView | undefined;
|
|
18
|
+
/** Run `work` as a job. Only one signing job runs at a time so nonces stay ordered. */
|
|
19
|
+
start(kind: string, work: (report: StepReporter) => Promise<unknown>): JobView;
|
|
20
|
+
private prune;
|
|
21
|
+
}
|
|
22
|
+
/** Turn ethers/RPC errors into one readable line. */
|
|
23
|
+
export declare function describeError(error: unknown): string;
|
package/dist/jobs.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
const JOB_RETENTION_MS = 30 * 60 * 1000;
|
|
3
|
+
/**
|
|
4
|
+
* In-memory job runner for multi-transaction actions. The dashboard starts a
|
|
5
|
+
* job, then polls it for step-by-step progress (transaction hashes included)
|
|
6
|
+
* instead of holding one HTTP request open across several confirmations.
|
|
7
|
+
*/
|
|
8
|
+
export class JobRunner {
|
|
9
|
+
options;
|
|
10
|
+
jobs = new Map();
|
|
11
|
+
active = null;
|
|
12
|
+
/** `onFinish` runs after every job, successful or not, before its final status is visible. */
|
|
13
|
+
constructor(options = {}) {
|
|
14
|
+
this.options = options;
|
|
15
|
+
}
|
|
16
|
+
list() {
|
|
17
|
+
this.prune();
|
|
18
|
+
return [...this.jobs.values()].sort((a, b) => b.startedAt - a.startedAt);
|
|
19
|
+
}
|
|
20
|
+
get(id) {
|
|
21
|
+
this.prune();
|
|
22
|
+
return this.jobs.get(id);
|
|
23
|
+
}
|
|
24
|
+
/** Run `work` as a job. Only one signing job runs at a time so nonces stay ordered. */
|
|
25
|
+
start(kind, work) {
|
|
26
|
+
if (this.active && this.jobs.get(this.active)?.status === 'running') {
|
|
27
|
+
throw new Error(`Another action (${this.jobs.get(this.active)?.kind}) is still running. Wait for it to finish.`);
|
|
28
|
+
}
|
|
29
|
+
const job = { id: randomUUID(), kind, status: 'running', steps: [], startedAt: Date.now() };
|
|
30
|
+
this.jobs.set(job.id, job);
|
|
31
|
+
this.active = job.id;
|
|
32
|
+
const report = (label, hash) => {
|
|
33
|
+
const step = { at: Date.now(), label, ...(hash ? { hash } : {}) };
|
|
34
|
+
job.steps.push(step);
|
|
35
|
+
};
|
|
36
|
+
void work(report).then((result) => {
|
|
37
|
+
this.options.onFinish?.();
|
|
38
|
+
job.status = 'done';
|
|
39
|
+
job.result = result;
|
|
40
|
+
job.finishedAt = Date.now();
|
|
41
|
+
}, (error) => {
|
|
42
|
+
this.options.onFinish?.();
|
|
43
|
+
job.status = 'failed';
|
|
44
|
+
job.error = describeError(error);
|
|
45
|
+
job.finishedAt = Date.now();
|
|
46
|
+
}).finally(() => {
|
|
47
|
+
if (this.active === job.id)
|
|
48
|
+
this.active = null;
|
|
49
|
+
});
|
|
50
|
+
return job;
|
|
51
|
+
}
|
|
52
|
+
prune() {
|
|
53
|
+
const cutoff = Date.now() - JOB_RETENTION_MS;
|
|
54
|
+
for (const [id, job] of this.jobs) {
|
|
55
|
+
if (job.status !== 'running' && (job.finishedAt ?? job.startedAt) < cutoff)
|
|
56
|
+
this.jobs.delete(id);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Turn ethers/RPC errors into one readable line. */
|
|
61
|
+
export function describeError(error) {
|
|
62
|
+
if (!(error instanceof Error))
|
|
63
|
+
return String(error);
|
|
64
|
+
const candidate = error;
|
|
65
|
+
const revert = candidate.reason ?? candidate.info?.error?.message;
|
|
66
|
+
if (revert && revert !== candidate.message)
|
|
67
|
+
return `${candidate.shortMessage ?? candidate.message} (${revert})`;
|
|
68
|
+
return candidate.shortMessage ?? candidate.message;
|
|
69
|
+
}
|
|
70
|
+
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AAG,IAAI,CAAC;QACjD,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACb,CAAC;IAEO,KAAK;QACX,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,gBAAgB,CAAC;QAC7C,KAAK,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAClC,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM;gBAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACnG,CAAC;IACH,CAAC;CACF;AAED,qDAAqD;AACrD,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,SAAS,GAAG,KAAmH,CAAC;IACtI,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC;IAClE,IAAI,MAAM,IAAI,MAAM,KAAK,SAAS,CAAC,OAAO;QAAE,OAAO,GAAG,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,OAAO,KAAK,MAAM,GAAG,CAAC;IAChH,OAAO,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC;AACrD,CAAC"}
|
package/dist/routes.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FastifyInstance } from 'fastify';
|
|
2
|
+
import type { AntsContext } from './service/context.js';
|
|
3
|
+
import { JobRunner } from './jobs.js';
|
|
4
|
+
import type { ViewCache } from './view-cache.js';
|
|
5
|
+
export interface RouteContext {
|
|
6
|
+
ctx: AntsContext;
|
|
7
|
+
jobs: JobRunner;
|
|
8
|
+
views: ViewCache;
|
|
9
|
+
readOnly: boolean;
|
|
10
|
+
dataDir: string | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function registerRoutes(app: FastifyInstance, context: RouteContext): void;
|
package/dist/routes.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { describeError } from './jobs.js';
|
|
2
|
+
import { overview, positions, stake, move, split, merge, extend, maxLock, previewWithdraw, withdraw, rewards, claim, restake, stakeUsageRewards, compound, poolsView, singlePool, usage, emissions, verification, proofStatus, submitProof, seller, registerBinding, claimStarter, } from './service/index.js';
|
|
3
|
+
async function respond(reply, read) {
|
|
4
|
+
try {
|
|
5
|
+
reply.send({ ok: true, data: await read() });
|
|
6
|
+
}
|
|
7
|
+
catch (error) {
|
|
8
|
+
reply.status(400).send({ ok: false, error: describeError(error) });
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export function registerRoutes(app, context) {
|
|
12
|
+
const { ctx, jobs, views } = context;
|
|
13
|
+
const cached = (key, load) => views.read(key, load);
|
|
14
|
+
app.get('/api/config', async () => ({
|
|
15
|
+
ok: true,
|
|
16
|
+
data: { address: ctx.address, chainId: ctx.chain.chainId, evmChainId: ctx.chain.evmChainId, readOnly: context.readOnly, dataDir: context.dataDir },
|
|
17
|
+
}));
|
|
18
|
+
app.get('/api/overview', (_request, reply) => respond(reply, () => cached('overview', () => overview(ctx))));
|
|
19
|
+
app.get('/api/positions', (_request, reply) => respond(reply, () => cached('positions', () => positions(ctx))));
|
|
20
|
+
app.get('/api/rewards', (_request, reply) => respond(reply, () => cached('rewards', () => rewards(ctx))));
|
|
21
|
+
app.get('/api/pools', (_request, reply) => respond(reply, () => cached('pools', () => poolsView(ctx))));
|
|
22
|
+
app.get('/api/pools/:agentId', (request, reply) => respond(reply, () => cached(`pool:${request.params.agentId}`, () => singlePool(ctx, Number(request.params.agentId)))));
|
|
23
|
+
app.get('/api/usage', (request, reply) => respond(reply, () => cached(`usage:${request.query.epochs ?? ''}`, () => usage(ctx, { epochs: request.query.epochs ? Number(request.query.epochs) : undefined }))));
|
|
24
|
+
app.get('/api/emissions', (_request, reply) => respond(reply, () => cached('emissions', () => emissions(ctx))));
|
|
25
|
+
app.get('/api/verification', (request, reply) => respond(reply, () => cached(`verification:${(request.query.seller ?? '').toLowerCase()}`, () => verification(ctx, request.query.seller || undefined))));
|
|
26
|
+
app.get('/api/verification/proofs/:proofId', (request, reply) => respond(reply, () => proofStatus(ctx, request.params.proofId)));
|
|
27
|
+
app.get('/api/seller', (_request, reply) => respond(reply, () => cached('seller', () => seller(ctx))));
|
|
28
|
+
app.post('/api/positions/withdraw/preview', (request, reply) => respond(reply, () => previewWithdraw(ctx, request.body?.positionIds ?? [])));
|
|
29
|
+
app.get('/api/jobs', async () => ({ ok: true, data: jobs.list() }));
|
|
30
|
+
app.get('/api/jobs/:id', async (request, reply) => {
|
|
31
|
+
const job = jobs.get(request.params.id);
|
|
32
|
+
if (!job)
|
|
33
|
+
return reply.status(404).send({ ok: false, error: 'Unknown job' });
|
|
34
|
+
return { ok: true, data: job };
|
|
35
|
+
});
|
|
36
|
+
const action = (path, kind, run) => {
|
|
37
|
+
app.post(path, async (request, reply) => {
|
|
38
|
+
if (context.readOnly)
|
|
39
|
+
return reply.status(403).send({ ok: false, error: 'The dashboard is running in read-only mode (no wallet available).' });
|
|
40
|
+
try {
|
|
41
|
+
const job = jobs.start(kind, (report) => run((request.body ?? {}), report));
|
|
42
|
+
return { ok: true, data: job };
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
return reply.status(409).send({ ok: false, error: describeError(error) });
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
action('/api/positions/stake', 'stake', (body, report) => stake(ctx, body, report));
|
|
50
|
+
action('/api/positions/move', 'move', (body, report) => move(ctx, body, report));
|
|
51
|
+
action('/api/positions/split', 'split', (body, report) => split(ctx, body, report));
|
|
52
|
+
action('/api/positions/merge', 'merge', (body, report) => merge(ctx, body, report));
|
|
53
|
+
action('/api/positions/extend', 'extend', (body, report) => extend(ctx, body, report));
|
|
54
|
+
action('/api/positions/max-lock', 'max-lock', (body, report) => maxLock(ctx, body, report));
|
|
55
|
+
action('/api/positions/withdraw', 'withdraw', (body, report) => withdraw(ctx, body, report));
|
|
56
|
+
action('/api/rewards/claim', 'claim', (body, report) => claim(ctx, body, report));
|
|
57
|
+
action('/api/rewards/restake', 'restake', (body, report) => restake(ctx, body, report));
|
|
58
|
+
action('/api/rewards/stake-usage', 'stake-usage', (body, report) => stakeUsageRewards(ctx, body, report));
|
|
59
|
+
action('/api/rewards/compound', 'compound', (body, report) => compound(ctx, body, report));
|
|
60
|
+
action('/api/verification/submit', 'verify-submit', (body, report) => submitProof(ctx, body.artifact, report));
|
|
61
|
+
action('/api/seller/register', 'seller-register', (body, report) => registerBinding(ctx, body?.agentId, report));
|
|
62
|
+
action('/api/seller/claim-starter', 'claim-starter', (_body, report) => claimStarter(ctx, report));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,aAAa,EAAE,MAAM,WAAW,CAAC;AAGrD,OAAO,EACL,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAC1F,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAC7F,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,GAC9E,MAAM,oBAAoB,CAAC;AAc5B,KAAK,UAAU,OAAO,CAAC,KAAmB,EAAE,IAA4B;IACtE,IAAI,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAA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