btcsubprotos

package module
v0.0.0-...-a32170a Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2014 License: ISC Imports: 4 Imported by: 2

README

btcsubprotos

Constants for Bitcoin protocols. Right now: ahimsa, DocProof and CounterParty

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBulletin

func IsBulletin(tx *btcwire.MsgTx) bool

Takes a TX and determines if it is an ahimsa bulletin. This method only looks for the leading bytes, it does not assert anything about the protocol buffer within.

func IsCounterParty

func IsCounterParty(tx *btcwire.MsgTx) bool

Tries to match pushed data to the counterparty format

func IsDocProof

func IsDocProof(tx *btcwire.MsgTx) bool

Checks to see if tx is a docproof message by looking at its first output.

Types

type Params

type Params struct {
	Magic []byte // Magic bytes associated with some protocol
}
var (
	Ahimsa Params = Params{
		Magic: ahimsa.Magic[:],
	}
	CounterParty Params = Params{
		Magic: []byte{
			0x43, 0x4e, 0x54, 0x52, 0x50, 0x52, 0x54, 0x59,
		},
	}
	CounterPartyTestnet Params = Params{
		Magic: []byte{
			0x58, 0x58,
		},
	}
	DocProof Params = Params{
		Magic: []byte{
			0x44, 0x4f, 0x43, 0x50, 0x52, 0x4f, 0x4f, 0x46,
		},
	}
)

Jump to

Keyboard shortcuts

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