How to use the @liskhq/lisk-validator.validatePublicKeys function in @liskhq/lisk-validator

To help you get started, we’ve selected a few @liskhq/lisk-validator 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 / commander / src / commands / transaction / create / multisignature.ts View on Github external
async run(): Promise {
		const {
			args,
			flags: {
				networkIdentifier: networkIdentifierSource,
				passphrase: passphraseSource,
				'second-passphrase': secondPassphraseSource,
				'no-signature': noSignature,
			},
		} = this.parse(MultisignatureCommand);

		const { lifetime, minimum, keysgroup: keysgroupStr }: Args = args;
		const keysgroup = keysgroupStr.split(',');

		validatePublicKeys(keysgroup);

		validateLifetime(lifetime);
		validateMinimum(minimum);

		const transactionLifetime = parseInt(lifetime, 10);
		const transactionMinimumConfirmations = parseInt(minimum, 10);
		const networkIdentifier = getNetworkIdentifierWithInput(
			networkIdentifierSource,
			this.userConfig.api.network,
		);
		const processFunction = processInputs(
			networkIdentifier,
			transactionLifetime,
			transactionMinimumConfirmations,
			keysgroup,
		);
github LiskHQ / lisk-sdk / commander / src / commands / transaction / create / vote.ts View on Github external
const getValidatedPublicKeys = (inputs: ReadonlyArray) => {
	validatePublicKeys(inputs);

	return inputs;
};