{"version":3,"sources":["../../src/api/fungibleAsset.ts"],"sourcesContent":["// Copyright © Endless\n// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AnyNumber } from \"../types\";\nimport { transferFungibleAsset } from \"../internal/fungibleAsset\";\nimport { EndlessConfig } from \"./endlessConfig\";\nimport { Account } from \"../account\";\nimport { AccountAddressInput } from \"../core\";\nimport { InputGenerateTransactionOptions } from \"../transactions\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class to query all `FungibleAsset` related queries on Endless.\n */\nexport class FungibleAsset {\n  constructor(readonly config: EndlessConfig) {}\n\n  /**\n   * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.\n   *\n   * Use this method to transfer any fungible asset including fungible token.\n   *\n   * @example\n   * const transaction = await endless.transferFungibleAsset({\n   *  sender: alice,\n   *  fungibleAssetMetadataAddress: \"0x123\",\n   *  recipient: \"0x456\",\n   *  amount: 5\n   * })\n   *\n   * @param sender The sender account\n   * @param fungibleAssetMetadataAddress The fungible asset account address.\n   * For example if you’re transferring USDT this would be the USDT address\n   * @param recipient The recipient account address\n   * @param amount Number of assets to transfer\n   *\n   * @returns A SimpleTransaction that can be simulated or submitted to chain.\n   */\n  async transferFungibleAsset(args: {\n    sender: Account;\n    fungibleAssetMetadataAddress: AccountAddressInput;\n    recipient: AccountAddressInput;\n    amount: AnyNumber;\n    options?: InputGenerateTransactionOptions;\n  }): Promise<SimpleTransaction> {\n    return transferFungibleAsset({ endlessConfig: this.config, ...args });\n  }\n}"],"mappings":"yCAeO,IAAMA,EAAN,KAAoB,CACzB,YAAqBC,EAAuB,CAAvB,YAAAA,CAAwB,CAuB7C,MAAM,sBAAsBC,EAMG,CAC7B,OAAOC,EAAsB,CAAE,cAAe,KAAK,OAAQ,GAAGD,CAAK,CAAC,CACtE,CACF","names":["FungibleAsset","config","args","transferFungibleAsset"]}