PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@aptos-labs/ts-sdk/dist/esm
Просмотр файла: chunk-7T26VA2W.mjs.map
{"version":3,"sources":["../../src/transactions/instances/simpleTransaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\nimport { AccountAddress } from \"../../core\";\nimport { RawTransaction } from \"./rawTransaction\";\n\n/**\n * Represents a simple transaction type that can be submitted to the Aptos chain for execution.\n *\n * This transaction type is designed for a single signer and includes metadata such as the Raw Transaction\n * and an optional sponsor Account Address to cover gas fees.\n *\n * @param rawTransaction - The Raw Transaction.\n * @param feePayerAddress - The optional sponsor Account Address.\n */\nexport class SimpleTransaction extends Serializable {\n public rawTransaction: RawTransaction;\n\n public feePayerAddress?: AccountAddress | undefined;\n\n // We don't really need it, we add it for type checking we do\n // throughout the SDK\n public readonly secondarySignerAddresses: undefined;\n\n /**\n * SimpleTransaction represents a transaction signed by a single account that\n * can be submitted to the Aptos chain for execution.\n *\n * @param rawTransaction The Raw Transaction.\n * @param feePayerAddress The optional sponsor Account Address to pay the gas fees.\n */\n constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress) {\n super();\n this.rawTransaction = rawTransaction;\n this.feePayerAddress = feePayerAddress;\n }\n\n /**\n * Serializes the transaction data using the provided serializer.\n * This function ensures that the raw transaction and fee payer address are properly serialized for further processing.\n *\n * @param serializer - The serializer instance used to serialize the transaction data.\n */\n serialize(serializer: Serializer): void {\n this.rawTransaction.serialize(serializer);\n\n if (this.feePayerAddress === undefined) {\n serializer.serializeBool(false);\n } else {\n serializer.serializeBool(true);\n this.feePayerAddress.serialize(serializer);\n }\n }\n\n /**\n * Deserializes a SimpleTransaction from the given deserializer.\n * This function helps in reconstructing a SimpleTransaction object from its serialized form.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n */\n static deserialize(deserializer: Deserializer): SimpleTransaction {\n const rawTransaction = RawTransaction.deserialize(deserializer);\n const feePayerPresent = deserializer.deserializeBool();\n let feePayerAddress;\n if (feePayerPresent) {\n feePayerAddress = AccountAddress.deserialize(deserializer);\n }\n\n return new SimpleTransaction(rawTransaction, feePayerAddress);\n }\n}\n"],"mappings":"2HAmBO,IAAMA,EAAN,MAAMC,UAA0BC,CAAa,CAgBlD,YAAYC,EAAgCC,EAAkC,CAC5E,MAAM,EACN,KAAK,eAAiBD,EACtB,KAAK,gBAAkBC,CACzB,CAQA,UAAUC,EAA8B,CACtC,KAAK,eAAe,UAAUA,CAAU,EAEpC,KAAK,kBAAoB,OAC3BA,EAAW,cAAc,EAAK,GAE9BA,EAAW,cAAc,EAAI,EAC7B,KAAK,gBAAgB,UAAUA,CAAU,EAE7C,CAQA,OAAO,YAAYC,EAA+C,CAChE,IAAMH,EAAiBI,EAAe,YAAYD,CAAY,EACxDE,EAAkBF,EAAa,gBAAgB,EACjDF,EACJ,OAAII,IACFJ,EAAkBK,EAAe,YAAYH,CAAY,GAGpD,IAAIL,EAAkBE,EAAgBC,CAAe,CAC9D,CACF","names":["SimpleTransaction","_SimpleTransaction","Serializable","rawTransaction","feePayerAddress","serializer","deserializer","RawTransaction","feePayerPresent","AccountAddress"]}Выполнить команду
Для локальной разработки. Не используйте в интернете!