How to get private and public keys for the wallet by providing a seed phrase (NEAR Protocol)

I need to be able to get public and private keys for NEAR wallet by providing it's seed-phrase. I've found a specific library/repo in NEAR's GitHub account that looks very promising for my case :) : https://github.com/near/near-seed-phrase

But, after some testing it looks like the results provided by this library (parseSeedPhrase function) don't match the actual keys which can be obtained by using near-cli utility.

I have an assumption that maybe NEAR's Testnet is using different value for a derivationPath parameter, and the one that is included as a default one inside the library is for the Mainnet only. Maybe I just missing something, any help would be appreciated.


near-seed-phrase works just fine, and the key generated by it is used for account creation (proof), but then Wallet generates a new random keypair and adds it to the account (proof) and stores it in the Local Storage of the browser. Thus, if you compare the key in the local storage, that won't match the one that is derived from the seed phrase since Wallet does not want you to invalidate your seed phrase after you sign in from a new device (you should be able to just remove the access key after you are done with the session).

Let's re-iterate, Wallet only uses the key derived from the seed phrase to add a fresh key to a given account, and never stores the seed phrase or the key derived from the seed phrase in the local storage.