diff options
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/types.ts | 38 | ||||
-rw-r--r-- | test/utils/rpc.ts | 3 | ||||
-rw-r--r-- | yarn.lock | 4 |
5 files changed, 27 insertions, 23 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c859a097..22bac9224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG -vTBD - _TBD_ +v0.12.1 - _September 2, 2017_ + * Added the support for web3@1.x.x provider (#142) * Added the optional `zeroExConfig` parameter to the constructor of `ZeroEx` (#139) * Added the ability to specify `gasPrice` when instantiating `ZeroEx` (#139) diff --git a/package.json b/package.json index 0c4b02aa3..90b6d9120 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "0.11.0", + "version": "0.12.1", "description": "A javascript library for interacting with the 0x protocol", "keywords": [ "0x.js", diff --git a/src/types.ts b/src/types.ts index 7c2f79538..2400a9a60 100644 --- a/src/types.ts +++ b/src/types.ts @@ -51,7 +51,7 @@ export interface ExchangeContract extends ContractInstance { call: () => Promise<string>; }; getUnavailableTakerTokenAmount: { - call: (orderHash: string) => BigNumber.BigNumber; + call: (orderHash: string) => Promise<BigNumber.BigNumber>; }; isRoundingError: { call: (fillTakerAmount: BigNumber.BigNumber, takerTokenAmount: BigNumber.BigNumber, @@ -60,66 +60,66 @@ export interface ExchangeContract extends ContractInstance { fillOrder: { (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; + v: number, r: string, s: string, txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number, r: string, s: string, txOpts?: TxOpts) => number; + v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>; }; batchFillOrders: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; + v: number[], r: string[], s: string[], txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>; }; fillOrdersUpTo: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; + v: number[], r: string[], s: string[], txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>; }; cancelOrder: { (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelTakerTokenAmount: BigNumber.BigNumber, - txOpts?: TxOpts): ContractResponse; + txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelTakerTokenAmount: BigNumber.BigNumber, - txOpts?: TxOpts) => number; + txOpts?: TxOpts) => Promise<number>; }; batchCancelOrders: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelTakerTokenAmounts: BigNumber.BigNumber[], - txOpts?: TxOpts): ContractResponse; + txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelTakerTokenAmounts: BigNumber.BigNumber[], - txOpts?: TxOpts) => number; + txOpts?: TxOpts) => Promise<number>; }; fillOrKillOrder: { (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, - v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; + v: number, r: string, s: string, txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, - v: number, r: string, s: string, txOpts?: TxOpts) => number; + v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>; }; batchFillOrKillOrders: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], - v: number[], r: string[], s: string[], txOpts: TxOpts): ContractResponse; + v: number[], r: string[], s: string[], txOpts: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], - v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>; }; filled: { - call: (orderHash: string) => BigNumber.BigNumber; + call: (orderHash: string) => Promise<BigNumber.BigNumber>; }; cancelled: { - call: (orderHash: string) => BigNumber.BigNumber; + call: (orderHash: string) => Promise<BigNumber.BigNumber>; }; getOrderHash: { - call: (orderAddresses: OrderAddresses, orderValues: OrderValues) => string; + call: (orderAddresses: OrderAddresses, orderValues: OrderValues) => Promise<string>; }; } @@ -135,7 +135,7 @@ export interface TokenContract extends ContractInstance { transfer: (toAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>; transferFrom: (fromAddress: string, toAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>; - approve: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => void; + approve: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<void>; } export interface TokenRegistryContract extends ContractInstance { diff --git a/test/utils/rpc.ts b/test/utils/rpc.ts index e331fa6d4..436e96423 100644 --- a/test/utils/rpc.ts +++ b/test/utils/rpc.ts @@ -40,6 +40,9 @@ export class RPC { method: 'POST', uri: `http://${this.host}:${this.port}`, body: payload, + headers: { + 'content-type': 'application/json' + }, }; const bodyString = await request(opts); const body = JSON.parse(bodyString); @@ -5754,9 +5754,9 @@ web3@^0.20.0: xhr2 "*" xmlhttprequest "*" -"web3_beta@https://github.com/ethereum/web3.js#1.0": +web3_beta@ethereum/web3.js#1.0: version "1.0.0-beta.18" - resolved "https://github.com/ethereum/web3.js#eff0a026b8259ccbf2eec9fe9a8785e494addb80" + resolved "https://codeload.github.com/ethereum/web3.js/tar.gz/eff0a026b8259ccbf2eec9fe9a8785e494addb80" dependencies: lerna "^2.0.0" |