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