@algorandfoundation/algokit-utils 9.1.2 → 9.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -441,6 +441,7 @@ export declare class AlgorandClientTransactionSender {
441
441
  * appReferences: [123n, 1234n]
442
442
  * assetReferences: [12345n]
443
443
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
444
+ * accessReferences: [{ appId: 1234n }]
444
445
  * lease: 'lease',
445
446
  * note: 'note',
446
447
  * // You wouldn't normally set this field
@@ -479,6 +480,7 @@ export declare class AlgorandClientTransactionSender {
479
480
  appReferences?: bigint[] | undefined;
480
481
  assetReferences?: bigint[] | undefined;
481
482
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
483
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
482
484
  approvalProgram: string | Uint8Array;
483
485
  clearStateProgram: string | Uint8Array;
484
486
  schema?: {
@@ -511,6 +513,7 @@ export declare class AlgorandClientTransactionSender {
511
513
  * appReferences: [123n, 1234n]
512
514
  * assetReferences: [12345n]
513
515
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
516
+ * accessReferences: [{ appId: 1234n }]
514
517
  * lease: 'lease',
515
518
  * note: 'note',
516
519
  * // You wouldn't normally set this field
@@ -550,6 +553,7 @@ export declare class AlgorandClientTransactionSender {
550
553
  appReferences?: bigint[] | undefined;
551
554
  assetReferences?: bigint[] | undefined;
552
555
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
556
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
553
557
  approvalProgram: string | Uint8Array;
554
558
  clearStateProgram: string | Uint8Array;
555
559
  } & SendParams) => Promise<SendAppUpdateTransactionResult>;
@@ -573,6 +577,7 @@ export declare class AlgorandClientTransactionSender {
573
577
  * appReferences: [123n, 1234n]
574
578
  * assetReferences: [12345n]
575
579
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
580
+ * accessReferences: [{ appId: 1234n }]
576
581
  * lease: 'lease',
577
582
  * note: 'note',
578
583
  * // You wouldn't normally set this field
@@ -601,6 +606,7 @@ export declare class AlgorandClientTransactionSender {
601
606
  appReferences?: bigint[] | undefined;
602
607
  assetReferences?: bigint[] | undefined;
603
608
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
609
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
604
610
  } & {
605
611
  onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
606
612
  } & SendParams) => Promise<SendAppTransactionResult>;
@@ -624,6 +630,7 @@ export declare class AlgorandClientTransactionSender {
624
630
  * appReferences: [123n, 1234n]
625
631
  * assetReferences: [12345n]
626
632
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
633
+ * accessReferences: [{ appId: 1234n }]
627
634
  * lease: 'lease',
628
635
  * note: 'note',
629
636
  * // You wouldn't normally set this field
@@ -652,6 +659,7 @@ export declare class AlgorandClientTransactionSender {
652
659
  appReferences?: bigint[] | undefined;
653
660
  assetReferences?: bigint[] | undefined;
654
661
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
662
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
655
663
  } & {
656
664
  onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.ClearStateOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
657
665
  } & SendParams) => Promise<SendAppTransactionResult>;
@@ -697,6 +705,7 @@ export declare class AlgorandClientTransactionSender {
697
705
  * appReferences: [123n, 1234n]
698
706
  * assetReferences: [12345n]
699
707
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
708
+ * accessReferences: [{ appId: 1234n }]
700
709
  * lease: 'lease',
701
710
  * note: 'note',
702
711
  * // You wouldn't normally set this field
@@ -743,6 +752,7 @@ export declare class AlgorandClientTransactionSender {
743
752
  appReferences?: bigint[] | undefined;
744
753
  assetReferences?: bigint[] | undefined;
745
754
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
755
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
746
756
  } & {
747
757
  method: algosdk.ABIMethod;
748
758
  args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
@@ -763,6 +773,7 @@ export declare class AlgorandClientTransactionSender {
763
773
  appReferences?: bigint[] | undefined;
764
774
  assetReferences?: bigint[] | undefined;
765
775
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
776
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
766
777
  approvalProgram: string | Uint8Array;
767
778
  clearStateProgram: string | Uint8Array;
768
779
  schema?: {
@@ -791,6 +802,7 @@ export declare class AlgorandClientTransactionSender {
791
802
  appReferences?: bigint[] | undefined;
792
803
  assetReferences?: bigint[] | undefined;
793
804
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
805
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
794
806
  approvalProgram: string | Uint8Array;
795
807
  clearStateProgram: string | Uint8Array;
796
808
  }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
@@ -829,6 +841,7 @@ export declare class AlgorandClientTransactionSender {
829
841
  * appReferences: [123n, 1234n]
830
842
  * assetReferences: [12345n]
831
843
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
844
+ * accessReferences: [{ appId: 1234n }]
832
845
  * lease: 'lease',
833
846
  * note: 'note',
834
847
  * // You wouldn't normally set this field
@@ -869,6 +882,7 @@ export declare class AlgorandClientTransactionSender {
869
882
  appReferences?: bigint[] | undefined;
870
883
  assetReferences?: bigint[] | undefined;
871
884
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
885
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
872
886
  } & {
873
887
  method: algosdk.ABIMethod;
874
888
  args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
@@ -889,6 +903,7 @@ export declare class AlgorandClientTransactionSender {
889
903
  appReferences?: bigint[] | undefined;
890
904
  assetReferences?: bigint[] | undefined;
891
905
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
906
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
892
907
  approvalProgram: string | Uint8Array;
893
908
  clearStateProgram: string | Uint8Array;
894
909
  schema?: {
@@ -917,6 +932,7 @@ export declare class AlgorandClientTransactionSender {
917
932
  appReferences?: bigint[] | undefined;
918
933
  assetReferences?: bigint[] | undefined;
919
934
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
935
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
920
936
  approvalProgram: string | Uint8Array;
921
937
  clearStateProgram: string | Uint8Array;
922
938
  }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
@@ -953,6 +969,7 @@ export declare class AlgorandClientTransactionSender {
953
969
  * appReferences: [123n, 1234n]
954
970
  * assetReferences: [12345n]
955
971
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
972
+ * accessReferences: [{ appId: 1234n }]
956
973
  * lease: 'lease',
957
974
  * note: 'note',
958
975
  * // You wouldn't normally set this field
@@ -991,6 +1008,7 @@ export declare class AlgorandClientTransactionSender {
991
1008
  appReferences?: bigint[] | undefined;
992
1009
  assetReferences?: bigint[] | undefined;
993
1010
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1011
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
994
1012
  } & {
995
1013
  method: algosdk.ABIMethod;
996
1014
  args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
@@ -1011,6 +1029,7 @@ export declare class AlgorandClientTransactionSender {
1011
1029
  appReferences?: bigint[] | undefined;
1012
1030
  assetReferences?: bigint[] | undefined;
1013
1031
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1032
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
1014
1033
  approvalProgram: string | Uint8Array;
1015
1034
  clearStateProgram: string | Uint8Array;
1016
1035
  schema?: {
@@ -1039,6 +1058,7 @@ export declare class AlgorandClientTransactionSender {
1039
1058
  appReferences?: bigint[] | undefined;
1040
1059
  assetReferences?: bigint[] | undefined;
1041
1060
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1061
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
1042
1062
  approvalProgram: string | Uint8Array;
1043
1063
  clearStateProgram: string | Uint8Array;
1044
1064
  }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
@@ -1075,6 +1095,7 @@ export declare class AlgorandClientTransactionSender {
1075
1095
  * appReferences: [123n, 1234n]
1076
1096
  * assetReferences: [12345n]
1077
1097
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
1098
+ * accessReferences: [{ appId: 1234n }]
1078
1099
  * lease: 'lease',
1079
1100
  * note: 'note',
1080
1101
  * // You wouldn't normally set this field
@@ -1113,6 +1134,7 @@ export declare class AlgorandClientTransactionSender {
1113
1134
  appReferences?: bigint[] | undefined;
1114
1135
  assetReferences?: bigint[] | undefined;
1115
1136
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1137
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
1116
1138
  } & {
1117
1139
  method: algosdk.ABIMethod;
1118
1140
  args?: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | import("./composer").AppMethodCall<{
@@ -1133,6 +1155,7 @@ export declare class AlgorandClientTransactionSender {
1133
1155
  appReferences?: bigint[] | undefined;
1134
1156
  assetReferences?: bigint[] | undefined;
1135
1157
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1158
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
1136
1159
  approvalProgram: string | Uint8Array;
1137
1160
  clearStateProgram: string | Uint8Array;
1138
1161
  schema?: {
@@ -1161,6 +1184,7 @@ export declare class AlgorandClientTransactionSender {
1161
1184
  appReferences?: bigint[] | undefined;
1162
1185
  assetReferences?: bigint[] | undefined;
1163
1186
  boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1187
+ accessReferences?: import("./app-manager").AccessReference[] | undefined;
1164
1188
  approvalProgram: string | Uint8Array;
1165
1189
  clearStateProgram: string | Uint8Array;
1166
1190
  }> | import("./composer").AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
@@ -420,6 +420,7 @@ class AlgorandClientTransactionSender {
420
420
  * appReferences: [123n, 1234n]
421
421
  * assetReferences: [12345n]
422
422
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
423
+ * accessReferences: [{ appId: 1234n }]
423
424
  * lease: 'lease',
424
425
  * note: 'note',
425
426
  * // You wouldn't normally set this field
@@ -465,6 +466,7 @@ class AlgorandClientTransactionSender {
465
466
  * appReferences: [123n, 1234n]
466
467
  * assetReferences: [12345n]
467
468
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
469
+ * accessReferences: [{ appId: 1234n }]
468
470
  * lease: 'lease',
469
471
  * note: 'note',
470
472
  * // You wouldn't normally set this field
@@ -508,6 +510,7 @@ class AlgorandClientTransactionSender {
508
510
  * appReferences: [123n, 1234n]
509
511
  * assetReferences: [12345n]
510
512
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
513
+ * accessReferences: [{ appId: 1234n }]
511
514
  * lease: 'lease',
512
515
  * note: 'note',
513
516
  * // You wouldn't normally set this field
@@ -551,6 +554,7 @@ class AlgorandClientTransactionSender {
551
554
  * appReferences: [123n, 1234n]
552
555
  * assetReferences: [12345n]
553
556
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
557
+ * accessReferences: [{ appId: 1234n }]
554
558
  * lease: 'lease',
555
559
  * note: 'note',
556
560
  * // You wouldn't normally set this field
@@ -616,6 +620,7 @@ class AlgorandClientTransactionSender {
616
620
  * appReferences: [123n, 1234n]
617
621
  * assetReferences: [12345n]
618
622
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
623
+ * accessReferences: [{ appId: 1234n }]
619
624
  * lease: 'lease',
620
625
  * note: 'note',
621
626
  * // You wouldn't normally set this field
@@ -673,6 +678,7 @@ class AlgorandClientTransactionSender {
673
678
  * appReferences: [123n, 1234n]
674
679
  * assetReferences: [12345n]
675
680
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
681
+ * accessReferences: [{ appId: 1234n }]
676
682
  * lease: 'lease',
677
683
  * note: 'note',
678
684
  * // You wouldn't normally set this field
@@ -728,6 +734,7 @@ class AlgorandClientTransactionSender {
728
734
  * appReferences: [123n, 1234n]
729
735
  * assetReferences: [12345n]
730
736
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
737
+ * accessReferences: [{ appId: 1234n }]
731
738
  * lease: 'lease',
732
739
  * note: 'note',
733
740
  * // You wouldn't normally set this field
@@ -783,6 +790,7 @@ class AlgorandClientTransactionSender {
783
790
  * appReferences: [123n, 1234n]
784
791
  * assetReferences: [12345n]
785
792
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
793
+ * accessReferences: [{ appId: 1234n }]
786
794
  * lease: 'lease',
787
795
  * note: 'note',
788
796
  * // You wouldn't normally set this field
@@ -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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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,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,CAAC,IAAI,CAAC,CAAC,QA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AAC,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;;AA43BJ;;;;"}
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,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,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI;AACjF,SAAC;AACH,UAAE,CAAC,CACN,CAAA,CAAA,CAAG;AACN,CAAC;AAED;MACa,+BAA+B,CAAA;AAK1C;;;;;;;;;AASG;AACH,IAAA,WAAA,CAAY,QAAmC,EAAE,YAA0B,EAAE,UAAsB,EAAA;AAiHnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAA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C,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;;;;"}
@@ -418,6 +418,7 @@ class AlgorandClientTransactionSender {
418
418
  * appReferences: [123n, 1234n]
419
419
  * assetReferences: [12345n]
420
420
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
421
+ * accessReferences: [{ appId: 1234n }]
421
422
  * lease: 'lease',
422
423
  * note: 'note',
423
424
  * // You wouldn't normally set this field
@@ -463,6 +464,7 @@ class AlgorandClientTransactionSender {
463
464
  * appReferences: [123n, 1234n]
464
465
  * assetReferences: [12345n]
465
466
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
467
+ * accessReferences: [{ appId: 1234n }]
466
468
  * lease: 'lease',
467
469
  * note: 'note',
468
470
  * // You wouldn't normally set this field
@@ -506,6 +508,7 @@ class AlgorandClientTransactionSender {
506
508
  * appReferences: [123n, 1234n]
507
509
  * assetReferences: [12345n]
508
510
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
511
+ * accessReferences: [{ appId: 1234n }]
509
512
  * lease: 'lease',
510
513
  * note: 'note',
511
514
  * // You wouldn't normally set this field
@@ -549,6 +552,7 @@ class AlgorandClientTransactionSender {
549
552
  * appReferences: [123n, 1234n]
550
553
  * assetReferences: [12345n]
551
554
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
555
+ * accessReferences: [{ appId: 1234n }]
552
556
  * lease: 'lease',
553
557
  * note: 'note',
554
558
  * // You wouldn't normally set this field
@@ -614,6 +618,7 @@ class AlgorandClientTransactionSender {
614
618
  * appReferences: [123n, 1234n]
615
619
  * assetReferences: [12345n]
616
620
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
621
+ * accessReferences: [{ appId: 1234n }]
617
622
  * lease: 'lease',
618
623
  * note: 'note',
619
624
  * // You wouldn't normally set this field
@@ -671,6 +676,7 @@ class AlgorandClientTransactionSender {
671
676
  * appReferences: [123n, 1234n]
672
677
  * assetReferences: [12345n]
673
678
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
679
+ * accessReferences: [{ appId: 1234n }]
674
680
  * lease: 'lease',
675
681
  * note: 'note',
676
682
  * // You wouldn't normally set this field
@@ -726,6 +732,7 @@ class AlgorandClientTransactionSender {
726
732
  * appReferences: [123n, 1234n]
727
733
  * assetReferences: [12345n]
728
734
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
735
+ * accessReferences: [{ appId: 1234n }]
729
736
  * lease: 'lease',
730
737
  * note: 'note',
731
738
  * // You wouldn't normally set this field
@@ -781,6 +788,7 @@ class AlgorandClientTransactionSender {
781
788
  * appReferences: [123n, 1234n]
782
789
  * assetReferences: [12345n]
783
790
  * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
791
+ * accessReferences: [{ appId: 1234n }]
784
792
  * lease: 'lease',
785
793
  * note: 'note',
786
794
  * // You wouldn't normally set this field