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 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址