mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
clarified some of the documentation
This commit is contained in:
+3
-3
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user