Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aureleoules/txcore
🔨 The missing lightweight Bitcoin TX builder written in Go
https://github.com/aureleoules/txcore
bitcoin-tx go lightweight
Last synced: 2 months ago
JSON representation
🔨 The missing lightweight Bitcoin TX builder written in Go
- Host: GitHub
- URL: https://github.com/aureleoules/txcore
- Owner: aureleoules
- License: mit
- Created: 2019-10-06T01:01:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-12T22:11:58.000Z (over 5 years ago)
- Last Synced: 2024-06-21T03:00:06.024Z (7 months ago)
- Topics: bitcoin-tx, go, lightweight
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage```go
tx := txcore.NewTX()tx.AddInput("TxId", "Base58Address", outputIndex, isCompressed)
tx.AddInput("TxId2", "AnotherBase58Address", output2Index, isCompressed)
...tx.AddOutput("abc", 100_000_000) // send one bitcoin to abc
tx.AddOutput("xyz", 300_000_000) // send three bitcoins to xyz
...// Build raw tx
tx.Build()// Sign with the corresponding private keys
tx.Sign([]string{"privateKey1", "privateKey2", ...})// Print signed tx
fmt.Println(tx.SignedTXHex)
```## License
MIT