mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-03 11:38:09 +03:00
Merge branch 'main' into OP-2812-show-order-route-path-and-benefits
# Conflicts: # package.json
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { z } from 'zod';
|
||||
import exchanges from '../../../../constants/exchanges';
|
||||
import MessageType from '../MessageType';
|
||||
import baseMessageSchema from './baseMessageSchema';
|
||||
|
||||
export const orderBookItemSchema = z.tuple([
|
||||
z.string(), // price
|
||||
z.string(), // size
|
||||
z.array(z.string()), // exchanges
|
||||
z.array(
|
||||
z.enum(exchanges),
|
||||
), // exchanges
|
||||
z.array(z.tuple([
|
||||
z.enum(['SELL', 'BUY']), // side
|
||||
z.string(), // pairname
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from 'zod';
|
||||
import exchanges from '../../../../constants/exchanges';
|
||||
import MessageType from '../MessageType';
|
||||
import baseMessageSchema from './baseMessageSchema';
|
||||
|
||||
@@ -13,7 +14,7 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
|
||||
mao: z.number(), // min amount out
|
||||
ps: z.string().array(), // path
|
||||
po: z.boolean(), // is swap through pool optimal
|
||||
e: z.string().array().optional(), // Exchanges
|
||||
e: z.enum(exchanges).array().optional(), // Exchanges
|
||||
p: z.number().optional(), // price
|
||||
mp: z.number().optional(), // market price
|
||||
oi: z.object({ // info about order equivalent to this swap
|
||||
|
||||
Reference in New Issue
Block a user