Git Product home page Git Product logo

polkapipe's Introduction

Polkapipe

A low level client library for Substrate chains, doing less by design than subxt and sube (this is an opinionated fork of sube) with a big focus on few dependencies and portability so it can run in constrainted environments like the browser.

It does not touch the metadata and leaves everything as bytes. You should use some other crate such as desub to use metadata to decode the data (or Scales or the scale-value crate or polkadyn). If you want to cache the data you get back before decoding you can.

Polkapipe supports multiple backends under different feature flags like http, http-web or ws/wss, ws-web, and smoldot-std (a smoldot based light-node).

Goals:

  • few dependencies (and work in browesr)
  • endever to give you as good an error message as we can get our hands on. (work in progress)
  • provides an interface in scale (hiding away any json or hex that might unfortunately happen under the covers. Hopefully one day direct scale responses can be got over the websocket rather than it all being text, and on that day not much should change for the client.)

Wasm:

To compile for wasm:

cargo check --target wasm32-unknown-unknown --features ws-web --no-default-features

To test for wasm:

wasm-pack test --headless --firefox --no-default-features --features ws-web

Changelog

0.8:

  • Used less async traits. Now use PolkaPipe::<Backend> rather than Backend.
  • use nightly async trait for rpc rather than the crate.
  • re-add submit
  • added subscribe state (TODO: would be nice to unsubscribe when dropped). 0.7:
  • Removed ws_stream_wasm and used the underlying WebSocket directly. Less deps.
  • Made logging an opt in feature.
  • Backend not Send + Sync

polkapipe's People

Contributors

gilescope avatar olanod avatar

Watchers

James Cloos avatar  avatar

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.