{"id":21561745,"url":"https://github.com/synonymdev/raw-transaction-decoder","last_synced_at":"2025-04-10T12:06:33.330Z","repository":{"id":226419377,"uuid":"768260693","full_name":"synonymdev/raw-transaction-decoder","owner":"synonymdev","description":"A utility for decoding raw Bitcoin transactions","archived":false,"fork":false,"pushed_at":"2024-05-28T15:25:24.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T04:41:23.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synonymdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-06T18:59:41.000Z","updated_at":"2024-05-28T15:25:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5e5e1b0-31a2-47ff-a901-6dde167410f0","html_url":"https://github.com/synonymdev/raw-transaction-decoder","commit_stats":null,"previous_names":["synonymdev/raw-transaction-decoder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fraw-transaction-decoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fraw-transaction-decoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fraw-transaction-decoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fraw-transaction-decoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synonymdev","download_url":"https://codeload.github.com/synonymdev/raw-transaction-decoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217036,"owners_count":21066633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T09:27:52.061Z","updated_at":"2025-04-10T12:06:33.325Z","avatar_url":"https://github.com/synonymdev.png","language":"TypeScript","readme":"# raw-transaction-decoder\n\nThis project is a utility for decoding raw Bitcoin transactions. It is written in TypeScript and uses the bitcoinjs-lib library.\n\nThe `decodeRawTx` method used here is modified from [this source](https://github.com/bitcoinjs/bitcoinjs-lib/issues/1606#issuecomment-664740672)\n\n## Installation\n\n```bash\n# Using Yarn\nyarn add @synonymdev/raw-transaction-decoder\n\n# Or, using NPM\nnpm i -S @synonymdev/raw-transaction-decoder\n```\n\n## Usage\n\nHere's a basic example of how to use the `decodeRawTx` function:\n\n```typescript\nimport decodeRawTx from '@synonymdev/raw-transaction-decoder';\n\n// replace with your raw transaction\nconst rawTx = '02000000000101f52c85da1f8a30d49553f9cf0294a101c50c4a293bcc6bb48056ff2dc69545090000000000ffffffff02e4190f000000000016001425095b84d1f12033921a231de7fe515186fd04a81027000000000000160014a975f412cb9ddc9dc7f9fad0f7467bd801de4ffc0247304402201b239445ff572a79a4e6e0823bb42a57762582a6b42ce182200d99ba9a9e077502202c48938d1f735ab1c2c7e2a96d7bcfcd97a9c7b51f03aae8f15942b4c8cb1b87012103972490b241e5c788a3b544f08cf05ad925c2d79371747d2fbd06d7df477cb1e800000000';\n\n// replace with your network (bitcoin, testnet or regtest)\nconst network = 'regtest';\n\nconst result = decodeRawTx(rawTx, network);\n\nif (result.isErr()) {\n  console.error(result.error.message);\n  return;\n}\nconsole.log(result.value);\n```\n\nFor an example response, please see [DECODED_TRANSACTION](./tests/constants.ts).\n\n## Running Tests \u0026 Examples\n\n### Clone the Repository\n\n```bash\ngit clone git@github.com:synonymdev/raw-transaction-decoder.git \u0026\u0026 cd raw-transaction-decoder\n```\n\n### Install Dependencies \u0026 Build\n\n```bash\nnpm i \u0026\u0026 npm run build\n```\n\n### Run tests:\n\n```bash\nnpm run test\n```\n\n### Run example project:\n```bash\nnpm run example\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fraw-transaction-decoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynonymdev%2Fraw-transaction-decoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fraw-transaction-decoder/lists"}