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

New Solana API #210

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open

New Solana API #210

wants to merge 9 commits into from

Conversation

mmjee
Copy link
Contributor

@mmjee mmjee commented Oct 31, 2023

PR

Describe your changes

See ticket. WIP implementation of a new API for Solana consumers to maintain parity with well-known wallets. Will attempt to make it behave identically to others.

Issue ticket number and link

Checklist before requesting a review

  • You have performed a self-review of your own code
  • You are using approved terminology
  • Your changes have been tested locally
  • Your code builds clean without any errors or warnings

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmjee mmjee
Copy link

netlify bot commented Oct 31, 2023

Deploy Preview for dev-authsdk-ref-guide ready!

Name Link
🔨 Latest commit b265f10
🔍 Latest deploy log https://app.netlify.com/sites/dev-authsdk-ref-guide/deploys/659e6f53415c1300087e89a9
😎 Deploy Preview https://deploy-preview-210--dev-authsdk-ref-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 31, 2023

Deploy Preview for authsdk-ref-guide ready!

Name Link
🔨 Latest commit b265f10
🔍 Latest deploy log https://app.netlify.com/sites/authsdk-ref-guide/deploys/659e6f5330081900089cde5d
😎 Deploy Preview https://deploy-preview-210--authsdk-ref-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mmjee mmjee changed the title Attempt to implement a separate Solana API New Solana API Oct 31, 2023
src/solana.ts Outdated
Comment on lines 10 to 12
case 'signMessage': {
return bs58.decode(<string>response)
}
Copy link
Member

Choose a reason for hiding this comment

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

@mmjee response of this will be of the format

type SignatureRes = {
    publicKey: BN // can use new solanaWeb3.PublicKey(address),
    signature: Base58Decoded 
}

src/solana.ts Outdated
return (await this.p.request({
method: 'signMessage',
params: {
message: data,
Copy link
Member

Choose a reason for hiding this comment

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

@mmjee message will be TextEncoded format

{
    message: new TextEncoder().encode(message)
}

And then auth SDK will need to bs58 encode it

mmjee added 6 commits November 1, 2023 18:43

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmjee mmjee

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmjee mmjee

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmjee mmjee

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmjee mmjee

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmjee mmjee

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmjee mmjee
@mmjee mmjee marked this pull request as ready for review November 9, 2023 05:29
makylfang and others added 2 commits January 9, 2024 16:10

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* intial code for esm build

* Little adjustment

---------

Co-authored-by: mmjee <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
mmjee mmjee
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.

None yet

3 participants