Aptos Unity SDK
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Aptos.Accounts.MultiPublicKey Class Reference

The ED25519 Multi-Public Key implementation. More...

Public Member Functions

 MultiPublicKey (List< PublicKey > Keys, byte Threshold, bool Checked=true)
 Initializer for the MultiPublicKey.
 
override string ToString ()
 
byte[] ToBytes ()
 Serialize the threshold and concatenated keys of a given threshold signature scheme instance to a Data object.
 
void Serialize (Serialization serializer)
 Serialize the object.
 

Static Public Member Functions

static MultiPublicKey FromBytes (byte[] Key)
 Deserialize a Data object to a MultiPublicKey instance.
 
- Static Public Member Functions inherited from Aptos.BCS.ISerializable
static ISerializable Deserialize (Deserialization deserializer)
 Deserializes a byte array hosted inside the Deserializer.
 

Public Attributes

List< PublicKeyKeys
 The Public Keys themselves.
 
byte Threshold
 The current amount of keys in the keys array.
 

Static Public Attributes

static int MIN_KEYS = 2
 The minimum amount of keys to initialize this class.
 
static int MAX_KEYS = 32
 The maximum amount of keys allowed for initialization.
 
static int MIN_THRESHOLD = 1
 The minimum threshold amount.
 

Detailed Description

The ED25519 Multi-Public Key implementation.

Constructor & Destructor Documentation

◆ MultiPublicKey()

Aptos.Accounts.MultiPublicKey.MultiPublicKey ( List< PublicKey Keys,
byte  Threshold,
bool  Checked = true 
)
inline

Initializer for the MultiPublicKey.

Parameters
KeysThe Public Keys themselves.
ThresholdThe current amount of keys in the keys array.
CheckedVerify whether the amount of keys fit within the threshold from 2 to 32 keys, both sides are inclusive.
Exceptions
Exception

Member Function Documentation

◆ FromBytes()

static MultiPublicKey Aptos.Accounts.MultiPublicKey.FromBytes ( byte[]  Key)
inlinestatic

Deserialize a Data object to a MultiPublicKey instance.

This function deserializes the given Data object to a MultiPublicKey instance by extracting the threshold and keys from it.

Parameters
KeyA Data object containing the serialized threshold and keys of a MultiPublicKey instance.
Returns
A MultiPublicKey instance initialized with the deserialized keys and threshold.
Exceptions
Exception

◆ Serialize()

void Aptos.Accounts.MultiPublicKey.Serialize ( Serialization  serializer)
inline

Serialize the object.

Parameters
serializer

Implements Aptos.BCS.ISerializable.

◆ ToBytes()

byte[] Aptos.Accounts.MultiPublicKey.ToBytes ( )
inline

Serialize the threshold and concatenated keys of a given threshold signature scheme instance to a Data object.

This function concatenates the keys of the instance and serializes the threshold and concatenated keys to a Data object.

Returns
A bytes array containing the serialized threshold and concatenated keys.

The documentation for this class was generated from the following file: