aboutsummaryrefslogblamecommitdiffstats
path: root/src/schemas/ec_signature_schema.ts
blob: e39a8bd70f80b3e5eed5bf6d51a080309d965585 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                     



                                      
                                  

                       




                           

                                           



                              
export const ecSignatureParameter = {
    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',
};