@bankr/cli 0.2.13 → 0.3.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 +27 -0
- package/dist/cli.js +146 -1
- package/dist/commands/club.d.ts +9 -0
- package/dist/commands/club.js +151 -0
- package/dist/commands/fees.js +31 -45
- package/dist/commands/files.d.ts +34 -0
- package/dist/commands/files.js +501 -0
- package/dist/commands/llm.js +41 -1
- package/dist/commands/login.js +4 -2
- package/dist/commands/prompt.js +1 -0
- package/dist/commands/webhooks.d.ts +29 -0
- package/dist/commands/webhooks.js +657 -0
- package/dist/lib/api.d.ts +26 -3
- package/dist/lib/api.js +25 -3
- package/package.json +1 -1
package/dist/lib/api.d.ts
CHANGED
|
@@ -209,7 +209,6 @@ export interface DeployTokenResponse {
|
|
|
209
209
|
tokenAddress: string;
|
|
210
210
|
poolId: string;
|
|
211
211
|
txHash?: string;
|
|
212
|
-
activityId: string;
|
|
213
212
|
chain: string;
|
|
214
213
|
simulated?: boolean;
|
|
215
214
|
feeDistribution: Record<string, {
|
|
@@ -292,15 +291,39 @@ export interface StreamProgress {
|
|
|
292
291
|
*/
|
|
293
292
|
export declare function getBeneficiaryFeesStreaming(address: string, onProgress: (progress: StreamProgress) => void): Promise<BeneficiaryFeesResponse>;
|
|
294
293
|
/**
|
|
295
|
-
* Fetch creator fee data for a specific token address. Unauthenticated
|
|
296
|
-
*
|
|
294
|
+
* Fetch creator fee data for a specific token address. Unauthenticated.
|
|
295
|
+
*
|
|
296
|
+
* Uses the unified `/token-launches/:addr/fees` endpoint (added as part of
|
|
297
|
+
* the token-launches API consolidation epic). The legacy alias
|
|
298
|
+
* `GET /public/doppler/token-fees/:addr` still works but emits `Deprecation`
|
|
299
|
+
* and `Sunset` headers.
|
|
297
300
|
*/
|
|
298
301
|
export declare function getTokenCreatorFees(tokenAddress: string, days?: number): Promise<CreatorFeesResponse>;
|
|
299
302
|
/**
|
|
300
303
|
* Build a Doppler fee claim transaction. Requires authentication.
|
|
301
304
|
* The returned transaction data should be submitted via `submit()`.
|
|
305
|
+
*
|
|
306
|
+
* @deprecated Use `claimTokenLaunchFees` instead — it builds, signs, and
|
|
307
|
+
* broadcasts in a single HTTP call. Kept here so older CLI scripts continue
|
|
308
|
+
* to work through the deprecation window.
|
|
302
309
|
*/
|
|
303
310
|
export declare function buildDopplerClaimTx(tokenAddress: string): Promise<DopplerClaimTxResponse>;
|
|
311
|
+
export interface ClaimTokenLaunchFeesResponse {
|
|
312
|
+
transactionHash?: string;
|
|
313
|
+
status?: string;
|
|
314
|
+
signer?: string;
|
|
315
|
+
chainId: number;
|
|
316
|
+
description: string;
|
|
317
|
+
blockNumber?: string;
|
|
318
|
+
gasUsed?: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Claim trading fees for a Bankr-launched token. Auto-detects Doppler vs
|
|
322
|
+
* Clanker and executes (build + sign + broadcast) in a single call.
|
|
323
|
+
*
|
|
324
|
+
* Replaces the two-step `buildDopplerClaimTx` + `submit` flow.
|
|
325
|
+
*/
|
|
326
|
+
export declare function claimTokenLaunchFees(tokenAddress: string): Promise<ClaimTokenLaunchFeesResponse>;
|
|
304
327
|
export interface BuildClaimTx {
|
|
305
328
|
tokenAddress: string;
|
|
306
329
|
tokenName: string;
|
package/dist/lib/api.js
CHANGED
|
@@ -219,12 +219,16 @@ export async function getBeneficiaryFeesStreaming(address, onProgress) {
|
|
|
219
219
|
return result;
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
|
-
* Fetch creator fee data for a specific token address. Unauthenticated
|
|
223
|
-
*
|
|
222
|
+
* Fetch creator fee data for a specific token address. Unauthenticated.
|
|
223
|
+
*
|
|
224
|
+
* Uses the unified `/token-launches/:addr/fees` endpoint (added as part of
|
|
225
|
+
* the token-launches API consolidation epic). The legacy alias
|
|
226
|
+
* `GET /public/doppler/token-fees/:addr` still works but emits `Deprecation`
|
|
227
|
+
* and `Sunset` headers.
|
|
224
228
|
*/
|
|
225
229
|
export async function getTokenCreatorFees(tokenAddress, days) {
|
|
226
230
|
const params = days ? `?days=${days}` : "";
|
|
227
|
-
const res = await fetch(`${getApiUrl()}/
|
|
231
|
+
const res = await fetch(`${getApiUrl()}/token-launches/${tokenAddress}/fees${params}`, {
|
|
228
232
|
headers: {
|
|
229
233
|
"User-Agent": CLI_USER_AGENT,
|
|
230
234
|
},
|
|
@@ -234,6 +238,10 @@ export async function getTokenCreatorFees(tokenAddress, days) {
|
|
|
234
238
|
/**
|
|
235
239
|
* Build a Doppler fee claim transaction. Requires authentication.
|
|
236
240
|
* The returned transaction data should be submitted via `submit()`.
|
|
241
|
+
*
|
|
242
|
+
* @deprecated Use `claimTokenLaunchFees` instead — it builds, signs, and
|
|
243
|
+
* broadcasts in a single HTTP call. Kept here so older CLI scripts continue
|
|
244
|
+
* to work through the deprecation window.
|
|
237
245
|
*/
|
|
238
246
|
export async function buildDopplerClaimTx(tokenAddress) {
|
|
239
247
|
const res = await fetch(`${getApiUrl()}/agent/doppler/claim`, {
|
|
@@ -243,6 +251,20 @@ export async function buildDopplerClaimTx(tokenAddress) {
|
|
|
243
251
|
});
|
|
244
252
|
return handleResponse(res);
|
|
245
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Claim trading fees for a Bankr-launched token. Auto-detects Doppler vs
|
|
256
|
+
* Clanker and executes (build + sign + broadcast) in a single call.
|
|
257
|
+
*
|
|
258
|
+
* Replaces the two-step `buildDopplerClaimTx` + `submit` flow.
|
|
259
|
+
*/
|
|
260
|
+
export async function claimTokenLaunchFees(tokenAddress) {
|
|
261
|
+
const res = await fetch(`${getApiUrl()}/token-launches/${tokenAddress}/fees/claim`, {
|
|
262
|
+
method: "POST",
|
|
263
|
+
headers: authHeaders(),
|
|
264
|
+
body: JSON.stringify({}),
|
|
265
|
+
});
|
|
266
|
+
return handleResponse(res);
|
|
267
|
+
}
|
|
246
268
|
export async function getOwnProfile() {
|
|
247
269
|
const res = await fetch(`${getApiUrl()}/agent/profile`, {
|
|
248
270
|
headers: authHeaders(),
|