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.
Public key for a K-of-N multi-sig transaction. A K-of-N multi-sig transaction means that for such a transaction to be executed, at least K out of the N authorized signers have signed the transaction and passed the check conducted by the chain.
A wrapper to let you choose the param order.
A list of public keys
At least "threshold" signatures must be valid
Readonly
publicList of Ed25519 public keys for this LegacyMultiEd25519PublicKey
Readonly
thresholdThe minimum number of valid signatures required, for the number of public keys specified
Static
Readonly
MAX_Maximum number of public keys supported
Static
Readonly
MIN_Minimum number of public keys needed
Static
Readonly
MIN_Minimum threshold for the number of valid signatures required
Generates an authentication key based on the current instance's byte representation. This function is essential for creating a secure authentication key that can be used for various cryptographic operations.
The generated authentication key.
Create a bitmap that holds the mapping from the original public keys to the signatures passed in
array of the index mapping to the matching public keys
Uint8array bit map
Serializes the current instance into bytes using the provided serializer. This allows for the conversion of the instance's data into a format suitable for transmission or storage.
The serializer used to convert the instance into bytes.
Get the public key as a hex string with a 0x prefix.
The public key in hex format.
Converts a PublicKeys into Uint8Array (bytes) with: bytes = p1_bytes | ... | pn_bytes | threshold
Verifies a multi-signature against a given message. This function ensures that the provided signatures meet the required threshold and are valid for the given message.
The arguments for verifying the signature.
Represents the arguments required to verify a digital signature.
True if the signature is valid; otherwise, false.
Static
deserializeDeserializes a MultiEd25519Signature from the provided deserializer. This function helps in reconstructing a MultiEd25519Signature object from its serialized byte representation.
The deserializer instance used to read the serialized data.
Get the index of the provided public key.
This function retrieves the index of a specified public key within the MultiKey. If the public key does not exist, it throws an error.
The public key to find the index for.
The corresponding index of the public key, if it exists.
Represents the public key of a K-of-N Ed25519 multi-sig transaction.
A K-of-N multi-sig transaction requires at least K out of N authorized signers to sign the transaction for it to be executed. This class encapsulates the logic for managing the public keys and the threshold for valid signatures.
See
Creating a Signed Transaction