{"id":18523974,"url":"https://github.com/0x4139/bitcoin-p2sh","last_synced_at":"2025-04-09T11:31:49.750Z","repository":{"id":75109678,"uuid":"130054646","full_name":"0x4139/bitcoin-p2sh","owner":"0x4139","description":"Golang implementation of the bitcoin multisig protocol","archived":false,"fork":false,"pushed_at":"2018-04-18T11:53:02.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:22:12.332Z","etag":null,"topics":["bitcoin","bitcoin-p2sh","golang","multisig"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0x4139.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-04-18T11:52:40.000Z","updated_at":"2021-11-24T13:21:05.000Z","dependencies_parsed_at":"2023-06-05T09:30:24.302Z","dependency_job_id":null,"html_url":"https://github.com/0x4139/bitcoin-p2sh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x4139%2Fbitcoin-p2sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x4139%2Fbitcoin-p2sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x4139%2Fbitcoin-p2sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x4139%2Fbitcoin-p2sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x4139","download_url":"https://codeload.github.com/0x4139/bitcoin-p2sh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031574,"owners_count":21036433,"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","bitcoin-p2sh","golang","multisig"],"created_at":"2024-11-06T17:38:45.918Z","updated_at":"2025-04-09T11:31:49.742Z","avatar_url":"https://github.com/0x4139.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bitcoin p2sh (multisig)\n======\n[![Documentation Status](https://readthedocs.org/projects/ansicolortags/badge/?version=latest)](http://ansicolortags.readthedocs.io/?badge=latest) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n\n### Important: Be sure that you use golang \u003c 1.9.4 due to the fact of this [Issue](https://github.com/golang/go/issues/23739)\n\n### Install go bindings for bitcoin secp256k1 first\n\n```\ncd $GOPATH/src/github.com/0x4139/secp256k1\ngit submodule update\ncd c-secp256k1\nmake distclean \u0026\u0026 ./autogen.sh \u0026\u0026 ./configure \u0026\u0026 make\ncd ..\ngo clean \u0026\u0026 go install\n```\n\n### Run the tests\n\n```\ngo test tests\n```\n\n### Features\nFor a more detailed usage please see the folder `tests`\n```\nGenerateAddress(m int, n int, rawPublicKeys string) (string, string, error)\nGenerateFund(rawPrivateKey string, inputTx string, amount int, p2shDestination string) (string, error)\nSignP2PKHTransaction(rawTransaction []byte, privateKey []byte, scriptPubKey []byte, inputTx string, amount int) ([]byte, error) \nGenerateKeys(keyCount int) ([]string, []string, []string, error)\nGenerateSpend(rawPrivateKeys string, destination string, rawRedeemScript string, inputTx string, amount int) (string, error)\nSignMultiSigTransaction(rawTransaction []byte, orderedPrivateKeys [][]byte, scriptPubKey []byte, redeemScript []byte, inputTx string, amount int) ([]byte, error) \n```\n\n#### Important Information\nAs per protocol rfc, private keys in ort to spend a multisig wallet have to be provided in the same order (skipping is ok but in the same order) as provided when the P2SH address was created\n\n\n### License\n\n````\n  DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2018 \u003cs0x4139@gmail.com\u003e\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n````","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x4139%2Fbitcoin-p2sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x4139%2Fbitcoin-p2sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x4139%2Fbitcoin-p2sh/lists"}