コード例 #1
0
        public OpenChainSession(ApiProxy api, string passphrase) : base(api)
        {
            Mnemonic mnemonic = new Mnemonic(passphrase);

            passphraseKey = mnemonic.DeriveExtKey();
            rootKey       = passphraseKey.Derive(44, true).Derive(64, true).Derive(0, true).Derive(0).Derive(0);
            var bprootkey = rootKey.PrivateKey.PubKey.GetAddress(OpenChainServer.OpenChainNetwork);

            Account = $"/p2pkh/{bprootkey}/";
        }
コード例 #2
0
 public OpenChainServer(ApiProxy api)
 {
     Api = api;
 }
コード例 #3
0
 public static async Task <Record> GetValue(this ApiProxy api, string path, string type, string name, ByteString version = null)
 {
     return(await api.GetValue($"{path}:{type}:{name}", version));
 }
コード例 #4
0
 public OpenChainServer(string baseUrl)
 {
     Api = new ApiProxy(baseUrl);
 }
コード例 #5
0
 public static async Task <DecodedRecord <T> > GetValue <T>(this ApiProxy api, string path, string type, string name, ByteString version = null) where T : class
 {
     return(new DecodedRecord <T>(await api.GetValue($"{path}:{type}:{name}", version)));
 }