@stacks/clarinet-sdk-wasm-browser 3.11.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 CHANGED
@@ -1,63 +1,29 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- type Atom = {
4
- Atom: String;
5
- };
3
+ type ContractInterfaceFunctionArg = { name: string; type: ContractInterfaceAtomType };
6
4
 
7
- type Field = {
8
- Field: any;
5
+ type ContractInterfaceMap = {
6
+ name: string;
7
+ key: ContractInterfaceAtomType;
8
+ value: ContractInterfaceAtomType;
9
9
  };
10
10
 
11
- type Expression = {
12
- expr: ExpressionType;
13
- id: number;
14
- span: Span;
11
+ type List = {
12
+ List: Expression[];
15
13
  };
16
14
 
17
- type ContractInterfaceAtomType =
18
- | "none"
19
- | "int128"
20
- | "uint128"
21
- | "bool"
22
- | "principal"
23
- | { buffer: { length: number } }
24
- | { "string-utf8": { length: number } }
25
- | { "string-ascii": { length: number } }
26
- | { tuple: ContractInterfaceTupleEntryType[] }
27
- | { optional: ContractInterfaceAtomType }
28
- | { response: { ok: ContractInterfaceAtomType; error: ContractInterfaceAtomType } }
29
- | { list: { type: ContractInterfaceAtomType; length: number } }
30
- | "trait_reference";
31
-
32
- type ContractInterfaceNonFungibleTokens = { name: string; type: ContractInterfaceAtomType };
33
-
34
- type ContractInterfaceVariableAccess = "constant" | "variable";
15
+ type ContractInterfaceFungibleTokens = { name: string };
35
16
 
36
- export type ClarityVersionString = "Clarity1" | "Clarity2" | "Clarity3"| "Clarity4";
17
+ type AtomValue = {
18
+ AtomValue: any;
19
+ };
37
20
 
38
- type ContractInterfaceFunction = {
21
+ type ContractInterfaceVariable = {
39
22
  name: string;
40
- access: ContractInterfaceFunctionAccess;
41
- args: ContractInterfaceFunctionArg[];
42
- outputs: ContractInterfaceFunctionOutput;
23
+ type: ContractInterfaceAtomType;
24
+ access: ContractInterfaceVariableAccess;
43
25
  };
44
26
 
45
- export type StacksEpochId =
46
- | "Epoch10"
47
- | "Epoch20"
48
- | "Epoch2_05"
49
- | "Epoch21"
50
- | "Epoch22"
51
- | "Epoch23"
52
- | "Epoch24"
53
- | "Epoch25"
54
- | "Epoch30"
55
- | "Epoch31"
56
- | "Epoch32"
57
- | "Epoch33";
58
-
59
- type ContractInterfaceFungibleTokens = { name: string };
60
-
61
27
  export type EpochString =
62
28
  | "2.0"
63
29
  | "2.05"
@@ -72,10 +38,11 @@ export type EpochString =
72
38
  | "3.3";
73
39
 
74
40
 
75
- type ExpressionType = Atom | AtomValue | List | LiteralValue | Field | TraitReference;
76
-
77
- type LiteralValue = {
78
- LiteralValue: any;
41
+ type Span = {
42
+ start_line: number;
43
+ start_column: number;
44
+ end_line: number;
45
+ end_column: number;
79
46
  };
80
47
 
81
48
  type IContractAST = {
@@ -87,8 +54,10 @@ type IContractAST = {
87
54
  implemented_traits: any[];
88
55
  };
89
56
 
90
- type TraitReference = {
91
- TraitReference: any;
57
+ type ContractInterfaceVariableAccess = "constant" | "variable";
58
+
59
+ type Field = {
60
+ Field: any;
92
61
  };
93
62
 
94
63
  export type IContractInterface = {
@@ -101,55 +70,94 @@ export type IContractInterface = {
101
70
  clarity_version: ClarityVersionString;
102
71
  };
103
72
 
104
- type ContractInterfaceFunctionArg = { name: string; type: ContractInterfaceAtomType };
73
+ type TraitReference = {
74
+ TraitReference: any;
75
+ };
105
76
 
106
- type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
77
+ export type ClarityVersionString = "Clarity1" | "Clarity2" | "Clarity3"| "Clarity4";
107
78
 
108
- type List = {
109
- List: Expression[];
79
+ type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
80
+
81
+ export type StacksEpochId =
82
+ | "Epoch10"
83
+ | "Epoch20"
84
+ | "Epoch2_05"
85
+ | "Epoch21"
86
+ | "Epoch22"
87
+ | "Epoch23"
88
+ | "Epoch24"
89
+ | "Epoch25"
90
+ | "Epoch30"
91
+ | "Epoch31"
92
+ | "Epoch32"
93
+ | "Epoch33";
94
+
95
+ type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
96
+
97
+ type LiteralValue = {
98
+ LiteralValue: any;
110
99
  };
111
100
 
112
- type ContractInterfaceMap = {
113
- name: string;
114
- key: ContractInterfaceAtomType;
115
- value: ContractInterfaceAtomType;
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";
115
+
116
+ type Expression = {
117
+ expr: ExpressionType;
118
+ id: number;
119
+ span: Span;
116
120
  };
117
121
 
118
- type AtomValue = {
119
- AtomValue: any;
122
+ type Atom = {
123
+ Atom: String;
120
124
  };
121
125
 
122
- type ContractInterfaceVariable = {
126
+ type ContractInterfaceFunction = {
123
127
  name: string;
124
- type: ContractInterfaceAtomType;
125
- access: ContractInterfaceVariableAccess;
128
+ access: ContractInterfaceFunctionAccess;
129
+ args: ContractInterfaceFunctionArg[];
130
+ outputs: ContractInterfaceFunctionOutput;
126
131
  };
127
132
 
128
- type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
133
+ type ContractInterfaceNonFungibleTokens = { name: string; type: ContractInterfaceAtomType };
129
134
 
130
- type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
135
+ type ExpressionType = Atom | AtomValue | List | LiteralValue | Field | TraitReference;
136
+
137
+ type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
131
138
 
132
- type Span = {
133
- start_line: number;
134
- start_column: number;
135
- end_line: number;
136
- end_column: number;
137
- };
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 __wbindgen_export_4: WebAssembly.Table;
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 closure616_externref_shim: (a: number, b: number, c: any) => void;
318
- readonly wasm_bindgen__convert__closures_____invoke__h565e262deb2f0b88: (a: number, b: number) => void;
319
- readonly closure3379_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`.