dewi-alliance / helium-jsonrpc-rs Goto Github PK
View Code? Open in Web Editor NEWA json-rpc client for the Helium blockchain
A json-rpc client for the Helium blockchain
The struct from helium-api repo doesn't match what blockchain-node returns. Not sure if this should be an issue for helium-api-rs or blockchain-node or if we should handle on our end?
Error getting txn 6lKWyCdGN0hlSX7-eRpXuCr2OLaIBu7AHirJmT2uBmc. Type: state_channel_close_v1, error: error deserializing JSON response
This is what blockchain-node returns (some summaries omitted), compared to the struct from helium-api (link above)
"jsonrpc": "2.0",
"result": {
"block": 1042537,
"closer": "113eQhERDzDpd3cVJ1y6797G9bEjhe8MHZJXiPBTQV8mufuUUHW",
"conflicts_with": null,
"hash": "d3T1tv9TwWJ7WO6Ksld-6t01xCBqFB4-gPNpgYOFp3A",
"state_channel": {
"expire_at_block": 1042532,
"id": "WPKfag_Rx3tO9RNj1m3ZTOBG0alz4aFjbOhCdWDUObc",
"nonce": 31815,
"owner": "11w77YQLhgUt8HUJrMtntGGr97RyXmot1ofs5Ct2ELTmbFoYsQa",
"root_hash": "jJtmqN6F8MnkQ5ztNuA2dnUTH3wdza69dUTUz1sobyI",
"state": "open",
"summaries": [
{
"client": "11EtS1NXDcSJ9bmJVUp8g2SajiNZi8Zrn6x4zWGGa8JXdQVooiN",
"num_dcs": 1,
"num_packets": 1
},
{
"client": "11mRMJ5wKhHPfGRYBgH6v4aNb8WxoPre2oAs43f9x6HrzeS9Xoh",
"num_dcs": 1,
"num_packets": 1
},
{
"client": "112Ty182fb7AQbfTpb1BxV9MD5d8rVQfQ3VxByxNUFqZHGymoFSs",
"num_dcs": 1,
"num_packets": 1
},
{
"client": "11X9Gc9xbUJDowqV1ZqeeyGHoNVDg4sJiChBbwzxLWXTopqTBTR",
"num_dcs": 1,
"num_packets": 1
}
]
},
"type": "state_channel_close_v1"
},
"id": "1635361758"
}
I have this situation where I have blockchain-node
behind a proxy that imposes basic auth.
Are there plans to make this library support passing an authz header?
Something like this maybe
struct ClientOptions {
base_url: String,
timeout: Option<u64>,
authorization: Option<String>,
}
....
impl Client {
....
pub fn new(opts: ClientOptions) -> Self { ... }
}
would you accept a PR for this?
Is there a reason why ae462e54b0f0530fe4a2c1cf84aa2bb58282b82e
isn't the first commit? Looks like helium-api-rs
is in the commit history but this project truly started at the commit above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.