public string Parse([FromBody] BeforeParse parse)
        {
            AssetTypesRegisterer.RegisterTypes();
            WAction walletservice = new WAction();
            KeyPair privatekey    = walletservice.GetKeyPair(parse.BeforeParsePrivateKey);

            if (privatekey == null)
            {
                // comment:プライベートキーが適正ではありません!
                AfterParse missparse = new AfterParse();
                missparse.AfterParsepublickey = string.Empty;
                string resultjson = JsonSerializer.Serialize(missparse);
                return(resultjson);
            }
            Address mypublickey = Inputjudgement1(privatekey);

            if (mypublickey == null)
            {
                //comment:パブリックキーに変換できませんでした!
                AfterParse missparse = new AfterParse();
                missparse.AfterParsepublickey = string.Empty;
                string resultjson = JsonSerializer.Serialize(missparse);
                return(resultjson);
            }
            string ParsePublicKey = Convert.ToString(mypublickey);

            AfterParse afterparse = new AfterParse();

            afterparse.AfterParsepublickey = ParsePublicKey;
            string successjson = JsonSerializer.Serialize(afterparse);

            return(successjson);
        }
Example #2
0
 private void OnBeforeParse(List <Token> tokens)
 {
     BeforeParse?.Invoke(this, tokens);
 }