We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have exported from OKX web3 wallet and got a private key hex string with length 64.
How can I derive my account from this private key hex string?
private key hex string
Image the value of private key string named privKey is a3f1c2d4e5b67890abcdef1234567890abcdef1234567890abcdef1234567890
privKey
a3f1c2d4e5b67890abcdef1234567890abcdef1234567890abcdef1234567890
I have tried keyPairFromSecretKey and keyPairFromSeed, but both don't work.
keyPairFromSecretKey
keyPairFromSeed
const keyPair = keyPairFromSecretKey(Buffer.from(privKey, 'hex'));
this will cause
// Error: bad secret key size at nacl.sign.keyPair.fromSecretKey
keyPairFromSeed(Buffer.from(privKey, 'hex')); const workchain = 0; const wallet = WalletContractV4.create({ workchain, publicKey: keyPair.publicKey, }); console.log(wallet.address);
This won't cause error, but got a different address from OKX wallet shows.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have exported from OKX web3 wallet and got a private key hex string with length 64.
How can I derive my account from this
private key hex string
?Image the value of private key string named
privKey
isa3f1c2d4e5b67890abcdef1234567890abcdef1234567890abcdef1234567890
I have tried
keyPairFromSecretKey
andkeyPairFromSeed
, but both don't work.this will cause
This won't cause error, but got a different address from OKX wallet shows.
The text was updated successfully, but these errors were encountered: