aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-10-10 08:04:54 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-10-10 08:04:54 +0800
commit8155d311af04339c105f1a29b74f1ddbced85197 (patch)
tree9b345f05561e806b6d89cec26b371aadafb109ed /packages/json-schemas/schemas
parentcd8e6d9cdf7d6aa1e811bb7d9d7017da342907ed (diff)
parentbd06ebde8d1a5caf138ad3b36f9a5c5f255f2312 (diff)
downloaddexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar
dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.gz
dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.bz2
dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.lz
dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.xz
dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.zst
dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.zip
Merge branch 'development' into feature/asset-buyer/api-tweaks
* development: Define bundlewatch.ci.repoBranchBase Stop accesing ethers private methods Fix merge conflicts Fix ethers build issue Upgrade ethers.js version Fix branch name Add max sizes Use bundlewatch instead of bundlesize Move Metamask Error to OrderErrors Update the exported types for the packages which touch RPC providers Throw and handle errors from Providers. Clarifies use of schemas outside of Javascript/TypeScript. Detect MM on signature validation failure. Return SignedOrder from signing utils. Update 0x.js Changelog Add eth_signTypedData support to our wallet subproviders Move SignTypedData to utils package Introduce Metamask Subprovider. 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',
+};