-
Notifications
You must be signed in to change notification settings - Fork 518
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
Add connectAndSignIn to CBWProvider #910
Conversation
* @param {string} params.nonce - A unique string to prevent replay attacks. | ||
* @param {string} [params.statement] - An optional human-readable ASCII assertion that the user will sign. | ||
* @param {string[]} [params.resources] - An optional list of information the user wishes to have resolved as part of authentication by the relying party. |
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.
This reverts commit fec69ba.
@@ -596,6 +597,76 @@ export class CoinbaseWalletProvider | |||
return res.result; | |||
} | |||
|
|||
/** |
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.
* IMPORTANT: Signature validation is not performed by this method. Users of this method are advised to perform their own signature validation. | ||
* Common web3 frontend libraries such as ethers.js and viem provide the `verifyMessage` utility function that can be used for signature validation. |
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.
// NOTE: It was intentionally built by following the pattern of the existing eth_requestAccounts method | ||
// to maintain consistency and avoid introducing a new pattern. | ||
// We acknowledge the need for a better design, and it is planned to address and improve it in a future refactor. |
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.
accounts: AddressString[]; | ||
message: string; | ||
signature: string; |
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.
We may want to type message
and signature
as HexString
.
* add connectAndSignIn * for testing * implementation. * Revert "for testing" This reverts commit fec69ba.
Summary
How did you test your changes?