diff options
author | Fabio Berger <me@fabioberger.com> | 2018-01-30 20:21:01 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-01-30 20:21:01 +0800 |
commit | 93a5b3f457c1211676296840c285759007a55500 (patch) | |
tree | d1682b657c207f447748e08550095bafc79b6997 /packages/json-schemas/schemas | |
parent | 4242176d291f54212797de9f5df80b1346724ebb (diff) | |
download | dexon-sol-tools-93a5b3f457c1211676296840c285759007a55500.tar dexon-sol-tools-93a5b3f457c1211676296840c285759007a55500.tar.gz dexon-sol-tools-93a5b3f457c1211676296840c285759007a55500.tar.bz2 dexon-sol-tools-93a5b3f457c1211676296840c285759007a55500.tar.lz dexon-sol-tools-93a5b3f457c1211676296840c285759007a55500.tar.xz dexon-sol-tools-93a5b3f457c1211676296840c285759007a55500.tar.zst dexon-sol-tools-93a5b3f457c1211676296840c285759007a55500.zip |
Fix prettier
Diffstat (limited to 'packages/json-schemas/schemas')
20 files changed, 270 insertions, 270 deletions
diff --git a/packages/json-schemas/schemas/basic_type_schemas.ts b/packages/json-schemas/schemas/basic_type_schemas.ts index 9d81ff333..aa2eea867 100644 --- a/packages/json-schemas/schemas/basic_type_schemas.ts +++ b/packages/json-schemas/schemas/basic_type_schemas.ts @@ -1,11 +1,11 @@ export const addressSchema = { - id: '/Address', - type: 'string', - pattern: '^0x[0-9a-f]{40}$', + id: '/Address', + type: 'string', + pattern: '^0x[0-9a-f]{40}$', }; export const numberSchema = { - id: '/Number', - type: 'string', - pattern: '^\\d+(\\.\\d+)?$', + id: '/Number', + type: 'string', + pattern: '^\\d+(\\.\\d+)?$', }; diff --git a/packages/json-schemas/schemas/block_range_schema.ts b/packages/json-schemas/schemas/block_range_schema.ts index 1f6a63151..8697bba96 100644 --- a/packages/json-schemas/schemas/block_range_schema.ts +++ b/packages/json-schemas/schemas/block_range_schema.ts @@ -1,20 +1,20 @@ export const blockParamSchema = { - id: '/BlockParam', - oneOf: [ - { - type: 'number', - }, - { - enum: ['latest', 'earliest', 'pending'], - }, - ], + id: '/BlockParam', + oneOf: [ + { + type: 'number', + }, + { + enum: ['latest', 'earliest', 'pending'], + }, + ], }; export const blockRangeSchema = { - id: '/BlockRange', - properties: { - fromBlock: { $ref: '/BlockParam' }, - toBlock: { $ref: '/BlockParam' }, - }, - type: 'object', + id: '/BlockRange', + properties: { + fromBlock: { $ref: '/BlockParam' }, + toBlock: { $ref: '/BlockParam' }, + }, + type: 'object', }; diff --git a/packages/json-schemas/schemas/ec_signature_schema.ts b/packages/json-schemas/schemas/ec_signature_schema.ts index 71b840dd8..299ca283b 100644 --- a/packages/json-schemas/schemas/ec_signature_schema.ts +++ b/packages/json-schemas/schemas/ec_signature_schema.ts @@ -1,20 +1,20 @@ export const ecSignatureParameterSchema = { - id: '/ECSignatureParameter', - type: 'string', - pattern: '^0[xX][0-9A-Fa-f]{64}$', + 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', + id: '/ECSignature', + properties: { + v: { + type: 'number', + minimum: 27, + maximum: 28, + }, + r: { $ref: '/ECSignatureParameter' }, + s: { $ref: '/ECSignatureParameter' }, + }, + required: ['v', 'r', 's'], + type: 'object', }; diff --git a/packages/json-schemas/schemas/index_filter_values_schema.ts b/packages/json-schemas/schemas/index_filter_values_schema.ts index 3374d63e0..6e9f36c54 100644 --- a/packages/json-schemas/schemas/index_filter_values_schema.ts +++ b/packages/json-schemas/schemas/index_filter_values_schema.ts @@ -1,7 +1,7 @@ export const indexFilterValuesSchema = { - id: '/IndexFilterValues', - additionalProperties: { - oneOf: [{ $ref: '/Number' }, { $ref: '/Address' }, { $ref: '/OrderHashSchema' }], - }, - type: 'object', + id: '/IndexFilterValues', + additionalProperties: { + oneOf: [{ $ref: '/Number' }, { $ref: '/Address' }, { $ref: '/OrderHashSchema' }], + }, + type: 'object', }; diff --git a/packages/json-schemas/schemas/order_cancel_schema.ts b/packages/json-schemas/schemas/order_cancel_schema.ts index ad23d01cc..f2aa80e7a 100644 --- a/packages/json-schemas/schemas/order_cancel_schema.ts +++ b/packages/json-schemas/schemas/order_cancel_schema.ts @@ -1,12 +1,12 @@ export const orderCancellationRequestsSchema = { - id: '/OrderCancellationRequests', - type: 'array', - items: { - properties: { - order: { $ref: '/Order' }, - takerTokenCancelAmount: { $ref: '/Number' }, - }, - required: ['order', 'takerTokenCancelAmount'], - type: 'object', - }, + id: '/OrderCancellationRequests', + type: 'array', + items: { + properties: { + order: { $ref: '/Order' }, + takerTokenCancelAmount: { $ref: '/Number' }, + }, + required: ['order', 'takerTokenCancelAmount'], + type: 'object', + }, }; diff --git a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts b/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts index 61f2c8849..f13bc9cc3 100644 --- a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts +++ b/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts @@ -1,12 +1,12 @@ export const orderFillOrKillRequestsSchema = { - id: '/OrderFillOrKillRequests', - type: 'array', - items: { - properties: { - signedOrder: { $ref: '/SignedOrder' }, - fillTakerAmount: { $ref: '/Number' }, - }, - required: ['signedOrder', 'fillTakerAmount'], - type: 'object', - }, + id: '/OrderFillOrKillRequests', + type: 'array', + items: { + properties: { + signedOrder: { $ref: '/SignedOrder' }, + fillTakerAmount: { $ref: '/Number' }, + }, + required: ['signedOrder', 'fillTakerAmount'], + type: 'object', + }, }; diff --git a/packages/json-schemas/schemas/order_fill_requests_schema.ts b/packages/json-schemas/schemas/order_fill_requests_schema.ts index 419d0670f..45cd927be 100644 --- a/packages/json-schemas/schemas/order_fill_requests_schema.ts +++ b/packages/json-schemas/schemas/order_fill_requests_schema.ts @@ -1,12 +1,12 @@ export const orderFillRequestsSchema = { - id: '/OrderFillRequests', - type: 'array', - items: { - properties: { - signedOrder: { $ref: '/SignedOrder' }, - takerTokenFillAmount: { $ref: '/Number' }, - }, - required: ['signedOrder', 'takerTokenFillAmount'], - type: 'object', - }, + id: '/OrderFillRequests', + type: 'array', + items: { + properties: { + signedOrder: { $ref: '/SignedOrder' }, + takerTokenFillAmount: { $ref: '/Number' }, + }, + required: ['signedOrder', 'takerTokenFillAmount'], + type: 'object', + }, }; diff --git a/packages/json-schemas/schemas/order_hash_schema.ts b/packages/json-schemas/schemas/order_hash_schema.ts index 6af06927f..5eed112ca 100644 --- a/packages/json-schemas/schemas/order_hash_schema.ts +++ b/packages/json-schemas/schemas/order_hash_schema.ts @@ -1,5 +1,5 @@ export const orderHashSchema = { - id: '/OrderHashSchema', - type: 'string', - pattern: '^0x[0-9a-fA-F]{64}$', + id: '/OrderHashSchema', + type: 'string', + pattern: '^0x[0-9a-fA-F]{64}$', }; diff --git a/packages/json-schemas/schemas/order_schemas.ts b/packages/json-schemas/schemas/order_schemas.ts index 6f17224ad..ee5f2c137 100644 --- a/packages/json-schemas/schemas/order_schemas.ts +++ b/packages/json-schemas/schemas/order_schemas.ts @@ -1,43 +1,43 @@ export const orderSchema = { - id: '/Order', - properties: { - maker: { $ref: '/Address' }, - taker: { $ref: '/Address' }, - makerFee: { $ref: '/Number' }, - takerFee: { $ref: '/Number' }, - makerTokenAmount: { $ref: '/Number' }, - takerTokenAmount: { $ref: '/Number' }, - makerTokenAddress: { $ref: '/Address' }, - takerTokenAddress: { $ref: '/Address' }, - salt: { $ref: '/Number' }, - feeRecipient: { $ref: '/Address' }, - expirationUnixTimestampSec: { $ref: '/Number' }, - exchangeContractAddress: { $ref: '/Address' }, - }, - required: [ - 'maker', - 'taker', - 'makerFee', - 'takerFee', - 'makerTokenAmount', - 'takerTokenAmount', - 'salt', - 'feeRecipient', - 'expirationUnixTimestampSec', - 'exchangeContractAddress', - ], - type: 'object', + id: '/Order', + properties: { + maker: { $ref: '/Address' }, + taker: { $ref: '/Address' }, + makerFee: { $ref: '/Number' }, + takerFee: { $ref: '/Number' }, + makerTokenAmount: { $ref: '/Number' }, + takerTokenAmount: { $ref: '/Number' }, + makerTokenAddress: { $ref: '/Address' }, + takerTokenAddress: { $ref: '/Address' }, + salt: { $ref: '/Number' }, + feeRecipient: { $ref: '/Address' }, + expirationUnixTimestampSec: { $ref: '/Number' }, + exchangeContractAddress: { $ref: '/Address' }, + }, + required: [ + 'maker', + 'taker', + 'makerFee', + 'takerFee', + 'makerTokenAmount', + 'takerTokenAmount', + 'salt', + 'feeRecipient', + 'expirationUnixTimestampSec', + 'exchangeContractAddress', + ], + type: 'object', }; export const signedOrderSchema = { - id: '/SignedOrder', - allOf: [ - { $ref: '/Order' }, - { - properties: { - ecSignature: { $ref: '/ECSignature' }, - }, - required: ['ecSignature'], - }, - ], + id: '/SignedOrder', + allOf: [ + { $ref: '/Order' }, + { + properties: { + ecSignature: { $ref: '/ECSignature' }, + }, + required: ['ecSignature'], + }, + ], }; diff --git a/packages/json-schemas/schemas/relayer_api_error_response_schema.ts b/packages/json-schemas/schemas/relayer_api_error_response_schema.ts index 27fdb166f..3d3a96364 100644 --- a/packages/json-schemas/schemas/relayer_api_error_response_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_error_response_schema.ts @@ -1,21 +1,21 @@ export const relayerApiErrorResponseSchema = { - id: '/RelayerApiErrorResponse', - type: 'object', - properties: { - code: { type: 'number' }, - reason: { type: 'string' }, - validationErrors: { - type: 'array', - items: { - type: 'object', - properties: { - field: { type: 'string' }, - code: { type: 'number' }, - reason: { type: 'string' }, - }, - required: ['field', 'code', 'reason'], - }, - }, - }, - required: ['code', 'reason'], + id: '/RelayerApiErrorResponse', + type: 'object', + properties: { + code: { type: 'number' }, + reason: { type: 'string' }, + validationErrors: { + type: 'array', + items: { + type: 'object', + properties: { + field: { type: 'string' }, + code: { type: 'number' }, + reason: { type: 'string' }, + }, + required: ['field', 'code', 'reason'], + }, + }, + }, + required: ['code', 'reason'], }; diff --git a/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts b/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts index eaaf777a1..f79308594 100644 --- a/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts @@ -1,24 +1,24 @@ export const relayerApiFeesPayloadSchema = { - id: '/RelayerApiFeesPayload', - type: 'object', - properties: { - exchangeContractAddress: { $ref: '/Address' }, - maker: { $ref: '/Address' }, - taker: { $ref: '/Address' }, - makerTokenAddress: { $ref: '/Address' }, - takerTokenAddress: { $ref: '/Address' }, - makerTokenAmount: { $ref: '/Number' }, - takerTokenAmount: { $ref: '/Number' }, - expirationUnixTimestampSec: { $ref: '/Number' }, - salt: { $ref: '/Number' }, - }, - required: [ - 'exchangeContractAddress', - 'maker', - 'taker', - 'makerTokenAddress', - 'takerTokenAddress', - 'expirationUnixTimestampSec', - 'salt', - ], + id: '/RelayerApiFeesPayload', + type: 'object', + properties: { + exchangeContractAddress: { $ref: '/Address' }, + maker: { $ref: '/Address' }, + taker: { $ref: '/Address' }, + makerTokenAddress: { $ref: '/Address' }, + takerTokenAddress: { $ref: '/Address' }, + makerTokenAmount: { $ref: '/Number' }, + takerTokenAmount: { $ref: '/Number' }, + expirationUnixTimestampSec: { $ref: '/Number' }, + salt: { $ref: '/Number' }, + }, + required: [ + 'exchangeContractAddress', + 'maker', + 'taker', + 'makerTokenAddress', + 'takerTokenAddress', + 'expirationUnixTimestampSec', + 'salt', + ], }; diff --git a/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts b/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts index e7440613f..d87c2fcdb 100644 --- a/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts @@ -1,10 +1,10 @@ export const relayerApiFeesResponseSchema = { - id: '/RelayerApiFeesResponse', - type: 'object', - properties: { - makerFee: { $ref: '/Number' }, - takerFee: { $ref: '/Number' }, - feeRecipient: { $ref: '/Address' }, - }, - required: ['makerFee', 'takerFee', 'feeRecipient'], + id: '/RelayerApiFeesResponse', + type: 'object', + properties: { + makerFee: { $ref: '/Number' }, + takerFee: { $ref: '/Number' }, + feeRecipient: { $ref: '/Address' }, + }, + required: ['makerFee', 'takerFee', 'feeRecipient'], }; diff --git a/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts b/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts index d93fa73d6..1d443c625 100644 --- a/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts @@ -1,23 +1,23 @@ export const relayerApiOrderbookChannelSubscribeSchema = { - id: '/RelayerApiOrderbookChannelSubscribe', - type: 'object', - properties: { - type: { enum: ['subscribe'] }, - channel: { enum: ['orderbook'] }, - requestId: { type: 'number' }, - payload: { $ref: '/RelayerApiOrderbookChannelSubscribePayload' }, - }, - required: ['type', 'channel', 'requestId', 'payload'], + id: '/RelayerApiOrderbookChannelSubscribe', + type: 'object', + properties: { + type: { enum: ['subscribe'] }, + channel: { enum: ['orderbook'] }, + requestId: { type: 'number' }, + payload: { $ref: '/RelayerApiOrderbookChannelSubscribePayload' }, + }, + required: ['type', 'channel', 'requestId', 'payload'], }; export const relayerApiOrderbookChannelSubscribePayload = { - id: '/RelayerApiOrderbookChannelSubscribePayload', - type: 'object', - properties: { - baseTokenAddress: { $ref: '/Address' }, - quoteTokenAddress: { $ref: '/Address' }, - snapshot: { type: 'boolean' }, - limit: { type: 'number' }, - }, - required: ['baseTokenAddress', 'quoteTokenAddress'], + id: '/RelayerApiOrderbookChannelSubscribePayload', + type: 'object', + properties: { + baseTokenAddress: { $ref: '/Address' }, + quoteTokenAddress: { $ref: '/Address' }, + snapshot: { type: 'boolean' }, + limit: { type: 'number' }, + }, + required: ['baseTokenAddress', 'quoteTokenAddress'], }; diff --git a/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts b/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts index fe1510d5b..e954185a8 100644 --- a/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts @@ -1,21 +1,21 @@ export const relayerApiOrderbookChannelSnapshotSchema = { - id: '/RelayerApiOrderbookChannelSnapshot', - type: 'object', - properties: { - type: { enum: ['snapshot'] }, - channel: { enum: ['orderbook'] }, - requestId: { type: 'number' }, - payload: { $ref: '/RelayerApiOrderbookChannelSnapshotPayload' }, - }, - required: ['type', 'channel', 'requestId', 'payload'], + id: '/RelayerApiOrderbookChannelSnapshot', + type: 'object', + properties: { + type: { enum: ['snapshot'] }, + channel: { enum: ['orderbook'] }, + requestId: { type: 'number' }, + payload: { $ref: '/RelayerApiOrderbookChannelSnapshotPayload' }, + }, + required: ['type', 'channel', 'requestId', 'payload'], }; export const relayerApiOrderbookChannelSnapshotPayload = { - id: '/RelayerApiOrderbookChannelSnapshotPayload', - type: 'object', - properties: { - bids: { $ref: '/signedOrdersSchema' }, - asks: { $ref: '/signedOrdersSchema' }, - }, - required: ['bids', 'asks'], + id: '/RelayerApiOrderbookChannelSnapshotPayload', + type: 'object', + properties: { + bids: { $ref: '/signedOrdersSchema' }, + asks: { $ref: '/signedOrdersSchema' }, + }, + required: ['bids', 'asks'], }; diff --git a/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts b/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts index 9a6d83d4c..7c2ba6531 100644 --- a/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts @@ -1,11 +1,11 @@ export const relayerApiOrderbookChannelUpdateSchema = { - id: '/RelayerApiOrderbookChannelUpdate', - type: 'object', - properties: { - type: { enum: ['update'] }, - channel: { enum: ['orderbook'] }, - requestId: { type: 'number' }, - payload: { $ref: '/SignedOrder' }, - }, - required: ['type', 'channel', 'requestId', 'payload'], + id: '/RelayerApiOrderbookChannelUpdate', + type: 'object', + properties: { + type: { enum: ['update'] }, + channel: { enum: ['orderbook'] }, + requestId: { type: 'number' }, + payload: { $ref: '/SignedOrder' }, + }, + required: ['type', 'channel', 'requestId', 'payload'], }; diff --git a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts b/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts index 5c409c807..d9abfc77d 100644 --- a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts @@ -1,9 +1,9 @@ export const relayerApiOrderBookResponseSchema = { - id: '/RelayerApiOrderBookResponse', - type: 'object', - properties: { - bids: { $ref: '/signedOrdersSchema' }, - asks: { $ref: '/signedOrdersSchema' }, - }, - required: ['bids', 'asks'], + id: '/RelayerApiOrderBookResponse', + type: 'object', + properties: { + bids: { $ref: '/signedOrdersSchema' }, + asks: { $ref: '/signedOrdersSchema' }, + }, + required: ['bids', 'asks'], }; diff --git a/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts b/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts index 5009c7955..471bed7b4 100644 --- a/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts @@ -1,24 +1,24 @@ export const relayerApiTokenPairsResponseSchema = { - id: '/RelayerApiTokenPairsResponse', - type: 'array', - items: { - properties: { - tokenA: { $ref: '/RelayerApiTokenTradeInfo' }, - tokenB: { $ref: '/RelayerApiTokenTradeInfo' }, - }, - required: ['tokenA', 'tokenB'], - type: 'object', - }, + id: '/RelayerApiTokenPairsResponse', + type: 'array', + items: { + properties: { + tokenA: { $ref: '/RelayerApiTokenTradeInfo' }, + tokenB: { $ref: '/RelayerApiTokenTradeInfo' }, + }, + required: ['tokenA', 'tokenB'], + type: 'object', + }, }; export const relayerApiTokenTradeInfoSchema = { - id: '/RelayerApiTokenTradeInfo', - type: 'object', - properties: { - address: { $ref: '/Address' }, - minAmount: { $ref: '/Number' }, - maxAmount: { $ref: '/Number' }, - precision: { type: 'number' }, - }, - required: ['address'], + id: '/RelayerApiTokenTradeInfo', + type: 'object', + properties: { + address: { $ref: '/Address' }, + minAmount: { $ref: '/Number' }, + maxAmount: { $ref: '/Number' }, + precision: { type: 'number' }, + }, + required: ['address'], }; diff --git a/packages/json-schemas/schemas/signed_orders_schema.ts b/packages/json-schemas/schemas/signed_orders_schema.ts index 34d956836..7d66b7027 100644 --- a/packages/json-schemas/schemas/signed_orders_schema.ts +++ b/packages/json-schemas/schemas/signed_orders_schema.ts @@ -1,5 +1,5 @@ export const signedOrdersSchema = { - id: '/signedOrdersSchema', - type: 'array', - items: { $ref: '/SignedOrder' }, + id: '/signedOrdersSchema', + type: 'array', + items: { $ref: '/SignedOrder' }, }; diff --git a/packages/json-schemas/schemas/token_schema.ts b/packages/json-schemas/schemas/token_schema.ts index e64565c8b..d2bb10f09 100644 --- a/packages/json-schemas/schemas/token_schema.ts +++ b/packages/json-schemas/schemas/token_schema.ts @@ -1,11 +1,11 @@ export const tokenSchema = { - id: '/Token', - properties: { - name: { type: 'string' }, - symbol: { type: 'string' }, - decimals: { type: 'number' }, - address: { $ref: '/Address' }, - }, - required: ['name', 'symbol', 'decimals', 'address'], - type: 'object', + id: '/Token', + properties: { + name: { type: 'string' }, + symbol: { type: 'string' }, + decimals: { type: 'number' }, + address: { $ref: '/Address' }, + }, + required: ['name', 'symbol', 'decimals', 'address'], + type: 'object', }; diff --git a/packages/json-schemas/schemas/tx_data_schema.ts b/packages/json-schemas/schemas/tx_data_schema.ts index 4274c553f..00c1d3e08 100644 --- a/packages/json-schemas/schemas/tx_data_schema.ts +++ b/packages/json-schemas/schemas/tx_data_schema.ts @@ -1,33 +1,33 @@ export const jsNumber = { - id: '/JsNumber', - type: 'number', - minimum: 0, + id: '/JsNumber', + type: 'number', + minimum: 0, }; export const txDataSchema = { - id: '/TxData', - properties: { - from: { $ref: '/Address' }, - to: { $ref: '/Address' }, - value: { - oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], - }, - gas: { - oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], - }, - gasPrice: { - oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], - }, - data: { - type: 'string', - pattern: '^0x[0-9a-f]*$', - }, - nonce: { - type: 'number', - minimum: 0, - }, - }, - required: ['from'], - type: 'object', - additionalProperties: false, + id: '/TxData', + properties: { + from: { $ref: '/Address' }, + to: { $ref: '/Address' }, + value: { + oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], + }, + gas: { + oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], + }, + gasPrice: { + oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], + }, + data: { + type: 'string', + pattern: '^0x[0-9a-f]*$', + }, + nonce: { + type: 'number', + minimum: 0, + }, + }, + required: ['from'], + type: 'object', + additionalProperties: false, }; |