Class XrplCodec
Inheritance
Namespace: Xrpl.AddressCodec
Assembly: Xrpl.AddressCodec.dll
Syntax
public class XrplCodec : object
Fields
| Improve this Doc View SourceAccountID
Account address (20 bytes)
Declaration
public static B58.Version AccountID
Field Value
Type | Description |
---|---|
B58.Version |
Alphabet
Declaration
public const string Alphabet = null
Field Value
Type | Description |
---|---|
System.String |
AnySeed
Declaration
public static B58.Versions AnySeed
Field Value
Type | Description |
---|---|
B58.Versions |
Ed25519Seed
[1, 225, 75]
Declaration
public static B58.Version Ed25519Seed
Field Value
Type | Description |
---|---|
B58.Version |
K256Seed
33; Seed value (for secret keys) (16 bytes)
Declaration
public static B58.Version K256Seed
Field Value
Type | Description |
---|---|
B58.Version |
NodePublic
28; Validation public key (33 bytes)
Declaration
public static B58.Version NodePublic
Field Value
Type | Description |
---|---|
B58.Version |
PublicKey
Account public key (33 bytes)
Declaration
public static B58.Version PublicKey
Field Value
Type | Description |
---|---|
B58.Version |
Methods
| Improve this Doc View SourceDecodeAccountID(String)
Returns the decoded bytes of the classic address.
Declaration
public static byte[] DecodeAccountID(string accountId)
Parameters
Type | Name | Description |
---|---|---|
System.String | accountId | Classic address to be decoded. |
Returns
Type | Description |
---|---|
System.Byte[] | The decoded bytes of the classic address. |
DecodeAccountPublic(String)
Returns the decoded bytes of the account public key.
Declaration
public static byte[] DecodeAccountPublic(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | Account public key to be decoded. |
Returns
Type | Description |
---|---|
System.Byte[] | The decoded bytes of the account public key. |
DecodeNodePublic(String)
Returns the decoded bytes of the node public key
Declaration
public static byte[] DecodeNodePublic(string publicKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | publicKey | Node public key to be decoded. |
Returns
Type | Description |
---|---|
System.Byte[] | The decoded bytes of the node public key. |
DecodeSeed(String)
Returns (decoded seed, its algorithm).
Declaration
public static XrplCodec.DecodedSeed DecodeSeed(string seed)
Parameters
Type | Name | Description |
---|---|---|
System.String | seed | The b58 encoding of a seed. |
Returns
Type | Description |
---|---|
XrplCodec.DecodedSeed | A(decoded seed, its algorithm). |
EncodeAccountID(Byte[])
Returns the classic address encoding of these bytes as a base58 string.
Declaration
public static string EncodeAccountID(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | Bytes to be encoded. |
Returns
Type | Description |
---|---|
System.String | The classic address encoding of these bytes as a base58 string. |
EncodeAccountPublic(Byte[])
Returns the account public key encoding of these bytes as a base58 string.
Declaration
public static string EncodeAccountPublic(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | Bytes to be encoded. |
Returns
Type | Description |
---|---|
System.String | The account public key encoding of these bytes as a base58 string. |
EncodeNodePublic(Byte[])
Returns the node public key encoding of these bytes as a base58 string.
Declaration
public static string EncodeNodePublic(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | Bytes to be encoded. |
Returns
Type | Description |
---|---|
System.String | The node public key encoding of these bytes as a base58 string. |
EncodeSeed(Byte[], String)
Returns an encoded seed.
Declaration
public static string EncodeSeed(byte[] bytes, string type)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | Entropy bytes of SEED_LENGTH. |
System.String | type | Either ED25519 or SECP256K1. |
Returns
Type | Description |
---|---|
System.String | An encoded seed. |
IsValidClassicAddress(String)
Returns a bool representing if the classic address is valid.
Declaration
public static bool IsValidClassicAddress(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | Classic address to validate. |
Returns
Type | Description |
---|---|
System.Boolean | A bool representing if the classic address is valid. |