Пример #1
0
        public byte[] SignMessageByServiceKey(byte[] data, int chain, uint index)
        {
            using var masterKey = BitcoinBasedConfig
                                  .CreateExtKeyFromSeed(Seed);

            using var derivedKey = masterKey
                                   .Derive(new KeyPath(path: $"m/{ServicePurpose}'/0'/0'/{chain}/{index}"));

            return(derivedKey.SignMessage(data));
        }
Пример #2
0
        public SecureBytes GetServicePublicKey(uint index)
        {
            using var masterKey = BitcoinBasedConfig
                                  .CreateExtKeyFromSeed(Seed);

            using var extKey = masterKey
                               .Derive(new KeyPath(path: $"m/{ServicePurpose}'/0'/0'/0/{index}"));

            return(extKey.GetPublicKey());
        }