How to use the @liskhq/lisk-passphrase.Mnemonic.generateMnemonic function in @liskhq/lisk-passphrase

To help you get started, we’ve selected a few @liskhq/lisk-passphrase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LiskHQ / lisk-sdk-examples / transport / client / scripts / create_and_initialize_packet_account.js View on Github external
const getPacketCredentials = () => {
    const passphrase = Mnemonic.generateMnemonic();
    const keys = cryptography.getPrivateAndPublicKeyFromPassphrase(
        passphrase
    );
    const credentials = {
        address: cryptography.getAddressFromPublicKey(keys.publicKey),
        passphrase: passphrase,
        publicKey: keys.publicKey,
        privateKey: keys.privateKey
    };
    return credentials;
};
github LiskHQ / lisk-sdk-examples / transport / client / app.js View on Github external
const getPacketCredentials = () => {
        const passphrase = Mnemonic.generateMnemonic();
        const keys = cryptography.getPrivateAndPublicKeyFromPassphrase(
            passphrase
        );
        const credentials = {
            address: cryptography.getAddressFromPublicKey(keys.publicKey),
            passphrase: passphrase,
            publicKey: keys.publicKey,
            privateKey: keys.privateKey
        };
        return credentials;
    };
github LiskHQ / lisk-sdk-examples / delivery / client / create_and_initialize_packet_account.js View on Github external
const getPacketCredentials = () => {
    const passphrase = Mnemonic.generateMnemonic();
    const keys = cryptography.getPrivateAndPublicKeyFromPassphrase(
        passphrase
    );
    const credentials = {
        address: cryptography.getAddressFromPublicKey(keys.publicKey),
        passphrase: passphrase,
        publicKey: keys.publicKey,
        privateKey: keys.privateKey
    };
    return credentials;
};
github LiskHQ / lisk-sdk / protocol-specs / utils / chain_state_builder.js View on Github external
static createAccount() {
		const passphrase = Mnemonic.generateMnemonic();
		const keys = getPrivateAndPublicKeyFromPassphrase(passphrase);
		const address = getAddressFromPrivateKey(keys.privateKey);

		return {
			passphrase,
			privateKey: keys.privateKey,
			publicKey: keys.publicKey,
			address,
			balance: '0',
		};
	}
}

@liskhq/lisk-passphrase

Mnemonic passphrase helpers for use with Lisk-related software

Apache-2.0
Latest version published 6 months ago

Package Health Score

78 / 100
Full package analysis