@algorandfoundation/algokit-utils 9.2.0-beta.9 → 9.2.0
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/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 +92 -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-factory.d.ts +18 -0
- package/types/app-manager.d.ts +11 -9
- package/types/app-manager.js +1 -0
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +1 -0
- package/types/app-manager.mjs.map +1 -1
- package/types/composer.d.ts +10 -0
- package/types/composer.js +12 -1
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +12 -1
- package/types/composer.mjs.map +1 -1
|
@@ -452,6 +452,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
452
452
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
453
453
|
* // already specified, but here for completeness
|
|
454
454
|
* maxFee: (3000).microAlgo(),
|
|
455
|
+
* rejectVersion: 1,
|
|
455
456
|
* // Signer only needed if you want to provide one,
|
|
456
457
|
* // generally you'd register it with AlgorandClient
|
|
457
458
|
* // against the sender and not need to pass it in
|
|
@@ -469,6 +470,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
469
470
|
args?: Uint8Array[] | undefined;
|
|
470
471
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
471
472
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
473
|
+
rejectVersion?: number | undefined;
|
|
472
474
|
lease?: string | Uint8Array | undefined;
|
|
473
475
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
474
476
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -524,6 +526,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
524
526
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
525
527
|
* // already specified, but here for completeness
|
|
526
528
|
* maxFee: (3000).microAlgo(),
|
|
529
|
+
* rejectVersion: 1,
|
|
527
530
|
* // Signer only needed if you want to provide one,
|
|
528
531
|
* // generally you'd register it with AlgorandClient
|
|
529
532
|
* // against the sender and not need to pass it in
|
|
@@ -554,6 +557,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
554
557
|
assetReferences?: bigint[] | undefined;
|
|
555
558
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
556
559
|
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
560
|
+
rejectVersion?: number | undefined;
|
|
557
561
|
approvalProgram: string | Uint8Array;
|
|
558
562
|
clearStateProgram: string | Uint8Array;
|
|
559
563
|
} & SendParams) => Promise<SendAppUpdateTransactionResult>;
|
|
@@ -588,6 +592,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
588
592
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
589
593
|
* // already specified, but here for completeness
|
|
590
594
|
* maxFee: (3000).microAlgo(),
|
|
595
|
+
* rejectVersion: 1,
|
|
591
596
|
* // Signer only needed if you want to provide one,
|
|
592
597
|
* // generally you'd register it with AlgorandClient
|
|
593
598
|
* // against the sender and not need to pass it in
|
|
@@ -607,6 +612,41 @@ export declare class AlgorandClientTransactionSender {
|
|
|
607
612
|
assetReferences?: bigint[] | undefined;
|
|
608
613
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
609
614
|
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
615
|
+
/**
|
|
616
|
+
* Opt an account into an Algorand Standard Asset.
|
|
617
|
+
*
|
|
618
|
+
* @param params The parameters for the asset opt-in transaction
|
|
619
|
+
*
|
|
620
|
+
* @example Basic example
|
|
621
|
+
* ```typescript
|
|
622
|
+
* await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
|
|
623
|
+
* ```
|
|
624
|
+
* @example Advanced example
|
|
625
|
+
* ```typescript
|
|
626
|
+
* await algorand.send.assetOptIn({
|
|
627
|
+
* sender: 'SENDERADDRESS',
|
|
628
|
+
* assetId: 123456n,
|
|
629
|
+
* lease: 'lease',
|
|
630
|
+
* note: 'note',
|
|
631
|
+
* // You wouldn't normally set this field
|
|
632
|
+
* firstValidRound: 1000n,
|
|
633
|
+
* validityWindow: 10,
|
|
634
|
+
* extraFee: (1000).microAlgo(),
|
|
635
|
+
* staticFee: (1000).microAlgo(),
|
|
636
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
637
|
+
* // already specified, but here for completeness
|
|
638
|
+
* maxFee: (3000).microAlgo(),
|
|
639
|
+
* // Signer only needed if you want to provide one,
|
|
640
|
+
* // generally you'd register it with AlgorandClient
|
|
641
|
+
* // against the sender and not need to pass it in
|
|
642
|
+
* signer: transactionSigner,
|
|
643
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
644
|
+
* suppressLog: true,
|
|
645
|
+
* })
|
|
646
|
+
* ```
|
|
647
|
+
* @returns The result of the asset opt-in transaction and the transaction that was sent
|
|
648
|
+
*/
|
|
649
|
+
rejectVersion?: number | undefined;
|
|
610
650
|
} & {
|
|
611
651
|
onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
612
652
|
} & SendParams) => Promise<SendAppTransactionResult>;
|
|
@@ -641,6 +681,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
641
681
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
642
682
|
* // already specified, but here for completeness
|
|
643
683
|
* maxFee: (3000).microAlgo(),
|
|
684
|
+
* rejectVersion: 1,
|
|
644
685
|
* // Signer only needed if you want to provide one,
|
|
645
686
|
* // generally you'd register it with AlgorandClient
|
|
646
687
|
* // against the sender and not need to pass it in
|
|
@@ -660,6 +701,41 @@ export declare class AlgorandClientTransactionSender {
|
|
|
660
701
|
assetReferences?: bigint[] | undefined;
|
|
661
702
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
662
703
|
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
704
|
+
/**
|
|
705
|
+
* Opt an account into an Algorand Standard Asset.
|
|
706
|
+
*
|
|
707
|
+
* @param params The parameters for the asset opt-in transaction
|
|
708
|
+
*
|
|
709
|
+
* @example Basic example
|
|
710
|
+
* ```typescript
|
|
711
|
+
* await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
|
|
712
|
+
* ```
|
|
713
|
+
* @example Advanced example
|
|
714
|
+
* ```typescript
|
|
715
|
+
* await algorand.send.assetOptIn({
|
|
716
|
+
* sender: 'SENDERADDRESS',
|
|
717
|
+
* assetId: 123456n,
|
|
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
|
+
* // Signer only needed if you want to provide one,
|
|
729
|
+
* // generally you'd register it with AlgorandClient
|
|
730
|
+
* // against the sender and not need to pass it in
|
|
731
|
+
* signer: transactionSigner,
|
|
732
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
733
|
+
* suppressLog: true,
|
|
734
|
+
* })
|
|
735
|
+
* ```
|
|
736
|
+
* @returns The result of the asset opt-in transaction and the transaction that was sent
|
|
737
|
+
*/
|
|
738
|
+
rejectVersion?: number | undefined;
|
|
663
739
|
} & {
|
|
664
740
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.ClearStateOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
665
741
|
} & SendParams) => Promise<SendAppTransactionResult>;
|
|
@@ -716,6 +792,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
716
792
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
717
793
|
* // already specified, but here for completeness
|
|
718
794
|
* maxFee: (3000).microAlgo(),
|
|
795
|
+
* rejectVersion: 1,
|
|
719
796
|
* // Signer only needed if you want to provide one,
|
|
720
797
|
* // generally you'd register it with AlgorandClient
|
|
721
798
|
* // against the sender and not need to pass it in
|
|
@@ -740,6 +817,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
740
817
|
} | undefined;
|
|
741
818
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
742
819
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
820
|
+
rejectVersion?: number | undefined;
|
|
743
821
|
lease?: string | Uint8Array | undefined;
|
|
744
822
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
745
823
|
extraProgramPages?: number | undefined;
|
|
@@ -762,6 +840,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
762
840
|
args?: Uint8Array[] | undefined;
|
|
763
841
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
764
842
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
843
|
+
rejectVersion?: number | undefined;
|
|
765
844
|
lease?: string | Uint8Array | undefined;
|
|
766
845
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
767
846
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -803,6 +882,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
803
882
|
assetReferences?: bigint[] | undefined;
|
|
804
883
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
805
884
|
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
885
|
+
rejectVersion?: number | undefined;
|
|
806
886
|
approvalProgram: string | Uint8Array;
|
|
807
887
|
clearStateProgram: string | Uint8Array;
|
|
808
888
|
}> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
@@ -852,6 +932,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
852
932
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
853
933
|
* // already specified, but here for completeness
|
|
854
934
|
* maxFee: (3000).microAlgo(),
|
|
935
|
+
* rejectVersion: 1,
|
|
855
936
|
* // Signer only needed if you want to provide one,
|
|
856
937
|
* // generally you'd register it with AlgorandClient
|
|
857
938
|
* // against the sender and not need to pass it in
|
|
@@ -871,6 +952,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
871
952
|
appId: bigint;
|
|
872
953
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
873
954
|
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
955
|
+
rejectVersion?: number | undefined;
|
|
874
956
|
lease?: string | Uint8Array | undefined;
|
|
875
957
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
876
958
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -892,6 +974,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
892
974
|
args?: Uint8Array[] | undefined;
|
|
893
975
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
894
976
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
977
|
+
rejectVersion?: number | undefined;
|
|
895
978
|
lease?: string | Uint8Array | undefined;
|
|
896
979
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
897
980
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -933,6 +1016,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
933
1016
|
assetReferences?: bigint[] | undefined;
|
|
934
1017
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
935
1018
|
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
1019
|
+
rejectVersion?: number | undefined;
|
|
936
1020
|
approvalProgram: string | Uint8Array;
|
|
937
1021
|
clearStateProgram: string | Uint8Array;
|
|
938
1022
|
}> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
@@ -980,6 +1064,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
980
1064
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
981
1065
|
* // already specified, but here for completeness
|
|
982
1066
|
* maxFee: (3000).microAlgo(),
|
|
1067
|
+
* rejectVersion: 1,
|
|
983
1068
|
* // Signer only needed if you want to provide one,
|
|
984
1069
|
* // generally you'd register it with AlgorandClient
|
|
985
1070
|
* // against the sender and not need to pass it in
|
|
@@ -997,6 +1082,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
997
1082
|
appId: bigint;
|
|
998
1083
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
999
1084
|
onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
1085
|
+
rejectVersion?: number | undefined;
|
|
1000
1086
|
lease?: string | Uint8Array | undefined;
|
|
1001
1087
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
1002
1088
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -1018,6 +1104,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
1018
1104
|
args?: Uint8Array[] | undefined;
|
|
1019
1105
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
1020
1106
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
1107
|
+
rejectVersion?: number | undefined;
|
|
1021
1108
|
lease?: string | Uint8Array | undefined;
|
|
1022
1109
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
1023
1110
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -1059,6 +1146,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
1059
1146
|
assetReferences?: bigint[] | undefined;
|
|
1060
1147
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1061
1148
|
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
1149
|
+
rejectVersion?: number | undefined;
|
|
1062
1150
|
approvalProgram: string | Uint8Array;
|
|
1063
1151
|
clearStateProgram: string | Uint8Array;
|
|
1064
1152
|
}> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
@@ -1106,6 +1194,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
1106
1194
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
1107
1195
|
* // already specified, but here for completeness
|
|
1108
1196
|
* maxFee: (3000).microAlgo(),
|
|
1197
|
+
* rejectVersion: 1,
|
|
1109
1198
|
* // Signer only needed if you want to provide one,
|
|
1110
1199
|
* // generally you'd register it with AlgorandClient
|
|
1111
1200
|
* // against the sender and not need to pass it in
|
|
@@ -1123,6 +1212,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
1123
1212
|
appId: bigint;
|
|
1124
1213
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
1125
1214
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
1215
|
+
rejectVersion?: number | undefined;
|
|
1126
1216
|
lease?: string | Uint8Array | undefined;
|
|
1127
1217
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
1128
1218
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -1144,6 +1234,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
1144
1234
|
args?: Uint8Array[] | undefined;
|
|
1145
1235
|
signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
|
|
1146
1236
|
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
1237
|
+
rejectVersion?: number | undefined;
|
|
1147
1238
|
lease?: string | Uint8Array | undefined;
|
|
1148
1239
|
rekeyTo?: string | algosdk.Address | undefined;
|
|
1149
1240
|
staticFee?: import("./amount").AlgoAmount | undefined;
|
|
@@ -1185,6 +1276,7 @@ export declare class AlgorandClientTransactionSender {
|
|
|
1185
1276
|
assetReferences?: bigint[] | undefined;
|
|
1186
1277
|
boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1187
1278
|
accessReferences?: import("./app-manager").ResourceReference[] | undefined;
|
|
1279
|
+
rejectVersion?: number | undefined;
|
|
1188
1280
|
approvalProgram: string | Uint8Array;
|
|
1189
1281
|
clearStateProgram: string | Uint8Array;
|
|
1190
1282
|
}> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
@@ -431,6 +431,7 @@ class AlgorandClientTransactionSender {
|
|
|
431
431
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
432
432
|
* // already specified, but here for completeness
|
|
433
433
|
* maxFee: (3000).microAlgo(),
|
|
434
|
+
* rejectVersion: 1,
|
|
434
435
|
* // Signer only needed if you want to provide one,
|
|
435
436
|
* // generally you'd register it with AlgorandClient
|
|
436
437
|
* // against the sender and not need to pass it in
|
|
@@ -477,6 +478,7 @@ class AlgorandClientTransactionSender {
|
|
|
477
478
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
478
479
|
* // already specified, but here for completeness
|
|
479
480
|
* maxFee: (3000).microAlgo(),
|
|
481
|
+
* rejectVersion: 1,
|
|
480
482
|
* // Signer only needed if you want to provide one,
|
|
481
483
|
* // generally you'd register it with AlgorandClient
|
|
482
484
|
* // against the sender and not need to pass it in
|
|
@@ -521,6 +523,7 @@ class AlgorandClientTransactionSender {
|
|
|
521
523
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
522
524
|
* // already specified, but here for completeness
|
|
523
525
|
* maxFee: (3000).microAlgo(),
|
|
526
|
+
* rejectVersion: 1,
|
|
524
527
|
* // Signer only needed if you want to provide one,
|
|
525
528
|
* // generally you'd register it with AlgorandClient
|
|
526
529
|
* // against the sender and not need to pass it in
|
|
@@ -565,6 +568,7 @@ class AlgorandClientTransactionSender {
|
|
|
565
568
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
566
569
|
* // already specified, but here for completeness
|
|
567
570
|
* maxFee: (3000).microAlgo(),
|
|
571
|
+
* rejectVersion: 1,
|
|
568
572
|
* // Signer only needed if you want to provide one,
|
|
569
573
|
* // generally you'd register it with AlgorandClient
|
|
570
574
|
* // against the sender and not need to pass it in
|
|
@@ -631,6 +635,7 @@ class AlgorandClientTransactionSender {
|
|
|
631
635
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
632
636
|
* // already specified, but here for completeness
|
|
633
637
|
* maxFee: (3000).microAlgo(),
|
|
638
|
+
* rejectVersion: 1,
|
|
634
639
|
* // Signer only needed if you want to provide one,
|
|
635
640
|
* // generally you'd register it with AlgorandClient
|
|
636
641
|
* // against the sender and not need to pass it in
|
|
@@ -689,6 +694,7 @@ class AlgorandClientTransactionSender {
|
|
|
689
694
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
690
695
|
* // already specified, but here for completeness
|
|
691
696
|
* maxFee: (3000).microAlgo(),
|
|
697
|
+
* rejectVersion: 1,
|
|
692
698
|
* // Signer only needed if you want to provide one,
|
|
693
699
|
* // generally you'd register it with AlgorandClient
|
|
694
700
|
* // against the sender and not need to pass it in
|
|
@@ -745,6 +751,7 @@ class AlgorandClientTransactionSender {
|
|
|
745
751
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
746
752
|
* // already specified, but here for completeness
|
|
747
753
|
* maxFee: (3000).microAlgo(),
|
|
754
|
+
* rejectVersion: 1,
|
|
748
755
|
* // Signer only needed if you want to provide one,
|
|
749
756
|
* // generally you'd register it with AlgorandClient
|
|
750
757
|
* // against the sender and not need to pass it in
|
|
@@ -801,6 +808,7 @@ class AlgorandClientTransactionSender {
|
|
|
801
808
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
802
809
|
* // already specified, but here for completeness
|
|
803
810
|
* maxFee: (3000).microAlgo(),
|
|
811
|
+
* rejectVersion: 1,
|
|
804
812
|
* // Signer only needed if you want to provide one,
|
|
805
813
|
* // generally you'd register it with AlgorandClient
|
|
806
814
|
* // against the sender and not need to pass it in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algorand-client-transaction-sender.js","sources":["../../src/types/algorand-client-transaction-sender.ts"],"sourcesContent":["import algosdk, { Address } from 'algosdk'\nimport { Buffer } from 'buffer'\nimport { Config } from '../config'\nimport { asJson, defaultJsonValueReplacer } from '../util'\nimport { SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult } from './app'\nimport { AppManager } from './app-manager'\nimport { AssetManager } from './asset-manager'\nimport {\n AppCallMethodCall,\n AppCallParams,\n AppCreateMethodCall,\n AppCreateParams,\n AppDeleteMethodCall,\n AppDeleteParams,\n AppUpdateMethodCall,\n AppUpdateParams,\n AssetCreateParams,\n AssetOptOutParams,\n TransactionComposer,\n} from './composer'\nimport { SendParams, SendSingleTransactionResult } from './transaction'\nimport Transaction = algosdk.Transaction\n\nconst getMethodCallForLog = ({ method, args }: { method: algosdk.ABIMethod; args?: unknown[] }) => {\n return `${method.name}(${(args ?? []).map((a) =>\n typeof a === 'object'\n ? asJson(a, (k, v) => {\n const newV = defaultJsonValueReplacer(k, v)\n return newV instanceof Uint8Array ? Buffer.from(newV).toString('base64') : newV\n })\n : a,\n )})`\n}\n\n/** Orchestrates sending transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionSender {\n private _newGroup: () => TransactionComposer\n private _assetManager: AssetManager\n private _appManager: AppManager\n\n /**\n * Creates a new `AlgorandClientSender`\n * @param newGroup A lambda that starts a new `TransactionComposer` transaction group\n * @param assetManager An `AssetManager` instance\n * @param appManager An `AppManager` instance\n * @example\n * ```typescript\n * const transactionSender = new AlgorandClientTransactionSender(() => new TransactionComposer(), assetManager, appManager)\n * ```\n */\n constructor(newGroup: () => TransactionComposer, assetManager: AssetManager, appManager: AppManager) {\n this._newGroup = newGroup\n this._assetManager = assetManager\n this._appManager = appManager\n }\n\n /**\n * Start a new `TransactionComposer` transaction group\n * @returns A new instance of `TransactionComposer`.\n * @example\n * const composer = AlgorandClient.mainNet().send.newGroup();\n * const result = await composer.addTransaction(payment).send()\n */\n newGroup() {\n return this._newGroup()\n }\n\n private _send<T>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendSingleTransactionResult> {\n return async (params) => {\n const composer = this._newGroup()\n\n // Ensure `this` is properly populated\n c(composer).apply(composer, [params])\n\n if (log?.preLog) {\n const transaction = (await composer.build()).transactions.at(-1)!.txn\n Config.getLogger(params?.suppressLog).debug(log.preLog(params, transaction))\n }\n\n const rawResult = await composer.send(params)\n const result = {\n // Last item covers when a group is created by an app call with ABI transaction parameters\n transaction: rawResult.transactions.at(-1)!,\n confirmation: rawResult.confirmations.at(-1)!,\n txId: rawResult.txIds.at(-1)!,\n ...rawResult,\n }\n\n if (log?.postLog) {\n Config.getLogger(params?.suppressLog).debug(log.postLog(params, result))\n }\n\n return result\n }\n }\n\n private _sendAppCall<\n T extends\n | AppCreateParams\n | AppUpdateParams\n | AppCallParams\n | AppDeleteParams\n | AppCreateMethodCall\n | AppUpdateMethodCall\n | AppCallMethodCall\n | AppDeleteMethodCall,\n >(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendAppTransactionResult> {\n return async (params) => {\n const result = await this._send(c, log)(params)\n\n return { ...result, return: AppManager.getABIReturn(result.confirmation, 'method' in params ? params.method : undefined) }\n }\n }\n\n private _sendAppUpdateCall<T extends AppCreateParams | AppUpdateParams | AppCreateMethodCall | AppUpdateMethodCall>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendAppUpdateTransactionResult> {\n return async (params) => {\n const result = await this._sendAppCall(c, log)(params)\n\n const compiledApproval =\n typeof params.approvalProgram === 'string' ? this._appManager.getCompilationResult(params.approvalProgram) : undefined\n const compiledClear =\n typeof params.clearStateProgram === 'string' ? this._appManager.getCompilationResult(params.clearStateProgram) : undefined\n\n return { ...result, compiledApproval, compiledClear }\n }\n }\n\n private _sendAppCreateCall<T extends AppCreateParams | AppCreateMethodCall>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendAppCreateTransactionResult> {\n return async (params) => {\n const result = await this._sendAppUpdateCall(c, log)(params)\n\n return {\n ...result,\n appId: BigInt(result.confirmation.applicationIndex!),\n appAddress: algosdk.getApplicationAddress(result.confirmation.applicationIndex!),\n }\n }\n }\n\n /**\n * Send a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the payment transaction and the transaction that was sent\n */\n payment = this._send((c) => c.addPayment, {\n preLog: (params, transaction) =>\n `Sending ${params.amount.microAlgo} µALGO from ${params.sender} to ${params.receiver} via transaction ${transaction.txID()}`,\n })\n /**\n * Create a new Algorand Standard Asset.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetCreate({ sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset create transaction and the transaction that was sent\n */\n assetCreate = async (params: AssetCreateParams & SendParams) => {\n const result = await this._send((c) => c.addAssetCreate, {\n postLog: (params, result) =>\n `Created asset${params.assetName ? ` ${params.assetName}` : ''}${params.unitName ? ` (${params.unitName})` : ''} with ${params.total} units and ${params.decimals ?? 0} decimals created by ${params.sender} with ID ${result.confirmation.assetIndex} via transaction ${result.txIds.at(-1)}`,\n })(params)\n return { ...result, assetId: BigInt(result.confirmation.assetIndex ?? 0) }\n }\n /**\n * Configure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetConfig({ sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset config transaction and the transaction that was sent\n */\n assetConfig = this._send((c) => c.addAssetConfig, {\n preLog: (params, transaction) => `Configuring asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Freeze or unfreeze an Algorand Standard Asset for an account.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetFreeze({ sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset freeze transaction and the transaction that was sent\n */\n assetFreeze = this._send((c) => c.addAssetFreeze, {\n preLog: (params, transaction) => `Freezing asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Destroys an Algorand Standard Asset.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetDestroy({ sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset destroy transaction and the transaction that was sent\n */\n assetDestroy = this._send((c) => c.addAssetDestroy, {\n preLog: (params, transaction) => `Destroying asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Transfer an Algorand Standard Asset.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetTransfer({ sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.send.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset transfer transaction and the transaction that was sent\n */\n assetTransfer = this._send((c) => c.addAssetTransfer, {\n preLog: (params, transaction) =>\n `Transferring ${params.amount} units of asset with ID ${params.assetId} from ${params.sender} to ${params.receiver} via transaction ${transaction.txID()}`,\n })\n /**\n * Opt an account into an Algorand Standard Asset.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetOptIn({ sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset opt-in transaction and the transaction that was sent\n */\n assetOptIn = this._send((c) => c.addAssetOptIn, {\n preLog: (params, transaction) => `Opting in ${params.sender} to asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Opt an account out of an Algorand Standard Asset.\n *\n * *Note:* If the account has a balance of the asset,\n * it will not be able to opt-out unless `ensureZeroBalance`\n * is set to `false` (but then the account will lose the assets).\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example (without creator, will be retrieved from algod)\n * ```typescript\n * await algorand.send.assetOptOut({ sender: \"SENDERADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Basic example (with creator)\n * ```typescript\n * await algorand.send.assetOptOut({ sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetOptOut({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset opt-out transaction and the transaction that was sent\n */\n assetOptOut = async (\n params: Omit<AssetOptOutParams, 'creator'> & {\n /** Optional asset creator account address; if not specified it will be retrieved from algod */\n creator?: string | Address\n /** Whether or not to check if the account has a zero balance first or not.\n *\n * If this is set to `true` and the account has an asset balance it will throw an error.\n *\n * If this is set to `false` and the account has an asset balance it will lose those assets to the asset creator.\n */\n ensureZeroBalance: boolean\n } & SendParams,\n ) => {\n if (params.ensureZeroBalance) {\n let balance = 0n\n try {\n const accountAssetInfo = await this._assetManager.getAccountInformation(params.sender, params.assetId)\n balance = accountAssetInfo.balance\n } catch {\n throw new Error(`Account ${params.sender} is not opted-in to Asset ${params.assetId}; can't opt-out.`)\n }\n if (balance !== 0n) {\n throw new Error(`Account ${params.sender} does not have a zero balance for Asset ${params.assetId}; can't opt-out.`)\n }\n }\n\n params.creator = params.creator ?? (await this._assetManager.getById(params.assetId)).creator\n\n return await this._send((c) => c.addAssetOptOut, {\n preLog: (params, transaction) =>\n `Opting ${params.sender} out of asset with ID ${params.assetId} to creator ${params.creator} via transaction ${transaction.txID()}`,\n })(params as AssetOptOutParams & SendParams)\n }\n /**\n * Create a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app create transaction and the transaction that was sent\n */\n appCreate = this._sendAppCreateCall((c) => c.addAppCreate, {\n postLog: (params, result) =>\n `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Update a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app update transaction and the transaction that was sent\n */\n appUpdate = this._sendAppUpdateCall((c) => c.addAppUpdate, {\n postLog: (params, result) =>\n `App ${params.appId} updated ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Delete a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app delete transaction and the transaction that was sent\n */\n appDelete = this._sendAppCall((c) => c.addAppDelete, {\n postLog: (params, result) =>\n `App ${params.appId} deleted ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Call a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app call transaction and the transaction that was sent\n */\n appCall = this._sendAppCall((c) => c.addAppCall, {\n postLog: (params, result) =>\n `App ${params.appId} called ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Create a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCreateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method create transaction and the transaction that was sent\n */\n appCreateMethodCall = this._sendAppCreateCall((c) => c.addAppCreateMethodCall, {\n postLog: (params, result) =>\n `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Update a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method update transaction and the transaction that was sent\n */\n appUpdateMethodCall = this._sendAppUpdateCall((c) => c.addAppUpdateMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} updated with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Delete a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method delete transaction and the transaction that was sent\n */\n appDeleteMethodCall = this._sendAppCall((c) => c.addAppDeleteMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} deleted with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Call a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method call transaction and the transaction that was sent\n */\n appCallMethodCall = this._sendAppCall((c) => c.addAppCallMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} called with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Register an online key.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the online key registration transaction and the transaction that was sent\n */\n onlineKeyRegistration = this._send((c) => c.addOnlineKeyRegistration, {\n preLog: (params, transaction) => `Registering online key for ${params.sender} via transaction ${transaction.txID()}`,\n })\n\n /**\n * Register an offline key.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the offline key registration transaction and the transaction that was sent\n */\n offlineKeyRegistration = this._send((c) => c.addOfflineKeyRegistration, {\n preLog: (params, transaction) => `Registering offline key for ${params.sender} via transaction ${transaction.txID()}`,\n })\n}\n"],"names":["asJson","defaultJsonValueReplacer","Buffer","Config","AppManager"],"mappings":";;;;;;;;AAuBA,MAAM,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAmD,KAAI;IAChG,OAAO,CAAA,EAAG,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,GAAG,CAAC,C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AM,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;YAEtD,MAAM,gBAAgB,GACpB,OAAO,MAAM,CAAC,eAAe,KAAK,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,SAAS;YACxH,MAAM,aAAa,GACjB,OAAO,MAAM,CAAC,iBAAiB,KAAK,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,SAAS;YAE5H,OAAO,EAAE,GAAG,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE;AACvD,SAAC;;IAGK,kBAAkB,CACxB,CAAiE,EACjE,GAGC,EAAA;AAED,QAAA,OAAO,OAAO,MAAM,KAAI;AACtB,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;YAE5D,OAAO;AACL,gBAAA,GAAG,MAAM;gBACT,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAiB,CAAC;gBACpD,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAiB,CAAC;aACjF;AACH,SAAC;;AAo4BJ;;;;"}
|
|
1
|
+
{"version":3,"file":"algorand-client-transaction-sender.js","sources":["../../src/types/algorand-client-transaction-sender.ts"],"sourcesContent":["import algosdk, { Address } from 'algosdk'\nimport { Buffer } from 'buffer'\nimport { Config } from '../config'\nimport { asJson, defaultJsonValueReplacer } from '../util'\nimport { SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult } from './app'\nimport { AppManager } from './app-manager'\nimport { AssetManager } from './asset-manager'\nimport {\n AppCallMethodCall,\n AppCallParams,\n AppCreateMethodCall,\n AppCreateParams,\n AppDeleteMethodCall,\n AppDeleteParams,\n AppUpdateMethodCall,\n AppUpdateParams,\n AssetCreateParams,\n AssetOptOutParams,\n TransactionComposer,\n} from './composer'\nimport { SendParams, SendSingleTransactionResult } from './transaction'\nimport Transaction = algosdk.Transaction\n\nconst getMethodCallForLog = ({ method, args }: { method: algosdk.ABIMethod; args?: unknown[] }) => {\n return `${method.name}(${(args ?? []).map((a) =>\n typeof a === 'object'\n ? asJson(a, (k, v) => {\n const newV = defaultJsonValueReplacer(k, v)\n return newV instanceof Uint8Array ? Buffer.from(newV).toString('base64') : newV\n })\n : a,\n )})`\n}\n\n/** Orchestrates sending transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionSender {\n private _newGroup: () => TransactionComposer\n private _assetManager: AssetManager\n private _appManager: AppManager\n\n /**\n * Creates a new `AlgorandClientSender`\n * @param newGroup A lambda that starts a new `TransactionComposer` transaction group\n * @param assetManager An `AssetManager` instance\n * @param appManager An `AppManager` instance\n * @example\n * ```typescript\n * const transactionSender = new AlgorandClientTransactionSender(() => new TransactionComposer(), assetManager, appManager)\n * ```\n */\n constructor(newGroup: () => TransactionComposer, assetManager: AssetManager, appManager: AppManager) {\n this._newGroup = newGroup\n this._assetManager = assetManager\n this._appManager = appManager\n }\n\n /**\n * Start a new `TransactionComposer` transaction group\n * @returns A new instance of `TransactionComposer`.\n * @example\n * const composer = AlgorandClient.mainNet().send.newGroup();\n * const result = await composer.addTransaction(payment).send()\n */\n newGroup() {\n return this._newGroup()\n }\n\n private _send<T>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendSingleTransactionResult> {\n return async (params) => {\n const composer = this._newGroup()\n\n // Ensure `this` is properly populated\n c(composer).apply(composer, [params])\n\n if (log?.preLog) {\n const transaction = (await composer.build()).transactions.at(-1)!.txn\n Config.getLogger(params?.suppressLog).debug(log.preLog(params, transaction))\n }\n\n const rawResult = await composer.send(params)\n const result = {\n // Last item covers when a group is created by an app call with ABI transaction parameters\n transaction: rawResult.transactions.at(-1)!,\n confirmation: rawResult.confirmations.at(-1)!,\n txId: rawResult.txIds.at(-1)!,\n ...rawResult,\n }\n\n if (log?.postLog) {\n Config.getLogger(params?.suppressLog).debug(log.postLog(params, result))\n }\n\n return result\n }\n }\n\n private _sendAppCall<\n T extends\n | AppCreateParams\n | AppUpdateParams\n | AppCallParams\n | AppDeleteParams\n | AppCreateMethodCall\n | AppUpdateMethodCall\n | AppCallMethodCall\n | AppDeleteMethodCall,\n >(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendAppTransactionResult> {\n return async (params) => {\n const result = await this._send(c, log)(params)\n\n return { ...result, return: AppManager.getABIReturn(result.confirmation, 'method' in params ? params.method : undefined) }\n }\n }\n\n private _sendAppUpdateCall<T extends AppCreateParams | AppUpdateParams | AppCreateMethodCall | AppUpdateMethodCall>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendAppUpdateTransactionResult> {\n return async (params) => {\n const result = await this._sendAppCall(c, log)(params)\n\n const compiledApproval =\n typeof params.approvalProgram === 'string' ? this._appManager.getCompilationResult(params.approvalProgram) : undefined\n const compiledClear =\n typeof params.clearStateProgram === 'string' ? this._appManager.getCompilationResult(params.clearStateProgram) : undefined\n\n return { ...result, compiledApproval, compiledClear }\n }\n }\n\n private _sendAppCreateCall<T extends AppCreateParams | AppCreateMethodCall>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & SendParams) => Promise<SendAppCreateTransactionResult> {\n return async (params) => {\n const result = await this._sendAppUpdateCall(c, log)(params)\n\n return {\n ...result,\n appId: BigInt(result.confirmation.applicationIndex!),\n appAddress: algosdk.getApplicationAddress(result.confirmation.applicationIndex!),\n }\n }\n }\n\n /**\n * Send a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the payment transaction and the transaction that was sent\n */\n payment = this._send((c) => c.addPayment, {\n preLog: (params, transaction) =>\n `Sending ${params.amount.microAlgo} µALGO from ${params.sender} to ${params.receiver} via transaction ${transaction.txID()}`,\n })\n /**\n * Create a new Algorand Standard Asset.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetCreate({ sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset create transaction and the transaction that was sent\n */\n assetCreate = async (params: AssetCreateParams & SendParams) => {\n const result = await this._send((c) => c.addAssetCreate, {\n postLog: (params, result) =>\n `Created asset${params.assetName ? ` ${params.assetName}` : ''}${params.unitName ? ` (${params.unitName})` : ''} with ${params.total} units and ${params.decimals ?? 0} decimals created by ${params.sender} with ID ${result.confirmation.assetIndex} via transaction ${result.txIds.at(-1)}`,\n })(params)\n return { ...result, assetId: BigInt(result.confirmation.assetIndex ?? 0) }\n }\n /**\n * Configure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetConfig({ sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset config transaction and the transaction that was sent\n */\n assetConfig = this._send((c) => c.addAssetConfig, {\n preLog: (params, transaction) => `Configuring asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Freeze or unfreeze an Algorand Standard Asset for an account.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetFreeze({ sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset freeze transaction and the transaction that was sent\n */\n assetFreeze = this._send((c) => c.addAssetFreeze, {\n preLog: (params, transaction) => `Freezing asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Destroys an Algorand Standard Asset.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetDestroy({ sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset destroy transaction and the transaction that was sent\n */\n assetDestroy = this._send((c) => c.addAssetDestroy, {\n preLog: (params, transaction) => `Destroying asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Transfer an Algorand Standard Asset.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetTransfer({ sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.send.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset transfer transaction and the transaction that was sent\n */\n assetTransfer = this._send((c) => c.addAssetTransfer, {\n preLog: (params, transaction) =>\n `Transferring ${params.amount} units of asset with ID ${params.assetId} from ${params.sender} to ${params.receiver} via transaction ${transaction.txID()}`,\n })\n /**\n * Opt an account into an Algorand Standard Asset.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetOptIn({ sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset opt-in transaction and the transaction that was sent\n */\n assetOptIn = this._send((c) => c.addAssetOptIn, {\n preLog: (params, transaction) => `Opting in ${params.sender} to asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Opt an account out of an Algorand Standard Asset.\n *\n * *Note:* If the account has a balance of the asset,\n * it will not be able to opt-out unless `ensureZeroBalance`\n * is set to `false` (but then the account will lose the assets).\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example (without creator, will be retrieved from algod)\n * ```typescript\n * await algorand.send.assetOptOut({ sender: \"SENDERADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Basic example (with creator)\n * ```typescript\n * await algorand.send.assetOptOut({ sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetOptOut({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the asset opt-out transaction and the transaction that was sent\n */\n assetOptOut = async (\n params: Omit<AssetOptOutParams, 'creator'> & {\n /** Optional asset creator account address; if not specified it will be retrieved from algod */\n creator?: string | Address\n /** Whether or not to check if the account has a zero balance first or not.\n *\n * If this is set to `true` and the account has an asset balance it will throw an error.\n *\n * If this is set to `false` and the account has an asset balance it will lose those assets to the asset creator.\n */\n ensureZeroBalance: boolean\n } & SendParams,\n ) => {\n if (params.ensureZeroBalance) {\n let balance = 0n\n try {\n const accountAssetInfo = await this._assetManager.getAccountInformation(params.sender, params.assetId)\n balance = accountAssetInfo.balance\n } catch {\n throw new Error(`Account ${params.sender} is not opted-in to Asset ${params.assetId}; can't opt-out.`)\n }\n if (balance !== 0n) {\n throw new Error(`Account ${params.sender} does not have a zero balance for Asset ${params.assetId}; can't opt-out.`)\n }\n }\n\n params.creator = params.creator ?? (await this._assetManager.getById(params.assetId)).creator\n\n return await this._send((c) => c.addAssetOptOut, {\n preLog: (params, transaction) =>\n `Opting ${params.sender} out of asset with ID ${params.assetId} to creator ${params.creator} via transaction ${transaction.txID()}`,\n })(params as AssetOptOutParams & SendParams)\n }\n /**\n * Create a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app create transaction and the transaction that was sent\n */\n appCreate = this._sendAppCreateCall((c) => c.addAppCreate, {\n postLog: (params, result) =>\n `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Update a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app update transaction and the transaction that was sent\n */\n appUpdate = this._sendAppUpdateCall((c) => c.addAppUpdate, {\n postLog: (params, result) =>\n `App ${params.appId} updated ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Delete a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app delete transaction and the transaction that was sent\n */\n appDelete = this._sendAppCall((c) => c.addAppDelete, {\n postLog: (params, result) =>\n `App ${params.appId} deleted ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Call a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the app call transaction and the transaction that was sent\n */\n appCall = this._sendAppCall((c) => c.addAppCall, {\n postLog: (params, result) =>\n `App ${params.appId} called ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Create a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCreateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method create transaction and the transaction that was sent\n */\n appCreateMethodCall = this._sendAppCreateCall((c) => c.addAppCreateMethodCall, {\n postLog: (params, result) =>\n `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Update a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method update transaction and the transaction that was sent\n */\n appUpdateMethodCall = this._sendAppUpdateCall((c) => c.addAppUpdateMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} updated with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Delete a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method delete transaction and the transaction that was sent\n */\n appDeleteMethodCall = this._sendAppCall((c) => c.addAppDeleteMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} deleted with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Call a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n * @returns The result of the application ABI method call transaction and the transaction that was sent\n */\n appCallMethodCall = this._sendAppCall((c) => c.addAppCallMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} called with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Register an online key.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the online key registration transaction and the transaction that was sent\n */\n onlineKeyRegistration = this._send((c) => c.addOnlineKeyRegistration, {\n preLog: (params, transaction) => `Registering online key for ${params.sender} via transaction ${transaction.txID()}`,\n })\n\n /**\n * Register an offline key.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the offline key registration transaction and the transaction that was sent\n */\n offlineKeyRegistration = this._send((c) => c.addOfflineKeyRegistration, {\n preLog: (params, transaction) => `Registering offline key for ${params.sender} via transaction ${transaction.txID()}`,\n })\n}\n"],"names":["asJson","defaultJsonValueReplacer","Buffer","Config","AppManager"],"mappings":";;;;;;;;AAuBA,MAAM,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAmD,KAAI;IAChG,OAAO,CAAA,EAAG,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,KAC1C,OAAO,CAAC,KAAK;UACTA,WAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAI;YACjB,MAAM,IAAI,GAAGC,6BAAwB,CAAC,CAAC,EAAE,CAAC,CAAC;YAC3C,OAAO,IAAI,YAAY,UAAU,GAAGC,aAAM,CAAC,IAAI,C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