@algorandfoundation/algokit-utils 9.2.1 → 9.2.2

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.
Files changed (75) hide show
  1. package/account/account.d.ts +28 -23
  2. package/account/get-account-config-from-environment.d.ts +2 -7
  3. package/account/get-account.d.ts +12 -14
  4. package/account/get-dispenser-account.d.ts +5 -9
  5. package/account/index.d.ts +5 -0
  6. package/account/mnemonic-account.d.ts +3 -7
  7. package/amount.d.ts +35 -40
  8. package/app-client.d.ts +6 -10
  9. package/app-deploy.d.ts +23 -25
  10. package/app.d.ts +46 -45
  11. package/asset.d.ts +12 -16
  12. package/config.d.ts +2 -7
  13. package/debugging/debugging.d.ts +1 -5
  14. package/debugging/index.d.ts +1 -0
  15. package/dispenser-client.d.ts +2 -7
  16. package/index.d.ts +18 -27
  17. package/indexer-lookup.d.ts +11 -18
  18. package/localnet/get-kmd-wallet-account.d.ts +7 -9
  19. package/localnet/get-localnet-dispenser-account.d.ts +5 -7
  20. package/localnet/get-or-create-kmd-wallet-account.d.ts +8 -10
  21. package/localnet/index.d.ts +4 -0
  22. package/localnet/is-localnet.d.ts +3 -7
  23. package/network-client.d.ts +15 -17
  24. package/package.json +1 -1
  25. package/testing/_asset.d.ts +3 -0
  26. package/testing/account.d.ts +9 -11
  27. package/testing/fixtures/algokit-log-capture-fixture.d.ts +2 -7
  28. package/testing/fixtures/algorand-fixture.d.ts +4 -9
  29. package/testing/fixtures/index.d.ts +2 -0
  30. package/testing/index.d.ts +5 -7
  31. package/testing/indexer.d.ts +1 -5
  32. package/testing/test-logger.d.ts +36 -41
  33. package/testing/transaction-logger.d.ts +27 -30
  34. package/transaction/index.d.ts +2 -0
  35. package/transaction/legacy-bridge.d.ts +35 -0
  36. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +5 -7
  37. package/transaction/resolve-signed-transactions.d.ts +16 -0
  38. package/transaction/transaction.d.ts +35 -34
  39. package/transfer/index.d.ts +2 -0
  40. package/transfer/transfer-algos.d.ts +5 -9
  41. package/transfer/transfer.d.ts +8 -11
  42. package/types/account-manager.d.ts +429 -432
  43. package/types/account.d.ts +202 -192
  44. package/types/algo-http-client-with-retry.d.ts +10 -15
  45. package/types/algorand-client-transaction-creator.d.ts +771 -778
  46. package/types/algorand-client-transaction-sender.d.ts +1085 -1090
  47. package/types/algorand-client.d.ts +236 -239
  48. package/types/amount.d.ts +43 -47
  49. package/types/app-arc56.d.ts +272 -235
  50. package/types/app-client.d.ts +1151 -1128
  51. package/types/app-deployer.d.ts +141 -139
  52. package/types/app-factory.d.ts +783 -762
  53. package/types/app-manager.d.ts +310 -304
  54. package/types/app-spec.d.ts +117 -118
  55. package/types/app.d.ts +241 -229
  56. package/types/asset-manager.d.ts +199 -204
  57. package/types/asset.d.ts +91 -95
  58. package/types/async-event-emitter.d.ts +13 -18
  59. package/types/client-manager.d.ts +451 -453
  60. package/types/composer.d.ts +1257 -1210
  61. package/types/config.d.ts +48 -53
  62. package/types/debugging.d.ts +23 -25
  63. package/types/dispenser-client.d.ts +52 -57
  64. package/types/expand.d.ts +3 -5
  65. package/types/indexer.d.ts +66 -70
  66. package/types/instance-of.d.ts +3 -5
  67. package/types/kmd-account-manager.d.ts +70 -75
  68. package/types/lifecycle-events.d.ts +8 -13
  69. package/types/logging.d.ts +11 -15
  70. package/types/logic-error.d.ts +29 -33
  71. package/types/network-client.d.ts +27 -32
  72. package/types/testing.d.ts +132 -131
  73. package/types/transaction.d.ts +110 -110
  74. package/types/transfer.d.ts +66 -70
  75. package/util.d.ts +48 -0
package/types/app.d.ts CHANGED
@@ -1,39 +1,47 @@
1
- import { Expand } from "./expand.js";
2
- import { SendSingleTransactionResult, SendTransactionFrom, SendTransactionParams, SendTransactionResult, SendTransactionResults, TransactionNote, TransactionToSign } from "./transaction.js";
3
- import algosdk from "algosdk";
4
-
5
- //#region src/types/app.d.ts
1
+ import algosdk from 'algosdk';
2
+ import { Expand } from './expand';
3
+ import { SendSingleTransactionResult, SendTransactionFrom, SendTransactionParams, SendTransactionResult, SendTransactionResults, TransactionNote, TransactionToSign } from './transaction';
4
+ import ABIArgument = algosdk.ABIArgument;
5
+ import ABIMethod = algosdk.ABIMethod;
6
+ import ABIMethodParams = algosdk.ABIMethodParams;
7
+ import ABIType = algosdk.ABIType;
8
+ import ABIValue = algosdk.ABIValue;
9
+ import Address = algosdk.Address;
10
+ import OnApplicationComplete = algosdk.OnApplicationComplete;
11
+ import SourceMap = algosdk.ProgramSourceMap;
12
+ import SuggestedParams = algosdk.SuggestedParams;
13
+ import Transaction = algosdk.Transaction;
6
14
  /** The name of the TEAL template variable for deploy-time immutability control */
7
- declare const UPDATABLE_TEMPLATE_NAME = "TMPL_UPDATABLE";
15
+ export declare const UPDATABLE_TEMPLATE_NAME = "TMPL_UPDATABLE";
8
16
  /** The name of the TEAL template variable for deploy-time permanence control */
9
- declare const DELETABLE_TEMPLATE_NAME = "TMPL_DELETABLE";
17
+ export declare const DELETABLE_TEMPLATE_NAME = "TMPL_DELETABLE";
10
18
  /** The app create/update [ARC-2](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0002.md) transaction note prefix */
11
- declare const APP_DEPLOY_NOTE_DAPP = "ALGOKIT_DEPLOYER";
19
+ export declare const APP_DEPLOY_NOTE_DAPP = "ALGOKIT_DEPLOYER";
12
20
  /** The maximum number of bytes in a single app code page */
13
- declare const APP_PAGE_MAX_SIZE = 2048;
21
+ export declare const APP_PAGE_MAX_SIZE = 2048;
14
22
  /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
15
- declare const ABI_RETURN_PREFIX: Uint8Array<ArrayBuffer>;
23
+ export declare const ABI_RETURN_PREFIX: Uint8Array<ArrayBuffer>;
16
24
  /** Information about an Algorand app */
17
- interface AppReference {
18
- /** The id of the app */
19
- appId: number | bigint;
20
- /** The Algorand address of the account associated with the app */
21
- appAddress: string;
25
+ export interface AppReference {
26
+ /** The id of the app */
27
+ appId: number | bigint;
28
+ /** The Algorand address of the account associated with the app */
29
+ appAddress: string;
22
30
  }
23
31
  /**
24
32
  * @deprecated Use `types/app-manager/BoxReference` instead.
25
33
  *
26
34
  * A grouping of the app ID and name of the box in an Uint8Array
27
35
  */
28
- interface BoxReference {
29
- /**
30
- * A unique application id
31
- */
32
- appId: number | bigint;
33
- /**
34
- * Name of box to reference
35
- */
36
- name: BoxIdentifier;
36
+ export interface BoxReference {
37
+ /**
38
+ * A unique application id
39
+ */
40
+ appId: number | bigint;
41
+ /**
42
+ * Name of box to reference
43
+ */
44
+ name: BoxIdentifier;
37
45
  }
38
46
  /**
39
47
  * @deprecated Use `types/app-manager/BoxIdentifier` instead.
@@ -43,84 +51,86 @@ interface BoxReference {
43
51
  * * `string` (that will be encoded to a Uint8Array)
44
52
  * * `SendTransactionFrom` (encoded into the public key address of the corresponding account)
45
53
  */
46
- type BoxIdentifier = string | Uint8Array | SendTransactionFrom;
54
+ export type BoxIdentifier = string | Uint8Array | SendTransactionFrom;
47
55
  /** Common app call arguments for ABI and non-ABI (raw) calls */
48
- interface CoreAppCallArgs {
49
- /** The optional lease for the transaction */
50
- lease?: string | Uint8Array;
51
- /** Any box references to load */
52
- boxes?: (algosdk.BoxReference | BoxReference | BoxIdentifier)[];
53
- /** The address of any accounts to load in */
54
- accounts?: (string | Address$1)[];
55
- /** IDs of any apps to load into the foreignApps array */
56
- apps?: number[];
57
- /** IDs of any assets to load into the foreignAssets array */
58
- assets?: number[];
59
- /** Optional account / account address that should be authorised to transact on behalf of the from account the app call is sent from after this transaction.
60
- *
61
- * **Note:** Use with extreme caution and review the [official rekey guidance](https://dev.algorand.co/concepts/accounts/rekeying) first.
62
- */
63
- rekeyTo?: SendTransactionFrom | string;
56
+ export interface CoreAppCallArgs {
57
+ /** The optional lease for the transaction */
58
+ lease?: string | Uint8Array;
59
+ /** Any box references to load */
60
+ boxes?: (algosdk.BoxReference | BoxReference | BoxIdentifier)[];
61
+ /** The address of any accounts to load in */
62
+ accounts?: (string | Address)[];
63
+ /** IDs of any apps to load into the foreignApps array */
64
+ apps?: number[];
65
+ /** IDs of any assets to load into the foreignAssets array */
66
+ assets?: number[];
67
+ /** Optional account / account address that should be authorised to transact on behalf of the from account the app call is sent from after this transaction.
68
+ *
69
+ * **Note:** Use with extreme caution and review the [official rekey guidance](https://dev.algorand.co/concepts/accounts/rekeying) first.
70
+ */
71
+ rekeyTo?: SendTransactionFrom | string;
64
72
  }
65
73
  /**
66
74
  * App call args with non-ABI (raw) values (minus some processing like encoding strings as binary)
67
75
  */
68
- interface RawAppCallArgs extends CoreAppCallArgs {
69
- /** Any application arguments to pass through */
70
- appArgs?: (Uint8Array | string)[];
71
- /** Property to aid intellisense */
72
- method?: undefined;
76
+ export interface RawAppCallArgs extends CoreAppCallArgs {
77
+ /** Any application arguments to pass through */
78
+ appArgs?: (Uint8Array | string)[];
79
+ /** Property to aid intellisense */
80
+ method?: undefined;
73
81
  }
74
82
  /** An argument for an ABI method, either a primitive value, or a transaction with or without signer, or the unawaited async return value of an algokit method that returns a `SendTransactionResult` */
75
- type ABIAppCallArg = ABIArgument | TransactionToSign | Transaction | Promise<SendTransactionResult> | SendTransactionResult | undefined;
83
+ export type ABIAppCallArg = ABIArgument | TransactionToSign | Transaction | Promise<SendTransactionResult> | SendTransactionResult | undefined;
76
84
  /**
77
85
  * App call args for an ABI call
78
86
  */
79
- type ABIAppCallArgs = CoreAppCallArgs & {
80
- /** The ABI method to call */method: ABIMethodParams | ABIMethod; /** The ABI method args to pass in */
81
- methodArgs: ABIAppCallArg[];
87
+ export type ABIAppCallArgs = CoreAppCallArgs & {
88
+ /** The ABI method to call */
89
+ method: ABIMethodParams | ABIMethod;
90
+ /** The ABI method args to pass in */
91
+ methodArgs: ABIAppCallArg[];
82
92
  };
83
93
  /** Arguments to pass to an app call either:
84
94
  * * The raw app call values to pass through into the transaction (after processing); or
85
95
  * * An ABI method definition (method and args)
86
96
  **/
87
- type AppCallArgs = RawAppCallArgs | ABIAppCallArgs;
97
+ export type AppCallArgs = RawAppCallArgs | ABIAppCallArgs;
88
98
  /**
89
99
  * @deprecated Use `TransactionComposer` to construct create app transactions instead.
90
100
  *
91
101
  * Base interface for common data passed to an app create or update.
92
102
  */
93
103
  interface CreateOrUpdateAppParams extends SendTransactionParams {
94
- /** The account (with private key loaded) that will send the transaction */
95
- from: SendTransactionFrom;
96
- /** The approval program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
97
- approvalProgram: Uint8Array | string;
98
- /** The clear state program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
99
- clearStateProgram: Uint8Array | string;
100
- /** Optional transaction parameters */
101
- transactionParams?: SuggestedParams;
102
- /** The (optional) transaction note */
103
- note?: TransactionNote;
104
- /** The arguments passed in to the app call */
105
- args?: AppCallArgs;
104
+ /** The account (with private key loaded) that will send the transaction */
105
+ from: SendTransactionFrom;
106
+ /** The approval program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
107
+ approvalProgram: Uint8Array | string;
108
+ /** The clear state program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
109
+ clearStateProgram: Uint8Array | string;
110
+ /** Optional transaction parameters */
111
+ transactionParams?: SuggestedParams;
112
+ /** The (optional) transaction note */
113
+ note?: TransactionNote;
114
+ /** The arguments passed in to the app call */
115
+ args?: AppCallArgs;
106
116
  }
107
117
  /**
108
118
  * @deprecated Use `TransactionComposer` to construct create app transactions instead.
109
119
  *
110
120
  * Parameters that are passed in when creating an app. */
111
- interface CreateAppParams extends CreateOrUpdateAppParams {
112
- /** The storage schema to request for the created app */
113
- schema: AppStorageSchema;
114
- /** Override the on-completion action for the create call; defaults to NoOp */
115
- onCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
121
+ export interface CreateAppParams extends CreateOrUpdateAppParams {
122
+ /** The storage schema to request for the created app */
123
+ schema: AppStorageSchema;
124
+ /** Override the on-completion action for the create call; defaults to NoOp */
125
+ onCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
116
126
  }
117
127
  /**
118
128
  * @deprecated Use `TransactionComposer` to construct update app transactions instead.
119
129
  *
120
130
  * Parameters that are passed in when updating an app. */
121
- interface UpdateAppParams extends CreateOrUpdateAppParams {
122
- /** The id of the app to update */
123
- appId: number | bigint;
131
+ export interface UpdateAppParams extends CreateOrUpdateAppParams {
132
+ /** The id of the app to update */
133
+ appId: number | bigint;
124
134
  }
125
135
  /**
126
136
  * @deprecated Use `algosdk.OnApplicationComplete` directly instead.
@@ -136,215 +146,217 @@ interface UpdateAppParams extends CreateOrUpdateAppParams {
136
146
  * * `update_application`: Update the smart contract
137
147
  * * `delete_application`: Delete the smart contract
138
148
  */
139
- type AppCallType = 'no_op' | 'opt_in' | 'close_out' | 'clear_state' | 'update_application' | 'delete_application';
149
+ export type AppCallType = 'no_op' | 'opt_in' | 'close_out' | 'clear_state' | 'update_application' | 'delete_application';
140
150
  /** Parameters representing a call to an app. */
141
- interface AppCallParams extends SendTransactionParams {
142
- /** The id of the app to call */
143
- appId: number | bigint;
144
- /** The type of call, everything except create (see `createApp`) and update (see `updateApp`) */
145
- callType: Exclude<AppCallType, 'update_application'> | Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
146
- /** The account to make the call from */
147
- from: SendTransactionFrom;
148
- /** Optional transaction parameters */
149
- transactionParams?: SuggestedParams;
150
- /** The (optional) transaction note */
151
- note?: TransactionNote;
152
- /** The arguments passed in to the app call */
153
- args?: AppCallArgs;
151
+ export interface AppCallParams extends SendTransactionParams {
152
+ /** The id of the app to call */
153
+ appId: number | bigint;
154
+ /** The type of call, everything except create (see `createApp`) and update (see `updateApp`) */
155
+ callType: Exclude<AppCallType, 'update_application'> | Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
156
+ /** The account to make the call from */
157
+ from: SendTransactionFrom;
158
+ /** Optional transaction parameters */
159
+ transactionParams?: SuggestedParams;
160
+ /** The (optional) transaction note */
161
+ note?: TransactionNote;
162
+ /** The arguments passed in to the app call */
163
+ args?: AppCallArgs;
154
164
  }
155
165
  /** Parameters representing the storage schema of an app. */
156
- interface AppStorageSchema {
157
- /** Restricts number of ints in per-user local state */
158
- localInts: number;
159
- /** Restricts number of byte slices in per-user local state */
160
- localByteSlices: number;
161
- /** Restricts number of ints in global state */
162
- globalInts: number;
163
- /** Restricts number of byte slices in global state */
164
- globalByteSlices: number;
165
- /** Any extra pages that are needed for the smart contract; if left blank then the right number of pages will be calculated based on the teal code size */
166
- extraPages?: number;
166
+ export interface AppStorageSchema {
167
+ /** Restricts number of ints in per-user local state */
168
+ localInts: number;
169
+ /** Restricts number of byte slices in per-user local state */
170
+ localByteSlices: number;
171
+ /** Restricts number of ints in global state */
172
+ globalInts: number;
173
+ /** Restricts number of byte slices in global state */
174
+ globalByteSlices: number;
175
+ /** Any extra pages that are needed for the smart contract; if left blank then the right number of pages will be calculated based on the teal code size */
176
+ extraPages?: number;
167
177
  }
168
178
  /** Information about a compiled teal program */
169
- interface CompiledTeal {
170
- /** Original TEAL code */
171
- teal: string;
172
- /** The compiled code */
173
- compiled: string;
174
- /** The hash returned by the compiler */
175
- compiledHash: string;
176
- /** The base64 encoded code as a byte array */
177
- compiledBase64ToBytes: Uint8Array;
178
- /** Source map from the compilation */
179
- sourceMap: SourceMap;
179
+ export interface CompiledTeal {
180
+ /** Original TEAL code */
181
+ teal: string;
182
+ /** The compiled code */
183
+ compiled: string;
184
+ /** The hash returned by the compiler */
185
+ compiledHash: string;
186
+ /** The base64 encoded code as a byte array */
187
+ compiledBase64ToBytes: Uint8Array;
188
+ /** Source map from the compilation */
189
+ sourceMap: SourceMap;
180
190
  }
181
- interface AppCallTransactionResultOfType<T> extends SendTransactionResults, SendTransactionResult {
182
- /** If an ABI method was called the processed return value */
183
- return?: T;
191
+ export interface AppCallTransactionResultOfType<T> extends SendTransactionResults, SendTransactionResult {
192
+ /** If an ABI method was called the processed return value */
193
+ return?: T;
184
194
  }
185
195
  /** Result from calling an app */
186
- type AppCallTransactionResult = AppCallTransactionResultOfType<ABIReturn>;
196
+ export type AppCallTransactionResult = AppCallTransactionResultOfType<ABIReturn>;
187
197
  /** The return value of an ABI method call */
188
- type ABIReturn = {
189
- rawReturnValue: Uint8Array;
190
- returnValue: ABIValue;
191
- method: ABIMethod;
192
- decodeError: undefined;
198
+ export type ABIReturn = {
199
+ rawReturnValue: Uint8Array;
200
+ returnValue: ABIValue;
201
+ method: ABIMethod;
202
+ decodeError: undefined;
193
203
  } | {
194
- rawReturnValue?: undefined;
195
- returnValue?: undefined;
196
- method?: undefined;
197
- decodeError: Error;
204
+ rawReturnValue?: undefined;
205
+ returnValue?: undefined;
206
+ method?: undefined;
207
+ decodeError: Error;
198
208
  };
199
209
  /**
200
210
  * The payload of the metadata to add to the transaction note when deploying an app, noting it will be prefixed with `APP_DEPLOY_NOTE_PREFIX`.
201
211
  */
202
- interface AppDeployMetadata {
203
- /** The unique name identifier of the app within the creator account */
204
- name: string;
205
- /** The version of app that is / will be deployed */
206
- version: string;
207
- /** Whether or not the app is deletable / permanent / unspecified */
208
- deletable?: boolean;
209
- /** Whether or not the app is updatable / immutable / unspecified */
210
- updatable?: boolean;
212
+ export interface AppDeployMetadata {
213
+ /** The unique name identifier of the app within the creator account */
214
+ name: string;
215
+ /** The version of app that is / will be deployed */
216
+ version: string;
217
+ /** Whether or not the app is deletable / permanent / unspecified */
218
+ deletable?: boolean;
219
+ /** Whether or not the app is updatable / immutable / unspecified */
220
+ updatable?: boolean;
211
221
  }
212
222
  /** The metadata that can be collected about a deployed app */
213
- interface AppMetadata extends AppReference, AppDeployMetadata {
214
- /** The round the app was created */
215
- createdRound: number;
216
- /** The last round that the app was updated */
217
- updatedRound: number;
218
- /** The metadata when the app was created */
219
- createdMetadata: AppDeployMetadata;
220
- /** Whether or not the app is deleted */
221
- deleted: boolean;
223
+ export interface AppMetadata extends AppReference, AppDeployMetadata {
224
+ /** The round the app was created */
225
+ createdRound: number;
226
+ /** The last round that the app was updated */
227
+ updatedRound: number;
228
+ /** The metadata when the app was created */
229
+ createdMetadata: AppDeployMetadata;
230
+ /** Whether or not the app is deleted */
231
+ deleted: boolean;
222
232
  }
223
233
  /** A lookup of name -> Algorand app for a creator */
224
- interface AppLookup {
225
- creator: Readonly<string>;
226
- apps: Readonly<{
227
- [name: string]: AppMetadata;
228
- }>;
234
+ export interface AppLookup {
235
+ creator: Readonly<string>;
236
+ apps: Readonly<{
237
+ [name: string]: AppMetadata;
238
+ }>;
229
239
  }
230
240
  /** Dictionary of deploy-time parameters to replace in a teal template.
231
241
  *
232
242
  * Note: Looks for `TMPL_{parameter}` for template replacements i.e. you can leave out the `TMPL_`.
233
243
  *
234
244
  */
235
- interface TealTemplateParams {
236
- [key: string]: string | bigint | number | Uint8Array;
245
+ export interface TealTemplateParams {
246
+ [key: string]: string | bigint | number | Uint8Array;
237
247
  }
238
248
  /** What action to perform when deploying an app and an update is detected in the TEAL code */
239
- declare enum OnUpdate {
240
- /** Fail the deployment */
241
- Fail = 0,
242
- /** Update the app */
243
- UpdateApp = 1,
244
- /** Delete the app and create a new one in its place */
245
- ReplaceApp = 2,
246
- /** Create a new app */
247
- AppendApp = 3
249
+ export declare enum OnUpdate {
250
+ /** Fail the deployment */
251
+ Fail = 0,
252
+ /** Update the app */
253
+ UpdateApp = 1,
254
+ /** Delete the app and create a new one in its place */
255
+ ReplaceApp = 2,
256
+ /** Create a new app */
257
+ AppendApp = 3
248
258
  }
249
259
  /** What action to perform when deploying an app and a breaking schema change is detected */
250
- declare enum OnSchemaBreak {
251
- /** Fail the deployment */
252
- Fail = 0,
253
- /** Delete the app and create a new one in its place */
254
- ReplaceApp = 1,
255
- /** Create a new app */
256
- AppendApp = 2
260
+ export declare enum OnSchemaBreak {
261
+ /** Fail the deployment */
262
+ Fail = 0,
263
+ /** Delete the app and create a new one in its place */
264
+ ReplaceApp = 1,
265
+ /** Create a new app */
266
+ AppendApp = 2
257
267
  }
258
268
  /** The parameters to deploy an app */
259
- interface AppDeploymentParams extends Omit<CreateAppParams, 'onCompleteAction' | 'args' | 'note' | 'skipSending' | 'skipWaiting' | 'atc'> {
260
- /** The deployment metadata */
261
- metadata: AppDeployMetadata;
262
- /** Any deploy-time parameters to replace in the TEAL code */
263
- deployTimeParams?: TealTemplateParams;
264
- /** What action to perform if a schema break is detected */
265
- onSchemaBreak?: 'replace' | 'fail' | 'append' | OnSchemaBreak;
266
- /** What action to perform if a TEAL update is detected */
267
- onUpdate?: 'update' | 'replace' | 'fail' | 'append' | OnUpdate;
268
- /** Optional cached value of the existing apps for the given creator */
269
- existingDeployments?: AppLookup;
270
- /** Any args to pass to any create transaction that is issued as part of deployment */
271
- createArgs?: AppCallArgs;
272
- /** Override the on-completion action for the create call; defaults to NoOp */
273
- createOnCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
274
- /** Any args to pass to any update transaction that is issued as part of deployment */
275
- updateArgs?: AppCallArgs;
276
- /** Any args to pass to any delete transaction that is issued as part of deployment */
277
- deleteArgs?: AppCallArgs;
269
+ export interface AppDeploymentParams extends Omit<CreateAppParams, 'onCompleteAction' | 'args' | 'note' | 'skipSending' | 'skipWaiting' | 'atc'> {
270
+ /** The deployment metadata */
271
+ metadata: AppDeployMetadata;
272
+ /** Any deploy-time parameters to replace in the TEAL code */
273
+ deployTimeParams?: TealTemplateParams;
274
+ /** What action to perform if a schema break is detected */
275
+ onSchemaBreak?: 'replace' | 'fail' | 'append' | OnSchemaBreak;
276
+ /** What action to perform if a TEAL update is detected */
277
+ onUpdate?: 'update' | 'replace' | 'fail' | 'append' | OnUpdate;
278
+ /** Optional cached value of the existing apps for the given creator */
279
+ existingDeployments?: AppLookup;
280
+ /** Any args to pass to any create transaction that is issued as part of deployment */
281
+ createArgs?: AppCallArgs;
282
+ /** Override the on-completion action for the create call; defaults to NoOp */
283
+ createOnCompleteAction?: Exclude<AppCallType, 'clear_state'> | Exclude<OnApplicationComplete, OnApplicationComplete.ClearStateOC>;
284
+ /** Any args to pass to any update transaction that is issued as part of deployment */
285
+ updateArgs?: AppCallArgs;
286
+ /** Any args to pass to any delete transaction that is issued as part of deployment */
287
+ deleteArgs?: AppCallArgs;
278
288
  }
279
289
  /** The result of compiling the approval and clear state TEAL programs for an app */
280
- interface AppCompilationResult {
281
- /** The result of compiling the approval program */
282
- compiledApproval: CompiledTeal;
283
- /** The result of compiling the clear state program */
284
- compiledClear: CompiledTeal;
290
+ export interface AppCompilationResult {
291
+ /** The result of compiling the approval program */
292
+ compiledApproval: CompiledTeal;
293
+ /** The result of compiling the clear state program */
294
+ compiledClear: CompiledTeal;
285
295
  }
286
- type AppReturn<TReturn> = {
287
- /** The ABI method call return value */return?: TReturn;
296
+ export type AppReturn<TReturn> = {
297
+ /** The ABI method call return value */
298
+ return?: TReturn;
288
299
  };
289
300
  /** Result from sending a single app transaction. */
290
- type SendAppTransactionResult = Expand<SendSingleTransactionResult & {
291
- /** If an ABI method was called the processed return value */return?: ABIReturn;
301
+ export type SendAppTransactionResult = Expand<SendSingleTransactionResult & {
302
+ /** If an ABI method was called the processed return value */
303
+ return?: ABIReturn;
292
304
  }>;
293
305
  /** Result from sending a single app transaction. */
294
- type SendAppUpdateTransactionResult = Expand<SendAppTransactionResult & Partial<AppCompilationResult>>;
306
+ export type SendAppUpdateTransactionResult = Expand<SendAppTransactionResult & Partial<AppCompilationResult>>;
295
307
  /** Result from sending a single app transaction. */
296
- type SendAppCreateTransactionResult = Expand<SendAppUpdateTransactionResult & {
297
- /** The id of the created app */appId: bigint; /** The Algorand address of the account associated with the app */
298
- appAddress: Address$1;
308
+ export type SendAppCreateTransactionResult = Expand<SendAppUpdateTransactionResult & {
309
+ /** The id of the created app */
310
+ appId: bigint;
311
+ /** The Algorand address of the account associated with the app */
312
+ appAddress: Address;
299
313
  }>;
300
314
  /** Object holding app state values */
301
- interface AppState {
302
- [key: string]: {
303
- value: bigint;
304
- keyRaw: Uint8Array;
305
- keyBase64: string;
306
- } | {
307
- value: string;
308
- valueRaw: Uint8Array;
309
- valueBase64: string;
310
- keyRaw: Uint8Array;
311
- keyBase64: string;
312
- };
315
+ export interface AppState {
316
+ [key: string]: {
317
+ value: bigint;
318
+ keyRaw: Uint8Array;
319
+ keyBase64: string;
320
+ } | {
321
+ value: string;
322
+ valueRaw: Uint8Array;
323
+ valueBase64: string;
324
+ keyRaw: Uint8Array;
325
+ keyBase64: string;
326
+ };
313
327
  }
314
328
  /**
315
329
  * The name of a box storage box */
316
- interface BoxName {
317
- /** Name in UTF-8 */
318
- name: string;
319
- /** Name in binary bytes */
320
- nameRaw: Uint8Array;
321
- /** Name in Base64 */
322
- nameBase64: string;
330
+ export interface BoxName {
331
+ /** Name in UTF-8 */
332
+ name: string;
333
+ /** Name in binary bytes */
334
+ nameRaw: Uint8Array;
335
+ /** Name in Base64 */
336
+ nameBase64: string;
323
337
  }
324
338
  /**
325
339
  * @deprecated Use `types/app-manager/BoxValueRequestParams` instead.
326
340
  * Parameters to get and decode a box value as an ABI type.
327
341
  */
328
- interface BoxValueRequestParams {
329
- /** The ID of the app return box names for */
330
- appId: number | bigint;
331
- /** The name of the box to return either as a string, binary array or `BoxName` */
332
- boxName: string | Uint8Array | BoxName;
333
- /** The ABI type to decode the value using */
334
- type: ABIType;
342
+ export interface BoxValueRequestParams {
343
+ /** The ID of the app return box names for */
344
+ appId: number | bigint;
345
+ /** The name of the box to return either as a string, binary array or `BoxName` */
346
+ boxName: string | Uint8Array | BoxName;
347
+ /** The ABI type to decode the value using */
348
+ type: ABIType;
335
349
  }
336
350
  /**
337
351
  * @deprecated Use `types/app-manager/BoxValuesRequestParams` instead.
338
352
  * Parameters to get and decode a box value as an ABI type.
339
353
  */
340
- interface BoxValuesRequestParams {
341
- /** The ID of the app return box names for */
342
- appId: number;
343
- /** The names of the boxes to return either as a string, binary array or BoxName` */
344
- boxNames: (string | Uint8Array | BoxName)[];
345
- /** The ABI type to decode the value using */
346
- type: ABIType;
354
+ export interface BoxValuesRequestParams {
355
+ /** The ID of the app return box names for */
356
+ appId: number;
357
+ /** The names of the boxes to return either as a string, binary array or BoxName` */
358
+ boxNames: (string | Uint8Array | BoxName)[];
359
+ /** The ABI type to decode the value using */
360
+ type: ABIType;
347
361
  }
348
- //#endregion
349
- export { ABIAppCallArg, ABIAppCallArgs, ABIReturn, ABI_RETURN_PREFIX, APP_DEPLOY_NOTE_DAPP, APP_PAGE_MAX_SIZE, AppCallArgs, AppCallParams, AppCallTransactionResult, AppCallTransactionResultOfType, AppCallType, AppCompilationResult, AppDeployMetadata, AppDeploymentParams, AppLookup, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxIdentifier, BoxName, BoxReference, BoxValueRequestParams, BoxValuesRequestParams, CompiledTeal, CoreAppCallArgs, CreateAppParams, DELETABLE_TEMPLATE_NAME, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult, TealTemplateParams, UPDATABLE_TEMPLATE_NAME, UpdateAppParams };
350
- //# sourceMappingURL=app.d.ts.map
362
+ export {};