-
Notifications
You must be signed in to change notification settings - Fork 210
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
How to derive PDAs using this solana-go ? #162
Comments
@aravinddojima package main
import (
"fmt"
"github.com/gagliardetto/solana-go"
)
func main() {
seed := [][]byte{[]byte("amm authority")}
programID := solana.MustPublicKeyFromBase58("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8")
addr, nonce, err := solana.FindProgramAddress(seed, programID)
if err != nil {
// handle error somehow
}
fmt.Printf("addr: %s nonce: %d \n", addr, nonce)
}
// Prints
// addr: 5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1 nonce: 254 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any way to derive PDAs using this package ?
The text was updated successfully, but these errors were encountered: