@clarigen/cli 2.1.1 → 2.1.2
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/dist/index.cjs +190 -158
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +444 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +181 -160
- package/dist/index.js.map +1 -1
- package/dist/run-cli.cjs +239 -202
- package/dist/run-cli.cjs.map +1 -1
- package/dist/run-cli.d.cts +1 -0
- package/dist/run-cli.js +230 -203
- package/dist/run-cli.js.map +1 -1
- package/package.json +3 -4
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { ClarityAbi, ClarityAbiFunction, ClarityAbiMap, ClarityAbiVariable, ClarityAbiArg, ClarityAbiType } from '@clarigen/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Simnet } from '@hirosystems/clarinet-sdk';
|
|
4
|
+
import { inspect, InspectOptions } from 'util';
|
|
5
|
+
|
|
6
|
+
interface SessionContract {
|
|
7
|
+
contract_id: string;
|
|
8
|
+
contract_interface: ClarityAbi;
|
|
9
|
+
source: string;
|
|
10
|
+
}
|
|
11
|
+
type EpochType = ClarityAbi;
|
|
12
|
+
type SessionAccount = {
|
|
13
|
+
address: string;
|
|
14
|
+
balance: string;
|
|
15
|
+
name: string;
|
|
16
|
+
};
|
|
17
|
+
interface Session {
|
|
18
|
+
session_id: number;
|
|
19
|
+
accounts: SessionAccount[];
|
|
20
|
+
contracts: SessionContract[];
|
|
21
|
+
}
|
|
22
|
+
interface SessionWithVariables extends Session {
|
|
23
|
+
variables: string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare const ClarinetConfigSchema: z.ZodObject<{
|
|
27
|
+
project: z.ZodObject<{
|
|
28
|
+
requirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
29
|
+
contract_id: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
contract_id: string;
|
|
32
|
+
}, {
|
|
33
|
+
contract_id: string;
|
|
34
|
+
}>, "many">>;
|
|
35
|
+
cache_location: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
path: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
path: string;
|
|
39
|
+
}, {
|
|
40
|
+
path: string;
|
|
41
|
+
}>>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
requirements?: {
|
|
44
|
+
contract_id: string;
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
cache_location?: {
|
|
47
|
+
path: string;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
requirements?: {
|
|
51
|
+
contract_id: string;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
cache_location?: {
|
|
54
|
+
path: string;
|
|
55
|
+
} | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
contracts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
58
|
+
path: z.ZodString;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
path: string;
|
|
61
|
+
}, {
|
|
62
|
+
path: string;
|
|
63
|
+
}>>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
project: {
|
|
66
|
+
requirements?: {
|
|
67
|
+
contract_id: string;
|
|
68
|
+
}[] | undefined;
|
|
69
|
+
cache_location?: {
|
|
70
|
+
path: string;
|
|
71
|
+
} | undefined;
|
|
72
|
+
};
|
|
73
|
+
contracts?: Record<string, {
|
|
74
|
+
path: string;
|
|
75
|
+
}> | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
project: {
|
|
78
|
+
requirements?: {
|
|
79
|
+
contract_id: string;
|
|
80
|
+
}[] | undefined;
|
|
81
|
+
cache_location?: {
|
|
82
|
+
path: string;
|
|
83
|
+
} | undefined;
|
|
84
|
+
};
|
|
85
|
+
contracts?: Record<string, {
|
|
86
|
+
path: string;
|
|
87
|
+
}> | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
type ClarinetConfig = z.infer<typeof ClarinetConfigSchema>;
|
|
90
|
+
declare function getClarinetConfig(path: string): Promise<ClarinetConfig>;
|
|
91
|
+
|
|
92
|
+
declare const CONFIG_FILE: "Clarigen.toml";
|
|
93
|
+
declare enum OutputType {
|
|
94
|
+
ESM = "types",
|
|
95
|
+
ESM_OLD = "esm",
|
|
96
|
+
Docs = "docs"
|
|
97
|
+
}
|
|
98
|
+
declare const ConfigFileSchema: z.ZodObject<{
|
|
99
|
+
clarinet: z.ZodString;
|
|
100
|
+
types: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
output: z.ZodOptional<z.ZodString>;
|
|
102
|
+
outputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
103
|
+
include_accounts: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
after: z.ZodOptional<z.ZodString>;
|
|
105
|
+
include_boot_contracts: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
output?: string | undefined;
|
|
108
|
+
outputs?: string[] | undefined;
|
|
109
|
+
include_accounts?: boolean | undefined;
|
|
110
|
+
after?: string | undefined;
|
|
111
|
+
include_boot_contracts?: boolean | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
output?: string | undefined;
|
|
114
|
+
outputs?: string[] | undefined;
|
|
115
|
+
include_accounts?: boolean | undefined;
|
|
116
|
+
after?: string | undefined;
|
|
117
|
+
include_boot_contracts?: boolean | undefined;
|
|
118
|
+
}>>;
|
|
119
|
+
esm: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
output: z.ZodOptional<z.ZodString>;
|
|
121
|
+
outputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
122
|
+
include_accounts: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
after: z.ZodOptional<z.ZodString>;
|
|
124
|
+
include_boot_contracts: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
output?: string | undefined;
|
|
127
|
+
outputs?: string[] | undefined;
|
|
128
|
+
include_accounts?: boolean | undefined;
|
|
129
|
+
after?: string | undefined;
|
|
130
|
+
include_boot_contracts?: boolean | undefined;
|
|
131
|
+
}, {
|
|
132
|
+
output?: string | undefined;
|
|
133
|
+
outputs?: string[] | undefined;
|
|
134
|
+
include_accounts?: boolean | undefined;
|
|
135
|
+
after?: string | undefined;
|
|
136
|
+
include_boot_contracts?: boolean | undefined;
|
|
137
|
+
}>>;
|
|
138
|
+
docs: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
output: z.ZodOptional<z.ZodString>;
|
|
140
|
+
outputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
142
|
+
after: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
output?: string | undefined;
|
|
145
|
+
outputs?: string[] | undefined;
|
|
146
|
+
exclude?: string[] | undefined;
|
|
147
|
+
after?: string | undefined;
|
|
148
|
+
}, {
|
|
149
|
+
output?: string | undefined;
|
|
150
|
+
outputs?: string[] | undefined;
|
|
151
|
+
exclude?: string[] | undefined;
|
|
152
|
+
after?: string | undefined;
|
|
153
|
+
}>>;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
clarinet: string;
|
|
156
|
+
types?: {
|
|
157
|
+
output?: string | undefined;
|
|
158
|
+
outputs?: string[] | undefined;
|
|
159
|
+
include_accounts?: boolean | undefined;
|
|
160
|
+
after?: string | undefined;
|
|
161
|
+
include_boot_contracts?: boolean | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
esm?: {
|
|
164
|
+
output?: string | undefined;
|
|
165
|
+
outputs?: string[] | undefined;
|
|
166
|
+
include_accounts?: boolean | undefined;
|
|
167
|
+
after?: string | undefined;
|
|
168
|
+
include_boot_contracts?: boolean | undefined;
|
|
169
|
+
} | undefined;
|
|
170
|
+
docs?: {
|
|
171
|
+
output?: string | undefined;
|
|
172
|
+
outputs?: string[] | undefined;
|
|
173
|
+
exclude?: string[] | undefined;
|
|
174
|
+
after?: string | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}, {
|
|
177
|
+
clarinet: string;
|
|
178
|
+
types?: {
|
|
179
|
+
output?: string | undefined;
|
|
180
|
+
outputs?: string[] | undefined;
|
|
181
|
+
include_accounts?: boolean | undefined;
|
|
182
|
+
after?: string | undefined;
|
|
183
|
+
include_boot_contracts?: boolean | undefined;
|
|
184
|
+
} | undefined;
|
|
185
|
+
esm?: {
|
|
186
|
+
output?: string | undefined;
|
|
187
|
+
outputs?: string[] | undefined;
|
|
188
|
+
include_accounts?: boolean | undefined;
|
|
189
|
+
after?: string | undefined;
|
|
190
|
+
include_boot_contracts?: boolean | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
docs?: {
|
|
193
|
+
output?: string | undefined;
|
|
194
|
+
outputs?: string[] | undefined;
|
|
195
|
+
exclude?: string[] | undefined;
|
|
196
|
+
after?: string | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
}>;
|
|
199
|
+
type ConfigFile = z.infer<typeof ConfigFileSchema>;
|
|
200
|
+
declare const defaultConfigFile: ConfigFile;
|
|
201
|
+
declare class Config {
|
|
202
|
+
configFile: ConfigFile;
|
|
203
|
+
clarinet: ClarinetConfig;
|
|
204
|
+
cwd: string;
|
|
205
|
+
constructor(config: ConfigFile, clarinet: ClarinetConfig, cwd?: string);
|
|
206
|
+
static load(cwd?: string): Promise<Config>;
|
|
207
|
+
getOutputs(type: OutputType): string[];
|
|
208
|
+
outputResolve(type: OutputType, filePath?: string): string[] | null;
|
|
209
|
+
writeOutput(type: OutputType, contents: string, filePath?: string): Promise<string[] | null>;
|
|
210
|
+
supports(type: OutputType): boolean;
|
|
211
|
+
type(type: OutputType): {
|
|
212
|
+
output?: string | undefined;
|
|
213
|
+
outputs?: string[] | undefined;
|
|
214
|
+
include_accounts?: boolean | undefined;
|
|
215
|
+
after?: string | undefined;
|
|
216
|
+
include_boot_contracts?: boolean | undefined;
|
|
217
|
+
} | {
|
|
218
|
+
output?: string | undefined;
|
|
219
|
+
outputs?: string[] | undefined;
|
|
220
|
+
exclude?: string[] | undefined;
|
|
221
|
+
after?: string | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
get esm(): {
|
|
224
|
+
output?: string | undefined;
|
|
225
|
+
outputs?: string[] | undefined;
|
|
226
|
+
include_accounts?: boolean | undefined;
|
|
227
|
+
after?: string | undefined;
|
|
228
|
+
include_boot_contracts?: boolean | undefined;
|
|
229
|
+
} | undefined;
|
|
230
|
+
get docs(): {
|
|
231
|
+
output?: string | undefined;
|
|
232
|
+
outputs?: string[] | undefined;
|
|
233
|
+
exclude?: string[] | undefined;
|
|
234
|
+
after?: string | undefined;
|
|
235
|
+
} | undefined;
|
|
236
|
+
clarinetFile(): string;
|
|
237
|
+
joinFromClarinet(filePath: string): string;
|
|
238
|
+
}
|
|
239
|
+
declare function configFilePath(cwd?: string): string;
|
|
240
|
+
declare function saveConfig(config: ConfigFile): Promise<void>;
|
|
241
|
+
declare function getConfig(cwd?: string): Promise<ConfigFile>;
|
|
242
|
+
|
|
243
|
+
declare const FN_TYPES: readonly ["read-only", "public", "private"];
|
|
244
|
+
declare const VAR_TYPES: readonly ["map", "data-var", "constant"];
|
|
245
|
+
type ClarityAbiItem = ClarityAbiFunction | ClarityAbiMap | ClarityAbiVariable;
|
|
246
|
+
type ClaridocItemType<T extends ClarityAbiItem> = {
|
|
247
|
+
abi: T;
|
|
248
|
+
comments: Comments;
|
|
249
|
+
startLine: number;
|
|
250
|
+
source: string[];
|
|
251
|
+
};
|
|
252
|
+
type ClaridocFunction = ClaridocItemType<ClarityAbiFunction>;
|
|
253
|
+
type ClaridocMap = ClaridocItemType<ClarityAbiMap>;
|
|
254
|
+
type ClaridocVariable = ClaridocItemType<ClarityAbiVariable>;
|
|
255
|
+
interface ClaridocItem {
|
|
256
|
+
abi: ClarityAbiItem;
|
|
257
|
+
comments: Comments;
|
|
258
|
+
startLine: number;
|
|
259
|
+
source: string[];
|
|
260
|
+
}
|
|
261
|
+
interface Comments {
|
|
262
|
+
params: Record<string, ClaridocParam>;
|
|
263
|
+
text: string[];
|
|
264
|
+
}
|
|
265
|
+
interface ClaridocContract {
|
|
266
|
+
functions: ClaridocFunction[];
|
|
267
|
+
maps: ClaridocMap[];
|
|
268
|
+
variables: ClaridocVariable[];
|
|
269
|
+
comments: string[];
|
|
270
|
+
}
|
|
271
|
+
interface ClaridocParam {
|
|
272
|
+
abi: ClarityAbiArg;
|
|
273
|
+
comments: string[];
|
|
274
|
+
}
|
|
275
|
+
declare function createContractDocInfo({ contractSrc, abi, }: {
|
|
276
|
+
contractSrc: string;
|
|
277
|
+
abi: ClarityAbi;
|
|
278
|
+
}): ClaridocContract;
|
|
279
|
+
declare function isComment(line: string): boolean;
|
|
280
|
+
declare function getFnName(line: string): string | undefined;
|
|
281
|
+
declare function traceParens(line: string, count: number): number;
|
|
282
|
+
declare function parseComments(comments: string[], abi: ClarityAbiItem): Comments;
|
|
283
|
+
declare function afterDocs(config: Config): Promise<void>;
|
|
284
|
+
|
|
285
|
+
declare function generateMarkdown({ contract, contractFile, withToc, }: {
|
|
286
|
+
contract: SessionContract;
|
|
287
|
+
contractFile?: string;
|
|
288
|
+
withToc?: boolean;
|
|
289
|
+
}): string;
|
|
290
|
+
declare function markdownFunction(fn: ClaridocFunction, contractFile?: string): string;
|
|
291
|
+
declare function generateReadme(session: Session, excluded: Record<string, boolean>): string;
|
|
292
|
+
|
|
293
|
+
declare function generateDocs({ session, config, }: {
|
|
294
|
+
session: SessionWithVariables;
|
|
295
|
+
config: Config;
|
|
296
|
+
}): Promise<void>;
|
|
297
|
+
|
|
298
|
+
declare function getVariablesV2(contract: SessionContract, simnet: Simnet, verbose?: boolean): any;
|
|
299
|
+
declare function mapVariables(session: Session, simnet: Simnet): string[];
|
|
300
|
+
|
|
301
|
+
declare function generateContractMeta(contract: SessionContract, constants: string): string;
|
|
302
|
+
declare const TYPE_IMPORTS = "import type { TypedAbiArg, TypedAbiFunction, TypedAbiMap, TypedAbiVariable, Response } from '@clarigen/core';";
|
|
303
|
+
declare function generateBaseFile(session: SessionWithVariables): string;
|
|
304
|
+
declare function encodeVariables(variables: ClarityAbiVariable[]): string[];
|
|
305
|
+
declare global {
|
|
306
|
+
interface Uint8Array {
|
|
307
|
+
[inspect.custom](depth: number, options: InspectOptions): string;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
declare function serialize(obj: any): string;
|
|
311
|
+
|
|
312
|
+
interface EmulatedContractPublishTransaction {
|
|
313
|
+
'emulated-contract-publish': {
|
|
314
|
+
'contract-name': string;
|
|
315
|
+
'emulated-sender': string;
|
|
316
|
+
path: string;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
interface RequirementPublishTransaction {
|
|
320
|
+
'requirement-publish': {
|
|
321
|
+
'contract-id': string;
|
|
322
|
+
'remap-sender': string;
|
|
323
|
+
'remap-principals': Record<string, string>;
|
|
324
|
+
path: string;
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
interface ContractPublishTransaction {
|
|
328
|
+
'contract-publish': {
|
|
329
|
+
'contract-name': string;
|
|
330
|
+
'expected-sender': string;
|
|
331
|
+
path: string;
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
interface ContractCallTransaction {
|
|
335
|
+
'contract-call': {
|
|
336
|
+
'contract-id': string;
|
|
337
|
+
'expected-sender': string;
|
|
338
|
+
parameters: Readonly<string[]>;
|
|
339
|
+
method: string;
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
interface EmulatedContractCallTransaction {
|
|
343
|
+
'emulated-contract-call': {
|
|
344
|
+
'contract-id': string;
|
|
345
|
+
'emulated-sender': string;
|
|
346
|
+
parameters: Readonly<string[]>;
|
|
347
|
+
method: string;
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
interface BtcTransferTransaction {
|
|
351
|
+
'btc-transfer': {
|
|
352
|
+
'expected-sender': string;
|
|
353
|
+
recipient: string;
|
|
354
|
+
'sats-per-byte': string;
|
|
355
|
+
'sats-amount': string;
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
type Transaction = EmulatedContractPublishTransaction | RequirementPublishTransaction | ContractPublishTransaction | EmulatedContractCallTransaction | BtcTransferTransaction | ContractCallTransaction;
|
|
359
|
+
type ContractTransaction = EmulatedContractPublishTransaction | RequirementPublishTransaction | ContractPublishTransaction;
|
|
360
|
+
interface Batch<T extends Transaction> {
|
|
361
|
+
id: number;
|
|
362
|
+
transactions: Readonly<T[]>;
|
|
363
|
+
}
|
|
364
|
+
interface SimnetAccount {
|
|
365
|
+
address: string;
|
|
366
|
+
name: string;
|
|
367
|
+
balance: string;
|
|
368
|
+
}
|
|
369
|
+
interface SimnetAccountDeployer extends SimnetAccount {
|
|
370
|
+
name: 'deployer';
|
|
371
|
+
}
|
|
372
|
+
interface SimnetDeploymentPlan {
|
|
373
|
+
network: 'simnet';
|
|
374
|
+
genesis: {
|
|
375
|
+
wallets: Readonly<[SimnetAccountDeployer, ...SimnetAccount[]]>;
|
|
376
|
+
contracts: Readonly<string[]>;
|
|
377
|
+
};
|
|
378
|
+
plan: {
|
|
379
|
+
batches: Readonly<Batch<EmulatedContractPublishTransaction | EmulatedContractCallTransaction>[]>;
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
interface DevnetDeploymentPlan {
|
|
383
|
+
network: 'devnet';
|
|
384
|
+
plan: {
|
|
385
|
+
batches: Readonly<Batch<RequirementPublishTransaction | ContractPublishTransaction | ContractCallTransaction | BtcTransferTransaction>[]>;
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
type TestnetDeploymentPlan = Omit<DevnetDeploymentPlan, 'network'> & {
|
|
389
|
+
network: 'testnet';
|
|
390
|
+
};
|
|
391
|
+
interface MainnetDeploymentPlan {
|
|
392
|
+
network: 'mainnet';
|
|
393
|
+
plan: {
|
|
394
|
+
batches: Readonly<Batch<ContractPublishTransaction | ContractCallTransaction | BtcTransferTransaction>[]>;
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
type DeploymentPlan = SimnetDeploymentPlan | DevnetDeploymentPlan | TestnetDeploymentPlan | MainnetDeploymentPlan;
|
|
398
|
+
declare function flatBatch<T extends Transaction>(batches: Batch<T>[]): T[];
|
|
399
|
+
declare function getContractTxs(batches: Batch<Transaction>[]): ContractTransaction[];
|
|
400
|
+
declare function getDeploymentContract(contractName: string, deployment: DeploymentPlan): ContractTransaction;
|
|
401
|
+
declare function getDeploymentTxPath(tx: ContractTransaction): string;
|
|
402
|
+
declare function getIdentifier(tx: ContractTransaction): string;
|
|
403
|
+
declare function isContractTx(tx: Transaction): tx is ContractTransaction;
|
|
404
|
+
|
|
405
|
+
declare function parseDeployment(path: string): Promise<Plan>;
|
|
406
|
+
declare const DEPLOYMENT_NETWORKS: readonly ["devnet", "simnet", "testnet", "mainnet"];
|
|
407
|
+
type DeploymentNetwork = (typeof DEPLOYMENT_NETWORKS)[number];
|
|
408
|
+
type Plan = DeploymentPlan | undefined;
|
|
409
|
+
type DeploymentsMap = {
|
|
410
|
+
[key in DeploymentNetwork]: Plan;
|
|
411
|
+
};
|
|
412
|
+
declare function getDeployments(config: Config): Promise<DeploymentsMap>;
|
|
413
|
+
declare function generateESMFile({ baseFile, session, config, }: {
|
|
414
|
+
baseFile: string;
|
|
415
|
+
session: Session;
|
|
416
|
+
config: Config;
|
|
417
|
+
}): Promise<string>;
|
|
418
|
+
type ContractDeployments = {
|
|
419
|
+
[key in DeploymentNetwork]: string | null;
|
|
420
|
+
};
|
|
421
|
+
type FullContractDeployments = {
|
|
422
|
+
[contractName: string]: ContractDeployments;
|
|
423
|
+
};
|
|
424
|
+
declare function collectContractDeployments(session: Session, deployments: DeploymentsMap, config: Config): FullContractDeployments;
|
|
425
|
+
declare function collectDeploymentFiles(deployments: DeploymentsMap, clarinetFolder: string, cwd: string): {
|
|
426
|
+
identifier: string;
|
|
427
|
+
file: string;
|
|
428
|
+
}[];
|
|
429
|
+
declare function afterESM(config: Config): Promise<void>;
|
|
430
|
+
|
|
431
|
+
declare const jsTypeFromAbiType: (val: ClarityAbiType, isArgument?: boolean) => string;
|
|
432
|
+
declare function abiArgType(arg: ClarityAbiArg): string;
|
|
433
|
+
declare function abiFunctionType(abiFunction: ClarityAbiFunction): string;
|
|
434
|
+
declare function getArgName(name: string): string;
|
|
435
|
+
|
|
436
|
+
declare function encodeVariableName(name: string): string;
|
|
437
|
+
declare function fileExists(filename: string): Promise<boolean>;
|
|
438
|
+
declare function writeFile(path: string, contents: string): Promise<string>;
|
|
439
|
+
declare function cwdRelative(path: string): string;
|
|
440
|
+
declare function sortContracts<T extends {
|
|
441
|
+
contract_id: string;
|
|
442
|
+
}>(contracts: T[]): T[];
|
|
443
|
+
|
|
444
|
+
export { type Batch, CONFIG_FILE, type ClaridocContract, type ClaridocFunction, type ClaridocItem, type ClaridocMap, type ClaridocParam, type ClaridocVariable, type ClarinetConfig, ClarinetConfigSchema, type Comments, Config, type ConfigFile, ConfigFileSchema, type ContractDeployments, type ContractTransaction, DEPLOYMENT_NETWORKS, type DeploymentNetwork, type DeploymentPlan, type DevnetDeploymentPlan, type EpochType, FN_TYPES, type FullContractDeployments, type MainnetDeploymentPlan, OutputType, type Session, type SessionAccount, type SessionContract, type SessionWithVariables, type SimnetAccountDeployer, type SimnetDeploymentPlan, TYPE_IMPORTS, type TestnetDeploymentPlan, type Transaction, VAR_TYPES, abiArgType, abiFunctionType, afterDocs, afterESM, collectContractDeployments, collectDeploymentFiles, configFilePath, createContractDocInfo, cwdRelative, defaultConfigFile, encodeVariableName, encodeVariables, fileExists, flatBatch, generateBaseFile, generateContractMeta, generateDocs, generateESMFile, generateMarkdown, generateReadme, getArgName, getClarinetConfig, getConfig, getContractTxs, getDeploymentContract, getDeploymentTxPath, getDeployments, getFnName, getIdentifier, getVariablesV2, isComment, isContractTx, jsTypeFromAbiType, mapVariables, markdownFunction, parseComments, parseDeployment, saveConfig, serialize, sortContracts, traceParens, writeFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -441,4 +441,4 @@ declare function sortContracts<T extends {
|
|
|
441
441
|
contract_id: string;
|
|
442
442
|
}>(contracts: T[]): T[];
|
|
443
443
|
|
|
444
|
-
export { Batch, CONFIG_FILE, ClaridocContract, ClaridocFunction, ClaridocItem, ClaridocMap, ClaridocParam, ClaridocVariable, ClarinetConfig, ClarinetConfigSchema, Comments, Config, ConfigFile, ConfigFileSchema, ContractDeployments, ContractTransaction, DEPLOYMENT_NETWORKS, DeploymentNetwork, DeploymentPlan, DevnetDeploymentPlan, EpochType, FN_TYPES, FullContractDeployments, MainnetDeploymentPlan, OutputType, Session, SessionAccount, SessionContract, SessionWithVariables, SimnetAccountDeployer, SimnetDeploymentPlan, TYPE_IMPORTS, TestnetDeploymentPlan, Transaction, VAR_TYPES, abiArgType, abiFunctionType, afterDocs, afterESM, collectContractDeployments, collectDeploymentFiles, configFilePath, createContractDocInfo, cwdRelative, defaultConfigFile, encodeVariableName, encodeVariables, fileExists, flatBatch, generateBaseFile, generateContractMeta, generateDocs, generateESMFile, generateMarkdown, generateReadme, getArgName, getClarinetConfig, getConfig, getContractTxs, getDeploymentContract, getDeploymentTxPath, getDeployments, getFnName, getIdentifier, getVariablesV2, isComment, isContractTx, jsTypeFromAbiType, mapVariables, markdownFunction, parseComments, parseDeployment, saveConfig, serialize, sortContracts, traceParens, writeFile };
|
|
444
|
+
export { type Batch, CONFIG_FILE, type ClaridocContract, type ClaridocFunction, type ClaridocItem, type ClaridocMap, type ClaridocParam, type ClaridocVariable, type ClarinetConfig, ClarinetConfigSchema, type Comments, Config, type ConfigFile, ConfigFileSchema, type ContractDeployments, type ContractTransaction, DEPLOYMENT_NETWORKS, type DeploymentNetwork, type DeploymentPlan, type DevnetDeploymentPlan, type EpochType, FN_TYPES, type FullContractDeployments, type MainnetDeploymentPlan, OutputType, type Session, type SessionAccount, type SessionContract, type SessionWithVariables, type SimnetAccountDeployer, type SimnetDeploymentPlan, TYPE_IMPORTS, type TestnetDeploymentPlan, type Transaction, VAR_TYPES, abiArgType, abiFunctionType, afterDocs, afterESM, collectContractDeployments, collectDeploymentFiles, configFilePath, createContractDocInfo, cwdRelative, defaultConfigFile, encodeVariableName, encodeVariables, fileExists, flatBatch, generateBaseFile, generateContractMeta, generateDocs, generateESMFile, generateMarkdown, generateReadme, getArgName, getClarinetConfig, getConfig, getContractTxs, getDeploymentContract, getDeploymentTxPath, getDeployments, getFnName, getIdentifier, getVariablesV2, isComment, isContractTx, jsTypeFromAbiType, mapVariables, markdownFunction, parseComments, parseDeployment, saveConfig, serialize, sortContracts, traceParens, writeFile };
|