Exemple #1
0
        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()));
        }
Exemple #2
0
        public static KeyPair FromAccountId(string accountId)
        {
            var bytes = StrKey.DecodeCheck(VersionByte.ed25519Publickey, accountId);

            return(FromPublicKey(bytes));
        }
Exemple #3
0
        public static KeyPair FromSeed(string seed)
        {
            var bytes = StrKey.DecodeCheck(VersionByte.ed25519SecretSeed, seed);

            return(FromRawSeed(bytes));
        }