Skip to main content
Version: 17.5.0

Sapling Spending Key Instantiation


Storing private keys in memory is suitable for development workflows but risky for production use-cases! Use the InMemorySpendingKey appropriately given your risk profile

From Mnemonic

Instantiation of a InMemorySpendingkey from Mnemonic does not require a password as it is only used to change an unencrypted sask... to an encrypted MMXj... spending key or vice versa


  • mnemonic list of words
  • derivationPath tezos current standard 'm/'


  • InMemorySpendingKey class instantiated
const SaplingKeyProvider = await InMemorySpendingKey.fromMnemonic(
'leopard crouch simple blind castle they elder enact slow rate mad blanket saddle tail silk fury quarter obscure interest exact veteran volcano fabric cherry',
) // derivationPath by current standard is 'm/'

From Encrypted Spending Key

If the spending key is encrypted prefixed with MMXj... then a password is required to decrypt to a unencrypted Spending Key sask...


  • spendingKey unencrypted sask... or encrypted MMXj...
  • password required for MMXj encrypted keys
const SaplingKeyProvider = new InMemorySpendingKey(

Provide detailed feedback