@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.
Files changed (2) hide show
  1. package/README.md +15 -7
  2. 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` talks to the chain and the indexer over **gRPC-web**. In a
10
- browser that is the only option; in a backend it is the wrong one — gRPC-web needs
11
- a proxy hop in front of the node, and it is meaningfully slower than the native
12
- protocol for the number of calls a trading service makes.
13
-
14
- This SDK speaks native gRPC over `@grpc/grpc-js` to the same endpoints, so a
15
- backend calls the chain and the indexer directly with no proxy in the path.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burningflames/inj-exchange-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Trading messages, query clients and EIP-712 transaction building for the Injective exchange module",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",