aboutsummaryrefslogblamecommitdiffstats
path: root/packages/json-schemas/schemas/ec_signature_schema.ts
blob: 71b840dd877444386007ca325a97a93cd7571dab (plain) (tree)



















                                             
export const ecSignatureParameterSchema = {
    id: '/ECSignatureParameter',
    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: '/ECSignatureParameter' },
        s: { $ref: '/ECSignatureParameter' },
    },
    required: ['v', 'r', 's'],
    type: 'object',
};