aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2018-10-09 18:17:11 +0800
committerGitHub <noreply@github.com>2018-10-09 18:17:11 +0800
commit024bcf492ddbdceb033466aeadef220adc145332 (patch)
tree01a364d769f3eede04f4bd1e4a743784d39eea91 /packages/json-schemas/schemas
parent3ac9dac4f0a6b3875b7ae0ea6dd1855743768ef2 (diff)
parent75b9e639194e98febf8e378619afef2d578cbc7e (diff)
downloaddexon-0x-contracts-024bcf492ddbdceb033466aeadef220adc145332.tar
dexon-0x-contracts-024bcf492ddbdceb033466aeadef220adc145332.tar.gz
dexon-0x-contracts-024bcf492ddbdceb033466aeadef220adc145332.tar.bz2
dexon-0x-contracts-024bcf492ddbdceb033466aeadef220adc145332.tar.lz
dexon-0x-contracts-024bcf492ddbdceb033466aeadef220adc145332.tar.xz
dexon-0x-contracts-024bcf492ddbdceb033466aeadef220adc145332.tar.zst
dexon-0x-contracts-024bcf492ddbdceb033466aeadef220adc145332.zip
Merge pull request #1102 from 0xProject/feature/0x.js/eip712-sign-typed-data
[0x.js][order-utils][web3-wrapper] Expose eth_signTypedData functionality for order signing
Diffstat (limited to 'packages/json-schemas/schemas')
-rw-r--r--packages/json-schemas/schemas/eip712_typed_data.ts28
-rw-r--r--packages/json-schemas/schemas/zero_ex_transaction_schema.ts10
2 files changed, 38 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..31ad74610
--- /dev/null
+++ b/packages/json-schemas/schemas/eip712_typed_data.ts
@@ -0,0 +1,28 @@
+export const eip712TypedDataSchema = {
+ 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/schemas/zero_ex_transaction_schema.ts b/packages/json-schemas/schemas/zero_ex_transaction_schema.ts
new file mode 100644
index 000000000..7f729b724
--- /dev/null
+++ b/packages/json-schemas/schemas/zero_ex_transaction_schema.ts
@@ -0,0 +1,10 @@
+export const zeroExTransactionSchema = {
+ id: '/zeroExTransactionSchema',
+ properties: {
+ data: { $ref: '/hexSchema' },
+ signerAddress: { $ref: '/addressSchema' },
+ salt: { $ref: '/numberSchema' },
+ },
+ required: ['data', 'salt', 'signerAddress'],
+ type: 'object',
+};