Questions tagged [json-rpc]

JSON-RPC is a standard JSON data-format based (r)emote (p)rocedure (c)all protocol.

See http://json-rpc.org/ for specification and implementations for various languages.

JSON stands for JavaScript Object Notation. It is a text-based lightweight data-interchange format. See http://www.json.org/ for details.

RPC stands for remote procedure call, which is a family of protocols. See the Wikipedia article Remote procedure call for origins, current variations and applications.

673 questions
0
votes
1 answer

Rust jsonrpc-core accessing Params as map or array

I have implemented json rpc server with rust by looking up this. use jsonrpc_core::*; use jsonrpc_http_server::*; fn main() { let mut io = IoHandler::new(); io.add_method("say_hello", |_: Params| { println!("Params : {:?}",…
Bopsi
  • 2,090
  • 5
  • 36
  • 58
0
votes
0 answers

How to use this php class

I need to use the functions of this class,I wrote a code but the output was empty,need echo data from all functions. I correctly entered the connection requirements,script use Json-rpc for request,The port is open on the server I don't know how to…
cmaxxx
  • 45
  • 3
0
votes
1 answer

Extract single value from curl in Python

I am using the API found here: https://docs.deribit.com/v2/?shell#public-ticker (specifically the shell documentation for curl requests) I am looking to run the request on multiple instrument names. Then I would like to extract a certain value from…
user1781336
  • 85
  • 4
  • 12
0
votes
1 answer

Why is my websocket request "unauthorized" only when written in OOP, when the same works perfectly when written with just functions?

I'm writing a Python program that does some trading automation. The API I work with is from Deribit, whose preferred transport mechanism is Websocket. I'm a complete newbie to Python's websockets and asyncio modules. Here's the code I first wrote…
0
votes
1 answer

Getting a list of keys from block 0

Using a local blockchain, is it is possible to use the bitcoin-core rpc commands to query a block (such as the genesis block) and get a list of all the public keys used in that block? If it is possible, which commands do I need to use?
oshirowanen
  • 15,297
  • 82
  • 198
  • 350
0
votes
1 answer

Developing JavaScript APIs by using Third-Party Librarys

I currently want to make my project accessible not only via back-end code (C#, Python, PHP, etc.), so I decided to write an easy and simple JS API, every developer can easily integrate within their website / project. Since the whole thing is a…
Julius F
  • 3,434
  • 4
  • 29
  • 44
0
votes
1 answer

Sending BitCoins using Electrum JSON-RPC

I am trying to send bitcoins using electrum jsonrpc, but it keeps showing "invalid parameters" error. That is how I call payto method. public function payTo($dest, $amount, $source, $fee) { return $this->sendRequest('payto', ['destination' =>…
0
votes
0 answers

how to connect to a device using JSON-RPC

A device I use has recently updated its external control method from simple telnet commands to json-rpc. I am having a tough time to understand how to connect to the device and communicate with it using this method - eg ask a question and receive a…
0
votes
0 answers

How to Send JSON RPC in Java over websocket

In typescript we can send rpc notification like the below code const webSocket = new WebSocket('ws://www.example.com/socketserver'); rpc.listen({ webSocket, onConnection: (connection: rpc.MessageConnection) => { const notification =…
0
votes
1 answer

How many addressed can be added to a bitcoin full node?

I'm running a Bitcoin full node on my server. I'm going to use this server as a light wallet api server using RCP methods. And I'm going to add an address to the node whenever a light wallet generates a new address to track all transactions and…
0
votes
1 answer

Passing SQL statements with modified field names and whitelist validation to an RPC function. Is it safe and a common practice?

I created an API where an SQL statement can be passed as a parameter using JSON-RPC. The API provides a table and column names dictionary so actual database table and column names are not known to the client, and can be accessed using the GET…
Ray
  • 11
  • 4
0
votes
1 answer

Bitcoin cURL/JSON-RPC using Rust

I'm writing a code in RUST to query data from bitcoin-core using JSON-RPC. I'm using this curl-rust, but no output is being shown on running cargo run. extern crate curl; use std::io::Read; use curl::easy::{Easy, List}; fn main() { let mut…
curious
  • 121
  • 1
  • 1
  • 12
0
votes
1 answer

ElectrumX server jsonRPC authentication

Unable to connect to electrum server Error: HTTPConnectionPool(host='electrum.eff.ro', port=50002): Max retries exceeded with url: / (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] No connection could be made…
0
votes
2 answers

Convert json string response representing UCHAR array to Byte array

I'm calling a json-rpc api that returns a UCHAR array that represents a PDF file (so the result property on return contains a string representation of a UCHAR array). I need to convert this result string into a Byte array so I can handle it as a PDF…
Ely Bascoy
  • 11
  • 5
0
votes
2 answers

Why does JsonCpp http client fail on a 201 response code?

Using the json-rpc-cpp library, I am creating an EOS Wallet using wallet RPC. HttpClient *temp = new HttpClient("http://127.0.0.1:30031/v1/wallet/create"); string res; string str = "testwallet1"; temp->SendRPCMessage(str, res); cout<<"res :…
Jayesh
  • 4,755
  • 9
  • 32
  • 62