aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-07-12 08:45:46 +0800
committerGitHub <noreply@github.com>2017-07-12 08:45:46 +0800
commit89236fff410563c0d290e0a8090864cf21bae62e (patch)
tree04781f5e1e7887f3375e7d4d17b490110760a67e /src
parent98e8a6dd706f0a630402d9009ad3dcf9b0ff872d (diff)
parent6c62c92f0c26ec1da688097cfb3d63161281d87d (diff)
downloaddexon-sol-tools-89236fff410563c0d290e0a8090864cf21bae62e.tar
dexon-sol-tools-89236fff410563c0d290e0a8090864cf21bae62e.tar.gz
dexon-sol-tools-89236fff410563c0d290e0a8090864cf21bae62e.tar.bz2
dexon-sol-tools-89236fff410563c0d290e0a8090864cf21bae62e.tar.lz
dexon-sol-tools-89236fff410563c0d290e0a8090864cf21bae62e.tar.xz
dexon-sol-tools-89236fff410563c0d290e0a8090864cf21bae62e.tar.zst
dexon-sol-tools-89236fff410563c0d290e0a8090864cf21bae62e.zip
Merge pull request #107 from 0xProject/static-get-order-hash-hex
Static get order hash hex
Diffstat (limited to 'src')
-rw-r--r--src/0x.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/0x.ts b/src/0x.ts
index aeed7b042..3d1e8745f 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -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.