@burningflames/inj-exchange-sdk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,13 +6,21 @@ the SDK hands you the bytes.
|
|
|
6
6
|
|
|
7
7
|
## Why this exists
|
|
8
8
|
|
|
9
|
-
`@injectivelabs/sdk-ts`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
This SDK speaks native gRPC over `@grpc/grpc-js` to the same endpoints, so
|
|
15
|
-
|
|
9
|
+
`@injectivelabs/sdk-ts` reaches the chain and the indexer over **gRPC-web**. That is
|
|
10
|
+
the right choice in a browser and a detour in a backend: every call crosses an
|
|
11
|
+
Envoy hop in front of the node, and the client carries a wallet-and-cosmos platform
|
|
12
|
+
this service never touches — 68 packages, 181 MB installed, 705 ms to import.
|
|
13
|
+
|
|
14
|
+
This SDK speaks native gRPC over `@grpc/grpc-js` to the same endpoints, so nothing
|
|
15
|
+
sits between the backend and the node. It installs 35 packages, 105 MB, and imports
|
|
16
|
+
in 67 ms.
|
|
17
|
+
|
|
18
|
+
The hop is not the bottleneck. Measured against the public endpoints, p50 is within
|
|
19
|
+
5% and throughput at 64 calls in flight is within 3%, because a call spends its time
|
|
20
|
+
inside the endpoint rather than in the proxy. What native gRPC does buy is the tail:
|
|
21
|
+
on an orderbook read gRPC-web reached 871 ms at p95 where native stayed at 259 ms.
|
|
22
|
+
It also lets the client point at a node's own port 9090 with no proxy to stand up,
|
|
23
|
+
which is the lever that matters.
|
|
16
24
|
|
|
17
25
|
## Scope
|
|
18
26
|
|
package/package.json
CHANGED