{"id":28493810,"url":"https://github.com/bitcoinjs/utxo","last_synced_at":"2025-07-04T17:32:12.277Z","repository":{"id":57389333,"uuid":"45763403","full_name":"bitcoinjs/utxo","owner":"bitcoinjs","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-11T05:29:43.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-23T17:10:30.130Z","etag":null,"topics":["bitcoin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bitcoinjs.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}},"created_at":"2015-11-08T02:14:10.000Z","updated_at":"2024-01-02T22:20:35.000Z","dependencies_parsed_at":"2022-08-26T08:11:22.237Z","dependency_job_id":null,"html_url":"https://github.com/bitcoinjs/utxo","commit_stats":null,"previous_names":["dcousens/utxo"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bitcoinjs/utxo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Futxo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Futxo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Futxo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Futxo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcoinjs","download_url":"https://codeload.github.com/bitcoinjs/utxo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinjs%2Futxo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263588253,"owners_count":23484890,"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":["bitcoin"],"created_at":"2025-06-08T09:31:21.702Z","updated_at":"2025-07-04T17:32:12.265Z","avatar_url":"https://github.com/bitcoinjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# utxo\n\n[![TRAVIS](https://secure.travis-ci.org/dcousens/utxo.png)](http://travis-ci.org/dcousens/utxo)\n[![NPM](http://img.shields.io/npm/v/utxo.svg)](https://www.npmjs.org/package/utxo)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n\n\n## Example\n\n``` javascript\nlet utxo = require('utxo')\nlet transactions = {\n\t\"2c20ca6ca3a2af32d3ca0c6c1a60f6d3c00101342620a21f3622fc6faf2ddcda\": {\n\t\t\"inputs\": [\n\t\t\t{\n\t\t\t\t\"txId\": \"xxx ...\",\n\t\t\t\t\"vout\": 0\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"txId\": \"xxx ...\",\n\t\t\t\t\"vout\": 1\n\t\t\t}\n\t\t],\n\t\t\"outputs\": [\n\t\t\t{ \"script\": \"...\" }\n\t\t]\n\t},\n\t\"bdcdd2fafa1c6c0ac3d23fa2a3ac66cf2263f12a03444310100c3d6c06ac02c3\": {\n\t\t\"inputs\": [\n\t\t\t{\n\t\t\t\t\"txId\": \"2c20ca6ca3a2af32d3ca0c6c1a60f6d3c00101342620a21f3622fc6faf2ddcda\"\n\t\t\t\t\"vout\": 0\n\t\t\t},\n\t\t\t...\n\t\t],\n\t\t// etc\n\t}\n}\n\nlet unspents = utxo(transactions)\n// =\u003e [{\n//\t\"txId\": \"2c20ca6ca3a2af32d3ca0c6c1a60f6d3c00101342620a21f3622fc6faf2ddcda\",\n//\t\"vout\": 0,\n//\t\"script\": \"...\"\n// }, ...]\n```\n**NOTE**: Any 'double spends' are ignored, with priority given to first-seen.\nIf `.outputs` is undefined,  an unspent is only `{ txId, vout }`.\n\n## LICENSE [MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinjs%2Futxo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoinjs%2Futxo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinjs%2Futxo/lists"}