@algorandfoundation/algokit-utils 7.0.0-beta.6 → 7.0.0-beta.8
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/app.d.ts +6 -6
- package/app.js +6 -6
- package/app.js.map +1 -1
- package/app.mjs +6 -6
- package/app.mjs.map +1 -1
- package/asset.d.ts +3 -3
- package/asset.js +3 -3
- package/asset.js.map +1 -1
- package/asset.mjs +3 -3
- package/asset.mjs.map +1 -1
- package/package.json +1 -1
- package/testing/fixtures/algorand-fixture.js +1 -1
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +1 -1
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/transaction/legacy-bridge.d.ts +3 -3
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/transaction.d.ts +1 -3
- package/transaction/transaction.js +17 -11
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +17 -11
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/transfer-algos.d.ts +1 -1
- package/transfer/transfer-algos.js +1 -1
- package/transfer/transfer-algos.js.map +1 -1
- package/transfer/transfer-algos.mjs +1 -1
- package/transfer/transfer-algos.mjs.map +1 -1
- package/transfer/transfer.d.ts +1 -1
- package/transfer/transfer.js +1 -1
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +1 -1
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +13 -4
- package/types/account-manager.js +17 -3
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +17 -3
- package/types/account-manager.mjs.map +1 -1
- package/types/algorand-client-interface.d.ts +1 -1
- package/types/algorand-client-transaction-creator.d.ts +30 -30
- package/types/algorand-client-transaction-creator.js +30 -30
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +30 -30
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +18 -18
- package/types/algorand-client-transaction-sender.js +1 -1
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +1 -1
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +8 -8
- package/types/algorand-client.js +8 -8
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +8 -8
- package/types/algorand-client.mjs.map +1 -1
- package/types/app-arc56.d.ts +60 -37
- package/types/app-arc56.js +37 -16
- package/types/app-arc56.js.map +1 -1
- package/types/app-arc56.mjs +37 -16
- package/types/app-arc56.mjs.map +1 -1
- package/types/app-client.d.ts +123 -132
- package/types/app-client.js +165 -94
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +165 -94
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +2 -2
- package/types/app-deployer.js +24 -24
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +24 -24
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +116 -246
- package/types/app-factory.js +120 -39
- package/types/app-factory.js.map +1 -1
- package/types/app-factory.mjs +121 -40
- package/types/app-factory.mjs.map +1 -1
- package/types/app-spec.js +15 -9
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +15 -9
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +1 -1
- package/types/app.js.map +1 -1
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +3 -3
- package/types/asset-manager.js +2 -2
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +2 -2
- package/types/asset-manager.mjs.map +1 -1
- package/types/client-manager.d.ts +30 -8
- package/types/client-manager.js +6 -0
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +6 -0
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +29 -4
- package/types/composer.js +24 -7
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +24 -7
- package/types/composer.mjs.map +1 -1
- package/types/kmd-account-manager.js +1 -1
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +1 -1
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/transaction.d.ts +4 -6
package/types/app-factory.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import algosdk from 'algosdk';
|
|
3
2
|
import { AlgorandClientInterface } from './algorand-client-interface';
|
|
4
3
|
import { AppReturn, SendAppTransactionResult, TealTemplateParams } from './app';
|
|
@@ -6,8 +5,9 @@ import { ABIStruct, Arc56Contract, Arc56Method } from './app-arc56';
|
|
|
6
5
|
import { AppClient, AppClientBareCallParams, AppClientCompilationParams, AppClientMethodCallParams, AppClientParams, AppSourceMaps, ResolveAppClientByCreatorAndName } from './app-client';
|
|
7
6
|
import { AppDeployParams } from './app-deployer';
|
|
8
7
|
import { AppSpec } from './app-spec';
|
|
8
|
+
import { AppMethodCall, AppMethodCallTransactionArgument } from './composer';
|
|
9
9
|
import { Expand } from './expand';
|
|
10
|
-
import {
|
|
10
|
+
import { SendParams } from './transaction';
|
|
11
11
|
import OnApplicationComplete = algosdk.OnApplicationComplete;
|
|
12
12
|
import ABIValue = algosdk.ABIValue;
|
|
13
13
|
/** Parameters to create an app client */
|
|
@@ -76,8 +76,14 @@ export type CreateSchema = {
|
|
|
76
76
|
* This is immutable once the app is created. */
|
|
77
77
|
extraProgramPages?: number;
|
|
78
78
|
};
|
|
79
|
-
/**
|
|
80
|
-
export type AppFactoryCreateParams = Expand<
|
|
79
|
+
/** Params to specify a bare (raw) create call for an app */
|
|
80
|
+
export type AppFactoryCreateParams = Expand<AppClientBareCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
|
|
81
|
+
/** Params to specify a create method call for an app */
|
|
82
|
+
export type AppFactoryCreateMethodCallParams = Expand<AppClientMethodCallParams & AppClientCompilationParams & CreateOnComplete & CreateSchema>;
|
|
83
|
+
/** Params to get an app client by ID from an app factory. */
|
|
84
|
+
export type AppFactoryAppClientParams = Expand<Omit<AppClientParams, 'algorand' | 'appSpec'>>;
|
|
85
|
+
/** Params to get an app client by creator address and name from an app factory. */
|
|
86
|
+
export type AppFactoryResolveAppClientByCreatorAndNameParams = Expand<Omit<ResolveAppClientByCreatorAndName, 'algorand' | 'appSpec'>>;
|
|
81
87
|
/** Parameters to define a deployment for an `AppFactory` */
|
|
82
88
|
export type AppFactoryDeployParams = Expand<Omit<AppDeployParams, 'createParams' | 'updateParams' | 'deleteParams' | 'metadata'> & {
|
|
83
89
|
/** Create transaction parameters to use if a create needs to be issued as part of deployment */
|
|
@@ -115,7 +121,21 @@ export declare class AppFactory {
|
|
|
115
121
|
private _clearSourceMap;
|
|
116
122
|
private _paramsMethods;
|
|
117
123
|
constructor(params: AppFactoryParams);
|
|
118
|
-
/** Get parameters to
|
|
124
|
+
/** Get parameters to create transactions (create and deploy related calls) for the current app.
|
|
125
|
+
*
|
|
126
|
+
* A good mental model for this is that these parameters represent a deferred transaction creation.
|
|
127
|
+
* @example Create a transaction in the future using Algorand Client
|
|
128
|
+
* ```typescript
|
|
129
|
+
* const createAppParams = appFactory.params.create({method: 'create_method', args: [123, 'hello']})
|
|
130
|
+
* // ...
|
|
131
|
+
* await algorand.send.AppCreateMethodCall(createAppParams)
|
|
132
|
+
* ```
|
|
133
|
+
* @example Define a nested transaction as an ABI argument
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const createAppParams = appFactory.params.create({method: 'create_method', args: [123, 'hello']})
|
|
136
|
+
* await appClient.send.call({method: 'my_method', args: [createAppParams]})
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
119
139
|
get params(): {
|
|
120
140
|
/** Return params for a create ABI call, including deploy-time TEAL template replacements and compilation if provided */
|
|
121
141
|
create: (params: {
|
|
@@ -136,7 +156,7 @@ export declare class AppFactory {
|
|
|
136
156
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
137
157
|
sender?: string | undefined;
|
|
138
158
|
method: string;
|
|
139
|
-
args?: (algosdk.ABIValue |
|
|
159
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
140
160
|
deployTimeParams?: TealTemplateParams | undefined;
|
|
141
161
|
updatable?: boolean | undefined;
|
|
142
162
|
deletable?: boolean | undefined;
|
|
@@ -151,48 +171,11 @@ export declare class AppFactory {
|
|
|
151
171
|
localByteSlices: number;
|
|
152
172
|
} | undefined;
|
|
153
173
|
extraProgramPages?: number | undefined;
|
|
154
|
-
}) => Promise<
|
|
155
|
-
approvalProgram: Buffer;
|
|
156
|
-
clearStateProgram: Buffer;
|
|
157
|
-
compiledApproval?: undefined;
|
|
158
|
-
compiledClear?: undefined;
|
|
159
|
-
deployTimeParams: TealTemplateParams | undefined;
|
|
160
|
-
schema: {
|
|
161
|
-
/** The number of integers saved in global state. */
|
|
162
|
-
globalInts: number;
|
|
163
|
-
/** The number of byte slices saved in global state. */
|
|
164
|
-
globalByteSlices: number;
|
|
165
|
-
/** The number of integers saved in local state. */
|
|
166
|
-
localInts: number;
|
|
167
|
-
/** The number of byte slices saved in local state. */
|
|
168
|
-
localByteSlices: number;
|
|
169
|
-
};
|
|
170
|
-
lease?: string | Uint8Array | undefined;
|
|
171
|
-
note?: string | Uint8Array | undefined;
|
|
172
|
-
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
173
|
-
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
174
|
-
rekeyTo?: string | undefined;
|
|
175
|
-
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
176
|
-
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
177
|
-
validityWindow?: number | undefined;
|
|
178
|
-
firstValidRound?: bigint | undefined;
|
|
179
|
-
lastValidRound?: bigint | undefined;
|
|
180
|
-
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
181
|
-
accountReferences?: string[] | undefined;
|
|
182
|
-
appReferences?: bigint[] | undefined;
|
|
183
|
-
assetReferences?: bigint[] | undefined;
|
|
184
|
-
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
185
|
-
sender?: string | undefined;
|
|
186
|
-
method: string;
|
|
187
|
-
args?: (algosdk.ABIValue | import("./composer").AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
188
|
-
updatable?: boolean | undefined;
|
|
189
|
-
deletable?: boolean | undefined;
|
|
190
|
-
extraProgramPages?: number | undefined;
|
|
191
|
-
} | {
|
|
174
|
+
}) => Promise<{
|
|
192
175
|
approvalProgram: Uint8Array;
|
|
193
|
-
compiledApproval: import("./app").CompiledTeal;
|
|
194
176
|
clearStateProgram: Uint8Array;
|
|
195
|
-
|
|
177
|
+
approvalProgramCompilationResult?: import("./app").CompiledTeal | undefined;
|
|
178
|
+
clearStateProgramCompilationResult?: import("./app").CompiledTeal | undefined;
|
|
196
179
|
deployTimeParams: TealTemplateParams | undefined;
|
|
197
180
|
schema: {
|
|
198
181
|
/** The number of integers saved in global state. */
|
|
@@ -221,14 +204,14 @@ export declare class AppFactory {
|
|
|
221
204
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
222
205
|
sender?: string | undefined;
|
|
223
206
|
method: string;
|
|
224
|
-
args?: (algosdk.ABIValue |
|
|
207
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
225
208
|
updatable?: boolean | undefined;
|
|
226
209
|
deletable?: boolean | undefined;
|
|
227
210
|
extraProgramPages?: number | undefined;
|
|
228
|
-
}
|
|
211
|
+
} & {
|
|
229
212
|
sender: string;
|
|
230
213
|
method: Arc56Method;
|
|
231
|
-
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> |
|
|
214
|
+
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
|
|
232
215
|
lease?: string | Uint8Array | undefined;
|
|
233
216
|
note?: string | Uint8Array | undefined;
|
|
234
217
|
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -255,7 +238,7 @@ export declare class AppFactory {
|
|
|
255
238
|
localByteSlices: number;
|
|
256
239
|
} | undefined;
|
|
257
240
|
extraProgramPages?: number | undefined;
|
|
258
|
-
}> |
|
|
241
|
+
}> | AppMethodCall<{
|
|
259
242
|
sender: string;
|
|
260
243
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
261
244
|
rekeyTo?: string | undefined;
|
|
@@ -276,7 +259,7 @@ export declare class AppFactory {
|
|
|
276
259
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
277
260
|
approvalProgram: string | Uint8Array;
|
|
278
261
|
clearStateProgram: string | Uint8Array;
|
|
279
|
-
}> |
|
|
262
|
+
}> | AppMethodCall<import("./composer").AppMethodCallParams>)[] | undefined;
|
|
280
263
|
onComplete: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
281
264
|
}>;
|
|
282
265
|
/** Return params for a deployment update ABI call */
|
|
@@ -298,7 +281,7 @@ export declare class AppFactory {
|
|
|
298
281
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
299
282
|
sender?: string | undefined;
|
|
300
283
|
method: string;
|
|
301
|
-
args?: (algosdk.ABIValue |
|
|
284
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
302
285
|
}) => {
|
|
303
286
|
lease?: string | Uint8Array | undefined;
|
|
304
287
|
note?: string | Uint8Array | undefined;
|
|
@@ -317,11 +300,11 @@ export declare class AppFactory {
|
|
|
317
300
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
318
301
|
sender?: string | undefined;
|
|
319
302
|
method: string;
|
|
320
|
-
args?: (algosdk.ABIValue |
|
|
303
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
321
304
|
} & {
|
|
322
305
|
sender: string;
|
|
323
306
|
method: Arc56Method;
|
|
324
|
-
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> |
|
|
307
|
+
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
|
|
325
308
|
lease?: string | Uint8Array | undefined;
|
|
326
309
|
note?: string | Uint8Array | undefined;
|
|
327
310
|
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -348,7 +331,7 @@ export declare class AppFactory {
|
|
|
348
331
|
localByteSlices: number;
|
|
349
332
|
} | undefined;
|
|
350
333
|
extraProgramPages?: number | undefined;
|
|
351
|
-
}> |
|
|
334
|
+
}> | AppMethodCall<{
|
|
352
335
|
sender: string;
|
|
353
336
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
354
337
|
rekeyTo?: string | undefined;
|
|
@@ -369,7 +352,7 @@ export declare class AppFactory {
|
|
|
369
352
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
370
353
|
approvalProgram: string | Uint8Array;
|
|
371
354
|
clearStateProgram: string | Uint8Array;
|
|
372
|
-
}> |
|
|
355
|
+
}> | AppMethodCall<import("./composer").AppMethodCallParams>)[] | undefined;
|
|
373
356
|
onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC;
|
|
374
357
|
};
|
|
375
358
|
/** Return params for a deployment delete ABI call */
|
|
@@ -391,7 +374,7 @@ export declare class AppFactory {
|
|
|
391
374
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
392
375
|
sender?: string | undefined;
|
|
393
376
|
method: string;
|
|
394
|
-
args?: (algosdk.ABIValue |
|
|
377
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
395
378
|
}) => {
|
|
396
379
|
lease?: string | Uint8Array | undefined;
|
|
397
380
|
note?: string | Uint8Array | undefined;
|
|
@@ -410,11 +393,11 @@ export declare class AppFactory {
|
|
|
410
393
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
411
394
|
sender?: string | undefined;
|
|
412
395
|
method: string;
|
|
413
|
-
args?: (algosdk.ABIValue |
|
|
396
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
414
397
|
} & {
|
|
415
398
|
sender: string;
|
|
416
399
|
method: Arc56Method;
|
|
417
|
-
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> |
|
|
400
|
+
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
|
|
418
401
|
lease?: string | Uint8Array | undefined;
|
|
419
402
|
note?: string | Uint8Array | undefined;
|
|
420
403
|
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -441,7 +424,7 @@ export declare class AppFactory {
|
|
|
441
424
|
localByteSlices: number;
|
|
442
425
|
} | undefined;
|
|
443
426
|
extraProgramPages?: number | undefined;
|
|
444
|
-
}> |
|
|
427
|
+
}> | AppMethodCall<{
|
|
445
428
|
sender: string;
|
|
446
429
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
447
430
|
rekeyTo?: string | undefined;
|
|
@@ -462,7 +445,7 @@ export declare class AppFactory {
|
|
|
462
445
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
463
446
|
approvalProgram: string | Uint8Array;
|
|
464
447
|
clearStateProgram: string | Uint8Array;
|
|
465
|
-
}> |
|
|
448
|
+
}> | AppMethodCall<import("./composer").AppMethodCallParams>)[] | undefined;
|
|
466
449
|
onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
467
450
|
};
|
|
468
451
|
bare: {
|
|
@@ -499,47 +482,11 @@ export declare class AppFactory {
|
|
|
499
482
|
localByteSlices: number;
|
|
500
483
|
} | undefined;
|
|
501
484
|
extraProgramPages?: number | undefined;
|
|
502
|
-
} | undefined) => Promise<
|
|
503
|
-
approvalProgram: Buffer;
|
|
504
|
-
clearStateProgram: Buffer;
|
|
505
|
-
compiledApproval?: undefined;
|
|
506
|
-
compiledClear?: undefined;
|
|
507
|
-
deployTimeParams: TealTemplateParams | undefined;
|
|
508
|
-
schema: {
|
|
509
|
-
/** The number of integers saved in global state. */
|
|
510
|
-
globalInts: number;
|
|
511
|
-
/** The number of byte slices saved in global state. */
|
|
512
|
-
globalByteSlices: number;
|
|
513
|
-
/** The number of integers saved in local state. */
|
|
514
|
-
localInts: number;
|
|
515
|
-
/** The number of byte slices saved in local state. */
|
|
516
|
-
localByteSlices: number;
|
|
517
|
-
};
|
|
518
|
-
lease?: string | Uint8Array | undefined;
|
|
519
|
-
note?: string | Uint8Array | undefined;
|
|
520
|
-
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
521
|
-
args?: Uint8Array[] | undefined;
|
|
522
|
-
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
523
|
-
rekeyTo?: string | undefined;
|
|
524
|
-
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
525
|
-
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
526
|
-
validityWindow?: number | undefined;
|
|
527
|
-
firstValidRound?: bigint | undefined;
|
|
528
|
-
lastValidRound?: bigint | undefined;
|
|
529
|
-
accountReferences?: string[] | undefined;
|
|
530
|
-
appReferences?: bigint[] | undefined;
|
|
531
|
-
assetReferences?: bigint[] | undefined;
|
|
532
|
-
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
533
|
-
sender?: string | undefined;
|
|
534
|
-
updatable?: boolean | undefined;
|
|
535
|
-
deletable?: boolean | undefined;
|
|
536
|
-
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
537
|
-
extraProgramPages?: number | undefined;
|
|
538
|
-
} | {
|
|
485
|
+
} | undefined) => Promise<{
|
|
539
486
|
approvalProgram: Uint8Array;
|
|
540
|
-
compiledApproval: import("./app").CompiledTeal;
|
|
541
487
|
clearStateProgram: Uint8Array;
|
|
542
|
-
|
|
488
|
+
approvalProgramCompilationResult?: import("./app").CompiledTeal | undefined;
|
|
489
|
+
clearStateProgramCompilationResult?: import("./app").CompiledTeal | undefined;
|
|
543
490
|
deployTimeParams: TealTemplateParams | undefined;
|
|
544
491
|
schema: {
|
|
545
492
|
/** The number of integers saved in global state. */
|
|
@@ -571,7 +518,7 @@ export declare class AppFactory {
|
|
|
571
518
|
deletable?: boolean | undefined;
|
|
572
519
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
573
520
|
extraProgramPages?: number | undefined;
|
|
574
|
-
}
|
|
521
|
+
} & {
|
|
575
522
|
sender: string;
|
|
576
523
|
onComplete: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
577
524
|
}>;
|
|
@@ -655,44 +602,68 @@ export declare class AppFactory {
|
|
|
655
602
|
};
|
|
656
603
|
};
|
|
657
604
|
};
|
|
658
|
-
/**
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
app: AppClient;
|
|
668
|
-
result: {
|
|
669
|
-
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
670
|
-
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
671
|
-
appId: bigint;
|
|
672
|
-
groupId: string;
|
|
673
|
-
txIds: string[];
|
|
674
|
-
returns?: import("./app").ABIReturn[] | undefined;
|
|
675
|
-
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
676
|
-
transactions: algosdk.Transaction[];
|
|
677
|
-
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
678
|
-
transaction: algosdk.Transaction;
|
|
679
|
-
appAddress: string;
|
|
680
|
-
return?: algosdk.ABIValue | ABIStruct | undefined;
|
|
681
|
-
} | {
|
|
682
|
-
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
683
|
-
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
684
|
-
return: undefined;
|
|
685
|
-
groupId: string;
|
|
686
|
-
txIds: string[];
|
|
687
|
-
returns?: import("./app").ABIReturn[] | undefined;
|
|
688
|
-
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
605
|
+
/** Create transactions for the current app */
|
|
606
|
+
readonly createTransaction: {
|
|
607
|
+
/** Create bare (raw) transactions for the current app */
|
|
608
|
+
bare: {
|
|
609
|
+
/** Create a create call transaction, including deploy-time TEAL template replacements and compilation if provided */
|
|
610
|
+
create: (params?: AppFactoryCreateParams) => Promise<algosdk.Transaction>;
|
|
611
|
+
};
|
|
612
|
+
/** Create a create ABI call transaction, including deploy-time TEAL template replacements and compilation if provided */
|
|
613
|
+
create: (params: AppFactoryCreateMethodCallParams) => Promise<{
|
|
689
614
|
transactions: algosdk.Transaction[];
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
615
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
616
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
617
|
+
}>;
|
|
618
|
+
};
|
|
619
|
+
/** Send transactions to the current app */
|
|
620
|
+
readonly send: {
|
|
621
|
+
/** Send bare (raw) transactions for the current app */
|
|
622
|
+
bare: {
|
|
623
|
+
create: (params?: AppFactoryCreateParams & SendParams) => Promise<{
|
|
624
|
+
appClient: AppClient;
|
|
625
|
+
result: {
|
|
626
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
627
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
628
|
+
return: undefined;
|
|
629
|
+
groupId: string;
|
|
630
|
+
txIds: string[];
|
|
631
|
+
returns?: import("./app").ABIReturn[] | undefined;
|
|
632
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
633
|
+
transactions: algosdk.Transaction[];
|
|
634
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
635
|
+
transaction: algosdk.Transaction;
|
|
636
|
+
appId: bigint;
|
|
637
|
+
appAddress: string;
|
|
638
|
+
};
|
|
639
|
+
}>;
|
|
694
640
|
};
|
|
695
|
-
|
|
641
|
+
/**
|
|
642
|
+
* Creates an instance of the app and returns the result of the creation
|
|
643
|
+
* transaction and an app client to interact with that app instance.
|
|
644
|
+
*
|
|
645
|
+
* Performs deploy-time TEAL template placeholder substitutions (if specified).
|
|
646
|
+
* @param params The parameters to create the app
|
|
647
|
+
* @returns The app client and the result of the creation transaction
|
|
648
|
+
*/
|
|
649
|
+
create: (params: AppFactoryCreateMethodCallParams & SendParams) => Promise<{
|
|
650
|
+
appClient: AppClient;
|
|
651
|
+
result: {
|
|
652
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
653
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
654
|
+
appId: bigint;
|
|
655
|
+
groupId: string;
|
|
656
|
+
txIds: string[];
|
|
657
|
+
returns?: import("./app").ABIReturn[] | undefined;
|
|
658
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
659
|
+
transactions: algosdk.Transaction[];
|
|
660
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
661
|
+
transaction: algosdk.Transaction;
|
|
662
|
+
appAddress: string;
|
|
663
|
+
return?: algosdk.ABIValue | ABIStruct | undefined;
|
|
664
|
+
};
|
|
665
|
+
}>;
|
|
666
|
+
};
|
|
696
667
|
/**
|
|
697
668
|
* 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).
|
|
698
669
|
*
|
|
@@ -705,12 +676,10 @@ export declare class AppFactory {
|
|
|
705
676
|
* @returns The app client and the result of the deployment
|
|
706
677
|
*/
|
|
707
678
|
deploy(params: AppFactoryDeployParams): Promise<{
|
|
708
|
-
|
|
679
|
+
appClient: AppClient;
|
|
709
680
|
result: {
|
|
710
681
|
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
711
682
|
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
712
|
-
approvalProgram: Buffer;
|
|
713
|
-
clearStateProgram: Buffer;
|
|
714
683
|
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
715
684
|
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
716
685
|
operationPerformed: "create";
|
|
@@ -734,33 +703,6 @@ export declare class AppFactory {
|
|
|
734
703
|
} | {
|
|
735
704
|
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
736
705
|
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
737
|
-
approvalProgram: Uint8Array;
|
|
738
|
-
compiledApproval: import("./app").CompiledTeal;
|
|
739
|
-
clearStateProgram: Uint8Array;
|
|
740
|
-
compiledClear: import("./app").CompiledTeal;
|
|
741
|
-
operationPerformed: "create";
|
|
742
|
-
version: string;
|
|
743
|
-
name: string;
|
|
744
|
-
deleted: boolean;
|
|
745
|
-
createdRound: bigint;
|
|
746
|
-
updatedRound: bigint;
|
|
747
|
-
createdMetadata: import("./app").AppDeployMetadata;
|
|
748
|
-
deletable?: boolean | undefined;
|
|
749
|
-
updatable?: boolean | undefined;
|
|
750
|
-
groupId: string;
|
|
751
|
-
txIds: string[];
|
|
752
|
-
returns?: import("./app").ABIReturn[] | undefined;
|
|
753
|
-
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
754
|
-
transactions: algosdk.Transaction[];
|
|
755
|
-
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
756
|
-
transaction: algosdk.Transaction;
|
|
757
|
-
appId: bigint;
|
|
758
|
-
appAddress: string;
|
|
759
|
-
} | {
|
|
760
|
-
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
761
|
-
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
762
|
-
approvalProgram: Buffer;
|
|
763
|
-
clearStateProgram: Buffer;
|
|
764
706
|
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
765
707
|
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
766
708
|
operationPerformed: "update";
|
|
@@ -784,33 +726,6 @@ export declare class AppFactory {
|
|
|
784
726
|
} | {
|
|
785
727
|
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
786
728
|
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
787
|
-
approvalProgram: Uint8Array;
|
|
788
|
-
compiledApproval: import("./app").CompiledTeal;
|
|
789
|
-
clearStateProgram: Uint8Array;
|
|
790
|
-
compiledClear: import("./app").CompiledTeal;
|
|
791
|
-
operationPerformed: "update";
|
|
792
|
-
appId: bigint;
|
|
793
|
-
appAddress: string;
|
|
794
|
-
createdRound: bigint;
|
|
795
|
-
updatedRound: bigint;
|
|
796
|
-
createdMetadata: import("./app").AppDeployMetadata;
|
|
797
|
-
deleted: boolean;
|
|
798
|
-
name: string;
|
|
799
|
-
version: string;
|
|
800
|
-
deletable?: boolean | undefined;
|
|
801
|
-
updatable?: boolean | undefined;
|
|
802
|
-
groupId: string;
|
|
803
|
-
txIds: string[];
|
|
804
|
-
returns?: import("./app").ABIReturn[] | undefined;
|
|
805
|
-
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
806
|
-
transactions: algosdk.Transaction[];
|
|
807
|
-
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
808
|
-
transaction: algosdk.Transaction;
|
|
809
|
-
} | {
|
|
810
|
-
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
811
|
-
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
812
|
-
approvalProgram: Buffer;
|
|
813
|
-
clearStateProgram: Buffer;
|
|
814
729
|
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
815
730
|
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
816
731
|
operationPerformed: "replace";
|
|
@@ -835,54 +750,8 @@ export declare class AppFactory {
|
|
|
835
750
|
} | {
|
|
836
751
|
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
837
752
|
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
clearStateProgram: Uint8Array;
|
|
841
|
-
compiledClear: import("./app").CompiledTeal;
|
|
842
|
-
operationPerformed: "replace";
|
|
843
|
-
version: string;
|
|
844
|
-
name: string;
|
|
845
|
-
deleted: boolean;
|
|
846
|
-
createdRound: bigint;
|
|
847
|
-
updatedRound: bigint;
|
|
848
|
-
createdMetadata: import("./app").AppDeployMetadata;
|
|
849
|
-
deletable?: boolean | undefined;
|
|
850
|
-
updatable?: boolean | undefined;
|
|
851
|
-
groupId: string;
|
|
852
|
-
txIds: string[];
|
|
853
|
-
returns?: import("./app").ABIReturn[] | undefined;
|
|
854
|
-
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
855
|
-
transactions: algosdk.Transaction[];
|
|
856
|
-
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
857
|
-
transaction: algosdk.Transaction;
|
|
858
|
-
appId: bigint;
|
|
859
|
-
appAddress: string;
|
|
860
|
-
deleteResult: import("./transaction").ConfirmedTransactionResult;
|
|
861
|
-
} | {
|
|
862
|
-
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
863
|
-
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
864
|
-
approvalProgram: Buffer;
|
|
865
|
-
clearStateProgram: Buffer;
|
|
866
|
-
compiledApproval?: undefined;
|
|
867
|
-
compiledClear?: undefined;
|
|
868
|
-
operationPerformed: "nothing";
|
|
869
|
-
appId: bigint;
|
|
870
|
-
appAddress: string;
|
|
871
|
-
createdRound: bigint;
|
|
872
|
-
updatedRound: bigint;
|
|
873
|
-
createdMetadata: import("./app").AppDeployMetadata;
|
|
874
|
-
deleted: boolean;
|
|
875
|
-
name: string;
|
|
876
|
-
version: string;
|
|
877
|
-
deletable?: boolean | undefined;
|
|
878
|
-
updatable?: boolean | undefined;
|
|
879
|
-
} | {
|
|
880
|
-
return: algosdk.ABIValue | ABIStruct | undefined;
|
|
881
|
-
deleteReturn: algosdk.ABIValue | ABIStruct | undefined;
|
|
882
|
-
approvalProgram: Uint8Array;
|
|
883
|
-
compiledApproval: import("./app").CompiledTeal;
|
|
884
|
-
clearStateProgram: Uint8Array;
|
|
885
|
-
compiledClear: import("./app").CompiledTeal;
|
|
753
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
754
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
886
755
|
operationPerformed: "nothing";
|
|
887
756
|
appId: bigint;
|
|
888
757
|
appAddress: string;
|
|
@@ -904,7 +773,7 @@ export declare class AppFactory {
|
|
|
904
773
|
* @param params The parameters to create the app client
|
|
905
774
|
* @returns The `AppClient`
|
|
906
775
|
*/
|
|
907
|
-
getAppClientById(params:
|
|
776
|
+
getAppClientById(params: AppFactoryAppClientParams): AppClient;
|
|
908
777
|
/**
|
|
909
778
|
* Returns a new `AppClient` client, resolving the app by creator address and name
|
|
910
779
|
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
@@ -914,7 +783,7 @@ export declare class AppFactory {
|
|
|
914
783
|
* @param params The parameters to create the app client
|
|
915
784
|
* @returns The `AppClient`
|
|
916
785
|
*/
|
|
917
|
-
|
|
786
|
+
getAppClientByCreatorAndName(params: AppFactoryResolveAppClientByCreatorAndNameParams): Promise<AppClient>;
|
|
918
787
|
/**
|
|
919
788
|
* Takes an error that may include a logic error from a call to the current app and re-exposes the
|
|
920
789
|
* error to include source code information via the source map and ARC-56 spec.
|
|
@@ -946,9 +815,10 @@ export declare class AppFactory {
|
|
|
946
815
|
*
|
|
947
816
|
* Will store any generated source maps for later use in debugging.
|
|
948
817
|
*/
|
|
949
|
-
|
|
818
|
+
compile(compilation?: AppClientCompilationParams): Promise<import("./app-client").AppClientCompilationResult>;
|
|
950
819
|
private getBareParams;
|
|
951
820
|
private getABIParams;
|
|
821
|
+
private getCreateABIArgsWithDefaultValues;
|
|
952
822
|
/** Returns the sender for a call, using the `defaultSender`
|
|
953
823
|
* if none provided and throws an error if neither provided */
|
|
954
824
|
private getSender;
|
|
@@ -962,5 +832,5 @@ export declare class AppFactory {
|
|
|
962
832
|
* @param method The method that was called
|
|
963
833
|
* @returns The smart contract response with an updated return value
|
|
964
834
|
*/
|
|
965
|
-
parseMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<
|
|
835
|
+
parseMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Omit<TResult, 'return'> & AppReturn<TReturn>>;
|
|
966
836
|
}
|