litecoin

package
v0.11.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: ISC Imports: 5 Imported by: 0

Documentation

Overview

Package litecoin - to validate litecoin addresses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBitcoin

func FromBitcoin(address string) (string, error)

FromBitcoin - check the address and return its version

func IsTestnet

func IsTestnet(version Version) bool

IsTestnet - detect if version is a testnet value

func TransformAddress added in v0.10.6

func TransformAddress(address string) (string, error)

TransformAddress - convert address to/from new version prefix

func ValidateAddress

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

ValidateAddress - check the address and return its version

Types

type AddressBytes

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 = 48
	LivenetScript  Version = 5
	LivenetScript2 Version = 50
	Testnet        Version = 111
	TestnetScript  Version = 196
	TestnetScript2 Version = 58
)

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