Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

add signer interface #3653

Closed
pynixwang opened this issue Dec 1, 2024 · 5 comments
Closed

add signer interface #3653

pynixwang opened this issue Dec 1, 2024 · 5 comments
Labels
enhancement New feature or request invalid This doesn't seem right question Add this to close an issue with instructions on how to repost as a question on Stack Exchange

Comments

@pynixwang
Copy link

export a signer interface for third party libraries unified api

do not care keypair or wallet adapter.

@pynixwang pynixwang added the enhancement New feature or request label Dec 1, 2024
@steveluscher
Copy link
Contributor

I need more information. What is it that you would like beyond the types that we already export (eg. TransactionSigner, MessageSigner, TransactionSendingSigner, etc.).

@steveluscher steveluscher added the invalid This doesn't seem right label Dec 2, 2024
@pynixwang
Copy link
Author

https://github.com/solana-labs/solana-program-library/blob/d544111b4cc193394b9bb00ac3e1482bb08a5fa0/token/js/src/actions/createMint.ts#L21

createMint has payer: Signer parameter, but it must be a Keypair, wallet adapter is not possible.

@steveluscher
Copy link
Contributor

I'm not sure that I understand the premise.

Signer is defined as follows:

https://github.com/solana-labs/solana-web3.js/blob/maintenance/v1.x/src/keypair.ts#L7-L10

The body of that createMint function uses payer in two positions, one at which it accesses payer.publicKey and another where it's used in a position that expects Array<Signer>.

Perhaps you'll have more luck debugging your program by posting a question on Stack Exchange.

Other than that, I encourage you to explore the new 2.0 library. The 1.0 library about which this issue was filed will be end-of-lifed next year.

@steveluscher steveluscher added the question Add this to close an issue with instructions on how to repost as a question on Stack Exchange label Dec 3, 2024
Copy link
Contributor

github-actions bot commented Dec 3, 2024

Hi @pynixwang,

Thanks for your question!

We want to make sure to keep signal strong in the GitHub issue tracker – to make sure that it remains the best place to track issues that affect the development of the Solana JavaScript SDK itself.

Questions like yours deserve a purpose-built Q&A forum. Unless there exists evidence that this is a bug with the Solana JavaScript SDK itself, please post your question to the Solana Stack Exchange using this link: https://solana.stackexchange.com/questions/ask


This automated message is a result of having added the ‘question’ tag.

@github-actions github-actions bot closed this as completed Dec 3, 2024
Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, 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 Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request invalid This doesn't seem right question Add this to close an issue with instructions on how to repost as a question on Stack Exchange
Projects
None yet
Development

No branches or pull requests

2 participants