@kasarlabs/unruggable-mcp 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.
@@ -0,0 +1,512 @@
1
+ export const FACTORY_ABI = [
2
+ {
3
+ type: 'impl',
4
+ name: 'FactoryImpl',
5
+ interface_name: 'unruggable::factory::interface::IFactory',
6
+ },
7
+ {
8
+ type: 'struct',
9
+ name: 'core::integer::u256',
10
+ members: [
11
+ {
12
+ name: 'low',
13
+ type: 'core::integer::u128',
14
+ },
15
+ {
16
+ name: 'high',
17
+ type: 'core::integer::u128',
18
+ },
19
+ ],
20
+ },
21
+ {
22
+ type: 'struct',
23
+ name: 'core::array::Span::<core::starknet::contract_address::ContractAddress>',
24
+ members: [
25
+ {
26
+ name: 'snapshot',
27
+ type: '@core::array::Array::<core::starknet::contract_address::ContractAddress>',
28
+ },
29
+ ],
30
+ },
31
+ {
32
+ type: 'struct',
33
+ name: 'core::array::Span::<core::integer::u256>',
34
+ members: [
35
+ {
36
+ name: 'snapshot',
37
+ type: '@core::array::Array::<core::integer::u256>',
38
+ },
39
+ ],
40
+ },
41
+ {
42
+ type: 'struct',
43
+ name: 'unruggable::factory::LaunchParameters',
44
+ members: [
45
+ {
46
+ name: 'memecoin_address',
47
+ type: 'core::starknet::contract_address::ContractAddress',
48
+ },
49
+ {
50
+ name: 'transfer_restriction_delay',
51
+ type: 'core::integer::u64',
52
+ },
53
+ {
54
+ name: 'max_percentage_buy_launch',
55
+ type: 'core::integer::u16',
56
+ },
57
+ {
58
+ name: 'quote_address',
59
+ type: 'core::starknet::contract_address::ContractAddress',
60
+ },
61
+ {
62
+ name: 'initial_holders',
63
+ type: 'core::array::Span::<core::starknet::contract_address::ContractAddress>',
64
+ },
65
+ {
66
+ name: 'initial_holders_amounts',
67
+ type: 'core::array::Span::<core::integer::u256>',
68
+ },
69
+ ],
70
+ },
71
+ {
72
+ type: 'enum',
73
+ name: 'core::bool',
74
+ variants: [
75
+ {
76
+ name: 'False',
77
+ type: '()',
78
+ },
79
+ {
80
+ name: 'True',
81
+ type: '()',
82
+ },
83
+ ],
84
+ },
85
+ {
86
+ type: 'struct',
87
+ name: 'ekubo::types::i129::i129',
88
+ members: [
89
+ {
90
+ name: 'mag',
91
+ type: 'core::integer::u128',
92
+ },
93
+ {
94
+ name: 'sign',
95
+ type: 'core::bool',
96
+ },
97
+ ],
98
+ },
99
+ {
100
+ type: 'struct',
101
+ name: 'unruggable::exchanges::ekubo::ekubo_adapter::EkuboPoolParameters',
102
+ members: [
103
+ {
104
+ name: 'fee',
105
+ type: 'core::integer::u128',
106
+ },
107
+ {
108
+ name: 'tick_spacing',
109
+ type: 'core::integer::u128',
110
+ },
111
+ {
112
+ name: 'starting_price',
113
+ type: 'ekubo::types::i129::i129',
114
+ },
115
+ {
116
+ name: 'bound',
117
+ type: 'core::integer::u128',
118
+ },
119
+ ],
120
+ },
121
+ {
122
+ type: 'struct',
123
+ name: 'ekubo::types::keys::PoolKey',
124
+ members: [
125
+ {
126
+ name: 'token0',
127
+ type: 'core::starknet::contract_address::ContractAddress',
128
+ },
129
+ {
130
+ name: 'token1',
131
+ type: 'core::starknet::contract_address::ContractAddress',
132
+ },
133
+ {
134
+ name: 'fee',
135
+ type: 'core::integer::u128',
136
+ },
137
+ {
138
+ name: 'tick_spacing',
139
+ type: 'core::integer::u128',
140
+ },
141
+ {
142
+ name: 'extension',
143
+ type: 'core::starknet::contract_address::ContractAddress',
144
+ },
145
+ ],
146
+ },
147
+ {
148
+ type: 'struct',
149
+ name: 'ekubo::types::bounds::Bounds',
150
+ members: [
151
+ {
152
+ name: 'lower',
153
+ type: 'ekubo::types::i129::i129',
154
+ },
155
+ {
156
+ name: 'upper',
157
+ type: 'ekubo::types::i129::i129',
158
+ },
159
+ ],
160
+ },
161
+ {
162
+ type: 'struct',
163
+ name: 'unruggable::exchanges::ekubo::launcher::EkuboLP',
164
+ members: [
165
+ {
166
+ name: 'owner',
167
+ type: 'core::starknet::contract_address::ContractAddress',
168
+ },
169
+ {
170
+ name: 'quote_address',
171
+ type: 'core::starknet::contract_address::ContractAddress',
172
+ },
173
+ {
174
+ name: 'pool_key',
175
+ type: 'ekubo::types::keys::PoolKey',
176
+ },
177
+ {
178
+ name: 'bounds',
179
+ type: 'ekubo::types::bounds::Bounds',
180
+ },
181
+ ],
182
+ },
183
+ {
184
+ type: 'enum',
185
+ name: 'unruggable::exchanges::SupportedExchanges',
186
+ variants: [
187
+ {
188
+ name: 'Jediswap',
189
+ type: '()',
190
+ },
191
+ {
192
+ name: 'Ekubo',
193
+ type: '()',
194
+ },
195
+ {
196
+ name: 'Starkdefi',
197
+ type: '()',
198
+ },
199
+ ],
200
+ },
201
+ {
202
+ type: 'enum',
203
+ name: 'unruggable::token::memecoin::LiquidityType',
204
+ variants: [
205
+ {
206
+ name: 'JediERC20',
207
+ type: 'core::starknet::contract_address::ContractAddress',
208
+ },
209
+ {
210
+ name: 'StarkDeFiERC20',
211
+ type: 'core::starknet::contract_address::ContractAddress',
212
+ },
213
+ {
214
+ name: 'EkuboNFT',
215
+ type: 'core::integer::u64',
216
+ },
217
+ ],
218
+ },
219
+ {
220
+ type: 'enum',
221
+ name: 'core::option::Option::<(core::starknet::contract_address::ContractAddress, unruggable::token::memecoin::LiquidityType)>',
222
+ variants: [
223
+ {
224
+ name: 'Some',
225
+ type: '(core::starknet::contract_address::ContractAddress, unruggable::token::memecoin::LiquidityType)',
226
+ },
227
+ {
228
+ name: 'None',
229
+ type: '()',
230
+ },
231
+ ],
232
+ },
233
+ {
234
+ type: 'interface',
235
+ name: 'unruggable::factory::interface::IFactory',
236
+ items: [
237
+ {
238
+ type: 'function',
239
+ name: 'create_memecoin',
240
+ inputs: [
241
+ {
242
+ name: 'owner',
243
+ type: 'core::starknet::contract_address::ContractAddress',
244
+ },
245
+ {
246
+ name: 'name',
247
+ type: 'core::felt252',
248
+ },
249
+ {
250
+ name: 'symbol',
251
+ type: 'core::felt252',
252
+ },
253
+ {
254
+ name: 'initial_supply',
255
+ type: 'core::integer::u256',
256
+ },
257
+ {
258
+ name: 'contract_address_salt',
259
+ type: 'core::felt252',
260
+ },
261
+ ],
262
+ outputs: [
263
+ {
264
+ type: 'core::starknet::contract_address::ContractAddress',
265
+ },
266
+ ],
267
+ state_mutability: 'external',
268
+ },
269
+ {
270
+ type: 'function',
271
+ name: 'launch_on_jediswap',
272
+ inputs: [
273
+ {
274
+ name: 'launch_parameters',
275
+ type: 'unruggable::factory::LaunchParameters',
276
+ },
277
+ {
278
+ name: 'quote_amount',
279
+ type: 'core::integer::u256',
280
+ },
281
+ {
282
+ name: 'unlock_time',
283
+ type: 'core::integer::u64',
284
+ },
285
+ ],
286
+ outputs: [
287
+ {
288
+ type: 'core::starknet::contract_address::ContractAddress',
289
+ },
290
+ ],
291
+ state_mutability: 'external',
292
+ },
293
+ {
294
+ type: 'function',
295
+ name: 'launch_on_ekubo',
296
+ inputs: [
297
+ {
298
+ name: 'launch_parameters',
299
+ type: 'unruggable::factory::LaunchParameters',
300
+ },
301
+ {
302
+ name: 'ekubo_parameters',
303
+ type: 'unruggable::exchanges::ekubo::ekubo_adapter::EkuboPoolParameters',
304
+ },
305
+ ],
306
+ outputs: [
307
+ {
308
+ type: '(core::integer::u64, unruggable::exchanges::ekubo::launcher::EkuboLP)',
309
+ },
310
+ ],
311
+ state_mutability: 'external',
312
+ },
313
+ {
314
+ type: 'function',
315
+ name: 'launch_on_starkdefi',
316
+ inputs: [
317
+ {
318
+ name: 'launch_parameters',
319
+ type: 'unruggable::factory::LaunchParameters',
320
+ },
321
+ {
322
+ name: 'quote_amount',
323
+ type: 'core::integer::u256',
324
+ },
325
+ {
326
+ name: 'unlock_time',
327
+ type: 'core::integer::u64',
328
+ },
329
+ ],
330
+ outputs: [
331
+ {
332
+ type: 'core::starknet::contract_address::ContractAddress',
333
+ },
334
+ ],
335
+ state_mutability: 'external',
336
+ },
337
+ {
338
+ type: 'function',
339
+ name: 'exchange_address',
340
+ inputs: [
341
+ {
342
+ name: 'exchange',
343
+ type: 'unruggable::exchanges::SupportedExchanges',
344
+ },
345
+ ],
346
+ outputs: [
347
+ {
348
+ type: 'core::starknet::contract_address::ContractAddress',
349
+ },
350
+ ],
351
+ state_mutability: 'view',
352
+ },
353
+ {
354
+ type: 'function',
355
+ name: 'locked_liquidity',
356
+ inputs: [
357
+ {
358
+ name: 'token',
359
+ type: 'core::starknet::contract_address::ContractAddress',
360
+ },
361
+ ],
362
+ outputs: [
363
+ {
364
+ type: 'core::option::Option::<(core::starknet::contract_address::ContractAddress, unruggable::token::memecoin::LiquidityType)>',
365
+ },
366
+ ],
367
+ state_mutability: 'view',
368
+ },
369
+ {
370
+ type: 'function',
371
+ name: 'is_memecoin',
372
+ inputs: [
373
+ {
374
+ name: 'address',
375
+ type: 'core::starknet::contract_address::ContractAddress',
376
+ },
377
+ ],
378
+ outputs: [
379
+ {
380
+ type: 'core::bool',
381
+ },
382
+ ],
383
+ state_mutability: 'view',
384
+ },
385
+ {
386
+ type: 'function',
387
+ name: 'ekubo_core_address',
388
+ inputs: [],
389
+ outputs: [
390
+ {
391
+ type: 'core::starknet::contract_address::ContractAddress',
392
+ },
393
+ ],
394
+ state_mutability: 'view',
395
+ },
396
+ ],
397
+ },
398
+ {
399
+ type: 'struct',
400
+ name: 'core::array::Span::<(unruggable::exchanges::SupportedExchanges, core::starknet::contract_address::ContractAddress)>',
401
+ members: [
402
+ {
403
+ name: 'snapshot',
404
+ type: '@core::array::Array::<(unruggable::exchanges::SupportedExchanges, core::starknet::contract_address::ContractAddress)>',
405
+ },
406
+ ],
407
+ },
408
+ {
409
+ type: 'struct',
410
+ name: 'core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress)>',
411
+ members: [
412
+ {
413
+ name: 'snapshot',
414
+ type: '@core::array::Array::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress)>',
415
+ },
416
+ ],
417
+ },
418
+ {
419
+ type: 'constructor',
420
+ name: 'constructor',
421
+ inputs: [
422
+ {
423
+ name: 'memecoin_class_hash',
424
+ type: 'core::starknet::class_hash::ClassHash',
425
+ },
426
+ {
427
+ name: 'lock_manager_address',
428
+ type: 'core::starknet::contract_address::ContractAddress',
429
+ },
430
+ {
431
+ name: 'exchanges',
432
+ type: 'core::array::Span::<(unruggable::exchanges::SupportedExchanges, core::starknet::contract_address::ContractAddress)>',
433
+ },
434
+ {
435
+ name: 'migrated_tokens',
436
+ type: 'core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress)>',
437
+ },
438
+ ],
439
+ },
440
+ {
441
+ type: 'event',
442
+ name: 'unruggable::factory::factory::Factory::MemecoinCreated',
443
+ kind: 'struct',
444
+ members: [
445
+ {
446
+ name: 'owner',
447
+ type: 'core::starknet::contract_address::ContractAddress',
448
+ kind: 'data',
449
+ },
450
+ {
451
+ name: 'name',
452
+ type: 'core::felt252',
453
+ kind: 'data',
454
+ },
455
+ {
456
+ name: 'symbol',
457
+ type: 'core::felt252',
458
+ kind: 'data',
459
+ },
460
+ {
461
+ name: 'initial_supply',
462
+ type: 'core::integer::u256',
463
+ kind: 'data',
464
+ },
465
+ {
466
+ name: 'memecoin_address',
467
+ type: 'core::starknet::contract_address::ContractAddress',
468
+ kind: 'data',
469
+ },
470
+ ],
471
+ },
472
+ {
473
+ type: 'event',
474
+ name: 'unruggable::factory::factory::Factory::MemecoinLaunched',
475
+ kind: 'struct',
476
+ members: [
477
+ {
478
+ name: 'memecoin_address',
479
+ type: 'core::starknet::contract_address::ContractAddress',
480
+ kind: 'data',
481
+ },
482
+ {
483
+ name: 'quote_token',
484
+ type: 'core::starknet::contract_address::ContractAddress',
485
+ kind: 'data',
486
+ },
487
+ {
488
+ name: 'exchange_name',
489
+ type: 'core::felt252',
490
+ kind: 'data',
491
+ },
492
+ ],
493
+ },
494
+ {
495
+ type: 'event',
496
+ name: 'unruggable::factory::factory::Factory::Event',
497
+ kind: 'enum',
498
+ variants: [
499
+ {
500
+ name: 'MemecoinCreated',
501
+ type: 'unruggable::factory::factory::Factory::MemecoinCreated',
502
+ kind: 'nested',
503
+ },
504
+ {
505
+ name: 'MemecoinLaunched',
506
+ type: 'unruggable::factory::factory::Factory::MemecoinLaunched',
507
+ kind: 'nested',
508
+ },
509
+ ],
510
+ },
511
+ ];
512
+ //# sourceMappingURL=unruggableFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unruggableFactory.js","sourceRoot":"","sources":["../../../src/lib/abis/unruggableFactory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,aAAa;QACnB,cAAc,EAAE,0CAA0C;KAC3D;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,qBAAqB;aAC5B;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,qBAAqB;aAC5B;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,wEAAwE;QAC9E,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,0EAA0E;aACjF;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,0CAA0C;QAChD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,4CAA4C;aACnD;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,uCAAuC;QAC7C,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,mDAAmD;aAC1D;YACD;gBACE,IAAI,EAAE,4BAA4B;gBAClC,IAAI,EAAE,oBAAoB;aAC3B;YACD;gBACE,IAAI,EAAE,2BAA2B;gBACjC,IAAI,EAAE,oBAAoB;aAC3B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AAI,EAAE,MAAM;aACb;YACD;gBACE,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,MAAM;aACb;YACD;gBACE,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,mDAAmD;gBACzD,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,yDAAyD;QAC/D,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,mDAAmD;gBACzD,IAAI,EAAE,MAAM;aACb;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,mDAAmD;gBACzD,IAAI,EAAE,MAAM;aACb;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,8CAA8C;QACpD,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,wDAAwD;gBAC9D,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,yDAAyD;gBAC/D,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const FACTORY_ADDRESS = "0x01a46467a9246f45c8c340f1f155266a26a71c07bd55d36e8d1c7d0d438a2dbc";
@@ -0,0 +1,2 @@
1
+ export const FACTORY_ADDRESS = '0x01a46467a9246f45c8c340f1f155266a26a71c07bd55d36e8d1c7d0d438a2dbc';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAC1B,oEAAoE,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { RpcProvider } from 'starknet';
2
+ import { SystemMessage } from '@langchain/core/messages';
3
+ import { z as Zod } from 'zod';
4
+ export interface StarknetTool<P = unknown> {
5
+ name: string;
6
+ plugins: string;
7
+ description: string;
8
+ schema?: Zod.AnyZodObject;
9
+ responseFormat?: string;
10
+ execute: (agent: SnakAgentInterface, params: P, plugins_manager?: any) => Promise<unknown>;
11
+ }
12
+ export interface SignatureTool<P = any> {
13
+ name: string;
14
+ categorie?: string;
15
+ description: string;
16
+ schema?: object;
17
+ execute: (params: P) => Promise<unknown>;
18
+ }
19
+ export declare enum AgentMode {
20
+ INTERACTIVE = "interactive",
21
+ AUTONOMOUS = "autonomous",
22
+ HYBRID = "hybrid"
23
+ }
24
+ export interface RawAgentConfig {
25
+ name: string;
26
+ group: string;
27
+ description: string;
28
+ lore: string[];
29
+ objectives: string[];
30
+ knowledge: string[];
31
+ interval: number;
32
+ plugins: string[];
33
+ memory: MemoryConfig;
34
+ rag?: RagConfig;
35
+ mcpServers?: Record<string, any>;
36
+ mode: AgentMode;
37
+ }
38
+ export interface MemoryConfig {
39
+ enabled?: boolean;
40
+ shortTermMemorySize?: number;
41
+ memorySize?: number;
42
+ maxIterations?: number;
43
+ embeddingModel?: string;
44
+ }
45
+ export interface RagConfig {
46
+ enabled?: boolean;
47
+ topK?: number;
48
+ embeddingModel?: string;
49
+ }
50
+ export interface AgentConfig {
51
+ id: string;
52
+ name: string;
53
+ group: string;
54
+ description: string;
55
+ interval: number;
56
+ chatId: string;
57
+ plugins: string[];
58
+ memory: MemoryConfig;
59
+ rag?: RagConfig;
60
+ mcpServers?: Record<string, any>;
61
+ mode: AgentMode;
62
+ maxIterations: number;
63
+ prompt: SystemMessage;
64
+ }
65
+ export interface DatabaseCredentials {
66
+ host: string;
67
+ port: number;
68
+ user: string;
69
+ password: string;
70
+ database: string;
71
+ }
72
+ export interface SnakAgentInterface {
73
+ getAccountCredentials: () => {
74
+ accountPublicKey: string;
75
+ accountPrivateKey: string;
76
+ };
77
+ getDatabaseCredentials: () => DatabaseCredentials;
78
+ getSignature: () => {
79
+ signature: string;
80
+ };
81
+ getProvider: () => RpcProvider;
82
+ getAgentConfig: () => AgentConfig;
83
+ }
84
+ import winston from 'winston';
85
+ export declare const logger: winston.Logger;
@@ -0,0 +1,51 @@
1
+ export var AgentMode;
2
+ (function (AgentMode) {
3
+ AgentMode["INTERACTIVE"] = "interactive";
4
+ AgentMode["AUTONOMOUS"] = "autonomous";
5
+ AgentMode["HYBRID"] = "hybrid";
6
+ })(AgentMode || (AgentMode = {}));
7
+ import winston from 'winston';
8
+ const levels = {
9
+ error: 0,
10
+ warn: 1,
11
+ info: 2,
12
+ http: 3,
13
+ debug: 4,
14
+ };
15
+ const colors = {
16
+ error: 'red',
17
+ warn: 'yellow',
18
+ info: 'green',
19
+ http: 'magenta',
20
+ debug: 'blue',
21
+ };
22
+ winston.addColors(colors);
23
+ const level = () => {
24
+ if (process.env.LOG_LEVEL) {
25
+ return process.env.LOG_LEVEL.toLowerCase();
26
+ }
27
+ const env = process.env.NODE_ENV || 'production';
28
+ return env === 'development' ? 'debug' : 'info';
29
+ };
30
+ const format = winston.format.combine(winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), winston.format.colorize({ all: true }), winston.format.printf((info) => `${info.timestamp} ${info.level}: ${info.message}`));
31
+ let transports;
32
+ try {
33
+ transports = [
34
+ new winston.transports.Console(),
35
+ new winston.transports.File({
36
+ filename: 'logs/error.log',
37
+ level: 'error',
38
+ }),
39
+ new winston.transports.File({ filename: 'logs/combined.log' }),
40
+ ];
41
+ }
42
+ catch (error) {
43
+ transports = [new winston.transports.Console()];
44
+ }
45
+ export const logger = winston.createLogger({
46
+ level: level(),
47
+ levels,
48
+ format,
49
+ transports,
50
+ });
51
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/dependances/types.ts"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AC,KAAK,KAAK,IAAI,CAAC,OAAO,EAAE,CAC7D,CACF,CAAC;AACF,IAAI,UAAU,CAAC;AACf,IAAI,CAAC;IACH,UAAU,GAAG;QACX,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE;QAEhC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;YAC1B,QAAQ,EAAE,gBAAgB;YAC1B,KAAK,EAAE,OAAO;SACf,CAAC;QAEF,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC;KAC/D,CAAC;AACJ,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,UAAU,GAAG,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IACzC,KAAK,EAAE,KAAK,EAAE;IACd,MAAM;IACN,MAAM;IACN,UAAU;CACX,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Uint256 } from 'starknet';
2
+ import { onchainWrite } from '@kasarlabs/ask-starknet-core';
3
+ export declare const execute: (method: string, env: onchainWrite, calldata: (string | Uint256)[]) => Promise<{
4
+ transaction_hash: string;
5
+ }>;
6
+ export declare const decimalsScale: (decimals: number) => string;