Example #1
0
 public void abi_json_to_bin([ArgRequired] AbiJsonToBinArguments args)
 {
     if (IsValidJson(args.args))
     {
         object argsObject = JsonConvert.DeserializeObject(args.args);
         OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetAbiJsonToBin(args.code, args.action, argsObject));
     }
 }
Example #2
0
 public void push_action([ArgRequired] PushActionArguments args)
 {
     if (IsValidJson(args.args))
     {
         Action        action      = new ActionUtility(args.host.AbsoluteUri).GetActionObject(args.action, args.permission_actor, args.permission_name, args.code, JsonConvert.DeserializeObject(args.args));
         List <string> privateKeys = JsonConvert.DeserializeObject <List <string> >(args.private_keys);
         OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).PushTransaction(new [] { action }, privateKeys));
     }
 }
Example #3
0
 public void push_transaction([ArgRequired] PushTransactionArguments args)
 {
     if (IsValidJson(args.actions) && IsValidJson(args.private_keys))
     {
         Action[]      actions     = JsonConvert.DeserializeObject <Action[]>(args.actions);
         List <string> privateKeys = JsonConvert.DeserializeObject <List <string> >(args.private_keys);
         OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).PushTransaction(actions, privateKeys));
     }
 }
Example #4
0
 public void get_producer_schedule([ArgRequired] BaseArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetProducerSchedule());
 }
Example #5
0
 public void get_table_rows([ArgRequired] TableRowsArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetTableRows(args.scope, args.code, args.table, "true", args.lower_bound, args.upper_bound, args.limit));
 }
Example #6
0
 public void get_currency_balance([ArgRequired] CurrencyBalanceArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetCurrencyBalance(args.account, args.code, args.symbol));
 }
Example #7
0
 public void get_raw_code_and_abi([ArgRequired] AccountArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetRawCodeAndAbi(args.account_name));
 }
Example #8
0
 public void get_code([ArgRequired] CodeArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetCode(args.account_name, args.code_as_wasm));
 }
Example #9
0
 public void get_block([ArgRequired] BlockArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetBlock(args.block_num_or_id));
 }
Example #10
0
 public void get_account([ArgRequired] AccountArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetAccount(args.account_name));
 }
Example #11
0
 public void abi_bin_to_json([ArgRequired] AbiBinToJsonArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetAbiBinToJson(args.code, args.action, args.binargs));
 }
Example #12
0
 public void get_info([ArgRequired] BaseArguments args)
 {
     OutputJson(ChainAPIProvider.GetInstance(args.host.AbsoluteUri).GetInfo());
 }