aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/basic_type_schemas.ts
blob: a59afaef8118022ddedafa5fe108919485f9f8de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export const addressSchema = {
    id: '/addressSchema',
    type: 'string',
    pattern: '^0x[0-9a-f]{40}$',
};

export const hexSchema = {
    id: '/hexSchema',
    type: 'string',
    pattern: '^0x(([0-9a-f][0-9a-f])+)?$',
};

export const numberSchema = {
    id: '/numberSchema',
    type: 'string',
    pattern: '^\\d+(\\.\\d+)?$',
};