@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
@@ -1,1095 +1,1090 @@
1
- import { AlgoAmount } from "./amount.js";
2
- import { TransactionSignerAccount } from "./account.js";
3
- import { ABIReturn, SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult } from "./app.js";
4
- import { SendParams, SendSingleTransactionResult } from "./transaction.js";
5
- import { AppManager, BoxIdentifier, BoxReference, ResourceReference } from "./app-manager.js";
6
- import { AppCreateParams, AppMethodCall, AppMethodCallParams, AppUpdateParams, AssetCreateParams, AssetOptOutParams, CommonTransactionParams, TransactionComposer } from "./composer.js";
7
- import { AssetManager } from "./asset-manager.js";
8
- import algosdk, { Address } from "algosdk";
9
-
10
- //#region src/types/algorand-client-transaction-sender.d.ts
1
+ import algosdk, { Address } from 'algosdk';
2
+ import { SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult } from './app';
3
+ import { AppManager } from './app-manager';
4
+ import { AssetManager } from './asset-manager';
5
+ import { AppCreateParams, AppUpdateParams, AssetCreateParams, AssetOptOutParams, TransactionComposer } from './composer';
6
+ import { SendParams, SendSingleTransactionResult } from './transaction';
7
+ import Transaction = algosdk.Transaction;
11
8
  /** Orchestrates sending transactions for `AlgorandClient`. */
12
- declare class AlgorandClientTransactionSender {
13
- private _newGroup;
14
- private _assetManager;
15
- private _appManager;
16
- /**
17
- * Creates a new `AlgorandClientSender`
18
- * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
19
- * @param assetManager An `AssetManager` instance
20
- * @param appManager An `AppManager` instance
21
- * @example
22
- * ```typescript
23
- * const transactionSender = new AlgorandClientTransactionSender(() => new TransactionComposer(), assetManager, appManager)
24
- * ```
25
- */
26
- constructor(newGroup: () => TransactionComposer, assetManager: AssetManager, appManager: AppManager);
27
- /**
28
- * Start a new `TransactionComposer` transaction group
29
- * @returns A new instance of `TransactionComposer`.
30
- * @example
31
- * const composer = AlgorandClient.mainNet().send.newGroup();
32
- * const result = await composer.addTransaction(payment).send()
33
- */
34
- newGroup(): TransactionComposer;
35
- private _send;
36
- private _sendAppCall;
37
- private _sendAppUpdateCall;
38
- private _sendAppCreateCall;
39
- /**
40
- * Send a payment transaction to transfer Algo between accounts.
41
- * @param params The parameters for the payment transaction
42
- * @example Basic example
43
- * ```typescript
44
- * const result = await algorand.send.payment({
45
- * sender: 'SENDERADDRESS',
46
- * receiver: 'RECEIVERADDRESS',
47
- * amount: (4).algo(),
48
- * })
49
- * ```
50
- * @example Advanced example
51
- * ```typescript
52
- * const result = await algorand.send.payment({
53
- * amount: (4).algo(),
54
- * receiver: 'RECEIVERADDRESS',
55
- * sender: 'SENDERADDRESS',
56
- * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
57
- * lease: 'lease',
58
- * note: 'note',
59
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
60
- * rekeyTo: 'REKEYTOADDRESS',
61
- * // You wouldn't normally set this field
62
- * firstValidRound: 1000n,
63
- * validityWindow: 10,
64
- * extraFee: (1000).microAlgo(),
65
- * staticFee: (1000).microAlgo(),
66
- * // Max fee doesn't make sense with extraFee AND staticFee
67
- * // already specified, but here for completeness
68
- * maxFee: (3000).microAlgo(),
69
- * // Signer only needed if you want to provide one,
70
- * // generally you'd register it with AlgorandClient
71
- * // against the sender and not need to pass it in
72
- * signer: transactionSigner,
73
- * maxRoundsToWaitForConfirmation: 5,
74
- * suppressLog: true,
75
- * })
76
- * ```
77
- * @returns The result of the payment transaction and the transaction that was sent
78
- */
79
- payment: (params: CommonTransactionParams & {
80
- receiver: string | Address;
81
- amount: AlgoAmount;
82
- closeRemainderTo?: string | Address;
83
- } & SendParams) => Promise<SendSingleTransactionResult>;
84
- /**
85
- * Create a new Algorand Standard Asset.
86
- *
87
- * The account that sends this transaction will automatically be
88
- * opted in to the asset and will hold all units after creation.
89
- *
90
- * @param params The parameters for the asset creation transaction
91
- *
92
- * @example Basic example
93
- * ```typescript
94
- * await algorand.send.assetCreate({ sender: "CREATORADDRESS", total: 100n})
95
- * ```
96
- * @example Advanced example
97
- * ```typescript
98
- * await algorand.send.assetCreate({
99
- * sender: 'CREATORADDRESS',
100
- * total: 100n,
101
- * decimals: 2,
102
- * assetName: 'asset',
103
- * unitName: 'unit',
104
- * url: 'url',
105
- * metadataHash: 'metadataHash',
106
- * defaultFrozen: false,
107
- * manager: 'MANAGERADDRESS',
108
- * reserve: 'RESERVEADDRESS',
109
- * freeze: 'FREEZEADDRESS',
110
- * clawback: 'CLAWBACKADDRESS',
111
- * lease: 'lease',
112
- * note: 'note',
113
- * // You wouldn't normally set this field
114
- * firstValidRound: 1000n,
115
- * validityWindow: 10,
116
- * extraFee: (1000).microAlgo(),
117
- * staticFee: (1000).microAlgo(),
118
- * // Max fee doesn't make sense with extraFee AND staticFee
119
- * // already specified, but here for completeness
120
- * maxFee: (3000).microAlgo(),
121
- * // Signer only needed if you want to provide one,
122
- * // generally you'd register it with AlgorandClient
123
- * // against the sender and not need to pass it in
124
- * signer: transactionSigner,
125
- * maxRoundsToWaitForConfirmation: 5,
126
- * suppressLog: true,
127
- * })
128
- * ```
129
- * @returns The result of the asset create transaction and the transaction that was sent
130
- */
131
- assetCreate: (params: AssetCreateParams & SendParams) => Promise<{
132
- assetId: bigint;
133
- groupId: string;
134
- txIds: string[];
135
- returns?: ABIReturn[] | undefined;
136
- confirmations: algosdk.modelsv2.PendingTransactionResponse[];
137
- transactions: Transaction[];
138
- confirmation: algosdk.modelsv2.PendingTransactionResponse;
139
- transaction: Transaction;
140
- }>;
141
- /**
142
- * Configure an existing Algorand Standard Asset.
143
- *
144
- * **Note:** The manager, reserve, freeze, and clawback addresses
145
- * are immutably empty if they are not set. If manager is not set then
146
- * all fields are immutable from that point forward.
147
- *
148
- * @param params The parameters for the asset config transaction
149
- *
150
- * @example Basic example
151
- * ```typescript
152
- * await algorand.send.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
153
- * ```
154
- * @example Advanced example
155
- * ```typescript
156
- * await algorand.send.assetConfig({
157
- * sender: 'MANAGERADDRESS',
158
- * assetId: 123456n,
159
- * manager: 'MANAGERADDRESS',
160
- * reserve: 'RESERVEADDRESS',
161
- * freeze: 'FREEZEADDRESS',
162
- * clawback: 'CLAWBACKADDRESS',
163
- * lease: 'lease',
164
- * note: 'note',
165
- * // You wouldn't normally set this field
166
- * firstValidRound: 1000n,
167
- * validityWindow: 10,
168
- * extraFee: (1000).microAlgo(),
169
- * staticFee: (1000).microAlgo(),
170
- * // Max fee doesn't make sense with extraFee AND staticFee
171
- * // already specified, but here for completeness
172
- * maxFee: (3000).microAlgo(),
173
- * // Signer only needed if you want to provide one,
174
- * // generally you'd register it with AlgorandClient
175
- * // against the sender and not need to pass it in
176
- * signer: transactionSigner,
177
- * maxRoundsToWaitForConfirmation: 5,
178
- * suppressLog: true,
179
- * })
180
- * ```
181
- * @returns The result of the asset config transaction and the transaction that was sent
182
- */
183
- assetConfig: (params: CommonTransactionParams & {
184
- assetId: bigint;
185
- manager: string | Address | undefined;
186
- reserve?: string | Address;
187
- freeze?: string | Address;
188
- clawback?: string | Address;
189
- } & SendParams) => Promise<SendSingleTransactionResult>;
190
- /**
191
- * Freeze or unfreeze an Algorand Standard Asset for an account.
192
- *
193
- * @param params The parameters for the asset freeze transaction
194
- *
195
- * @example Basic example
196
- * ```typescript
197
- * await algorand.send.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
198
- * ```
199
- * @example Advanced example
200
- * ```typescript
201
- * await algorand.send.assetFreeze({
202
- * sender: 'MANAGERADDRESS',
203
- * assetId: 123456n,
204
- * account: 'ACCOUNTADDRESS',
205
- * frozen: true,
206
- * lease: 'lease',
207
- * note: 'note',
208
- * // You wouldn't normally set this field
209
- * firstValidRound: 1000n,
210
- * validityWindow: 10,
211
- * extraFee: (1000).microAlgo(),
212
- * staticFee: (1000).microAlgo(),
213
- * // Max fee doesn't make sense with extraFee AND staticFee
214
- * // already specified, but here for completeness
215
- * maxFee: (3000).microAlgo(),
216
- * // Signer only needed if you want to provide one,
217
- * // generally you'd register it with AlgorandClient
218
- * // against the sender and not need to pass it in
219
- * signer: transactionSigner,
220
- * maxRoundsToWaitForConfirmation: 5,
221
- * suppressLog: true,
222
- * })
223
- * ```
224
- * @returns The result of the asset freeze transaction and the transaction that was sent
225
- */
226
- assetFreeze: (params: CommonTransactionParams & {
227
- assetId: bigint;
228
- account: string | Address;
229
- frozen: boolean;
230
- } & SendParams) => Promise<SendSingleTransactionResult>;
231
- /**
232
- * Destroys an Algorand Standard Asset.
233
- *
234
- * Created assets can be destroyed only by the asset manager account.
235
- * All of the assets must be owned by the creator of the asset before
236
- * the asset can be deleted.
237
- *
238
- * @param params The parameters for the asset destroy transaction
239
- *
240
- * @example Basic example
241
- * ```typescript
242
- * await algorand.send.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
243
- * ```
244
- * @example Advanced example
245
- * ```typescript
246
- * await algorand.send.assetDestroy({
247
- * sender: 'MANAGERADDRESS',
248
- * assetId: 123456n,
249
- * lease: 'lease',
250
- * note: 'note',
251
- * // You wouldn't normally set this field
252
- * firstValidRound: 1000n,
253
- * validityWindow: 10,
254
- * extraFee: (1000).microAlgo(),
255
- * staticFee: (1000).microAlgo(),
256
- * // Max fee doesn't make sense with extraFee AND staticFee
257
- * // already specified, but here for completeness
258
- * maxFee: (3000).microAlgo(),
259
- * // Signer only needed if you want to provide one,
260
- * // generally you'd register it with AlgorandClient
261
- * // against the sender and not need to pass it in
262
- * signer: transactionSigner,
263
- * maxRoundsToWaitForConfirmation: 5,
264
- * suppressLog: true,
265
- * })
266
- * ```
267
- * @returns The result of the asset destroy transaction and the transaction that was sent
268
- */
269
- assetDestroy: (params: CommonTransactionParams & {
270
- assetId: bigint;
271
- } & SendParams) => Promise<SendSingleTransactionResult>;
272
- /**
273
- * Transfer an Algorand Standard Asset.
274
- *
275
- * @param params The parameters for the asset transfer transaction
276
- *
277
- * @example Basic example
278
- * ```typescript
279
- * await algorand.send.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
280
- * ```
281
- * @example Advanced example (with clawback)
282
- * ```typescript
283
- * await algorand.send.assetTransfer({
284
- * sender: 'CLAWBACKADDRESS',
285
- * assetId: 123456n,
286
- * amount: 1n,
287
- * receiver: 'RECEIVERADDRESS',
288
- * clawbackTarget: 'HOLDERADDRESS',
289
- * // This field needs to be used with caution
290
- * closeAssetTo: 'ADDRESSTOCLOSETO'
291
- * lease: 'lease',
292
- * note: 'note',
293
- * // You wouldn't normally set this field
294
- * firstValidRound: 1000n,
295
- * validityWindow: 10,
296
- * extraFee: (1000).microAlgo(),
297
- * staticFee: (1000).microAlgo(),
298
- * // Max fee doesn't make sense with extraFee AND staticFee
299
- * // already specified, but here for completeness
300
- * maxFee: (3000).microAlgo(),
301
- * // Signer only needed if you want to provide one,
302
- * // generally you'd register it with AlgorandClient
303
- * // against the sender and not need to pass it in
304
- * signer: transactionSigner,
305
- * maxRoundsToWaitForConfirmation: 5,
306
- * suppressLog: true,
307
- * })
308
- * ```
309
- * @returns The result of the asset transfer transaction and the transaction that was sent
310
- */
311
- assetTransfer: (params: CommonTransactionParams & {
312
- assetId: bigint;
313
- amount: bigint;
314
- receiver: string | Address;
315
- clawbackTarget?: string | Address;
316
- closeAssetTo?: string | Address;
317
- } & SendParams) => Promise<SendSingleTransactionResult>;
318
- /**
319
- * Opt an account into an Algorand Standard Asset.
320
- *
321
- * @param params The parameters for the asset opt-in transaction
322
- *
323
- * @example Basic example
324
- * ```typescript
325
- * await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
326
- * ```
327
- * @example Advanced example
328
- * ```typescript
329
- * await algorand.send.assetOptIn({
330
- * sender: 'SENDERADDRESS',
331
- * assetId: 123456n,
332
- * lease: 'lease',
333
- * note: 'note',
334
- * // You wouldn't normally set this field
335
- * firstValidRound: 1000n,
336
- * validityWindow: 10,
337
- * extraFee: (1000).microAlgo(),
338
- * staticFee: (1000).microAlgo(),
339
- * // Max fee doesn't make sense with extraFee AND staticFee
340
- * // already specified, but here for completeness
341
- * maxFee: (3000).microAlgo(),
342
- * // Signer only needed if you want to provide one,
343
- * // generally you'd register it with AlgorandClient
344
- * // against the sender and not need to pass it in
345
- * signer: transactionSigner,
346
- * maxRoundsToWaitForConfirmation: 5,
347
- * suppressLog: true,
348
- * })
349
- * ```
350
- * @returns The result of the asset opt-in transaction and the transaction that was sent
351
- */
352
- assetOptIn: (params: CommonTransactionParams & {
353
- assetId: bigint;
354
- } & SendParams) => Promise<SendSingleTransactionResult>;
355
- /**
356
- * Opt an account out of an Algorand Standard Asset.
357
- *
358
- * *Note:* If the account has a balance of the asset,
359
- * it will not be able to opt-out unless `ensureZeroBalance`
360
- * is set to `false` (but then the account will lose the assets).
361
- *
362
- * @param params The parameters for the asset opt-out transaction
363
- *
364
- * @example Basic example (without creator, will be retrieved from algod)
365
- * ```typescript
366
- * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
367
- * ```
368
- * @example Basic example (with creator)
369
- * ```typescript
370
- * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
371
- * ```
372
- * @example Advanced example
373
- * ```typescript
374
- * await algorand.send.assetOptOut({
375
- * sender: 'SENDERADDRESS',
376
- * assetId: 123456n,
377
- * creator: 'CREATORADDRESS',
378
- * ensureZeroBalance: true,
379
- * lease: 'lease',
380
- * note: 'note',
381
- * // You wouldn't normally set this field
382
- * firstValidRound: 1000n,
383
- * validityWindow: 10,
384
- * extraFee: (1000).microAlgo(),
385
- * staticFee: (1000).microAlgo(),
386
- * // Max fee doesn't make sense with extraFee AND staticFee
387
- * // already specified, but here for completeness
388
- * maxFee: (3000).microAlgo(),
389
- * // Signer only needed if you want to provide one,
390
- * // generally you'd register it with AlgorandClient
391
- * // against the sender and not need to pass it in
392
- * signer: transactionSigner,
393
- * maxRoundsToWaitForConfirmation: 5,
394
- * suppressLog: true,
395
- * })
396
- * ```
397
- * @returns The result of the asset opt-out transaction and the transaction that was sent
398
- */
399
- assetOptOut: (params: Omit<AssetOptOutParams, "creator"> & {
400
- /** Optional asset creator account address; if not specified it will be retrieved from algod */creator?: string | Address;
401
- /** Whether or not to check if the account has a zero balance first or not.
9
+ export declare class AlgorandClientTransactionSender {
10
+ private _newGroup;
11
+ private _assetManager;
12
+ private _appManager;
13
+ /**
14
+ * Creates a new `AlgorandClientSender`
15
+ * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
16
+ * @param assetManager An `AssetManager` instance
17
+ * @param appManager An `AppManager` instance
18
+ * @example
19
+ * ```typescript
20
+ * const transactionSender = new AlgorandClientTransactionSender(() => new TransactionComposer(), assetManager, appManager)
21
+ * ```
22
+ */
23
+ constructor(newGroup: () => TransactionComposer, assetManager: AssetManager, appManager: AppManager);
24
+ /**
25
+ * Start a new `TransactionComposer` transaction group
26
+ * @returns A new instance of `TransactionComposer`.
27
+ * @example
28
+ * const composer = AlgorandClient.mainNet().send.newGroup();
29
+ * const result = await composer.addTransaction(payment).send()
30
+ */
31
+ newGroup(): TransactionComposer;
32
+ private _send;
33
+ private _sendAppCall;
34
+ private _sendAppUpdateCall;
35
+ private _sendAppCreateCall;
36
+ /**
37
+ * Send a payment transaction to transfer Algo between accounts.
38
+ * @param params The parameters for the payment transaction
39
+ * @example Basic example
40
+ * ```typescript
41
+ * const result = await algorand.send.payment({
42
+ * sender: 'SENDERADDRESS',
43
+ * receiver: 'RECEIVERADDRESS',
44
+ * amount: (4).algo(),
45
+ * })
46
+ * ```
47
+ * @example Advanced example
48
+ * ```typescript
49
+ * const result = await algorand.send.payment({
50
+ * amount: (4).algo(),
51
+ * receiver: 'RECEIVERADDRESS',
52
+ * sender: 'SENDERADDRESS',
53
+ * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
54
+ * lease: 'lease',
55
+ * note: 'note',
56
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
57
+ * rekeyTo: 'REKEYTOADDRESS',
58
+ * // You wouldn't normally set this field
59
+ * firstValidRound: 1000n,
60
+ * validityWindow: 10,
61
+ * extraFee: (1000).microAlgo(),
62
+ * staticFee: (1000).microAlgo(),
63
+ * // Max fee doesn't make sense with extraFee AND staticFee
64
+ * // already specified, but here for completeness
65
+ * maxFee: (3000).microAlgo(),
66
+ * // Signer only needed if you want to provide one,
67
+ * // generally you'd register it with AlgorandClient
68
+ * // against the sender and not need to pass it in
69
+ * signer: transactionSigner,
70
+ * maxRoundsToWaitForConfirmation: 5,
71
+ * suppressLog: true,
72
+ * })
73
+ * ```
74
+ * @returns The result of the payment transaction and the transaction that was sent
75
+ */
76
+ payment: (params: import("./composer").CommonTransactionParams & {
77
+ receiver: string | Address;
78
+ amount: import("./amount").AlgoAmount;
79
+ closeRemainderTo?: string | Address;
80
+ } & SendParams) => Promise<SendSingleTransactionResult>;
81
+ /**
82
+ * Create a new Algorand Standard Asset.
83
+ *
84
+ * The account that sends this transaction will automatically be
85
+ * opted in to the asset and will hold all units after creation.
86
+ *
87
+ * @param params The parameters for the asset creation transaction
88
+ *
89
+ * @example Basic example
90
+ * ```typescript
91
+ * await algorand.send.assetCreate({ sender: "CREATORADDRESS", total: 100n})
92
+ * ```
93
+ * @example Advanced example
94
+ * ```typescript
95
+ * await algorand.send.assetCreate({
96
+ * sender: 'CREATORADDRESS',
97
+ * total: 100n,
98
+ * decimals: 2,
99
+ * assetName: 'asset',
100
+ * unitName: 'unit',
101
+ * url: 'url',
102
+ * metadataHash: 'metadataHash',
103
+ * defaultFrozen: false,
104
+ * manager: 'MANAGERADDRESS',
105
+ * reserve: 'RESERVEADDRESS',
106
+ * freeze: 'FREEZEADDRESS',
107
+ * clawback: 'CLAWBACKADDRESS',
108
+ * lease: 'lease',
109
+ * note: 'note',
110
+ * // You wouldn't normally set this field
111
+ * firstValidRound: 1000n,
112
+ * validityWindow: 10,
113
+ * extraFee: (1000).microAlgo(),
114
+ * staticFee: (1000).microAlgo(),
115
+ * // Max fee doesn't make sense with extraFee AND staticFee
116
+ * // already specified, but here for completeness
117
+ * maxFee: (3000).microAlgo(),
118
+ * // Signer only needed if you want to provide one,
119
+ * // generally you'd register it with AlgorandClient
120
+ * // against the sender and not need to pass it in
121
+ * signer: transactionSigner,
122
+ * maxRoundsToWaitForConfirmation: 5,
123
+ * suppressLog: true,
124
+ * })
125
+ * ```
126
+ * @returns The result of the asset create transaction and the transaction that was sent
127
+ */
128
+ assetCreate: (params: AssetCreateParams & SendParams) => Promise<{
129
+ assetId: bigint;
130
+ groupId: string;
131
+ txIds: string[];
132
+ returns?: import("./app").ABIReturn[] | undefined;
133
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
134
+ transactions: Transaction[];
135
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
136
+ transaction: Transaction;
137
+ }>;
138
+ /**
139
+ * Configure an existing Algorand Standard Asset.
140
+ *
141
+ * **Note:** The manager, reserve, freeze, and clawback addresses
142
+ * are immutably empty if they are not set. If manager is not set then
143
+ * all fields are immutable from that point forward.
144
+ *
145
+ * @param params The parameters for the asset config transaction
146
+ *
147
+ * @example Basic example
148
+ * ```typescript
149
+ * await algorand.send.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
150
+ * ```
151
+ * @example Advanced example
152
+ * ```typescript
153
+ * await algorand.send.assetConfig({
154
+ * sender: 'MANAGERADDRESS',
155
+ * assetId: 123456n,
156
+ * manager: 'MANAGERADDRESS',
157
+ * reserve: 'RESERVEADDRESS',
158
+ * freeze: 'FREEZEADDRESS',
159
+ * clawback: 'CLAWBACKADDRESS',
160
+ * lease: 'lease',
161
+ * note: 'note',
162
+ * // You wouldn't normally set this field
163
+ * firstValidRound: 1000n,
164
+ * validityWindow: 10,
165
+ * extraFee: (1000).microAlgo(),
166
+ * staticFee: (1000).microAlgo(),
167
+ * // Max fee doesn't make sense with extraFee AND staticFee
168
+ * // already specified, but here for completeness
169
+ * maxFee: (3000).microAlgo(),
170
+ * // Signer only needed if you want to provide one,
171
+ * // generally you'd register it with AlgorandClient
172
+ * // against the sender and not need to pass it in
173
+ * signer: transactionSigner,
174
+ * maxRoundsToWaitForConfirmation: 5,
175
+ * suppressLog: true,
176
+ * })
177
+ * ```
178
+ * @returns The result of the asset config transaction and the transaction that was sent
179
+ */
180
+ assetConfig: (params: import("./composer").CommonTransactionParams & {
181
+ assetId: bigint;
182
+ manager: string | Address | undefined;
183
+ reserve?: string | Address;
184
+ freeze?: string | Address;
185
+ clawback?: string | Address;
186
+ } & SendParams) => Promise<SendSingleTransactionResult>;
187
+ /**
188
+ * Freeze or unfreeze an Algorand Standard Asset for an account.
189
+ *
190
+ * @param params The parameters for the asset freeze transaction
191
+ *
192
+ * @example Basic example
193
+ * ```typescript
194
+ * await algorand.send.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
195
+ * ```
196
+ * @example Advanced example
197
+ * ```typescript
198
+ * await algorand.send.assetFreeze({
199
+ * sender: 'MANAGERADDRESS',
200
+ * assetId: 123456n,
201
+ * account: 'ACCOUNTADDRESS',
202
+ * frozen: true,
203
+ * lease: 'lease',
204
+ * note: 'note',
205
+ * // You wouldn't normally set this field
206
+ * firstValidRound: 1000n,
207
+ * validityWindow: 10,
208
+ * extraFee: (1000).microAlgo(),
209
+ * staticFee: (1000).microAlgo(),
210
+ * // Max fee doesn't make sense with extraFee AND staticFee
211
+ * // already specified, but here for completeness
212
+ * maxFee: (3000).microAlgo(),
213
+ * // Signer only needed if you want to provide one,
214
+ * // generally you'd register it with AlgorandClient
215
+ * // against the sender and not need to pass it in
216
+ * signer: transactionSigner,
217
+ * maxRoundsToWaitForConfirmation: 5,
218
+ * suppressLog: true,
219
+ * })
220
+ * ```
221
+ * @returns The result of the asset freeze transaction and the transaction that was sent
222
+ */
223
+ assetFreeze: (params: import("./composer").CommonTransactionParams & {
224
+ assetId: bigint;
225
+ account: string | Address;
226
+ frozen: boolean;
227
+ } & SendParams) => Promise<SendSingleTransactionResult>;
228
+ /**
229
+ * Destroys an Algorand Standard Asset.
230
+ *
231
+ * Created assets can be destroyed only by the asset manager account.
232
+ * All of the assets must be owned by the creator of the asset before
233
+ * the asset can be deleted.
402
234
  *
403
- * If this is set to `true` and the account has an asset balance it will throw an error.
235
+ * @param params The parameters for the asset destroy transaction
236
+ *
237
+ * @example Basic example
238
+ * ```typescript
239
+ * await algorand.send.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
240
+ * ```
241
+ * @example Advanced example
242
+ * ```typescript
243
+ * await algorand.send.assetDestroy({
244
+ * sender: 'MANAGERADDRESS',
245
+ * assetId: 123456n,
246
+ * lease: 'lease',
247
+ * note: 'note',
248
+ * // You wouldn't normally set this field
249
+ * firstValidRound: 1000n,
250
+ * validityWindow: 10,
251
+ * extraFee: (1000).microAlgo(),
252
+ * staticFee: (1000).microAlgo(),
253
+ * // Max fee doesn't make sense with extraFee AND staticFee
254
+ * // already specified, but here for completeness
255
+ * maxFee: (3000).microAlgo(),
256
+ * // Signer only needed if you want to provide one,
257
+ * // generally you'd register it with AlgorandClient
258
+ * // against the sender and not need to pass it in
259
+ * signer: transactionSigner,
260
+ * maxRoundsToWaitForConfirmation: 5,
261
+ * suppressLog: true,
262
+ * })
263
+ * ```
264
+ * @returns The result of the asset destroy transaction and the transaction that was sent
265
+ */
266
+ assetDestroy: (params: import("./composer").CommonTransactionParams & {
267
+ assetId: bigint;
268
+ } & SendParams) => Promise<SendSingleTransactionResult>;
269
+ /**
270
+ * Transfer an Algorand Standard Asset.
271
+ *
272
+ * @param params The parameters for the asset transfer transaction
273
+ *
274
+ * @example Basic example
275
+ * ```typescript
276
+ * await algorand.send.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
277
+ * ```
278
+ * @example Advanced example (with clawback)
279
+ * ```typescript
280
+ * await algorand.send.assetTransfer({
281
+ * sender: 'CLAWBACKADDRESS',
282
+ * assetId: 123456n,
283
+ * amount: 1n,
284
+ * receiver: 'RECEIVERADDRESS',
285
+ * clawbackTarget: 'HOLDERADDRESS',
286
+ * // This field needs to be used with caution
287
+ * closeAssetTo: 'ADDRESSTOCLOSETO'
288
+ * lease: 'lease',
289
+ * note: 'note',
290
+ * // You wouldn't normally set this field
291
+ * firstValidRound: 1000n,
292
+ * validityWindow: 10,
293
+ * extraFee: (1000).microAlgo(),
294
+ * staticFee: (1000).microAlgo(),
295
+ * // Max fee doesn't make sense with extraFee AND staticFee
296
+ * // already specified, but here for completeness
297
+ * maxFee: (3000).microAlgo(),
298
+ * // Signer only needed if you want to provide one,
299
+ * // generally you'd register it with AlgorandClient
300
+ * // against the sender and not need to pass it in
301
+ * signer: transactionSigner,
302
+ * maxRoundsToWaitForConfirmation: 5,
303
+ * suppressLog: true,
304
+ * })
305
+ * ```
306
+ * @returns The result of the asset transfer transaction and the transaction that was sent
307
+ */
308
+ assetTransfer: (params: import("./composer").CommonTransactionParams & {
309
+ assetId: bigint;
310
+ amount: bigint;
311
+ receiver: string | Address;
312
+ clawbackTarget?: string | Address;
313
+ closeAssetTo?: string | Address;
314
+ } & SendParams) => Promise<SendSingleTransactionResult>;
315
+ /**
316
+ * Opt an account into an Algorand Standard Asset.
404
317
  *
405
- * If this is set to `false` and the account has an asset balance it will lose those assets to the asset creator.
318
+ * @param params The parameters for the asset opt-in transaction
319
+ *
320
+ * @example Basic example
321
+ * ```typescript
322
+ * await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
323
+ * ```
324
+ * @example Advanced example
325
+ * ```typescript
326
+ * await algorand.send.assetOptIn({
327
+ * sender: 'SENDERADDRESS',
328
+ * assetId: 123456n,
329
+ * lease: 'lease',
330
+ * note: 'note',
331
+ * // You wouldn't normally set this field
332
+ * firstValidRound: 1000n,
333
+ * validityWindow: 10,
334
+ * extraFee: (1000).microAlgo(),
335
+ * staticFee: (1000).microAlgo(),
336
+ * // Max fee doesn't make sense with extraFee AND staticFee
337
+ * // already specified, but here for completeness
338
+ * maxFee: (3000).microAlgo(),
339
+ * // Signer only needed if you want to provide one,
340
+ * // generally you'd register it with AlgorandClient
341
+ * // against the sender and not need to pass it in
342
+ * signer: transactionSigner,
343
+ * maxRoundsToWaitForConfirmation: 5,
344
+ * suppressLog: true,
345
+ * })
346
+ * ```
347
+ * @returns The result of the asset opt-in transaction and the transaction that was sent
348
+ */
349
+ assetOptIn: (params: import("./composer").CommonTransactionParams & {
350
+ assetId: bigint;
351
+ } & SendParams) => Promise<SendSingleTransactionResult>;
352
+ /**
353
+ * Opt an account out of an Algorand Standard Asset.
354
+ *
355
+ * *Note:* If the account has a balance of the asset,
356
+ * it will not be able to opt-out unless `ensureZeroBalance`
357
+ * is set to `false` (but then the account will lose the assets).
358
+ *
359
+ * @param params The parameters for the asset opt-out transaction
360
+ *
361
+ * @example Basic example (without creator, will be retrieved from algod)
362
+ * ```typescript
363
+ * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
364
+ * ```
365
+ * @example Basic example (with creator)
366
+ * ```typescript
367
+ * await algorand.send.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
368
+ * ```
369
+ * @example Advanced example
370
+ * ```typescript
371
+ * await algorand.send.assetOptOut({
372
+ * sender: 'SENDERADDRESS',
373
+ * assetId: 123456n,
374
+ * creator: 'CREATORADDRESS',
375
+ * ensureZeroBalance: true,
376
+ * lease: 'lease',
377
+ * note: 'note',
378
+ * // You wouldn't normally set this field
379
+ * firstValidRound: 1000n,
380
+ * validityWindow: 10,
381
+ * extraFee: (1000).microAlgo(),
382
+ * staticFee: (1000).microAlgo(),
383
+ * // Max fee doesn't make sense with extraFee AND staticFee
384
+ * // already specified, but here for completeness
385
+ * maxFee: (3000).microAlgo(),
386
+ * // Signer only needed if you want to provide one,
387
+ * // generally you'd register it with AlgorandClient
388
+ * // against the sender and not need to pass it in
389
+ * signer: transactionSigner,
390
+ * maxRoundsToWaitForConfirmation: 5,
391
+ * suppressLog: true,
392
+ * })
393
+ * ```
394
+ * @returns The result of the asset opt-out transaction and the transaction that was sent
395
+ */
396
+ assetOptOut: (params: Omit<AssetOptOutParams, "creator"> & {
397
+ /** Optional asset creator account address; if not specified it will be retrieved from algod */
398
+ creator?: string | Address;
399
+ /** Whether or not to check if the account has a zero balance first or not.
400
+ *
401
+ * If this is set to `true` and the account has an asset balance it will throw an error.
402
+ *
403
+ * If this is set to `false` and the account has an asset balance it will lose those assets to the asset creator.
404
+ */
405
+ ensureZeroBalance: boolean;
406
+ } & SendParams) => Promise<{
407
+ groupId: string;
408
+ txIds: string[];
409
+ returns?: import("./app").ABIReturn[] | undefined;
410
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
411
+ transactions: Transaction[];
412
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
413
+ transaction: Transaction;
414
+ }>;
415
+ /**
416
+ * Create a smart contract.
417
+ *
418
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
419
+ *
420
+ * @param params The parameters for the app creation transaction
421
+ * @example Basic example
422
+ * ```typescript
423
+ * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
424
+ * const createdAppId = result.appId
425
+ * ```
426
+ * @example Advanced example
427
+ * ```typescript
428
+ * await algorand.send.appCreate({
429
+ * sender: 'CREATORADDRESS',
430
+ * approvalProgram: "TEALCODE",
431
+ * clearStateProgram: "TEALCODE",
432
+ * schema: {
433
+ * globalInts: 1,
434
+ * globalByteSlices: 2,
435
+ * localInts: 3,
436
+ * localByteSlices: 4
437
+ * },
438
+ * extraProgramPages: 1,
439
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
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
+ * // Signer only needed if you want to provide one,
458
+ * // generally you'd register it with AlgorandClient
459
+ * // against the sender and not need to pass it in
460
+ * signer: transactionSigner,
461
+ * maxRoundsToWaitForConfirmation: 5,
462
+ * suppressLog: true,
463
+ *})
464
+ * ```
465
+ * @returns The result of the app create transaction and the transaction that was sent
466
+ */
467
+ appCreate: (params: {
468
+ sender: string | Address;
469
+ maxFee?: import("./amount").AlgoAmount | undefined;
470
+ note?: (Uint8Array | string) | undefined;
471
+ args?: Uint8Array[] | undefined;
472
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
473
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
474
+ rejectVersion?: number | undefined;
475
+ lease?: (Uint8Array | string) | undefined;
476
+ rekeyTo?: (string | Address) | undefined;
477
+ staticFee?: import("./amount").AlgoAmount | undefined;
478
+ extraFee?: import("./amount").AlgoAmount | undefined;
479
+ validityWindow?: number | bigint | undefined;
480
+ firstValidRound?: bigint | undefined;
481
+ lastValidRound?: bigint | undefined;
482
+ accountReferences?: (string | Address)[] | undefined;
483
+ appReferences?: bigint[] | undefined;
484
+ assetReferences?: bigint[] | undefined;
485
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
486
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
487
+ approvalProgram: string | Uint8Array;
488
+ clearStateProgram: string | Uint8Array;
489
+ schema?: {
490
+ globalInts: number;
491
+ globalByteSlices: number;
492
+ localInts: number;
493
+ localByteSlices: number;
494
+ } | undefined;
495
+ extraProgramPages?: number | undefined;
496
+ } & SendParams) => Promise<SendAppCreateTransactionResult>;
497
+ /**
498
+ * Update a smart contract.
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 update transaction
503
+ * @example Basic example
504
+ * ```typescript
505
+ * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
506
+ * ```
507
+ * @example Advanced example
508
+ * ```typescript
509
+ * await algorand.send.appUpdate({
510
+ * sender: 'CREATORADDRESS',
511
+ * approvalProgram: "TEALCODE",
512
+ * clearStateProgram: "TEALCODE",
513
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
514
+ * args: [new Uint8Array(1, 2, 3, 4)]
515
+ * accountReferences: ["ACCOUNT_1"]
516
+ * appReferences: [123n, 1234n]
517
+ * assetReferences: [12345n]
518
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
519
+ * accessReferences: [{ appId: 1234n }]
520
+ * lease: 'lease',
521
+ * note: 'note',
522
+ * // You wouldn't normally set this field
523
+ * firstValidRound: 1000n,
524
+ * validityWindow: 10,
525
+ * extraFee: (1000).microAlgo(),
526
+ * staticFee: (1000).microAlgo(),
527
+ * // Max fee doesn't make sense with extraFee AND staticFee
528
+ * // already specified, but here for completeness
529
+ * maxFee: (3000).microAlgo(),
530
+ * rejectVersion: 1,
531
+ * // Signer only needed if you want to provide one,
532
+ * // generally you'd register it with AlgorandClient
533
+ * // against the sender and not need to pass it in
534
+ * signer: transactionSigner,
535
+ * maxRoundsToWaitForConfirmation: 5,
536
+ * suppressLog: true,
537
+ *})
538
+ * ```
539
+ * @returns The result of the app update transaction and the transaction that was sent
540
+ */
541
+ appUpdate: (params: {
542
+ sender: string | Address;
543
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
544
+ rekeyTo?: (string | Address) | undefined;
545
+ note?: (Uint8Array | string) | undefined;
546
+ lease?: (Uint8Array | string) | undefined;
547
+ staticFee?: import("./amount").AlgoAmount | undefined;
548
+ extraFee?: import("./amount").AlgoAmount | undefined;
549
+ maxFee?: import("./amount").AlgoAmount | undefined;
550
+ validityWindow?: number | bigint | undefined;
551
+ firstValidRound?: bigint | undefined;
552
+ lastValidRound?: bigint | undefined;
553
+ appId: bigint;
554
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
555
+ args?: Uint8Array[] | undefined;
556
+ accountReferences?: (string | Address)[] | undefined;
557
+ appReferences?: bigint[] | undefined;
558
+ assetReferences?: bigint[] | undefined;
559
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
560
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
561
+ rejectVersion?: number | undefined;
562
+ approvalProgram: string | Uint8Array;
563
+ clearStateProgram: string | Uint8Array;
564
+ } & SendParams) => Promise<SendAppUpdateTransactionResult>;
565
+ /**
566
+ * Delete a smart contract.
567
+ *
568
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
569
+ *
570
+ * @param params The parameters for the app deletion transaction
571
+ * @example Basic example
572
+ * ```typescript
573
+ * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })
574
+ * ```
575
+ * @example Advanced example
576
+ * ```typescript
577
+ * await algorand.send.appDelete({
578
+ * sender: 'CREATORADDRESS',
579
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
580
+ * args: [new Uint8Array(1, 2, 3, 4)]
581
+ * accountReferences: ["ACCOUNT_1"]
582
+ * appReferences: [123n, 1234n]
583
+ * assetReferences: [12345n]
584
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
585
+ * accessReferences: [{ appId: 1234n }]
586
+ * lease: 'lease',
587
+ * note: 'note',
588
+ * // You wouldn't normally set this field
589
+ * firstValidRound: 1000n,
590
+ * validityWindow: 10,
591
+ * extraFee: (1000).microAlgo(),
592
+ * staticFee: (1000).microAlgo(),
593
+ * // Max fee doesn't make sense with extraFee AND staticFee
594
+ * // already specified, but here for completeness
595
+ * maxFee: (3000).microAlgo(),
596
+ * rejectVersion: 1,
597
+ * // Signer only needed if you want to provide one,
598
+ * // generally you'd register it with AlgorandClient
599
+ * // against the sender and not need to pass it in
600
+ * signer: transactionSigner,
601
+ * maxRoundsToWaitForConfirmation: 5,
602
+ * suppressLog: true,
603
+ *})
604
+ * ```
605
+ * @returns The result of the app delete transaction and the transaction that was sent
606
+ */
607
+ appDelete: (params: import("./composer").CommonTransactionParams & {
608
+ appId: bigint;
609
+ onComplete?: algosdk.OnApplicationComplete;
610
+ args?: Uint8Array[];
611
+ accountReferences?: (string | Address)[];
612
+ appReferences?: bigint[];
613
+ assetReferences?: bigint[];
614
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[];
615
+ accessReferences?: import("./app-manager").ResourceReference[];
616
+ rejectVersion?: number;
617
+ } & {
618
+ onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC;
619
+ } & SendParams) => Promise<SendAppTransactionResult>;
620
+ /**
621
+ * Call a smart contract.
622
+ *
623
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
624
+ *
625
+ * @param params The parameters for the app call transaction
626
+ * @example Basic example
627
+ * ```typescript
628
+ * await algorand.send.appCall({ sender: 'CREATORADDRESS' })
629
+ * ```
630
+ * @example Advanced example
631
+ * ```typescript
632
+ * await algorand.send.appCall({
633
+ * sender: 'CREATORADDRESS',
634
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
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
+ * // Signer only needed if you want to provide one,
653
+ * // generally you'd register it with AlgorandClient
654
+ * // against the sender and not need to pass it in
655
+ * signer: transactionSigner,
656
+ * maxRoundsToWaitForConfirmation: 5,
657
+ * suppressLog: true,
658
+ *})
659
+ * ```
660
+ * @returns The result of the app call transaction and the transaction that was sent
661
+ */
662
+ appCall: (params: import("./composer").CommonTransactionParams & {
663
+ appId: bigint;
664
+ onComplete?: algosdk.OnApplicationComplete;
665
+ args?: Uint8Array[];
666
+ accountReferences?: (string | Address)[];
667
+ appReferences?: bigint[];
668
+ assetReferences?: bigint[];
669
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[];
670
+ accessReferences?: import("./app-manager").ResourceReference[];
671
+ rejectVersion?: number;
672
+ } & {
673
+ onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC>;
674
+ } & SendParams) => Promise<SendAppTransactionResult>;
675
+ /**
676
+ * Create a smart contract via an ABI method.
677
+ *
678
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
679
+ *
680
+ * @param params The parameters for the app creation transaction
681
+ * @example Basic example
682
+ * ```typescript
683
+ * const method = new ABIMethod({
684
+ * name: 'method',
685
+ * args: [{ name: 'arg1', type: 'string' }],
686
+ * returns: { type: 'string' },
687
+ * })
688
+ * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
689
+ * const createdAppId = result.appId
690
+ * ```
691
+ * @example Advanced example
692
+ * ```typescript
693
+ * const method = new ABIMethod({
694
+ * name: 'method',
695
+ * args: [{ name: 'arg1', type: 'string' }],
696
+ * returns: { type: 'string' },
697
+ * })
698
+ * await algorand.send.appCreateMethodCall({
699
+ * sender: 'CREATORADDRESS',
700
+ * method: method,
701
+ * args: ["arg1_value"],
702
+ * approvalProgram: "TEALCODE",
703
+ * clearStateProgram: "TEALCODE",
704
+ * schema: {
705
+ * globalInts: 1,
706
+ * globalByteSlices: 2,
707
+ * localInts: 3,
708
+ * localByteSlices: 4
709
+ * },
710
+ * extraProgramPages: 1,
711
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
712
+ * args: [new Uint8Array(1, 2, 3, 4)]
713
+ * accountReferences: ["ACCOUNT_1"]
714
+ * appReferences: [123n, 1234n]
715
+ * assetReferences: [12345n]
716
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
717
+ * accessReferences: [{ appId: 1234n }]
718
+ * lease: 'lease',
719
+ * note: 'note',
720
+ * // You wouldn't normally set this field
721
+ * firstValidRound: 1000n,
722
+ * validityWindow: 10,
723
+ * extraFee: (1000).microAlgo(),
724
+ * staticFee: (1000).microAlgo(),
725
+ * // Max fee doesn't make sense with extraFee AND staticFee
726
+ * // already specified, but here for completeness
727
+ * maxFee: (3000).microAlgo(),
728
+ * rejectVersion: 1,
729
+ * // Signer only needed if you want to provide one,
730
+ * // generally you'd register it with AlgorandClient
731
+ * // against the sender and not need to pass it in
732
+ * signer: transactionSigner,
733
+ * maxRoundsToWaitForConfirmation: 5,
734
+ * suppressLog: true,
735
+ *})
736
+ * ```
737
+ * @returns The result of the application ABI method create transaction and the transaction that was sent
738
+ */
739
+ appCreateMethodCall: (params: {
740
+ sender: string | Address;
741
+ maxFee?: import("./amount").AlgoAmount | undefined;
742
+ approvalProgram: string | Uint8Array;
743
+ clearStateProgram: string | Uint8Array;
744
+ note?: (Uint8Array | string) | undefined;
745
+ schema?: {
746
+ globalInts: number;
747
+ globalByteSlices: number;
748
+ localInts: number;
749
+ localByteSlices: number;
750
+ } | undefined;
751
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
752
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
753
+ rejectVersion?: number | undefined;
754
+ lease?: (Uint8Array | string) | undefined;
755
+ rekeyTo?: (string | Address) | undefined;
756
+ extraProgramPages?: number | undefined;
757
+ staticFee?: import("./amount").AlgoAmount | undefined;
758
+ extraFee?: import("./amount").AlgoAmount | undefined;
759
+ validityWindow?: number | bigint | undefined;
760
+ firstValidRound?: bigint | undefined;
761
+ lastValidRound?: bigint | undefined;
762
+ accountReferences?: (string | Address)[] | undefined;
763
+ appReferences?: bigint[] | undefined;
764
+ assetReferences?: bigint[] | undefined;
765
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
766
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
767
+ } & {
768
+ method: algosdk.ABIMethod;
769
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | import("./composer").AppMethodCall<AppCreateParams> | import("./composer").AppMethodCall<AppUpdateParams> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[];
770
+ } & SendParams) => Promise<SendAppCreateTransactionResult>;
771
+ /**
772
+ * Update a smart contract via an ABI method.
773
+ *
774
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
775
+ *
776
+ * @param params The parameters for the app update transaction
777
+ * @example Basic example
778
+ * ```typescript
779
+ * const method = new ABIMethod({
780
+ * name: 'method',
781
+ * args: [{ name: 'arg1', type: 'string' }],
782
+ * returns: { type: 'string' },
783
+ * })
784
+ * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
785
+ * ```
786
+ * @example Advanced example
787
+ * ```typescript
788
+ * const method = new ABIMethod({
789
+ * name: 'method',
790
+ * args: [{ name: 'arg1', type: 'string' }],
791
+ * returns: { type: 'string' },
792
+ * })
793
+ * await algorand.send.appUpdateMethodCall({
794
+ * sender: 'CREATORADDRESS',
795
+ * method: method,
796
+ * args: ["arg1_value"],
797
+ * approvalProgram: "TEALCODE",
798
+ * clearStateProgram: "TEALCODE",
799
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
800
+ * args: [new Uint8Array(1, 2, 3, 4)]
801
+ * accountReferences: ["ACCOUNT_1"]
802
+ * appReferences: [123n, 1234n]
803
+ * assetReferences: [12345n]
804
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
805
+ * accessReferences: [{ appId: 1234n }]
806
+ * lease: 'lease',
807
+ * note: 'note',
808
+ * // You wouldn't normally set this field
809
+ * firstValidRound: 1000n,
810
+ * validityWindow: 10,
811
+ * extraFee: (1000).microAlgo(),
812
+ * staticFee: (1000).microAlgo(),
813
+ * // Max fee doesn't make sense with extraFee AND staticFee
814
+ * // already specified, but here for completeness
815
+ * maxFee: (3000).microAlgo(),
816
+ * rejectVersion: 1,
817
+ * // Signer only needed if you want to provide one,
818
+ * // generally you'd register it with AlgorandClient
819
+ * // against the sender and not need to pass it in
820
+ * signer: transactionSigner,
821
+ * maxRoundsToWaitForConfirmation: 5,
822
+ * suppressLog: true,
823
+ *})
824
+ * ```
825
+ * @returns The result of the application ABI method update transaction and the transaction that was sent
826
+ */
827
+ appUpdateMethodCall: (params: {
828
+ sender: string | Address;
829
+ maxFee?: import("./amount").AlgoAmount | undefined;
830
+ approvalProgram: string | Uint8Array;
831
+ clearStateProgram: string | Uint8Array;
832
+ note?: (Uint8Array | string) | undefined;
833
+ appId: bigint;
834
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
835
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
836
+ rejectVersion?: number | undefined;
837
+ lease?: (Uint8Array | string) | undefined;
838
+ rekeyTo?: (string | Address) | undefined;
839
+ staticFee?: import("./amount").AlgoAmount | undefined;
840
+ extraFee?: import("./amount").AlgoAmount | undefined;
841
+ validityWindow?: number | bigint | undefined;
842
+ firstValidRound?: bigint | undefined;
843
+ lastValidRound?: bigint | undefined;
844
+ accountReferences?: (string | Address)[] | undefined;
845
+ appReferences?: bigint[] | undefined;
846
+ assetReferences?: bigint[] | undefined;
847
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
848
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
849
+ } & {
850
+ method: algosdk.ABIMethod;
851
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | import("./composer").AppMethodCall<AppCreateParams> | import("./composer").AppMethodCall<AppUpdateParams> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[];
852
+ } & SendParams) => Promise<SendAppUpdateTransactionResult>;
853
+ /**
854
+ * Delete a smart contract via an ABI method.
855
+ *
856
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
857
+ *
858
+ * @param params The parameters for the app deletion transaction
859
+ * @example Basic example
860
+ * ```typescript
861
+ * const method = new ABIMethod({
862
+ * name: 'method',
863
+ * args: [{ name: 'arg1', type: 'string' }],
864
+ * returns: { type: 'string' },
865
+ * })
866
+ * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
867
+ * ```
868
+ * @example Advanced example
869
+ * ```typescript
870
+ * const method = new ABIMethod({
871
+ * name: 'method',
872
+ * args: [{ name: 'arg1', type: 'string' }],
873
+ * returns: { type: 'string' },
874
+ * })
875
+ * await algorand.send.appDeleteMethodCall({
876
+ * sender: 'CREATORADDRESS',
877
+ * method: method,
878
+ * args: ["arg1_value"],
879
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
880
+ * args: [new Uint8Array(1, 2, 3, 4)]
881
+ * accountReferences: ["ACCOUNT_1"]
882
+ * appReferences: [123n, 1234n]
883
+ * assetReferences: [12345n]
884
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
885
+ * accessReferences: [{ appId: 1234n }]
886
+ * lease: 'lease',
887
+ * note: 'note',
888
+ * // You wouldn't normally set this field
889
+ * firstValidRound: 1000n,
890
+ * validityWindow: 10,
891
+ * extraFee: (1000).microAlgo(),
892
+ * staticFee: (1000).microAlgo(),
893
+ * // Max fee doesn't make sense with extraFee AND staticFee
894
+ * // already specified, but here for completeness
895
+ * maxFee: (3000).microAlgo(),
896
+ * rejectVersion: 1,
897
+ * // Signer only needed if you want to provide one,
898
+ * // generally you'd register it with AlgorandClient
899
+ * // against the sender and not need to pass it in
900
+ * signer: transactionSigner,
901
+ * maxRoundsToWaitForConfirmation: 5,
902
+ * suppressLog: true,
903
+ *})
904
+ * ```
905
+ * @returns The result of the application ABI method delete transaction and the transaction that was sent
906
+ */
907
+ appDeleteMethodCall: (params: {
908
+ sender: string | Address;
909
+ maxFee?: import("./amount").AlgoAmount | undefined;
910
+ note?: (Uint8Array | string) | undefined;
911
+ appId: bigint;
912
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
913
+ onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
914
+ rejectVersion?: number | undefined;
915
+ lease?: (Uint8Array | string) | undefined;
916
+ rekeyTo?: (string | Address) | undefined;
917
+ staticFee?: import("./amount").AlgoAmount | undefined;
918
+ extraFee?: import("./amount").AlgoAmount | undefined;
919
+ validityWindow?: number | bigint | undefined;
920
+ firstValidRound?: bigint | undefined;
921
+ lastValidRound?: bigint | undefined;
922
+ accountReferences?: (string | Address)[] | undefined;
923
+ appReferences?: bigint[] | undefined;
924
+ assetReferences?: bigint[] | undefined;
925
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
926
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
927
+ } & {
928
+ method: algosdk.ABIMethod;
929
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | import("./composer").AppMethodCall<AppCreateParams> | import("./composer").AppMethodCall<AppUpdateParams> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[];
930
+ } & SendParams) => Promise<SendAppTransactionResult>;
931
+ /**
932
+ * Call a smart contract via an ABI method.
933
+ *
934
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
935
+ *
936
+ * @param params The parameters for the app call transaction
937
+ * @example Basic example
938
+ * ```typescript
939
+ * const method = new ABIMethod({
940
+ * name: 'method',
941
+ * args: [{ name: 'arg1', type: 'string' }],
942
+ * returns: { type: 'string' },
943
+ * })
944
+ * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
945
+ * ```
946
+ * @example Advanced example
947
+ * ```typescript
948
+ * const method = new ABIMethod({
949
+ * name: 'method',
950
+ * args: [{ name: 'arg1', type: 'string' }],
951
+ * returns: { type: 'string' },
952
+ * })
953
+ * await algorand.send.appCallMethodCall({
954
+ * sender: 'CREATORADDRESS',
955
+ * method: method,
956
+ * args: ["arg1_value"],
957
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
958
+ * args: [new Uint8Array(1, 2, 3, 4)]
959
+ * accountReferences: ["ACCOUNT_1"]
960
+ * appReferences: [123n, 1234n]
961
+ * assetReferences: [12345n]
962
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
963
+ * accessReferences: [{ appId: 1234n }]
964
+ * lease: 'lease',
965
+ * note: 'note',
966
+ * // You wouldn't normally set this field
967
+ * firstValidRound: 1000n,
968
+ * validityWindow: 10,
969
+ * extraFee: (1000).microAlgo(),
970
+ * staticFee: (1000).microAlgo(),
971
+ * // Max fee doesn't make sense with extraFee AND staticFee
972
+ * // already specified, but here for completeness
973
+ * maxFee: (3000).microAlgo(),
974
+ * rejectVersion: 1,
975
+ * // Signer only needed if you want to provide one,
976
+ * // generally you'd register it with AlgorandClient
977
+ * // against the sender and not need to pass it in
978
+ * signer: transactionSigner,
979
+ * maxRoundsToWaitForConfirmation: 5,
980
+ * suppressLog: true,
981
+ *})
982
+ * ```
983
+ * @returns The result of the application ABI method call transaction and the transaction that was sent
984
+ */
985
+ appCallMethodCall: (params: {
986
+ sender: string | Address;
987
+ maxFee?: import("./amount").AlgoAmount | undefined;
988
+ note?: (Uint8Array | string) | undefined;
989
+ appId: bigint;
990
+ signer?: (algosdk.TransactionSigner | import("./account").TransactionSignerAccount) | undefined;
991
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
992
+ rejectVersion?: number | undefined;
993
+ lease?: (Uint8Array | string) | undefined;
994
+ rekeyTo?: (string | Address) | undefined;
995
+ staticFee?: import("./amount").AlgoAmount | undefined;
996
+ extraFee?: import("./amount").AlgoAmount | undefined;
997
+ validityWindow?: number | bigint | undefined;
998
+ firstValidRound?: bigint | undefined;
999
+ lastValidRound?: bigint | undefined;
1000
+ accountReferences?: (string | Address)[] | undefined;
1001
+ appReferences?: bigint[] | undefined;
1002
+ assetReferences?: bigint[] | undefined;
1003
+ boxReferences?: (import("./app-manager").BoxReference | import("./app-manager").BoxIdentifier)[] | undefined;
1004
+ accessReferences?: import("./app-manager").ResourceReference[] | undefined;
1005
+ } & {
1006
+ method: algosdk.ABIMethod;
1007
+ args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | import("./composer").AppMethodCall<AppCreateParams> | import("./composer").AppMethodCall<AppUpdateParams> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[];
1008
+ } & SendParams) => Promise<SendAppTransactionResult>;
1009
+ /**
1010
+ * Register an online key.
1011
+ * @param params The parameters for the key registration transaction
1012
+ * @example Basic example
1013
+ * ```typescript
1014
+ * const result = await algorand.send.onlineKeyRegistration({
1015
+ * sender: 'SENDERADDRESS',
1016
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1017
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1018
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1019
+ * voteFirst: 1n,
1020
+ * voteLast: 1000n,
1021
+ * voteKeyDilution: 1n,
1022
+ * })
1023
+ * ```
1024
+ * @example Advanced example
1025
+ * ```typescript
1026
+ * const result = await algorand.send.onlineKeyRegistration({
1027
+ * sender: 'SENDERADDRESS',
1028
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1029
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1030
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1031
+ * voteFirst: 1n,
1032
+ * voteLast: 1000n,
1033
+ * voteKeyDilution: 1n,
1034
+ * lease: 'lease',
1035
+ * note: 'note',
1036
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1037
+ * rekeyTo: 'REKEYTOADDRESS',
1038
+ * // You wouldn't normally set this field
1039
+ * firstValidRound: 1000n,
1040
+ * validityWindow: 10,
1041
+ * extraFee: (1000).microAlgo(),
1042
+ * staticFee: (1000).microAlgo(),
1043
+ * // Max fee doesn't make sense with extraFee AND staticFee
1044
+ * // already specified, but here for completeness
1045
+ * maxFee: (3000).microAlgo(),
1046
+ * })
1047
+ * ```
1048
+ * @returns The result of the online key registration transaction and the transaction that was sent
1049
+ */
1050
+ onlineKeyRegistration: (params: import("./composer").CommonTransactionParams & {
1051
+ voteKey: Uint8Array;
1052
+ selectionKey: Uint8Array;
1053
+ voteFirst: bigint;
1054
+ voteLast: bigint;
1055
+ voteKeyDilution: bigint;
1056
+ stateProofKey?: Uint8Array;
1057
+ } & SendParams) => Promise<SendSingleTransactionResult>;
1058
+ /**
1059
+ * Register an offline key.
1060
+ * @param params The parameters for the key registration transaction
1061
+ * @example Basic example
1062
+ * ```typescript
1063
+ * const result = await algorand.send.offlineKeyRegistration({
1064
+ * sender: 'SENDERADDRESS',
1065
+ * })
1066
+ * ```
1067
+ * @example Advanced example
1068
+ * ```typescript
1069
+ * const result = await algorand.send.offlineKeyRegistration({
1070
+ * sender: 'SENDERADDRESS',
1071
+ * lease: 'lease',
1072
+ * note: 'note',
1073
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1074
+ * rekeyTo: 'REKEYTOADDRESS',
1075
+ * // You wouldn't normally set this field
1076
+ * firstValidRound: 1000n,
1077
+ * validityWindow: 10,
1078
+ * extraFee: (1000).microAlgo(),
1079
+ * staticFee: (1000).microAlgo(),
1080
+ * // Max fee doesn't make sense with extraFee AND staticFee
1081
+ * // already specified, but here for completeness
1082
+ * maxFee: (3000).microAlgo(),
1083
+ * })
1084
+ * ```
1085
+ * @returns The result of the offline key registration transaction and the transaction that was sent
406
1086
  */
407
- ensureZeroBalance: boolean;
408
- } & SendParams) => Promise<{
409
- groupId: string;
410
- txIds: string[];
411
- returns?: ABIReturn[] | undefined;
412
- confirmations: algosdk.modelsv2.PendingTransactionResponse[];
413
- transactions: Transaction[];
414
- confirmation: algosdk.modelsv2.PendingTransactionResponse;
415
- transaction: Transaction;
416
- }>;
417
- /**
418
- * Create a smart contract.
419
- *
420
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
421
- *
422
- * @param params The parameters for the app creation transaction
423
- * @example Basic example
424
- * ```typescript
425
- * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
426
- * const createdAppId = result.appId
427
- * ```
428
- * @example Advanced example
429
- * ```typescript
430
- * await algorand.send.appCreate({
431
- * sender: 'CREATORADDRESS',
432
- * approvalProgram: "TEALCODE",
433
- * clearStateProgram: "TEALCODE",
434
- * schema: {
435
- * globalInts: 1,
436
- * globalByteSlices: 2,
437
- * localInts: 3,
438
- * localByteSlices: 4
439
- * },
440
- * extraProgramPages: 1,
441
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
442
- * args: [new Uint8Array(1, 2, 3, 4)]
443
- * accountReferences: ["ACCOUNT_1"]
444
- * appReferences: [123n, 1234n]
445
- * assetReferences: [12345n]
446
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
447
- * accessReferences: [{ appId: 1234n }]
448
- * lease: 'lease',
449
- * note: 'note',
450
- * // You wouldn't normally set this field
451
- * firstValidRound: 1000n,
452
- * validityWindow: 10,
453
- * extraFee: (1000).microAlgo(),
454
- * staticFee: (1000).microAlgo(),
455
- * // Max fee doesn't make sense with extraFee AND staticFee
456
- * // already specified, but here for completeness
457
- * maxFee: (3000).microAlgo(),
458
- * rejectVersion: 1,
459
- * // Signer only needed if you want to provide one,
460
- * // generally you'd register it with AlgorandClient
461
- * // against the sender and not need to pass it in
462
- * signer: transactionSigner,
463
- * maxRoundsToWaitForConfirmation: 5,
464
- * suppressLog: true,
465
- *})
466
- * ```
467
- * @returns The result of the app create transaction and the transaction that was sent
468
- */
469
- appCreate: (params: {
470
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
471
- sender: string | Address;
472
- rekeyTo?: (string | Address) | undefined;
473
- note?: (Uint8Array | string) | undefined;
474
- lease?: (Uint8Array | string) | undefined;
475
- staticFee?: AlgoAmount | undefined;
476
- extraFee?: AlgoAmount | undefined;
477
- maxFee?: AlgoAmount | undefined;
478
- validityWindow?: number | bigint | undefined;
479
- firstValidRound?: bigint | undefined;
480
- lastValidRound?: bigint | undefined;
481
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
482
- args?: Uint8Array[] | undefined;
483
- accountReferences?: (string | Address)[] | undefined;
484
- appReferences?: bigint[] | undefined;
485
- assetReferences?: bigint[] | undefined;
486
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
487
- accessReferences?: ResourceReference[] | undefined;
488
- rejectVersion?: number | undefined;
489
- approvalProgram: string | Uint8Array;
490
- clearStateProgram: string | Uint8Array;
491
- schema?: {
492
- globalInts: number;
493
- globalByteSlices: number;
494
- localInts: number;
495
- localByteSlices: number;
496
- } | undefined;
497
- extraProgramPages?: number | undefined;
498
- } & SendParams) => Promise<SendAppCreateTransactionResult>;
499
- /**
500
- * Update a smart contract.
501
- *
502
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
503
- *
504
- * @param params The parameters for the app update transaction
505
- * @example Basic example
506
- * ```typescript
507
- * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
508
- * ```
509
- * @example Advanced example
510
- * ```typescript
511
- * await algorand.send.appUpdate({
512
- * sender: 'CREATORADDRESS',
513
- * approvalProgram: "TEALCODE",
514
- * clearStateProgram: "TEALCODE",
515
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
516
- * args: [new Uint8Array(1, 2, 3, 4)]
517
- * accountReferences: ["ACCOUNT_1"]
518
- * appReferences: [123n, 1234n]
519
- * assetReferences: [12345n]
520
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
521
- * accessReferences: [{ appId: 1234n }]
522
- * lease: 'lease',
523
- * note: 'note',
524
- * // You wouldn't normally set this field
525
- * firstValidRound: 1000n,
526
- * validityWindow: 10,
527
- * extraFee: (1000).microAlgo(),
528
- * staticFee: (1000).microAlgo(),
529
- * // Max fee doesn't make sense with extraFee AND staticFee
530
- * // already specified, but here for completeness
531
- * maxFee: (3000).microAlgo(),
532
- * rejectVersion: 1,
533
- * // Signer only needed if you want to provide one,
534
- * // generally you'd register it with AlgorandClient
535
- * // against the sender and not need to pass it in
536
- * signer: transactionSigner,
537
- * maxRoundsToWaitForConfirmation: 5,
538
- * suppressLog: true,
539
- *})
540
- * ```
541
- * @returns The result of the app update transaction and the transaction that was sent
542
- */
543
- appUpdate: (params: {
544
- sender: string | Address;
545
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
546
- rekeyTo?: (string | Address) | undefined;
547
- note?: (Uint8Array | string) | undefined;
548
- lease?: (Uint8Array | string) | undefined;
549
- staticFee?: AlgoAmount | undefined;
550
- extraFee?: AlgoAmount | undefined;
551
- maxFee?: AlgoAmount | undefined;
552
- validityWindow?: number | bigint | undefined;
553
- firstValidRound?: bigint | undefined;
554
- lastValidRound?: bigint | undefined;
555
- appId: bigint;
556
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
557
- args?: Uint8Array[] | undefined;
558
- accountReferences?: (string | Address)[] | undefined;
559
- appReferences?: bigint[] | undefined;
560
- assetReferences?: bigint[] | undefined;
561
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
562
- accessReferences?: ResourceReference[] | undefined;
563
- rejectVersion?: number | undefined;
564
- approvalProgram: string | Uint8Array;
565
- clearStateProgram: string | Uint8Array;
566
- } & SendParams) => Promise<SendAppUpdateTransactionResult>;
567
- /**
568
- * Delete a smart contract.
569
- *
570
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
571
- *
572
- * @param params The parameters for the app deletion transaction
573
- * @example Basic example
574
- * ```typescript
575
- * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })
576
- * ```
577
- * @example Advanced example
578
- * ```typescript
579
- * await algorand.send.appDelete({
580
- * sender: 'CREATORADDRESS',
581
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
582
- * args: [new Uint8Array(1, 2, 3, 4)]
583
- * accountReferences: ["ACCOUNT_1"]
584
- * appReferences: [123n, 1234n]
585
- * assetReferences: [12345n]
586
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
587
- * accessReferences: [{ appId: 1234n }]
588
- * lease: 'lease',
589
- * note: 'note',
590
- * // You wouldn't normally set this field
591
- * firstValidRound: 1000n,
592
- * validityWindow: 10,
593
- * extraFee: (1000).microAlgo(),
594
- * staticFee: (1000).microAlgo(),
595
- * // Max fee doesn't make sense with extraFee AND staticFee
596
- * // already specified, but here for completeness
597
- * maxFee: (3000).microAlgo(),
598
- * rejectVersion: 1,
599
- * // Signer only needed if you want to provide one,
600
- * // generally you'd register it with AlgorandClient
601
- * // against the sender and not need to pass it in
602
- * signer: transactionSigner,
603
- * maxRoundsToWaitForConfirmation: 5,
604
- * suppressLog: true,
605
- *})
606
- * ```
607
- * @returns The result of the app delete transaction and the transaction that was sent
608
- */
609
- appDelete: (params: CommonTransactionParams & {
610
- appId: bigint;
611
- onComplete?: algosdk.OnApplicationComplete;
612
- args?: Uint8Array[];
613
- accountReferences?: (string | Address)[];
614
- appReferences?: bigint[];
615
- assetReferences?: bigint[];
616
- boxReferences?: (BoxReference | BoxIdentifier)[];
617
- accessReferences?: ResourceReference[];
618
- rejectVersion?: number;
619
- } & {
620
- onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC;
621
- } & SendParams) => Promise<SendAppTransactionResult>;
622
- /**
623
- * Call a smart contract.
624
- *
625
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
626
- *
627
- * @param params The parameters for the app call transaction
628
- * @example Basic example
629
- * ```typescript
630
- * await algorand.send.appCall({ sender: 'CREATORADDRESS' })
631
- * ```
632
- * @example Advanced example
633
- * ```typescript
634
- * await algorand.send.appCall({
635
- * sender: 'CREATORADDRESS',
636
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
637
- * args: [new Uint8Array(1, 2, 3, 4)]
638
- * accountReferences: ["ACCOUNT_1"]
639
- * appReferences: [123n, 1234n]
640
- * assetReferences: [12345n]
641
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
642
- * accessReferences: [{ appId: 1234n }]
643
- * lease: 'lease',
644
- * note: 'note',
645
- * // You wouldn't normally set this field
646
- * firstValidRound: 1000n,
647
- * validityWindow: 10,
648
- * extraFee: (1000).microAlgo(),
649
- * staticFee: (1000).microAlgo(),
650
- * // Max fee doesn't make sense with extraFee AND staticFee
651
- * // already specified, but here for completeness
652
- * maxFee: (3000).microAlgo(),
653
- * rejectVersion: 1,
654
- * // Signer only needed if you want to provide one,
655
- * // generally you'd register it with AlgorandClient
656
- * // against the sender and not need to pass it in
657
- * signer: transactionSigner,
658
- * maxRoundsToWaitForConfirmation: 5,
659
- * suppressLog: true,
660
- *})
661
- * ```
662
- * @returns The result of the app call transaction and the transaction that was sent
663
- */
664
- appCall: (params: CommonTransactionParams & {
665
- appId: bigint;
666
- onComplete?: algosdk.OnApplicationComplete;
667
- args?: Uint8Array[];
668
- accountReferences?: (string | Address)[];
669
- appReferences?: bigint[];
670
- assetReferences?: bigint[];
671
- boxReferences?: (BoxReference | BoxIdentifier)[];
672
- accessReferences?: ResourceReference[];
673
- rejectVersion?: number;
674
- } & {
675
- onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC>;
676
- } & SendParams) => Promise<SendAppTransactionResult>;
677
- /**
678
- * Create a smart contract via an ABI method.
679
- *
680
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
681
- *
682
- * @param params The parameters for the app creation transaction
683
- * @example Basic example
684
- * ```typescript
685
- * const method = new ABIMethod({
686
- * name: 'method',
687
- * args: [{ name: 'arg1', type: 'string' }],
688
- * returns: { type: 'string' },
689
- * })
690
- * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
691
- * const createdAppId = result.appId
692
- * ```
693
- * @example Advanced example
694
- * ```typescript
695
- * const method = new ABIMethod({
696
- * name: 'method',
697
- * args: [{ name: 'arg1', type: 'string' }],
698
- * returns: { type: 'string' },
699
- * })
700
- * await algorand.send.appCreateMethodCall({
701
- * sender: 'CREATORADDRESS',
702
- * method: method,
703
- * args: ["arg1_value"],
704
- * approvalProgram: "TEALCODE",
705
- * clearStateProgram: "TEALCODE",
706
- * schema: {
707
- * globalInts: 1,
708
- * globalByteSlices: 2,
709
- * localInts: 3,
710
- * localByteSlices: 4
711
- * },
712
- * extraProgramPages: 1,
713
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
714
- * args: [new Uint8Array(1, 2, 3, 4)]
715
- * accountReferences: ["ACCOUNT_1"]
716
- * appReferences: [123n, 1234n]
717
- * assetReferences: [12345n]
718
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
719
- * accessReferences: [{ appId: 1234n }]
720
- * lease: 'lease',
721
- * note: 'note',
722
- * // You wouldn't normally set this field
723
- * firstValidRound: 1000n,
724
- * validityWindow: 10,
725
- * extraFee: (1000).microAlgo(),
726
- * staticFee: (1000).microAlgo(),
727
- * // Max fee doesn't make sense with extraFee AND staticFee
728
- * // already specified, but here for completeness
729
- * maxFee: (3000).microAlgo(),
730
- * rejectVersion: 1,
731
- * // Signer only needed if you want to provide one,
732
- * // generally you'd register it with AlgorandClient
733
- * // against the sender and not need to pass it in
734
- * signer: transactionSigner,
735
- * maxRoundsToWaitForConfirmation: 5,
736
- * suppressLog: true,
737
- *})
738
- * ```
739
- * @returns The result of the application ABI method create transaction and the transaction that was sent
740
- */
741
- appCreateMethodCall: (params: {
742
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
743
- sender: string | Address;
744
- rekeyTo?: (string | Address) | undefined;
745
- note?: (Uint8Array | string) | undefined;
746
- lease?: (Uint8Array | string) | undefined;
747
- staticFee?: AlgoAmount | undefined;
748
- extraFee?: AlgoAmount | undefined;
749
- maxFee?: AlgoAmount | undefined;
750
- validityWindow?: number | bigint | undefined;
751
- firstValidRound?: bigint | undefined;
752
- lastValidRound?: bigint | undefined;
753
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
754
- accountReferences?: (string | Address)[] | undefined;
755
- appReferences?: bigint[] | undefined;
756
- assetReferences?: bigint[] | undefined;
757
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
758
- accessReferences?: ResourceReference[] | undefined;
759
- rejectVersion?: number | undefined;
760
- approvalProgram: string | Uint8Array;
761
- clearStateProgram: string | Uint8Array;
762
- schema?: {
763
- globalInts: number;
764
- globalByteSlices: number;
765
- localInts: number;
766
- localByteSlices: number;
767
- } | undefined;
768
- extraProgramPages?: number | undefined;
769
- } & {
770
- method: algosdk.ABIMethod;
771
- args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
772
- } & SendParams) => Promise<SendAppCreateTransactionResult>;
773
- /**
774
- * Update a smart contract via an ABI method.
775
- *
776
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
777
- *
778
- * @param params The parameters for the app update transaction
779
- * @example Basic example
780
- * ```typescript
781
- * const method = new ABIMethod({
782
- * name: 'method',
783
- * args: [{ name: 'arg1', type: 'string' }],
784
- * returns: { type: 'string' },
785
- * })
786
- * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
787
- * ```
788
- * @example Advanced example
789
- * ```typescript
790
- * const method = new ABIMethod({
791
- * name: 'method',
792
- * args: [{ name: 'arg1', type: 'string' }],
793
- * returns: { type: 'string' },
794
- * })
795
- * await algorand.send.appUpdateMethodCall({
796
- * sender: 'CREATORADDRESS',
797
- * method: method,
798
- * args: ["arg1_value"],
799
- * approvalProgram: "TEALCODE",
800
- * clearStateProgram: "TEALCODE",
801
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
802
- * args: [new Uint8Array(1, 2, 3, 4)]
803
- * accountReferences: ["ACCOUNT_1"]
804
- * appReferences: [123n, 1234n]
805
- * assetReferences: [12345n]
806
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
807
- * accessReferences: [{ appId: 1234n }]
808
- * lease: 'lease',
809
- * note: 'note',
810
- * // You wouldn't normally set this field
811
- * firstValidRound: 1000n,
812
- * validityWindow: 10,
813
- * extraFee: (1000).microAlgo(),
814
- * staticFee: (1000).microAlgo(),
815
- * // Max fee doesn't make sense with extraFee AND staticFee
816
- * // already specified, but here for completeness
817
- * maxFee: (3000).microAlgo(),
818
- * rejectVersion: 1,
819
- * // Signer only needed if you want to provide one,
820
- * // generally you'd register it with AlgorandClient
821
- * // against the sender and not need to pass it in
822
- * signer: transactionSigner,
823
- * maxRoundsToWaitForConfirmation: 5,
824
- * suppressLog: true,
825
- *})
826
- * ```
827
- * @returns The result of the application ABI method update transaction and the transaction that was sent
828
- */
829
- appUpdateMethodCall: (params: {
830
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
831
- sender: string | Address;
832
- rekeyTo?: (string | Address) | undefined;
833
- note?: (Uint8Array | string) | undefined;
834
- lease?: (Uint8Array | string) | undefined;
835
- staticFee?: AlgoAmount | undefined;
836
- extraFee?: AlgoAmount | undefined;
837
- maxFee?: AlgoAmount | undefined;
838
- validityWindow?: number | bigint | undefined;
839
- firstValidRound?: bigint | undefined;
840
- lastValidRound?: bigint | undefined;
841
- appId: bigint;
842
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
843
- accountReferences?: (string | Address)[] | undefined;
844
- appReferences?: bigint[] | undefined;
845
- assetReferences?: bigint[] | undefined;
846
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
847
- accessReferences?: ResourceReference[] | undefined;
848
- rejectVersion?: number | undefined;
849
- approvalProgram: string | Uint8Array;
850
- clearStateProgram: string | Uint8Array;
851
- } & {
852
- method: algosdk.ABIMethod;
853
- args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
854
- } & SendParams) => Promise<SendAppUpdateTransactionResult>;
855
- /**
856
- * Delete a smart contract via an ABI method.
857
- *
858
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
859
- *
860
- * @param params The parameters for the app deletion transaction
861
- * @example Basic example
862
- * ```typescript
863
- * const method = new ABIMethod({
864
- * name: 'method',
865
- * args: [{ name: 'arg1', type: 'string' }],
866
- * returns: { type: 'string' },
867
- * })
868
- * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
869
- * ```
870
- * @example Advanced example
871
- * ```typescript
872
- * const method = new ABIMethod({
873
- * name: 'method',
874
- * args: [{ name: 'arg1', type: 'string' }],
875
- * returns: { type: 'string' },
876
- * })
877
- * await algorand.send.appDeleteMethodCall({
878
- * sender: 'CREATORADDRESS',
879
- * method: method,
880
- * args: ["arg1_value"],
881
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
882
- * args: [new Uint8Array(1, 2, 3, 4)]
883
- * accountReferences: ["ACCOUNT_1"]
884
- * appReferences: [123n, 1234n]
885
- * assetReferences: [12345n]
886
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
887
- * accessReferences: [{ appId: 1234n }]
888
- * lease: 'lease',
889
- * note: 'note',
890
- * // You wouldn't normally set this field
891
- * firstValidRound: 1000n,
892
- * validityWindow: 10,
893
- * extraFee: (1000).microAlgo(),
894
- * staticFee: (1000).microAlgo(),
895
- * // Max fee doesn't make sense with extraFee AND staticFee
896
- * // already specified, but here for completeness
897
- * maxFee: (3000).microAlgo(),
898
- * rejectVersion: 1,
899
- * // Signer only needed if you want to provide one,
900
- * // generally you'd register it with AlgorandClient
901
- * // against the sender and not need to pass it in
902
- * signer: transactionSigner,
903
- * maxRoundsToWaitForConfirmation: 5,
904
- * suppressLog: true,
905
- *})
906
- * ```
907
- * @returns The result of the application ABI method delete transaction and the transaction that was sent
908
- */
909
- appDeleteMethodCall: (params: {
910
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
911
- sender: string | Address;
912
- rekeyTo?: (string | Address) | undefined;
913
- note?: (Uint8Array | string) | undefined;
914
- lease?: (Uint8Array | string) | undefined;
915
- staticFee?: AlgoAmount | undefined;
916
- extraFee?: AlgoAmount | undefined;
917
- maxFee?: AlgoAmount | undefined;
918
- validityWindow?: number | bigint | undefined;
919
- firstValidRound?: bigint | undefined;
920
- lastValidRound?: bigint | undefined;
921
- appId: bigint;
922
- onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
923
- accountReferences?: (string | Address)[] | undefined;
924
- appReferences?: bigint[] | undefined;
925
- assetReferences?: bigint[] | undefined;
926
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
927
- accessReferences?: ResourceReference[] | undefined;
928
- rejectVersion?: number | undefined;
929
- } & {
930
- method: algosdk.ABIMethod;
931
- args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
932
- } & SendParams) => Promise<SendAppTransactionResult>;
933
- /**
934
- * Call a smart contract via an ABI method.
935
- *
936
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
937
- *
938
- * @param params The parameters for the app call transaction
939
- * @example Basic example
940
- * ```typescript
941
- * const method = new ABIMethod({
942
- * name: 'method',
943
- * args: [{ name: 'arg1', type: 'string' }],
944
- * returns: { type: 'string' },
945
- * })
946
- * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
947
- * ```
948
- * @example Advanced example
949
- * ```typescript
950
- * const method = new ABIMethod({
951
- * name: 'method',
952
- * args: [{ name: 'arg1', type: 'string' }],
953
- * returns: { type: 'string' },
954
- * })
955
- * await algorand.send.appCallMethodCall({
956
- * sender: 'CREATORADDRESS',
957
- * method: method,
958
- * args: ["arg1_value"],
959
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
960
- * args: [new Uint8Array(1, 2, 3, 4)]
961
- * accountReferences: ["ACCOUNT_1"]
962
- * appReferences: [123n, 1234n]
963
- * assetReferences: [12345n]
964
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
965
- * accessReferences: [{ appId: 1234n }]
966
- * lease: 'lease',
967
- * note: 'note',
968
- * // You wouldn't normally set this field
969
- * firstValidRound: 1000n,
970
- * validityWindow: 10,
971
- * extraFee: (1000).microAlgo(),
972
- * staticFee: (1000).microAlgo(),
973
- * // Max fee doesn't make sense with extraFee AND staticFee
974
- * // already specified, but here for completeness
975
- * maxFee: (3000).microAlgo(),
976
- * rejectVersion: 1,
977
- * // Signer only needed if you want to provide one,
978
- * // generally you'd register it with AlgorandClient
979
- * // against the sender and not need to pass it in
980
- * signer: transactionSigner,
981
- * maxRoundsToWaitForConfirmation: 5,
982
- * suppressLog: true,
983
- *})
984
- * ```
985
- * @returns The result of the application ABI method call transaction and the transaction that was sent
986
- */
987
- appCallMethodCall: (params: {
988
- signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
989
- sender: string | Address;
990
- rekeyTo?: (string | Address) | undefined;
991
- note?: (Uint8Array | string) | undefined;
992
- lease?: (Uint8Array | string) | undefined;
993
- staticFee?: AlgoAmount | undefined;
994
- extraFee?: AlgoAmount | undefined;
995
- maxFee?: AlgoAmount | undefined;
996
- validityWindow?: number | bigint | undefined;
997
- firstValidRound?: bigint | undefined;
998
- lastValidRound?: bigint | undefined;
999
- appId: bigint;
1000
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
1001
- accountReferences?: (string | Address)[] | undefined;
1002
- appReferences?: bigint[] | undefined;
1003
- assetReferences?: bigint[] | undefined;
1004
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
1005
- accessReferences?: ResourceReference[] | undefined;
1006
- rejectVersion?: number | undefined;
1007
- } & {
1008
- method: algosdk.ABIMethod;
1009
- args?: (algosdk.ABIValue | algosdk.TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
1010
- } & SendParams) => Promise<SendAppTransactionResult>;
1011
- /**
1012
- * Register an online key.
1013
- * @param params The parameters for the key registration transaction
1014
- * @example Basic example
1015
- * ```typescript
1016
- * const result = await algorand.send.onlineKeyRegistration({
1017
- * sender: 'SENDERADDRESS',
1018
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1019
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1020
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1021
- * voteFirst: 1n,
1022
- * voteLast: 1000n,
1023
- * voteKeyDilution: 1n,
1024
- * })
1025
- * ```
1026
- * @example Advanced example
1027
- * ```typescript
1028
- * const result = await algorand.send.onlineKeyRegistration({
1029
- * sender: 'SENDERADDRESS',
1030
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1031
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1032
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1033
- * voteFirst: 1n,
1034
- * voteLast: 1000n,
1035
- * voteKeyDilution: 1n,
1036
- * lease: 'lease',
1037
- * note: 'note',
1038
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1039
- * rekeyTo: 'REKEYTOADDRESS',
1040
- * // You wouldn't normally set this field
1041
- * firstValidRound: 1000n,
1042
- * validityWindow: 10,
1043
- * extraFee: (1000).microAlgo(),
1044
- * staticFee: (1000).microAlgo(),
1045
- * // Max fee doesn't make sense with extraFee AND staticFee
1046
- * // already specified, but here for completeness
1047
- * maxFee: (3000).microAlgo(),
1048
- * })
1049
- * ```
1050
- * @returns The result of the online key registration transaction and the transaction that was sent
1051
- */
1052
- onlineKeyRegistration: (params: CommonTransactionParams & {
1053
- voteKey: Uint8Array;
1054
- selectionKey: Uint8Array;
1055
- voteFirst: bigint;
1056
- voteLast: bigint;
1057
- voteKeyDilution: bigint;
1058
- stateProofKey?: Uint8Array;
1059
- } & SendParams) => Promise<SendSingleTransactionResult>;
1060
- /**
1061
- * Register an offline key.
1062
- * @param params The parameters for the key registration transaction
1063
- * @example Basic example
1064
- * ```typescript
1065
- * const result = await algorand.send.offlineKeyRegistration({
1066
- * sender: 'SENDERADDRESS',
1067
- * })
1068
- * ```
1069
- * @example Advanced example
1070
- * ```typescript
1071
- * const result = await algorand.send.offlineKeyRegistration({
1072
- * sender: 'SENDERADDRESS',
1073
- * lease: 'lease',
1074
- * note: 'note',
1075
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1076
- * rekeyTo: 'REKEYTOADDRESS',
1077
- * // You wouldn't normally set this field
1078
- * firstValidRound: 1000n,
1079
- * validityWindow: 10,
1080
- * extraFee: (1000).microAlgo(),
1081
- * staticFee: (1000).microAlgo(),
1082
- * // Max fee doesn't make sense with extraFee AND staticFee
1083
- * // already specified, but here for completeness
1084
- * maxFee: (3000).microAlgo(),
1085
- * })
1086
- * ```
1087
- * @returns The result of the offline key registration transaction and the transaction that was sent
1088
- */
1089
- offlineKeyRegistration: (params: CommonTransactionParams & {
1090
- preventAccountFromEverParticipatingAgain?: boolean;
1091
- } & SendParams) => Promise<SendSingleTransactionResult>;
1087
+ offlineKeyRegistration: (params: import("./composer").CommonTransactionParams & {
1088
+ preventAccountFromEverParticipatingAgain?: boolean;
1089
+ } & SendParams) => Promise<SendSingleTransactionResult>;
1092
1090
  }
1093
- //#endregion
1094
- export { AlgorandClientTransactionSender };
1095
- //# sourceMappingURL=algorand-client-transaction-sender.d.ts.map