| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Utility functions useful in Zilliqa-related programs.
See documentation at bn.js. This is simply a re-export of that library to prevent bloating other @zilliqa-js packages, most of which depend on bn.js in small ways.
See documentation at long.js. This is simply a re-export for similar reasons. Note that long is only required if you need to serialise integers with size greater than or equal to 2^53.
Commonly used variables such as DEVNET_URL. See source for more info.
Converts an integer to an array of hexadecimal strings (little endian). Size is the total length of bytes to pad to.
Parameters
Returns
Converts an integer to a Uint8Array (i.e., byte array).
Parameters
Returns
Converts a hex-encoded string to a Uint8Array. Endianess is not important.
Parameters
Returns
Converts a hex-encoded string to an array of integers.
Parameters
Returns
Performs bitwise addition of two 16-bit numbers, returning a 32-bit number. Throws if either number exceeds 16 bits.
Parameters
Returns
Performs a constant time comparison of two hexadecimal values. This avoids timing attacks.
Parameters
Returns
Determines if a given string is hex-encoded.
Parameters
Returns
Determines if a given string is a valid address.
Parameters
Returns
Determines if a given string is a valid Zilliqa bech32 address.
Parameters
Returns
Determines if a given string is a valid private key.
Parameters
Returns
Determines if a given string is a valid uncompressed public key.
Parameters
Returns
Determines if a given string is a valid Schnorr signature.
Parameters
Returns
Determines if a given value is a valid JS number.
Parameters
Returns
Determines if a given value is an instance of BN.js.
Parameters
Returns
Determines if a given value is a valid JS string.
Parameters
Returns
Determines if a given value is a plain JS object (i.e. directly below Object in the prototype chain).
Parameters
Returns
Determines if a value has the shape specified by test.
Parameters
Returns
Converts from qa (smallest unit) to zil or li.
Parameters
Converts zil or li to qa (smallest unit).
Parameters
| Back | FazBrowse Home | New Git URL |