@algorandfoundation/algokit-utils 9.2.1-beta.3 → 9.2.2-beta.1
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/account/account.d.ts +28 -23
- package/account/get-account-config-from-environment.d.ts +2 -7
- package/account/get-account.d.ts +12 -14
- package/account/get-dispenser-account.d.ts +5 -9
- package/account/index.d.ts +5 -0
- package/account/mnemonic-account.d.ts +3 -7
- package/amount.d.ts +35 -40
- package/app-client.d.ts +6 -10
- package/app-deploy.d.ts +23 -25
- package/app.d.ts +46 -45
- package/asset.d.ts +12 -16
- package/config.d.ts +2 -7
- package/debugging/debugging.d.ts +1 -5
- package/debugging/index.d.ts +1 -0
- package/dispenser-client.d.ts +2 -7
- package/index.d.ts +18 -27
- package/indexer-lookup.d.ts +11 -18
- package/localnet/get-kmd-wallet-account.d.ts +7 -9
- package/localnet/get-localnet-dispenser-account.d.ts +5 -7
- package/localnet/get-or-create-kmd-wallet-account.d.ts +8 -10
- package/localnet/index.d.ts +4 -0
- package/localnet/is-localnet.d.ts +3 -7
- package/network-client.d.ts +15 -17
- package/package.json +1 -1
- package/testing/_asset.d.ts +3 -0
- package/testing/account.d.ts +9 -11
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +2 -7
- package/testing/fixtures/algorand-fixture.d.ts +4 -9
- package/testing/fixtures/index.d.ts +2 -0
- package/testing/index.d.ts +5 -7
- package/testing/indexer.d.ts +1 -5
- package/testing/test-logger.d.ts +36 -41
- package/testing/transaction-logger.d.ts +27 -30
- package/transaction/index.d.ts +2 -0
- package/transaction/legacy-bridge.d.ts +35 -0
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +5 -7
- package/transaction/resolve-signed-transactions.d.ts +16 -0
- package/transaction/transaction.d.ts +35 -34
- package/transfer/index.d.ts +2 -0
- package/transfer/transfer-algos.d.ts +5 -9
- package/transfer/transfer.d.ts +8 -11
- package/types/account-manager.d.ts +429 -432
- package/types/account.d.ts +202 -192
- package/types/algo-http-client-with-retry.d.ts +10 -15
- package/types/algorand-client-transaction-creator.d.ts +771 -778
- package/types/algorand-client-transaction-sender.d.ts +1085 -1090
- package/types/algorand-client.d.ts +236 -239
- package/types/amount.d.ts +43 -47
- package/types/app-arc56.d.ts +272 -235
- package/types/app-client.d.ts +1151 -1128
- package/types/app-deployer.d.ts +141 -139
- package/types/app-factory.d.ts +783 -762
- package/types/app-manager.d.ts +310 -304
- package/types/app-spec.d.ts +117 -118
- package/types/app.d.ts +241 -229
- package/types/asset-manager.d.ts +199 -204
- package/types/asset.d.ts +91 -95
- package/types/async-event-emitter.d.ts +13 -18
- package/types/client-manager.d.ts +451 -453
- package/types/composer.d.ts +1257 -1210
- package/types/config.d.ts +48 -53
- package/types/debugging.d.ts +23 -25
- package/types/dispenser-client.d.ts +52 -57
- package/types/expand.d.ts +3 -5
- package/types/indexer.d.ts +66 -70
- package/types/instance-of.d.ts +3 -5
- package/types/kmd-account-manager.d.ts +70 -75
- package/types/lifecycle-events.d.ts +8 -13
- package/types/logging.d.ts +11 -15
- package/types/logic-error.d.ts +29 -33
- package/types/network-client.d.ts +27 -32
- package/types/testing.d.ts +132 -131
- package/types/transaction.d.ts +110 -110
- package/types/transfer.d.ts +66 -70
- package/util.d.ts +48 -0
package/types/app-factory.d.ts
CHANGED
|
@@ -1,793 +1,814 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TransactionSignerAccount } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
//#region src/types/app-factory.d.ts
|
|
1
|
+
import algosdk, { Address } from 'algosdk';
|
|
2
|
+
import { TransactionSignerAccount } from './account';
|
|
3
|
+
import { type AlgorandClient } from './algorand-client';
|
|
4
|
+
import { AppReturn, SendAppTransactionResult, TealTemplateParams } from './app';
|
|
5
|
+
import { ABIStruct, Arc56Contract, Arc56Method } from './app-arc56';
|
|
6
|
+
import { AppClient, AppClientBareCallParams, AppClientCompilationParams, AppClientMethodCallParams, AppClientParams, AppSourceMaps, ResolveAppClientByCreatorAndName } from './app-client';
|
|
7
|
+
import { AppDeployParams } from './app-deployer';
|
|
8
|
+
import { AppSpec } from './app-spec';
|
|
9
|
+
import { AppMethodCall, AppMethodCallTransactionArgument } from './composer';
|
|
10
|
+
import { Expand } from './expand';
|
|
11
|
+
import { SendParams } from './transaction';
|
|
12
|
+
import OnApplicationComplete = algosdk.OnApplicationComplete;
|
|
13
|
+
import ABIValue = algosdk.ABIValue;
|
|
14
|
+
import TransactionSigner = algosdk.TransactionSigner;
|
|
16
15
|
/** Parameters to create an app client */
|
|
17
|
-
interface AppFactoryParams {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
16
|
+
export interface AppFactoryParams {
|
|
17
|
+
/** The ARC-56 or ARC-32 application spec as either:
|
|
18
|
+
* * Parsed JSON ARC-56 `Contract`
|
|
19
|
+
* * Parsed JSON ARC-32 `AppSpec`
|
|
20
|
+
* * Raw JSON string (in either ARC-56 or ARC-32 format)
|
|
21
|
+
*/
|
|
22
|
+
appSpec: Arc56Contract | AppSpec | string;
|
|
23
|
+
/** `AlgorandClient` instance */
|
|
24
|
+
algorand: AlgorandClient;
|
|
25
|
+
/**
|
|
26
|
+
* Optional override for the app name; used for on-chain metadata and lookups.
|
|
27
|
+
* Defaults to the ARC-32/ARC-56 app spec name.
|
|
28
|
+
*/
|
|
29
|
+
appName?: string;
|
|
30
|
+
/** Optional address to use for the account to use as the default sender for calls. */
|
|
31
|
+
defaultSender?: Address | string;
|
|
32
|
+
/** Optional signer to use as the default signer for default sender calls (if not specified then the signer will be resolved from `AlgorandClient`). */
|
|
33
|
+
defaultSigner?: TransactionSigner;
|
|
34
|
+
/** The version of app that is / will be deployed; defaults to 1.0 */
|
|
35
|
+
version?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether or not the contract should have deploy-time immutability control set, undefined = ignore.
|
|
38
|
+
* If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls.
|
|
39
|
+
*
|
|
40
|
+
* Useful if you want to vend multiple contracts from the same factory without specifying this value
|
|
41
|
+
* for each call.
|
|
42
|
+
*/
|
|
43
|
+
updatable?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether or not the contract should have deploy-time permanence control set, undefined = ignore.
|
|
46
|
+
* If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls.
|
|
47
|
+
*
|
|
48
|
+
* Useful if you want to vend multiple contracts from the same factory without specifying this value
|
|
49
|
+
* for each call.
|
|
50
|
+
*/
|
|
51
|
+
deletable?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Optional deploy-time TEAL template replacement parameters.
|
|
54
|
+
* If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls.
|
|
55
|
+
*
|
|
56
|
+
* Useful if you want to vend multiple contracts from the same factory without specifying this value
|
|
57
|
+
* for each call.
|
|
58
|
+
*/
|
|
59
|
+
deployTimeParams?: TealTemplateParams;
|
|
61
60
|
}
|
|
62
61
|
/** onComplete parameter for a create app call */
|
|
63
|
-
type CreateOnComplete = {
|
|
64
|
-
|
|
62
|
+
export type CreateOnComplete = {
|
|
63
|
+
onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
|
|
65
64
|
};
|
|
66
65
|
/** Specifies a schema used for creating an app */
|
|
67
|
-
type CreateSchema = {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
export type CreateSchema = {
|
|
67
|
+
/** The state schema for the app. This is immutable once the app is created. By default uses the ARC32/ARC-56 spec. */
|
|
68
|
+
schema?: {
|
|
69
|
+
/** The number of integers saved in global state. */
|
|
70
|
+
globalInts: number;
|
|
71
|
+
/** The number of byte slices saved in global state. */
|
|
72
|
+
globalByteSlices: number;
|
|
73
|
+
/** The number of integers saved in local state. */
|
|
74
|
+
localInts: number;
|
|
75
|
+
/** The number of byte slices saved in local state. */
|
|
76
|
+
localByteSlices: number;
|
|
77
|
+
};
|
|
78
|
+
/** Number of extra pages required for the programs.
|
|
79
|
+
* Defaults to the number needed for the programs in this call if not specified.
|
|
80
|
+
* This is immutable once the app is created. */
|
|
81
|
+
extraProgramPages?: number;
|
|
78
82
|
};
|
|
79
83
|
/** Params to specify a bare (raw) create call for an app */
|
|
80
|
-
type AppFactoryCreateParams = Expand<AppClientBareCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
|
|
84
|
+
export type AppFactoryCreateParams = Expand<AppClientBareCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
|
|
81
85
|
/** Params to specify a create method call for an app */
|
|
82
|
-
type AppFactoryCreateMethodCallParams = Expand<AppClientMethodCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
|
|
86
|
+
export type AppFactoryCreateMethodCallParams = Expand<AppClientMethodCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
|
|
83
87
|
/** Params to get an app client by ID from an app factory. */
|
|
84
|
-
type AppFactoryAppClientParams = Expand<Omit<AppClientParams, 'algorand' | 'appSpec'>>;
|
|
88
|
+
export type AppFactoryAppClientParams = Expand<Omit<AppClientParams, 'algorand' | 'appSpec'>>;
|
|
85
89
|
/** Params to get an app client by creator address and name from an app factory. */
|
|
86
|
-
type AppFactoryResolveAppClientByCreatorAndNameParams = Expand<Omit<ResolveAppClientByCreatorAndName, 'algorand' | 'appSpec'>>;
|
|
90
|
+
export type AppFactoryResolveAppClientByCreatorAndNameParams = Expand<Omit<ResolveAppClientByCreatorAndName, 'algorand' | 'appSpec'>>;
|
|
87
91
|
/** Parameters to define a deployment for an `AppFactory` */
|
|
88
|
-
type AppFactoryDeployParams = Expand<Omit<AppDeployParams, 'createParams' | 'updateParams' | 'deleteParams' | 'metadata'> & {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
92
|
+
export type AppFactoryDeployParams = Expand<Omit<AppDeployParams, 'createParams' | 'updateParams' | 'deleteParams' | 'metadata'> & {
|
|
93
|
+
/** Create transaction parameters to use if a create needs to be issued as part of deployment */
|
|
94
|
+
createParams?: Expand<AppClientMethodCallParams & CreateOnComplete & CreateSchema> | Expand<AppClientBareCallParams & CreateOnComplete & CreateSchema>;
|
|
95
|
+
/** Update transaction parameters to use if a create needs to be issued as part of deployment */
|
|
96
|
+
updateParams?: AppClientMethodCallParams | AppClientBareCallParams;
|
|
97
|
+
/** Delete transaction parameters to use if a create needs to be issued as part of deployment */
|
|
98
|
+
deleteParams?: AppClientMethodCallParams | AppClientBareCallParams;
|
|
99
|
+
/**
|
|
100
|
+
* Whether or not the contract should have deploy-time immutability control set.
|
|
101
|
+
* `undefined` = use AppFactory constructor value if set or base it on the app spec.
|
|
102
|
+
*/
|
|
103
|
+
updatable?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Whether or not the contract should have deploy-time permanence control set.
|
|
106
|
+
* `undefined` = use AppFactory constructor value if set or base it on the app spec.
|
|
107
|
+
*/
|
|
108
|
+
deletable?: boolean;
|
|
109
|
+
/** Override the app name for this deployment */
|
|
110
|
+
appName?: string;
|
|
103
111
|
}>;
|
|
104
112
|
/**
|
|
105
113
|
* ARC-56/ARC-32 app factory that, for a given app spec, allows you to create
|
|
106
114
|
* and deploy one or more app instances and to create one or more app clients
|
|
107
115
|
* to interact with those (or other) app instances.
|
|
108
116
|
*/
|
|
109
|
-
declare class AppFactory {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
117
|
+
export declare class AppFactory {
|
|
118
|
+
private _appSpec;
|
|
119
|
+
private _appName;
|
|
120
|
+
private _algorand;
|
|
121
|
+
private _version;
|
|
122
|
+
private _defaultSender?;
|
|
123
|
+
private _defaultSigner?;
|
|
124
|
+
private _deployTimeParams?;
|
|
125
|
+
private _updatable?;
|
|
126
|
+
private _deletable?;
|
|
127
|
+
private _approvalSourceMap;
|
|
128
|
+
private _clearSourceMap;
|
|
129
|
+
private _paramsMethods;
|
|
130
|
+
/**
|
|
131
|
+
* Create a new app factory.
|
|
132
|
+
* @param params The parameters to create the app factory
|
|
133
|
+
* @returns The `AppFactory` instance
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* const appFactory = new AppFactory({
|
|
137
|
+
* appSpec: appSpec,
|
|
138
|
+
* algorand: AlgorandClient.mainNet(),
|
|
139
|
+
* })
|
|
140
|
+
*/
|
|
141
|
+
constructor(params: AppFactoryParams);
|
|
142
|
+
/** The name of the app (from the ARC-32 / ARC-56 app spec or override). */
|
|
143
|
+
get appName(): string;
|
|
144
|
+
/** The ARC-56 app spec being used */
|
|
145
|
+
get appSpec(): Arc56Contract;
|
|
146
|
+
/** Return the algorand client this factory is using. */
|
|
147
|
+
get algorand(): AlgorandClient;
|
|
148
|
+
/** Get parameters to create transactions (create and deploy related calls) for the current app.
|
|
149
|
+
*
|
|
150
|
+
* A good mental model for this is that these parameters represent a deferred transaction creation.
|
|
151
|
+
* @example Create a transaction in the future using Algorand Client
|
|
152
|
+
* ```typescript
|
|
153
|
+
* const createAppParams = appFactory.params.create({method: 'create_method', args: [123, 'hello']})
|
|
154
|
+
* // ...
|
|
155
|
+
* await algorand.send.AppCreateMethodCall(createAppParams)
|
|
156
|
+
* ```
|
|
157
|
+
* @example Define a nested transaction as an ABI argument
|
|
158
|
+
* ```typescript
|
|
159
|
+
* const createAppParams = appFactory.params.create({method: 'create_method', args: [123, 'hello']})
|
|
160
|
+
* await appClient.send.call({method: 'my_method', args: [createAppParams]})
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
get params(): {
|
|
164
|
+
/** Return params for a create ABI call, including deploy-time TEAL template replacements and compilation if provided */
|
|
165
|
+
create: (params: AppFactoryCreateMethodCallParams) => Promise<{
|
|
166
|
+
deployTimeParams: TealTemplateParams | undefined;
|
|
167
|
+
schema: {
|
|
168
|
+
/** The number of integers saved in global state. */
|
|
169
|
+
globalInts: number;
|
|
170
|
+
/** The number of byte slices saved in global state. */
|
|
171
|
+
globalByteSlices: number;
|
|
172
|
+
/** The number of integers saved in local state. */
|
|
173
|
+
localInts: number;
|
|
174
|
+
/** The number of byte slices saved in local state. */
|
|
175
|
+
localByteSlices: number;
|
|
176
|
+
};
|
|
177
|
+
approvalProgram: Uint8Array<ArrayBufferLike>;
|
|
178
|
+
clearStateProgram: Uint8Array<ArrayBufferLike>;
|
|
179
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
180
|
+
note?: (Uint8Array | string) | undefined;
|
|
181
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
182
|
+
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
183
|
+
rejectVersion?: number | undefined;
|
|
184
|
+
lease?: (Uint8Array | string) | undefined;
|
|
185
|
+
rekeyTo?: (string | Address) | undefined;
|
|
186
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
187
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
188
|
+
validityWindow?: number | bigint | undefined;
|
|
189
|
+
firstValidRound?: bigint | undefined;
|
|
190
|
+
lastValidRound?: bigint | undefined;
|
|
191
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
192
|
+
appReferences?: bigint[] | undefined;
|
|
193
|
+
assetReferences?: bigint[] | undefined;
|
|
194
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[];
|
|
195
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
196
|
+
sender?: (Address | string) | undefined;
|
|
197
|
+
method: string;
|
|
198
|
+
args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[];
|
|
199
|
+
updatable?: boolean | undefined;
|
|
200
|
+
deletable?: boolean | undefined;
|
|
201
|
+
extraProgramPages?: number | undefined;
|
|
202
|
+
} & {
|
|
203
|
+
sender: algosdk.Address;
|
|
204
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
205
|
+
method: Arc56Method;
|
|
206
|
+
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
|
|
207
|
+
sender: string | Address;
|
|
208
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
209
|
+
note?: (Uint8Array | string) | undefined;
|
|
210
|
+
args?: Uint8Array[] | undefined;
|
|
211
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
212
|
+
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
213
|
+
rejectVersion?: number | undefined;
|
|
214
|
+
lease?: (Uint8Array | string) | undefined;
|
|
215
|
+
rekeyTo?: (string | Address) | undefined;
|
|
216
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
217
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
218
|
+
validityWindow?: number | bigint | undefined;
|
|
219
|
+
firstValidRound?: bigint | undefined;
|
|
220
|
+
lastValidRound?: bigint | undefined;
|
|
221
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
222
|
+
appReferences?: bigint[] | undefined;
|
|
223
|
+
assetReferences?: bigint[] | undefined;
|
|
224
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
225
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
226
|
+
approvalProgram: string | Uint8Array;
|
|
227
|
+
clearStateProgram: string | Uint8Array;
|
|
228
|
+
schema?: {
|
|
229
|
+
globalInts: number;
|
|
230
|
+
globalByteSlices: number;
|
|
231
|
+
localInts: number;
|
|
232
|
+
localByteSlices: number;
|
|
233
|
+
} | undefined;
|
|
234
|
+
extraProgramPages?: number | undefined;
|
|
235
|
+
}> | AppMethodCall<{
|
|
236
|
+
sender: string | Address;
|
|
237
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
238
|
+
rekeyTo?: (string | Address) | undefined;
|
|
239
|
+
note?: (Uint8Array | string) | undefined;
|
|
240
|
+
lease?: (Uint8Array | string) | undefined;
|
|
241
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
242
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
243
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
244
|
+
validityWindow?: number | bigint | undefined;
|
|
245
|
+
firstValidRound?: bigint | undefined;
|
|
246
|
+
lastValidRound?: bigint | undefined;
|
|
247
|
+
appId: bigint;
|
|
248
|
+
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
249
|
+
args?: Uint8Array[] | undefined;
|
|
250
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
251
|
+
appReferences?: bigint[] | undefined;
|
|
252
|
+
assetReferences?: bigint[] | undefined;
|
|
253
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
254
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
255
|
+
rejectVersion?: number | undefined;
|
|
256
|
+
approvalProgram: string | Uint8Array;
|
|
257
|
+
clearStateProgram: string | Uint8Array;
|
|
258
|
+
}> | AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
259
|
+
onComplete: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
260
|
+
}>;
|
|
261
|
+
/** Return params for a deployment update ABI call */
|
|
262
|
+
deployUpdate: (params: AppClientMethodCallParams) => {
|
|
263
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
264
|
+
note?: (Uint8Array | string) | undefined;
|
|
265
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
266
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
267
|
+
rejectVersion?: number | undefined;
|
|
268
|
+
lease?: (Uint8Array | string) | undefined;
|
|
269
|
+
rekeyTo?: (string | Address) | undefined;
|
|
270
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
271
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
272
|
+
validityWindow?: number | bigint | undefined;
|
|
273
|
+
firstValidRound?: bigint | undefined;
|
|
274
|
+
lastValidRound?: bigint | undefined;
|
|
275
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
276
|
+
appReferences?: bigint[] | undefined;
|
|
277
|
+
assetReferences?: bigint[] | undefined;
|
|
278
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
279
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
280
|
+
sender?: (Address | string) | undefined;
|
|
281
|
+
method: string;
|
|
282
|
+
args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
283
|
+
} & {
|
|
284
|
+
sender: algosdk.Address;
|
|
285
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
286
|
+
method: Arc56Method;
|
|
287
|
+
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
|
|
288
|
+
sender: string | Address;
|
|
289
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
290
|
+
note?: (Uint8Array | string) | undefined;
|
|
291
|
+
args?: Uint8Array[] | undefined;
|
|
292
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
293
|
+
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
294
|
+
rejectVersion?: number | undefined;
|
|
295
|
+
lease?: (Uint8Array | string) | undefined;
|
|
296
|
+
rekeyTo?: (string | Address) | undefined;
|
|
297
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
298
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
299
|
+
validityWindow?: number | bigint | undefined;
|
|
300
|
+
firstValidRound?: bigint | undefined;
|
|
301
|
+
lastValidRound?: bigint | undefined;
|
|
302
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
303
|
+
appReferences?: bigint[] | undefined;
|
|
304
|
+
assetReferences?: bigint[] | undefined;
|
|
305
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
306
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
307
|
+
approvalProgram: string | Uint8Array;
|
|
308
|
+
clearStateProgram: string | Uint8Array;
|
|
309
|
+
schema?: {
|
|
310
|
+
globalInts: number;
|
|
311
|
+
globalByteSlices: number;
|
|
312
|
+
localInts: number;
|
|
313
|
+
localByteSlices: number;
|
|
314
|
+
} | undefined;
|
|
315
|
+
extraProgramPages?: number | undefined;
|
|
316
|
+
}> | AppMethodCall<{
|
|
317
|
+
sender: string | Address;
|
|
318
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
319
|
+
rekeyTo?: (string | Address) | undefined;
|
|
320
|
+
note?: (Uint8Array | string) | undefined;
|
|
321
|
+
lease?: (Uint8Array | string) | undefined;
|
|
322
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
323
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
324
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
325
|
+
validityWindow?: number | bigint | undefined;
|
|
326
|
+
firstValidRound?: bigint | undefined;
|
|
327
|
+
lastValidRound?: bigint | undefined;
|
|
328
|
+
appId: bigint;
|
|
329
|
+
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
330
|
+
args?: Uint8Array[] | undefined;
|
|
331
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
332
|
+
appReferences?: bigint[] | undefined;
|
|
333
|
+
assetReferences?: bigint[] | undefined;
|
|
334
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
335
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
336
|
+
rejectVersion?: number | undefined;
|
|
337
|
+
approvalProgram: string | Uint8Array;
|
|
338
|
+
clearStateProgram: string | Uint8Array;
|
|
339
|
+
}> | AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
340
|
+
onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC;
|
|
341
|
+
};
|
|
342
|
+
/** Return params for a deployment delete ABI call */
|
|
343
|
+
deployDelete: (params: AppClientMethodCallParams) => {
|
|
344
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
345
|
+
note?: (Uint8Array | string) | undefined;
|
|
346
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
347
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
348
|
+
rejectVersion?: number | undefined;
|
|
349
|
+
lease?: (Uint8Array | string) | undefined;
|
|
350
|
+
rekeyTo?: (string | Address) | undefined;
|
|
351
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
352
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
353
|
+
validityWindow?: number | bigint | undefined;
|
|
354
|
+
firstValidRound?: bigint | undefined;
|
|
355
|
+
lastValidRound?: bigint | undefined;
|
|
356
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
357
|
+
appReferences?: bigint[] | undefined;
|
|
358
|
+
assetReferences?: bigint[] | undefined;
|
|
359
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
360
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
361
|
+
sender?: (Address | string) | undefined;
|
|
362
|
+
method: string;
|
|
363
|
+
args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
364
|
+
} & {
|
|
365
|
+
sender: algosdk.Address;
|
|
366
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
367
|
+
method: Arc56Method;
|
|
368
|
+
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
|
|
369
|
+
sender: string | Address;
|
|
370
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
371
|
+
note?: (Uint8Array | string) | undefined;
|
|
372
|
+
args?: Uint8Array[] | undefined;
|
|
373
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
374
|
+
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
375
|
+
rejectVersion?: number | undefined;
|
|
376
|
+
lease?: (Uint8Array | string) | undefined;
|
|
377
|
+
rekeyTo?: (string | Address) | undefined;
|
|
378
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
379
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
380
|
+
validityWindow?: number | bigint | undefined;
|
|
381
|
+
firstValidRound?: bigint | undefined;
|
|
382
|
+
lastValidRound?: bigint | undefined;
|
|
383
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
384
|
+
appReferences?: bigint[] | undefined;
|
|
385
|
+
assetReferences?: bigint[] | undefined;
|
|
386
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
387
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
388
|
+
approvalProgram: string | Uint8Array;
|
|
389
|
+
clearStateProgram: string | Uint8Array;
|
|
390
|
+
schema?: {
|
|
391
|
+
globalInts: number;
|
|
392
|
+
globalByteSlices: number;
|
|
393
|
+
localInts: number;
|
|
394
|
+
localByteSlices: number;
|
|
395
|
+
} | undefined;
|
|
396
|
+
extraProgramPages?: number | undefined;
|
|
397
|
+
}> | AppMethodCall<{
|
|
398
|
+
sender: string | Address;
|
|
399
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
400
|
+
rekeyTo?: (string | Address) | undefined;
|
|
401
|
+
note?: (Uint8Array | string) | undefined;
|
|
402
|
+
lease?: (Uint8Array | string) | undefined;
|
|
403
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
404
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
405
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
406
|
+
validityWindow?: number | bigint | undefined;
|
|
407
|
+
firstValidRound?: bigint | undefined;
|
|
408
|
+
lastValidRound?: bigint | undefined;
|
|
409
|
+
appId: bigint;
|
|
410
|
+
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
411
|
+
args?: Uint8Array[] | undefined;
|
|
412
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
413
|
+
appReferences?: bigint[] | undefined;
|
|
414
|
+
assetReferences?: bigint[] | undefined;
|
|
415
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
416
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
417
|
+
rejectVersion?: number | undefined;
|
|
418
|
+
approvalProgram: string | Uint8Array;
|
|
419
|
+
clearStateProgram: string | Uint8Array;
|
|
420
|
+
}> | AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
421
|
+
onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
422
|
+
};
|
|
423
|
+
bare: {
|
|
424
|
+
/** Return params for a create bare call, including deploy-time TEAL template replacements and compilation if provided */
|
|
425
|
+
create: (params?: AppFactoryCreateParams) => Promise<{
|
|
426
|
+
approvalProgram: Uint8Array;
|
|
427
|
+
clearStateProgram: Uint8Array;
|
|
428
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
429
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
430
|
+
deployTimeParams: TealTemplateParams | undefined;
|
|
431
|
+
schema: {
|
|
432
|
+
/** The number of integers saved in global state. */
|
|
433
|
+
globalInts: number;
|
|
434
|
+
/** The number of byte slices saved in global state. */
|
|
435
|
+
globalByteSlices: number;
|
|
436
|
+
/** The number of integers saved in local state. */
|
|
437
|
+
localInts: number;
|
|
438
|
+
/** The number of byte slices saved in local state. */
|
|
439
|
+
localByteSlices: number;
|
|
440
|
+
};
|
|
441
|
+
maxFee?: import("./amount").AlgoAmount;
|
|
442
|
+
note?: Uint8Array | string;
|
|
443
|
+
args?: Uint8Array[];
|
|
444
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount;
|
|
445
|
+
rejectVersion?: number;
|
|
446
|
+
lease?: Uint8Array | string;
|
|
447
|
+
rekeyTo?: string | Address;
|
|
448
|
+
staticFee?: import("./amount").AlgoAmount;
|
|
449
|
+
extraFee?: import("./amount").AlgoAmount;
|
|
450
|
+
validityWindow?: number | bigint;
|
|
451
|
+
firstValidRound?: bigint;
|
|
452
|
+
lastValidRound?: bigint;
|
|
453
|
+
accountReferences?: (string | Address)[];
|
|
454
|
+
appReferences?: bigint[];
|
|
455
|
+
assetReferences?: bigint[];
|
|
456
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[];
|
|
457
|
+
accessReferences?: import("./app-manager").ResourceReference[];
|
|
458
|
+
sender?: Address | string;
|
|
459
|
+
updatable?: boolean;
|
|
460
|
+
deletable?: boolean;
|
|
461
|
+
onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
|
|
462
|
+
extraProgramPages?: number;
|
|
463
|
+
} & {
|
|
464
|
+
sender: algosdk.Address;
|
|
465
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
466
|
+
onComplete: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
467
|
+
}>;
|
|
468
|
+
/** Return params for a deployment update bare call */
|
|
469
|
+
deployUpdate: (params?: AppClientBareCallParams) => {
|
|
470
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
471
|
+
note?: (Uint8Array | string) | undefined;
|
|
472
|
+
args?: Uint8Array[] | undefined;
|
|
473
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
474
|
+
rejectVersion?: number | undefined;
|
|
475
|
+
lease?: (Uint8Array | string) | undefined;
|
|
476
|
+
rekeyTo?: (string | Address) | undefined;
|
|
477
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
478
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
479
|
+
validityWindow?: number | bigint | undefined;
|
|
480
|
+
firstValidRound?: bigint | undefined;
|
|
481
|
+
lastValidRound?: bigint | undefined;
|
|
482
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
483
|
+
appReferences?: bigint[] | undefined;
|
|
484
|
+
assetReferences?: bigint[] | undefined;
|
|
485
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
486
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
487
|
+
sender?: (Address | string) | undefined;
|
|
488
|
+
} & {
|
|
489
|
+
sender: algosdk.Address;
|
|
490
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
491
|
+
onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC;
|
|
492
|
+
};
|
|
493
|
+
/** Return params for a deployment delete bare call */
|
|
494
|
+
deployDelete: (params?: AppClientBareCallParams) => {
|
|
495
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
496
|
+
note?: (Uint8Array | string) | undefined;
|
|
497
|
+
args?: Uint8Array[] | undefined;
|
|
498
|
+
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
499
|
+
rejectVersion?: number | undefined;
|
|
500
|
+
lease?: (Uint8Array | string) | undefined;
|
|
501
|
+
rekeyTo?: (string | Address) | undefined;
|
|
502
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
503
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
504
|
+
validityWindow?: number | bigint | undefined;
|
|
505
|
+
firstValidRound?: bigint | undefined;
|
|
506
|
+
lastValidRound?: bigint | undefined;
|
|
507
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
508
|
+
appReferences?: bigint[] | undefined;
|
|
509
|
+
assetReferences?: bigint[] | undefined;
|
|
510
|
+
boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
|
|
511
|
+
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
512
|
+
sender?: (Address | string) | undefined;
|
|
513
|
+
} & {
|
|
514
|
+
sender: algosdk.Address;
|
|
515
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
516
|
+
onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
407
519
|
};
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
520
|
+
/** Create transactions for the current app */
|
|
521
|
+
readonly createTransaction: {
|
|
522
|
+
/** Create bare (raw) transactions for the current app */
|
|
523
|
+
bare: {
|
|
524
|
+
/**
|
|
525
|
+
* Create a create app call transaction using a bare (raw) create call.
|
|
526
|
+
*
|
|
527
|
+
* Performs deploy-time TEAL template placeholder substitutions (if specified).
|
|
528
|
+
* @param params The parameters to create the create call transaction
|
|
529
|
+
* @returns The create call transaction
|
|
530
|
+
*/
|
|
531
|
+
create: (params?: AppFactoryCreateParams) => Promise<algosdk.Transaction>;
|
|
420
532
|
};
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
appReferences?: bigint[];
|
|
434
|
-
assetReferences?: bigint[];
|
|
435
|
-
boxReferences?: (BoxReference | BoxIdentifier)[];
|
|
436
|
-
accessReferences?: ResourceReference[];
|
|
437
|
-
rejectVersion?: number;
|
|
438
|
-
sender?: Address | string;
|
|
439
|
-
updatable?: boolean;
|
|
440
|
-
deletable?: boolean;
|
|
441
|
-
onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
|
|
442
|
-
extraProgramPages?: number;
|
|
443
|
-
} & {
|
|
444
|
-
sender: algosdk.Address;
|
|
445
|
-
signer: TransactionSignerAccount | algosdk.TransactionSigner | undefined;
|
|
446
|
-
onComplete: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
447
|
-
}>; /** Return params for a deployment update bare call */
|
|
448
|
-
deployUpdate: (params?: AppClientBareCallParams) => {
|
|
449
|
-
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
450
|
-
rekeyTo?: (string | Address) | undefined;
|
|
451
|
-
note?: (Uint8Array | string) | undefined;
|
|
452
|
-
lease?: (Uint8Array | string) | undefined;
|
|
453
|
-
staticFee?: AlgoAmount | undefined;
|
|
454
|
-
extraFee?: AlgoAmount | undefined;
|
|
455
|
-
maxFee?: AlgoAmount | undefined;
|
|
456
|
-
validityWindow?: number | bigint | undefined;
|
|
457
|
-
firstValidRound?: bigint | undefined;
|
|
458
|
-
lastValidRound?: bigint | undefined;
|
|
459
|
-
args?: Uint8Array[] | undefined;
|
|
460
|
-
accountReferences?: (string | Address)[] | undefined;
|
|
461
|
-
appReferences?: bigint[] | undefined;
|
|
462
|
-
assetReferences?: bigint[] | undefined;
|
|
463
|
-
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
464
|
-
accessReferences?: ResourceReference[] | undefined;
|
|
465
|
-
rejectVersion?: number | undefined;
|
|
466
|
-
sender?: (Address | string) | undefined;
|
|
467
|
-
} & {
|
|
468
|
-
sender: algosdk.Address;
|
|
469
|
-
signer: TransactionSignerAccount | algosdk.TransactionSigner | undefined;
|
|
470
|
-
onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC;
|
|
471
|
-
}; /** Return params for a deployment delete bare call */
|
|
472
|
-
deployDelete: (params?: AppClientBareCallParams) => {
|
|
473
|
-
signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
|
|
474
|
-
rekeyTo?: (string | Address) | undefined;
|
|
475
|
-
note?: (Uint8Array | string) | undefined;
|
|
476
|
-
lease?: (Uint8Array | string) | undefined;
|
|
477
|
-
staticFee?: AlgoAmount | undefined;
|
|
478
|
-
extraFee?: AlgoAmount | undefined;
|
|
479
|
-
maxFee?: AlgoAmount | undefined;
|
|
480
|
-
validityWindow?: number | bigint | undefined;
|
|
481
|
-
firstValidRound?: bigint | undefined;
|
|
482
|
-
lastValidRound?: bigint | undefined;
|
|
483
|
-
args?: Uint8Array[] | undefined;
|
|
484
|
-
accountReferences?: (string | Address)[] | undefined;
|
|
485
|
-
appReferences?: bigint[] | undefined;
|
|
486
|
-
assetReferences?: bigint[] | undefined;
|
|
487
|
-
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
488
|
-
accessReferences?: ResourceReference[] | undefined;
|
|
489
|
-
rejectVersion?: number | undefined;
|
|
490
|
-
sender?: (Address | string) | undefined;
|
|
491
|
-
} & {
|
|
492
|
-
sender: algosdk.Address;
|
|
493
|
-
signer: TransactionSignerAccount | algosdk.TransactionSigner | undefined;
|
|
494
|
-
onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
495
|
-
};
|
|
533
|
+
/**
|
|
534
|
+
* Create a create app call transaction using an ABI create call.
|
|
535
|
+
*
|
|
536
|
+
* Performs deploy-time TEAL template placeholder substitutions (if specified).
|
|
537
|
+
* @param params The parameters to create the create call transaction
|
|
538
|
+
* @returns The create call transaction
|
|
539
|
+
*/
|
|
540
|
+
create: (params: AppFactoryCreateMethodCallParams) => Promise<{
|
|
541
|
+
transactions: algosdk.Transaction[];
|
|
542
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
543
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
544
|
+
}>;
|
|
496
545
|
};
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
546
|
+
/** Send transactions to the current app */
|
|
547
|
+
readonly send: {
|
|
548
|
+
/** Send bare (raw) transactions for the current app */
|
|
549
|
+
bare: {
|
|
550
|
+
/**
|
|
551
|
+
* Creates an instance of the app using a bare (raw) create call and returns the result
|
|
552
|
+
* of the creation transaction and an app client to interact with that app instance.
|
|
553
|
+
*
|
|
554
|
+
* Performs deploy-time TEAL template placeholder substitutions (if specified).
|
|
555
|
+
* @param params The parameters to create the app
|
|
556
|
+
* @returns The app client and the result of the creation transaction
|
|
557
|
+
*/
|
|
558
|
+
create: (params?: AppFactoryCreateParams & SendParams) => Promise<{
|
|
559
|
+
appClient: AppClient;
|
|
560
|
+
result: {
|
|
561
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
562
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
563
|
+
return: undefined;
|
|
564
|
+
groupId: string;
|
|
565
|
+
txIds: string[];
|
|
566
|
+
returns?: import("./app").ABIReturn[] | undefined;
|
|
567
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
568
|
+
transactions: algosdk.Transaction[];
|
|
569
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
570
|
+
transaction: algosdk.Transaction;
|
|
571
|
+
appId: bigint;
|
|
572
|
+
appAddress: Address;
|
|
573
|
+
};
|
|
574
|
+
}>;
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* Creates an instance of the app and returns the result of the creation
|
|
578
|
+
* transaction and an app client to interact with that app instance.
|
|
579
|
+
*
|
|
580
|
+
* Performs deploy-time TEAL template placeholder substitutions (if specified).
|
|
581
|
+
* @param params The parameters to create the app
|
|
582
|
+
* @returns The app client and the result of the creation transaction
|
|
583
|
+
*/
|
|
584
|
+
create: (params: AppFactoryCreateMethodCallParams & SendParams) => Promise<{
|
|
585
|
+
appClient: AppClient;
|
|
586
|
+
result: {
|
|
587
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
588
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
589
|
+
appId: bigint;
|
|
590
|
+
groupId: string;
|
|
591
|
+
txIds: string[];
|
|
592
|
+
returns?: import("./app").ABIReturn[] | undefined;
|
|
593
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
594
|
+
transactions: algosdk.Transaction[];
|
|
595
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
596
|
+
transaction: algosdk.Transaction;
|
|
597
|
+
appAddress: Address;
|
|
598
|
+
return?: Uint8Array<ArrayBufferLike> | algosdk.ABIValue | ABIStruct | undefined;
|
|
599
|
+
};
|
|
600
|
+
}>;
|
|
509
601
|
};
|
|
510
602
|
/**
|
|
511
|
-
*
|
|
603
|
+
* Idempotently deploy (create if not exists, update if changed) an app against the given name for the given creator account, including deploy-time TEAL template placeholder substitutions (if specified).
|
|
604
|
+
*
|
|
605
|
+
* **Note:** When using the return from this function be sure to check `operationPerformed` to get access to various return properties like `transaction`, `confirmation` and `deleteResult`.
|
|
512
606
|
*
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
*
|
|
607
|
+
* **Note:** if there is a breaking state schema change to an existing app (and `onSchemaBreak` is set to `'replace'`) the existing app will be deleted and re-created.
|
|
608
|
+
*
|
|
609
|
+
* **Note:** if there is an update (different TEAL code) to an existing app (and `onUpdate` is set to `'replace'`) the existing app will be deleted and re-created.
|
|
610
|
+
* @param params The arguments to control the app deployment
|
|
611
|
+
* @returns The app client and the result of the deployment
|
|
612
|
+
* @example
|
|
613
|
+
* ```ts
|
|
614
|
+
* const { appClient, result } = await factory.deploy({
|
|
615
|
+
* createParams: {
|
|
616
|
+
* sender: 'SENDER_ADDRESS',
|
|
617
|
+
* approvalProgram: 'APPROVAL PROGRAM',
|
|
618
|
+
* clearStateProgram: 'CLEAR PROGRAM',
|
|
619
|
+
* schema: {
|
|
620
|
+
* globalByteSlices: 0,
|
|
621
|
+
* globalInts: 0,
|
|
622
|
+
* localByteSlices: 0,
|
|
623
|
+
* localInts: 0
|
|
624
|
+
* }
|
|
625
|
+
* },
|
|
626
|
+
* updateParams: {
|
|
627
|
+
* sender: 'SENDER_ADDRESS'
|
|
628
|
+
* },
|
|
629
|
+
* deleteParams: {
|
|
630
|
+
* sender: 'SENDER_ADDRESS'
|
|
631
|
+
* },
|
|
632
|
+
* metadata: { name: 'my_app', version: '2.0', updatable: false, deletable: false },
|
|
633
|
+
* onSchemaBreak: 'append',
|
|
634
|
+
* onUpdate: 'append'
|
|
635
|
+
* })
|
|
636
|
+
* ```
|
|
516
637
|
*/
|
|
517
|
-
|
|
518
|
-
transactions: algosdk.Transaction[];
|
|
519
|
-
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
520
|
-
signers: Map<number, algosdk.TransactionSigner>;
|
|
521
|
-
}>;
|
|
522
|
-
};
|
|
523
|
-
/** Send transactions to the current app */
|
|
524
|
-
readonly send: {
|
|
525
|
-
/** Send bare (raw) transactions for the current app */bare: {
|
|
526
|
-
/**
|
|
527
|
-
* Creates an instance of the app using a bare (raw) create call and returns the result
|
|
528
|
-
* of the creation transaction and an app client to interact with that app instance.
|
|
529
|
-
*
|
|
530
|
-
* Performs deploy-time TEAL template placeholder substitutions (if specified).
|
|
531
|
-
* @param params The parameters to create the app
|
|
532
|
-
* @returns The app client and the result of the creation transaction
|
|
533
|
-
*/
|
|
534
|
-
create: (params?: AppFactoryCreateParams & SendParams) => Promise<{
|
|
638
|
+
deploy(params: AppFactoryDeployParams): Promise<{
|
|
535
639
|
appClient: AppClient;
|
|
536
640
|
result: {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
641
|
+
return: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
642
|
+
deleteReturn: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
643
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
644
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
645
|
+
operationPerformed: "create";
|
|
646
|
+
version: string;
|
|
647
|
+
name: string;
|
|
648
|
+
createdRound: bigint;
|
|
649
|
+
updatedRound: bigint;
|
|
650
|
+
createdMetadata: import("./app").AppDeployMetadata;
|
|
651
|
+
deleted: boolean;
|
|
652
|
+
deletable?: boolean | undefined;
|
|
653
|
+
updatable?: boolean | undefined;
|
|
654
|
+
groupId: string;
|
|
655
|
+
txIds: string[];
|
|
656
|
+
returns?: import("./app").ABIReturn[] | undefined;
|
|
657
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
658
|
+
transactions: algosdk.Transaction[];
|
|
659
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
660
|
+
transaction: algosdk.Transaction;
|
|
661
|
+
appId: bigint;
|
|
662
|
+
appAddress: Address;
|
|
663
|
+
} | {
|
|
664
|
+
return: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
665
|
+
deleteReturn: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
666
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
667
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
668
|
+
operationPerformed: "update";
|
|
669
|
+
appId: bigint;
|
|
670
|
+
appAddress: Address;
|
|
671
|
+
createdRound: bigint;
|
|
672
|
+
updatedRound: bigint;
|
|
673
|
+
createdMetadata: import("./app").AppDeployMetadata;
|
|
674
|
+
deleted: boolean;
|
|
675
|
+
name: string;
|
|
676
|
+
version: string;
|
|
677
|
+
deletable?: boolean | undefined;
|
|
678
|
+
updatable?: boolean | undefined;
|
|
679
|
+
groupId: string;
|
|
680
|
+
txIds: string[];
|
|
681
|
+
returns?: import("./app").ABIReturn[] | undefined;
|
|
682
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
683
|
+
transactions: algosdk.Transaction[];
|
|
684
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
685
|
+
transaction: algosdk.Transaction;
|
|
686
|
+
} | {
|
|
687
|
+
return: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
688
|
+
deleteReturn: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
689
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
690
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
691
|
+
operationPerformed: "replace";
|
|
692
|
+
version: string;
|
|
693
|
+
name: string;
|
|
694
|
+
createdRound: bigint;
|
|
695
|
+
updatedRound: bigint;
|
|
696
|
+
createdMetadata: import("./app").AppDeployMetadata;
|
|
697
|
+
deleted: boolean;
|
|
698
|
+
deletable?: boolean | undefined;
|
|
699
|
+
updatable?: boolean | undefined;
|
|
700
|
+
groupId: string;
|
|
701
|
+
txIds: string[];
|
|
702
|
+
returns?: import("./app").ABIReturn[] | undefined;
|
|
703
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
704
|
+
transactions: algosdk.Transaction[];
|
|
705
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
706
|
+
transaction: algosdk.Transaction;
|
|
707
|
+
appId: bigint;
|
|
708
|
+
appAddress: Address;
|
|
709
|
+
deleteResult: import("./transaction").ConfirmedTransactionResult;
|
|
710
|
+
} | {
|
|
711
|
+
return: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
712
|
+
deleteReturn: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
713
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
714
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
715
|
+
operationPerformed: "nothing";
|
|
716
|
+
appId: bigint;
|
|
717
|
+
appAddress: Address;
|
|
718
|
+
createdRound: bigint;
|
|
719
|
+
updatedRound: bigint;
|
|
720
|
+
createdMetadata: import("./app").AppDeployMetadata;
|
|
721
|
+
deleted: boolean;
|
|
722
|
+
name: string;
|
|
723
|
+
version: string;
|
|
724
|
+
deletable?: boolean | undefined;
|
|
725
|
+
updatable?: boolean | undefined;
|
|
549
726
|
};
|
|
550
|
-
|
|
551
|
-
};
|
|
727
|
+
}>;
|
|
552
728
|
/**
|
|
553
|
-
*
|
|
554
|
-
* transaction and an app client to interact with that app instance.
|
|
729
|
+
* Returns a new `AppClient` client for an app instance of the given ID.
|
|
555
730
|
*
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
* @
|
|
731
|
+
* Automatically populates appName, defaultSender and source maps from the factory
|
|
732
|
+
* if not specified in the params.
|
|
733
|
+
* @param params The parameters to create the app client
|
|
734
|
+
* @returns The `AppClient` instance
|
|
735
|
+
* @example
|
|
736
|
+
* ```typescript
|
|
737
|
+
* const appClient = factory.getAppClientById({ appId: 12345n })
|
|
738
|
+
* ```
|
|
559
739
|
*/
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
transactions: algosdk.Transaction[];
|
|
635
|
-
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
636
|
-
transaction: algosdk.Transaction;
|
|
637
|
-
appId: bigint;
|
|
638
|
-
appAddress: Address;
|
|
639
|
-
} | {
|
|
640
|
-
return: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
641
|
-
deleteReturn: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
642
|
-
compiledApproval?: CompiledTeal | undefined;
|
|
643
|
-
compiledClear?: CompiledTeal | undefined;
|
|
644
|
-
operationPerformed: "update";
|
|
645
|
-
appId: bigint;
|
|
646
|
-
appAddress: Address;
|
|
647
|
-
createdRound: bigint;
|
|
648
|
-
updatedRound: bigint;
|
|
649
|
-
createdMetadata: AppDeployMetadata;
|
|
650
|
-
deleted: boolean;
|
|
651
|
-
name: string;
|
|
652
|
-
version: string;
|
|
653
|
-
deletable?: boolean | undefined;
|
|
654
|
-
updatable?: boolean | undefined;
|
|
655
|
-
groupId: string;
|
|
656
|
-
txIds: string[];
|
|
657
|
-
returns?: ABIReturn[] | undefined;
|
|
658
|
-
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
659
|
-
transactions: algosdk.Transaction[];
|
|
660
|
-
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
661
|
-
transaction: algosdk.Transaction;
|
|
662
|
-
} | {
|
|
663
|
-
return: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
664
|
-
deleteReturn: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
665
|
-
compiledApproval?: CompiledTeal | undefined;
|
|
666
|
-
compiledClear?: CompiledTeal | undefined;
|
|
667
|
-
operationPerformed: "replace";
|
|
668
|
-
name: string;
|
|
669
|
-
updatable?: boolean | undefined;
|
|
670
|
-
deletable?: boolean | undefined;
|
|
671
|
-
createdRound: bigint;
|
|
672
|
-
updatedRound: bigint;
|
|
673
|
-
createdMetadata: AppDeployMetadata;
|
|
674
|
-
deleted: boolean;
|
|
675
|
-
version: string;
|
|
676
|
-
groupId: string;
|
|
677
|
-
txIds: string[];
|
|
678
|
-
returns?: ABIReturn[] | undefined;
|
|
679
|
-
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
680
|
-
transactions: algosdk.Transaction[];
|
|
681
|
-
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
682
|
-
transaction: algosdk.Transaction;
|
|
683
|
-
appId: bigint;
|
|
684
|
-
appAddress: Address;
|
|
685
|
-
deleteResult: ConfirmedTransactionResult;
|
|
686
|
-
} | {
|
|
687
|
-
return: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
688
|
-
deleteReturn: string | number | bigint | boolean | algosdk.Address | Uint8Array<ArrayBufferLike> | algosdk.ABIValue[] | ABIStruct | undefined;
|
|
689
|
-
compiledApproval?: CompiledTeal | undefined;
|
|
690
|
-
compiledClear?: CompiledTeal | undefined;
|
|
691
|
-
operationPerformed: "nothing";
|
|
692
|
-
appId: bigint;
|
|
693
|
-
appAddress: Address;
|
|
694
|
-
createdRound: bigint;
|
|
695
|
-
updatedRound: bigint;
|
|
696
|
-
createdMetadata: AppDeployMetadata;
|
|
697
|
-
deleted: boolean;
|
|
698
|
-
name: string;
|
|
699
|
-
version: string;
|
|
700
|
-
deletable?: boolean | undefined;
|
|
701
|
-
updatable?: boolean | undefined;
|
|
702
|
-
};
|
|
703
|
-
}>;
|
|
704
|
-
/**
|
|
705
|
-
* Returns a new `AppClient` client for an app instance of the given ID.
|
|
706
|
-
*
|
|
707
|
-
* Automatically populates appName, defaultSender and source maps from the factory
|
|
708
|
-
* if not specified in the params.
|
|
709
|
-
* @param params The parameters to create the app client
|
|
710
|
-
* @returns The `AppClient` instance
|
|
711
|
-
* @example
|
|
712
|
-
* ```typescript
|
|
713
|
-
* const appClient = factory.getAppClientById({ appId: 12345n })
|
|
714
|
-
* ```
|
|
715
|
-
*/
|
|
716
|
-
getAppClientById(params: AppFactoryAppClientParams): AppClient;
|
|
717
|
-
/**
|
|
718
|
-
* Returns a new `AppClient` client, resolving the app by creator address and name
|
|
719
|
-
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
720
|
-
*
|
|
721
|
-
* Automatically populates appName, defaultSender and source maps from the factory
|
|
722
|
-
* if not specified in the params.
|
|
723
|
-
* @param params The parameters to create the app client
|
|
724
|
-
* @returns The `AppClient` instance
|
|
725
|
-
* @example
|
|
726
|
-
* ```typescript
|
|
727
|
-
* const appClient = factory.getAppClientByCreatorAndName({ creatorAddress: 'CREATOR_ADDRESS', appName: 'my_app' })
|
|
728
|
-
* ```
|
|
729
|
-
*/
|
|
730
|
-
getAppClientByCreatorAndName(params: AppFactoryResolveAppClientByCreatorAndNameParams): Promise<AppClient>;
|
|
731
|
-
/**
|
|
732
|
-
* Takes an error that may include a logic error from a call to the current app and re-exposes the
|
|
733
|
-
* error to include source code information via the source map and ARC-56 spec.
|
|
734
|
-
* @param e The error to parse
|
|
735
|
-
* @param isClearStateProgram Whether or not the code was running the clear state program (defaults to approval program)
|
|
736
|
-
* @returns The new error, or if there was no logic error or source map then the wrapped error with source details
|
|
737
|
-
*/
|
|
738
|
-
exposeLogicError(e: Error, isClearStateProgram?: boolean): Error;
|
|
739
|
-
/**
|
|
740
|
-
* Export the current source maps for the app.
|
|
741
|
-
* @returns The source maps
|
|
742
|
-
*/
|
|
743
|
-
exportSourceMaps(): AppSourceMaps;
|
|
744
|
-
/**
|
|
745
|
-
* Import source maps for the app.
|
|
746
|
-
* @param sourceMaps The source maps to import
|
|
747
|
-
*/
|
|
748
|
-
importSourceMaps(sourceMaps: AppSourceMaps): void;
|
|
749
|
-
private getDeployTimeControl;
|
|
750
|
-
private getParamsMethods;
|
|
751
|
-
/** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */
|
|
752
|
-
private handleCallErrors;
|
|
753
|
-
/**
|
|
754
|
-
* Compiles the approval and clear state programs (if TEAL templates provided),
|
|
755
|
-
* performing any provided deploy-time parameter replacement and stores
|
|
756
|
-
* the source maps.
|
|
757
|
-
*
|
|
758
|
-
* If no TEAL templates provided it will use any byte code provided in the app spec.
|
|
759
|
-
*
|
|
760
|
-
* Will store any generated source maps for later use in debugging.
|
|
761
|
-
* @param compilation Optional compilation parameters to use for the compilation
|
|
762
|
-
* @returns The compilation result
|
|
763
|
-
* @example
|
|
764
|
-
* ```typescript
|
|
765
|
-
* const result = await factory.compile()
|
|
766
|
-
* ```
|
|
767
|
-
*/
|
|
768
|
-
compile(compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
|
|
769
|
-
private getBareParams;
|
|
770
|
-
private getABIParams;
|
|
771
|
-
private getCreateABIArgsWithDefaultValues;
|
|
772
|
-
/** Returns the sender for a call, using the `defaultSender`
|
|
773
|
-
* if none provided and throws an error if neither provided */
|
|
774
|
-
private getSender;
|
|
775
|
-
/** Returns the signer for a call, using the provided signer or the `defaultSigner`
|
|
776
|
-
* if no signer was provided and the sender resolves to the default sender, the call will use default signer
|
|
777
|
-
* or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */
|
|
778
|
-
private getSigner;
|
|
779
|
-
/**
|
|
780
|
-
* Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type
|
|
781
|
-
* on the ARC-56 method.
|
|
782
|
-
*
|
|
783
|
-
* If the return type is a struct then the struct will be returned.
|
|
784
|
-
*
|
|
785
|
-
* @param result The SendAppTransactionResult to be mapped
|
|
786
|
-
* @param method The method that was called
|
|
787
|
-
* @returns The smart contract response with an updated return value
|
|
788
|
-
*/
|
|
789
|
-
parseMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Omit<TResult, 'return'> & AppReturn<TReturn>>;
|
|
740
|
+
getAppClientById(params: AppFactoryAppClientParams): AppClient;
|
|
741
|
+
/**
|
|
742
|
+
* Returns a new `AppClient` client, resolving the app by creator address and name
|
|
743
|
+
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
744
|
+
*
|
|
745
|
+
* Automatically populates appName, defaultSender and source maps from the factory
|
|
746
|
+
* if not specified in the params.
|
|
747
|
+
* @param params The parameters to create the app client
|
|
748
|
+
* @returns The `AppClient` instance
|
|
749
|
+
* @example
|
|
750
|
+
* ```typescript
|
|
751
|
+
* const appClient = factory.getAppClientByCreatorAndName({ creatorAddress: 'CREATOR_ADDRESS', appName: 'my_app' })
|
|
752
|
+
* ```
|
|
753
|
+
*/
|
|
754
|
+
getAppClientByCreatorAndName(params: AppFactoryResolveAppClientByCreatorAndNameParams): Promise<AppClient>;
|
|
755
|
+
/**
|
|
756
|
+
* Takes an error that may include a logic error from a call to the current app and re-exposes the
|
|
757
|
+
* error to include source code information via the source map and ARC-56 spec.
|
|
758
|
+
* @param e The error to parse
|
|
759
|
+
* @param isClearStateProgram Whether or not the code was running the clear state program (defaults to approval program)
|
|
760
|
+
* @returns The new error, or if there was no logic error or source map then the wrapped error with source details
|
|
761
|
+
*/
|
|
762
|
+
exposeLogicError(e: Error, isClearStateProgram?: boolean): Error;
|
|
763
|
+
/**
|
|
764
|
+
* Export the current source maps for the app.
|
|
765
|
+
* @returns The source maps
|
|
766
|
+
*/
|
|
767
|
+
exportSourceMaps(): AppSourceMaps;
|
|
768
|
+
/**
|
|
769
|
+
* Import source maps for the app.
|
|
770
|
+
* @param sourceMaps The source maps to import
|
|
771
|
+
*/
|
|
772
|
+
importSourceMaps(sourceMaps: AppSourceMaps): void;
|
|
773
|
+
private getDeployTimeControl;
|
|
774
|
+
private getParamsMethods;
|
|
775
|
+
/** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */
|
|
776
|
+
private handleCallErrors;
|
|
777
|
+
/**
|
|
778
|
+
* Compiles the approval and clear state programs (if TEAL templates provided),
|
|
779
|
+
* performing any provided deploy-time parameter replacement and stores
|
|
780
|
+
* the source maps.
|
|
781
|
+
*
|
|
782
|
+
* If no TEAL templates provided it will use any byte code provided in the app spec.
|
|
783
|
+
*
|
|
784
|
+
* Will store any generated source maps for later use in debugging.
|
|
785
|
+
* @param compilation Optional compilation parameters to use for the compilation
|
|
786
|
+
* @returns The compilation result
|
|
787
|
+
* @example
|
|
788
|
+
* ```typescript
|
|
789
|
+
* const result = await factory.compile()
|
|
790
|
+
* ```
|
|
791
|
+
*/
|
|
792
|
+
compile(compilation?: AppClientCompilationParams): Promise<import("./app-client").AppClientCompilationResult>;
|
|
793
|
+
private getBareParams;
|
|
794
|
+
private getABIParams;
|
|
795
|
+
private getCreateABIArgsWithDefaultValues;
|
|
796
|
+
/** Returns the sender for a call, using the `defaultSender`
|
|
797
|
+
* if none provided and throws an error if neither provided */
|
|
798
|
+
private getSender;
|
|
799
|
+
/** Returns the signer for a call, using the provided signer or the `defaultSigner`
|
|
800
|
+
* if no signer was provided and the sender resolves to the default sender, the call will use default signer
|
|
801
|
+
* or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */
|
|
802
|
+
private getSigner;
|
|
803
|
+
/**
|
|
804
|
+
* Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type
|
|
805
|
+
* on the ARC-56 method.
|
|
806
|
+
*
|
|
807
|
+
* If the return type is a struct then the struct will be returned.
|
|
808
|
+
*
|
|
809
|
+
* @param result The SendAppTransactionResult to be mapped
|
|
810
|
+
* @param method The method that was called
|
|
811
|
+
* @returns The smart contract response with an updated return value
|
|
812
|
+
*/
|
|
813
|
+
parseMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Omit<TResult, 'return'> & AppReturn<TReturn>>;
|
|
790
814
|
}
|
|
791
|
-
//#endregion
|
|
792
|
-
export { AppFactory, AppFactoryAppClientParams, AppFactoryCreateMethodCallParams, AppFactoryCreateParams, AppFactoryDeployParams, AppFactoryParams, AppFactoryResolveAppClientByCreatorAndNameParams, CreateOnComplete, CreateSchema };
|
|
793
|
-
//# sourceMappingURL=app-factory.d.ts.map
|