1.2.0 • Published 10 months ago
@oasisprotocol/client v1.2.0
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
- A layer over
grpc-webto hook up CBOR-based message serialization. - Method definitions and wrappers to represent the node's gRPC methods.
- A heuristic to convert structures from CBOR maps to JavaScript objects.
- Type definitions for structures.
- Helpers for operating on a few kinds of data.
- Constants.
- JSDoc copied from Godoc.
- Wrappers for consensus transactions.
Design notes
- There is no conversion layer between deserialized messages and further object model.
- Non-structure types, e.g. specialized byte arrays such as
QuantityandPublicKeydon't have dedicated names in the type system. - Types are only interfaces (where possible), and helpers are standalone functions.
Caveats
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.- Native gRPC is not accessible over the web. The
grpc-webproject suggests setting up an Envoy proxy to allow browsers to connect. - Empty structures are deserialized into an empty
Map, due to a limitation in the heuristic that converts structures to objets. - Go prefers to use
nilinstead of some empty values and to serialize them asnullor missing structure fields. This behavior is not modeled in this library's type system.
1.2.0
10 months ago
1.1.0
2 years ago
1.0.0
2 years ago
0.1.1-alpha.2
3 years ago
0.1.1-alpha.1
4 years ago
0.1.0-alpha9
4 years ago
0.1.0-alpha8
4 years ago
0.1.0-alpha7
4 years ago
0.1.0-alpha6
4 years ago
0.1.0-alpha5
5 years ago
0.1.0-alpha2
5 years ago
0.1.0-alpha3
5 years ago
0.1.0-alpha4
5 years ago
0.1.0-alpha1
5 years ago