Generate Private Key
Generate private key from Mnemonic
Creating a private key is creating a unique and secret key that belongs to you. This key is crucial for accessing and controlling your funds.
// Import the necessary library and initialize the SDK
import { TezosWalletProvider } from '@tatumio/tezos-wallet-provider';
import { TatumSDK, Network, Tezos } from '@tatumio/tatum';
const tatumSdk = await TatumSDK.init<Tezos>({network: Network.TEZOS,
configureWalletProviders: [TezosWalletProvider],
});
// Generate Private Key from Mnemonic
const privateKey = await tatumSdk.walletProvider
.use(TezosWalletProvider)
.generatePrivateKeyFromMnemonic(mnemonic, 0);
console.log(privateKey); // This will print the generated private key
await tatum.destroy();
// Import the necessary library and initialize the SDK
import { TezosWalletProvider } from '@tatumio/tezos-wallet-provider';
import { TatumSDK, Network } from '@tatumio/tatum';
const tatumSdk = await TatumSDK.init({network: Network.TEZOS,
configureWalletProviders: [TezosWalletProvider],
});
// Generate Private Key from Mnemonic
const privateKey = await tatumSdk.walletProvider
.use(TezosWalletProvider)
.generatePrivateKeyFromMnemonic(mnemonic, 0);
console.log(privateKey); // This will print the generated private key
await tatum.destroy();
Updated 9 months ago