aboutsummaryrefslogtreecommitdiffstats
path: root/packages/types
diff options
context:
space:
mode:
authorAugust Skare <post@augustskare.no>2018-11-13 16:52:41 +0800
committerAugust Skare <post@augustskare.no>2018-11-13 16:52:41 +0800
commite43988aa44225ef66c95d0b26764de57b3d26c3a (patch)
tree5f2bdff05e3e6a336b600bcb7a766da4793afc76 /packages/types
parentee91f56bbe69534885da47f58a81302bf3c37f28 (diff)
parentc41622c20aea8ba89dc9899ff8b3ab6f22f53503 (diff)
downloaddexon-sol-tools-e43988aa44225ef66c95d0b26764de57b3d26c3a.tar
dexon-sol-tools-e43988aa44225ef66c95d0b26764de57b3d26c3a.tar.gz
dexon-sol-tools-e43988aa44225ef66c95d0b26764de57b3d26c3a.tar.bz2
dexon-sol-tools-e43988aa44225ef66c95d0b26764de57b3d26c3a.tar.lz
dexon-sol-tools-e43988aa44225ef66c95d0b26764de57b3d26c3a.tar.xz
dexon-sol-tools-e43988aa44225ef66c95d0b26764de57b3d26c3a.tar.zst
dexon-sol-tools-e43988aa44225ef66c95d0b26764de57b3d26c3a.zip
Merge branch 'development' into dev-tools-pages
Diffstat (limited to 'packages/types')
-rw-r--r--packages/types/CHANGELOG.json16
-rw-r--r--packages/types/CHANGELOG.md12
-rw-r--r--packages/types/README.md12
-rw-r--r--packages/types/package.json11
-rw-r--r--packages/types/src/index.ts6
-rw-r--r--packages/types/tslint.json2
6 files changed, 44 insertions, 15 deletions
diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json
index 53e1f3716..6d9f83c57 100644
--- a/packages/types/CHANGELOG.json
+++ b/packages/types/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "1.2.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ],
+ "timestamp": 1541740904
+ },
+ {
"version": "1.2.0",
"changes": [
{
@@ -9,8 +18,13 @@
{
"note": "Added `ZeroExTransaction` type for Exchange executeTransaction",
"pr": 1102
+ },
+ {
+ "note": "Add `AssetData` union type (`type AssetData = ERC20AssetData | ERC721AssetData`)",
+ "pr": 1131
}
- ]
+ ],
+ "timestamp": 1539871071
},
{
"timestamp": 1538693146,
diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md
index aeb056903..556bf1799 100644
--- a/packages/types/CHANGELOG.md
+++ b/packages/types/CHANGELOG.md
@@ -5,6 +5,16 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.2.1 - _November 9, 2018_
+
+ * Dependencies updated
+
+## v1.2.0 - _October 18, 2018_
+
+ * Added `EIP712Parameter` `EIP712Types` `EIP712TypedData` for EIP712 signing (#1102)
+ * Added `ZeroExTransaction` type for Exchange executeTransaction (#1102)
+ * Add `AssetData` union type (`type AssetData = ERC20AssetData | ERC721AssetData`) (#1131)
+
## v1.1.4 - _October 4, 2018_
* Dependencies updated
@@ -44,7 +54,7 @@ CHANGELOG
* Add revert reasons for ERC721Token (#933)
-## v1.0.1-rc.4 - _August 13, 2018_
+## v1.0.1-rc.4 - _August 14, 2018_
* Added SignerType to handle different signing prefix scenarios (#914)
diff --git a/packages/types/README.md b/packages/types/README.md
index c091b8302..136eb1940 100644
--- a/packages/types/README.md
+++ b/packages/types/README.md
@@ -1,25 +1,25 @@
-## @0xproject/types
+## @0x/types
Typescript types shared across 0x projects and packages
## Installation
```bash
-yarn add -D @0xproject/types
+yarn add -D @0x/types
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
- "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
+ "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}
```
## Usage
```javascript
-import { TransactionReceipt, TxData, TxDataPayable } from '@0xproject/types';
+import { TransactionReceipt, TxData, TxDataPayable } from '@0x/types';
```
## Contributing
@@ -47,13 +47,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-PKG=@0xproject/types yarn build
+PKG=@0x/types yarn build
```
Or continuously rebuild on change:
```bash
-PKG=@0xproject/types yarn watch
+PKG=@0x/types yarn watch
```
### Clean
diff --git a/packages/types/package.json b/packages/types/package.json
index 9710ff8eb..c32e9a6f7 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -1,6 +1,6 @@
{
- "name": "@0xproject/types",
- "version": "1.1.4",
+ "name": "@0x/types",
+ "version": "1.2.1",
"engines": {
"node": ">=6.12"
},
@@ -11,7 +11,7 @@
"build": "tsc -b",
"build:ci": "yarn build",
"clean": "shx rm -rf lib",
- "lint": "tslint --project ."
+ "lint": "tslint --format stylish --project ."
},
"license": "Apache-2.0",
"repository": {
@@ -23,8 +23,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/types/README.md",
"devDependencies": {
- "@0xproject/tslint-config": "^1.0.8",
- "copyfiles": "^2.0.0",
+ "@0x/tslint-config": "^1.0.10",
"make-promises-safe": "^1.1.0",
"shx": "^0.2.2",
"tslint": "5.11.0",
@@ -33,7 +32,7 @@
"dependencies": {
"@types/node": "*",
"bignumber.js": "~4.1.0",
- "ethereum-types": "^1.0.11"
+ "ethereum-types": "^1.1.2"
},
"publishConfig": {
"access": "public"
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index 6bc966ba1..3c9b6bbc5 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -168,6 +168,8 @@ export interface ERC721AssetData {
tokenId: BigNumber;
}
+export type AssetData = ERC20AssetData | ERC721AssetData;
+
// TODO: DRY. These should be extracted from contract code.
export enum RevertReason {
OrderUnfillable = 'ORDER_UNFILLABLE',
@@ -620,3 +622,7 @@ export interface EIP712TypedData {
message: EIP712Object;
primaryType: string;
}
+
+export interface Stats {
+ orderCount: number;
+}
diff --git a/packages/types/tslint.json b/packages/types/tslint.json
index ffaefe83a..dd9053357 100644
--- a/packages/types/tslint.json
+++ b/packages/types/tslint.json
@@ -1,3 +1,3 @@
{
- "extends": ["@0xproject/tslint-config"]
+ "extends": ["@0x/tslint-config"]
}