@algorandfoundation/algokit-utils 7.0.0-beta.1 → 7.0.0-beta.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.
- package/account/account.d.ts +7 -7
- package/account/account.js +7 -7
- package/account/account.mjs +7 -7
- package/account/get-account.d.ts +2 -2
- package/account/get-account.js +1 -1
- package/account/get-account.mjs +1 -1
- package/account/get-dispenser-account.d.ts +1 -1
- package/account/get-dispenser-account.js +1 -1
- package/account/get-dispenser-account.mjs +1 -1
- package/account/mnemonic-account.d.ts +1 -1
- package/account/mnemonic-account.js +1 -1
- package/account/mnemonic-account.mjs +1 -1
- package/app-deploy.d.ts +18 -1
- package/app-deploy.d.ts.map +1 -1
- package/app-deploy.js +142 -333
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +145 -336
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +38 -1
- package/app.d.ts.map +1 -1
- package/app.js +113 -370
- package/app.js.map +1 -1
- package/app.mjs +114 -371
- package/app.mjs.map +1 -1
- package/asset.d.ts +5 -5
- package/asset.js +5 -5
- package/asset.mjs +5 -5
- package/debugging/debugging.js +2 -2
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +2 -2
- package/debugging/debugging.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +12 -12
- package/index.mjs +1 -1
- package/localnet/get-kmd-wallet-account.d.ts +1 -1
- package/localnet/get-kmd-wallet-account.js +1 -1
- package/localnet/get-kmd-wallet-account.mjs +1 -1
- package/localnet/get-localnet-dispenser-account.d.ts +1 -1
- package/localnet/get-localnet-dispenser-account.js +1 -1
- package/localnet/get-localnet-dispenser-account.mjs +1 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -1
- package/localnet/get-or-create-kmd-wallet-account.js +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs +1 -1
- package/localnet/is-localnet.d.ts +1 -1
- package/localnet/is-localnet.js +1 -1
- package/localnet/is-localnet.mjs +1 -1
- package/network-client.d.ts +2 -2
- package/network-client.d.ts.map +1 -1
- package/network-client.js +2 -2
- package/network-client.mjs +2 -2
- package/package.json +1 -1
- package/testing/fixtures/algorand-fixture.js +12 -12
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +12 -12
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/transaction/legacy-bridge.d.ts +31 -5
- package/transaction/legacy-bridge.d.ts.map +1 -1
- package/transaction/legacy-bridge.js +99 -5
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +98 -7
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transfer/transfer-algos.d.ts +1 -1
- package/transfer/transfer-algos.js +1 -1
- package/transfer/transfer-algos.mjs +1 -1
- package/transfer/transfer.d.ts +1 -1
- package/transfer/transfer.js +1 -1
- package/transfer/transfer.mjs +1 -1
- package/types/account-manager.d.ts +1 -1
- package/types/account-manager.d.ts.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +450 -20
- package/types/algorand-client-transaction-creator.d.ts.map +1 -1
- package/types/algorand-client-transaction-creator.js +406 -22
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +406 -22
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +750 -24
- package/types/algorand-client-transaction-sender.d.ts.map +1 -1
- package/types/algorand-client-transaction-sender.js +426 -12
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +426 -12
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +8 -0
- package/types/algorand-client.d.ts.map +1 -1
- package/types/algorand-client.js +14 -1
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +14 -1
- package/types/algorand-client.mjs.map +1 -1
- package/types/app-client.d.ts +13 -1
- package/types/app-client.d.ts.map +1 -1
- package/types/app-client.js +8 -5
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +9 -6
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +121 -0
- package/types/app-deployer.d.ts.map +1 -0
- package/types/app-deployer.js +354 -0
- package/types/app-deployer.js.map +1 -0
- package/types/app-deployer.mjs +352 -0
- package/types/app-deployer.mjs.map +1 -0
- package/types/app-manager.d.ts +235 -0
- package/types/app-manager.d.ts.map +1 -0
- package/types/app-manager.js +336 -0
- package/types/app-manager.js.map +1 -0
- package/types/app-manager.mjs +334 -0
- package/types/app-manager.mjs.map +1 -0
- package/types/app.d.ts +42 -7
- package/types/app.d.ts.map +1 -1
- package/types/app.js +1 -1
- package/types/app.js.map +1 -1
- package/types/app.mjs +1 -1
- package/types/app.mjs.map +1 -1
- package/types/client-manager.d.ts +2 -0
- package/types/client-manager.d.ts.map +1 -1
- package/types/client-manager.js +4 -0
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +4 -0
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +150 -39
- package/types/composer.d.ts.map +1 -1
- package/types/composer.js +218 -62
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +218 -62
- package/types/composer.mjs.map +1 -1
- package/types/expand.d.ts +8 -0
- package/types/expand.d.ts.map +1 -0
- package/types/expand.js +3 -0
- package/types/expand.js.map +1 -0
- package/types/expand.mjs +2 -0
- package/types/expand.mjs.map +1 -0
- package/types/transaction.d.ts +3 -0
- package/types/transaction.d.ts.map +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import algosdk from 'algosdk';
|
|
2
|
-
import AlgoKitComposer, {
|
|
2
|
+
import AlgoKitComposer, { BuiltTransactions } from './composer';
|
|
3
|
+
import { Expand } from './expand';
|
|
3
4
|
import Transaction = algosdk.Transaction;
|
|
4
5
|
/** Orchestrates creating transactions for `AlgorandClient`. */
|
|
5
6
|
export declare class AlgorandClientTransactionCreator {
|
|
@@ -10,12 +11,13 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
10
11
|
*/
|
|
11
12
|
constructor(newGroup: () => AlgoKitComposer);
|
|
12
13
|
private _transaction;
|
|
14
|
+
private _transactions;
|
|
13
15
|
/**
|
|
14
16
|
* Create a payment transaction to transfer Algo between accounts.
|
|
15
17
|
* @param params The parameters for the payment transaction
|
|
16
18
|
* @example Basic example
|
|
17
19
|
* ```typescript
|
|
18
|
-
* const result = await
|
|
20
|
+
* const result = await algorand.send.payment({
|
|
19
21
|
* sender: 'SENDERADDRESS',
|
|
20
22
|
* receiver: 'RECEIVERADDRESS',
|
|
21
23
|
* amount: (4).algo(),
|
|
@@ -23,7 +25,7 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
23
25
|
* ```
|
|
24
26
|
* @example Advanced example
|
|
25
27
|
* ```typescript
|
|
26
|
-
* const result = await
|
|
28
|
+
* const result = await algorand.send.payment({
|
|
27
29
|
* amount: (4).algo(),
|
|
28
30
|
* receiver: 'RECEIVERADDRESS',
|
|
29
31
|
* sender: 'SENDERADDRESS',
|
|
@@ -55,11 +57,11 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
55
57
|
*
|
|
56
58
|
* @example Basic example
|
|
57
59
|
* ```typescript
|
|
58
|
-
* await algorand.
|
|
60
|
+
* await algorand.transactions.assetCreate({sender: "CREATORADDRESS", total: 100n})
|
|
59
61
|
* ```
|
|
60
62
|
* @example Advanced example
|
|
61
63
|
* ```typescript
|
|
62
|
-
* await algorand.
|
|
64
|
+
* await algorand.transactions.assetCreate({
|
|
63
65
|
* sender: 'CREATORADDRESS',
|
|
64
66
|
* total: 100n,
|
|
65
67
|
* decimals: 2,
|
|
@@ -97,11 +99,11 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
97
99
|
*
|
|
98
100
|
* @example Basic example
|
|
99
101
|
* ```typescript
|
|
100
|
-
* await algorand.
|
|
102
|
+
* await algorand.transactions.assetConfig({sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
|
|
101
103
|
* ```
|
|
102
104
|
* @example Advanced example
|
|
103
105
|
* ```typescript
|
|
104
|
-
* await algorand.
|
|
106
|
+
* await algorand.transactions.assetConfig({
|
|
105
107
|
* sender: 'MANAGERADDRESS',
|
|
106
108
|
* assetId: 123456n,
|
|
107
109
|
* manager: 'MANAGERADDRESS',
|
|
@@ -129,11 +131,11 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
129
131
|
*
|
|
130
132
|
* @example Basic example
|
|
131
133
|
* ```typescript
|
|
132
|
-
* await algorand.
|
|
134
|
+
* await algorand.transactions.assetFreeze({sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
|
|
133
135
|
* ```
|
|
134
136
|
* @example Advanced example
|
|
135
137
|
* ```typescript
|
|
136
|
-
* await algorand.
|
|
138
|
+
* await algorand.transactions.assetFreeze({
|
|
137
139
|
* sender: 'MANAGERADDRESS',
|
|
138
140
|
* assetId: 123456n,
|
|
139
141
|
* account: 'ACCOUNTADDRESS',
|
|
@@ -163,11 +165,11 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
163
165
|
*
|
|
164
166
|
* @example Basic example
|
|
165
167
|
* ```typescript
|
|
166
|
-
* await algorand.
|
|
168
|
+
* await algorand.transactions.assetDestroy({sender: "MANAGERADDRESS", assetId: 123456n })
|
|
167
169
|
* ```
|
|
168
170
|
* @example Advanced example
|
|
169
171
|
* ```typescript
|
|
170
|
-
* await algorand.
|
|
172
|
+
* await algorand.transactions.assetDestroy({
|
|
171
173
|
* sender: 'MANAGERADDRESS',
|
|
172
174
|
* assetId: 123456n,
|
|
173
175
|
* lease: 'lease',
|
|
@@ -191,11 +193,11 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
191
193
|
*
|
|
192
194
|
* @example Basic example
|
|
193
195
|
* ```typescript
|
|
194
|
-
* await algorand.
|
|
196
|
+
* await algorand.transactions.assetTransfer({sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
|
|
195
197
|
* ```
|
|
196
198
|
* @example Advanced example (with clawback)
|
|
197
199
|
* ```typescript
|
|
198
|
-
* await algorand.
|
|
200
|
+
* await algorand.transactions.assetTransfer({
|
|
199
201
|
* sender: 'CLAWBACKADDRESS',
|
|
200
202
|
* assetId: 123456n,
|
|
201
203
|
* amount: 1n,
|
|
@@ -224,11 +226,11 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
224
226
|
*
|
|
225
227
|
* @example Basic example
|
|
226
228
|
* ```typescript
|
|
227
|
-
* await algorand.
|
|
229
|
+
* await algorand.transactions.assetOptIn({sender: "SENDERADDRESS", assetId: 123456n })
|
|
228
230
|
* ```
|
|
229
231
|
* @example Advanced example
|
|
230
232
|
* ```typescript
|
|
231
|
-
* await algorand.
|
|
233
|
+
* await algorand.transactions.assetOptIn({
|
|
232
234
|
* sender: 'SENDERADDRESS',
|
|
233
235
|
* assetId: 123456n,
|
|
234
236
|
* lease: 'lease',
|
|
@@ -255,11 +257,11 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
255
257
|
*
|
|
256
258
|
* @example Basic example
|
|
257
259
|
* ```typescript
|
|
258
|
-
* await algorand.
|
|
260
|
+
* await algorand.transactions.assetOptOut({sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n })
|
|
259
261
|
* ```
|
|
260
262
|
* @example Advanced example
|
|
261
263
|
* ```typescript
|
|
262
|
-
* await algorand.
|
|
264
|
+
* await algorand.transactions.assetOptIn({
|
|
263
265
|
* sender: 'SENDERADDRESS',
|
|
264
266
|
* assetId: 123456n,
|
|
265
267
|
* creator: 'CREATORADDRESS',
|
|
@@ -279,10 +281,438 @@ export declare class AlgorandClientTransactionCreator {
|
|
|
279
281
|
* @returns The asset opt-out transaction
|
|
280
282
|
*/
|
|
281
283
|
assetOptOut: (params: import("./composer").AssetOptOutParams) => Promise<Transaction>;
|
|
282
|
-
/** Create an application
|
|
284
|
+
/** Create an application create transaction.
|
|
285
|
+
*
|
|
286
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
287
|
+
*
|
|
288
|
+
* @param params The parameters for the app creation transaction
|
|
289
|
+
* @example Basic example
|
|
290
|
+
* ```typescript
|
|
291
|
+
* const result = await algorand.transactions.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
|
|
292
|
+
* const createdAppId = result.appId
|
|
293
|
+
* ```
|
|
294
|
+
* @example Advanced example
|
|
295
|
+
* ```typescript
|
|
296
|
+
* await algorand.transactions.appCreate({
|
|
297
|
+
* sender: 'CREATORADDRESS',
|
|
298
|
+
* approvalProgram: "TEALCODE",
|
|
299
|
+
* clearStateProgram: "TEALCODE",
|
|
300
|
+
* schema: {
|
|
301
|
+
* globalInts: 1,
|
|
302
|
+
* globalByteSlices: 2,
|
|
303
|
+
* localInts: 3,
|
|
304
|
+
* localByteSlices: 4
|
|
305
|
+
* },
|
|
306
|
+
* extraProgramPages: 1,
|
|
307
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
308
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
309
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
310
|
+
* appReferences: [123n, 1234n]
|
|
311
|
+
* assetReferences: [12345n]
|
|
312
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
313
|
+
* lease: 'lease',
|
|
314
|
+
* note: 'note',
|
|
315
|
+
* // You wouldn't normally set this field
|
|
316
|
+
* firstValidRound: 1000n,
|
|
317
|
+
* validityWindow: 10,
|
|
318
|
+
* extraFee: (1000).microAlgo(),
|
|
319
|
+
* staticFee: (1000).microAlgo(),
|
|
320
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
321
|
+
* // already specified, but here for completeness
|
|
322
|
+
* maxFee: (3000).microAlgo(),
|
|
323
|
+
* // Signer only needed if you want to provide one,
|
|
324
|
+
* // generally you'd register it with AlgorandClient
|
|
325
|
+
* // against the sender and not need to pass it in
|
|
326
|
+
* signer: transactionSigner,
|
|
327
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
328
|
+
* suppressLog: true,
|
|
329
|
+
*})
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
appCreate: (params: {
|
|
333
|
+
lease?: string | Uint8Array | undefined;
|
|
334
|
+
note?: string | Uint8Array | undefined;
|
|
335
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
336
|
+
args?: Uint8Array[] | undefined;
|
|
337
|
+
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
338
|
+
sender: string;
|
|
339
|
+
rekeyTo?: string | undefined;
|
|
340
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
341
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
342
|
+
validityWindow?: number | undefined;
|
|
343
|
+
firstValidRound?: bigint | undefined;
|
|
344
|
+
lastValidRound?: bigint | undefined;
|
|
345
|
+
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
346
|
+
accountReferences?: string[] | undefined;
|
|
347
|
+
appReferences?: bigint[] | undefined;
|
|
348
|
+
assetReferences?: bigint[] | undefined;
|
|
349
|
+
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
350
|
+
approvalProgram: string | Uint8Array;
|
|
351
|
+
clearStateProgram: string | Uint8Array;
|
|
352
|
+
schema?: {
|
|
353
|
+
globalInts: number;
|
|
354
|
+
globalByteSlices: number;
|
|
355
|
+
localInts: number;
|
|
356
|
+
localByteSlices: number;
|
|
357
|
+
} | undefined;
|
|
358
|
+
extraProgramPages?: number | undefined;
|
|
359
|
+
}) => Promise<Transaction>;
|
|
360
|
+
/** Create an application update transaction.
|
|
361
|
+
*
|
|
362
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
363
|
+
*
|
|
364
|
+
* @param params The parameters for the app update transaction
|
|
365
|
+
* @example Basic example
|
|
366
|
+
* ```typescript
|
|
367
|
+
* await algorand.transactions.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
|
|
368
|
+
* ```
|
|
369
|
+
* @example Advanced example
|
|
370
|
+
* ```typescript
|
|
371
|
+
* await algorand.transactions.appUpdate({
|
|
372
|
+
* sender: 'CREATORADDRESS',
|
|
373
|
+
* approvalProgram: "TEALCODE",
|
|
374
|
+
* clearStateProgram: "TEALCODE",
|
|
375
|
+
* onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
|
|
376
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
377
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
378
|
+
* appReferences: [123n, 1234n]
|
|
379
|
+
* assetReferences: [12345n]
|
|
380
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
381
|
+
* lease: 'lease',
|
|
382
|
+
* note: 'note',
|
|
383
|
+
* // You wouldn't normally set this field
|
|
384
|
+
* firstValidRound: 1000n,
|
|
385
|
+
* validityWindow: 10,
|
|
386
|
+
* extraFee: (1000).microAlgo(),
|
|
387
|
+
* staticFee: (1000).microAlgo(),
|
|
388
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
389
|
+
* // already specified, but here for completeness
|
|
390
|
+
* maxFee: (3000).microAlgo(),
|
|
391
|
+
* // Signer only needed if you want to provide one,
|
|
392
|
+
* // generally you'd register it with AlgorandClient
|
|
393
|
+
* // against the sender and not need to pass it in
|
|
394
|
+
* signer: transactionSigner,
|
|
395
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
396
|
+
* suppressLog: true,
|
|
397
|
+
*})
|
|
398
|
+
* ```
|
|
399
|
+
*/
|
|
400
|
+
appUpdate: (params: {
|
|
401
|
+
sender: string;
|
|
402
|
+
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
403
|
+
rekeyTo?: string | undefined;
|
|
404
|
+
note?: string | Uint8Array | undefined;
|
|
405
|
+
lease?: string | Uint8Array | undefined;
|
|
406
|
+
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
407
|
+
extraFee?: import("./amount").AlgoAmount | undefined;
|
|
408
|
+
maxFee?: import("./amount").AlgoAmount | undefined;
|
|
409
|
+
validityWindow?: number | undefined;
|
|
410
|
+
firstValidRound?: bigint | undefined;
|
|
411
|
+
lastValidRound?: bigint | undefined;
|
|
412
|
+
appId: bigint;
|
|
413
|
+
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
414
|
+
args?: Uint8Array[] | undefined;
|
|
415
|
+
accountReferences?: string[] | undefined;
|
|
416
|
+
appReferences?: bigint[] | undefined;
|
|
417
|
+
assetReferences?: bigint[] | undefined;
|
|
418
|
+
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
419
|
+
approvalProgram: string | Uint8Array;
|
|
420
|
+
clearStateProgram: string | Uint8Array;
|
|
421
|
+
}) => Promise<Transaction>;
|
|
422
|
+
/** Create an application delete transaction.
|
|
423
|
+
*
|
|
424
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
425
|
+
*
|
|
426
|
+
* @param params The parameters for the app deletion transaction
|
|
427
|
+
* @example Basic example
|
|
428
|
+
* ```typescript
|
|
429
|
+
* await algorand.transactions.appDelete({ sender: 'CREATORADDRESS' })
|
|
430
|
+
* ```
|
|
431
|
+
* @example Advanced example
|
|
432
|
+
* ```typescript
|
|
433
|
+
* await algorand.transactions.appDelete({
|
|
434
|
+
* sender: 'CREATORADDRESS',
|
|
435
|
+
* onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
|
|
436
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
437
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
438
|
+
* appReferences: [123n, 1234n]
|
|
439
|
+
* assetReferences: [12345n]
|
|
440
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
441
|
+
* lease: 'lease',
|
|
442
|
+
* note: 'note',
|
|
443
|
+
* // You wouldn't normally set this field
|
|
444
|
+
* firstValidRound: 1000n,
|
|
445
|
+
* validityWindow: 10,
|
|
446
|
+
* extraFee: (1000).microAlgo(),
|
|
447
|
+
* staticFee: (1000).microAlgo(),
|
|
448
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
449
|
+
* // already specified, but here for completeness
|
|
450
|
+
* maxFee: (3000).microAlgo(),
|
|
451
|
+
* // Signer only needed if you want to provide one,
|
|
452
|
+
* // generally you'd register it with AlgorandClient
|
|
453
|
+
* // against the sender and not need to pass it in
|
|
454
|
+
* signer: transactionSigner,
|
|
455
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
456
|
+
* suppressLog: true,
|
|
457
|
+
*})
|
|
458
|
+
* ```
|
|
459
|
+
*/
|
|
460
|
+
appDelete: (params: import("./composer").AppDeleteParams) => Promise<Transaction>;
|
|
461
|
+
/** Create an application call transaction.
|
|
462
|
+
*
|
|
463
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
464
|
+
*
|
|
465
|
+
* @param params The parameters for the app call transaction
|
|
466
|
+
* @example Basic example
|
|
467
|
+
* ```typescript
|
|
468
|
+
* await algorand.transactions.appCall({ sender: 'CREATORADDRESS' })
|
|
469
|
+
* ```
|
|
470
|
+
* @example Advanced example
|
|
471
|
+
* ```typescript
|
|
472
|
+
* await algorand.transactions.appCall({
|
|
473
|
+
* sender: 'CREATORADDRESS',
|
|
474
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
475
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
476
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
477
|
+
* appReferences: [123n, 1234n]
|
|
478
|
+
* assetReferences: [12345n]
|
|
479
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
480
|
+
* lease: 'lease',
|
|
481
|
+
* note: 'note',
|
|
482
|
+
* // You wouldn't normally set this field
|
|
483
|
+
* firstValidRound: 1000n,
|
|
484
|
+
* validityWindow: 10,
|
|
485
|
+
* extraFee: (1000).microAlgo(),
|
|
486
|
+
* staticFee: (1000).microAlgo(),
|
|
487
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
488
|
+
* // already specified, but here for completeness
|
|
489
|
+
* maxFee: (3000).microAlgo(),
|
|
490
|
+
* // Signer only needed if you want to provide one,
|
|
491
|
+
* // generally you'd register it with AlgorandClient
|
|
492
|
+
* // against the sender and not need to pass it in
|
|
493
|
+
* signer: transactionSigner,
|
|
494
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
495
|
+
* suppressLog: true,
|
|
496
|
+
*})
|
|
497
|
+
* ```
|
|
498
|
+
*/
|
|
283
499
|
appCall: (params: import("./composer").AppCallParams) => Promise<Transaction>;
|
|
284
|
-
/** Create an application call with ABI method call transaction.
|
|
285
|
-
|
|
500
|
+
/** Create an application create call with ABI method call transaction.
|
|
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 creation transaction
|
|
505
|
+
* @example Basic example
|
|
506
|
+
* ```typescript
|
|
507
|
+
* const method = new ABIMethod({
|
|
508
|
+
* name: 'method',
|
|
509
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
510
|
+
* returns: { type: 'string' },
|
|
511
|
+
* })
|
|
512
|
+
* const result = await algorand.transactions.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
|
|
513
|
+
* const createdAppId = result.appId
|
|
514
|
+
* ```
|
|
515
|
+
* @example Advanced example
|
|
516
|
+
* ```typescript
|
|
517
|
+
* const method = new ABIMethod({
|
|
518
|
+
* name: 'method',
|
|
519
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
520
|
+
* returns: { type: 'string' },
|
|
521
|
+
* })
|
|
522
|
+
* await algorand.transactions.appCreate({
|
|
523
|
+
* sender: 'CREATORADDRESS',
|
|
524
|
+
* method: method,
|
|
525
|
+
* args: ["arg1_value"],
|
|
526
|
+
* approvalProgram: "TEALCODE",
|
|
527
|
+
* clearStateProgram: "TEALCODE",
|
|
528
|
+
* schema: {
|
|
529
|
+
* globalInts: 1,
|
|
530
|
+
* globalByteSlices: 2,
|
|
531
|
+
* localInts: 3,
|
|
532
|
+
* localByteSlices: 4
|
|
533
|
+
* },
|
|
534
|
+
* extraProgramPages: 1,
|
|
535
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
536
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
537
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
538
|
+
* appReferences: [123n, 1234n]
|
|
539
|
+
* assetReferences: [12345n]
|
|
540
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
541
|
+
* lease: 'lease',
|
|
542
|
+
* note: 'note',
|
|
543
|
+
* // You wouldn't normally set this field
|
|
544
|
+
* firstValidRound: 1000n,
|
|
545
|
+
* validityWindow: 10,
|
|
546
|
+
* extraFee: (1000).microAlgo(),
|
|
547
|
+
* staticFee: (1000).microAlgo(),
|
|
548
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
549
|
+
* // already specified, but here for completeness
|
|
550
|
+
* maxFee: (3000).microAlgo(),
|
|
551
|
+
* // Signer only needed if you want to provide one,
|
|
552
|
+
* // generally you'd register it with AlgorandClient
|
|
553
|
+
* // against the sender and not need to pass it in
|
|
554
|
+
* signer: transactionSigner,
|
|
555
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
556
|
+
* suppressLog: true,
|
|
557
|
+
*})
|
|
558
|
+
* ```
|
|
559
|
+
*/
|
|
560
|
+
appCreateMethodCall: (params: import("./composer").AppCreateMethodCall) => Promise<Expand<BuiltTransactions>>;
|
|
561
|
+
/** Create an application update call with ABI method call transaction.
|
|
562
|
+
*
|
|
563
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
564
|
+
*
|
|
565
|
+
* @param params The parameters for the app update transaction
|
|
566
|
+
* @example Basic example
|
|
567
|
+
* ```typescript
|
|
568
|
+
* const method = new ABIMethod({
|
|
569
|
+
* name: 'method',
|
|
570
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
571
|
+
* returns: { type: 'string' },
|
|
572
|
+
* })
|
|
573
|
+
* await algorand.transactions.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
|
|
574
|
+
* ```
|
|
575
|
+
* @example Advanced example
|
|
576
|
+
* ```typescript
|
|
577
|
+
* const method = new ABIMethod({
|
|
578
|
+
* name: 'method',
|
|
579
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
580
|
+
* returns: { type: 'string' },
|
|
581
|
+
* })
|
|
582
|
+
* await algorand.transactions.appUpdateMethodCall({
|
|
583
|
+
* sender: 'CREATORADDRESS',
|
|
584
|
+
* method: method,
|
|
585
|
+
* args: ["arg1_value"],
|
|
586
|
+
* approvalProgram: "TEALCODE",
|
|
587
|
+
* clearStateProgram: "TEALCODE",
|
|
588
|
+
* onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
|
|
589
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
590
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
591
|
+
* appReferences: [123n, 1234n]
|
|
592
|
+
* assetReferences: [12345n]
|
|
593
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
594
|
+
* lease: 'lease',
|
|
595
|
+
* note: 'note',
|
|
596
|
+
* // You wouldn't normally set this field
|
|
597
|
+
* firstValidRound: 1000n,
|
|
598
|
+
* validityWindow: 10,
|
|
599
|
+
* extraFee: (1000).microAlgo(),
|
|
600
|
+
* staticFee: (1000).microAlgo(),
|
|
601
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
602
|
+
* // already specified, but here for completeness
|
|
603
|
+
* maxFee: (3000).microAlgo(),
|
|
604
|
+
* // Signer only needed if you want to provide one,
|
|
605
|
+
* // generally you'd register it with AlgorandClient
|
|
606
|
+
* // against the sender and not need to pass it in
|
|
607
|
+
* signer: transactionSigner,
|
|
608
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
609
|
+
* suppressLog: true,
|
|
610
|
+
*})
|
|
611
|
+
* ```
|
|
612
|
+
*/
|
|
613
|
+
appUpdateMethodCall: (params: import("./composer").AppUpdateMethodCall) => Promise<Expand<BuiltTransactions>>;
|
|
614
|
+
/** Create an application delete call with ABI method call transaction.
|
|
615
|
+
*
|
|
616
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
617
|
+
*
|
|
618
|
+
* @param params The parameters for the app deletion transaction
|
|
619
|
+
* @example Basic example
|
|
620
|
+
* ```typescript
|
|
621
|
+
* const method = new ABIMethod({
|
|
622
|
+
* name: 'method',
|
|
623
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
624
|
+
* returns: { type: 'string' },
|
|
625
|
+
* })
|
|
626
|
+
* await algorand.transactions.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
|
|
627
|
+
* ```
|
|
628
|
+
* @example Advanced example
|
|
629
|
+
* ```typescript
|
|
630
|
+
* const method = new ABIMethod({
|
|
631
|
+
* name: 'method',
|
|
632
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
633
|
+
* returns: { type: 'string' },
|
|
634
|
+
* })
|
|
635
|
+
* await algorand.transactions.appDeleteMethodCall({
|
|
636
|
+
* sender: 'CREATORADDRESS',
|
|
637
|
+
* method: method,
|
|
638
|
+
* args: ["arg1_value"],
|
|
639
|
+
* onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
|
|
640
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
641
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
642
|
+
* appReferences: [123n, 1234n]
|
|
643
|
+
* assetReferences: [12345n]
|
|
644
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
645
|
+
* lease: 'lease',
|
|
646
|
+
* note: 'note',
|
|
647
|
+
* // You wouldn't normally set this field
|
|
648
|
+
* firstValidRound: 1000n,
|
|
649
|
+
* validityWindow: 10,
|
|
650
|
+
* extraFee: (1000).microAlgo(),
|
|
651
|
+
* staticFee: (1000).microAlgo(),
|
|
652
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
653
|
+
* // already specified, but here for completeness
|
|
654
|
+
* maxFee: (3000).microAlgo(),
|
|
655
|
+
* // Signer only needed if you want to provide one,
|
|
656
|
+
* // generally you'd register it with AlgorandClient
|
|
657
|
+
* // against the sender and not need to pass it in
|
|
658
|
+
* signer: transactionSigner,
|
|
659
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
660
|
+
* suppressLog: true,
|
|
661
|
+
*})
|
|
662
|
+
* ```
|
|
663
|
+
*/
|
|
664
|
+
appDeleteMethodCall: (params: import("./composer").AppDeleteMethodCall) => Promise<Expand<BuiltTransactions>>;
|
|
665
|
+
/** Create an application call with ABI method call transaction.
|
|
666
|
+
*
|
|
667
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
668
|
+
*
|
|
669
|
+
* @param params The parameters for the app call transaction
|
|
670
|
+
* @example Basic example
|
|
671
|
+
* ```typescript
|
|
672
|
+
* const method = new ABIMethod({
|
|
673
|
+
* name: 'method',
|
|
674
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
675
|
+
* returns: { type: 'string' },
|
|
676
|
+
* })
|
|
677
|
+
* await algorand.transactions.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
|
|
678
|
+
* ```
|
|
679
|
+
* @example Advanced example
|
|
680
|
+
* ```typescript
|
|
681
|
+
* const method = new ABIMethod({
|
|
682
|
+
* name: 'method',
|
|
683
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
684
|
+
* returns: { type: 'string' },
|
|
685
|
+
* })
|
|
686
|
+
* await algorand.transactions.appCallMethodCall({
|
|
687
|
+
* sender: 'CREATORADDRESS',
|
|
688
|
+
* method: method,
|
|
689
|
+
* args: ["arg1_value"],
|
|
690
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
691
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
692
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
693
|
+
* appReferences: [123n, 1234n]
|
|
694
|
+
* assetReferences: [12345n]
|
|
695
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
696
|
+
* lease: 'lease',
|
|
697
|
+
* note: 'note',
|
|
698
|
+
* // You wouldn't normally set this field
|
|
699
|
+
* firstValidRound: 1000n,
|
|
700
|
+
* validityWindow: 10,
|
|
701
|
+
* extraFee: (1000).microAlgo(),
|
|
702
|
+
* staticFee: (1000).microAlgo(),
|
|
703
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
704
|
+
* // already specified, but here for completeness
|
|
705
|
+
* maxFee: (3000).microAlgo(),
|
|
706
|
+
* // Signer only needed if you want to provide one,
|
|
707
|
+
* // generally you'd register it with AlgorandClient
|
|
708
|
+
* // against the sender and not need to pass it in
|
|
709
|
+
* signer: transactionSigner,
|
|
710
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
711
|
+
* suppressLog: true,
|
|
712
|
+
*})
|
|
713
|
+
* ```
|
|
714
|
+
*/
|
|
715
|
+
appCallMethodCall: (params: import("./composer").AppCallMethodCall) => Promise<Expand<BuiltTransactions>>;
|
|
286
716
|
/** Create an online key registration transaction. */
|
|
287
717
|
onlineKeyRegistration: (params: import("./composer").OnlineKeyRegistrationParams) => Promise<Transaction>;
|
|
288
718
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algorand-client-transaction-creator.d.ts","sourceRoot":"","sources":["../../src/types/algorand-client-transaction-creator.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,eAAe,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"algorand-client-transaction-creator.d.ts","sourceRoot":"","sources":["../../src/types/algorand-client-transaction-creator.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,eAAe,EAAE,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;AAExC,+DAA+D;AAC/D,qBAAa,gCAAgC;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAExC;;;OAGG;gBACS,QAAQ,EAAE,MAAM,eAAe;IAI3C,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,aAAa;IAOrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,OAAO,kDAlD4F,QAAQ,WAAW,CAAC,CAkDvE;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,WAAW,sDA3FwF,QAAQ,WAAW,CAAC,CA2F/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,WAAW,sDA/HwF,QAAQ,WAAW,CAAC,CA+H/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,WAAW,sDA7JwF,QAAQ,WAAW,CAAC,CA6J/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,YAAY,uDA7LuF,QAAQ,WAAW,CAAC,CA6L7D;IAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,aAAa,wDA9NsF,QAAQ,WAAW,CAAC,CA8N3D;IAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,UAAU,qDA1PyF,QAAQ,WAAW,CAAC,CA0PjE;IACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,WAAW,sDA3RwF,QAAQ,WAAW,CAAC,CA2R/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;UA5U0F,QAAQ,WAAW,CAAC,CA4UnE;IACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,SAAS;;;;;;;;;;;;;;;;;;;;;UArX0F,QAAQ,WAAW,CAAC,CAqXnE;IACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,SAAS,oDA5Z0F,QAAQ,WAAW,CAAC,CA4ZnE;IACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,OAAO,kDAnc4F,QAAQ,WAAW,CAAC,CAmcvE;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,mBAAmB,wDAxfiF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CAwf7D;IACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,mBAAmB,wDA7iBiF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CA6iB7D;IACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,mBAAmB,wDAhmBiF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CAgmB7D;IACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,iBAAiB,sDAnpBmF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CAmpBjE;IACrE,qDAAqD;IACrD,qBAAqB,gEA7pB8E,QAAQ,WAAW,CAAC,CA6pB3C;CAC7E"}
|