diff options
author | Jacob Evans <jacob@dekz.net> | 2018-10-01 18:37:13 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-10-05 09:59:24 +0800 |
commit | adcfaa2e80389f69e196b602955cee858a1eb40f (patch) | |
tree | d97a4c65982f5062ef70d357b6bad1181dec0292 /packages/json-schemas | |
parent | 119f8c94495a15ef43298a77abc87fb9d33b4bb3 (diff) | |
download | dexon-sol-tools-adcfaa2e80389f69e196b602955cee858a1eb40f.tar dexon-sol-tools-adcfaa2e80389f69e196b602955cee858a1eb40f.tar.gz dexon-sol-tools-adcfaa2e80389f69e196b602955cee858a1eb40f.tar.bz2 dexon-sol-tools-adcfaa2e80389f69e196b602955cee858a1eb40f.tar.lz dexon-sol-tools-adcfaa2e80389f69e196b602955cee858a1eb40f.tar.xz dexon-sol-tools-adcfaa2e80389f69e196b602955cee858a1eb40f.tar.zst dexon-sol-tools-adcfaa2e80389f69e196b602955cee858a1eb40f.zip |
Expose eth_signTypedData functionality for order signing
Diffstat (limited to 'packages/json-schemas')
-rw-r--r-- | packages/json-schemas/schemas/eip712_typed_data.ts | 28 | ||||
-rw-r--r-- | packages/json-schemas/src/schemas.ts | 2 |
2 files changed, 30 insertions, 0 deletions
diff --git a/packages/json-schemas/schemas/eip712_typed_data.ts b/packages/json-schemas/schemas/eip712_typed_data.ts new file mode 100644 index 000000000..4c4664878 --- /dev/null +++ b/packages/json-schemas/schemas/eip712_typed_data.ts @@ -0,0 +1,28 @@ +export const eip712TypedData = { + id: 'eip712TypedData', + type: 'object', + properties: { + types: { + type: 'object', + properties: { + EIP712Domain: { type: 'array' }, + }, + additionalProperties: { + type: 'array', + items: { + type: 'object', + properties: { + name: { type: 'string' }, + type: { type: 'string' }, + }, + required: ['name', 'type'], + }, + }, + required: ['EIP712Domain'], + }, + primaryType: { type: 'string' }, + domain: { type: 'object' }, + message: { type: 'object' }, + }, + required: ['types', 'primaryType', 'domain', 'message'], +}; diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts index 3bc37f96b..50dc8d091 100644 --- a/packages/json-schemas/src/schemas.ts +++ b/packages/json-schemas/src/schemas.ts @@ -2,6 +2,7 @@ import { addressSchema, hexSchema, numberSchema } from '../schemas/basic_type_sc import { blockParamSchema, blockRangeSchema } from '../schemas/block_range_schema'; import { callDataSchema } from '../schemas/call_data_schema'; import { ecSignatureParameterSchema, ecSignatureSchema } from '../schemas/ec_signature_schema'; +import { eip712TypedData } from '../schemas/eip712_typed_data'; import { indexFilterValuesSchema } from '../schemas/index_filter_values_schema'; import { orderCancellationRequestsSchema } from '../schemas/order_cancel_schema'; import { orderFillOrKillRequestsSchema } from '../schemas/order_fill_or_kill_requests_schema'; @@ -39,6 +40,7 @@ export const schemas = { hexSchema, ecSignatureParameterSchema, ecSignatureSchema, + eip712TypedData, indexFilterValuesSchema, orderCancellationRequestsSchema, orderFillOrKillRequestsSchema, |