Keys module

The Keys module handles all logic related to the signatures.

It is responsible for verifying signatures of a transaction from multi-signature and non-multi-signature accounts. It also handles the registration of multi-signature accounts.

Name Property

Name

keys

ID

4

Assets

  • RegisterAsset

    • AssetID: 0

Reducers

none

Actions

none

Events

none

Account schema

The token module adds the new property mandatoryKeys,optionalKeys and numberOfSignatures under the key keys to every account in the network as follows:

{
    type: 'object',
    properties: {
        numberOfSignatures: { dataType: 'uint32', fieldNumber: 1 },
        mandatoryKeys: {
            type: 'array',
            items: { dataType: 'bytes' },
            fieldNumber: 2,
        },
        optionalKeys: {
            type: 'array',
            items: { dataType: 'bytes' },
            fieldNumber: 3,
        },
    },
    default: {
        mandatoryKeys: [],
        optionalKeys: [],
        numberOfSignatures: 0,
    },
}

Transactions

The following transaction assets are provided by the keys module.

RegisterAsset

Allows to send a registerMultisignatureGroup transaction, which creates a multi-signature account.

Schema
{
	$id: 'lisk/keys/register',
	type: 'object',
	required: ['numberOfSignatures', 'optionalKeys', 'mandatoryKeys'],
	properties: {
		numberOfSignatures: {
			dataType: 'uint32',
			fieldNumber: 1,
			minimum: 1,
			maximum: 64,
		},
		mandatoryKeys: {
			type: 'array',
			items: {
				dataType: 'bytes',
				minLength: 32,
				maxLength: 32,
			},
			fieldNumber: 2,
			minItems: 0,
			maxItems: 64,
		},
		optionalKeys: {
			type: 'array',
			items: {
				dataType: 'bytes',
				minLength: 32,
				maxLength: 32,
			},
			fieldNumber: 3,
			minItems: 0,
			maxItems: 64,
		},
	},
}