public static string EncodeCheck(VersionByte versionByte, byte[] data) { var writer = new Generated.ByteWriter(); writer.Write((byte)versionByte); writer.Write(data); byte[] checksum = StrKey.CalculateChecksum(writer.ToArray()); writer.Write(checksum); return(Base32Encoding.ToString(writer.ToArray())); }
public static KeyPair FromAccountId(string accountId) { var bytes = StrKey.DecodeCheck(VersionByte.ed25519Publickey, accountId); return(FromPublicKey(bytes)); }
public static KeyPair FromSeed(string seed) { var bytes = StrKey.DecodeCheck(VersionByte.ed25519SecretSeed, seed); return(FromRawSeed(bytes)); }