aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.js.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-10 19:51:27 +0800
committerFabio Berger <me@fabioberger.com>2017-06-10 19:51:27 +0800
commit1dd9af99e9d910c28f700725fd99684d7ae75cf7 (patch)
tree0f28ace9b3eec7199bfec48378fd30bdaba19e2a /src/0x.js.ts
parent2040933149a144c5055a7eb2063d83cad2304d02 (diff)
downloaddexon-sol-tools-1dd9af99e9d910c28f700725fd99684d7ae75cf7.tar
dexon-sol-tools-1dd9af99e9d910c28f700725fd99684d7ae75cf7.tar.gz
dexon-sol-tools-1dd9af99e9d910c28f700725fd99684d7ae75cf7.tar.bz2
dexon-sol-tools-1dd9af99e9d910c28f700725fd99684d7ae75cf7.tar.lz
dexon-sol-tools-1dd9af99e9d910c28f700725fd99684d7ae75cf7.tar.xz
dexon-sol-tools-1dd9af99e9d910c28f700725fd99684d7ae75cf7.tar.zst
dexon-sol-tools-1dd9af99e9d910c28f700725fd99684d7ae75cf7.zip
Align all param comments so that they are more readable
Diffstat (limited to 'src/0x.js.ts')
-rw-r--r--src/0x.js.ts46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts
index c04fd3728..b1e4e25ff 100644
--- a/src/0x.js.ts
+++ b/src/0x.js.ts
@@ -37,10 +37,10 @@ export class ZeroEx {
/**
* Verifies that the elliptic curve signature `signature` was generated
* by signing `dataHex` with the private key corresponding to the `signerAddressHex` address.
- * @param dataHex The hex encoded data signed by the supplied signature.
- * @param signature A JS object containing the elliptic curve signature parameters.
+ * @param dataHex The hex encoded data signed by the supplied signature.
+ * @param signature A JS object containing the elliptic curve signature parameters.
* @param signerAddressHex The hex encoded address that signed the dataHex, producing the supplied signature.
- * @return Whether the signature is valid for the supplied signerAddressHex and dataHex.
+ * @return Whether the signature is valid for the supplied signerAddressHex and dataHex.
*/
public static isValidSignature(dataHex: string, signature: ECSignature, signerAddressHex: string): boolean {
assert.isHexString('dataHex', dataHex);
@@ -65,7 +65,7 @@ export class ZeroEx {
* Generates a pseudo-random 256-bit salt.
* The salt can be included in an 0x order, ensuring that the order generates a unique orderHash
* and will not collide with other outstanding orders that are identical in all other parameters.
- * @return A pseudo-random 256-bit number that can be used as a salt.
+ * @return A pseudo-random 256-bit number that can be used as a salt.
*/
public static generatePseudoRandomSalt(): BigNumber.BigNumber {
// BigNumber.random returns a pseudo-random number between 0 & 1 with a passed in number of decimal places.
@@ -79,8 +79,8 @@ export class ZeroEx {
* Checks if the supplied hex encoded order hash is valid.
* Note: Valid means it has the expected format, not that an order with the orderHash exists.
* Use this method when processing orderHashes submitted as user input.
- * @param orderHashHex Hex encoded orderHash.
- * @return Whether the supplied orderHashHex has the expected format.
+ * @param orderHashHex Hex encoded orderHash.
+ * @return Whether the supplied orderHashHex has the expected format.
*/
public static isValidOrderHash(orderHashHex: string): boolean {
// Since this method can be called to check if any arbitrary string conforms to an orderHash's
@@ -93,9 +93,9 @@ export class ZeroEx {
* A unit amount is defined as the amount of a token above the specified decimal places (integer part).
* E.g: If a currency has 18 decimal places, 1e18 or one quintillion of the currency is equivalent
* to 1 unit.
- * @param amount The amount in baseUnits that you would like converted to units.
- * @param decimals The number of decimal places the unit amount has.
- * @return The amount in units.
+ * @param amount The amount in baseUnits that you would like converted to units.
+ * @param decimals The number of decimal places the unit amount has.
+ * @return The amount in units.
*/
public static toUnitAmount(amount: BigNumber.BigNumber, decimals: number): BigNumber.BigNumber {
assert.isBigNumber('amount', amount);
@@ -109,9 +109,9 @@ export class ZeroEx {
* A baseUnit is defined as the smallest denomination of a token. An amount expressed in baseUnits
* is the amount expressed in the smallest denomination.
* E.g: 1 unit of a token with 18 decimal places is expressed in baseUnits as 1000000000000000000
- * @param amount The amount of units that you would like converted to baseUnits.
- * @param decimals The number of decimal places the unit amount has.
- * @return The amount in baseUnits.
+ * @param amount The amount of units that you would like converted to baseUnits.
+ * @param decimals The number of decimal places the unit amount has.
+ * @return The amount in baseUnits.
*/
public static toBaseUnitAmount(amount: BigNumber.BigNumber, decimals: number): BigNumber.BigNumber {
assert.isBigNumber('amount', amount);
@@ -123,9 +123,9 @@ export class ZeroEx {
}
/**
* Instantiates a new ZeroEx instance that provides the public interface to the 0x.js library.
- * @param web3 The Web3.js instance you would like the 0x.js library to use for interacting with
- * the Ethereum network.
- * @return An instance of the 0x.js ZeroEx class.
+ * @param web3 The Web3.js instance you would like the 0x.js library to use for interacting with
+ * the Ethereum network.
+ * @return An instance of the 0x.js ZeroEx class.
*/
constructor(web3: Web3) {
this.web3Wrapper = new Web3Wrapper(web3);
@@ -136,7 +136,7 @@ export class ZeroEx {
/**
* Sets a new provider for the web3 instance used by 0x.js. Updating the provider will stop all
* subscriptions so you will need to re-subscribe to all events relevant to your app after this call.
- * @param provider The Web3.Provider you would like the 0x.js library to use from now on.
+ * @param provider The Web3.Provider you would like the 0x.js library to use from now on.
*/
public async setProviderAsync(provider: Web3.Provider) {
this.web3Wrapper.setProvider(provider);
@@ -146,7 +146,7 @@ export class ZeroEx {
}
/**
* Get addresses available throught the supplied web3 instance available for sending transactions.
- * @return An array of Ethereum addresses available.
+ * @return An array of Ethereum addresses available.
*/
public async getAvailableAddressesAsync(): Promise<string[]> {
const availableAddresses = await this.web3Wrapper.getAvailableAddressesAsync();
@@ -154,8 +154,8 @@ export class ZeroEx {
}
/**
* Computes the orderHash for a supplied order.
- * @param order A JS object that conforms to the Order or SignedOrder interface definitions.
- * @return The resulting orderHash from hashing the supplied order.
+ * @param order A JS object that conforms to the Order or SignedOrder interface definitions.
+ * @return The resulting orderHash from hashing the supplied order.
*/
public async getOrderHashHexAsync(order: Order|SignedOrder): Promise<string> {
assert.doesConformToSchema('order', order, orderSchema);
@@ -167,10 +167,10 @@ export class ZeroEx {
/**
* 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 orderHashHex Hex encoded orderHash to sign.
- * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
- * must be available via the Web3.Provider supplied to 0x.js.
- * @return A JS object containing the Elliptic curve signature parameters generated by signing the orderHashHex.
+ * @param orderHashHex Hex encoded orderHash to sign.
+ * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
+ * must be available via the Web3.Provider supplied to 0x.js.
+ * @return A JS object containing the Elliptic curve signature parameters generated by signing the orderHashHex.
*/
public async signOrderHashAsync(orderHashHex: string, signerAddress: string): Promise<ECSignature> {
assert.isHexString('orderHashHex', orderHashHex);