getUserAccount from main wallet public key #1498
-
Hey all, is it possible to get a user account from the main wallet public key? I'm trying to use the getUserAccount method by passing the public key of the signup wallet for a drift account, but I receive the error: DriftClient has no user for user id Are user ID's different from the Main Wallet address? If so, is there an alternative method to get the user ID from the main wallet public key? |
Beta Was this translation helpful? Give feedback.
Answered by
jordy25519
Feb 27, 2025
Replies: 1 comment 1 reply
-
Yes the wallet pubkey is called the 'authority'. const userAddress = getUserAccountPublicKeySync('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH', '<AUTHORITY PUBKEY>', 0); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
axelwp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes the wallet pubkey is called the 'authority'.
To derive your drift user address/pda (assuming the default sub-account, 0)