PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@aptos-labs/ts-sdk/dist/esm/transactions/instances
Просмотр файла: transactionArgument.d.mts
import { Serializer } from '../../bcs/serializer.mjs';
import { Hex } from '../../core/hex.mjs';
import '../../types/types.mjs';
import '../../types/indexer.mjs';
import '../../types/generated/operations.mjs';
import '../../types/generated/types.mjs';
import '../../utils/apiEndpoints.mjs';
import '../../core/common.mjs';
interface TransactionArgument extends EntryFunctionArgument, ScriptFunctionArgument {
}
/**
* Represents an argument for entry functions, providing methods to serialize the argument
* to BCS-serialized bytes and convert it to different formats.
*/
interface EntryFunctionArgument {
/**
* Serialize an argument to BCS-serialized bytes.
*
* @param serializer - The serializer instance used for serialization.
*/
serialize(serializer: Serializer): void;
/**
* Serialize an argument to BCS-serialized bytes.
* Serialize an argument as a type-agnostic, fixed byte sequence. The byte sequence contains
* the number of the following bytes followed by the BCS-serialized bytes for a typed argument.
*
* @param serializer - The serializer used to convert the argument.
*/
serializeForEntryFunction(serializer: Serializer): void;
/**
* Convert the argument to BCS-serialized bytes.
*
* @returns Uint8Array representing the BCS-serialized bytes of the argument.
*/
bcsToBytes(): Uint8Array;
/**
* Converts the BCS-serialized bytes of an argument into a hexadecimal representation.
* This function is useful for obtaining a Hex instance that encapsulates the BCS-serialized bytes,
* allowing for easier manipulation and representation of the data.
* @returns A Hex instance containing the BCS-serialized bytes.
*/
bcsToHex(): Hex;
}
/**
* Represents an argument for script functions, providing methods to serialize and convert to bytes.
*/
interface ScriptFunctionArgument {
/**
* Serialize an argument to BCS-serialized bytes.
*/
serialize(serializer: Serializer): void;
/**
* Serialize an argument to BCS-serialized bytes as a type aware byte sequence.
* The byte sequence contains an enum variant index followed by the BCS-serialized
* bytes for a typed argument.
*/
serializeForScriptFunction(serializer: Serializer): void;
bcsToBytes(): Uint8Array;
bcsToHex(): Hex;
}
export type { EntryFunctionArgument, ScriptFunctionArgument, TransactionArgument };
Выполнить команду
Для локальной разработки. Не используйте в интернете!