Giter Site home page Giter Site logo

helium-jsonrpc-rs's People

Contributors

lthiery avatar madninja avatar olb1ue avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

helium-jsonrpc-rs's Issues

Can't deserialize state_channel_close_v1

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"
}

Support Authentication

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?

Dirty commit history

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.