@algorandfoundation/algokit-utils 9.2.1 → 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.
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
@@ -1,780 +1,773 @@
1
- import { AlgoAmount } from "./amount.js";
2
- import { TransactionSignerAccount } from "./account.js";
3
- import { Expand } from "./expand.js";
4
- import { BoxIdentifier, BoxReference, ResourceReference } from "./app-manager.js";
5
- import { AppCallMethodCall, AppCallParams, AppCreateMethodCall, AppDeleteMethodCall, AppDeleteParams, AppUpdateMethodCall, AssetConfigParams, AssetCreateParams, AssetDestroyParams, AssetFreezeParams, AssetOptInParams, AssetOptOutParams, AssetTransferParams, BuiltTransactions, OfflineKeyRegistrationParams, OnlineKeyRegistrationParams, PaymentParams, TransactionComposer } from "./composer.js";
6
- import algosdk from "algosdk";
7
-
8
- //#region src/types/algorand-client-transaction-creator.d.ts
1
+ import algosdk from 'algosdk';
2
+ import { BuiltTransactions, TransactionComposer } from './composer';
3
+ import { Expand } from './expand';
4
+ import Transaction = algosdk.Transaction;
9
5
  /** Orchestrates creating transactions for `AlgorandClient`. */
10
- declare class AlgorandClientTransactionCreator {
11
- private _newGroup;
12
- /**
13
- * Creates a new `AlgorandClientTransactionCreator`
14
- * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
15
- * @example
16
- * ```typescript
17
- * const transactionCreator = new AlgorandClientTransactionCreator(() => new TransactionComposer())
18
- * ```
19
- */
20
- constructor(newGroup: () => TransactionComposer);
21
- private _transaction;
22
- private _transactions;
23
- /**
24
- * Create a payment transaction to transfer Algo between accounts.
25
- * @param params The parameters for the payment transaction
26
- * @example Basic example
27
- * ```typescript
28
- * await algorand.createTransaction.payment({
29
- * sender: 'SENDERADDRESS',
30
- * receiver: 'RECEIVERADDRESS',
31
- * amount: (4).algo(),
32
- * })
33
- * ```
34
- * @example Advanced example
35
- * ```typescript
36
- * await algorand.createTransaction.payment({
37
- * amount: (4).algo(),
38
- * receiver: 'RECEIVERADDRESS',
39
- * sender: 'SENDERADDRESS',
40
- * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
41
- * lease: 'lease',
42
- * note: 'note',
43
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
44
- * rekeyTo: 'REKEYTOADDRESS',
45
- * // You wouldn't normally set this field
46
- * firstValidRound: 1000n,
47
- * validityWindow: 10,
48
- * extraFee: (1000).microAlgo(),
49
- * staticFee: (1000).microAlgo(),
50
- * // Max fee doesn't make sense with extraFee AND staticFee
51
- * // already specified, but here for completeness
52
- * maxFee: (3000).microAlgo(),
53
- * })
54
- * ```
55
- * @returns The payment transaction
56
- */
57
- payment: (params: PaymentParams) => Promise<Transaction>;
58
- /** Create a create Algorand Standard Asset transaction.
59
- *
60
- * The account that sends this transaction will automatically be
61
- * opted in to the asset and will hold all units after creation.
62
- *
63
- * @param params The parameters for the asset creation transaction
64
- *
65
- * @example Basic example
66
- * ```typescript
67
- * await algorand.createTransaction.assetCreate({ sender: "CREATORADDRESS", total: 100n})
68
- * ```
69
- * @example Advanced example
70
- * ```typescript
71
- * await algorand.createTransaction.assetCreate({
72
- * sender: 'CREATORADDRESS',
73
- * total: 100n,
74
- * decimals: 2,
75
- * assetName: 'asset',
76
- * unitName: 'unit',
77
- * url: 'url',
78
- * metadataHash: 'metadataHash',
79
- * defaultFrozen: false,
80
- * manager: 'MANAGERADDRESS',
81
- * reserve: 'RESERVEADDRESS',
82
- * freeze: 'FREEZEADDRESS',
83
- * clawback: 'CLAWBACKADDRESS',
84
- * lease: 'lease',
85
- * note: 'note',
86
- * // You wouldn't normally set this field
87
- * firstValidRound: 1000n,
88
- * validityWindow: 10,
89
- * extraFee: (1000).microAlgo(),
90
- * staticFee: (1000).microAlgo(),
91
- * // Max fee doesn't make sense with extraFee AND staticFee
92
- * // already specified, but here for completeness
93
- * maxFee: (3000).microAlgo(),
94
- * })
95
- * ```
96
- * @returns The asset create transaction
97
- */
98
- assetCreate: (params: AssetCreateParams) => Promise<Transaction>;
99
- /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.
100
- *
101
- * **Note:** The manager, reserve, freeze, and clawback addresses
102
- * are immutably empty if they are not set. If manager is not set then
103
- * all fields are immutable from that point forward.
104
- *
105
- * @param params The parameters for the asset config transaction
106
- *
107
- * @example Basic example
108
- * ```typescript
109
- * await algorand.createTransaction.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
110
- * ```
111
- * @example Advanced example
112
- * ```typescript
113
- * await algorand.createTransaction.assetConfig({
114
- * sender: 'MANAGERADDRESS',
115
- * assetId: 123456n,
116
- * manager: 'MANAGERADDRESS',
117
- * reserve: 'RESERVEADDRESS',
118
- * freeze: 'FREEZEADDRESS',
119
- * clawback: 'CLAWBACKADDRESS',
120
- * lease: 'lease',
121
- * note: 'note',
122
- * // You wouldn't normally set this field
123
- * firstValidRound: 1000n,
124
- * validityWindow: 10,
125
- * extraFee: (1000).microAlgo(),
126
- * staticFee: (1000).microAlgo(),
127
- * // Max fee doesn't make sense with extraFee AND staticFee
128
- * // already specified, but here for completeness
129
- * maxFee: (3000).microAlgo(),
130
- * })
131
- * ```
132
- * @returns The asset config transaction
133
- */
134
- assetConfig: (params: AssetConfigParams) => Promise<Transaction>;
135
- /** Create an Algorand Standard Asset freeze transaction.
136
- *
137
- * @param params The parameters for the asset freeze transaction
138
- *
139
- * @example Basic example
140
- * ```typescript
141
- * await algorand.createTransaction.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
142
- * ```
143
- * @example Advanced example
144
- * ```typescript
145
- * await algorand.createTransaction.assetFreeze({
146
- * sender: 'MANAGERADDRESS',
147
- * assetId: 123456n,
148
- * account: 'ACCOUNTADDRESS',
149
- * frozen: true,
150
- * lease: 'lease',
151
- * note: 'note',
152
- * // You wouldn't normally set this field
153
- * firstValidRound: 1000n,
154
- * validityWindow: 10,
155
- * extraFee: (1000).microAlgo(),
156
- * staticFee: (1000).microAlgo(),
157
- * // Max fee doesn't make sense with extraFee AND staticFee
158
- * // already specified, but here for completeness
159
- * maxFee: (3000).microAlgo(),
160
- * })
161
- * ```
162
- * @returns The asset freeze transaction
163
- */
164
- assetFreeze: (params: AssetFreezeParams) => Promise<Transaction>;
165
- /** Create an Algorand Standard Asset destroy transaction.
166
- *
167
- * Created assets can be destroyed only by the asset manager account.
168
- * All of the assets must be owned by the creator of the asset before
169
- * the asset can be deleted.
170
- *
171
- * @param params The parameters for the asset destroy transaction
172
- *
173
- * @example Basic example
174
- * ```typescript
175
- * await algorand.createTransaction.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
176
- * ```
177
- * @example Advanced example
178
- * ```typescript
179
- * await algorand.createTransaction.assetDestroy({
180
- * sender: 'MANAGERADDRESS',
181
- * assetId: 123456n,
182
- * lease: 'lease',
183
- * note: 'note',
184
- * // You wouldn't normally set this field
185
- * firstValidRound: 1000n,
186
- * validityWindow: 10,
187
- * extraFee: (1000).microAlgo(),
188
- * staticFee: (1000).microAlgo(),
189
- * // Max fee doesn't make sense with extraFee AND staticFee
190
- * // already specified, but here for completeness
191
- * maxFee: (3000).microAlgo(),
192
- * })
193
- * ```
194
- * @returns The asset destroy transaction
195
- */
196
- assetDestroy: (params: AssetDestroyParams) => Promise<Transaction>;
197
- /** Create an Algorand Standard Asset transfer transaction.
198
- *
199
- * @param params The parameters for the asset transfer transaction
200
- *
201
- * @example Basic example
202
- * ```typescript
203
- * await algorand.createTransaction.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
204
- * ```
205
- * @example Advanced example (with clawback)
206
- * ```typescript
207
- * await algorand.createTransaction.assetTransfer({
208
- * sender: 'CLAWBACKADDRESS',
209
- * assetId: 123456n,
210
- * amount: 1n,
211
- * receiver: 'RECEIVERADDRESS',
212
- * clawbackTarget: 'HOLDERADDRESS',
213
- * // This field needs to be used with caution
214
- * closeAssetTo: 'ADDRESSTOCLOSETO'
215
- * lease: 'lease',
216
- * note: 'note',
217
- * // You wouldn't normally set this field
218
- * firstValidRound: 1000n,
219
- * validityWindow: 10,
220
- * extraFee: (1000).microAlgo(),
221
- * staticFee: (1000).microAlgo(),
222
- * // Max fee doesn't make sense with extraFee AND staticFee
223
- * // already specified, but here for completeness
224
- * maxFee: (3000).microAlgo(),
225
- * })
226
- * ```
227
- * @returns The result of the asset transfer transaction
228
- */
229
- assetTransfer: (params: AssetTransferParams) => Promise<Transaction>;
230
- /** Create an Algorand Standard Asset opt-in transaction.
231
- *
232
- * @param params The parameters for the asset opt-in transaction
233
- *
234
- * @example Basic example
235
- * ```typescript
236
- * await algorand.createTransaction.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
237
- * ```
238
- * @example Advanced example
239
- * ```typescript
240
- * await algorand.createTransaction.assetOptIn({
241
- * sender: 'SENDERADDRESS',
242
- * assetId: 123456n,
243
- * lease: 'lease',
244
- * note: 'note',
245
- * // You wouldn't normally set this field
246
- * firstValidRound: 1000n,
247
- * validityWindow: 10,
248
- * extraFee: (1000).microAlgo(),
249
- * staticFee: (1000).microAlgo(),
250
- * // Max fee doesn't make sense with extraFee AND staticFee
251
- * // already specified, but here for completeness
252
- * maxFee: (3000).microAlgo(),
253
- * })
254
- * ```
255
- * @returns The asset opt-in transaction
256
- */
257
- assetOptIn: (params: AssetOptInParams) => Promise<Transaction>;
258
- /** Create an asset opt-out transaction.
259
- *
260
- * *Note:* If the account has a balance of the asset,
261
- * it will lose those assets
262
- *
263
- * @param params The parameters for the asset opt-out transaction
264
- *
265
- * @example Basic example (without creator, will be retrieved from algod)
266
- * ```typescript
267
- * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
268
- * ```
269
- * @example Basic example (with creator)
270
- * ```typescript
271
- * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
272
- * ```
273
- * @example Advanced example
274
- * ```typescript
275
- * await algorand.createTransaction.assetOptOut({
276
- * sender: 'SENDERADDRESS',
277
- * assetId: 123456n,
278
- * creator: 'CREATORADDRESS',
279
- * ensureZeroBalance: true,
280
- * lease: 'lease',
281
- * note: 'note',
282
- * // You wouldn't normally set this field
283
- * firstValidRound: 1000n,
284
- * validityWindow: 10,
285
- * extraFee: (1000).microAlgo(),
286
- * staticFee: (1000).microAlgo(),
287
- * // Max fee doesn't make sense with extraFee AND staticFee
288
- * // already specified, but here for completeness
289
- * maxFee: (3000).microAlgo(),
290
- * })
291
- * ```
292
- * @returns The asset opt-out transaction
293
- */
294
- assetOptOut: (params: AssetOptOutParams) => Promise<Transaction>;
295
- /** Create an application create transaction.
296
- *
297
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
298
- *
299
- * @param params The parameters for the app creation transaction
300
- * @example Basic example
301
- * ```typescript
302
- * await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
303
- * ```
304
- * @example Advanced example
305
- * ```typescript
306
- * await algorand.createTransaction.appCreate({
307
- * sender: 'CREATORADDRESS',
308
- * approvalProgram: "TEALCODE",
309
- * clearStateProgram: "TEALCODE",
310
- * schema: {
311
- * globalInts: 1,
312
- * globalByteSlices: 2,
313
- * localInts: 3,
314
- * localByteSlices: 4
315
- * },
316
- * extraProgramPages: 1,
317
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
318
- * args: [new Uint8Array(1, 2, 3, 4)]
319
- * accountReferences: ["ACCOUNT_1"]
320
- * appReferences: [123n, 1234n]
321
- * assetReferences: [12345n]
322
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
323
- * accessReferences: [{ appId: 1234n }]
324
- * lease: 'lease',
325
- * note: 'note',
326
- * // You wouldn't normally set this field
327
- * firstValidRound: 1000n,
328
- * validityWindow: 10,
329
- * extraFee: (1000).microAlgo(),
330
- * staticFee: (1000).microAlgo(),
331
- * // Max fee doesn't make sense with extraFee AND staticFee
332
- * // already specified, but here for completeness
333
- * maxFee: (3000).microAlgo(),
334
- * rejectVersion: 1,
335
- *})
336
- * ```
337
- * @returns The application create transaction
338
- */
339
- appCreate: (params: {
340
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
341
- sender: string | algosdk.Address;
342
- rekeyTo?: (string | algosdk.Address) | undefined;
343
- note?: (Uint8Array | string) | undefined;
344
- lease?: (Uint8Array | string) | undefined;
345
- staticFee?: AlgoAmount | undefined;
346
- extraFee?: AlgoAmount | undefined;
347
- maxFee?: AlgoAmount | undefined;
348
- validityWindow?: number | bigint | undefined;
349
- firstValidRound?: bigint | undefined;
350
- lastValidRound?: bigint | undefined;
351
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
352
- args?: Uint8Array[] | undefined;
353
- accountReferences?: (string | algosdk.Address)[] | undefined;
354
- appReferences?: bigint[] | undefined;
355
- assetReferences?: bigint[] | undefined;
356
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
357
- accessReferences?: ResourceReference[] | undefined;
358
- rejectVersion?: number | undefined;
359
- approvalProgram: string | Uint8Array;
360
- clearStateProgram: string | Uint8Array;
361
- schema?: {
362
- globalInts: number;
363
- globalByteSlices: number;
364
- localInts: number;
365
- localByteSlices: number;
366
- } | undefined;
367
- extraProgramPages?: number | undefined;
368
- }) => Promise<Transaction>;
369
- /** Create an application update transaction.
370
- *
371
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
372
- *
373
- * @param params The parameters for the app update transaction
374
- * @example Basic example
375
- * ```typescript
376
- * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
377
- * ```
378
- * @example Advanced example
379
- * ```typescript
380
- * await algorand.createTransaction.appUpdate({
381
- * sender: 'CREATORADDRESS',
382
- * approvalProgram: "TEALCODE",
383
- * clearStateProgram: "TEALCODE",
384
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
385
- * args: [new Uint8Array(1, 2, 3, 4)]
386
- * accountReferences: ["ACCOUNT_1"]
387
- * appReferences: [123n, 1234n]
388
- * assetReferences: [12345n]
389
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
390
- * accessReferences: [{ appId: 1234n }]
391
- * lease: 'lease',
392
- * note: 'note',
393
- * // You wouldn't normally set this field
394
- * firstValidRound: 1000n,
395
- * validityWindow: 10,
396
- * extraFee: (1000).microAlgo(),
397
- * staticFee: (1000).microAlgo(),
398
- * // Max fee doesn't make sense with extraFee AND staticFee
399
- * // already specified, but here for completeness
400
- * maxFee: (3000).microAlgo(),
401
- * rejectVersion: 1,
402
- *})
403
- * ```
404
- * @returns The application update transaction
405
- */
406
- appUpdate: (params: {
407
- sender: string | algosdk.Address;
408
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
409
- rekeyTo?: (string | algosdk.Address) | undefined;
410
- note?: (Uint8Array | string) | undefined;
411
- lease?: (Uint8Array | string) | undefined;
412
- staticFee?: AlgoAmount | undefined;
413
- extraFee?: AlgoAmount | undefined;
414
- maxFee?: AlgoAmount | undefined;
415
- validityWindow?: number | bigint | undefined;
416
- firstValidRound?: bigint | undefined;
417
- lastValidRound?: bigint | undefined;
418
- appId: bigint;
419
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
420
- args?: Uint8Array[] | undefined;
421
- accountReferences?: (string | algosdk.Address)[] | undefined;
422
- appReferences?: bigint[] | undefined;
423
- assetReferences?: bigint[] | undefined;
424
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
425
- accessReferences?: ResourceReference[] | undefined;
426
- rejectVersion?: number | undefined;
427
- approvalProgram: string | Uint8Array;
428
- clearStateProgram: string | Uint8Array;
429
- }) => Promise<Transaction>;
430
- /** Create an application delete transaction.
431
- *
432
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
433
- *
434
- * @param params The parameters for the app deletion transaction
435
- * @example Basic example
436
- * ```typescript
437
- * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
438
- * ```
439
- * @example Advanced example
440
- * ```typescript
441
- * await algorand.createTransaction.appDelete({
442
- * sender: 'CREATORADDRESS',
443
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
444
- * args: [new Uint8Array(1, 2, 3, 4)]
445
- * accountReferences: ["ACCOUNT_1"]
446
- * appReferences: [123n, 1234n]
447
- * assetReferences: [12345n]
448
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
449
- * accessReferences: [{ appId: 1234n }]
450
- * lease: 'lease',
451
- * note: 'note',
452
- * // You wouldn't normally set this field
453
- * firstValidRound: 1000n,
454
- * validityWindow: 10,
455
- * extraFee: (1000).microAlgo(),
456
- * staticFee: (1000).microAlgo(),
457
- * // Max fee doesn't make sense with extraFee AND staticFee
458
- * // already specified, but here for completeness
459
- * maxFee: (3000).microAlgo(),
460
- * rejectVersion: 1,
461
- *})
462
- * ```
463
- * @returns The application delete transaction
464
- */
465
- appDelete: (params: AppDeleteParams) => Promise<Transaction>;
466
- /** Create an application call transaction.
467
- *
468
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
469
- *
470
- * @param params The parameters for the app call transaction
471
- * @example Basic example
472
- * ```typescript
473
- * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
474
- * ```
475
- * @example Advanced example
476
- * ```typescript
477
- * await algorand.createTransaction.appCall({
478
- * sender: 'CREATORADDRESS',
479
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
480
- * args: [new Uint8Array(1, 2, 3, 4)]
481
- * accountReferences: ["ACCOUNT_1"]
482
- * appReferences: [123n, 1234n]
483
- * assetReferences: [12345n]
484
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
485
- * accessReferences: [{ appId: 1234n }]
486
- * lease: 'lease',
487
- * note: 'note',
488
- * // You wouldn't normally set this field
489
- * firstValidRound: 1000n,
490
- * validityWindow: 10,
491
- * extraFee: (1000).microAlgo(),
492
- * staticFee: (1000).microAlgo(),
493
- * // Max fee doesn't make sense with extraFee AND staticFee
494
- * // already specified, but here for completeness
495
- * maxFee: (3000).microAlgo(),
496
- * rejectVersion: 1,
497
- *})
498
- * ```
499
- * @returns The application call transaction
500
- */
501
- appCall: (params: AppCallParams) => Promise<Transaction>;
502
- /** Create an application create call with ABI method call transaction.
503
- *
504
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
505
- *
506
- * @param params The parameters for the app creation transaction
507
- * @example Basic example
508
- * ```typescript
509
- * const method = new ABIMethod({
510
- * name: 'method',
511
- * args: [{ name: 'arg1', type: 'string' }],
512
- * returns: { type: 'string' },
513
- * })
514
- * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
515
- * ```
516
- * @example Advanced example
517
- * ```typescript
518
- * const method = new ABIMethod({
519
- * name: 'method',
520
- * args: [{ name: 'arg1', type: 'string' }],
521
- * returns: { type: 'string' },
522
- * })
523
- * await algorand.createTransaction.appCreateMethodCall({
524
- * sender: 'CREATORADDRESS',
525
- * method: method,
526
- * args: ["arg1_value"],
527
- * approvalProgram: "TEALCODE",
528
- * clearStateProgram: "TEALCODE",
529
- * schema: {
530
- * globalInts: 1,
531
- * globalByteSlices: 2,
532
- * localInts: 3,
533
- * localByteSlices: 4
534
- * },
535
- * extraProgramPages: 1,
536
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
537
- * args: [new Uint8Array(1, 2, 3, 4)]
538
- * accountReferences: ["ACCOUNT_1"]
539
- * appReferences: [123n, 1234n]
540
- * assetReferences: [12345n]
541
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
542
- * accessReferences: [{ appId: 1234n }]
543
- * lease: 'lease',
544
- * note: 'note',
545
- * // You wouldn't normally set this field
546
- * firstValidRound: 1000n,
547
- * validityWindow: 10,
548
- * extraFee: (1000).microAlgo(),
549
- * staticFee: (1000).microAlgo(),
550
- * // Max fee doesn't make sense with extraFee AND staticFee
551
- * // already specified, but here for completeness
552
- * maxFee: (3000).microAlgo(),
553
- * rejectVersion: 1,
554
- *})
555
- * ```
556
- * @returns The application ABI method create transaction
557
- */
558
- appCreateMethodCall: (params: AppCreateMethodCall) => Promise<Expand<BuiltTransactions>>;
559
- /** Create an application update call with ABI method call transaction.
560
- *
561
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
562
- *
563
- * @param params The parameters for the app update transaction
564
- * @example Basic example
565
- * ```typescript
566
- * const method = new ABIMethod({
567
- * name: 'method',
568
- * args: [{ name: 'arg1', type: 'string' }],
569
- * returns: { type: 'string' },
570
- * })
571
- * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
572
- * ```
573
- * @example Advanced example
574
- * ```typescript
575
- * const method = new ABIMethod({
576
- * name: 'method',
577
- * args: [{ name: 'arg1', type: 'string' }],
578
- * returns: { type: 'string' },
579
- * })
580
- * await algorand.createTransaction.appUpdateMethodCall({
581
- * sender: 'CREATORADDRESS',
582
- * method: method,
583
- * args: ["arg1_value"],
584
- * approvalProgram: "TEALCODE",
585
- * clearStateProgram: "TEALCODE",
586
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
587
- * args: [new Uint8Array(1, 2, 3, 4)]
588
- * accountReferences: ["ACCOUNT_1"]
589
- * appReferences: [123n, 1234n]
590
- * assetReferences: [12345n]
591
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
592
- * accessReferences: [{ appId: 1234n }]
593
- * lease: 'lease',
594
- * note: 'note',
595
- * // You wouldn't normally set this field
596
- * firstValidRound: 1000n,
597
- * validityWindow: 10,
598
- * extraFee: (1000).microAlgo(),
599
- * staticFee: (1000).microAlgo(),
600
- * // Max fee doesn't make sense with extraFee AND staticFee
601
- * // already specified, but here for completeness
602
- * maxFee: (3000).microAlgo(),
603
- * rejectVersion: 1,
604
- *})
605
- * ```
606
- * @returns The application ABI method update transaction
607
- */
608
- appUpdateMethodCall: (params: AppUpdateMethodCall) => Promise<Expand<BuiltTransactions>>;
609
- /** Create an application delete call with ABI method call transaction.
610
- *
611
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
612
- *
613
- * @param params The parameters for the app deletion transaction
614
- * @example Basic example
615
- * ```typescript
616
- * const method = new ABIMethod({
617
- * name: 'method',
618
- * args: [{ name: 'arg1', type: 'string' }],
619
- * returns: { type: 'string' },
620
- * })
621
- * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
622
- * ```
623
- * @example Advanced example
624
- * ```typescript
625
- * const method = new ABIMethod({
626
- * name: 'method',
627
- * args: [{ name: 'arg1', type: 'string' }],
628
- * returns: { type: 'string' },
629
- * })
630
- * await algorand.createTransaction.appDeleteMethodCall({
631
- * sender: 'CREATORADDRESS',
632
- * method: method,
633
- * args: ["arg1_value"],
634
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
635
- * args: [new Uint8Array(1, 2, 3, 4)]
636
- * accountReferences: ["ACCOUNT_1"]
637
- * appReferences: [123n, 1234n]
638
- * assetReferences: [12345n]
639
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
640
- * accessReferences: [{ appId: 1234n }]
641
- * lease: 'lease',
642
- * note: 'note',
643
- * // You wouldn't normally set this field
644
- * firstValidRound: 1000n,
645
- * validityWindow: 10,
646
- * extraFee: (1000).microAlgo(),
647
- * staticFee: (1000).microAlgo(),
648
- * // Max fee doesn't make sense with extraFee AND staticFee
649
- * // already specified, but here for completeness
650
- * maxFee: (3000).microAlgo(),
651
- * rejectVersion: 1,
652
- *})
653
- * ```
654
- * @returns The application ABI method delete transaction
655
- */
656
- appDeleteMethodCall: (params: AppDeleteMethodCall) => Promise<Expand<BuiltTransactions>>;
657
- /** Create an application call with ABI method call transaction.
658
- *
659
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
660
- *
661
- * @param params The parameters for the app call transaction
662
- * @example Basic example
663
- * ```typescript
664
- * const method = new ABIMethod({
665
- * name: 'method',
666
- * args: [{ name: 'arg1', type: 'string' }],
667
- * returns: { type: 'string' },
668
- * })
669
- * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
670
- * ```
671
- * @example Advanced example
672
- * ```typescript
673
- * const method = new ABIMethod({
674
- * name: 'method',
675
- * args: [{ name: 'arg1', type: 'string' }],
676
- * returns: { type: 'string' },
677
- * })
678
- * await algorand.createTransaction.appCallMethodCall({
679
- * sender: 'CREATORADDRESS',
680
- * method: method,
681
- * args: ["arg1_value"],
682
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
683
- * args: [new Uint8Array(1, 2, 3, 4)]
684
- * accountReferences: ["ACCOUNT_1"]
685
- * appReferences: [123n, 1234n]
686
- * assetReferences: [12345n]
687
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
688
- * accessReferences: [{ appId: 1234n }]
689
- * lease: 'lease',
690
- * note: 'note',
691
- * // You wouldn't normally set this field
692
- * firstValidRound: 1000n,
693
- * validityWindow: 10,
694
- * extraFee: (1000).microAlgo(),
695
- * staticFee: (1000).microAlgo(),
696
- * // Max fee doesn't make sense with extraFee AND staticFee
697
- * // already specified, but here for completeness
698
- * maxFee: (3000).microAlgo(),
699
- * rejectVersion: 1,
700
- *})
701
- * ```
702
- * @returns The application ABI method call transaction
703
- */
704
- appCallMethodCall: (params: AppCallMethodCall) => Promise<Expand<BuiltTransactions>>;
705
- /**
706
- * Create an online key registration transaction.
707
- * @param params The parameters for the key registration transaction
708
- * @example Basic example
709
- * ```typescript
710
- * await algorand.createTransaction.onlineKeyRegistration({
711
- * sender: 'SENDERADDRESS',
712
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
713
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
714
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
715
- * voteFirst: 1n,
716
- * voteLast: 1000n,
717
- * voteKeyDilution: 1n,
718
- * })
719
- * ```
720
- * @example Advanced example
721
- * ```typescript
722
- * await algorand.createTransaction.onlineKeyRegistration({
723
- * sender: 'SENDERADDRESS',
724
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
725
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
726
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
727
- * voteFirst: 1n,
728
- * voteLast: 1000n,
729
- * voteKeyDilution: 1n,
730
- * lease: 'lease',
731
- * note: 'note',
732
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
733
- * rekeyTo: 'REKEYTOADDRESS',
734
- * // You wouldn't normally set this field
735
- * firstValidRound: 1000n,
736
- * validityWindow: 10,
737
- * extraFee: (1000).microAlgo(),
738
- * staticFee: (1000).microAlgo(),
739
- * // Max fee doesn't make sense with extraFee AND staticFee
740
- * // already specified, but here for completeness
741
- * maxFee: (3000).microAlgo(),
742
- * })
743
- * ```
744
- * @returns The online key registration transaction
745
- */
746
- onlineKeyRegistration: (params: OnlineKeyRegistrationParams) => Promise<Transaction>;
747
- /**
748
- * Create an offline key registration transaction.
749
- * @param params The parameters for the key registration transaction
750
- * @example Basic example
751
- * ```typescript
752
- * await algorand.createTransaction.offlineKeyRegistration({
753
- * sender: 'SENDERADDRESS',
754
- * })
755
- * ```
756
- * @example Advanced example
757
- * ```typescript
758
- * await algorand.createTransaction.offlineKeyRegistration({
759
- * sender: 'SENDERADDRESS',
760
- * lease: 'lease',
761
- * note: 'note',
762
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
763
- * rekeyTo: 'REKEYTOADDRESS',
764
- * // You wouldn't normally set this field
765
- * firstValidRound: 1000n,
766
- * validityWindow: 10,
767
- * extraFee: (1000).microAlgo(),
768
- * staticFee: (1000).microAlgo(),
769
- * // Max fee doesn't make sense with extraFee AND staticFee
770
- * // already specified, but here for completeness
771
- * maxFee: (3000).microAlgo(),
772
- * })
773
- * ```
774
- * @returns The offline key registration transaction
775
- */
776
- offlineKeyRegistration: (params: OfflineKeyRegistrationParams) => Promise<Transaction>;
6
+ export declare class AlgorandClientTransactionCreator {
7
+ private _newGroup;
8
+ /**
9
+ * Creates a new `AlgorandClientTransactionCreator`
10
+ * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
11
+ * @example
12
+ * ```typescript
13
+ * const transactionCreator = new AlgorandClientTransactionCreator(() => new TransactionComposer())
14
+ * ```
15
+ */
16
+ constructor(newGroup: () => TransactionComposer);
17
+ private _transaction;
18
+ private _transactions;
19
+ /**
20
+ * Create a payment transaction to transfer Algo between accounts.
21
+ * @param params The parameters for the payment transaction
22
+ * @example Basic example
23
+ * ```typescript
24
+ * await algorand.createTransaction.payment({
25
+ * sender: 'SENDERADDRESS',
26
+ * receiver: 'RECEIVERADDRESS',
27
+ * amount: (4).algo(),
28
+ * })
29
+ * ```
30
+ * @example Advanced example
31
+ * ```typescript
32
+ * await algorand.createTransaction.payment({
33
+ * amount: (4).algo(),
34
+ * receiver: 'RECEIVERADDRESS',
35
+ * sender: 'SENDERADDRESS',
36
+ * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
37
+ * lease: 'lease',
38
+ * note: 'note',
39
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
40
+ * rekeyTo: 'REKEYTOADDRESS',
41
+ * // You wouldn't normally set this field
42
+ * firstValidRound: 1000n,
43
+ * validityWindow: 10,
44
+ * extraFee: (1000).microAlgo(),
45
+ * staticFee: (1000).microAlgo(),
46
+ * // Max fee doesn't make sense with extraFee AND staticFee
47
+ * // already specified, but here for completeness
48
+ * maxFee: (3000).microAlgo(),
49
+ * })
50
+ * ```
51
+ * @returns The payment transaction
52
+ */
53
+ payment: (params: import("./composer").PaymentParams) => Promise<Transaction>;
54
+ /** Create a create Algorand Standard Asset transaction.
55
+ *
56
+ * The account that sends this transaction will automatically be
57
+ * opted in to the asset and will hold all units after creation.
58
+ *
59
+ * @param params The parameters for the asset creation transaction
60
+ *
61
+ * @example Basic example
62
+ * ```typescript
63
+ * await algorand.createTransaction.assetCreate({ sender: "CREATORADDRESS", total: 100n})
64
+ * ```
65
+ * @example Advanced example
66
+ * ```typescript
67
+ * await algorand.createTransaction.assetCreate({
68
+ * sender: 'CREATORADDRESS',
69
+ * total: 100n,
70
+ * decimals: 2,
71
+ * assetName: 'asset',
72
+ * unitName: 'unit',
73
+ * url: 'url',
74
+ * metadataHash: 'metadataHash',
75
+ * defaultFrozen: false,
76
+ * manager: 'MANAGERADDRESS',
77
+ * reserve: 'RESERVEADDRESS',
78
+ * freeze: 'FREEZEADDRESS',
79
+ * clawback: 'CLAWBACKADDRESS',
80
+ * lease: 'lease',
81
+ * note: 'note',
82
+ * // You wouldn't normally set this field
83
+ * firstValidRound: 1000n,
84
+ * validityWindow: 10,
85
+ * extraFee: (1000).microAlgo(),
86
+ * staticFee: (1000).microAlgo(),
87
+ * // Max fee doesn't make sense with extraFee AND staticFee
88
+ * // already specified, but here for completeness
89
+ * maxFee: (3000).microAlgo(),
90
+ * })
91
+ * ```
92
+ * @returns The asset create transaction
93
+ */
94
+ assetCreate: (params: import("./composer").AssetCreateParams) => Promise<Transaction>;
95
+ /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.
96
+ *
97
+ * **Note:** The manager, reserve, freeze, and clawback addresses
98
+ * are immutably empty if they are not set. If manager is not set then
99
+ * all fields are immutable from that point forward.
100
+ *
101
+ * @param params The parameters for the asset config transaction
102
+ *
103
+ * @example Basic example
104
+ * ```typescript
105
+ * await algorand.createTransaction.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
106
+ * ```
107
+ * @example Advanced example
108
+ * ```typescript
109
+ * await algorand.createTransaction.assetConfig({
110
+ * sender: 'MANAGERADDRESS',
111
+ * assetId: 123456n,
112
+ * manager: 'MANAGERADDRESS',
113
+ * reserve: 'RESERVEADDRESS',
114
+ * freeze: 'FREEZEADDRESS',
115
+ * clawback: 'CLAWBACKADDRESS',
116
+ * lease: 'lease',
117
+ * note: 'note',
118
+ * // You wouldn't normally set this field
119
+ * firstValidRound: 1000n,
120
+ * validityWindow: 10,
121
+ * extraFee: (1000).microAlgo(),
122
+ * staticFee: (1000).microAlgo(),
123
+ * // Max fee doesn't make sense with extraFee AND staticFee
124
+ * // already specified, but here for completeness
125
+ * maxFee: (3000).microAlgo(),
126
+ * })
127
+ * ```
128
+ * @returns The asset config transaction
129
+ */
130
+ assetConfig: (params: import("./composer").AssetConfigParams) => Promise<Transaction>;
131
+ /** Create an Algorand Standard Asset freeze transaction.
132
+ *
133
+ * @param params The parameters for the asset freeze transaction
134
+ *
135
+ * @example Basic example
136
+ * ```typescript
137
+ * await algorand.createTransaction.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
138
+ * ```
139
+ * @example Advanced example
140
+ * ```typescript
141
+ * await algorand.createTransaction.assetFreeze({
142
+ * sender: 'MANAGERADDRESS',
143
+ * assetId: 123456n,
144
+ * account: 'ACCOUNTADDRESS',
145
+ * frozen: true,
146
+ * lease: 'lease',
147
+ * note: 'note',
148
+ * // You wouldn't normally set this field
149
+ * firstValidRound: 1000n,
150
+ * validityWindow: 10,
151
+ * extraFee: (1000).microAlgo(),
152
+ * staticFee: (1000).microAlgo(),
153
+ * // Max fee doesn't make sense with extraFee AND staticFee
154
+ * // already specified, but here for completeness
155
+ * maxFee: (3000).microAlgo(),
156
+ * })
157
+ * ```
158
+ * @returns The asset freeze transaction
159
+ */
160
+ assetFreeze: (params: import("./composer").AssetFreezeParams) => Promise<Transaction>;
161
+ /** Create an Algorand Standard Asset destroy transaction.
162
+ *
163
+ * Created assets can be destroyed only by the asset manager account.
164
+ * All of the assets must be owned by the creator of the asset before
165
+ * the asset can be deleted.
166
+ *
167
+ * @param params The parameters for the asset destroy transaction
168
+ *
169
+ * @example Basic example
170
+ * ```typescript
171
+ * await algorand.createTransaction.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
172
+ * ```
173
+ * @example Advanced example
174
+ * ```typescript
175
+ * await algorand.createTransaction.assetDestroy({
176
+ * sender: 'MANAGERADDRESS',
177
+ * assetId: 123456n,
178
+ * lease: 'lease',
179
+ * note: 'note',
180
+ * // You wouldn't normally set this field
181
+ * firstValidRound: 1000n,
182
+ * validityWindow: 10,
183
+ * extraFee: (1000).microAlgo(),
184
+ * staticFee: (1000).microAlgo(),
185
+ * // Max fee doesn't make sense with extraFee AND staticFee
186
+ * // already specified, but here for completeness
187
+ * maxFee: (3000).microAlgo(),
188
+ * })
189
+ * ```
190
+ * @returns The asset destroy transaction
191
+ */
192
+ assetDestroy: (params: import("./composer").AssetDestroyParams) => Promise<Transaction>;
193
+ /** Create an Algorand Standard Asset transfer transaction.
194
+ *
195
+ * @param params The parameters for the asset transfer transaction
196
+ *
197
+ * @example Basic example
198
+ * ```typescript
199
+ * await algorand.createTransaction.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
200
+ * ```
201
+ * @example Advanced example (with clawback)
202
+ * ```typescript
203
+ * await algorand.createTransaction.assetTransfer({
204
+ * sender: 'CLAWBACKADDRESS',
205
+ * assetId: 123456n,
206
+ * amount: 1n,
207
+ * receiver: 'RECEIVERADDRESS',
208
+ * clawbackTarget: 'HOLDERADDRESS',
209
+ * // This field needs to be used with caution
210
+ * closeAssetTo: 'ADDRESSTOCLOSETO'
211
+ * lease: 'lease',
212
+ * note: 'note',
213
+ * // You wouldn't normally set this field
214
+ * firstValidRound: 1000n,
215
+ * validityWindow: 10,
216
+ * extraFee: (1000).microAlgo(),
217
+ * staticFee: (1000).microAlgo(),
218
+ * // Max fee doesn't make sense with extraFee AND staticFee
219
+ * // already specified, but here for completeness
220
+ * maxFee: (3000).microAlgo(),
221
+ * })
222
+ * ```
223
+ * @returns The result of the asset transfer transaction
224
+ */
225
+ assetTransfer: (params: import("./composer").AssetTransferParams) => Promise<Transaction>;
226
+ /** Create an Algorand Standard Asset opt-in transaction.
227
+ *
228
+ * @param params The parameters for the asset opt-in transaction
229
+ *
230
+ * @example Basic example
231
+ * ```typescript
232
+ * await algorand.createTransaction.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
233
+ * ```
234
+ * @example Advanced example
235
+ * ```typescript
236
+ * await algorand.createTransaction.assetOptIn({
237
+ * sender: 'SENDERADDRESS',
238
+ * assetId: 123456n,
239
+ * lease: 'lease',
240
+ * note: 'note',
241
+ * // You wouldn't normally set this field
242
+ * firstValidRound: 1000n,
243
+ * validityWindow: 10,
244
+ * extraFee: (1000).microAlgo(),
245
+ * staticFee: (1000).microAlgo(),
246
+ * // Max fee doesn't make sense with extraFee AND staticFee
247
+ * // already specified, but here for completeness
248
+ * maxFee: (3000).microAlgo(),
249
+ * })
250
+ * ```
251
+ * @returns The asset opt-in transaction
252
+ */
253
+ assetOptIn: (params: import("./composer").AssetOptInParams) => Promise<Transaction>;
254
+ /** Create an asset opt-out transaction.
255
+ *
256
+ * *Note:* If the account has a balance of the asset,
257
+ * it will lose those assets
258
+ *
259
+ * @param params The parameters for the asset opt-out transaction
260
+ *
261
+ * @example Basic example (without creator, will be retrieved from algod)
262
+ * ```typescript
263
+ * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
264
+ * ```
265
+ * @example Basic example (with creator)
266
+ * ```typescript
267
+ * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
268
+ * ```
269
+ * @example Advanced example
270
+ * ```typescript
271
+ * await algorand.createTransaction.assetOptOut({
272
+ * sender: 'SENDERADDRESS',
273
+ * assetId: 123456n,
274
+ * creator: 'CREATORADDRESS',
275
+ * ensureZeroBalance: true,
276
+ * lease: 'lease',
277
+ * note: 'note',
278
+ * // You wouldn't normally set this field
279
+ * firstValidRound: 1000n,
280
+ * validityWindow: 10,
281
+ * extraFee: (1000).microAlgo(),
282
+ * staticFee: (1000).microAlgo(),
283
+ * // Max fee doesn't make sense with extraFee AND staticFee
284
+ * // already specified, but here for completeness
285
+ * maxFee: (3000).microAlgo(),
286
+ * })
287
+ * ```
288
+ * @returns The asset opt-out transaction
289
+ */
290
+ assetOptOut: (params: import("./composer").AssetOptOutParams) => Promise<Transaction>;
291
+ /** Create an application create transaction.
292
+ *
293
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
294
+ *
295
+ * @param params The parameters for the app creation transaction
296
+ * @example Basic example
297
+ * ```typescript
298
+ * await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
299
+ * ```
300
+ * @example Advanced example
301
+ * ```typescript
302
+ * await algorand.createTransaction.appCreate({
303
+ * sender: 'CREATORADDRESS',
304
+ * approvalProgram: "TEALCODE",
305
+ * clearStateProgram: "TEALCODE",
306
+ * schema: {
307
+ * globalInts: 1,
308
+ * globalByteSlices: 2,
309
+ * localInts: 3,
310
+ * localByteSlices: 4
311
+ * },
312
+ * extraProgramPages: 1,
313
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
314
+ * args: [new Uint8Array(1, 2, 3, 4)]
315
+ * accountReferences: ["ACCOUNT_1"]
316
+ * appReferences: [123n, 1234n]
317
+ * assetReferences: [12345n]
318
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
319
+ * accessReferences: [{ appId: 1234n }]
320
+ * lease: 'lease',
321
+ * note: 'note',
322
+ * // You wouldn't normally set this field
323
+ * firstValidRound: 1000n,
324
+ * validityWindow: 10,
325
+ * extraFee: (1000).microAlgo(),
326
+ * staticFee: (1000).microAlgo(),
327
+ * // Max fee doesn't make sense with extraFee AND staticFee
328
+ * // already specified, but here for completeness
329
+ * maxFee: (3000).microAlgo(),
330
+ * rejectVersion: 1,
331
+ *})
332
+ * ```
333
+ * @returns The application create transaction
334
+ */
335
+ appCreate: (params: {
336
+ sender: string | algosdk.Address;
337
+ maxFee?: import("./amount").AlgoAmount | undefined;
338
+ note?: (Uint8Array | string) | undefined;
339
+ args?: Uint8Array[] | undefined;
340
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
341
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
342
+ rejectVersion?: number | undefined;
343
+ lease?: (Uint8Array | string) | undefined;
344
+ rekeyTo?: (string | algosdk.Address) | undefined;
345
+ staticFee?: import("./amount").AlgoAmount | undefined;
346
+ extraFee?: import("./amount").AlgoAmount | undefined;
347
+ validityWindow?: number | bigint | undefined;
348
+ firstValidRound?: bigint | undefined;
349
+ lastValidRound?: bigint | undefined;
350
+ accountReferences?: (string | algosdk.Address)[] | undefined;
351
+ appReferences?: bigint[] | undefined;
352
+ assetReferences?: bigint[] | undefined;
353
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
354
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
355
+ approvalProgram: string | Uint8Array;
356
+ clearStateProgram: string | Uint8Array;
357
+ schema?: {
358
+ globalInts: number;
359
+ globalByteSlices: number;
360
+ localInts: number;
361
+ localByteSlices: number;
362
+ } | undefined;
363
+ extraProgramPages?: number | undefined;
364
+ }) => Promise<Transaction>;
365
+ /** Create an application update transaction.
366
+ *
367
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
368
+ *
369
+ * @param params The parameters for the app update transaction
370
+ * @example Basic example
371
+ * ```typescript
372
+ * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
373
+ * ```
374
+ * @example Advanced example
375
+ * ```typescript
376
+ * await algorand.createTransaction.appUpdate({
377
+ * sender: 'CREATORADDRESS',
378
+ * approvalProgram: "TEALCODE",
379
+ * clearStateProgram: "TEALCODE",
380
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
381
+ * args: [new Uint8Array(1, 2, 3, 4)]
382
+ * accountReferences: ["ACCOUNT_1"]
383
+ * appReferences: [123n, 1234n]
384
+ * assetReferences: [12345n]
385
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
386
+ * accessReferences: [{ appId: 1234n }]
387
+ * lease: 'lease',
388
+ * note: 'note',
389
+ * // You wouldn't normally set this field
390
+ * firstValidRound: 1000n,
391
+ * validityWindow: 10,
392
+ * extraFee: (1000).microAlgo(),
393
+ * staticFee: (1000).microAlgo(),
394
+ * // Max fee doesn't make sense with extraFee AND staticFee
395
+ * // already specified, but here for completeness
396
+ * maxFee: (3000).microAlgo(),
397
+ * rejectVersion: 1,
398
+ *})
399
+ * ```
400
+ * @returns The application update transaction
401
+ */
402
+ appUpdate: (params: {
403
+ sender: string | algosdk.Address;
404
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
405
+ rekeyTo?: (string | algosdk.Address) | undefined;
406
+ note?: (Uint8Array | string) | undefined;
407
+ lease?: (Uint8Array | string) | undefined;
408
+ staticFee?: import("./amount").AlgoAmount | undefined;
409
+ extraFee?: import("./amount").AlgoAmount | undefined;
410
+ maxFee?: import("./amount").AlgoAmount | undefined;
411
+ validityWindow?: number | bigint | undefined;
412
+ firstValidRound?: bigint | undefined;
413
+ lastValidRound?: bigint | undefined;
414
+ appId: bigint;
415
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
416
+ args?: Uint8Array[] | undefined;
417
+ accountReferences?: (string | algosdk.Address)[] | undefined;
418
+ appReferences?: bigint[] | undefined;
419
+ assetReferences?: bigint[] | undefined;
420
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
421
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
422
+ rejectVersion?: number | undefined;
423
+ approvalProgram: string | Uint8Array;
424
+ clearStateProgram: string | Uint8Array;
425
+ }) => Promise<Transaction>;
426
+ /** Create an application delete transaction.
427
+ *
428
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
429
+ *
430
+ * @param params The parameters for the app deletion transaction
431
+ * @example Basic example
432
+ * ```typescript
433
+ * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
434
+ * ```
435
+ * @example Advanced example
436
+ * ```typescript
437
+ * await algorand.createTransaction.appDelete({
438
+ * sender: 'CREATORADDRESS',
439
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
440
+ * args: [new Uint8Array(1, 2, 3, 4)]
441
+ * accountReferences: ["ACCOUNT_1"]
442
+ * appReferences: [123n, 1234n]
443
+ * assetReferences: [12345n]
444
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
445
+ * accessReferences: [{ appId: 1234n }]
446
+ * lease: 'lease',
447
+ * note: 'note',
448
+ * // You wouldn't normally set this field
449
+ * firstValidRound: 1000n,
450
+ * validityWindow: 10,
451
+ * extraFee: (1000).microAlgo(),
452
+ * staticFee: (1000).microAlgo(),
453
+ * // Max fee doesn't make sense with extraFee AND staticFee
454
+ * // already specified, but here for completeness
455
+ * maxFee: (3000).microAlgo(),
456
+ * rejectVersion: 1,
457
+ *})
458
+ * ```
459
+ * @returns The application delete transaction
460
+ */
461
+ appDelete: (params: import("./composer").AppDeleteParams) => Promise<Transaction>;
462
+ /** Create an application call transaction.
463
+ *
464
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
465
+ *
466
+ * @param params The parameters for the app call transaction
467
+ * @example Basic example
468
+ * ```typescript
469
+ * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
470
+ * ```
471
+ * @example Advanced example
472
+ * ```typescript
473
+ * await algorand.createTransaction.appCall({
474
+ * sender: 'CREATORADDRESS',
475
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
476
+ * args: [new Uint8Array(1, 2, 3, 4)]
477
+ * accountReferences: ["ACCOUNT_1"]
478
+ * appReferences: [123n, 1234n]
479
+ * assetReferences: [12345n]
480
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
481
+ * accessReferences: [{ appId: 1234n }]
482
+ * lease: 'lease',
483
+ * note: 'note',
484
+ * // You wouldn't normally set this field
485
+ * firstValidRound: 1000n,
486
+ * validityWindow: 10,
487
+ * extraFee: (1000).microAlgo(),
488
+ * staticFee: (1000).microAlgo(),
489
+ * // Max fee doesn't make sense with extraFee AND staticFee
490
+ * // already specified, but here for completeness
491
+ * maxFee: (3000).microAlgo(),
492
+ * rejectVersion: 1,
493
+ *})
494
+ * ```
495
+ * @returns The application call transaction
496
+ */
497
+ appCall: (params: import("./composer").AppCallParams) => Promise<Transaction>;
498
+ /** Create an application create call with ABI method call transaction.
499
+ *
500
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
501
+ *
502
+ * @param params The parameters for the app creation transaction
503
+ * @example Basic example
504
+ * ```typescript
505
+ * const method = new ABIMethod({
506
+ * name: 'method',
507
+ * args: [{ name: 'arg1', type: 'string' }],
508
+ * returns: { type: 'string' },
509
+ * })
510
+ * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
511
+ * ```
512
+ * @example Advanced example
513
+ * ```typescript
514
+ * const method = new ABIMethod({
515
+ * name: 'method',
516
+ * args: [{ name: 'arg1', type: 'string' }],
517
+ * returns: { type: 'string' },
518
+ * })
519
+ * await algorand.createTransaction.appCreateMethodCall({
520
+ * sender: 'CREATORADDRESS',
521
+ * method: method,
522
+ * args: ["arg1_value"],
523
+ * approvalProgram: "TEALCODE",
524
+ * clearStateProgram: "TEALCODE",
525
+ * schema: {
526
+ * globalInts: 1,
527
+ * globalByteSlices: 2,
528
+ * localInts: 3,
529
+ * localByteSlices: 4
530
+ * },
531
+ * extraProgramPages: 1,
532
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
533
+ * args: [new Uint8Array(1, 2, 3, 4)]
534
+ * accountReferences: ["ACCOUNT_1"]
535
+ * appReferences: [123n, 1234n]
536
+ * assetReferences: [12345n]
537
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
538
+ * accessReferences: [{ appId: 1234n }]
539
+ * lease: 'lease',
540
+ * note: 'note',
541
+ * // You wouldn't normally set this field
542
+ * firstValidRound: 1000n,
543
+ * validityWindow: 10,
544
+ * extraFee: (1000).microAlgo(),
545
+ * staticFee: (1000).microAlgo(),
546
+ * // Max fee doesn't make sense with extraFee AND staticFee
547
+ * // already specified, but here for completeness
548
+ * maxFee: (3000).microAlgo(),
549
+ * rejectVersion: 1,
550
+ *})
551
+ * ```
552
+ * @returns The application ABI method create transaction
553
+ */
554
+ appCreateMethodCall: (params: import("./composer").AppCreateMethodCall) => Promise<Expand<BuiltTransactions>>;
555
+ /** Create an application update call with ABI method call transaction.
556
+ *
557
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
558
+ *
559
+ * @param params The parameters for the app update transaction
560
+ * @example Basic example
561
+ * ```typescript
562
+ * const method = new ABIMethod({
563
+ * name: 'method',
564
+ * args: [{ name: 'arg1', type: 'string' }],
565
+ * returns: { type: 'string' },
566
+ * })
567
+ * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
568
+ * ```
569
+ * @example Advanced example
570
+ * ```typescript
571
+ * const method = new ABIMethod({
572
+ * name: 'method',
573
+ * args: [{ name: 'arg1', type: 'string' }],
574
+ * returns: { type: 'string' },
575
+ * })
576
+ * await algorand.createTransaction.appUpdateMethodCall({
577
+ * sender: 'CREATORADDRESS',
578
+ * method: method,
579
+ * args: ["arg1_value"],
580
+ * approvalProgram: "TEALCODE",
581
+ * clearStateProgram: "TEALCODE",
582
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
583
+ * args: [new Uint8Array(1, 2, 3, 4)]
584
+ * accountReferences: ["ACCOUNT_1"]
585
+ * appReferences: [123n, 1234n]
586
+ * assetReferences: [12345n]
587
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
588
+ * accessReferences: [{ appId: 1234n }]
589
+ * lease: 'lease',
590
+ * note: 'note',
591
+ * // You wouldn't normally set this field
592
+ * firstValidRound: 1000n,
593
+ * validityWindow: 10,
594
+ * extraFee: (1000).microAlgo(),
595
+ * staticFee: (1000).microAlgo(),
596
+ * // Max fee doesn't make sense with extraFee AND staticFee
597
+ * // already specified, but here for completeness
598
+ * maxFee: (3000).microAlgo(),
599
+ * rejectVersion: 1,
600
+ *})
601
+ * ```
602
+ * @returns The application ABI method update transaction
603
+ */
604
+ appUpdateMethodCall: (params: import("./composer").AppUpdateMethodCall) => Promise<Expand<BuiltTransactions>>;
605
+ /** Create an application delete call with ABI method call transaction.
606
+ *
607
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
608
+ *
609
+ * @param params The parameters for the app deletion transaction
610
+ * @example Basic example
611
+ * ```typescript
612
+ * const method = new ABIMethod({
613
+ * name: 'method',
614
+ * args: [{ name: 'arg1', type: 'string' }],
615
+ * returns: { type: 'string' },
616
+ * })
617
+ * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
618
+ * ```
619
+ * @example Advanced example
620
+ * ```typescript
621
+ * const method = new ABIMethod({
622
+ * name: 'method',
623
+ * args: [{ name: 'arg1', type: 'string' }],
624
+ * returns: { type: 'string' },
625
+ * })
626
+ * await algorand.createTransaction.appDeleteMethodCall({
627
+ * sender: 'CREATORADDRESS',
628
+ * method: method,
629
+ * args: ["arg1_value"],
630
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
631
+ * args: [new Uint8Array(1, 2, 3, 4)]
632
+ * accountReferences: ["ACCOUNT_1"]
633
+ * appReferences: [123n, 1234n]
634
+ * assetReferences: [12345n]
635
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
636
+ * accessReferences: [{ appId: 1234n }]
637
+ * lease: 'lease',
638
+ * note: 'note',
639
+ * // You wouldn't normally set this field
640
+ * firstValidRound: 1000n,
641
+ * validityWindow: 10,
642
+ * extraFee: (1000).microAlgo(),
643
+ * staticFee: (1000).microAlgo(),
644
+ * // Max fee doesn't make sense with extraFee AND staticFee
645
+ * // already specified, but here for completeness
646
+ * maxFee: (3000).microAlgo(),
647
+ * rejectVersion: 1,
648
+ *})
649
+ * ```
650
+ * @returns The application ABI method delete transaction
651
+ */
652
+ appDeleteMethodCall: (params: import("./composer").AppDeleteMethodCall) => Promise<Expand<BuiltTransactions>>;
653
+ /** Create an application call with ABI method call transaction.
654
+ *
655
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
656
+ *
657
+ * @param params The parameters for the app call transaction
658
+ * @example Basic example
659
+ * ```typescript
660
+ * const method = new ABIMethod({
661
+ * name: 'method',
662
+ * args: [{ name: 'arg1', type: 'string' }],
663
+ * returns: { type: 'string' },
664
+ * })
665
+ * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
666
+ * ```
667
+ * @example Advanced example
668
+ * ```typescript
669
+ * const method = new ABIMethod({
670
+ * name: 'method',
671
+ * args: [{ name: 'arg1', type: 'string' }],
672
+ * returns: { type: 'string' },
673
+ * })
674
+ * await algorand.createTransaction.appCallMethodCall({
675
+ * sender: 'CREATORADDRESS',
676
+ * method: method,
677
+ * args: ["arg1_value"],
678
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
679
+ * args: [new Uint8Array(1, 2, 3, 4)]
680
+ * accountReferences: ["ACCOUNT_1"]
681
+ * appReferences: [123n, 1234n]
682
+ * assetReferences: [12345n]
683
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
684
+ * accessReferences: [{ appId: 1234n }]
685
+ * lease: 'lease',
686
+ * note: 'note',
687
+ * // You wouldn't normally set this field
688
+ * firstValidRound: 1000n,
689
+ * validityWindow: 10,
690
+ * extraFee: (1000).microAlgo(),
691
+ * staticFee: (1000).microAlgo(),
692
+ * // Max fee doesn't make sense with extraFee AND staticFee
693
+ * // already specified, but here for completeness
694
+ * maxFee: (3000).microAlgo(),
695
+ * rejectVersion: 1,
696
+ *})
697
+ * ```
698
+ * @returns The application ABI method call transaction
699
+ */
700
+ appCallMethodCall: (params: import("./composer").AppCallMethodCall) => Promise<Expand<BuiltTransactions>>;
701
+ /**
702
+ * Create an online key registration transaction.
703
+ * @param params The parameters for the key registration transaction
704
+ * @example Basic example
705
+ * ```typescript
706
+ * await algorand.createTransaction.onlineKeyRegistration({
707
+ * sender: 'SENDERADDRESS',
708
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
709
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
710
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
711
+ * voteFirst: 1n,
712
+ * voteLast: 1000n,
713
+ * voteKeyDilution: 1n,
714
+ * })
715
+ * ```
716
+ * @example Advanced example
717
+ * ```typescript
718
+ * await algorand.createTransaction.onlineKeyRegistration({
719
+ * sender: 'SENDERADDRESS',
720
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
721
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
722
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
723
+ * voteFirst: 1n,
724
+ * voteLast: 1000n,
725
+ * voteKeyDilution: 1n,
726
+ * lease: 'lease',
727
+ * note: 'note',
728
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
729
+ * rekeyTo: 'REKEYTOADDRESS',
730
+ * // You wouldn't normally set this field
731
+ * firstValidRound: 1000n,
732
+ * validityWindow: 10,
733
+ * extraFee: (1000).microAlgo(),
734
+ * staticFee: (1000).microAlgo(),
735
+ * // Max fee doesn't make sense with extraFee AND staticFee
736
+ * // already specified, but here for completeness
737
+ * maxFee: (3000).microAlgo(),
738
+ * })
739
+ * ```
740
+ * @returns The online key registration transaction
741
+ */
742
+ onlineKeyRegistration: (params: import("./composer").OnlineKeyRegistrationParams) => Promise<Transaction>;
743
+ /**
744
+ * Create an offline key registration transaction.
745
+ * @param params The parameters for the key registration transaction
746
+ * @example Basic example
747
+ * ```typescript
748
+ * await algorand.createTransaction.offlineKeyRegistration({
749
+ * sender: 'SENDERADDRESS',
750
+ * })
751
+ * ```
752
+ * @example Advanced example
753
+ * ```typescript
754
+ * await algorand.createTransaction.offlineKeyRegistration({
755
+ * sender: 'SENDERADDRESS',
756
+ * lease: 'lease',
757
+ * note: 'note',
758
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
759
+ * rekeyTo: 'REKEYTOADDRESS',
760
+ * // You wouldn't normally set this field
761
+ * firstValidRound: 1000n,
762
+ * validityWindow: 10,
763
+ * extraFee: (1000).microAlgo(),
764
+ * staticFee: (1000).microAlgo(),
765
+ * // Max fee doesn't make sense with extraFee AND staticFee
766
+ * // already specified, but here for completeness
767
+ * maxFee: (3000).microAlgo(),
768
+ * })
769
+ * ```
770
+ * @returns The offline key registration transaction
771
+ */
772
+ offlineKeyRegistration: (params: import("./composer").OfflineKeyRegistrationParams) => Promise<Transaction>;
777
773
  }
778
- //#endregion
779
- export { AlgorandClientTransactionCreator };
780
- //# sourceMappingURL=algorand-client-transaction-creator.d.ts.map