clarified some of the documentation

This commit is contained in:
mathi
2021-11-13 11:37:56 +01:00
parent b53f6bcfc6
commit c216f6c075
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -223,7 +223,7 @@ class Address {
* @api Address.hash160ToCash() hash160ToCash() * @api Address.hash160ToCash() hash160ToCash()
* @apiName hash160ToCash * @apiName hash160ToCash
* @apiGroup Address * @apiGroup Address
* @apiDescription Convert hash160 to cash address. * @apiDescription Convert hash160 to cash address. Accepts either hexadecimal or buffer.
* *
* @apiExample Example usage: * @apiExample Example usage:
* bchjs.Address.hash160ToCash("573d93b475be4f1925f3b74ed951201b0147eac1") * bchjs.Address.hash160ToCash("573d93b475be4f1925f3b74ed951201b0147eac1")
@@ -794,13 +794,13 @@ class Address {
* @apiDescription Detect an addess from an OutputScript.. * @apiDescription Detect an addess from an OutputScript..
* *
* @apiExample Example usage: * @apiExample Example usage:
* const script = bchjs.Script.encode([ * const scriptBuffer = bchjs.Script.encode([
* Buffer.from("BOX", "ascii"), * Buffer.from("BOX", "ascii"),
* bchjs.Script.opcodes.OP_CAT, * bchjs.Script.opcodes.OP_CAT,
* Buffer.from("BITBOX", "ascii"), * Buffer.from("BITBOX", "ascii"),
* bchjs.Script.opcodes.OP_EQUAL * bchjs.Script.opcodes.OP_EQUAL
* ]); * ]);
* const p2sh_hash160 = bchjs.Crypto.hash160(script); * const p2sh_hash160 = bchjs.Crypto.hash160(scriptBuffer);
* const scriptPubKey = bchjs.Script.scriptHash.output.encode(p2sh_hash160); * const scriptPubKey = bchjs.Script.scriptHash.output.encode(p2sh_hash160);
* *
* // mainnet address from output script * // mainnet address from output script
+2 -2
View File
@@ -60,7 +60,7 @@ class Crypto {
* @api Crypto.hash256() hash256() * @api Crypto.hash256() hash256()
* @apiName hash256 * @apiName hash256
* @apiGroup Crypto * @apiGroup Crypto
* @apiDescription Utility for creating double sha256 hash digests of data. * @apiDescription Utility for creating double sha256 hash digests of buffer encoded data.
* *
* @apiExample Example usage: * @apiExample Example usage:
* // buffer from hex * // buffer from hex
@@ -86,7 +86,7 @@ class Crypto {
* @api Crypto.hash160() hash160() * @api Crypto.hash160() hash160()
* @apiName hash160 * @apiName hash160
* @apiGroup Crypto * @apiGroup Crypto
* @apiDescription Utility for creating ripemd160(sha256()) hash digests of data. * @apiDescription Utility for creating ripemd160(sha256()) hash digests of buffer encoded data.
* *
* @apiExample Example usage: * @apiExample Example usage:
* // buffer from hex * // buffer from hex