Skip to content

Conversation

badalya1
Copy link
Contributor

@badalya1 badalya1 commented Mar 21, 2025

Fixes #3584

ts/packages/anchor/src/program/accounts-resolver.ts enforces a Provider with a wallet but wallet is necessary for AnchorProvider and not necessarily for other custom provider.

This PR Removes this enforcement and only checks enforcement that Provider's public key is set which matches with all other requirements.

This allows a user to implement their own custom Provider which doesn't necessarily keep a Wallet inside it (and thus no private key) and allows custom logic for signing and sending transactions.

Copy link

vercel bot commented Mar 21, 2025

@badalya1 is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Yeah, why not. But before we can merge this, we need to:

  1. Fix the unrelated spacing changes, otherwise CI will fail. You can fix them by running:

    yarn lint:fix
  2. Add an entry for this change in the CHANGELOG.

@badalya1 badalya1 changed the title Remove provider with wallet enforcement Make Provider require publicKey instead of wallet in accounts resolver Mar 23, 2025
@badalya1 badalya1 requested a review from acheroncrypto March 23, 2025 13:12
@badalya1
Copy link
Contributor Author

I realized you tagged with ts and feature so I moved the changelog accordingly :) I like the maintenance of this project 👍🏻

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thank you!

@acheroncrypto acheroncrypto merged commit 70bdd6a into solana-foundation:master Mar 23, 2025
47 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove "'Provider' interface implementor to have a wallet field"
2 participants