@stacks/clarinet-sdk-wasm-browser 3.11.0 → 3.13.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,40 +1,35 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ type ContractInterfaceFungibleTokens = { name: string };
4
+
5
+ type ContractInterfaceVariableAccess = "constant" | "variable";
6
+
7
+ type ContractInterfaceNonFungibleTokens = { name: string; type: ContractInterfaceAtomType };
8
+
9
+ type ContractInterfaceVariable = {
10
+ name: string;
11
+ type: ContractInterfaceAtomType;
12
+ access: ContractInterfaceVariableAccess;
13
+ };
14
+
3
15
  type Atom = {
4
16
  Atom: String;
5
17
  };
6
18
 
7
- type Field = {
8
- Field: any;
19
+ type LiteralValue = {
20
+ LiteralValue: any;
9
21
  };
10
22
 
11
- type Expression = {
12
- expr: ExpressionType;
13
- id: number;
14
- span: Span;
23
+ export type IContractInterface = {
24
+ functions: ContractInterfaceFunction[];
25
+ variables: ContractInterfaceVariable[];
26
+ maps: ContractInterfaceMap[];
27
+ fungible_tokens: ContractInterfaceFungibleTokens[];
28
+ non_fungible_tokens: ContractInterfaceNonFungibleTokens[];
29
+ epoch: StacksEpochId;
30
+ clarity_version: ClarityVersionString;
15
31
  };
16
32
 
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";
35
-
36
- export type ClarityVersionString = "Clarity1" | "Clarity2" | "Clarity3"| "Clarity4";
37
-
38
33
  type ContractInterfaceFunction = {
39
34
  name: string;
40
35
  access: ContractInterfaceFunctionAccess;
@@ -56,7 +51,36 @@ export type StacksEpochId =
56
51
  | "Epoch32"
57
52
  | "Epoch33";
58
53
 
59
- type ContractInterfaceFungibleTokens = { name: string };
54
+ type List = {
55
+ List: Expression[];
56
+ };
57
+
58
+ type ContractInterfaceMap = {
59
+ name: string;
60
+ key: ContractInterfaceAtomType;
61
+ value: ContractInterfaceAtomType;
62
+ };
63
+
64
+ type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
65
+
66
+ type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
67
+
68
+ type Span = {
69
+ start_line: number;
70
+ start_column: number;
71
+ end_line: number;
72
+ end_column: number;
73
+ };
74
+
75
+ type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
76
+
77
+ export type ClarityVersionString = "Clarity1" | "Clarity2" | "Clarity3"| "Clarity4";
78
+
79
+ type ExpressionType = Atom | AtomValue | List | LiteralValue | Field | TraitReference;
80
+
81
+ type AtomValue = {
82
+ AtomValue: any;
83
+ };
60
84
 
61
85
  export type EpochString =
62
86
  | "2.0"
@@ -72,84 +96,68 @@ export type EpochString =
72
96
  | "3.3";
73
97
 
74
98
 
75
- type ExpressionType = Atom | AtomValue | List | LiteralValue | Field | TraitReference;
76
-
77
- type LiteralValue = {
78
- LiteralValue: any;
79
- };
80
-
81
- type IContractAST = {
82
- contract_identifier: any;
83
- pre_expressions: any[];
84
- expressions: Expression[];
85
- top_level_expression_sorting: number[];
86
- referenced_traits: Map<any, any>;
87
- implemented_traits: any[];
88
- };
89
-
90
99
  type TraitReference = {
91
100
  TraitReference: any;
92
101
  };
93
102
 
94
- export type IContractInterface = {
95
- functions: ContractInterfaceFunction[];
96
- variables: ContractInterfaceVariable[];
97
- maps: ContractInterfaceMap[];
98
- fungible_tokens: ContractInterfaceFungibleTokens[];
99
- non_fungible_tokens: ContractInterfaceNonFungibleTokens[];
100
- epoch: StacksEpochId;
101
- clarity_version: ClarityVersionString;
102
- };
103
-
104
103
  type ContractInterfaceFunctionArg = { name: string; type: ContractInterfaceAtomType };
105
104
 
106
- type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
107
-
108
- type List = {
109
- List: Expression[];
105
+ type Field = {
106
+ Field: any;
110
107
  };
111
108
 
112
- type ContractInterfaceMap = {
113
- name: string;
114
- key: ContractInterfaceAtomType;
115
- value: ContractInterfaceAtomType;
116
- };
109
+ type ContractInterfaceAtomType =
110
+ | "none"
111
+ | "int128"
112
+ | "uint128"
113
+ | "bool"
114
+ | "principal"
115
+ | { buffer: { length: number } }
116
+ | { "string-utf8": { length: number } }
117
+ | { "string-ascii": { length: number } }
118
+ | { tuple: ContractInterfaceTupleEntryType[] }
119
+ | { optional: ContractInterfaceAtomType }
120
+ | { response: { ok: ContractInterfaceAtomType; error: ContractInterfaceAtomType } }
121
+ | { list: { type: ContractInterfaceAtomType; length: number } }
122
+ | "trait_reference";
117
123
 
118
- type AtomValue = {
119
- AtomValue: any;
124
+ type Expression = {
125
+ expr: ExpressionType;
126
+ id: number;
127
+ span: Span;
120
128
  };
121
129
 
122
- type ContractInterfaceVariable = {
123
- name: string;
124
- type: ContractInterfaceAtomType;
125
- access: ContractInterfaceVariableAccess;
130
+ type IContractAST = {
131
+ contract_identifier: any;
132
+ pre_expressions: any[];
133
+ expressions: Expression[];
134
+ top_level_expression_sorting: number[];
135
+ referenced_traits: Map<any, any>;
136
+ implemented_traits: any[];
126
137
  };
127
138
 
128
- type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
129
-
130
- type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
131
-
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__h9ed329622efc412d: (a: number, b: number, c: any) => void;
330
+ readonly wasm_bindgen__closure__destroy__hbb3e147482ea61e2: (a: number, b: number) => void;
331
+ readonly wasm_bindgen__convert__closures_____invoke__h88b383b4e8768f30: (a: number, b: number) => void;
332
+ readonly wasm_bindgen__closure__destroy__h9dc82f56fbd7724f: (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`.