bitcoin

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

to validate bitcoin addresses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTestnet added in v0.5.0

func IsTestnet(version Version) bool

detect if version is a testnet value

func ValidateAddress

func ValidateAddress(address string) (Version, AddressBytes, error)

check the address and return its version

Types

type AddressBytes added in v0.5.0

type AddressBytes [20]byte

to hold thefixed-length address bytes

type Version

type Version byte

to hold the type of the address

const (
	Livenet       Version = 0
	LivenetScript Version = 5
	Testnet       Version = 111
	TestnetScript Version = 196
)

from: https://en.bitcoin.it/wiki/List_of_address_prefixes

Jump to

Keyboard shortcuts

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