{"_id":"zcash-block","_rev":"4578631","name":"zcash-block","description":"A Zcash block interface and decoder for JavaScript","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"rvagg","email":""}],"time":{"modified":"2026-04-10T15:51:31.000Z","created":"2019-08-19T05:53:49.451Z","2.0.0":"2019-10-25T09:38:08.869Z","1.0.0":"2019-08-19T05:53:49.451Z"},"users":{},"author":{"name":"Rod","email":"rod@vagg.org","url":"http://r.va.gg/"},"repository":{"type":"git","url":"git+https://github.com/rvagg/js-zcash-block.git"},"versions":{"2.0.0":{"name":"zcash-block","version":"2.0.0","description":"A Zcash block interface and decoder for JavaScript","main":"zcash-block.js","dependencies":{"multihashing":"~0.3.3"},"devDependencies":{"jsdoc4readme":"~1.3.0","standard":"~14.3.1"},"scripts":{"lint":"standard","test":"npm run lint && node test.js","docs":"jsdoc4readme --readme *.js classes/*.js"},"author":{"name":"Rod","email":"rod@vagg.org","url":"http://r.va.gg/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/rvagg/js-zcash-block.git"},"bugs":{"url":"https://github.com/rvagg/js-zcash-block/issues"},"homepage":"https://github.com/rvagg/js-zcash-block#readme","gitHead":"13a57e329006da51a7d82e783089f7710e80ed04","_id":"zcash-block@2.0.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"shasum":"f8023b2350d6629f4792dd255a3488579677ea27","size":14048,"noattachment":false,"key":"/zcash-block/-/zcash-block-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/zcash-block/download/zcash-block-2.0.0.tgz"},"maintainers":[{"name":"rvagg","email":""}],"_npmUser":{"name":"rvagg","email":"r@va.gg"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zcash-block_2.0.0_1571996288711_0.629129253769628"},"_hasShrinkwrap":false,"publish_time":1571996288869,"_cnpm_publish_time":1571996288869,"_cnpmcore_publish_time":"2021-12-16T20:51:32.163Z"},"1.0.0":{"name":"zcash-block","version":"1.0.0","description":"A Zcash block interface and decoder for JavaScript","main":"zcash-block.js","dependencies":{"multihashing-async":"~0.7.0"},"devDependencies":{"jsdoc4readme":"~1.2.1"},"scripts":{"test":"node test.js","docs":"jsdoc4readme --readme *.js classes/*.js"},"author":{"name":"Rod","email":"rod@vagg.org","url":"http://r.va.gg/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/rvagg/js-zcash-block.git"},"bugs":{"url":"https://github.com/rvagg/js-zcash-block/issues"},"homepage":"https://github.com/rvagg/js-zcash-block#readme","gitHead":"c1e3df0af2bc9cb2ab87bb25b1e82c6d664b8afb","_id":"zcash-block@1.0.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","_npmUser":{"name":"rvagg","email":"r@va.gg"},"dist":{"shasum":"d1035b76f3089a1ccf572b93a8403123e976d894","size":13504,"noattachment":false,"key":"/zcash-block/-/zcash-block-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/zcash-block/download/zcash-block-1.0.0.tgz"},"maintainers":[{"name":"rvagg","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zcash-block_1.0.0_1566194029309_0.603285248980481"},"_hasShrinkwrap":false,"publish_time":1566194029451,"_cnpm_publish_time":1566194029451,"_cnpmcore_publish_time":"2021-12-16T20:51:32.374Z"}},"readme":"# Zcash block interface for JavaScript\n\n[![NPM](https://nodei.co/npm/zcash-block.svg)](https://nodei.co/npm/zcash-block/)\n\nA collection of JavaScript classes representing the data contained within **[Zcash](https://z.cash/)** blocks along with a **decoder** for the binary Zcash block representation.\n\n[`ZcashBlock`](#ZcashBlock) is the primary export for this package, it can be used to construct an in-memory representation of a Zcash block along with the child classes (below), or use the [`ZcashBlock.decode()`](#ZcashBlock__decode____) method to decode from block's raw bytes.\n\nRaw block data, hex encoded, can be obtained via an online API (e.g. https://zcashnetwork.info/api/rawblock/00000001b69a0aedf2e35e4fd072f435835ec48d3acd95ec6a0bcc1cfa12135c) or via the CLI (e.g. `zcash-cli getblock 00000001b69a0aedf2e35e4fd072f435835ec48d3acd95ec6a0bcc1cfa12135c 0`).\n\nRunning `JSON.stringify()` on a decoded `ZcashBlock` instance should result in the same data provided by the Zcash CLI, (e.g. `zcash-cli getblock 00000001b69a0aedf2e35e4fd072f435835ec48d3acd95ec6a0bcc1cfa12135c`) minus some additional properties that are only available when the block is attached to the full blockchain (`anchor`, `height`, `chainwork`, `confirmations`, `valuePools`, `nextblockhash`).\n\n## API\n\n### Contents\n\n * [`ZcashBlock.decode()`](#ZcashBlock__decode____)\n * [`ZcashBlock.decodeBlockHeaderOnly()`](#ZcashBlock__decodeBlockHeaderOnly____)\n * [`class ZcashBlock`](#ZcashBlock)\n   * [Constructor: `ZcashBlock(version, previousblockhash, merkleroot, finalsaplingroot, time, bits, nonce, solution, hash, transactions)`](#ZcashBlock_new)\n * [`ZcashBlock#toSerializable()`](#ZcashBlock_toSerializable)\n * [`class ZcashCompressedG1`](#ZcashCompressedG1)\n   * [Constructor: `ZcashCompressedG1(yLsb, x)`](#ZcashCompressedG1_new)\n * [`class ZcashCompressedG2`](#ZcashCompressedG2)\n   * [Constructor: `ZcashCompressedG2(yLsb, x)`](#ZcashCompressedG2_new)\n * [`class ZcashFq`](#ZcashFq)\n   * [Constructor: `ZcashFq(data)`](#ZcashFq_new)\n * [`class ZcashFq2`](#ZcashFq2)\n   * [Constructor: `ZcashFq2(data)`](#ZcashFq2_new)\n * [`class ZcashJoinSplitDescription`](#ZcashJoinSplitDescription)\n   * [Constructor: `ZcashJoinSplitDescription(vpubOld, vpubNew, anchor, nullifiers, commitments, ephemeralKey, randomSeed, macs, sproutProof, ciphertexts)`](#ZcashJoinSplitDescription_new)\n * [`ZcashJoinSplitDescription#toJSON()`](#ZcashJoinSplitDescription_toJSON)\n * [`class ZcashOutPoint`](#ZcashOutPoint)\n   * [Constructor: `ZcashOutPoint()`](#ZcashOutPoint_new)\n * [`ZcashOutPoint#toJSON()`](#ZcashOutPoint_toJSON)\n * [`class ZcashOutputDescription`](#ZcashOutputDescription)\n   * [Constructor: `ZcashOutputDescription(cv, cm, ephemeralKey, encCiphertext, outCiphertext, zkproof)`](#ZcashOutputDescription_new)\n * [`ZcashOutputDescription#toJSON()`](#ZcashOutputDescription_toJSON)\n * [`class ZcashPHGRProof`](#ZcashPHGRProof)\n   * [Constructor: `ZcashPHGRProof(gA, gAprime, gB, gBprime, gC, gCprime, gK, gH, yLsb)`](#ZcashPHGRProof_new)\n * [`class ZcashSpendDescription`](#ZcashSpendDescription)\n   * [Constructor: `ZcashSpendDescription(cv, anchor, nullifier, rk, zkproof, spendAuthSig)`](#ZcashSpendDescription_new)\n * [`ZcashSpendDescription#toJSON()`](#ZcashSpendDescription_toJSON)\n * [`class ZcashTransaction`](#ZcashTransaction)\n   * [Constructor: `ZcashTransaction()`](#ZcashTransaction_new)\n * [`ZcashTransaction#toJSON()`](#ZcashTransaction_toJSON)\n * [`ZcashTransaction#toSerializable()`](#ZcashTransaction_toSerializable)\n * [`class ZcashTransactionIn`](#ZcashTransactionIn)\n   * [Constructor: `ZcashTransactionIn(prevout, scriptSig, sequence)`](#ZcashTransactionIn_new)\n * [`ZcashTransactionIn#toJSON()`](#ZcashTransactionIn_toJSON)\n * [`class ZcashTransactionOut`](#ZcashTransactionOut)\n   * [Constructor: `ZcashTransactionOut(value, scriptPubKey)`](#ZcashTransactionOut_new)\n * [`ZcashTransactionOut#toJSON()`](#ZcashTransactionOut_toJSON)\n\n<a name=\"ZcashBlock__decode____\"></a>\n### `ZcashBlock.decode()`\n\nDecode a [`ZcashBlock`](#ZcashBlock) from the raw bytes of the block.\n\nCan be used directly as `require('zcash-block').decode()`.\n\n**Parameters:**\n\n* **`buffer`** _(`Uint8Array|Buffer`)_: the raw bytes of the block to be decoded.\n\n<a name=\"ZcashBlock__decodeBlockHeaderOnly____\"></a>\n### `ZcashBlock.decodeBlockHeaderOnly()`\n\nDecode only the header section of a [`ZcashBlock`](#ZcashBlock) from the raw bytes of the block. This method will exclude the transactions.\n\nCan be used directly as `require('zcash-block').decodeBlockHeaderOnly()`.\n\n**Parameters:**\n\n* **`buffer`** _(`Uint8Array|Buffer`)_: the raw bytes of the block to be decoded.\n\n<a name=\"ZcashBlock\"></a>\n### `class ZcashBlock`\n\nA class representation of a Zcash Block, parent for all of the data included in the raw block data\nin addition to some information that can be calculated based on that data. Properties are intended to\nmatch the names that are provided by the Zcash API (hence the casing and some strange names).\n\nExported as the main object, available as `require('zcash-block')`.\n\n**Properties:**\n\n* **`version`** _(`number`)_: positive integer\n* **`previousblockhash`** _(`Uint8Array|Buffer`)_: 256-bit hash\n* **`merkleroot`** _(`Uint8Array|Buffer`)_: 256-bit hash\n* **`finalsaplingroot`** _(`Uint8Array|Buffer`)_: 256-bit hash\n* **`time`** _(`number`)_: seconds since epoch\n* **`bits`** _(`number`)_\n* **`nonce`** _(`Uint8Array|Buffer`)_: 256-bit hash\n* **`solution`** _(`Uint8Array|Buffer`)_\n* **`hash`** _(`Uint8Array|Buffer`)_: 256-bit hash, a double SHA2-256 hash of all bytes making up this block (calculated)\n* **`transactions`** _(`Array.<ZcashTransaction>`)_\n* **`difficulty`** _(`number`)_: the difficulty for this block (calculated)\n\n<a name=\"ZcashBlock_new\"></a>\n#### Constructor: `ZcashBlock(version, previousblockhash, merkleroot, finalsaplingroot, time, bits, nonce, solution, hash, transactions)`\n\nInstantiate a new `ZcashBlock`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashBlock_toSerializable\"></a>\n### `ZcashBlock#toSerializable()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\n<a name=\"ZcashCompressedG1\"></a>\n### `class ZcashCompressedG1`\n\nA class representation of a property of a Zcash transaction joinsplit proof.\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/CompressedG1')`.\n\n**Properties:**\n\n* **`yLsb`** _(`boolean`)_\n* **`x`** _(`Fq`)_\n\n<a name=\"ZcashCompressedG1_new\"></a>\n#### Constructor: `ZcashCompressedG1(yLsb, x)`\n\nInstantiate a new `ZcashCompressedG1`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashCompressedG2\"></a>\n### `class ZcashCompressedG2`\n\nA class representation of a property of a Zcash transaction joinsplit proof.\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/CompressedG2')`.\n\n**Properties:**\n\n* **`yLsb`** _(`boolean`)_\n* **`x`** _(`Fq2`)_\n\n<a name=\"ZcashCompressedG2_new\"></a>\n#### Constructor: `ZcashCompressedG2(yLsb, x)`\n\nInstantiate a new `ZcashCompressedG2`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashFq\"></a>\n### `class ZcashFq`\n\nA class representation of a property of a Zcash transaction joinsplit proof. Used by [`ZcashCompressedG1`](#ZcashCompressedG1).\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/Fq')`.\n\n**Properties:**\n\n* **`data`** _(`Uint8Array|Buffer`)_: a 256-bit block of data\n\n<a name=\"ZcashFq_new\"></a>\n#### Constructor: `ZcashFq(data)`\n\nInstantiate a new `ZcashFq`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashFq2\"></a>\n### `class ZcashFq2`\n\nA class representation of a property of a Zcash transaction joinsplit proof. Used by [`ZcashCompressedG2`](#ZcashCompressedG2).\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/Fq2')`.\n\n**Properties:**\n\n* **`data`** _(`Uint8Array|Buffer`)_: a 512-bit block of data\n\n<a name=\"ZcashFq2_new\"></a>\n#### Constructor: `ZcashFq2(data)`\n\nInstantiate a new `ZcashFq2`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashJoinSplitDescription\"></a>\n### `class ZcashJoinSplitDescription`\n\nA class representation of a Zcash Transaction's joinsplit, which may or may not be present for a given transaction.\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/JoinSplitDescription')`.\n\n**Properties:**\n\n* **`vpubOld`** _(`BigInt`)_: a representation of an amount / value\n* **`vpubNew`** _(`BigInt`)_: a representation of an amount / value\n* **`anchor`** _(`Uint8Array|Buffer`)_: a 256-bit hash anchoring the joinsplit's position in the commitment tree\n* **`nullifiers`** _(`Array.<Uint8Array>|Array.<Buffer>`)_: two 256-bit blocks derived from secrets in the note\n* **`commitments`** _(`Array.<Uint8Array>|Array.<Buffer>`)_: two 256-bit blocks representing the spend commitments\n* **`ephemeralKey`** _(`Uint8Array|Buffer`)_: a 256-bit hash\n* **`randomSeed`** _(`Uint8Array|Buffer`)_: - a 256-bit block\n* **`macs`** _(`Array.<Uint8Array>|Array.<Buffer>`)_: two 256-bit hashes required to verify this joinsplit\n* **`sproutProof`** _(`Uint8Array|Buffer|PHGRProof`)_: either a GrothProof encoded directly as 192 bytes of binary data or a decoded [`PHGRProof`](#PHGRProof), depending on the block version.\n* **`ciphertexts`** _(`Uint8Array|Buffer`)_: two ciphertexts of 601 bytes each which encode trapdoors, values and other information that the recipient needs, including a memo field.\n\n<a name=\"ZcashJoinSplitDescription_new\"></a>\n#### Constructor: `ZcashJoinSplitDescription(vpubOld, vpubNew, anchor, nullifiers, commitments, ephemeralKey, randomSeed, macs, sproutProof, ciphertexts)`\n\nInstantiate a new `ZcashJoinSplitDescription`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashJoinSplitDescription_toJSON\"></a>\n### `ZcashJoinSplitDescription#toJSON()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\n<a name=\"ZcashOutPoint\"></a>\n### `class ZcashOutPoint`\n\nA class representation of a Zcash OutPoint for a [`ZcashTransactionIn`](#ZcashTransactionIn).\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/OutPoint')`.\n\n**Properties:**\n\n* **`hash`** _(`Uint8Array|Buffer`)_\n* **`n`** _(`number`)_\n\n<a name=\"ZcashOutPoint_new\"></a>\n#### Constructor: `ZcashOutPoint()`\n\nInstantiate a new `ZcashOutPoint`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashOutPoint_toJSON\"></a>\n### `ZcashOutPoint#toJSON()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\n<a name=\"ZcashOutputDescription\"></a>\n### `class ZcashOutputDescription`\n\nA class representation of a Zcash output description.\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/OutputDescription')`.\n\n**Properties:**\n\n* **`cv`** _(`Uint8Array|Buffer`)_: a 256-bit block representing the value commitment\n* **`cm`** _(`Uint8Array|Buffer`)_: a 256-bit block representing the note commitment for the output note\n* **`ephemeralKey`** _(`Uint8Array|Buffer`)_: a 256-bit Jubjub public key\n* **`encCiphertext`** _(`Uint8Array|Buffer`)_: a 580 byte ciphertext component for the encrypted output note\n* **`outCiphertext`** _(`Uint8Array|Buffer`)_: a 80 byte ciphertext component for the encrypted output note\n* **`zkproof`** _(`Uint8Array|Buffer`)_: a GrothProof encoded directly as 192 bytes of binary data\n\n<a name=\"ZcashOutputDescription_new\"></a>\n#### Constructor: `ZcashOutputDescription(cv, cm, ephemeralKey, encCiphertext, outCiphertext, zkproof)`\n\nInstantiate a new `ZcashOutputDescription`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashOutputDescription_toJSON\"></a>\n### `ZcashOutputDescription#toJSON()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\n<a name=\"ZcashPHGRProof\"></a>\n### `class ZcashPHGRProof`\n\nA class representation of a Zcash transaction joinsplit proof.\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/PHGRProof')`.\n\n**Properties:**\n\n* **`gA`** _(`CompressedG1`)_\n* **`gAprime`** _(`CompressedG1`)_\n* **`gB`** _(`CompressedG2`)_\n* **`gBprime`** _(`CompressedG1`)_\n* **`gC`** _(`CompressedG1`)_\n* **`gCprime`** _(`CompressedG1`)_\n* **`gK`** _(`CompressedG1`)_\n* **`gH`** _(`CompressedG1`)_\n* **`yLsb`** _(`boolean`)_\n\n<a name=\"ZcashPHGRProof_new\"></a>\n#### Constructor: `ZcashPHGRProof(gA, gAprime, gB, gBprime, gC, gCprime, gK, gH, yLsb)`\n\nInstantiate a new `ZcashPHGRProof`.\n\n<a name=\"ZcashSpendDescription\"></a>\n### `class ZcashSpendDescription`\n\nA class representation of a Zcash spend description.\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/SpendDescription')`.\n\n**Properties:**\n\n* **`cv`** _(`Uint8Array|Buffer`)_: a 256-bit value commitment to the value of the input note\n* **`anchor`** _(`Uint8Array|Buffer`)_: a 256-bit Merkle root of the Sapling note commitment tree at some block height in the past\n* **`nullifier`** _(`Uint8Array|Buffer`)_: a 256-bit nullifier of the input note\n* **`rk`** _(`Uint8Array|Buffer`)_: a 256-bit randomized public key for spendAuthSig\n* **`zkproof`** _(`Uint8Array|Buffer`)_: a GrothProof encoded directly as 192 bytes of binary data\n* **`spendAuthSig`** _(`Uint8Array|Buffer`)_: a 512-bit signature authorizing this spend\n\n<a name=\"ZcashSpendDescription_new\"></a>\n#### Constructor: `ZcashSpendDescription(cv, anchor, nullifier, rk, zkproof, spendAuthSig)`\n\nInstantiate a new `ZcashSpendDescription`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashSpendDescription_toJSON\"></a>\n### `ZcashSpendDescription#toJSON()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\n<a name=\"ZcashTransaction\"></a>\n### `class ZcashTransaction`\n\nA class representation of a Zcash Transaction, multiple of which are contained within each [`ZcashBlock`](#ZcashBlock).\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/Transaction')`.\n\n**Properties:**\n\n* **`overwintered`** _(`boolean`)_\n* **`version`** _(`number`)_\n* **`versionGroupId`** _(`number`)_\n* **`vin`** _(`Array.<ZcashTransactionIn>`)_\n* **`vout`** _(`Array.<ZcashTransactionIn>`)_\n* **`lockTime`** _(`number`)_\n* **`expiryHeight`** _(`number|null`)_\n* **`valueBalance`** _(`BigInt|null`)_\n* **`shieldedSpend`** _(`Array.<ZcashSpendDescription>|null`)_\n* **`shieldedOutput`** _(`Array.<ZcashOutputDescription>|null`)_\n* **`joinSplitPubKey`** _(`Uint8Array|Buffer|null`)_\n* **`joinSplits`** _(`Array.<ZcashJoinSplitDescription>|null`)_\n* **`joinSplitSig`** _(`Uint8Array|Buffer|null`)_\n* **`bindingSig`** _(`Uint8Array|Buffer|null`)_\n* **`hash`** _(`Uint8Array|Buffer`)_\n\n<a name=\"ZcashTransaction_new\"></a>\n#### Constructor: `ZcashTransaction()`\n\nInstantiate a new `ZcashTransaction`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashTransaction_toJSON\"></a>\n### `ZcashTransaction#toJSON()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\n<a name=\"ZcashTransaction_toSerializable\"></a>\n### `ZcashTransaction#toSerializable()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\n<a name=\"ZcashTransactionIn\"></a>\n### `class ZcashTransactionIn`\n\nA class representation of a Zcash TransactionIn, multiple of which are contained within each [`ZcashTransaction`](#ZcashTransaction).\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/TransactionIn')`.\n\n**Properties:**\n\n* **`prevout`** _(`ZcashOutPoint`)_\n* **`scriptSig`** _(`Uint8Array|Buffer`)_: an arbitrary length byte array\n* **`sequence`** _(`number`)_\n\n<a name=\"ZcashTransactionIn_new\"></a>\n#### Constructor: `ZcashTransactionIn(prevout, scriptSig, sequence)`\n\nInstantiate a new `ZcashTransactionIn`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashTransactionIn_toJSON\"></a>\n### `ZcashTransactionIn#toJSON()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\nThe serailizable form converts this object to `{ coinbase: scriptSig, sequence: sequence }` to match the Zcash API output.\n\n<a name=\"ZcashTransactionOut\"></a>\n### `class ZcashTransactionOut`\n\nA class representation of a Zcash TransactionOut, multiple of which are contained within each [`ZcashTransaction`](#ZcashTransaction).\n\nThis class isn't explicitly exported, access it for direct use with `require('zcash-block/classes/TransactionOut')`.\n\n**Properties:**\n\n* **`value`** _(`BigInt`)_: an amount / value for this TransactionOut\n* **`scriptPubKey`** _(`Uint8Array|Buffer`)_: an arbitrary length byte array\n\n<a name=\"ZcashTransactionOut_new\"></a>\n#### Constructor: `ZcashTransactionOut(value, scriptPubKey)`\n\nInstantiate a new `ZcashTransactionOut`.\n\nSee the class properties for expanded information on these parameters.\n\n<a name=\"ZcashTransactionOut_toJSON\"></a>\n### `ZcashTransactionOut#toJSON()`\n\nConvert to a serializable form that has nice stringified hashes and other simplified forms. May be\nuseful for simplified inspection.\n\nThe serialized version includes the raw `value` as `valueZat` while `value` is a proper Zcash coin value.\n\n## License and Copyright\n\nCopyright 2019 Rod Vagg\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","_attachments":{},"homepage":"https://github.com/rvagg/js-zcash-block#readme","bugs":{"url":"https://github.com/rvagg/js-zcash-block/issues"},"license":"Apache-2.0"}