aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas/relayer_api_asset_pairs_response_schema.ts
blob: c13396d29de9f55c678d9e38570bf4a7ec807abe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export const relayerApiAssetDataPairsResponseSchema = {
    id: '/relayerApiAssetDataPairsResponseSchema',
    type: 'object',
    allOf: [
        { $ref: '/paginatedCollectionSchema' },
        {
            properties: {
                records: { $ref: '/relayerApiAssetDataPairsSchema' },
            },
            required: ['records'],
        },
    ],
};

export const relayerApiAssetDataPairsSchema = {
    id: '/relayerApiAssetDataPairsSchema',
    type: 'array',
    items: {
        properties: {
            assetDataA: { $ref: '/relayerApiAssetDataTradeInfoSchema' },
            assetDataB: { $ref: '/relayerApiAssetDataTradeInfoSchema' },
        },
        required: ['assetDataA', 'assetDataB'],
        type: 'object',
    },
};

export const relayerApiAssetDataTradeInfoSchema = {
    id: '/relayerApiAssetDataTradeInfoSchema',
    type: 'object',
    properties: {
        assetData: { $ref: '/hexSchema' },
        minAmount: { $ref: '/numberSchema' },
        maxAmount: { $ref: '/numberSchema' },
        precision: { type: 'number' },
    },
    required: ['assetData'],
};