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.
Signature for a K-of-N multi-sig transaction.
4 bytes, at most 32 signatures are supported. If Nth bit value is 1, the Nth
signature should be provided in signatures. Bits are read from left to right
A list of signatures
Readonlybitmap32-bit Bitmap representing who signed the transaction
This is represented where each public key can be masked to determine whether the message was signed by that key.
ReadonlysignaturesThe list of underlying Ed25519 signatures
StaticBITMAP_Number of bytes in the bitmap representing who signed the transaction (32-bits)
StaticMAX_Maximum number of Ed25519 signatures supported
Converts the bitmap to an array of signer indices.
Example:
bitmap: [0b10001000, 0b01000000, 0b00000000, 0b00000000] signerIndices: [0, 4, 9]
An array of signer indices.
Get the signature as a hex string with a 0x prefix e.g. 0x123456...
The hex string representation of the signature.
Get the raw signature bytes
StaticcreateHelper method to create a bitmap out of the specified bit positions
The bitmap positions that should be set. A position starts at index 0. Valid position should range between 0 and 31.
bitmap that is 32bit long
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 multi-signature transaction using Ed25519 signatures. This class allows for the creation and management of a K-of-N multi-signature scheme, where a specified number of signatures are required to authorize a transaction.
It includes functionality to validate the number of signatures against a bitmap, which indicates which public keys have signed the transaction.