{"version":3,"file":"algorand-client-transaction-sender.mjs","names":[],"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: bigint\n      try {\n        const accountAssetInfo = await this._assetManager.getAccountInformation(params.sender, params.assetId)\n        balance = accountAssetInfo.balance\n      } catch {\n        throw new Error(`Account ${params.sender} is not opted-in to Asset ${params.assetId}; can't opt-out.`)\n      }\n      if (balance !== 0n) {\n        throw new Error(`Account ${params.sender} does not have a zero balance for Asset ${params.assetId}; can't opt-out.`)\n      }\n    }\n\n    params.creator = params.creator ?? (await this._assetManager.getById(params.assetId)).creator\n\n    return await this._send((c) => c.addAssetOptOut, {\n      preLog: (params, transaction) =>\n        `Opting ${params.sender} out of asset with ID ${params.assetId} to creator ${params.creator} via transaction ${transaction.txID()}`,\n    })(params as AssetOptOutParams & SendParams)\n  }\n  /**\n   * Create a smart contract.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app creation transaction\n   * @example Basic example\n   * ```typescript\n   * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n   * const createdAppId = result.appId\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * await algorand.send.appCreate({\n   *  sender: 'CREATORADDRESS',\n   *  approvalProgram: \"TEALCODE\",\n   *  clearStateProgram: \"TEALCODE\",\n   *  schema: {\n   *    globalInts: 1,\n   *    globalByteSlices: 2,\n   *    localInts: 3,\n   *    localByteSlices: 4\n   *  },\n   *  extraProgramPages: 1,\n   *  onComplete: algosdk.OnApplicationComplete.OptInOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the app create transaction and the transaction that was sent\n   */\n  appCreate = this._sendAppCreateCall((c) => c.addAppCreate, {\n    postLog: (params, result) =>\n      `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Update a smart contract.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app update transaction\n   * @example Basic example\n   * ```typescript\n   * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * await algorand.send.appUpdate({\n   *  sender: 'CREATORADDRESS',\n   *  approvalProgram: \"TEALCODE\",\n   *  clearStateProgram: \"TEALCODE\",\n   *  onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the app update transaction and the transaction that was sent\n   */\n  appUpdate = this._sendAppUpdateCall((c) => c.addAppUpdate, {\n    postLog: (params, result) =>\n      `App ${params.appId} updated ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Delete a smart contract.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app deletion transaction\n   * @example Basic example\n   * ```typescript\n   * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * await algorand.send.appDelete({\n   *  sender: 'CREATORADDRESS',\n   *  onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the app delete transaction and the transaction that was sent\n   */\n  appDelete = this._sendAppCall((c) => c.addAppDelete, {\n    postLog: (params, result) =>\n      `App ${params.appId} deleted ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Call a smart contract.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app call transaction\n   * @example Basic example\n   * ```typescript\n   * await algorand.send.appCall({ sender: 'CREATORADDRESS' })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * await algorand.send.appCall({\n   *  sender: 'CREATORADDRESS',\n   *  onComplete: algosdk.OnApplicationComplete.OptInOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the app call transaction and the transaction that was sent\n   */\n  appCall = this._sendAppCall((c) => c.addAppCall, {\n    postLog: (params, result) =>\n      `App ${params.appId} called ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Create a smart contract via an ABI method.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app creation transaction\n   * @example Basic example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n   * const createdAppId = result.appId\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * await algorand.send.appCreateMethodCall({\n   *  sender: 'CREATORADDRESS',\n   *  method: method,\n   *  args: [\"arg1_value\"],\n   *  approvalProgram: \"TEALCODE\",\n   *  clearStateProgram: \"TEALCODE\",\n   *  schema: {\n   *    globalInts: 1,\n   *    globalByteSlices: 2,\n   *    localInts: 3,\n   *    localByteSlices: 4\n   *  },\n   *  extraProgramPages: 1,\n   *  onComplete: algosdk.OnApplicationComplete.OptInOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the application ABI method create transaction and the transaction that was sent\n   */\n  appCreateMethodCall = this._sendAppCreateCall((c) => c.addAppCreateMethodCall, {\n    postLog: (params, result) =>\n      `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Update a smart contract via an ABI method.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app update transaction\n   * @example Basic example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * await algorand.send.appUpdateMethodCall({\n   *  sender: 'CREATORADDRESS',\n   *  method: method,\n   *  args: [\"arg1_value\"],\n   *  approvalProgram: \"TEALCODE\",\n   *  clearStateProgram: \"TEALCODE\",\n   *  onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the application ABI method update transaction and the transaction that was sent\n   */\n  appUpdateMethodCall = this._sendAppUpdateCall((c) => c.addAppUpdateMethodCall, {\n    postLog: (params, result) =>\n      `App ${params.appId} updated with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Delete a smart contract via an ABI method.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app deletion transaction\n   * @example Basic example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * await algorand.send.appDeleteMethodCall({\n   *  sender: 'CREATORADDRESS',\n   *  method: method,\n   *  args: [\"arg1_value\"],\n   *  onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the application ABI method delete transaction and the transaction that was sent\n   */\n  appDeleteMethodCall = this._sendAppCall((c) => c.addAppDeleteMethodCall, {\n    postLog: (params, result) =>\n      `App ${params.appId} deleted with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Call a smart contract via an ABI method.\n   *\n   * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n   *\n   * @param params The parameters for the app call transaction\n   * @example Basic example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * const method = new ABIMethod({\n   *   name: 'method',\n   *   args: [{ name: 'arg1', type: 'string' }],\n   *   returns: { type: 'string' },\n   * })\n   * await algorand.send.appCallMethodCall({\n   *  sender: 'CREATORADDRESS',\n   *  method: method,\n   *  args: [\"arg1_value\"],\n   *  onComplete: algosdk.OnApplicationComplete.OptInOC,\n   *  args: [new Uint8Array(1, 2, 3, 4)]\n   *  accountReferences: [\"ACCOUNT_1\"]\n   *  appReferences: [123n, 1234n]\n   *  assetReferences: [12345n]\n   *  boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n   *  accessReferences: [{ appId: 1234n }]\n   *  lease: 'lease',\n   *  note: 'note',\n   *  // You wouldn't normally set this field\n   *  firstValidRound: 1000n,\n   *  validityWindow: 10,\n   *  extraFee: (1000).microAlgo(),\n   *  staticFee: (1000).microAlgo(),\n   *  // Max fee doesn't make sense with extraFee AND staticFee\n   *  //  already specified, but here for completeness\n   *  maxFee: (3000).microAlgo(),\n   *  rejectVersion: 1,\n   *  // Signer only needed if you want to provide one,\n   *  //  generally you'd register it with AlgorandClient\n   *  //  against the sender and not need to pass it in\n   *  signer: transactionSigner,\n   *  maxRoundsToWaitForConfirmation: 5,\n   *  suppressLog: true,\n   *})\n   * ```\n   * @returns The result of the application ABI method call transaction and the transaction that was sent\n   */\n  appCallMethodCall = this._sendAppCall((c) => c.addAppCallMethodCall, {\n    postLog: (params, result) =>\n      `App ${params.appId} called with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n  })\n\n  /**\n   * Register an online key.\n   * @param params The parameters for the key registration transaction\n   * @example Basic example\n   * ```typescript\n   * const result = await algorand.send.onlineKeyRegistration({\n   *   sender: 'SENDERADDRESS',\n   *   voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n   *   selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n   *   stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n   *   voteFirst: 1n,\n   *   voteLast: 1000n,\n   *   voteKeyDilution: 1n,\n   * })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * const result = await algorand.send.onlineKeyRegistration({\n   *   sender: 'SENDERADDRESS',\n   *   voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n   *   selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n   *   stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n   *   voteFirst: 1n,\n   *   voteLast: 1000n,\n   *   voteKeyDilution: 1n,\n   *   lease: 'lease',\n   *   note: 'note',\n   *   // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n   *   rekeyTo: 'REKEYTOADDRESS',\n   *   // You wouldn't normally set this field\n   *   firstValidRound: 1000n,\n   *   validityWindow: 10,\n   *   extraFee: (1000).microAlgo(),\n   *   staticFee: (1000).microAlgo(),\n   *   // Max fee doesn't make sense with extraFee AND staticFee\n   *   //  already specified, but here for completeness\n   *   maxFee: (3000).microAlgo(),\n   * })\n   * ```\n   * @returns The result of the online key registration transaction and the transaction that was sent\n   */\n  onlineKeyRegistration = this._send((c) => c.addOnlineKeyRegistration, {\n    preLog: (params, transaction) => `Registering online key for ${params.sender} via transaction ${transaction.txID()}`,\n  })\n\n  /**\n   * Register an offline key.\n   * @param params The parameters for the key registration transaction\n   * @example Basic example\n   * ```typescript\n   * const result = await algorand.send.offlineKeyRegistration({\n   *   sender: 'SENDERADDRESS',\n   * })\n   * ```\n   * @example Advanced example\n   * ```typescript\n   * const result = await algorand.send.offlineKeyRegistration({\n   *   sender: 'SENDERADDRESS',\n   *   lease: 'lease',\n   *   note: 'note',\n   *   // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n   *   rekeyTo: 'REKEYTOADDRESS',\n   *   // You wouldn't normally set this field\n   *   firstValidRound: 1000n,\n   *   validityWindow: 10,\n   *   extraFee: (1000).microAlgo(),\n   *   staticFee: (1000).microAlgo(),\n   *   // Max fee doesn't make sense with extraFee AND staticFee\n   *   //  already specified, but here for completeness\n   *   maxFee: (3000).microAlgo(),\n   * })\n   * ```\n   * @returns The result of the offline key registration transaction and the transaction that was sent\n   */\n  offlineKeyRegistration = this._send((c) => c.addOfflineKeyRegistration, {\n    preLog: (params, transaction) => `Registering offline key for ${params.sender} via transaction ${transaction.txID()}`,\n  })\n}\n"],"mappings":";;;;;;AAuBA,MAAM,uBAAuB,EAAE,QAAQ,WAA4D;CACjG,OAAO,GAAG,OAAO,KAAK,IAAI,QAAQ,CAAC,EAAA,CAAG,KAAK,MACzC,OAAO,MAAM,WACT,OAAO,IAAI,GAAG,MAAM;EAClB,MAAM,OAAO,yBAAyB,GAAG,CAAC;EAC1C,OAAO,gBAAgB,aAAa,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,QAAQ,IAAI;CAC7E,CAAC,IACD,CACN,EAAE;AACJ;;AAGA,IAAa,kCAAb,MAA6C;CAC3C;CACA;CACA;;;;;;;;;;;CAYA,YAAY,UAAqC,cAA4B,YAAwB;EACnG,KAAK,YAAY;EACjB,KAAK,gBAAgB;EACrB,KAAK,cAAc;CACrB;;;;;;;;CASA,WAAW;EACT,OAAO,KAAK,UAAU;CACxB;CAEA,MACE,GACA,KAIkE;EAClE,OAAO,OAAO,WAAW;GACvB,MAAM,WAAW,KAAK,UAAU;GAGhC,EAAE,QAAQ,CAAC,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC;GAEpC,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