Address

package
v0.0.0-...-ec97d81 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BYRON          = 0b1000
	KEY_KEY        = 0b0000
	SCRIPT_KEY     = 0b0001
	KEY_SCRIPT     = 0b0010
	SCRIPT_SCRIPT  = 0b0011
	KEY_POINTER    = 0b0100
	SCRIPT_POINTER = 0b0101
	KEY_NONE       = 0b0110
	SCRIPT_NONE    = 0b0111
	NONE_KEY       = 0b1110
	NONE_SCRIPT    = 0b1111
)
View Source
const (
	MAINNET = 1
	TESTNET = 0
)

Variables

This section is empty.

Functions

func ComputeHrp

func ComputeHrp(address_type uint8, network uint8) string

Types

type Address

type Address struct {
	PaymentPart []byte
	StakingPart []byte
	Network     byte
	AddressType byte
	HeaderByte  byte
	Hrp         string
}

func DecodeAddress

func DecodeAddress(value string) (Address, error)

func WalletAddressFromBytes

func WalletAddressFromBytes(payment []byte, staking []byte, network constants.Network) *Address

func (Address) Bytes

func (addr Address) Bytes() []byte

func (*Address) Debug

func (addr *Address) Debug() string

func (*Address) Equal

func (addr *Address) Equal(other *Address) bool

func (*Address) MarshalCBOR

func (addr *Address) MarshalCBOR() ([]byte, error)

func (Address) String

func (addr Address) String() string

func (*Address) ToCbor

func (addr *Address) ToCbor() string

func (*Address) UnmarshalCBOR

func (addr *Address) UnmarshalCBOR(value []byte) error

Jump to

Keyboard shortcuts

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