@clawnch/clawncher-sdk 0.1.0
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 +603 -0
- package/dist/abis.d.ts +935 -0
- package/dist/abis.d.ts.map +1 -0
- package/dist/abis.js +486 -0
- package/dist/abis.js.map +1 -0
- package/dist/addresses.d.ts +51 -0
- package/dist/addresses.d.ts.map +1 -0
- package/dist/addresses.js +80 -0
- package/dist/addresses.js.map +1 -0
- package/dist/api-deployer-types.d.ts +165 -0
- package/dist/api-deployer-types.d.ts.map +1 -0
- package/dist/api-deployer-types.js +9 -0
- package/dist/api-deployer-types.js.map +1 -0
- package/dist/api-deployer.d.ts +114 -0
- package/dist/api-deployer.d.ts.map +1 -0
- package/dist/api-deployer.js +309 -0
- package/dist/api-deployer.js.map +1 -0
- package/dist/claimer.d.ts +197 -0
- package/dist/claimer.d.ts.map +1 -0
- package/dist/claimer.js +311 -0
- package/dist/claimer.js.map +1 -0
- package/dist/deployer.d.ts +229 -0
- package/dist/deployer.d.ts.map +1 -0
- package/dist/deployer.js +305 -0
- package/dist/deployer.js.map +1 -0
- package/dist/erc8004-types.d.ts +94 -0
- package/dist/erc8004-types.d.ts.map +1 -0
- package/dist/erc8004-types.js +8 -0
- package/dist/erc8004-types.js.map +1 -0
- package/dist/errors.d.ts +62 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +75 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +204 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +358 -0
- package/dist/index.js.map +1 -0
- package/dist/liquidity-types.d.ts +198 -0
- package/dist/liquidity-types.d.ts.map +1 -0
- package/dist/liquidity-types.js +8 -0
- package/dist/liquidity-types.js.map +1 -0
- package/dist/liquidity.d.ts +111 -0
- package/dist/liquidity.d.ts.map +1 -0
- package/dist/liquidity.js +608 -0
- package/dist/liquidity.js.map +1 -0
- package/dist/molten-types.d.ts +282 -0
- package/dist/molten-types.d.ts.map +1 -0
- package/dist/molten-types.js +8 -0
- package/dist/molten-types.js.map +1 -0
- package/dist/molten.d.ts +336 -0
- package/dist/molten.d.ts.map +1 -0
- package/dist/molten.js +560 -0
- package/dist/molten.js.map +1 -0
- package/dist/portfolio.d.ts +129 -0
- package/dist/portfolio.d.ts.map +1 -0
- package/dist/portfolio.js +218 -0
- package/dist/portfolio.js.map +1 -0
- package/dist/reader.d.ts +249 -0
- package/dist/reader.d.ts.map +1 -0
- package/dist/reader.js +488 -0
- package/dist/reader.js.map +1 -0
- package/dist/swap-types.d.ts +159 -0
- package/dist/swap-types.d.ts.map +1 -0
- package/dist/swap-types.js +22 -0
- package/dist/swap-types.js.map +1 -0
- package/dist/swap.d.ts +762 -0
- package/dist/swap.d.ts.map +1 -0
- package/dist/swap.js +345 -0
- package/dist/swap.js.map +1 -0
- package/dist/token-verification-data.d.ts +4 -0
- package/dist/token-verification-data.d.ts.map +1 -0
- package/dist/token-verification-data.js +6 -0
- package/dist/token-verification-data.js.map +1 -0
- package/dist/types.d.ts +244 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/uniswap-abis.d.ts +470 -0
- package/dist/uniswap-abis.d.ts.map +1 -0
- package/dist/uniswap-abis.js +322 -0
- package/dist/uniswap-abis.js.map +1 -0
- package/dist/uniswap-addresses.d.ts +38 -0
- package/dist/uniswap-addresses.d.ts.map +1 -0
- package/dist/uniswap-addresses.js +67 -0
- package/dist/uniswap-addresses.js.map +1 -0
- package/dist/vanity.d.ts +115 -0
- package/dist/vanity.d.ts.map +1 -0
- package/dist/vanity.js +166 -0
- package/dist/vanity.js.map +1 -0
- package/dist/verify.d.ts +88 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +181 -0
- package/dist/verify.js.map +1 -0
- package/dist/watcher.d.ts +112 -0
- package/dist/watcher.d.ts.map +1 -0
- package/dist/watcher.js +132 -0
- package/dist/watcher.js.map +1 -0
- package/package.json +59 -0
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clawncher SDK - Structured Error Codes
|
|
3
|
+
*
|
|
4
|
+
* Provides machine-readable error codes for programmatic error handling.
|
|
5
|
+
* All SDK errors use ClawnchDeployError with a specific ClawnchErrorCode,
|
|
6
|
+
* making it easy to handle different failure modes in automation.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Error codes for all SDK operations
|
|
10
|
+
*/
|
|
11
|
+
export declare enum ClawnchErrorCode {
|
|
12
|
+
INVALID_BPS = "INVALID_BPS",
|
|
13
|
+
INVALID_NAME = "INVALID_NAME",
|
|
14
|
+
INVALID_SYMBOL = "INVALID_SYMBOL",
|
|
15
|
+
INVALID_ADDRESS = "INVALID_ADDRESS",
|
|
16
|
+
WALLET_NOT_CONFIGURED = "WALLET_NOT_CONFIGURED",
|
|
17
|
+
PUBLIC_CLIENT_NOT_CONFIGURED = "PUBLIC_CLIENT_NOT_CONFIGURED",
|
|
18
|
+
DEPLOY_FAILED = "DEPLOY_FAILED",
|
|
19
|
+
TX_REVERTED = "TX_REVERTED",
|
|
20
|
+
INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS",
|
|
21
|
+
CLAIM_FAILED = "CLAIM_FAILED",
|
|
22
|
+
NO_FEES_AVAILABLE = "NO_FEES_AVAILABLE",
|
|
23
|
+
FEATURE_NOT_AVAILABLE = "FEATURE_NOT_AVAILABLE",
|
|
24
|
+
RPC_ERROR = "RPC_ERROR",
|
|
25
|
+
TIMEOUT = "TIMEOUT"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Structured error class for Clawncher SDK operations
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* try {
|
|
33
|
+
* const result = await deployer.deploy(options);
|
|
34
|
+
* } catch (err) {
|
|
35
|
+
* if (err instanceof ClawnchDeployError) {
|
|
36
|
+
* switch (err.code) {
|
|
37
|
+
* case ClawnchErrorCode.WALLET_NOT_CONFIGURED:
|
|
38
|
+
* console.log('Please configure a wallet');
|
|
39
|
+
* break;
|
|
40
|
+
* case ClawnchErrorCode.INVALID_BPS:
|
|
41
|
+
* console.log('Fix your reward BPS:', err.message);
|
|
42
|
+
* break;
|
|
43
|
+
* case ClawnchErrorCode.DEPLOY_FAILED:
|
|
44
|
+
* console.log('Deployment failed:', err.message);
|
|
45
|
+
* if (err.cause) console.log('Caused by:', err.cause);
|
|
46
|
+
* break;
|
|
47
|
+
* }
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare class ClawnchDeployError extends Error {
|
|
53
|
+
readonly code: ClawnchErrorCode;
|
|
54
|
+
readonly cause?: Error | undefined;
|
|
55
|
+
readonly name = "ClawnchDeployError";
|
|
56
|
+
constructor(code: ClawnchErrorCode, message: string, cause?: Error | undefined);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Type guard to check if an error is a ClawnchDeployError
|
|
60
|
+
*/
|
|
61
|
+
export declare function isClawnchError(err: unknown): err is ClawnchDeployError;
|
|
62
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,oBAAY,gBAAgB;IAE1B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAGnC,qBAAqB,0BAA0B;IAC/C,4BAA4B,iCAAiC;IAG7D,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IAGzC,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IAGvC,qBAAqB,0BAA0B;IAG/C,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;aAIzB,IAAI,EAAE,gBAAgB;aAEtB,KAAK,CAAC,EAAE,KAAK;IAL/B,QAAQ,CAAC,IAAI,wBAAwB;gBAGnB,IAAI,EAAE,gBAAgB,EACtC,OAAO,EAAE,MAAM,EACC,KAAK,CAAC,EAAE,KAAK,YAAA;CAIhC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAEtE"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clawncher SDK - Structured Error Codes
|
|
3
|
+
*
|
|
4
|
+
* Provides machine-readable error codes for programmatic error handling.
|
|
5
|
+
* All SDK errors use ClawnchDeployError with a specific ClawnchErrorCode,
|
|
6
|
+
* making it easy to handle different failure modes in automation.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Error codes for all SDK operations
|
|
10
|
+
*/
|
|
11
|
+
export var ClawnchErrorCode;
|
|
12
|
+
(function (ClawnchErrorCode) {
|
|
13
|
+
// Validation errors
|
|
14
|
+
ClawnchErrorCode["INVALID_BPS"] = "INVALID_BPS";
|
|
15
|
+
ClawnchErrorCode["INVALID_NAME"] = "INVALID_NAME";
|
|
16
|
+
ClawnchErrorCode["INVALID_SYMBOL"] = "INVALID_SYMBOL";
|
|
17
|
+
ClawnchErrorCode["INVALID_ADDRESS"] = "INVALID_ADDRESS";
|
|
18
|
+
// Configuration errors
|
|
19
|
+
ClawnchErrorCode["WALLET_NOT_CONFIGURED"] = "WALLET_NOT_CONFIGURED";
|
|
20
|
+
ClawnchErrorCode["PUBLIC_CLIENT_NOT_CONFIGURED"] = "PUBLIC_CLIENT_NOT_CONFIGURED";
|
|
21
|
+
// Deployment errors
|
|
22
|
+
ClawnchErrorCode["DEPLOY_FAILED"] = "DEPLOY_FAILED";
|
|
23
|
+
ClawnchErrorCode["TX_REVERTED"] = "TX_REVERTED";
|
|
24
|
+
ClawnchErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS";
|
|
25
|
+
// Claiming errors
|
|
26
|
+
ClawnchErrorCode["CLAIM_FAILED"] = "CLAIM_FAILED";
|
|
27
|
+
ClawnchErrorCode["NO_FEES_AVAILABLE"] = "NO_FEES_AVAILABLE";
|
|
28
|
+
// Feature not available
|
|
29
|
+
ClawnchErrorCode["FEATURE_NOT_AVAILABLE"] = "FEATURE_NOT_AVAILABLE";
|
|
30
|
+
// Network errors
|
|
31
|
+
ClawnchErrorCode["RPC_ERROR"] = "RPC_ERROR";
|
|
32
|
+
ClawnchErrorCode["TIMEOUT"] = "TIMEOUT";
|
|
33
|
+
})(ClawnchErrorCode || (ClawnchErrorCode = {}));
|
|
34
|
+
/**
|
|
35
|
+
* Structured error class for Clawncher SDK operations
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* try {
|
|
40
|
+
* const result = await deployer.deploy(options);
|
|
41
|
+
* } catch (err) {
|
|
42
|
+
* if (err instanceof ClawnchDeployError) {
|
|
43
|
+
* switch (err.code) {
|
|
44
|
+
* case ClawnchErrorCode.WALLET_NOT_CONFIGURED:
|
|
45
|
+
* console.log('Please configure a wallet');
|
|
46
|
+
* break;
|
|
47
|
+
* case ClawnchErrorCode.INVALID_BPS:
|
|
48
|
+
* console.log('Fix your reward BPS:', err.message);
|
|
49
|
+
* break;
|
|
50
|
+
* case ClawnchErrorCode.DEPLOY_FAILED:
|
|
51
|
+
* console.log('Deployment failed:', err.message);
|
|
52
|
+
* if (err.cause) console.log('Caused by:', err.cause);
|
|
53
|
+
* break;
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export class ClawnchDeployError extends Error {
|
|
60
|
+
code;
|
|
61
|
+
cause;
|
|
62
|
+
name = 'ClawnchDeployError';
|
|
63
|
+
constructor(code, message, cause) {
|
|
64
|
+
super(message);
|
|
65
|
+
this.code = code;
|
|
66
|
+
this.cause = cause;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Type guard to check if an error is a ClawnchDeployError
|
|
71
|
+
*/
|
|
72
|
+
export function isClawnchError(err) {
|
|
73
|
+
return err instanceof ClawnchDeployError;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,gBA0BX;AA1BD,WAAY,gBAAgB;IAC1B,oBAAoB;IACpB,+CAA2B,CAAA;IAC3B,iDAA6B,CAAA;IAC7B,qDAAiC,CAAA;IACjC,uDAAmC,CAAA;IAEnC,uBAAuB;IACvB,mEAA+C,CAAA;IAC/C,iFAA6D,CAAA;IAE7D,oBAAoB;IACpB,mDAA+B,CAAA;IAC/B,+CAA2B,CAAA;IAC3B,6DAAyC,CAAA;IAEzC,kBAAkB;IAClB,iDAA6B,CAAA;IAC7B,2DAAuC,CAAA;IAEvC,wBAAwB;IACxB,mEAA+C,CAAA;IAE/C,iBAAiB;IACjB,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;AACrB,CAAC,EA1BW,gBAAgB,KAAhB,gBAAgB,QA0B3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAIzB;IAEA;IALT,IAAI,GAAG,oBAAoB,CAAC;IAErC,YACkB,IAAsB,EACtC,OAAe,EACC,KAAa;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAJ,IAAI,CAAkB;QAEtB,UAAK,GAAL,KAAK,CAAQ;IAG/B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,GAAG,YAAY,kBAAkB,CAAC;AAC3C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clawncher SDK
|
|
3
|
+
*
|
|
4
|
+
* TypeScript SDK for deploying tokens on Base with Uniswap V4 pools.
|
|
5
|
+
* Deploys through Clanker's approved infrastructure for immediate tradability.
|
|
6
|
+
*
|
|
7
|
+
* ## Deploying Tokens
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { ClawnchDeployer } from '@clawnch/clawncher-sdk';
|
|
12
|
+
* import { createWalletClient, createPublicClient, http } from 'viem';
|
|
13
|
+
* import { privateKeyToAccount } from 'viem/accounts';
|
|
14
|
+
* import { base } from 'viem/chains';
|
|
15
|
+
*
|
|
16
|
+
* const account = privateKeyToAccount('0x...');
|
|
17
|
+
* const wallet = createWalletClient({
|
|
18
|
+
* account,
|
|
19
|
+
* chain: base,
|
|
20
|
+
* transport: http(),
|
|
21
|
+
* });
|
|
22
|
+
* const publicClient = createPublicClient({
|
|
23
|
+
* chain: base,
|
|
24
|
+
* transport: http(),
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* const deployer = new ClawnchDeployer({
|
|
28
|
+
* wallet,
|
|
29
|
+
* publicClient,
|
|
30
|
+
* network: 'mainnet',
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* const result = await deployer.deploy({
|
|
34
|
+
* name: 'My Token',
|
|
35
|
+
* symbol: 'MYTKN',
|
|
36
|
+
* tokenAdmin: account.address,
|
|
37
|
+
* rewards: {
|
|
38
|
+
* recipients: [{
|
|
39
|
+
* recipient: account.address,
|
|
40
|
+
* admin: account.address,
|
|
41
|
+
* bps: 10000, // 100%
|
|
42
|
+
* feePreference: 'Paired', // Receive fees in WETH
|
|
43
|
+
* }],
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* const { address } = await result.waitForTransaction();
|
|
48
|
+
* console.log('Token deployed:', address);
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* ## API Client (Optional)
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* import { ClawnchClient } from '@clawnch/clawncher-sdk';
|
|
56
|
+
*
|
|
57
|
+
* const client = new ClawnchClient();
|
|
58
|
+
*
|
|
59
|
+
* // Get all tokens
|
|
60
|
+
* const tokens = await client.getTokens();
|
|
61
|
+
*
|
|
62
|
+
* // Check available fees
|
|
63
|
+
* const fees = await client.getAvailableFees('0x...');
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
import type { Token, Launch, LaunchFilters, LaunchesResponse, Stats, PreviewResponse, FeesAvailable, ClaimResult, TokenAnalytics, AgentAnalytics, Leaderboard } from './types.js';
|
|
67
|
+
export * from './types.js';
|
|
68
|
+
export * from './molten.js';
|
|
69
|
+
export * from './errors.js';
|
|
70
|
+
export * from './deployer.js';
|
|
71
|
+
export * from './addresses.js';
|
|
72
|
+
export * from './abis.js';
|
|
73
|
+
export * from './reader.js';
|
|
74
|
+
export * from './claimer.js';
|
|
75
|
+
export * from './portfolio.js';
|
|
76
|
+
export * from './watcher.js';
|
|
77
|
+
export * from './swap.js';
|
|
78
|
+
export * from './swap-types.js';
|
|
79
|
+
export * from './liquidity.js';
|
|
80
|
+
export * from './liquidity-types.js';
|
|
81
|
+
export * from './uniswap-addresses.js';
|
|
82
|
+
export * from './uniswap-abis.js';
|
|
83
|
+
export * from './api-deployer.js';
|
|
84
|
+
export * from './api-deployer-types.js';
|
|
85
|
+
export interface ClawnchClientOptions {
|
|
86
|
+
/** Base URL for the API (default: https://clawn.ch) */
|
|
87
|
+
baseUrl?: string;
|
|
88
|
+
/** Moltbook API key for authenticated operations (keep secret, never log) */
|
|
89
|
+
moltbookKey?: string;
|
|
90
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
91
|
+
timeout?: number;
|
|
92
|
+
}
|
|
93
|
+
export declare class ClawnchClient {
|
|
94
|
+
private baseUrl;
|
|
95
|
+
private moltbookKey?;
|
|
96
|
+
private timeout;
|
|
97
|
+
constructor(options?: ClawnchClientOptions);
|
|
98
|
+
/**
|
|
99
|
+
* Make an API request
|
|
100
|
+
*/
|
|
101
|
+
private request;
|
|
102
|
+
/**
|
|
103
|
+
* Get all tokens launched via Clawncher
|
|
104
|
+
*/
|
|
105
|
+
getTokens(): Promise<Token[]>;
|
|
106
|
+
/**
|
|
107
|
+
* Get a single token by symbol
|
|
108
|
+
*/
|
|
109
|
+
getTokenBySymbol(symbol: string): Promise<Token | null>;
|
|
110
|
+
/**
|
|
111
|
+
* Get launch history with optional filters
|
|
112
|
+
*/
|
|
113
|
+
getLaunches(filters?: LaunchFilters): Promise<LaunchesResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Get a single launch by contract address
|
|
116
|
+
*/
|
|
117
|
+
getLaunch(address: string): Promise<Launch | null>;
|
|
118
|
+
/**
|
|
119
|
+
* Get market statistics
|
|
120
|
+
*/
|
|
121
|
+
getStats(): Promise<Stats>;
|
|
122
|
+
/**
|
|
123
|
+
* Validate a launch post before publishing
|
|
124
|
+
*
|
|
125
|
+
* @param content - The full post content including !clawnch trigger
|
|
126
|
+
* @returns Validation result with parsed data, errors, and warnings
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```typescript
|
|
130
|
+
* const result = await client.preview(`
|
|
131
|
+
* !clawnch
|
|
132
|
+
* name: My Token
|
|
133
|
+
* symbol: MYTKN
|
|
134
|
+
* wallet: 0x1234...
|
|
135
|
+
* description: A test token
|
|
136
|
+
* image: https://iili.io/example.jpg
|
|
137
|
+
* `);
|
|
138
|
+
*
|
|
139
|
+
* if (result.valid) {
|
|
140
|
+
* console.log('Ready to post!', result.parsed);
|
|
141
|
+
* } else {
|
|
142
|
+
* console.log('Errors:', result.errors);
|
|
143
|
+
* }
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
preview(content: string): Promise<PreviewResponse>;
|
|
147
|
+
/**
|
|
148
|
+
* Check available fees for a wallet
|
|
149
|
+
*
|
|
150
|
+
* @param wallet - Ethereum wallet address
|
|
151
|
+
* @param tokens - Optional comma-separated list of token addresses to check
|
|
152
|
+
*/
|
|
153
|
+
getAvailableFees(wallet: string, tokens?: string): Promise<FeesAvailable>;
|
|
154
|
+
/**
|
|
155
|
+
* Claim fees for a token
|
|
156
|
+
*
|
|
157
|
+
* Requires Moltbook API key (set in constructor) or the wallet must be
|
|
158
|
+
* the deployer of the token.
|
|
159
|
+
*
|
|
160
|
+
* @param tokenAddress - Token contract address
|
|
161
|
+
*/
|
|
162
|
+
claimFees(tokenAddress: string): Promise<ClaimResult>;
|
|
163
|
+
/**
|
|
164
|
+
* Get detailed analytics for a token
|
|
165
|
+
*/
|
|
166
|
+
getTokenAnalytics(address: string): Promise<TokenAnalytics>;
|
|
167
|
+
/**
|
|
168
|
+
* Get analytics for an agent (all their tokens)
|
|
169
|
+
*/
|
|
170
|
+
getAgentAnalytics(name: string): Promise<AgentAnalytics>;
|
|
171
|
+
/**
|
|
172
|
+
* Get the agent leaderboard
|
|
173
|
+
*
|
|
174
|
+
* @param sort - Sort metric: 'market_cap' | 'volume' | 'launches'
|
|
175
|
+
* @param limit - Number of results (default 20, max 100)
|
|
176
|
+
*/
|
|
177
|
+
getLeaderboard(sort?: 'market_cap' | 'volume' | 'launches', limit?: number): Promise<Leaderboard>;
|
|
178
|
+
/**
|
|
179
|
+
* Upload an image for use as a token logo
|
|
180
|
+
*
|
|
181
|
+
* @param image - Base64-encoded image data OR URL to re-host
|
|
182
|
+
* @param name - Optional filename
|
|
183
|
+
* @returns Direct image URL (iili.io)
|
|
184
|
+
*/
|
|
185
|
+
uploadImage(image: string, name?: string): Promise<string>;
|
|
186
|
+
/**
|
|
187
|
+
* Get the skill documentation
|
|
188
|
+
*/
|
|
189
|
+
getSkill(): Promise<string>;
|
|
190
|
+
/**
|
|
191
|
+
* Get the OpenAPI specification
|
|
192
|
+
*/
|
|
193
|
+
getOpenAPISpec(): Promise<object>;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Custom error class for Clawnch API errors
|
|
197
|
+
*/
|
|
198
|
+
export declare class ClawnchError extends Error {
|
|
199
|
+
readonly status: number;
|
|
200
|
+
readonly errors?: string[] | undefined;
|
|
201
|
+
constructor(message: string, status: number, errors?: string[] | undefined);
|
|
202
|
+
}
|
|
203
|
+
export default ClawnchClient;
|
|
204
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH,OAAO,KAAK,EACV,KAAK,EAEL,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EAEL,eAAe,EACf,aAAa,EAEb,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EAIZ,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAG5B,cAAc,aAAa,CAAC;AAG5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAG1B,cAAc,aAAa,CAAC;AAG5B,cAAc,cAAc,CAAC;AAG7B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,cAAc,CAAC;AAG7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AAExC,MAAM,WA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