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

Account imported from mnemonic is different from @solana/web3.js #59

Open
nguyenhaiduc06 opened this issue Sep 17, 2022 · 1 comment
Open

Comments

@nguyenhaiduc06
Copy link

With the same mnemonic: miracle pizza supply useful steak border same again youth silver access hundred
Solana swift output an account with public key: 3h1zGmCwsRJnVk5BuRNMLsPaQu1y2aqXqXDWYCgrp5UG
@solana/web3.js output an account with public key: HnXJX1Bvps8piQwDYEYC6oea9GEkvQvahvRj3c97X9xr

@bigearsenal
Copy link
Collaborator

bigearsenal commented Sep 19, 2022

Hi. The different is the derivation path. Don't remember exactly which one is being used now in @solana/web3.js, but for SolanaSwift, we used m/501'/0'/0/0 as default derivablePath for seed phrase with 12 words.
You can try create account with .bip44Change by adding additional param to Account's initialization Account(phrase: ..., derivablePath: .default)

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

No branches or pull requests

2 participants