-
Notifications
You must be signed in to change notification settings - Fork 133
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(aa-sdk): sdk light client can call the alchemy client #1236
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd the label graphite-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
@@ -67,7 +86,7 @@ export function createLightAccountClient< | |||
*/ | |||
export async function createLightAccountClient( | |||
params: CreateLightAccountClientParams | |||
): Promise<SmartAccountClient> { | |||
): Promise<SmartAccountClient | AlchemySmartAccountClient> { | |||
const { transport, chain } = params; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh the difference is that this by default calls createSmartAccountClient
and the alchemy calls createAlchemySmartAccountClient
they take slightly different config params (createSCAClient takes in a paymasterMiddleware
and createAlchemySCAClient takes in a gasManagerConfig
or I think just a policyId
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll go down the side of testing the params to check the transport as alchemyTransport
params: AlchemyLightAccountClientConfig<TSigner> | ||
): Promise< | ||
AlchemySmartAccountClient< | ||
Chain | undefined, | ||
LightAccount<TSigner>, | ||
LightAccountClientActions<TSigner> | ||
> | ||
>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nice! this is way cleaner than what I was thinking which was adding to the conditional typing in for CreateLightAccountClientParams
based on the transport
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to verify this, and slight variation. Good thing for tests right?
f41c381
to
6ebfca5
Compare
59af47f
to
cca9ba3
Compare
How to use the Graphite Merge QueueAdd the label graphite-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR focuses on enhancing the
createLightAccountClient
function to supportAlchemyTransport
, modifying its return type accordingly, and introducing theisAlchemyTransport
utility function.Detailed summary
createLightAccountClient
to acceptAlchemyTransport
.AlchemySmartAccountClient
when usingAlchemyTransport
.isAlchemyTransport
function to check transport type.