Serializes a Serializable value to its BCS representation.
This function is the TypeScript SDK equivalent of bcs::to_bytes in Move.
the BCS representation of the Serializable instance as a byte buffer.
Converts the BCS-serialized bytes of a value into a Hex instance. This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.
A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.
Create a new PublicKey instance from a HexInput, which can be a string or Uint8Array. This constructor validates the length of the provided signature data.
A HexInput (string or Uint8Array) representing the signature data.
Deserializes a Secp256k1Signature from the provided deserializer. This function allows you to reconstruct a Secp256k1Signature object from its serialized byte representation.
The deserializer instance used to read the serialized data.
Serializes the data into a byte array using the provided serializer. This function is essential for converting data into a format suitable for transmission or storage.
The serializer instance used to convert the data.
Get the public key as a hex string with a 0x prefix.
The public key in hex format.
Get the data as a Uint8Array representation.
Uint8Array representation of the data.
Verifies a signature against the exact bytes of message. This is the
unambiguous form — the input is interpreted as raw bytes regardless of
what they encode. Pair with Secp256k1PrivateKey.signBytes.
The message is SHA3-256 hashed before verification (matching the Aptos-side Secp256k1 signing convention), and the signature is required to be in canonical low-S form for malleability resistance.
The arguments for verification.
The exact bytes that were signed.
The signature to verify.
Verifies a Secp256k1 signature against the public key.
The arguments for verifying the signature.
The message that was signed.
The signature to verify against the public key.
The polymorphic message: HexInput input is ambiguous — a
bare even-length string of hex characters (e.g., "cafe") is verified
against the 2 bytes [0xCA, 0xFE], not 4 UTF-8 text bytes. Use
verifyBytes for Uint8Array input or verifyText for
string input; both are unambiguous. See
convertSigningMessage for the full legacy rule.
Note: Secp256k1Signatures can be verified syncronously.
Verifies the provided signature against the given message. This function helps ensure the integrity and authenticity of the message by confirming that the signature is valid.
The arguments for signature verification.
The configuration object for connecting to the Aptos network
The message that was signed.
The signature to verify, which must be an instance of Secp256k1Signature.
A boolean indicating whether the signature is valid for the given message.
Verifies a signature against the UTF-8 encoding of message. The input
is always treated as text — there is no hex/text heuristic. Pair with
Secp256k1PrivateKey.signText.
The arguments for verification.
The text that was signed.
The signature to verify.
StaticisDetermines if the provided public key is a valid instance of a Secp256k1 public key. This function checks for the presence of a "key" property and validates the length of the key data.
The public key to validate.
A boolean indicating whether the public key is a valid Secp256k1 public key.
StaticisDetermine if the provided public key is an instance of Secp256k1PublicKey.
The public key to check.
Returns the hex string representation of the Serializable value without the 0x prefix.
the hex format as a string without 0x prefix.
Staticdeserialize
Represents a Secp256k1 ECDSA public key.