@algorandfoundation/algokit-utils 10.0.0-alpha.24 → 10.0.0-alpha.26
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/package.json +1 -1
- package/packages/transact/src/logicsig.d.ts +36 -22
- package/packages/transact/src/logicsig.js +69 -52
- package/packages/transact/src/logicsig.js.map +1 -1
- package/packages/transact/src/logicsig.mjs +70 -54
- package/packages/transact/src/logicsig.mjs.map +1 -1
- package/packages/transact/src/multisig.d.ts +4 -1
- package/packages/transact/src/multisig.js +17 -0
- package/packages/transact/src/multisig.js.map +1 -1
- package/packages/transact/src/multisig.mjs +17 -0
- package/packages/transact/src/multisig.mjs.map +1 -1
- package/packages/transact/src/signer.js +4 -1
- package/packages/transact/src/signer.js.map +1 -1
- package/packages/transact/src/signer.mjs +4 -1
- package/packages/transact/src/signer.mjs.map +1 -1
- package/packages/transact/src/transactions/signed-transaction-meta.js +6 -6
- package/packages/transact/src/transactions/signed-transaction-meta.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction-meta.mjs +6 -6
- package/packages/transact/src/transactions/signed-transaction-meta.mjs.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.d.ts +4 -4
- package/packages/transact/src/transactions/signed-transaction.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.mjs.map +1 -1
- package/testing/account.js +4 -2
- package/testing/account.js.map +1 -1
- package/testing/account.mjs +4 -2
- package/testing/account.mjs.map +1 -1
- package/transact/index.d.ts +3 -3
- package/transact/index.js +2 -1
- package/transact/index.mjs +2 -2
- package/types/account-manager.d.ts +6 -8
- package/types/account-manager.js +13 -3
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +13 -3
- package/types/account-manager.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +22 -22
- package/types/algorand-client-transaction-sender.d.ts +22 -22
- package/types/app-client.d.ts +65 -65
- package/types/app-factory.d.ts +36 -36
- package/types/composer.js +13 -6
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +13 -6
- package/types/composer.mjs.map +1 -1
- package/types/testing.d.ts +2 -2
package/types/app-factory.d.ts
CHANGED
|
@@ -171,7 +171,7 @@ declare class AppFactory {
|
|
|
171
171
|
get params(): {
|
|
172
172
|
/** Return params for a create ABI call, including deploy-time TEAL template replacements and compilation if provided */
|
|
173
173
|
create: (params: {
|
|
174
|
-
signer?:
|
|
174
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
175
175
|
rekeyTo?: ReadableAddress | undefined;
|
|
176
176
|
note?: string | Uint8Array | undefined;
|
|
177
177
|
lease?: string | Uint8Array | undefined;
|
|
@@ -219,7 +219,7 @@ declare class AppFactory {
|
|
|
219
219
|
};
|
|
220
220
|
approvalProgram: Uint8Array;
|
|
221
221
|
clearStateProgram: Uint8Array;
|
|
222
|
-
signer?:
|
|
222
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
223
223
|
rekeyTo?: ReadableAddress | undefined;
|
|
224
224
|
note?: string | Uint8Array | undefined;
|
|
225
225
|
lease?: string | Uint8Array | undefined;
|
|
@@ -244,11 +244,11 @@ declare class AppFactory {
|
|
|
244
244
|
extraProgramPages?: number | undefined;
|
|
245
245
|
} & {
|
|
246
246
|
sender: Address;
|
|
247
|
-
signer:
|
|
247
|
+
signer: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
248
248
|
method: ABIMethod;
|
|
249
|
-
args: (
|
|
249
|
+
args: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
250
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
250
251
|
sender: SendingAddress;
|
|
251
|
-
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
252
252
|
rekeyTo?: ReadableAddress | undefined;
|
|
253
253
|
note?: string | Uint8Array | undefined;
|
|
254
254
|
lease?: string | Uint8Array | undefined;
|
|
@@ -278,7 +278,7 @@ declare class AppFactory {
|
|
|
278
278
|
extraProgramPages?: number | undefined;
|
|
279
279
|
}> | AppMethodCall<{
|
|
280
280
|
sender: SendingAddress;
|
|
281
|
-
signer?:
|
|
281
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
282
282
|
rekeyTo?: ReadableAddress | undefined;
|
|
283
283
|
note?: string | Uint8Array | undefined;
|
|
284
284
|
lease?: string | Uint8Array | undefined;
|
|
@@ -299,12 +299,12 @@ declare class AppFactory {
|
|
|
299
299
|
rejectVersion?: number | undefined;
|
|
300
300
|
approvalProgram: string | Uint8Array;
|
|
301
301
|
clearStateProgram: string | Uint8Array;
|
|
302
|
-
}> |
|
|
302
|
+
}> | AppMethodCall<AppMethodCallParams> | undefined)[] | undefined;
|
|
303
303
|
onComplete: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication;
|
|
304
304
|
}>;
|
|
305
305
|
/** Return params for a deployment update ABI call */
|
|
306
306
|
deployUpdate: (params: {
|
|
307
|
-
signer?:
|
|
307
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
308
308
|
rekeyTo?: ReadableAddress | undefined;
|
|
309
309
|
note?: string | Uint8Array | undefined;
|
|
310
310
|
lease?: string | Uint8Array | undefined;
|
|
@@ -325,7 +325,7 @@ declare class AppFactory {
|
|
|
325
325
|
method: string;
|
|
326
326
|
args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
327
327
|
}) => {
|
|
328
|
-
signer?:
|
|
328
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
329
329
|
rekeyTo?: ReadableAddress | undefined;
|
|
330
330
|
note?: string | Uint8Array | undefined;
|
|
331
331
|
lease?: string | Uint8Array | undefined;
|
|
@@ -347,11 +347,11 @@ declare class AppFactory {
|
|
|
347
347
|
args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
348
348
|
} & {
|
|
349
349
|
sender: Address;
|
|
350
|
-
signer:
|
|
350
|
+
signer: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
351
351
|
method: ABIMethod;
|
|
352
|
-
args: (
|
|
352
|
+
args: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
353
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
353
354
|
sender: SendingAddress;
|
|
354
|
-
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
355
355
|
rekeyTo?: ReadableAddress | undefined;
|
|
356
356
|
note?: string | Uint8Array | undefined;
|
|
357
357
|
lease?: string | Uint8Array | undefined;
|
|
@@ -381,7 +381,7 @@ declare class AppFactory {
|
|
|
381
381
|
extraProgramPages?: number | undefined;
|
|
382
382
|
}> | AppMethodCall<{
|
|
383
383
|
sender: SendingAddress;
|
|
384
|
-
signer?:
|
|
384
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
385
385
|
rekeyTo?: ReadableAddress | undefined;
|
|
386
386
|
note?: string | Uint8Array | undefined;
|
|
387
387
|
lease?: string | Uint8Array | undefined;
|
|
@@ -402,12 +402,12 @@ declare class AppFactory {
|
|
|
402
402
|
rejectVersion?: number | undefined;
|
|
403
403
|
approvalProgram: string | Uint8Array;
|
|
404
404
|
clearStateProgram: string | Uint8Array;
|
|
405
|
-
}> |
|
|
405
|
+
}> | AppMethodCall<AppMethodCallParams> | undefined)[] | undefined;
|
|
406
406
|
onComplete: OnApplicationComplete.UpdateApplication;
|
|
407
407
|
};
|
|
408
408
|
/** Return params for a deployment delete ABI call */
|
|
409
409
|
deployDelete: (params: {
|
|
410
|
-
signer?:
|
|
410
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
411
411
|
rekeyTo?: ReadableAddress | undefined;
|
|
412
412
|
note?: string | Uint8Array | undefined;
|
|
413
413
|
lease?: string | Uint8Array | undefined;
|
|
@@ -428,7 +428,7 @@ declare class AppFactory {
|
|
|
428
428
|
method: string;
|
|
429
429
|
args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
430
430
|
}) => {
|
|
431
|
-
signer?:
|
|
431
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
432
432
|
rekeyTo?: ReadableAddress | undefined;
|
|
433
433
|
note?: string | Uint8Array | undefined;
|
|
434
434
|
lease?: string | Uint8Array | undefined;
|
|
@@ -450,11 +450,11 @@ declare class AppFactory {
|
|
|
450
450
|
args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
451
451
|
} & {
|
|
452
452
|
sender: Address;
|
|
453
|
-
signer:
|
|
453
|
+
signer: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
454
454
|
method: ABIMethod;
|
|
455
|
-
args: (
|
|
455
|
+
args: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
456
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
456
457
|
sender: SendingAddress;
|
|
457
|
-
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
458
458
|
rekeyTo?: ReadableAddress | undefined;
|
|
459
459
|
note?: string | Uint8Array | undefined;
|
|
460
460
|
lease?: string | Uint8Array | undefined;
|
|
@@ -484,7 +484,7 @@ declare class AppFactory {
|
|
|
484
484
|
extraProgramPages?: number | undefined;
|
|
485
485
|
}> | AppMethodCall<{
|
|
486
486
|
sender: SendingAddress;
|
|
487
|
-
signer?:
|
|
487
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
488
488
|
rekeyTo?: ReadableAddress | undefined;
|
|
489
489
|
note?: string | Uint8Array | undefined;
|
|
490
490
|
lease?: string | Uint8Array | undefined;
|
|
@@ -505,13 +505,13 @@ declare class AppFactory {
|
|
|
505
505
|
rejectVersion?: number | undefined;
|
|
506
506
|
approvalProgram: string | Uint8Array;
|
|
507
507
|
clearStateProgram: string | Uint8Array;
|
|
508
|
-
}> |
|
|
508
|
+
}> | AppMethodCall<AppMethodCallParams> | undefined)[] | undefined;
|
|
509
509
|
onComplete: OnApplicationComplete.DeleteApplication;
|
|
510
510
|
};
|
|
511
511
|
bare: {
|
|
512
512
|
/** Return params for a create bare call, including deploy-time TEAL template replacements and compilation if provided */
|
|
513
513
|
create: (params?: {
|
|
514
|
-
signer?:
|
|
514
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
515
515
|
rekeyTo?: ReadableAddress | undefined;
|
|
516
516
|
note?: string | Uint8Array | undefined;
|
|
517
517
|
lease?: string | Uint8Array | undefined;
|
|
@@ -560,7 +560,7 @@ declare class AppFactory {
|
|
|
560
560
|
/** The number of byte slices saved in local state. */
|
|
561
561
|
localByteSlices: number;
|
|
562
562
|
};
|
|
563
|
-
signer?:
|
|
563
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
564
564
|
rekeyTo?: ReadableAddress | undefined;
|
|
565
565
|
note?: string | Uint8Array | undefined;
|
|
566
566
|
lease?: string | Uint8Array | undefined;
|
|
@@ -584,12 +584,12 @@ declare class AppFactory {
|
|
|
584
584
|
extraProgramPages?: number | undefined;
|
|
585
585
|
} & {
|
|
586
586
|
sender: Address;
|
|
587
|
-
signer:
|
|
587
|
+
signer: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
588
588
|
onComplete: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication;
|
|
589
589
|
}>;
|
|
590
590
|
/** Return params for a deployment update bare call */
|
|
591
591
|
deployUpdate: (params?: {
|
|
592
|
-
signer?:
|
|
592
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
593
593
|
rekeyTo?: ReadableAddress | undefined;
|
|
594
594
|
note?: string | Uint8Array | undefined;
|
|
595
595
|
lease?: string | Uint8Array | undefined;
|
|
@@ -608,7 +608,7 @@ declare class AppFactory {
|
|
|
608
608
|
rejectVersion?: number | undefined;
|
|
609
609
|
sender?: ReadableAddress | undefined;
|
|
610
610
|
} | undefined) => {
|
|
611
|
-
signer?:
|
|
611
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
612
612
|
rekeyTo?: ReadableAddress | undefined;
|
|
613
613
|
note?: string | Uint8Array | undefined;
|
|
614
614
|
lease?: string | Uint8Array | undefined;
|
|
@@ -628,12 +628,12 @@ declare class AppFactory {
|
|
|
628
628
|
sender?: ReadableAddress | undefined;
|
|
629
629
|
} & {
|
|
630
630
|
sender: Address;
|
|
631
|
-
signer:
|
|
631
|
+
signer: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
632
632
|
onComplete: OnApplicationComplete.UpdateApplication;
|
|
633
633
|
};
|
|
634
634
|
/** Return params for a deployment delete bare call */
|
|
635
635
|
deployDelete: (params?: {
|
|
636
|
-
signer?:
|
|
636
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
637
637
|
rekeyTo?: ReadableAddress | undefined;
|
|
638
638
|
note?: string | Uint8Array | undefined;
|
|
639
639
|
lease?: string | Uint8Array | undefined;
|
|
@@ -652,7 +652,7 @@ declare class AppFactory {
|
|
|
652
652
|
rejectVersion?: number | undefined;
|
|
653
653
|
sender?: ReadableAddress | undefined;
|
|
654
654
|
} | undefined) => {
|
|
655
|
-
signer?:
|
|
655
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
656
656
|
rekeyTo?: ReadableAddress | undefined;
|
|
657
657
|
note?: string | Uint8Array | undefined;
|
|
658
658
|
lease?: string | Uint8Array | undefined;
|
|
@@ -672,7 +672,7 @@ declare class AppFactory {
|
|
|
672
672
|
sender?: ReadableAddress | undefined;
|
|
673
673
|
} & {
|
|
674
674
|
sender: Address;
|
|
675
|
-
signer:
|
|
675
|
+
signer: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
676
676
|
onComplete: OnApplicationComplete.DeleteApplication;
|
|
677
677
|
};
|
|
678
678
|
};
|
|
@@ -802,14 +802,14 @@ declare class AppFactory {
|
|
|
802
802
|
compiledApproval?: CompiledTeal | undefined;
|
|
803
803
|
compiledClear?: CompiledTeal | undefined;
|
|
804
804
|
operationPerformed: "create";
|
|
805
|
-
version: string;
|
|
806
|
-
updatable?: boolean | undefined;
|
|
807
|
-
deletable?: boolean | undefined;
|
|
808
805
|
createdRound: bigint;
|
|
809
806
|
updatedRound: bigint;
|
|
810
807
|
createdMetadata: AppDeployMetadata;
|
|
811
808
|
deleted: boolean;
|
|
812
809
|
name: string;
|
|
810
|
+
version: string;
|
|
811
|
+
deletable?: boolean | undefined;
|
|
812
|
+
updatable?: boolean | undefined;
|
|
813
813
|
groupId: string | undefined;
|
|
814
814
|
txIds: string[];
|
|
815
815
|
returns?: ABIReturn[] | undefined;
|
|
@@ -848,14 +848,14 @@ declare class AppFactory {
|
|
|
848
848
|
compiledApproval?: CompiledTeal | undefined;
|
|
849
849
|
compiledClear?: CompiledTeal | undefined;
|
|
850
850
|
operationPerformed: "replace";
|
|
851
|
-
version: string;
|
|
852
|
-
updatable?: boolean | undefined;
|
|
853
|
-
deletable?: boolean | undefined;
|
|
854
851
|
createdRound: bigint;
|
|
855
852
|
updatedRound: bigint;
|
|
856
853
|
createdMetadata: AppDeployMetadata;
|
|
857
854
|
deleted: boolean;
|
|
858
855
|
name: string;
|
|
856
|
+
version: string;
|
|
857
|
+
deletable?: boolean | undefined;
|
|
858
|
+
updatable?: boolean | undefined;
|
|
859
859
|
groupId: string | undefined;
|
|
860
860
|
txIds: string[];
|
|
861
861
|
returns?: ABIReturn[] | undefined;
|
package/types/composer.js
CHANGED
|
@@ -1540,18 +1540,25 @@ var TransactionComposer = class TransactionComposer {
|
|
|
1540
1540
|
});
|
|
1541
1541
|
const signerEntries = Array.from(signerGroups);
|
|
1542
1542
|
const signedGroups = await Promise.all(signerEntries.map(([signer, indexes]) => signer(transactions, indexes)));
|
|
1543
|
-
const
|
|
1543
|
+
const rawSignedTransactions = new Array(transactionsWithSigners.length).fill(null);
|
|
1544
1544
|
signerEntries.forEach(([, indexes], signerIndex) => {
|
|
1545
1545
|
const stxs = signedGroups[signerIndex];
|
|
1546
1546
|
indexes.forEach((txIndex, stxIndex) => {
|
|
1547
|
-
|
|
1548
|
-
require_signed_transaction.validateSignedTransaction(stxn);
|
|
1549
|
-
signedTransactions[txIndex] = stxn;
|
|
1547
|
+
rawSignedTransactions[txIndex] = stxs[stxIndex] ?? null;
|
|
1550
1548
|
});
|
|
1551
1549
|
});
|
|
1552
|
-
const unsignedIndexes =
|
|
1550
|
+
const unsignedIndexes = rawSignedTransactions.map((stxn, index) => stxn == null ? index : null).filter((index) => index !== null);
|
|
1553
1551
|
if (unsignedIndexes.length > 0) throw new Error(`Transactions at indexes [${unsignedIndexes.join(", ")}] were not signed`);
|
|
1554
|
-
return
|
|
1552
|
+
return rawSignedTransactions.map((stxn, index) => {
|
|
1553
|
+
if (stxn == null) throw new Error(`Transaction at index ${index} was not signed`);
|
|
1554
|
+
try {
|
|
1555
|
+
const signedTransaction = require_signed_transaction.decodeSignedTransaction(stxn);
|
|
1556
|
+
require_signed_transaction.validateSignedTransaction(signedTransaction);
|
|
1557
|
+
return signedTransaction;
|
|
1558
|
+
} catch (err) {
|
|
1559
|
+
throw new Error(`Invalid signed transaction at index ${index}. ${err}`);
|
|
1560
|
+
}
|
|
1561
|
+
});
|
|
1555
1562
|
}
|
|
1556
1563
|
parseAbiReturnValues(confirmations) {
|
|
1557
1564
|
const abiReturns = new Array();
|