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

Implement POKT Network authentication #238

Merged
merged 13 commits into from
Jan 22, 2024
Merged

Implement POKT Network authentication #238

merged 13 commits into from
Jan 22, 2024

Conversation

NMCarv
Copy link
Member

@NMCarv NMCarv commented Jan 19, 2024

Context

POKT Network is a partner looking to issue PDAs to their users and node operators using Gateway. They have a wallet system similar to Solana (they use the same algorithm), with the difference that their wallet is the first 40 characters of a SHA-256 hash of their public key.

Implementing POKT requires us to be able to add it as a wallet chain and verify signatures. This will be done by passing the public key as an argument (temporarily, until we can find a better solution), and check if the signature matches the message.

What's changed

  • Added POKT Network as an authentication method on login (new button on wallet modal)
  • Created new PoktProvider that establishes a connection to NodeWallet
  • Extracted address, publicKey from wallet, manage wallet connection through provider
  • Created method to relay message signature to wallet
  • Added publicKey as a parameter to use-connected-wallet.tsx hook, and to credential-wallet strategy on Next-Auth

Copy link

vercel bot commented Jan 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ❌ Failed (Inspect) Jan 22, 2024 8:28pm

@NMCarv NMCarv merged commit ea2b06e into develop Jan 22, 2024
1 of 2 checks passed
@NMCarv NMCarv deleted the feat/pokt branch January 22, 2024 20:25
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.

2 participants