clawclick-sdk 0.1.8 → 1.0.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.
Files changed (68) hide show
  1. package/README.md +3 -3
  2. package/dist/abi.d.ts +41 -0
  3. package/dist/abi.d.ts.map +1 -1
  4. package/dist/abi.js +17 -0
  5. package/dist/abi.js.map +1 -1
  6. package/dist/api.d.ts +158 -0
  7. package/dist/api.d.ts.map +1 -0
  8. package/dist/api.js +118 -0
  9. package/dist/api.js.map +1 -0
  10. package/dist/chain.d.ts +119 -0
  11. package/dist/chain.d.ts.map +1 -0
  12. package/dist/chain.js +414 -0
  13. package/dist/chain.js.map +1 -0
  14. package/dist/cli/commands/agent-info.d.ts +8 -0
  15. package/dist/cli/commands/agent-info.d.ts.map +1 -0
  16. package/dist/cli/commands/agent-info.js +97 -0
  17. package/dist/cli/commands/agent-info.js.map +1 -0
  18. package/dist/cli/commands/create.d.ts +10 -0
  19. package/dist/cli/commands/create.d.ts.map +1 -0
  20. package/dist/cli/commands/create.js +53 -0
  21. package/dist/cli/commands/create.js.map +1 -0
  22. package/dist/cli/commands/deploy.d.ts +12 -0
  23. package/dist/cli/commands/deploy.d.ts.map +1 -0
  24. package/dist/cli/commands/deploy.js +190 -0
  25. package/dist/cli/commands/deploy.js.map +1 -0
  26. package/dist/cli/commands/funlan.d.ts +8 -0
  27. package/dist/cli/commands/funlan.d.ts.map +1 -0
  28. package/dist/cli/commands/funlan.js +129 -0
  29. package/dist/cli/commands/funlan.js.map +1 -0
  30. package/dist/cli/commands/immortalize.d.ts +13 -0
  31. package/dist/cli/commands/immortalize.d.ts.map +1 -0
  32. package/dist/cli/commands/immortalize.js +165 -0
  33. package/dist/cli/commands/immortalize.js.map +1 -0
  34. package/dist/cli/commands/init.d.ts +10 -0
  35. package/dist/cli/commands/init.d.ts.map +1 -0
  36. package/dist/cli/commands/init.js +177 -0
  37. package/dist/cli/commands/init.js.map +1 -0
  38. package/dist/cli/commands/memory.d.ts +11 -0
  39. package/dist/cli/commands/memory.d.ts.map +1 -0
  40. package/dist/cli/commands/memory.js +200 -0
  41. package/dist/cli/commands/memory.js.map +1 -0
  42. package/dist/cli/commands/session.d.ts +14 -0
  43. package/dist/cli/commands/session.d.ts.map +1 -0
  44. package/dist/cli/commands/session.js +313 -0
  45. package/dist/cli/commands/session.js.map +1 -0
  46. package/dist/cli/commands/status.d.ts +6 -0
  47. package/dist/cli/commands/status.d.ts.map +1 -0
  48. package/dist/cli/commands/status.js +96 -0
  49. package/dist/cli/commands/status.js.map +1 -0
  50. package/dist/cli/index.js +20 -0
  51. package/dist/cli/index.js.map +1 -1
  52. package/dist/contracts.d.ts +381 -0
  53. package/dist/contracts.d.ts.map +1 -0
  54. package/dist/contracts.js +213 -0
  55. package/dist/contracts.js.map +1 -0
  56. package/dist/funlan.d.ts +18 -0
  57. package/dist/funlan.d.ts.map +1 -0
  58. package/dist/funlan.js +85 -0
  59. package/dist/funlan.js.map +1 -0
  60. package/dist/index.d.ts +10 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +45 -2
  63. package/dist/index.js.map +1 -1
  64. package/dist/wallet.d.ts +61 -0
  65. package/dist/wallet.d.ts.map +1 -0
  66. package/dist/wallet.js +115 -0
  67. package/dist/wallet.js.map +1 -0
  68. package/package.json +7 -5
@@ -0,0 +1,381 @@
1
+ /**
2
+ * ClawClick SDK — Contract addresses, ABIs & constants
3
+ *
4
+ * Networks:
5
+ * - **Base mainnet** (chain 8453) — Production
6
+ * - **Sepolia testnet** (chain 11155111) — Development/testing
7
+ *
8
+ * Contracts:
9
+ * - AgentBirthCertificateNFT — Soulbound identity NFT (one per agent)
10
+ * - MemoryStorage — On-chain memory index (text + content hashes)
11
+ * - ClawclickFactory — Uniswap V4 token factory
12
+ * - AgentLaunchBundler — Bundled deploy (token + birth cert in 1 tx)
13
+ */
14
+ export declare const ADDRESSES: {
15
+ readonly sepolia: {
16
+ readonly birthCertificate: `0x${string}`;
17
+ readonly memoryStorage: `0x${string}`;
18
+ readonly factory: `0x${string}`;
19
+ readonly hook: `0x${string}`;
20
+ readonly config: `0x${string}`;
21
+ readonly bootstrapETH: `0x${string}`;
22
+ readonly poolManager: `0x${string}`;
23
+ readonly positionManager: `0x${string}`;
24
+ readonly treasury: `0x${string}`;
25
+ readonly bundler: `0x${string}`;
26
+ };
27
+ readonly base: {
28
+ readonly birthCertificate: `0x${string}`;
29
+ readonly memoryStorage: `0x${string}`;
30
+ readonly factory: `0x${string}`;
31
+ readonly hook: `0x${string}`;
32
+ readonly config: `0x${string}`;
33
+ readonly bootstrapETH: `0x${string}`;
34
+ readonly poolManager: `0x${string}`;
35
+ readonly positionManager: `0x${string}`;
36
+ readonly treasury: `0x${string}`;
37
+ readonly bundler: `0x${string}`;
38
+ };
39
+ };
40
+ export type Network = 'sepolia' | 'base';
41
+ export declare function getAddresses(network: Network): {
42
+ readonly birthCertificate: `0x${string}`;
43
+ readonly memoryStorage: `0x${string}`;
44
+ readonly factory: `0x${string}`;
45
+ readonly hook: `0x${string}`;
46
+ readonly config: `0x${string}`;
47
+ readonly bootstrapETH: `0x${string}`;
48
+ readonly poolManager: `0x${string}`;
49
+ readonly positionManager: `0x${string}`;
50
+ readonly treasury: `0x${string}`;
51
+ readonly bundler: `0x${string}`;
52
+ } | {
53
+ readonly birthCertificate: `0x${string}`;
54
+ readonly memoryStorage: `0x${string}`;
55
+ readonly factory: `0x${string}`;
56
+ readonly hook: `0x${string}`;
57
+ readonly config: `0x${string}`;
58
+ readonly bootstrapETH: `0x${string}`;
59
+ readonly poolManager: `0x${string}`;
60
+ readonly positionManager: `0x${string}`;
61
+ readonly treasury: `0x${string}`;
62
+ readonly bundler: `0x${string}`;
63
+ };
64
+ /** Immortalization fee — 0.005 ETH */
65
+ export declare const IMMORTALIZATION_FEE = "0.005";
66
+ /** Memory upload fee — 0.0005 ETH */
67
+ export declare const MEMORY_UPLOAD_FEE = "0.0005";
68
+ export declare const BIRTH_CERTIFICATE_ABI: readonly [{
69
+ readonly inputs: readonly [];
70
+ readonly name: "totalAgents";
71
+ readonly outputs: readonly [{
72
+ readonly type: "uint256";
73
+ }];
74
+ readonly stateMutability: "view";
75
+ readonly type: "function";
76
+ }, {
77
+ readonly inputs: readonly [{
78
+ readonly name: "wallet";
79
+ readonly type: "address";
80
+ }];
81
+ readonly name: "nftByWallet";
82
+ readonly outputs: readonly [{
83
+ readonly type: "uint256";
84
+ }];
85
+ readonly stateMutability: "view";
86
+ readonly type: "function";
87
+ }, {
88
+ readonly inputs: readonly [{
89
+ readonly name: "nftId";
90
+ readonly type: "uint256";
91
+ }];
92
+ readonly name: "agentByNFT";
93
+ readonly outputs: readonly [{
94
+ readonly name: "nftId";
95
+ readonly type: "uint256";
96
+ }, {
97
+ readonly name: "birthTimestamp";
98
+ readonly type: "uint256";
99
+ }, {
100
+ readonly name: "name";
101
+ readonly type: "string";
102
+ }, {
103
+ readonly name: "wallet";
104
+ readonly type: "address";
105
+ }, {
106
+ readonly name: "tokenAddress";
107
+ readonly type: "address";
108
+ }, {
109
+ readonly name: "creator";
110
+ readonly type: "address";
111
+ }, {
112
+ readonly name: "socialHandle";
113
+ readonly type: "string";
114
+ }, {
115
+ readonly name: "memoryCID";
116
+ readonly type: "string";
117
+ }, {
118
+ readonly name: "avatarCID";
119
+ readonly type: "string";
120
+ }, {
121
+ readonly name: "ensName";
122
+ readonly type: "string";
123
+ }, {
124
+ readonly name: "dnaHash";
125
+ readonly type: "bytes32";
126
+ }, {
127
+ readonly name: "immortalized";
128
+ readonly type: "bool";
129
+ }, {
130
+ readonly name: "spawnedAgents";
131
+ readonly type: "uint256";
132
+ }];
133
+ readonly stateMutability: "view";
134
+ readonly type: "function";
135
+ }, {
136
+ readonly inputs: readonly [{
137
+ readonly name: "wallet";
138
+ readonly type: "address";
139
+ }, {
140
+ readonly name: "tokenAddress";
141
+ readonly type: "address";
142
+ }, {
143
+ readonly name: "creator";
144
+ readonly type: "address";
145
+ }, {
146
+ readonly name: "name";
147
+ readonly type: "string";
148
+ }, {
149
+ readonly name: "socialHandle";
150
+ readonly type: "string";
151
+ }, {
152
+ readonly name: "memoryCID";
153
+ readonly type: "string";
154
+ }, {
155
+ readonly name: "avatarCID";
156
+ readonly type: "string";
157
+ }, {
158
+ readonly name: "ensName";
159
+ readonly type: "string";
160
+ }];
161
+ readonly name: "mintBirthCertificate";
162
+ readonly outputs: readonly [{
163
+ readonly type: "uint256";
164
+ }];
165
+ readonly stateMutability: "payable";
166
+ readonly type: "function";
167
+ }, {
168
+ readonly inputs: readonly [{
169
+ readonly name: "memoryCID";
170
+ readonly type: "string";
171
+ }];
172
+ readonly name: "updateMemory";
173
+ readonly outputs: readonly [];
174
+ readonly stateMutability: "nonpayable";
175
+ readonly type: "function";
176
+ }, {
177
+ readonly inputs: readonly [{
178
+ readonly name: "nftId";
179
+ readonly type: "uint256";
180
+ }, {
181
+ readonly name: "tokenAddress";
182
+ readonly type: "address";
183
+ }];
184
+ readonly name: "updateTokenAddress";
185
+ readonly outputs: readonly [];
186
+ readonly stateMutability: "nonpayable";
187
+ readonly type: "function";
188
+ }];
189
+ export declare const MEMORY_STORAGE_ABI: readonly [{
190
+ readonly inputs: readonly [{
191
+ readonly name: "agent";
192
+ readonly type: "address";
193
+ }];
194
+ readonly name: "getMemoryCount";
195
+ readonly outputs: readonly [{
196
+ readonly type: "uint256";
197
+ }];
198
+ readonly stateMutability: "view";
199
+ readonly type: "function";
200
+ }, {
201
+ readonly inputs: readonly [{
202
+ readonly name: "agent";
203
+ readonly type: "address";
204
+ }, {
205
+ readonly name: "index";
206
+ readonly type: "uint256";
207
+ }];
208
+ readonly name: "getMemory";
209
+ readonly outputs: readonly [{
210
+ readonly type: "tuple";
211
+ readonly components: readonly [{
212
+ readonly name: "timestamp";
213
+ readonly type: "uint256";
214
+ }, {
215
+ readonly name: "ipfsCID";
216
+ readonly type: "string";
217
+ }, {
218
+ readonly name: "fullText";
219
+ readonly type: "string";
220
+ }, {
221
+ readonly name: "contentHash";
222
+ readonly type: "bytes32";
223
+ }];
224
+ }];
225
+ readonly stateMutability: "view";
226
+ readonly type: "function";
227
+ }, {
228
+ readonly inputs: readonly [{
229
+ readonly name: "ipfsCID";
230
+ readonly type: "string";
231
+ }, {
232
+ readonly name: "fullText";
233
+ readonly type: "string";
234
+ }, {
235
+ readonly name: "nonce";
236
+ readonly type: "uint256";
237
+ }, {
238
+ readonly name: "signature";
239
+ readonly type: "bytes";
240
+ }];
241
+ readonly name: "storeMemory";
242
+ readonly outputs: readonly [];
243
+ readonly stateMutability: "nonpayable";
244
+ readonly type: "function";
245
+ }, {
246
+ readonly inputs: readonly [{
247
+ readonly name: "agent";
248
+ readonly type: "address";
249
+ }];
250
+ readonly name: "getNonce";
251
+ readonly outputs: readonly [{
252
+ readonly type: "uint256";
253
+ }];
254
+ readonly stateMutability: "view";
255
+ readonly type: "function";
256
+ }, {
257
+ readonly inputs: readonly [{
258
+ readonly name: "agent";
259
+ readonly type: "address";
260
+ }];
261
+ readonly name: "getLatestMemory";
262
+ readonly outputs: readonly [{
263
+ readonly type: "string";
264
+ }];
265
+ readonly stateMutability: "view";
266
+ readonly type: "function";
267
+ }];
268
+ export declare const LAUNCH_BUNDLER_ABI: readonly [{
269
+ readonly inputs: readonly [{
270
+ readonly name: "launchParams";
271
+ readonly type: "tuple";
272
+ readonly components: readonly [{
273
+ readonly name: "name";
274
+ readonly type: "string";
275
+ }, {
276
+ readonly name: "symbol";
277
+ readonly type: "string";
278
+ }, {
279
+ readonly name: "beneficiary";
280
+ readonly type: "address";
281
+ }, {
282
+ readonly name: "agentWallet";
283
+ readonly type: "address";
284
+ }, {
285
+ readonly name: "targetMcapETH";
286
+ readonly type: "uint256";
287
+ }, {
288
+ readonly name: "feeSplit";
289
+ readonly type: "tuple";
290
+ readonly components: readonly [{
291
+ readonly name: "wallets";
292
+ readonly type: "address[5]";
293
+ }, {
294
+ readonly name: "percentages";
295
+ readonly type: "uint16[5]";
296
+ }, {
297
+ readonly name: "count";
298
+ readonly type: "uint8";
299
+ }];
300
+ }, {
301
+ readonly name: "launchType";
302
+ readonly type: "uint8";
303
+ }];
304
+ }, {
305
+ readonly name: "agentWallet";
306
+ readonly type: "address";
307
+ }, {
308
+ readonly name: "creator";
309
+ readonly type: "address";
310
+ }, {
311
+ readonly name: "agentName";
312
+ readonly type: "string";
313
+ }, {
314
+ readonly name: "socialHandle";
315
+ readonly type: "string";
316
+ }, {
317
+ readonly name: "memoryCID";
318
+ readonly type: "string";
319
+ }, {
320
+ readonly name: "avatarCID";
321
+ readonly type: "string";
322
+ }, {
323
+ readonly name: "ensName";
324
+ readonly type: "string";
325
+ }];
326
+ readonly name: "launchAndMint";
327
+ readonly outputs: readonly [{
328
+ readonly name: "token";
329
+ readonly type: "address";
330
+ }, {
331
+ readonly name: "poolId";
332
+ readonly type: "bytes32";
333
+ }, {
334
+ readonly name: "nftId";
335
+ readonly type: "uint256";
336
+ }];
337
+ readonly stateMutability: "payable";
338
+ readonly type: "function";
339
+ }, {
340
+ readonly anonymous: false;
341
+ readonly name: "AgentLaunchBundled";
342
+ readonly type: "event";
343
+ readonly inputs: readonly [{
344
+ readonly indexed: true;
345
+ readonly name: "token";
346
+ readonly type: "address";
347
+ }, {
348
+ readonly indexed: true;
349
+ readonly name: "nftId";
350
+ readonly type: "uint256";
351
+ }, {
352
+ readonly indexed: false;
353
+ readonly name: "poolId";
354
+ readonly type: "bytes32";
355
+ }, {
356
+ readonly indexed: true;
357
+ readonly name: "creator";
358
+ readonly type: "address";
359
+ }, {
360
+ readonly indexed: false;
361
+ readonly name: "agentWallet";
362
+ readonly type: "address";
363
+ }];
364
+ }, {
365
+ readonly inputs: readonly [];
366
+ readonly name: "factory";
367
+ readonly outputs: readonly [{
368
+ readonly type: "address";
369
+ }];
370
+ readonly stateMutability: "view";
371
+ readonly type: "function";
372
+ }, {
373
+ readonly inputs: readonly [];
374
+ readonly name: "birthCert";
375
+ readonly outputs: readonly [{
376
+ readonly type: "address";
377
+ }];
378
+ readonly stateMutability: "view";
379
+ readonly type: "function";
380
+ }];
381
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,SAAS;;mCAEgD,KAAK,MAAM,EAAE;gCAChB,KAAK,MAAM,EAAE;0BACnB,KAAK,MAAM,EAAE;uBAChB,KAAK,MAAM,EAAE;yBACX,KAAK,MAAM,EAAE;+BACP,KAAK,MAAM,EAAE;8BACd,KAAK,MAAM,EAAE;kCACT,KAAK,MAAM,EAAE;2BACpB,KAAK,MAAM,EAAE;0BACd,KAAK,MAAM,EAAE;;;mCAGJ,KAAK,MAAM,EAAE;gCAChB,KAAK,MAAM,EAAE;0BACnB,KAAK,MAAM,EAAE;uBAChB,KAAK,MAAM,EAAE;yBACX,KAAK,MAAM,EAAE;+BACP,KAAK,MAAM,EAAE;8BACd,KAAK,MAAM,EAAE;kCACT,KAAK,MAAM,EAAE;2BACpB,KAAK,MAAM,EAAE;0BACd,KAAK,MAAM,EAAE;;CAEhE,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO;+BA3ByB,KAAK,MAAM,EAAE;4BAChB,KAAK,MAAM,EAAE;sBACnB,KAAK,MAAM,EAAE;mBAChB,KAAK,MAAM,EAAE;qBACX,KAAK,MAAM,EAAE;2BACP,KAAK,MAAM,EAAE;0BACd,KAAK,MAAM,EAAE;8BACT,KAAK,MAAM,EAAE;uBACpB,KAAK,MAAM,EAAE;sBACd,KAAK,MAAM,EAAE;;+BAGJ,KAAK,MAAM,EAAE;4BAChB,KAAK,MAAM,EAAE;sBACnB,KAAK,MAAM,EAAE;mBAChB,KAAK,MAAM,EAAE;qBACX,KAAK,MAAM,EAAE;2BACP,KAAK,MAAM,EAAE;0BACd,KAAK,MAAM,EAAE;8BACT,KAAK,MAAM,EAAE;uBACpB,KAAK,MAAM,EAAE;sBACd,KAAK,MAAM,EAAE;EAQzE;AAID,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAE3C,qCAAqC;AACrC,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAI1C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDxB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDrB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDrB,CAAC"}
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+ /**
3
+ * ClawClick SDK — Contract addresses, ABIs & constants
4
+ *
5
+ * Networks:
6
+ * - **Base mainnet** (chain 8453) — Production
7
+ * - **Sepolia testnet** (chain 11155111) — Development/testing
8
+ *
9
+ * Contracts:
10
+ * - AgentBirthCertificateNFT — Soulbound identity NFT (one per agent)
11
+ * - MemoryStorage — On-chain memory index (text + content hashes)
12
+ * - ClawclickFactory — Uniswap V4 token factory
13
+ * - AgentLaunchBundler — Bundled deploy (token + birth cert in 1 tx)
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LAUNCH_BUNDLER_ABI = exports.MEMORY_STORAGE_ABI = exports.BIRTH_CERTIFICATE_ABI = exports.MEMORY_UPLOAD_FEE = exports.IMMORTALIZATION_FEE = exports.ADDRESSES = void 0;
17
+ exports.getAddresses = getAddresses;
18
+ exports.ADDRESSES = {
19
+ sepolia: {
20
+ birthCertificate: '0xE13532b0bD16E87088383f9F909EaCB03009a2e9',
21
+ memoryStorage: '0xC2D9c0ccc1656535e29B5c2398a609ef936aad75',
22
+ factory: '0x3f4bFd32362D058157A5F43d7861aCdC0484C415',
23
+ hook: '0xf537a9356f6909df0A633C8BC48e504D2a30B111',
24
+ config: '0xf01514F68Df33689046F6Dd4184edCaA54fF4492',
25
+ bootstrapETH: '0xC52b027928AfAa54f1f0FeC0e4D7b6397026f660',
26
+ poolManager: '0xE03A1074c86CFeDd5C142C4F04F1a1536e203543',
27
+ positionManager: '0x429ba70129df741B2Ca2a85BC3A2a3328e5c09b4',
28
+ treasury: '0xFf7549B06E68186C91a6737bc0f0CDE1245e349b',
29
+ bundler: '0x579F512FA05CFd66033B06d8816915bA2Be971CE',
30
+ },
31
+ base: {
32
+ birthCertificate: '0x6E9B093FdD12eC34ce358bd70CF59EeCb5D1A95B',
33
+ memoryStorage: '0x81ae37d31C488094bf292ebEb15C6eCfcD9Fad7D',
34
+ factory: '0xF5979D0fEEd05CEcb94cf62B76FE7E9aB40c6b4a',
35
+ hook: '0x8265be7eb9D7e40c1FAb6CBd8DBc626b31A0aac8',
36
+ config: '0x18b89e491d8f12d2be6D2A8e945dF4D93F1247a7',
37
+ bootstrapETH: '0xE2649737D3005c511a27DF6388871a12bE0a2d30',
38
+ poolManager: '0x498581fF718922c3f8e6A244956aF099B2652b2b',
39
+ positionManager: '0x7C5f5A4bBd8fD63184577525326123b519429bDc',
40
+ treasury: '0xFf7549B06E68186C91a6737bc0f0CDE1245e349b',
41
+ bundler: '0x1AF3b3Cd703Ff59D18A295f669Ad9B7051707268',
42
+ },
43
+ };
44
+ function getAddresses(network) {
45
+ return exports.ADDRESSES[network];
46
+ }
47
+ // ─── Constants ──────────────────────────────────────────────────────────────
48
+ /** Immortalization fee — 0.005 ETH */
49
+ exports.IMMORTALIZATION_FEE = '0.005';
50
+ /** Memory upload fee — 0.0005 ETH */
51
+ exports.MEMORY_UPLOAD_FEE = '0.0005';
52
+ // ─── Minimal ABIs (only the functions the SDK needs) ────────────────────────
53
+ exports.BIRTH_CERTIFICATE_ABI = [
54
+ { inputs: [], name: 'totalAgents', outputs: [{ type: 'uint256' }], stateMutability: 'view', type: 'function' },
55
+ { inputs: [{ name: 'wallet', type: 'address' }], name: 'nftByWallet', outputs: [{ type: 'uint256' }], stateMutability: 'view', type: 'function' },
56
+ {
57
+ inputs: [{ name: 'nftId', type: 'uint256' }],
58
+ name: 'agentByNFT',
59
+ outputs: [
60
+ { name: 'nftId', type: 'uint256' },
61
+ { name: 'birthTimestamp', type: 'uint256' },
62
+ { name: 'name', type: 'string' },
63
+ { name: 'wallet', type: 'address' },
64
+ { name: 'tokenAddress', type: 'address' },
65
+ { name: 'creator', type: 'address' },
66
+ { name: 'socialHandle', type: 'string' },
67
+ { name: 'memoryCID', type: 'string' },
68
+ { name: 'avatarCID', type: 'string' },
69
+ { name: 'ensName', type: 'string' },
70
+ { name: 'dnaHash', type: 'bytes32' },
71
+ { name: 'immortalized', type: 'bool' },
72
+ { name: 'spawnedAgents', type: 'uint256' },
73
+ ],
74
+ stateMutability: 'view',
75
+ type: 'function',
76
+ },
77
+ {
78
+ inputs: [
79
+ { name: 'wallet', type: 'address' },
80
+ { name: 'tokenAddress', type: 'address' },
81
+ { name: 'creator', type: 'address' },
82
+ { name: 'name', type: 'string' },
83
+ { name: 'socialHandle', type: 'string' },
84
+ { name: 'memoryCID', type: 'string' },
85
+ { name: 'avatarCID', type: 'string' },
86
+ { name: 'ensName', type: 'string' },
87
+ ],
88
+ name: 'mintBirthCertificate',
89
+ outputs: [{ type: 'uint256' }],
90
+ stateMutability: 'payable',
91
+ type: 'function',
92
+ },
93
+ {
94
+ inputs: [{ name: 'memoryCID', type: 'string' }],
95
+ name: 'updateMemory',
96
+ outputs: [],
97
+ stateMutability: 'nonpayable',
98
+ type: 'function',
99
+ },
100
+ {
101
+ inputs: [{ name: 'nftId', type: 'uint256' }, { name: 'tokenAddress', type: 'address' }],
102
+ name: 'updateTokenAddress',
103
+ outputs: [],
104
+ stateMutability: 'nonpayable',
105
+ type: 'function',
106
+ },
107
+ ];
108
+ exports.MEMORY_STORAGE_ABI = [
109
+ {
110
+ inputs: [{ name: 'agent', type: 'address' }],
111
+ name: 'getMemoryCount',
112
+ outputs: [{ type: 'uint256' }],
113
+ stateMutability: 'view',
114
+ type: 'function',
115
+ },
116
+ {
117
+ inputs: [{ name: 'agent', type: 'address' }, { name: 'index', type: 'uint256' }],
118
+ name: 'getMemory',
119
+ outputs: [{
120
+ type: 'tuple',
121
+ components: [
122
+ { name: 'timestamp', type: 'uint256' },
123
+ { name: 'ipfsCID', type: 'string' },
124
+ { name: 'fullText', type: 'string' },
125
+ { name: 'contentHash', type: 'bytes32' },
126
+ ],
127
+ }],
128
+ stateMutability: 'view',
129
+ type: 'function',
130
+ },
131
+ {
132
+ inputs: [
133
+ { name: 'ipfsCID', type: 'string' },
134
+ { name: 'fullText', type: 'string' },
135
+ { name: 'nonce', type: 'uint256' },
136
+ { name: 'signature', type: 'bytes' },
137
+ ],
138
+ name: 'storeMemory',
139
+ outputs: [],
140
+ stateMutability: 'nonpayable',
141
+ type: 'function',
142
+ },
143
+ {
144
+ inputs: [{ name: 'agent', type: 'address' }],
145
+ name: 'getNonce',
146
+ outputs: [{ type: 'uint256' }],
147
+ stateMutability: 'view',
148
+ type: 'function',
149
+ },
150
+ {
151
+ inputs: [{ name: 'agent', type: 'address' }],
152
+ name: 'getLatestMemory',
153
+ outputs: [{ type: 'string' }],
154
+ stateMutability: 'view',
155
+ type: 'function',
156
+ },
157
+ ];
158
+ exports.LAUNCH_BUNDLER_ABI = [
159
+ {
160
+ inputs: [
161
+ {
162
+ name: 'launchParams',
163
+ type: 'tuple',
164
+ components: [
165
+ { name: 'name', type: 'string' },
166
+ { name: 'symbol', type: 'string' },
167
+ { name: 'beneficiary', type: 'address' },
168
+ { name: 'agentWallet', type: 'address' },
169
+ { name: 'targetMcapETH', type: 'uint256' },
170
+ {
171
+ name: 'feeSplit', type: 'tuple',
172
+ components: [
173
+ { name: 'wallets', type: 'address[5]' },
174
+ { name: 'percentages', type: 'uint16[5]' },
175
+ { name: 'count', type: 'uint8' },
176
+ ],
177
+ },
178
+ { name: 'launchType', type: 'uint8' },
179
+ ],
180
+ },
181
+ { name: 'agentWallet', type: 'address' },
182
+ { name: 'creator', type: 'address' },
183
+ { name: 'agentName', type: 'string' },
184
+ { name: 'socialHandle', type: 'string' },
185
+ { name: 'memoryCID', type: 'string' },
186
+ { name: 'avatarCID', type: 'string' },
187
+ { name: 'ensName', type: 'string' },
188
+ ],
189
+ name: 'launchAndMint',
190
+ outputs: [
191
+ { name: 'token', type: 'address' },
192
+ { name: 'poolId', type: 'bytes32' },
193
+ { name: 'nftId', type: 'uint256' },
194
+ ],
195
+ stateMutability: 'payable',
196
+ type: 'function',
197
+ },
198
+ {
199
+ anonymous: false,
200
+ name: 'AgentLaunchBundled',
201
+ type: 'event',
202
+ inputs: [
203
+ { indexed: true, name: 'token', type: 'address' },
204
+ { indexed: true, name: 'nftId', type: 'uint256' },
205
+ { indexed: false, name: 'poolId', type: 'bytes32' },
206
+ { indexed: true, name: 'creator', type: 'address' },
207
+ { indexed: false, name: 'agentWallet', type: 'address' },
208
+ ],
209
+ },
210
+ { inputs: [], name: 'factory', outputs: [{ type: 'address' }], stateMutability: 'view', type: 'function' },
211
+ { inputs: [], name: 'birthCert', outputs: [{ type: 'address' }], stateMutability: 'view', type: 'function' },
212
+ ];
213
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AA+BH,oCAEC;AA/BY,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE;QACP,gBAAgB,EAAE,4CAA6D;QAC/E,aAAa,EAAE,4CA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
+ * Deterministic 5x5 emoji grid from wallet address.
5
+ * Same wallet = same grid. Total combos: 120^25 ≈ 9.53 × 10^51
6
+ */
7
+ export interface FunlanGrid {
8
+ grid: string[][];
9
+ flat: string[];
10
+ text: string;
11
+ }
12
+ /** Generate a deterministic 5×5 FUNLAN emoji grid from a wallet address */
13
+ export declare function generateFunlanGrid(wallet: `0x${string}`): FunlanGrid;
14
+ /** Check if grid contains the lobster emoji 🦞 */
15
+ export declare function hasLobster(wallet: `0x${string}`): boolean;
16
+ /** Format grid as FUNLAN.md content */
17
+ export declare function toFunlanMarkdown(wallet: `0x${string}`): string;
18
+ //# sourceMappingURL=funlan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"funlan.d.ts","sourceRoot":"","sources":["../src/funlan.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA8BH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,UAAU,CAyBpE;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,OAAO,CAGzD;AAED,uCAAuC;AACvC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,CAe9D"}