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.AuthenticationKey Class Reference

Represents an Authentication Key
During the account creation process, a 32-byte authentication key comes to exist first.
This authentication key is then returned as it is as the 32-byte account Address.
. More...

Public Member Functions

 AuthenticationKey (byte[] bytes)
 Initialize the Authentication Key.
 
string DerivedAddress ()
 Derives hexadecimal Address from authentication key array of bytes.
 

Static Public Member Functions

static AuthenticationKey FromMultiEd25519PublicKey (MultiEd25519PublicKey publicKey)
 Converts a K-of-N MultiEd25519PublicKey to AuthenticationKey with:
auth_key = sha3-256(p_1 | � | p_n | K | 0x01). K represents the K-of-N required for
authenticating the transaction. 0x01 is the 1-byte scheme for multisig.
.
 
static AuthenticationKey FromEd25519PublicKey (byte[] publicKey)
 Converts single Public Key (bytes) into Authentication Key
auth_key = sha3-256(pubkey_A | 0x00)
where | denotes concatenation. The 0x00 is the 1-byte single-signature scheme identifier.
.
 

Public Attributes

byte[] bytes
 Byte array representing authentication key.
 

Static Public Attributes

static int LENGTH = 32
 Byte length of authentication key.
 
static byte MULTI_ED25519_SCHEME = 0x001
 Byte that represents multi-ed25519 scheme.
 
static byte ED25519_SCHEME = 0x00
 Byte that represents single key ed25519 scheme.
 
static byte DERIVE_RESOURCE_ACCOUNT_SCHEME = 255
 Byte that represents derive resource account scheme.
 

Detailed Description

Represents an Authentication Key
During the account creation process, a 32-byte authentication key comes to exist first.
This authentication key is then returned as it is as the 32-byte account Address.
.

NOTE: Generating the authentication key for an account requires that you provide one of
the below 1-byte signature scheme identifiers for this account, i.e.,
whether the account is a single signature or a multisig account:
More info on account addresses found here.

Constructor & Destructor Documentation

◆ AuthenticationKey()

Aptos.Accounts.AuthenticationKey.AuthenticationKey ( byte[]  bytes)
inline

Initialize the Authentication Key.

Parameters
bytesThe raw byte array of the key itself.
Exceptions
ArgumentException

Member Function Documentation

◆ DerivedAddress()

string Aptos.Accounts.AuthenticationKey.DerivedAddress ( )
inline

Derives hexadecimal Address from authentication key array of bytes.

Returns
A hexa string representation Address of the authentication key

◆ FromEd25519PublicKey()

static AuthenticationKey Aptos.Accounts.AuthenticationKey.FromEd25519PublicKey ( byte[]  publicKey)
inlinestatic

Converts single Public Key (bytes) into Authentication Key
auth_key = sha3-256(pubkey_A | 0x00)
where | denotes concatenation. The 0x00 is the 1-byte single-signature scheme identifier.
.

Parameters
publicKeyPublick key, in byte array format, used to generate the authentication key
Returns
Authentication key object

◆ FromMultiEd25519PublicKey()

static AuthenticationKey Aptos.Accounts.AuthenticationKey.FromMultiEd25519PublicKey ( MultiEd25519PublicKey  publicKey)
inlinestatic

Converts a K-of-N MultiEd25519PublicKey to AuthenticationKey with:
auth_key = sha3-256(p_1 | � | p_n | K | 0x01). K represents the K-of-N required for
authenticating the transaction. 0x01 is the 1-byte scheme for multisig.
.

Returns
Authentication key object from a multi ED25519 key

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