Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solana/rpc-subscriptions-spec

Package Overview
Dependencies
Maintainers
0
Versions
943
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/rpc-subscriptions-spec - npm Package Compare versions

Comparing version 2.0.0-canary-20241026064848 to 2.0.0-canary-20241027102814

2

dist/types/rpc-subscriptions-channel.d.ts

@@ -14,3 +14,5 @@ import { SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED, SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED, SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT, SolanaError } from '@solana/errors';

}>) => Promise<RpcSubscriptionsChannel<TOutboundMessage, TInboundMessage>>;
export declare function transformChannelInboundMessages<TOutboundMessage, TNewInboundMessage, TInboundMessage>(channel: RpcSubscriptionsChannel<TOutboundMessage, TInboundMessage>, transform: (message: TInboundMessage) => TNewInboundMessage): RpcSubscriptionsChannel<TOutboundMessage, TNewInboundMessage>;
export declare function transformChannelOutboundMessages<TNewOutboundMessage, TOutboundMessage, TInboundMessage>(channel: RpcSubscriptionsChannel<TOutboundMessage, TInboundMessage>, transform: (message: TNewOutboundMessage) => TOutboundMessage): RpcSubscriptionsChannel<TNewOutboundMessage, TInboundMessage>;
export {};
//# sourceMappingURL=rpc-subscriptions-channel.d.ts.map

10

package.json
{
"name": "@solana/rpc-subscriptions-spec",
"version": "2.0.0-canary-20241026064848",
"version": "2.0.0-canary-20241027102814",
"description": "A generic implementation of JSON RPC Subscriptions using proxies",

@@ -57,6 +57,6 @@ "exports": {

"dependencies": {
"@solana/errors": "2.0.0-canary-20241026064848",
"@solana/rpc-spec-types": "2.0.0-canary-20241026064848",
"@solana/subscribable": "2.0.0-canary-20241026064848",
"@solana/promises": "2.0.0-canary-20241026064848"
"@solana/errors": "2.0.0-canary-20241027102814",
"@solana/promises": "2.0.0-canary-20241027102814",
"@solana/rpc-spec-types": "2.0.0-canary-20241027102814",
"@solana/subscribable": "2.0.0-canary-20241027102814"
},

@@ -63,0 +63,0 @@ "peerDependencies": {

@@ -69,1 +69,21 @@ [![npm][npm-image]][npm-url]

4. Calls the `unsubscribeMethodName` on the remote RPC when the abort signal is fired.
### `transformChannelInboundMessages(channel, transform)`
Given a channel with inbound messages of type `T` and a function of type `T => U`, returns a new channel with inbound messages of type `U`. Note that this only affects messages of type `"message"` and thus, does not affect incoming error messages.
For instance, it can be used to parse incoming JSON messages:
```ts
const transformedChannel = transformChannelInboundMessages(channel, JSON.parse);
```
### `transformChannelOutboundMessages(channel, transform)`
Given a channel with outbound messages of type `T` and a function of type `U => T`, returns a new channel with outbound messages of type `U`.
For instance, it can be used to stringify JSON messages before sending them over the wire:
```ts
const transformedChannel = transformChannelOutboundMessages(channel, JSON.stringify);
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc