aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/ec_signature_schema.ts
blob: c59532f092d34d83506be55781b5b1000926de00 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
export const ecSignatureParameterSchema = {
    id: '/ecSignatureParameterSchema',
    type: 'string',
    pattern: '^0[xX][0-9A-Fa-f]{64}$',
};

export const ecSignatureSchema = {
    id: '/ECSignature',
    properties: {
        v: {
            type: 'number',
            minimum: 27,
            maximum: 28,
        },
        r: { $ref: '/ecSignatureParameterSchema' },
        s: { $ref: '/ecSignatureParameterSchema' },
    },
    required: ['v', 'r', 's'],
    type: 'object',
};