Represents an Aptos account address. More details can her found here.
More...
Represents an Aptos account address. More details can her found here.
◆ AccountAddress()
Aptos.Accounts.AccountAddress.AccountAddress |
( |
byte[] |
address | ) |
|
|
inline |
Initializes an account address by setting a 32-byte representation of an address.
- Parameters
-
address | Byte array representing address. |
◆ Deserialize()
◆ ForGuidObject()
Generates an AccountAddress
for a GUID object.
This function takes in a creator address and a creationNum
which it uses to serialize into an array of bytes. It then appends the creator address and deriveObjectAddressFromGuid
to this array. It uses this byte array to compute a SHA-256 hash. This hash is then returned as a new AccountAddress
.
- Parameters
-
creator | The account address of the creator. |
creationNum | The creation number of the object. |
- Returns
- An
AccountAddress
which is generated for a GUID object.
◆ ForNamedCollection()
Derive an AccountAddress for a named collection.
This function takes the creator's AccountAddress and the name of the collection as a String. The collection name is then converted to data using UTF-8 encoding. The forNamedObject function is called with the creator's address and the collection name data as the seed. This returns an AccountAddress derived from the creator's address and collection name seed, which represents the named collection.
- Parameters
-
creator | The creator's AccountAddress. |
collectionName | The name of the collection as a String. |
- Returns
- An AccountAddress that represents the named collection.
◆ ForNamedObject()
Create an AccountAddress instance for a named object.
This function creates an AccountAddress instance for a named object given the creator's address and a seed value. The function generates a new address by concatenating the byte representation of the creator's address, the provided seed value, and the DERIVE_OBJECT_ADDRESS_FROM_SEED authorization key scheme value. It then computes the SHA3-256 hash of the resulting byte array to generate a new AccountAddress instance.
- Parameters
-
creator | An AccountAddress instance representing the address of the account that will create the named object. |
seed | A byte array used to create a unique named object. |
- Returns
- An AccountAddress instance representing the newly created named object.
◆ ForNamedToken()
Generates an AccountAddress for a named token by concatenating the collectionName, the tokenName, and the separator "::" as a Data and calling the forNamedObject function with the resulting Data as the seed.
- Parameters
-
creator | The AccountAddress of the account that creates the token./param> - Parameters
-
collectionName | A String that represents the name of the collection to which the token belongs. |
tokenName | A String that represents the name of the token. |
- Returns
- An AccountAddress object that represents the named token.
|
◆ ForResourceAccount()
Create an AccountAddress instance for a resource account.
This function creates an AccountAddress instance for a resource account given the creator's address and a seed value. The function generates a new address by concatenating the byte representation of the creator's address, the provided seed value, and the DERIVE_RESOURCE_ACCOUNT_ADDRESS authorization key scheme value. It then computes the SHA3-256 hash of the resulting byte array to generate a new AccountAddress instance.
- Parameters
-
creator | An AccountAddress instance representing the address of the account that will create the resource account. |
seed | A byte array used to create a unique resource account. |
- Returns
- An AccountAddress instance representing the newly created resource account.
◆ FromHex()
static AccountAddress Aptos.Accounts.AccountAddress.FromHex |
( |
string |
address | ) |
|
|
inlinestatic |
Returns an AccountAddress object from a hexadecimal Address.
- Parameters
-
address | Hexadecimal representation of an Address. |
- Returns
- An account address object
◆ FromKey()
static AccountAddress Aptos.Accounts.AccountAddress.FromKey |
( |
byte[] |
publicKey | ) |
|
|
inlinestatic |
Generate an AccountAddress object from a given public key, byte array.
- Parameters
-
publicKey | Byte array representing a public key. |
- Returns
- An account address object.
◆ FromMultiEd25519()
Create an AccountAddress instance from a MultiPublicKey.
This function creates an AccountAddress instance from a provided MultiPublicKey. The function generates a new address by appending the Multi ED25519 authorization key scheme value to the byte representation of the provided MultiPublicKey, and then computes the SHA3-256 hash of the resulting byte array. The resulting hash is used to create a new AccountAddress instance.
- Parameters
-
keys | A MultiPublicKey instance representing the multiple public keys to create the AccountAddress instance from. |
- Returns
- An AccountAddress instance created from the provided MultiPublicKey.
◆ GetValue()
object Aptos.Accounts.AccountAddress.GetValue |
( |
| ) |
|
|
inline |
◆ Serialize()
void Aptos.Accounts.AccountAddress.Serialize |
( |
Serialization |
serializer | ) |
|
|
inline |
Reference implementation to BCS can be found here.
More details on creating a BCS signed transaction can be found here.
Binary Canonical Serialization (BCS) is a serialization format applied to the raw (unsigned) transaction. See BCS for a description of the design goals of BCS. BCS is not a self-describing format.As such, in order to deserialize a message, one must know the message type and layout ahead of time.
Implements Aptos.BCS.ISerializable.
◆ ToString()
override string Aptos.Accounts.AccountAddress.ToString |
( |
| ) |
|
|
inline |
◆ Variant()
TypeTag Aptos.Accounts.AccountAddress.Variant |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file:
- Aptos.Accounts/AccountAddress.cs