@stacks/clarinet-sdk-wasm 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 +96 -77
- package/clarinet_sdk.js +397 -416
- package/clarinet_sdk_bg.wasm +0 -0
- package/package.json +1 -1
package/clarinet_sdk.d.ts
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export type IContractInterface = {
|
|
4
|
-
functions: ContractInterfaceFunction[];
|
|
5
|
-
variables: ContractInterfaceVariable[];
|
|
6
|
-
maps: ContractInterfaceMap[];
|
|
7
|
-
fungible_tokens: ContractInterfaceFungibleTokens[];
|
|
8
|
-
non_fungible_tokens: ContractInterfaceNonFungibleTokens[];
|
|
9
|
-
epoch: StacksEpochId;
|
|
10
|
-
clarity_version: ClarityVersionString;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
|
|
14
|
-
|
|
15
|
-
export type ClarityVersionString = "Clarity1" | "Clarity2" | "Clarity3"| "Clarity4";
|
|
16
|
-
|
|
17
|
-
type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
|
|
18
|
-
|
|
19
3
|
type IContractAST = {
|
|
20
4
|
contract_identifier: any;
|
|
21
5
|
pre_expressions: any[];
|
|
@@ -25,15 +9,19 @@ type IContractAST = {
|
|
|
25
9
|
implemented_traits: any[];
|
|
26
10
|
};
|
|
27
11
|
|
|
28
|
-
type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
12
|
+
export type EpochString =
|
|
13
|
+
| "2.0"
|
|
14
|
+
| "2.05"
|
|
15
|
+
| "2.1"
|
|
16
|
+
| "2.2"
|
|
17
|
+
| "2.3"
|
|
18
|
+
| "2.4"
|
|
19
|
+
| "2.5"
|
|
20
|
+
| "3.0"
|
|
21
|
+
| "3.1"
|
|
22
|
+
| "3.2"
|
|
23
|
+
| "3.3";
|
|
33
24
|
|
|
34
|
-
type Field = {
|
|
35
|
-
Field: any;
|
|
36
|
-
};
|
|
37
25
|
|
|
38
26
|
type Expression = {
|
|
39
27
|
expr: ExpressionType;
|
|
@@ -41,27 +29,45 @@ type Expression = {
|
|
|
41
29
|
span: Span;
|
|
42
30
|
};
|
|
43
31
|
|
|
44
|
-
type LiteralValue = {
|
|
45
|
-
LiteralValue: any;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
type ContractInterfaceMap = {
|
|
49
|
-
name: string;
|
|
50
|
-
key: ContractInterfaceAtomType;
|
|
51
|
-
value: ContractInterfaceAtomType;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
type ContractInterfaceFungibleTokens = { name: string };
|
|
55
|
-
|
|
56
32
|
type ContractInterfaceVariable = {
|
|
57
33
|
name: string;
|
|
58
34
|
type: ContractInterfaceAtomType;
|
|
59
35
|
access: ContractInterfaceVariableAccess;
|
|
60
36
|
};
|
|
61
37
|
|
|
38
|
+
type ContractInterfaceAtomType =
|
|
39
|
+
| "none"
|
|
40
|
+
| "int128"
|
|
41
|
+
| "uint128"
|
|
42
|
+
| "bool"
|
|
43
|
+
| "principal"
|
|
44
|
+
| { buffer: { length: number } }
|
|
45
|
+
| { "string-utf8": { length: number } }
|
|
46
|
+
| { "string-ascii": { length: number } }
|
|
47
|
+
| { tuple: ContractInterfaceTupleEntryType[] }
|
|
48
|
+
| { optional: ContractInterfaceAtomType }
|
|
49
|
+
| { response: { ok: ContractInterfaceAtomType; error: ContractInterfaceAtomType } }
|
|
50
|
+
| { list: { type: ContractInterfaceAtomType; length: number } }
|
|
51
|
+
| "trait_reference";
|
|
52
|
+
|
|
53
|
+
type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
|
|
54
|
+
|
|
55
|
+
type Atom = {
|
|
56
|
+
Atom: String;
|
|
57
|
+
};
|
|
58
|
+
|
|
62
59
|
type ContractInterfaceFunctionArg = { name: string; type: ContractInterfaceAtomType };
|
|
63
60
|
|
|
64
|
-
type
|
|
61
|
+
type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
|
|
62
|
+
|
|
63
|
+
export type ClarityVersionString = "Clarity1" | "Clarity2" | "Clarity3"| "Clarity4";
|
|
64
|
+
|
|
65
|
+
type Span = {
|
|
66
|
+
start_line: number;
|
|
67
|
+
start_column: number;
|
|
68
|
+
end_line: number;
|
|
69
|
+
end_column: number;
|
|
70
|
+
};
|
|
65
71
|
|
|
66
72
|
export type StacksEpochId =
|
|
67
73
|
| "Epoch10"
|
|
@@ -77,39 +83,18 @@ export type StacksEpochId =
|
|
|
77
83
|
| "Epoch32"
|
|
78
84
|
| "Epoch33";
|
|
79
85
|
|
|
80
|
-
type
|
|
81
|
-
start_line: number;
|
|
82
|
-
start_column: number;
|
|
83
|
-
end_line: number;
|
|
84
|
-
end_column: number;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
type AtomValue = {
|
|
88
|
-
AtomValue: any;
|
|
89
|
-
};
|
|
86
|
+
type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
|
|
90
87
|
|
|
91
88
|
type List = {
|
|
92
89
|
List: Expression[];
|
|
93
90
|
};
|
|
94
91
|
|
|
95
|
-
type
|
|
96
|
-
|
|
97
|
-
export type EpochString =
|
|
98
|
-
| "2.0"
|
|
99
|
-
| "2.05"
|
|
100
|
-
| "2.1"
|
|
101
|
-
| "2.2"
|
|
102
|
-
| "2.3"
|
|
103
|
-
| "2.4"
|
|
104
|
-
| "2.5"
|
|
105
|
-
| "3.0"
|
|
106
|
-
| "3.1"
|
|
107
|
-
| "3.2"
|
|
108
|
-
| "3.3";
|
|
92
|
+
type ContractInterfaceFungibleTokens = { name: string };
|
|
109
93
|
|
|
94
|
+
type ExpressionType = Atom | AtomValue | List | LiteralValue | Field | TraitReference;
|
|
110
95
|
|
|
111
|
-
type
|
|
112
|
-
|
|
96
|
+
type LiteralValue = {
|
|
97
|
+
LiteralValue: any;
|
|
113
98
|
};
|
|
114
99
|
|
|
115
100
|
type ContractInterfaceFunction = {
|
|
@@ -119,37 +104,60 @@ type ContractInterfaceFunction = {
|
|
|
119
104
|
outputs: ContractInterfaceFunctionOutput;
|
|
120
105
|
};
|
|
121
106
|
|
|
122
|
-
type
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
| { "string-utf8": { length: number } }
|
|
130
|
-
| { "string-ascii": { length: number } }
|
|
131
|
-
| { tuple: ContractInterfaceTupleEntryType[] }
|
|
132
|
-
| { optional: ContractInterfaceAtomType }
|
|
133
|
-
| { response: { ok: ContractInterfaceAtomType; error: ContractInterfaceAtomType } }
|
|
134
|
-
| { list: { type: ContractInterfaceAtomType; length: number } }
|
|
135
|
-
| "trait_reference";
|
|
107
|
+
type TraitReference = {
|
|
108
|
+
TraitReference: any;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
type Field = {
|
|
112
|
+
Field: any;
|
|
113
|
+
};
|
|
136
114
|
|
|
137
115
|
type ContractInterfaceNonFungibleTokens = { name: string; type: ContractInterfaceAtomType };
|
|
138
116
|
|
|
117
|
+
type ContractInterfaceMap = {
|
|
118
|
+
name: string;
|
|
119
|
+
key: ContractInterfaceAtomType;
|
|
120
|
+
value: ContractInterfaceAtomType;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
type ContractInterfaceVariableAccess = "constant" | "variable";
|
|
124
|
+
|
|
125
|
+
export type IContractInterface = {
|
|
126
|
+
functions: ContractInterfaceFunction[];
|
|
127
|
+
variables: ContractInterfaceVariable[];
|
|
128
|
+
maps: ContractInterfaceMap[];
|
|
129
|
+
fungible_tokens: ContractInterfaceFungibleTokens[];
|
|
130
|
+
non_fungible_tokens: ContractInterfaceNonFungibleTokens[];
|
|
131
|
+
epoch: StacksEpochId;
|
|
132
|
+
clarity_version: ClarityVersionString;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
type AtomValue = {
|
|
136
|
+
AtomValue: any;
|
|
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,33 +205,43 @@ 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
|
}
|