• Stars
    star
    247
  • Rank 164,117 (Top 4 %)
  • Language
    Go
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of simple programs which can generate bitcoin wallets, create and sign transactions, and send transactions over the bitcoin network.

Overview

This is a collection of simple programs which can generate bitcoin wallets, create and sign transactions, and send transactions over the bitcoin network.

It was a learning project for me to learn more about both golang, and the bitcoin protocol.

This project consists of three programs which each contain the most basic usecase.

  • keys.go - Generates a public/private key pair
  • transaction.go - Creates, and signs a bitcoin transaction
  • network.go - Connects to a peer, and sends a transaction over the network

Disclaimer

These programs are not "crytographically" random, and should not be used for any purpose other than educational use.

Installation

  1. Install go
  2. run go get to install dependencies
  3. Follow the instructions at go-secp256k1 to compile bitcoin/c-secp256k1
  4. Run one of the programs using the syntax below

Usage

Creating a key pair
go run keys.go

options (optional)
--testnet
Generating a transaction
go run transaction.go

options (required)
--private-key yourPrivateKey
--public-key yourPublicKey
--destination destinationPublicKey
--input-transaction inputTransactionHash
--satoshis satoshisToSend

options (optional)
--input-index inputTransactionIndex
Sending a transaction over the bitcoin network
go run network.go

options (required)
--transaction yourTransaction
--node-address 255.255.255.255 (IPv4 address of the bitcoin node to connect to)
--network-address 255.255.255.255 (IPv4 address of your public IP address)

options (optional)
--testnet

Dependencies

https://github.com/toxeus/go-secp256k1

This library is used for the creation of public keys from private keys, as well as signing transactions. It is a project which wraps the official bitcoin/c-secp256k1 bitcoin library.

https://github.com/tv42/base58

This library does the base58 conversion. I have included the base58 project in this codebase rather than importing it from the aforementioned github, because I needed to change the dictionary that was used.

Resources

License

MIT

More Repositories

1

easystarjs

An asynchronous A* pathfinding API written in Javascript.
JavaScript
1,870
star
2

http-status-codes

Constants enumerating the HTTP status codes. All status codes defined in RFC1945 (HTTP/1.0, RFC2616 (HTTP/1.1), and RFC2518 (WebDAV) are supported.
TypeScript
929
star
3

kademlia

Go implementation of a Kademlia distributed hash table
Go
146
star
4

abidecoder

Kotlin and Java library for decoding data params and events from ethereum transactions
Kotlin
12
star
5

easystaras3

Asynchronous A* made simple in AS3.
ActionScript
9
star
6

blockchainparser

A blockchain parser written in go
Go
8
star
7

roguelikeboard

roguelikeboard.jsx is a simple react.js component for rendering ASCII inspired roguelike boards on the web
JavaScript
8
star
8

imp

Interfaces in JavaScript.
JavaScript
7
star
9

receiver

A simple and configurable deployment tool for github projects.
JavaScript
3
star
10

gridregions

A helper library based heavily on HPA* for tile-based game development
JavaScript
2
star
11

templ

An easier way to create and save language-agnostic project templates in OSX.
Ruby
2
star
12

saveplz.com

Saveplz is a RESTful open API for storing JSON data
Ruby
2
star
13

rugburn

A fast configuration-based caching web scraper written in Go
Go
2
star
14

deltadb

A proof-of-concept time-series database
Go
2
star
15

moremodernwebapptemplate

A more modern web app template
JavaScript
1
star
16

goeasystar

An A* pathfinding library written in Go.
Go
1
star
17

omeglevscleverbot

Omegle vs Cleverbot is a simple ruby program that pipes output from an omegle conversation, to cleverbot, and back.
Ruby
1
star
18

ingestr

Ingestr is a Go microservice that consumes Ethereum blocks for enqueing into SNS and storage in S3
Go
1
star
19

flashio

Reliable TCP socket connectivity from Flash to node.js
ActionScript
1
star
20

typescript-gamedev-template

Typescript Game Dev Template
JavaScript
1
star
21

typescript-nodejs-starter

A simple starter project for Typescript/node.js
JavaScript
1
star
22

blackjack

A simple API which allows a user to play blackjack against a dealer.
JavaScript
1
star
23

scriptcodes

All Bitcoin Script opcodes. For use in your bitcoin-related go projects.
Go
1
star