bitcoin

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2017 License: ISC Imports: 17 Imported by: 0

Documentation

Overview

Detect payment records in the Bitcoin Block Chain

Payments are indicated by OP_RETURN embedded data, this is compressed to fit it within the 80 byte Bitcoin limit.

The OP_RETURN(0x6a) data structure:

+---------------------------------------------------------------------------------+
|         1         2         3         4          5         6         7         8|
|123456789012345678901234567890123456789012345678 90123456789012345678901234567890|
+------------------------------------------------+--------------------------------+
|                                                |                                |
|     pay id                                     |                                |
|                                                |                                |
+------------------------------------------------+--------------------------------+
|             1         2         3         4    |         1         2         3  |
|123456789012345678901234567890123456789012345678|12345678901234567890123456789012|
+------------------------------------------------+--------------------------------+

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Finalise

func Finalise() error

finialise - stop all background tasks also calls the internal finalisePayment()

func Initialise

func Initialise(configuration *Configuration) error

initialise for bitcoin payments also calls the internal initialisePayment() and register()

Types

type Configuration

type Configuration struct {
	Username        string `libucl:"username" json:"username"`
	Password        string `libucl:"password" json:"password"`
	URL             string `libucl:"url" json:"url"`
	ServerName      string `libucl:"server_name" json:"server_name"`
	CACertificate   string `libucl:"ca_certificate" json:"ca_certificate"`
	Certificate     string `libucl:"certificate" json:"certificate"`
	PrivateKey      string `libucl:"private_key" json:"private_key"`
	Block           uint64 `libucl:"block" json:"block"`
	Hash            string `libucl:"hash" json:"hash"`
	ResetBlockCount bool   `libucl:"reset_block_count" json:"reset_block_count"`
}

a block of configuration data this is read from a libucl configuration file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL