aboutsummaryrefslogblamecommitdiffstats
path: root/packages/json-schemas/schemas/order_schemas.ts
blob: dcbfde6e014ad6a1731e489dd60f1085afe0efcb (plain) (tree)
1
2
3
4
5
6
7
8


                            

                                           

                                      
                                            



                                              
                                  
                                              

                                                   

               

                       

                   
                        



                           
               
                          

                                









                                  
                                            
              
                                    


          
export const orderSchema = {
    id: '/Order',
    properties: {
        makerAddress: { $ref: '/Address' },
        takerAddress: { $ref: '/Address' },
        makerFee: { $ref: '/Number' },
        takerFee: { $ref: '/Number' },
        senderAddress: { $ref: '/Address' },
        makerAssetAmount: { $ref: '/Number' },
        takerAssetAmount: { $ref: '/Number' },
        makerAssetData: { $ref: '/Hex' },
        takerAssetData: { $ref: '/Hex' },
        salt: { $ref: '/Number' },
        exchangeAddress: { $ref: '/Address' },
        feeRecipientAddress: { $ref: '/Address' },
        expirationTimeSeconds: { $ref: '/Number' },
    },
    required: [
        'makerAddress',
        'takerAddress',
        'makerFee',
        'takerFee',
        'senderAddress',
        'makerAssetAmount',
        'takerAssetAmount',
        'makerAssetData',
        'takerAssetData',
        'salt',
        'exchangeAddress',
        'feeRecipientAddress',
        'expirationTimeSeconds',
    ],
    type: 'object',
};

export const signedOrderSchema = {
    id: '/SignedOrder',
    allOf: [
        { $ref: '/Order' },
        {
            properties: {
                signature: { $ref: '/Hex' },
            },
            required: ['signature'],
        },
    ],
};