Signing with a Mnemonic
Obtaining the Mnemonic and HD Path
type AddressDerivationFn = (publicKey: Uint8Array, hdPath: string) => Array<string>Setting Up the LocalSigner
import { SolanaStaker } from '@chorus-one/solana'
import { LocalSigner } from '@chorus-one/signer-local'
const signer = new LocalSigner({
mnemonic: 'your-mnemonic-phrase',
accounts: [{ hdPath: 'your-hd-path' }],
addressDerivationFn: SolanaStaker.getAddressDerivationFn()
})
await signer.init()Further Reading
Last updated
Was this helpful?