Title: GitHub · Where software is built
Open Graph Title: BitGo/BitGoJS
X Title: BitGo/BitGoJS
Description: BitGo JavaScript SDK. Contribute to BitGo/BitGoJS development by creating an account on GitHub.
Open Graph Description: BitGo JavaScript SDK. Contribute to BitGo/BitGoJS development by creating an account on GitHub.
X Description: BitGo JavaScript SDK. Contribute to BitGo/BitGoJS development by creating an account on GitHub.
Opengraph URL: https://github.com/BitGo/BitGoJS
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zcash signature broadcast failed error\":\"Invalid transaction. Error: 16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false\\/empty top stack element)","articleBody":"\n\n## Environment Details\n\n- **OS:** mac os\n- **Node Version:**v18.20.8\n- **Yarn Version:** \u003c!--- What version of yarn are you running --\u003e\n- **BitGoJS Version:** 11.10.0\n- **BitGo Environment:** zcash mainnet\n\n## Expected Behavior\n\n\u003c!--- Tell us what should happen --\u003e\n\n## Current Behavior\n\n\nconst { bitgo, networks, address } = require(\"@bitgo/utxo-lib\");\nconst { ZcashTransactionBuilder, ZcashTransaction } = bitgo;\nconst crypto = require('crypto');\nconst net = networks.zcash;\nconst builder = new ZcashTransactionBuilder(net);\n\nconst keyPair = bitgo.keyutil.privateKeyBufferToECPair(\n Buffer.from(\n \"your-privatekey\",\n \"hex\"\n ),net\n);\n\nconst pubKey = keyPair.publicKey;\nconst sha256 = crypto.createHash('sha256').update(pubKey).digest();\nconst pubKeyHash = crypto.createHash('ripemd160').update(sha256).digest();\nconst addr = address.toBase58Check(pubKeyHash,net.pubKeyHash ,net); // ZEC pubKeyHash\nconsole.log('ZEC address:', addr);\n\nbuilder.setVersion(5);\nbuilder.setVersionGroupId(0x26a7270a);\nbuilder.setConsensusBranchId(0xc8e71055)\n\nbuilder.setLockTime(3066865+100);\nbuilder.setExpiryHeight(3066865+100);\n// Build inputs\n\nbuilder.addInput(\n \"27937ab93b59572bd71f17f13b8efac4ce6a86c743625c5cc95ffdaad2229e71\",\n 1,\n ZcashTransaction.DEFAULT_SEQUENCE,\n address.toOutputScript(\"t1J4uFxK2QweR7et1R8guXjvcivHPdsBup3\", net),\n 9500000,\n);\n\n\n// Build outputs\nbuilder.addOutput(\n \"t1Vt2n4PfVhKPPoGxASBbL6cUdPfS4nc1zE\",\n 1000000\n);\nbuilder.addOutput(\n \"t1J4uFxK2QweR7et1R8guXjvcivHPdsBup3\",\n 8450000\n);\n\nconst hashType = ZcashTransaction.SIGHASH_ALL;\n\nbuilder.sign({\n vin: 0,\n keyPair:keyPair,\n prevOutScriptType: 'p2pkh',\n hashType: hashType,\n});\nconst signedTransaction = builder.build();\nconsole.log(signedTransaction.toHex());\n\n\ncurl -X POST https://api.blockchair.com/zcash/push/transaction \\ -d \"data=050000800a27a7265510e7c855cc2e0055cc2e0001719e22d2aafd5fc95c5c6243c7866acec4fa8e3bf1171fd72b57593bb97a9327010000006a473044022062689ecc09c8f1a03daca26746851dcfd09f0b599a7f5053e7503332bc04811302200c9f12c31cde546566fca92728c9646dca9c7bd206a8341bf9d9ac821f5cd2a00121030cc9463c102a09238c93a0214e0ab58111c3e8b1ade8dda203edfb632d36120cffffffff0240420f00000000001976a91483b62ff15ffd23e53fe8e551d11e9fad1ef1e7cf88acd0ef8000000000001976a9140222fa13d983610bcddcaf83e23f7ab7e092fc0288ac000000\"\n{\"data\":null,\"context\":{\"code\":400,\"source\":\"R\",\"error\":\"Invalid transaction. Error: 16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false\\/empty top stack element)\",\"market_price_usd\":52.28,\"cache\":{\"live\":true,\"duration\":120,\"since\":\"2025-09-16 12:32:09\",\"until\":\"2025-09-16 12:34:09\",\"time\":null},\"api\":{\"version\":\"2.0.95-ie\",\"last_major_update\":\"2022-11-07 02:00:00\",\"next_major_update\":\"2023-11-12 02:00:00\",\"documentation\":\"https:\\/\\/blockchair.com\\/api\\/docs\",\"notice\":\"Try out our new API v.3: https:\\/\\/3xpl.com\\/data\"},\"servers\":\"API4,ZEC3\",\"time\":0.0011110305786132812,\"render_time\":0.002084970474243164,\"full_time\":0.0031960010528564453,\"request_cost\":1}}curl: (3) URL rejected: Malformed input to a URL function\n\n\u003cimg width=\"1578\" height=\"908\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e4ec43f6-b6b7-4862-9cf2-9d2ae290e1a4\" /\u003e\n\ncurl --user mytest:testqweasd \\\n --data-binary '{\"jsonrpc\":\"1.0\",\"id\":\"curltext\",\"method\":\"decoderawtransaction\",\"params\":[\"050000800a27a7265510e7c855cc2e0055cc2e0001719e22d2aafd5fc95c5c6243c7866acec4fa8e3bf1171fd72b57593bb97a9327010000006a473044022062689ecc09c8f1a03daca26746851dcfd09f0b599a7f5053e7503332bc04811302200c9f12c31cde546566fca92728c9646dca9c7bd206a8341bf9d9ac821f5cd2a00121030cc9463c102a09238c93a0214e0ab58111c3e8b1ade8dda203edfb632d36120cffffffff0240420f00000000001976a91483b62ff15ffd23e53fe8e551d11e9fad1ef1e7cf88acd0ef8000000000001976a9140222fa13d983610bcddcaf83e23f7ab7e092fc0288ac000000\"]}' \\\n -H 'content-type:text/plain;' \\\n http://127.0.0.1:10210/\n{\"result\":{\"txid\":\"8b9def08634cd7f27859dcc24ebb7f62daae36a31d70f3dd060586847aff816f\",\"authdigest\":\"656ad2f99dccfd1b3ec4d580a89338e737837732d1199f57126eaf42d9eb0276\",\"size\":240,\"overwintered\":true,\"version\":5,\"versiongroupid\":\"26a7270a\",\"locktime\":3066965,\"expiryheight\":3066965,\"hex\":\"050000800a27a7265510e7c855cc2e0055cc2e0001719e22d2aafd5fc95c5c6243c7866acec4fa8e3bf1171fd72b57593bb97a9327010000006a473044022062689ecc09c8f1a03daca26746851dcfd09f0b599a7f5053e7503332bc04811302200c9f12c31cde546566fca92728c9646dca9c7bd206a8341bf9d9ac821f5cd2a00121030cc9463c102a09238c93a0214e0ab58111c3e8b1ade8dda203edfb632d36120cffffffff0240420f00000000001976a91483b62ff15ffd23e53fe8e551d11e9fad1ef1e7cf88acd0ef8000000000001976a9140222fa13d983610bcddcaf83e23f7ab7e092fc0288ac000000\",\"vin\":[{\"txid\":\"27937ab93b59572bd71f17f13b8efac4ce6a86c743625c5cc95ffdaad2229e71\",\"vout\":1,\"scriptSig\":{\"asm\":\"3044022062689ecc09c8f1a03daca26746851dcfd09f0b599a7f5053e7503332bc04811302200c9f12c31cde546566fca92728c9646dca9c7bd206a8341bf9d9ac821f5cd2a0[ALL] 030cc9463c102a09238c93a0214e0ab58111c3e8b1ade8dda203edfb632d36120c\",\"hex\":\"473044022062689ecc09c8f1a03daca26746851dcfd09f0b599a7f5053e7503332bc04811302200c9f12c31cde546566fca92728c9646dca9c7bd206a8341bf9d9ac821f5cd2a00121030cc9463c102a09238c93a0214e0ab58111c3e8b1ade8dda203edfb632d36120c\"},\"sequence\":4294967295}],\"vout\":[{\"value\":0.01000000,\"valueZat\":1000000,\"valueSat\":1000000,\"n\":0,\"scriptPubKey\":{\"asm\":\"OP_DUP OP_HASH160 83b62ff15ffd23e53fe8e551d11e9fad1ef1e7cf OP_EQUALVERIFY OP_CHECKSIG\",\"hex\":\"76a91483b62ff15ffd23e53fe8e551d11e9fad1ef1e7cf88ac\",\"reqSigs\":1,\"type\":\"pubkeyhash\",\"addresses\":[\"t1Vt2n4PfVhKPPoGxASBbL6cUdPfS4nc1zE\"]}},{\"value\":0.08450000,\"valueZat\":8450000,\"valueSat\":8450000,\"n\":1,\"scriptPubKey\":{\"asm\":\"OP_DUP OP_HASH160 0222fa13d983610bcddcaf83e23f7ab7e092fc02 OP_EQUALVERIFY OP_CHECKSIG\",\"hex\":\"76a9140222fa13d983610bcddcaf83e23f7ab7e092fc0288ac\",\"reqSigs\":1,\"type\":\"pubkeyhash\",\"addresses\":[\"t1J4uFxK2QweR7et1R8guXjvcivHPdsBup3\"]}}],\"vjoinsplit\":[],\"valueBalance\":0.00000000,\"valueBalanceZat\":0,\"vShieldedSpend\":[],\"vShieldedOutput\":[],\"orchard\":{\"actions\":[],\"valueBalance\":0.00000000,\"valueBalanceZat\":0}},\"error\":null,\"id\":\"curltext\"}\n","author":{"url":"https://github.com/zelonH","@type":"Person","name":"zelonH"},"datePublished":"2025-09-16T12:45:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/7002/BitGoJS/issues/7002"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:87a6db34-fffc-f469-91fb-82fe7bf78ae3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D40:223E3:10E8EF1:1579B29:69910C0B |
| html-safe-nonce | 09fb58fa87140eea9c51dade5ef3aea35575b0a753af4006a42c63d67f949a4c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDQwOjIyM0UzOjEwRThFRjE6MTU3OUIyOTo2OTkxMEMwQiIsInZpc2l0b3JfaWQiOiI0NzYyNjgwMTM5NTY0NzgwNTU1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b5e8379bc730bfd721cb960e82dbaf0bcf73905833f577e1bd7430c29b2b4cc0 |
| hovercard-subject-tag | repository:20121980 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/BitGo/BitGoJS/issues/7002 |
| twitter:image | https://opengraph.githubassets.com/9b1bd6d7a7dbc2498526f9f022eaf1e821af60f308544b7c4c987454204bef72/BitGo/BitGoJS |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b1bd6d7a7dbc2498526f9f022eaf1e821af60f308544b7c4c987454204bef72/BitGo/BitGoJS |
| og:image:alt | BitGo JavaScript SDK. Contribute to BitGo/BitGoJS development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-cache |
| go-import | github.com/BitGo/BitGoJS git https://github.com/BitGo/BitGoJS.git |
| octolytics-dimension-user_id | 6267684 |
| octolytics-dimension-user_login | BitGo |
| octolytics-dimension-repository_id | 20121980 |
| octolytics-dimension-repository_nwo | BitGo/BitGoJS |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20121980 |
| octolytics-dimension-repository_network_root_nwo | BitGo/BitGoJS |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width