{"version":3,"sources":["../../src/api/transactionSubmission/build.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AccountAddressInput } from \"../../core\";\nimport { generateTransaction } from \"../../internal/transactionSubmission\";\nimport { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from \"../../transactions\";\nimport { MultiAgentTransaction } from \"../../transactions/instances/multiAgentTransaction\";\nimport { SimpleTransaction } from \"../../transactions/instances/simpleTransaction\";\nimport { AptosConfig } from \"../aptosConfig\";\n\n/**\n * A class to handle all `Build` transaction operations\n */\nexport class Build {\n  readonly config: AptosConfig;\n\n  constructor(config: AptosConfig) {\n    this.config = config;\n  }\n\n  /**\n   * Build a simple transaction\n   *\n   * @param args.sender The sender account address\n   * @param args.data The transaction data\n   * @param args.options optional. Optional transaction configurations\n   * @param args.withFeePayer optional. Whether there is a fee payer for the transaction\n   *\n   * @returns SimpleTransaction\n   */\n  async simple(args: {\n    sender: AccountAddressInput;\n    data: InputGenerateTransactionPayloadData;\n    options?: InputGenerateTransactionOptions;\n    withFeePayer?: boolean;\n  }): Promise<SimpleTransaction> {\n    return generateTransaction({ aptosConfig: this.config, ...args });\n  }\n\n  /**\n   * Build a multi agent transaction\n   *\n   * @param args.sender The sender account address\n   * @param args.data The transaction data\n   * @param args.secondarySignerAddresses An array of the secondary signers account addresses\n   * @param args.options optional. Optional transaction configurations\n   * @param args.withFeePayer optional. Whether there is a fee payer for the transaction\n   *\n   * @returns MultiAgentTransaction\n   */\n  async multiAgent(args: {\n    sender: AccountAddressInput;\n    data: InputGenerateTransactionPayloadData;\n    secondarySignerAddresses: AccountAddressInput[];\n    options?: InputGenerateTransactionOptions;\n    withFeePayer?: boolean;\n  }): Promise<MultiAgentTransaction> {\n    return generateTransaction({ aptosConfig: this.config, ...args });\n  }\n}\n"],"mappings":"yCAaO,IAAMA,EAAN,KAAY,CAGjB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAYA,MAAM,OAAOC,EAKkB,CAC7B,OAAOC,EAAoB,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CAClE,CAaA,MAAM,WAAWA,EAMkB,CACjC,OAAOC,EAAoB,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CAClE,CACF","names":["Build","config","args","generateTransaction"]}