bitcoin

package
v0.12.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package bitcoin - 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

IsTestnet - detect if version is a testnet value

func ValidateAddress

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

ValidateAddress - check the address and return its version

Types

type AddressBytes added in v0.5.0

type AddressBytes [20]byte

AddressBytes - to hold the fixed-length address bytes

type Version

type Version byte

Version - 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