npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@oasisprotocol/client

v1.1.0

Published

Users of this package, see [this getting started guide](docs/getting-started.md).

Downloads

2,976

Readme

An oasis-core SDK for TypeScript

Users of this package, see this getting started guide.

Philosophy

Prioritize exposing an unopinionated binding to oasis-node's gRPC services. Mostly leave the protocol and formats be, and don't create too much abstraction over it. Aim to create a library that will take less work to maintain when oasis-core changes. The target audience is developers who are already familiar with oasis-core.

Inventory of what's here

  1. A layer over grpc-web to hook up CBOR-based message serialization.
  2. Method definitions and wrappers to represent the node's gRPC methods.
  3. A heuristic to convert structures from CBOR maps to JavaScript objects.
  4. Type definitions for structures.
  5. Helpers for operating on a few kinds of data.
  6. Constants.
  7. JSDoc copied from Godoc.
  8. Wrappers for consensus transactions.

Design notes

  1. There is no conversion layer between deserialized messages and further object model.
  2. Non-structure types, e.g. specialized byte arrays such as Quantity and PublicKey don't have dedicated names in the type system.
  3. Types are only interfaces (where possible), and helpers are standalone functions.

Caveats

  1. oasis-node's gRPC interface is not desigend to be secure against untrusted clients. We suggest using this SDK with an additional access control component.
  2. Native gRPC is not accessible over the web. The grpc-web project suggests setting up an Envoy proxy to allow browsers to connect.
  3. Empty structures are deserialized into an empty Map, due to a limitation in the heuristic that converts structures to objets.
  4. Go prefers to use nil instead of some empty values and to serialize them as null or missing structure fields. This behavior is not modeled in this library's type system.