Version: 23.1.0
This documentation is for Taquito version 23.1.0 and is no longer being updated. Some information may be outdated. View the latest version.
InMemorySpendingKey
Written by Zainen Suzuki
Sapling Spending Key Instantiation
:::caution Warning
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
Params:
mnemoniclist of wordsderivationPathtezos current standard ‘m/’
Returns:
- 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',
'm/'
) // 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...
Params:
spendingKeyunencrypted sask… or encrypted MMXj…passwordrequired for MMXj encrypted keys
const SaplingKeyProvider = new InMemorySpendingKey(
'MMXjN99mhomTm1Y5nQt8NfwEKTHWugsLtucX7oWrpsJd99qxGYJWP5aMb3t8zZaoKHQ898bLu9dwpog71bnjiDZfS9J9hWnTLCGm4fAjKKYeRuwTgCRjSdsP9znCPBUpCvyxeEFvUfamA5URrp8c7AaooAkobLW1PjNh2vjHobtiyNVTEtyTUWTLcjdxaiPbQWs3NaWvcb5Qr6z9MHhKrYNBHmsd9HBeRB2rVnvvL7pMc8f8zqyuXtmAuzMhiqPz3B4BRzuc8a2jkkoL14',
'test'
)