public class StrKey
extends java.lang.Object
Constructor and Description |
---|
StrKey() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decodeClaimableBalance(java.lang.String data)
Decodes strkey claimable balance ID (B...) to raw bytes.
|
static byte[] |
decodeContract(java.lang.String data)
Decodes strkey contract ID (C...) to raw bytes.
|
static byte[] |
decodeEd25519PublicKey(java.lang.String data)
Decodes strkey ed25519 public key (G...) to raw data
|
static byte[] |
decodeEd25519SecretSeed(char[] data)
Decodes strkey ed25519 seed char array (S...) to raw bytes
|
static byte[] |
decodeLiquidityPool(java.lang.String data)
Decodes strkey liquidity pool ID (L...) to raw bytes.
|
static byte[] |
decodeMed25519PublicKey(java.lang.String data)
Decodes strkey Stellar med25519 public key (M...) to raw bytes
|
static MuxedAccount |
decodeMuxedAccount(java.lang.String address)
Deprecated.
|
static byte[] |
decodePreAuthTx(java.lang.String data)
Decodes strkey PreAuthTx (T...) to raw bytes
|
static byte[] |
decodeSha256Hash(java.lang.String data)
Decodes strkey SHA256 hash (X...) to raw bytes
|
static byte[] |
decodeSignedPayload(java.lang.String data)
Decodes strkey signed payload (P...) to raw bytes.
|
static java.lang.String |
encodeClaimableBalance(byte[] data)
Encodes raw data to strkey claimable balance ID (B...)
|
static java.lang.String |
encodeContract(byte[] data)
Encodes raw data to strkey contract ID (C...)
|
static java.lang.String |
encodeEd25519PublicKey(AccountID accountID)
Deprecated.
|
static java.lang.String |
encodeEd25519PublicKey(byte[] data)
Encodes raw data to strkey ed25519 public key (G...)
|
static char[] |
encodeEd25519SecretSeed(byte[] data)
Encodes raw data to strkey ed25519 seed in char array (S...)
|
static java.lang.String |
encodeLiquidityPool(byte[] data)
Encodes raw data to strkey liquidity pool ID (L...)
|
static java.lang.String |
encodeMed25519PublicKey(byte[] data)
Encodes raw data to strkey Stellar med25519 public key (M...)
|
static java.lang.String |
encodeMuxedAccount(MuxedAccount muxedAccount)
Deprecated.
|
static java.lang.String |
encodePreAuthTx(byte[] data)
Encodes raw data to strkey PreAuthTx (T...)
|
static java.lang.String |
encodeSha256Hash(byte[] data)
Encodes raw data to strkey SHA256 hash (X...)
|
static java.lang.String |
encodeSignedPayload(byte[] data)
Encodes raw data to strkey signed payload (P...)
|
static AccountID |
encodeToXDRAccountId(java.lang.String data)
Deprecated.
|
static MuxedAccount |
encodeToXDRMuxedAccount(java.lang.String data)
Deprecated.
|
static boolean |
isValidClaimableBalance(java.lang.String claimableBalanceId)
Checks validity of claimable balance (B...) address.
|
static boolean |
isValidContract(java.lang.String contractId)
Checks validity of contract (C...) address.
|
static boolean |
isValidEd25519PublicKey(java.lang.String accountID)
Checks validity of Stellar account ID (G...).
|
static boolean |
isValidEd25519SecretSeed(char[] seed)
Checks validity of seed (S...).
|
static boolean |
isValidLiquidityPool(java.lang.String liquidityPoolId)
Checks validity of liquidity pool (L...) address.
|
static boolean |
isValidMed25519PublicKey(java.lang.String med25519PublicKey)
Checks validity of med25519 public key (M...).
|
static boolean |
isValidPreAuthTx(java.lang.String preAuthTx)
Checks validity of PreAuthTx (T...).
|
static boolean |
isValidSha256Hash(java.lang.String sha256Hash)
Checks validity of SHA256 hash (X...).
|
static boolean |
isValidSignedPayload(java.lang.String signedPayload)
Checks validity of signed payload (P...).
|
public static java.lang.String encodeEd25519PublicKey(byte[] data)
data
- data to encodepublic static byte[] decodeEd25519PublicKey(java.lang.String data)
data
- data to decodepublic static boolean isValidEd25519PublicKey(java.lang.String accountID)
accountID
- the account ID to checkpublic static char[] encodeEd25519SecretSeed(byte[] data)
data
- data to encodepublic static byte[] decodeEd25519SecretSeed(char[] data)
data
- data to decodepublic static boolean isValidEd25519SecretSeed(char[] seed)
seed
- the seed to checkpublic static java.lang.String encodePreAuthTx(byte[] data)
data
- data to encodepublic static byte[] decodePreAuthTx(java.lang.String data)
data
- data to decodepublic static boolean isValidPreAuthTx(java.lang.String preAuthTx)
preAuthTx
- the PreAuthTx to checkpublic static java.lang.String encodeSha256Hash(byte[] data)
data
- data to encodepublic static byte[] decodeSha256Hash(java.lang.String data)
data
- data to decodepublic static boolean isValidSha256Hash(java.lang.String sha256Hash)
sha256Hash
- the SHA256 hash to checkpublic static java.lang.String encodeSignedPayload(byte[] data)
data
- data to encodepublic static byte[] decodeSignedPayload(java.lang.String data)
data
- data to decodepublic static boolean isValidSignedPayload(java.lang.String signedPayload)
signedPayload
- the signed payload to checkpublic static java.lang.String encodeContract(byte[] data)
data
- data to encodepublic static byte[] decodeContract(java.lang.String data)
data
- data to decodepublic static boolean isValidContract(java.lang.String contractId)
contractId
- the contract ID to checkpublic static java.lang.String encodeLiquidityPool(byte[] data)
data
- data to encodepublic static byte[] decodeLiquidityPool(java.lang.String data)
data
- data to decodepublic static boolean isValidLiquidityPool(java.lang.String liquidityPoolId)
liquidityPoolId
- the liquidity pool ID to checkpublic static java.lang.String encodeClaimableBalance(byte[] data)
data
- data to encodepublic static byte[] decodeClaimableBalance(java.lang.String data)
data
- data to decodepublic static boolean isValidClaimableBalance(java.lang.String claimableBalanceId)
claimableBalanceId
- the claimable balance ID to checkpublic static java.lang.String encodeMed25519PublicKey(byte[] data)
data
- data to encodepublic static byte[] decodeMed25519PublicKey(java.lang.String data)
data
- data to decodepublic static boolean isValidMed25519PublicKey(java.lang.String med25519PublicKey)
med25519PublicKey
- the med25519 public key to check@Deprecated public static java.lang.String encodeEd25519PublicKey(AccountID accountID)
This method is deprecated and will be removed in future versions, use encodeEd25519PublicKey(byte[])
instead.
accountID
- data to encode@Deprecated public static java.lang.String encodeMuxedAccount(MuxedAccount muxedAccount)
This method is deprecated and will be removed in future versions, use MuxedAccount
instead.
muxedAccount
- the muxed account to encode@Deprecated public static MuxedAccount decodeMuxedAccount(java.lang.String address)
MuxedAccount
.
This method is deprecated and will be removed in future versions, use MuxedAccount
instead.
address
- the address to decodeMuxedAccount
representation of the key@Deprecated public static AccountID encodeToXDRAccountId(java.lang.String data)
AccountID
.
This method is deprecated and will be removed in future versions, use KeyPair.getXdrAccountId()
instead.
data
- the data to encodeAccountID
representation of the key@Deprecated public static MuxedAccount encodeToXDRMuxedAccount(java.lang.String data)
MuxedAccount
.
This method is deprecated and will be removed in future versions, use MuxedAccount
instead.
data
- the data to encodeMuxedAccount
representation of the key