PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@aptos-labs/ts-sdk/dist/esm

Просмотр файла: chunk-UJSTWN32.mjs.map

{"version":3,"sources":["../../src/internal/coin.ts"],"sourcesContent":["import { AptosConfig } from \"../api/aptosConfig\";\nimport { AccountAddressInput } from \"../core\";\nimport { EntryFunctionABI, InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { AnyNumber, MoveStructId } from \"../types\";\nimport { APTOS_COIN } from \"../utils/const\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { TypeTagAddress, TypeTagU64 } from \"../transactions\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\nconst coinTransferAbi: EntryFunctionABI = {\n  typeParameters: [{ constraints: [] }],\n  parameters: [new TypeTagAddress(), new TypeTagU64()],\n};\n\n/**\n * Generates a transaction to transfer coins from one account to another.\n * This function allows you to specify the sender, recipient, amount, and coin type for the transaction.\n *\n * @param args - The parameters for the transaction.\n * @param args.aptosConfig - The Aptos configuration object.\n * @param args.sender - The address of the account sending the coins.\n * @param args.recipient - The address of the account receiving the coins.\n * @param args.amount - The amount of coins to transfer.\n * @param args.coinType - (Optional) The type of coin to transfer, defaults to Aptos Coin if not specified.\n * @param args.options - (Optional) Options for generating the transaction.\n */\nexport async function transferCoinTransaction(args: {\n  aptosConfig: AptosConfig;\n  sender: AccountAddressInput;\n  recipient: AccountAddressInput;\n  amount: AnyNumber;\n  coinType?: MoveStructId;\n  options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n  const { aptosConfig, sender, recipient, amount, coinType, options } = args;\n  const coinStructType = coinType ?? APTOS_COIN;\n  return generateTransaction({\n    aptosConfig,\n    sender,\n    data: {\n      function: \"0x1::aptos_account::transfer_coins\",\n      typeArguments: [coinStructType],\n      functionArguments: [recipient, amount],\n      abi: coinTransferAbi,\n    },\n    options,\n  });\n}\n"],"mappings":"kIASA,IAAMA,EAAoC,CACxC,eAAgB,CAAC,CAAE,YAAa,CAAC,CAAE,CAAC,EACpC,WAAY,CAAC,IAAIC,EAAkB,IAAIC,CAAY,CACrD,EAcA,eAAsBC,EAAwBC,EAOf,CAC7B,GAAM,CAAE,YAAAC,EAAa,OAAAC,EAAQ,UAAAC,EAAW,OAAAC,EAAQ,SAAAC,EAAU,QAAAC,CAAQ,EAAIN,EAEtE,OAAOO,EAAoB,CACzB,YAAAN,EACA,OAAAC,EACA,KAAM,CACJ,SAAU,qCACV,cAAe,CANIG,GAAYG,CAMD,EAC9B,kBAAmB,CAACL,EAAWC,CAAM,EACrC,IAAKR,CACP,EACA,QAAAU,CACF,CAAC,CACH","names":["coinTransferAbi","TypeTagAddress","TypeTagU64","transferCoinTransaction","args","aptosConfig","sender","recipient","amount","coinType","options","generateTransaction","APTOS_COIN"]}

Выполнить команду


Для локальной разработки. Не используйте в интернете!