@algorandfoundation/algokit-utils 9.1.2-beta.2 → 9.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.d.ts +1 -1
- package/package.json +2 -2
- package/transaction/legacy-bridge.d.ts +1 -1
- package/transaction/transaction.js +39 -22
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +39 -22
- package/transaction/transaction.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +10 -0
- package/types/algorand-client-transaction-creator.js +8 -0
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +8 -0
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +24 -0
- package/types/algorand-client-transaction-sender.js +8 -0
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +8 -0
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/app-client.d.ts +37 -0
- package/types/app-client.js +4 -1
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +4 -1
- package/types/app-client.mjs.map +1 -1
- package/types/app-factory.d.ts +18 -0
- package/types/app-manager.d.ts +39 -0
- package/types/app-manager.js +26 -0
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +27 -2
- package/types/app-manager.mjs.map +1 -1
- package/types/composer.d.ts +11 -1
- package/types/composer.js +16 -1
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +17 -2
- package/types/composer.mjs.map +1 -1
package/types/composer.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import algosdk, { Address } from 'algosdk';
|
|
|
2
2
|
import { Config } from '../config.mjs';
|
|
3
3
|
import { encodeLease, sendAtomicTransactionComposer, getABIReturnValue } from '../transaction/transaction.mjs';
|
|
4
4
|
import { calculateExtraProgramPages, asJson } from '../util.mjs';
|
|
5
|
-
import { AppManager } from './app-manager.mjs';
|
|
5
|
+
import { AppManager, getAccessReference } from './app-manager.mjs';
|
|
6
6
|
import { EventType } from './lifecycle-events.mjs';
|
|
7
7
|
import { genesisIdIsLocalNet } from './network-client.mjs';
|
|
8
8
|
|
|
@@ -399,6 +399,7 @@ class TransactionComposer {
|
|
|
399
399
|
* appReferences: [123n, 1234n]
|
|
400
400
|
* assetReferences: [12345n]
|
|
401
401
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
402
|
+
* accessReferences: [{ appId: 1234n }]
|
|
402
403
|
* lease: 'lease',
|
|
403
404
|
* note: 'note',
|
|
404
405
|
* // You wouldn't normally set this field
|
|
@@ -444,6 +445,7 @@ class TransactionComposer {
|
|
|
444
445
|
* appReferences: [123n, 1234n]
|
|
445
446
|
* assetReferences: [12345n]
|
|
446
447
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
448
|
+
* accessReferences: [{ appId: 1234n }]
|
|
447
449
|
* lease: 'lease',
|
|
448
450
|
* note: 'note',
|
|
449
451
|
* // You wouldn't normally set this field
|
|
@@ -481,6 +483,7 @@ class TransactionComposer {
|
|
|
481
483
|
* appReferences: [123n, 1234n]
|
|
482
484
|
* assetReferences: [12345n]
|
|
483
485
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
486
|
+
* accessReferences: [{ appId: 1234n }]
|
|
484
487
|
* lease: 'lease',
|
|
485
488
|
* note: 'note',
|
|
486
489
|
* // You wouldn't normally set this field
|
|
@@ -520,6 +523,7 @@ class TransactionComposer {
|
|
|
520
523
|
* appReferences: [123n, 1234n]
|
|
521
524
|
* assetReferences: [12345n]
|
|
522
525
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
526
|
+
* accessReferences: [{ appId: 1234n }]
|
|
523
527
|
* lease: 'lease',
|
|
524
528
|
* note: 'note',
|
|
525
529
|
* // You wouldn't normally set this field
|
|
@@ -578,6 +582,7 @@ class TransactionComposer {
|
|
|
578
582
|
* appReferences: [123n, 1234n]
|
|
579
583
|
* assetReferences: [12345n]
|
|
580
584
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
585
|
+
* accessReferences: [{ appId: 1234n }]
|
|
581
586
|
* lease: 'lease',
|
|
582
587
|
* note: 'note',
|
|
583
588
|
* // You wouldn't normally set this field
|
|
@@ -629,6 +634,7 @@ class TransactionComposer {
|
|
|
629
634
|
* appReferences: [123n, 1234n]
|
|
630
635
|
* assetReferences: [12345n]
|
|
631
636
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
637
|
+
* accessReferences: [{ appId: 1234n }]
|
|
632
638
|
* lease: 'lease',
|
|
633
639
|
* note: 'note',
|
|
634
640
|
* // You wouldn't normally set this field
|
|
@@ -678,6 +684,7 @@ class TransactionComposer {
|
|
|
678
684
|
* appReferences: [123n, 1234n]
|
|
679
685
|
* assetReferences: [12345n]
|
|
680
686
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
687
|
+
* accessReferences: [{ appId: 1234n }]
|
|
681
688
|
* lease: 'lease',
|
|
682
689
|
* note: 'note',
|
|
683
690
|
* // You wouldn't normally set this field
|
|
@@ -727,6 +734,7 @@ class TransactionComposer {
|
|
|
727
734
|
* appReferences: [123n, 1234n]
|
|
728
735
|
* assetReferences: [12345n]
|
|
729
736
|
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
737
|
+
* accessReferences: [{ appId: 1234n }]
|
|
730
738
|
* lease: 'lease',
|
|
731
739
|
* note: 'note',
|
|
732
740
|
* // You wouldn't normally set this field
|
|
@@ -910,7 +918,12 @@ class TransactionComposer {
|
|
|
910
918
|
const isAbiValue = (x) => {
|
|
911
919
|
if (Array.isArray(x))
|
|
912
920
|
return x.length == 0 || x.every(isAbiValue);
|
|
913
|
-
return typeof x === 'bigint' ||
|
|
921
|
+
return (typeof x === 'bigint' ||
|
|
922
|
+
typeof x === 'boolean' ||
|
|
923
|
+
typeof x === 'number' ||
|
|
924
|
+
typeof x === 'string' ||
|
|
925
|
+
x instanceof Uint8Array ||
|
|
926
|
+
x instanceof algosdk.Address);
|
|
914
927
|
};
|
|
915
928
|
for (let i = (params.args ?? []).length - 1; i >= 0; i--) {
|
|
916
929
|
const arg = params.args[i];
|
|
@@ -1005,6 +1018,7 @@ class TransactionComposer {
|
|
|
1005
1018
|
appForeignApps: params.appReferences?.map((x) => Number(x)),
|
|
1006
1019
|
appForeignAssets: params.assetReferences?.map((x) => Number(x)),
|
|
1007
1020
|
boxes: params.boxReferences?.map(AppManager.getBoxReference),
|
|
1021
|
+
access: params.accessReferences?.map(getAccessReference),
|
|
1008
1022
|
approvalProgram,
|
|
1009
1023
|
clearProgram: clearStateProgram,
|
|
1010
1024
|
extraPages: appId === 0
|
|
@@ -1144,6 +1158,7 @@ class TransactionComposer {
|
|
|
1144
1158
|
foreignApps: params.appReferences?.map((x) => Number(x)),
|
|
1145
1159
|
foreignAssets: params.assetReferences?.map((x) => Number(x)),
|
|
1146
1160
|
boxes: params.boxReferences?.map(AppManager.getBoxReference),
|
|
1161
|
+
access: params.accessReferences?.map(getAccessReference),
|
|
1147
1162
|
approvalProgram,
|
|
1148
1163
|
clearProgram: clearStateProgram,
|
|
1149
1164
|
};
|