@triton-one/yellowstone-grpc 5.0.2 → 5.0.4
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 -1
- package/dist/cjs/grpc/geyser.js +643 -8
- package/dist/cjs/grpc/geyser.js.map +1 -1
- package/dist/cjs/index.js +160 -65
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/grpc/geyser.js +609 -1
- package/dist/esm/grpc/google/protobuf/timestamp.js +1 -1
- package/dist/esm/grpc/solana-storage.js +1 -1
- package/dist/esm/index.js +157 -38
- package/dist/types/grpc/geyser.d.ts +55 -0
- package/dist/types/index.d.ts +31 -17
- package/dist/types/napi/index.d.ts +344 -6
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -45,6 +45,21 @@ These changes are internal to the SDK and do not have any breaking changes for c
|
|
|
45
45
|
|
|
46
46
|
The [napi-rs](https://github.com/napi-rs/napi-rs) based implementation is inspired from the implemenation of the [LaserStream SDK](https://github.com/helius-labs/laserstream-sdk)
|
|
47
47
|
|
|
48
|
+
### Type Compatibility
|
|
49
|
+
|
|
50
|
+
The public SDK always returns the generated protobuf-compatible types from
|
|
51
|
+
`src/grpc/geyser.ts`.
|
|
52
|
+
|
|
53
|
+
- Unary methods return generated response objects (for example `PongResponse`,
|
|
54
|
+
`GetSlotResponse`, `GetVersionResponse`) instead of raw N-API wrapper shapes.
|
|
55
|
+
- Subscription stream updates are normalized to `SubscribeUpdate` with
|
|
56
|
+
top-level oneof fields (`account`, `slot`, `transaction`, etc).
|
|
57
|
+
- The internal N-API `Js...` objects are an implementation detail and are
|
|
58
|
+
converted automatically by the SDK wrapper.
|
|
59
|
+
|
|
60
|
+
This allows existing user code typed against the generated `src/grpc` types to
|
|
61
|
+
remain stable while using the N-API backend.
|
|
62
|
+
|
|
48
63
|
## Development
|
|
49
64
|
|
|
50
65
|
### Local Testing
|
|
@@ -59,4 +74,3 @@ When building for local testing at the root of the project where the `Makefile`
|
|
|
59
74
|
|
|
60
75
|
4. Run `client.ts` with an example subscription request below:
|
|
61
76
|
`tsx examples/typescript/src/client.ts --endpoint <ENDPOINT> --x-token <X-TOKEN> --commitment processed subscribe --transactions TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`
|
|
62
|
-
|