diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/0x.ts | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -150,6 +150,16 @@ export class ZeroEx { return baseUnitAmount; } /** + * Computes the orderHash for a supplied order. + * @param order An object that conforms to the Order or SignedOrder interface definitions. + * @return The resulting orderHash from hashing the supplied order. + */ + public static getOrderHashHex(order: Order|SignedOrder): string { + assert.doesConformToSchema('order', order, orderSchema); + const orderHashHex = utils.getOrderHashHex(order); + return orderHashHex; + } + /** * Instantiates a new ZeroEx instance that provides the public interface to the 0x.js library. * @param provider The Web3.js Provider instance you would like the 0x.js library to use for interacting with * the Ethereum network. @@ -185,16 +195,6 @@ export class ZeroEx { return availableAddresses; } /** - * Computes the orderHash for a supplied order. - * @param order An object that conforms to the Order or SignedOrder interface definitions. - * @return The resulting orderHash from hashing the supplied order. - */ - public getOrderHashHex(order: Order|SignedOrder): string { - assert.doesConformToSchema('order', order, orderSchema); - const orderHashHex = utils.getOrderHashHex(order); - return orderHashHex; - } - /** * Signs an orderHash and returns it's elliptic curve signature. * This method currently supports TestRPC, Geth and Parity above and below V1.6.6 * @param orderHash Hex encoded orderHash to sign. |