Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add alchemyTransport to use in other places #990

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

moldy530
Copy link
Collaborator

@moldy530 moldy530 commented Sep 27, 2024

Pull Request Checklist


PR-Codex overview

This PR introduces the alchemy transport method to the @account-kit/infra library, along with corresponding tests and documentation. It enhances the framework by allowing users to create transport configurations for interacting with Alchemy's API.

Detailed summary

  • Added alchemy export to index.ts.
  • Introduced alchemyTransport.js with transport creation logic and configuration types.
  • Created tests for alchemy in alchemyTransport.test.ts.
  • Added snapshots for transport test cases.
  • Documented alchemy method in alchemy.mdx.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Sep 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2024 9:23pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2024 9:23pm


type SplitTransportConfig = {
alchemyConnection: ConnectionConfig;
nodeRpcUrl: string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this should actually be called nodeTransport and take in a viem Transport type instead. That would allow devs more freedom, but the instantiation looks wilder.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a fan of passing the transport to escape hatch ourselves from upstream requests. Can we wrap a helper function to create a transport with the nodeRPCUrl? Is that much different than just the normal http(...)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants