Example #1
0
        public static string EncodeCheck(VersionByte versionByte, byte[] data)
        {
            var writer = new ByteWriter();

            writer.Write((byte)versionByte);
            writer.Write(data);
            byte[] checksum = StrKey.CalculateChecksum(writer.ToArray());
            writer.Write(checksum);
            return(Base32Encoding.ToString(writer.ToArray()));
        }
Example #2
0
        public static KeyPair FromAccountId(string accountId)
        {
            var bytes = StrKey.DecodeCheck(VersionByte.ed25519Publickey, accountId);

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

            return(FromRawSeed(bytes));
        }