@clawnch/clawncher-sdk 2.2.0 → 2.2.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 +58 -36
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# @clawnch/sdk
|
|
1
|
+
# @clawnch/clawncher-sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for [
|
|
3
|
+
TypeScript SDK for [Clawncher](https://clawn.ch/er) - deploy tokens on Base with Uniswap V4 pools, MEV protection, and configurable fee distribution.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @clawnch/sdk
|
|
8
|
+
npm install @clawnch/clawncher-sdk viem
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick Start - Token Deployment
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { ClawnchDeployer } from '@clawnch/sdk';
|
|
14
|
+
import { ClawnchDeployer } from '@clawnch/clawncher-sdk';
|
|
15
15
|
import { createWalletClient, createPublicClient, http } from 'viem';
|
|
16
16
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
17
17
|
import { baseSepolia } from 'viem/chains';
|
|
@@ -149,8 +149,8 @@ const result = await deployer.deploy({
|
|
|
149
149
|
## Fee Structure
|
|
150
150
|
|
|
151
151
|
**1% LP fee per swap**
|
|
152
|
-
- **80%**
|
|
153
|
-
- **20%**
|
|
152
|
+
- **80%** to deployer/reward recipients
|
|
153
|
+
- **20%** protocol (in WETH)
|
|
154
154
|
|
|
155
155
|
### Fee Preferences
|
|
156
156
|
|
|
@@ -207,7 +207,7 @@ console.log(result.vanityResult?.address); // Predicted address
|
|
|
207
207
|
Use `ClawnchReader` to read token data directly from the blockchain:
|
|
208
208
|
|
|
209
209
|
```typescript
|
|
210
|
-
import { ClawnchReader } from '@clawnch/sdk';
|
|
210
|
+
import { ClawnchReader } from '@clawnch/clawncher-sdk';
|
|
211
211
|
import { createPublicClient, http } from 'viem';
|
|
212
212
|
import { base } from 'viem/chains';
|
|
213
213
|
|
|
@@ -236,16 +236,39 @@ const mev = await reader.getMevConfig('0xTokenAddress');
|
|
|
236
236
|
// Get available fees for a wallet
|
|
237
237
|
const fees = await reader.getAvailableFees('0xWallet', '0xToken');
|
|
238
238
|
|
|
239
|
-
// Check if token was deployed via
|
|
239
|
+
// Check if token was deployed via Clawncher
|
|
240
240
|
const isClawnch = await reader.isClawnchToken('0xTokenAddress');
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
+
## Claiming Fees
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
import { ClawncherClaimer } from '@clawnch/clawncher-sdk';
|
|
247
|
+
|
|
248
|
+
const claimer = new ClawncherClaimer({ wallet, publicClient, network: 'mainnet' });
|
|
249
|
+
|
|
250
|
+
// Collect LP rewards (triggers fee collection from positions)
|
|
251
|
+
await claimer.collectRewards('0xToken...');
|
|
252
|
+
|
|
253
|
+
// Claim fees from FeeLocker
|
|
254
|
+
await claimer.claimFees('0xWallet...', '0xToken...');
|
|
255
|
+
|
|
256
|
+
// Claim vault allocation
|
|
257
|
+
await claimer.claimVault('0xToken...');
|
|
258
|
+
|
|
259
|
+
// Claim vested dev buy allocation
|
|
260
|
+
await claimer.claimVestedDevBuy('0xToken...');
|
|
261
|
+
|
|
262
|
+
// Claim everything at once
|
|
263
|
+
await claimer.claimAll('0xToken...', { claimVault: true, claimVestedDevBuy: true });
|
|
264
|
+
```
|
|
265
|
+
|
|
243
266
|
## API Client (Optional)
|
|
244
267
|
|
|
245
268
|
For API-based operations (tokens list, launches, analytics):
|
|
246
269
|
|
|
247
270
|
```typescript
|
|
248
|
-
import { ClawnchClient } from '@clawnch/sdk';
|
|
271
|
+
import { ClawnchClient } from '@clawnch/clawncher-sdk';
|
|
249
272
|
|
|
250
273
|
const client = new ClawnchClient();
|
|
251
274
|
|
|
@@ -262,40 +285,39 @@ const stats = await client.getStats();
|
|
|
262
285
|
## Contract Addresses
|
|
263
286
|
|
|
264
287
|
```typescript
|
|
265
|
-
import { getAddresses } from '@clawnch/sdk';
|
|
288
|
+
import { getAddresses } from '@clawnch/clawncher-sdk';
|
|
266
289
|
|
|
267
|
-
const addresses = getAddresses('
|
|
290
|
+
const addresses = getAddresses('mainnet'); // or 'sepolia'
|
|
268
291
|
console.log(addresses.clawnch.factory);
|
|
269
292
|
console.log(addresses.clawnch.vestedDevBuy);
|
|
270
293
|
```
|
|
271
294
|
|
|
272
|
-
### Base Mainnet
|
|
295
|
+
### Base Mainnet (v2)
|
|
273
296
|
|
|
274
297
|
| Contract | Address |
|
|
275
298
|
|----------|---------|
|
|
276
|
-
|
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
280
|
-
|
|
|
281
|
-
|
|
|
282
|
-
|
|
|
283
|
-
|
|
|
284
|
-
|
|
|
285
|
-
|
|
286
|
-
### Base Sepolia (
|
|
299
|
+
| ClawnchFactory | `0xD1Ef6D6E52c3660acF3e38Ce85918E03b00F3b70` |
|
|
300
|
+
| ClawnchHookStaticFeeV2 | `0x2F9354Bbb0eDEf5c2a5C4b78D0C59D73412A28CC` |
|
|
301
|
+
| ClawnchLpLockerFeeConversion | `0x4392208F617a93A69012f6505CAE424d5f643eA8` |
|
|
302
|
+
| ClawnchFeeLocker | `0x684D450F74EB907232a442E833301bd0840ADfe4` |
|
|
303
|
+
| ClawnchMevDescendingFees | `0x6300A1B2d956B0C7628770AFC806c1B3207Cff90` |
|
|
304
|
+
| ClawnchVault | `0xE318caF46Fb3CA107f063697cde87d7529a49f2d` |
|
|
305
|
+
| ClawncherAirdropV2 | `0xdA0bf5C21bBA43aa6b99824D306Aa90BCd893F3E` |
|
|
306
|
+
| ClawncherUniv4EthDevBuy | `0x799B76F08C2Aa46eE3E7f894B845b2d943DF927C` |
|
|
307
|
+
| ClawncherVestedDevBuy | `0x937e5Dc79C28251B9914b840c399476a49310Edb` |
|
|
308
|
+
|
|
309
|
+
### Base Sepolia (v2)
|
|
287
310
|
|
|
288
311
|
| Contract | Address |
|
|
289
312
|
|----------|---------|
|
|
290
|
-
|
|
|
291
|
-
|
|
|
292
|
-
|
|
|
293
|
-
|
|
|
294
|
-
|
|
|
295
|
-
|
|
|
296
|
-
|
|
|
297
|
-
|
|
|
298
|
-
| VestedDevBuy | `0x06A192ef88cAc5eF4b11fE039346406cA32f8C34` |
|
|
313
|
+
| ClawnchFactory | `0x28dBee5558AaA4089f7c868437832e7C1AC29E80` |
|
|
314
|
+
| ClawnchHookStaticFeeV2 | `0x5eD28D497173cA7B5A5f5792642107B1fdaE28CC` |
|
|
315
|
+
| ClawnchLpLockerFeeConversion | `0xCB4A971a7F832A42a71a25bA9dbd2b4F17B9996E` |
|
|
316
|
+
| ClawnchFeeLocker | `0x9a078804F3bdf9F61f91B1C58DA00E7432C187C0` |
|
|
317
|
+
| ClawnchMevDescendingFees | `0x1A93552359351a1506603a3De00860c255a2Af35` |
|
|
318
|
+
| ClawnchVault | `0x9ea0717F1Dd8B4828398B37fcD3Eb5109c0e62b6` |
|
|
319
|
+
| ClawncherAirdropV2 | `0x9A9d30f208A7870093bE1C7d852d606A46c3Fb87` |
|
|
320
|
+
| ClawncherUniv4EthDevBuy | `0x0111A7d983135b0A348646A8129B3d54E780D2fE` |
|
|
299
321
|
|
|
300
322
|
## Types
|
|
301
323
|
|
|
@@ -317,14 +339,14 @@ import type {
|
|
|
317
339
|
MevConfigInfo,
|
|
318
340
|
TokenRewardInfo,
|
|
319
341
|
WalletFeeInfo,
|
|
320
|
-
} from '@clawnch/sdk';
|
|
342
|
+
} from '@clawnch/clawncher-sdk';
|
|
321
343
|
```
|
|
322
344
|
|
|
323
345
|
## Links
|
|
324
346
|
|
|
325
|
-
- **Website:** https://clawn.ch
|
|
326
|
-
- **CLI:** `npm install -g
|
|
327
|
-
- **
|
|
347
|
+
- **Website:** https://clawn.ch/er
|
|
348
|
+
- **CLI:** `npm install -g clawncher`
|
|
349
|
+
- **Documentation:** https://clawn.ch/er/docs
|
|
328
350
|
|
|
329
351
|
## License
|
|
330
352
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clawnch/clawncher-sdk",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "TypeScript SDK for Clawncher - token launcher on Base, optimized for agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,11 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"author": "Clawncher",
|
|
37
37
|
"license": "MIT",
|
|
38
|
-
"
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "https://github.com/clawnch/clawncher"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://clawn.ch",
|
|
38
|
+
"homepage": "https://clawn.ch/er",
|
|
43
39
|
"engines": {
|
|
44
40
|
"node": ">=18"
|
|
45
41
|
},
|