Implement POKT Network authentication #238
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
PoktProvider
that establishes a connection to NodeWalletaddress
,publicKey
from wallet, manage wallet connection through providerpublicKey
as a parameter touse-connected-wallet.tsx
hook, and tocredential-wallet
strategy on Next-Auth