You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that Solnet cannot subscribe Quicknode endpoints (cannot detect results), the difference is, in Quicknode endpoints, 'subscription' field comes first in params, but in api.mainnet-beta.solana.com, 'result' field comes first.
I'm wondering if this is because Solnet relies on the order of the params.
I found that Solnet cannot subscribe Quicknode endpoints (cannot detect results), the difference is, in Quicknode endpoints, 'subscription' field comes first in params, but in api.mainnet-beta.solana.com, 'result' field comes first.
I'm wondering if this is because Solnet relies on the order of the params.
Working version:
Data
{"jsonrpc":"2.0","method":"slotNotification","params":{"result":{"slot":303986310,"parent":303986309,"root":303986278},"subscription":4783444}}
Code
var streamingClient = ClientFactory.GetStreamingClient("wss://api.mainnet-beta.solana.com"); await streamingClient.ConnectAsync(); var subscription = await streamingClient.SubscribeSlotInfoAsync( (state, data) => { Log.Information("Slot {Slot} at {Time}", data.Slot, DateTimeOffset.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")); });
Not working with Quicknode endpoints:
Data
{"jsonrpc":"2.0","method":"slotNotification","params":{"subscription":11263,"result":{"slot":343082753,"parent":343082752,"root":343082721}}}
Code
var streamingClient = ClientFactory.GetStreamingClient("wss://tame-cool-borough.solana-devnet.quiknode.pro/ca7e417575b2778a022f76bd72989cba039f2efe/"); await streamingClient.ConnectAsync(); var subscription = await streamingClient.SubscribeSlotInfoAsync( (state, data) => { Log.Information("Slot {Slot} at {Time}", data.Slot, DateTimeOffset.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")); });
The text was updated successfully, but these errors were encountered: