@stacks/clarinet-sdk-wasm-browser 3.10.0 → 3.12.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/clarinet_sdk.d.ts +100 -78
- package/clarinet_sdk.js +355 -383
- package/clarinet_sdk_bg.wasm +0 -0
- package/package.json +1 -1
package/clarinet_sdk.d.ts
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
type ContractInterfaceAtomType
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
type ContractInterfaceFunctionArg = { name: string; type: ContractInterfaceAtomType };
|
|
4
|
+
|
|
5
|
+
type ContractInterfaceMap = {
|
|
6
|
+
name: string;
|
|
7
|
+
key: ContractInterfaceAtomType;
|
|
8
|
+
value: ContractInterfaceAtomType;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type List = {
|
|
12
|
+
List: Expression[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type ContractInterfaceFungibleTokens = { name: string };
|
|
16
|
+
|
|
17
|
+
type AtomValue = {
|
|
18
|
+
AtomValue: any;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type ContractInterfaceVariable = {
|
|
22
|
+
name: string;
|
|
23
|
+
type: ContractInterfaceAtomType;
|
|
24
|
+
access: ContractInterfaceVariableAccess;
|
|
25
|
+
};
|
|
17
26
|
|
|
18
27
|
export type EpochString =
|
|
19
28
|
| "2.0"
|
|
@@ -29,12 +38,24 @@ export type EpochString =
|
|
|
29
38
|
| "3.3";
|
|
30
39
|
|
|
31
40
|
|
|
32
|
-
type
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
type Span = {
|
|
42
|
+
start_line: number;
|
|
43
|
+
start_column: number;
|
|
44
|
+
end_line: number;
|
|
45
|
+
end_column: number;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
type IContractAST = {
|
|
49
|
+
contract_identifier: any;
|
|
50
|
+
pre_expressions: any[];
|
|
51
|
+
expressions: Expression[];
|
|
52
|
+
top_level_expression_sorting: number[];
|
|
53
|
+
referenced_traits: Map<any, any>;
|
|
54
|
+
implemented_traits: any[];
|
|
36
55
|
};
|
|
37
56
|
|
|
57
|
+
type ContractInterfaceVariableAccess = "constant" | "variable";
|
|
58
|
+
|
|
38
59
|
type Field = {
|
|
39
60
|
Field: any;
|
|
40
61
|
};
|
|
@@ -49,52 +70,14 @@ export type IContractInterface = {
|
|
|
49
70
|
clarity_version: ClarityVersionString;
|
|
50
71
|
};
|
|
51
72
|
|
|
52
|
-
type Atom = {
|
|
53
|
-
Atom: String;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
type ContractInterfaceFunction = {
|
|
57
|
-
name: string;
|
|
58
|
-
access: ContractInterfaceFunctionAccess;
|
|
59
|
-
args: ContractInterfaceFunctionArg[];
|
|
60
|
-
outputs: ContractInterfaceFunctionOutput;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
type AtomValue = {
|
|
64
|
-
AtomValue: any;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
type List = {
|
|
68
|
-
List: Expression[];
|
|
69
|
-
};
|
|
70
|
-
|
|
71
73
|
type TraitReference = {
|
|
72
74
|
TraitReference: any;
|
|
73
75
|
};
|
|
74
76
|
|
|
75
|
-
type
|
|
76
|
-
name: string;
|
|
77
|
-
key: ContractInterfaceAtomType;
|
|
78
|
-
value: ContractInterfaceAtomType;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
type ContractInterfaceNonFungibleTokens = { name: string; type: ContractInterfaceAtomType };
|
|
82
|
-
|
|
83
|
-
type ContractInterfaceVariableAccess = "constant" | "variable";
|
|
77
|
+
export type ClarityVersionString = "Clarity1" | "Clarity2" | "Clarity3"| "Clarity4";
|
|
84
78
|
|
|
85
79
|
type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
|
|
86
80
|
|
|
87
|
-
type ContractInterfaceFunctionArg = { name: string; type: ContractInterfaceAtomType };
|
|
88
|
-
|
|
89
|
-
type Span = {
|
|
90
|
-
start_line: number;
|
|
91
|
-
start_column: number;
|
|
92
|
-
end_line: number;
|
|
93
|
-
end_column: number;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
|
|
97
|
-
|
|
98
81
|
export type StacksEpochId =
|
|
99
82
|
| "Epoch10"
|
|
100
83
|
| "Epoch20"
|
|
@@ -109,47 +92,72 @@ export type StacksEpochId =
|
|
|
109
92
|
| "Epoch32"
|
|
110
93
|
| "Epoch33";
|
|
111
94
|
|
|
95
|
+
type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
|
|
96
|
+
|
|
112
97
|
type LiteralValue = {
|
|
113
98
|
LiteralValue: any;
|
|
114
99
|
};
|
|
115
100
|
|
|
116
|
-
type
|
|
101
|
+
type ContractInterfaceAtomType =
|
|
102
|
+
| "none"
|
|
103
|
+
| "int128"
|
|
104
|
+
| "uint128"
|
|
105
|
+
| "bool"
|
|
106
|
+
| "principal"
|
|
107
|
+
| { buffer: { length: number } }
|
|
108
|
+
| { "string-utf8": { length: number } }
|
|
109
|
+
| { "string-ascii": { length: number } }
|
|
110
|
+
| { tuple: ContractInterfaceTupleEntryType[] }
|
|
111
|
+
| { optional: ContractInterfaceAtomType }
|
|
112
|
+
| { response: { ok: ContractInterfaceAtomType; error: ContractInterfaceAtomType } }
|
|
113
|
+
| { list: { type: ContractInterfaceAtomType; length: number } }
|
|
114
|
+
| "trait_reference";
|
|
117
115
|
|
|
118
|
-
type
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
top_level_expression_sorting: number[];
|
|
123
|
-
referenced_traits: Map<any, any>;
|
|
124
|
-
implemented_traits: any[];
|
|
116
|
+
type Expression = {
|
|
117
|
+
expr: ExpressionType;
|
|
118
|
+
id: number;
|
|
119
|
+
span: Span;
|
|
125
120
|
};
|
|
126
121
|
|
|
127
|
-
type
|
|
128
|
-
|
|
129
|
-
type: ContractInterfaceAtomType;
|
|
130
|
-
access: ContractInterfaceVariableAccess;
|
|
122
|
+
type Atom = {
|
|
123
|
+
Atom: String;
|
|
131
124
|
};
|
|
132
125
|
|
|
133
|
-
|
|
126
|
+
type ContractInterfaceFunction = {
|
|
127
|
+
name: string;
|
|
128
|
+
access: ContractInterfaceFunctionAccess;
|
|
129
|
+
args: ContractInterfaceFunctionArg[];
|
|
130
|
+
outputs: ContractInterfaceFunctionOutput;
|
|
131
|
+
};
|
|
134
132
|
|
|
135
|
-
type
|
|
133
|
+
type ContractInterfaceNonFungibleTokens = { name: string; type: ContractInterfaceAtomType };
|
|
136
134
|
|
|
137
135
|
type ExpressionType = Atom | AtomValue | List | LiteralValue | Field | TraitReference;
|
|
138
136
|
|
|
137
|
+
type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
|
|
138
|
+
|
|
139
|
+
|
|
139
140
|
export class CallFnArgs {
|
|
140
141
|
free(): void;
|
|
142
|
+
[Symbol.dispose](): void;
|
|
141
143
|
constructor(contract: string, method: string, args: Uint8Array[], sender: string);
|
|
142
144
|
}
|
|
145
|
+
|
|
143
146
|
export class ContractOptions {
|
|
144
147
|
free(): void;
|
|
148
|
+
[Symbol.dispose](): void;
|
|
145
149
|
constructor(clarity_version?: number | null);
|
|
146
150
|
}
|
|
151
|
+
|
|
147
152
|
export class DeployContractArgs {
|
|
148
153
|
free(): void;
|
|
154
|
+
[Symbol.dispose](): void;
|
|
149
155
|
constructor(name: string, content: string, options: ContractOptions, sender: string);
|
|
150
156
|
}
|
|
157
|
+
|
|
151
158
|
export class SDK {
|
|
152
159
|
free(): void;
|
|
160
|
+
[Symbol.dispose](): void;
|
|
153
161
|
clearCache(): void;
|
|
154
162
|
runSnippet(snippet: string): string;
|
|
155
163
|
getAccounts(): Map<string, string>;
|
|
@@ -178,6 +186,7 @@ export class SDK {
|
|
|
178
186
|
setCurrentTestName(test_name: string): void;
|
|
179
187
|
mineEmptyBurnBlocks(count?: number | null): number;
|
|
180
188
|
mineEmptyStacksBlock(): number;
|
|
189
|
+
generateDeploymentPlan(cwd: string, manifest_path: string): Promise<void>;
|
|
181
190
|
getContractsInterfaces(): Map<string, IContractInterface>;
|
|
182
191
|
mineEmptyStacksBlocks(count?: number | null): number;
|
|
183
192
|
/**
|
|
@@ -196,35 +205,45 @@ export class SDK {
|
|
|
196
205
|
readonly burnBlockHeight: number;
|
|
197
206
|
readonly stacksBlockHeight: number;
|
|
198
207
|
}
|
|
208
|
+
|
|
199
209
|
export class SDKOptions {
|
|
200
210
|
free(): void;
|
|
211
|
+
[Symbol.dispose](): void;
|
|
201
212
|
constructor(track_costs: boolean, track_coverage: boolean, track_performance?: boolean | null);
|
|
202
213
|
trackCosts: boolean;
|
|
203
214
|
trackCoverage: boolean;
|
|
204
215
|
trackPerformance: boolean;
|
|
205
216
|
}
|
|
217
|
+
|
|
206
218
|
export class SessionReport {
|
|
207
219
|
private constructor();
|
|
208
220
|
free(): void;
|
|
221
|
+
[Symbol.dispose](): void;
|
|
209
222
|
coverage: string;
|
|
210
223
|
costs: string;
|
|
211
224
|
}
|
|
225
|
+
|
|
212
226
|
export class TransactionRes {
|
|
213
227
|
private constructor();
|
|
214
228
|
free(): void;
|
|
229
|
+
[Symbol.dispose](): void;
|
|
215
230
|
result: string;
|
|
216
231
|
events: string;
|
|
217
232
|
costs: string;
|
|
218
233
|
get performance(): string | undefined;
|
|
219
234
|
set performance(value: string | null | undefined);
|
|
220
235
|
}
|
|
236
|
+
|
|
221
237
|
export class TransferSTXArgs {
|
|
222
238
|
free(): void;
|
|
239
|
+
[Symbol.dispose](): void;
|
|
223
240
|
constructor(amount: bigint, recipient: string, sender: string);
|
|
224
241
|
}
|
|
242
|
+
|
|
225
243
|
export class TxArgs {
|
|
226
244
|
private constructor();
|
|
227
245
|
free(): void;
|
|
246
|
+
[Symbol.dispose](): void;
|
|
228
247
|
}
|
|
229
248
|
|
|
230
249
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -241,9 +260,7 @@ export interface InitOutput {
|
|
|
241
260
|
readonly __wbg_get_sessionreport_costs: (a: number) => [number, number];
|
|
242
261
|
readonly __wbg_get_sessionreport_coverage: (a: number) => [number, number];
|
|
243
262
|
readonly __wbg_get_transactionres_costs: (a: number) => [number, number];
|
|
244
|
-
readonly __wbg_get_transactionres_events: (a: number) => [number, number];
|
|
245
263
|
readonly __wbg_get_transactionres_performance: (a: number) => [number, number];
|
|
246
|
-
readonly __wbg_get_transactionres_result: (a: number) => [number, number];
|
|
247
264
|
readonly __wbg_sdk_free: (a: number, b: number) => void;
|
|
248
265
|
readonly __wbg_sdkoptions_free: (a: number, b: number) => void;
|
|
249
266
|
readonly __wbg_sessionreport_free: (a: number, b: number) => void;
|
|
@@ -273,6 +290,7 @@ export interface InitOutput {
|
|
|
273
290
|
readonly sdk_enablePerformance: (a: number, b: number, c: number) => [number, number];
|
|
274
291
|
readonly sdk_execute: (a: number, b: number, c: number) => [number, number, number];
|
|
275
292
|
readonly sdk_executeCommand: (a: number, b: number, c: number) => [number, number];
|
|
293
|
+
readonly sdk_generateDeploymentPlan: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
276
294
|
readonly sdk_getAccounts: (a: number) => [number, number, number];
|
|
277
295
|
readonly sdk_getAssetsMap: (a: number) => [number, number, number];
|
|
278
296
|
readonly sdk_getBlockTime: (a: number) => bigint;
|
|
@@ -303,24 +321,28 @@ export interface InitOutput {
|
|
|
303
321
|
readonly sdk_transferSTX: (a: number, b: number) => [number, number, number];
|
|
304
322
|
readonly sdkoptions_new: (a: number, b: number, c: number) => number;
|
|
305
323
|
readonly transferstxargs_new: (a: bigint, b: number, c: number, d: number, e: number) => number;
|
|
324
|
+
readonly __wbg_get_transactionres_events: (a: number) => [number, number];
|
|
325
|
+
readonly __wbg_get_transactionres_result: (a: number) => [number, number];
|
|
306
326
|
readonly sdk_stacksBlockHeight: (a: number) => number;
|
|
307
327
|
readonly __wbg_set_transactionres_events: (a: number, b: number, c: number) => void;
|
|
308
328
|
readonly __wbg_set_transactionres_result: (a: number, b: number, c: number) => void;
|
|
329
|
+
readonly wasm_bindgen__convert__closures_____invoke__h88b383b4e8768f30: (a: number, b: number) => void;
|
|
330
|
+
readonly wasm_bindgen__closure__destroy__h9dc82f56fbd7724f: (a: number, b: number) => void;
|
|
331
|
+
readonly wasm_bindgen__convert__closures_____invoke__h9ed329622efc412d: (a: number, b: number, c: any) => void;
|
|
332
|
+
readonly wasm_bindgen__closure__destroy__hbb3e147482ea61e2: (a: number, b: number) => void;
|
|
333
|
+
readonly wasm_bindgen__convert__closures_____invoke__h21af4bfb35f9aaf6: (a: number, b: number, c: any, d: any) => void;
|
|
309
334
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
310
335
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
311
336
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
312
337
|
readonly __externref_table_alloc: () => number;
|
|
313
|
-
readonly
|
|
338
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
314
339
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
315
|
-
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
316
340
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
317
|
-
readonly wasm_bindgen__convert__closures_____invoke__h565e262deb2f0b88: (a: number, b: number) => void;
|
|
318
|
-
readonly closure617_externref_shim: (a: number, b: number, c: any) => void;
|
|
319
|
-
readonly closure3380_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
320
341
|
readonly __wbindgen_start: () => void;
|
|
321
342
|
}
|
|
322
343
|
|
|
323
344
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
345
|
+
|
|
324
346
|
/**
|
|
325
347
|
* Instantiates the given `module`, which can either be bytes or
|
|
326
348
|
* a precompiled `WebAssembly.Module`.
|