Skip to content

Conversation

@steveluscher
Copy link
Contributor

@steveluscher steveluscher commented Mar 11, 2023

Summary

This is a cross-environment implementation of a basic JSON-RPC 2.0 transport. It implements the interface required by @solana/rpc-core, and as such is the last piece needed to be able to make an actual RPC request:

Test Plan

const transport = createJsonRpcTransport({ url: 'https://api.devnet.solana.com' });
const blockHeight = await rpc.getBlockHeight(transport, { commitment: 'confirmed' });
console.log('blockHeight', blockHeight);

Stack created with Sapling. Best reviewed with ReviewStack.

Summary: This is a separate module so that we can typecheck it using the `DOM` lib, without polluting any of the upstream packages with `DOM` libdefs. This ensures that downstream packages don't unintentionally use `DOM` types that won't work in Node/React Native..
# Summary

This is a cross-environment implementation of a basic JSON-RPC 2.0 transport. It implements the interface required by `@solana/rpc-core`, and as such is the last piece needed to be able to make an actual RPC request:

# Test Plan

```ts
const transport = createJsonRpcTransport({ url: 'https://api.devnet.solana.com' });
const blockHeight = await rpc.getBlockHeight(transport, { commitment: 'confirmed' });
console.log('blockHeight', blockHeight);
```
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.73.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants