types

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UndDenom  = "und"  // 1 (base unit)
	NundDenom = "nund" // 10^-9 (nano)

	DefaultDenomination = NundDenom // lowest denomination used on chain
	BaseDenomination    = UndDenom  // actual Coin - i.e. 1 UND

	UndPow  = 1e9  // multiplier for converting from und to (nano) nund
	NundPow = 1e-9 // multiplier for converting from (nano) nund to und
)
View Source
const (

	// AddrLen defines a valid address length
	AddrLen = 20
	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32MainPrefix = "und"

	// Atom in https://github.com/satoshilabs/slips/blob/master/slip-0044.md
	CoinType = 5555

	// Implementations of HD wallets for UND Mainchain should use the wallet path 44'/5555'/0'/0
	HdWalletPath = "44'/5555'/0'/0/0"

	// PrefixAccount is the prefix for account keys
	PrefixAccount = "acc"
	// PrefixValidator is the prefix for validator keys
	PrefixValidator = "val"
	// PrefixConsensus is the prefix for consensus keys
	PrefixConsensus = "cons"
	// PrefixPublic is the prefix for public keys
	PrefixPublic = "pub"
	// PrefixOperator is the prefix for operator keys
	PrefixOperator = "oper"

	// PrefixAddress is the prefix for addresses
	PrefixAddress = "addr"

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = Bech32MainPrefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = Bech32MainPrefix + PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = Bech32MainPrefix + PrefixValidator + PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = Bech32MainPrefix + PrefixValidator + PrefixOperator + PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = Bech32MainPrefix + PrefixValidator + PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = Bech32MainPrefix + PrefixValidator + PrefixConsensus + PrefixPublic
)

Variables

This section is empty.

Functions

func ConvertUndDenomination

func ConvertUndDenomination(amount string, from string, to string) (string, error)

Types

type AccountWithLocked

type AccountWithLocked struct {
	Account    exported.Account `json:"account"`
	Enterprise EnterpriseUnd    `json:"enterprise"`
}

func NewAccountWithLocked

func NewAccountWithLocked() AccountWithLocked

func (AccountWithLocked) String

func (a AccountWithLocked) String() string

type EnterpriseUnd

type EnterpriseUnd struct {
	Locked    sdk.Coin  `json:"locked"`
	Available sdk.Coins `json:"available_for_wrkchain"`
}

func NewEnterpriseUnd

func NewEnterpriseUnd() EnterpriseUnd

func (EnterpriseUnd) String

func (e EnterpriseUnd) String() string

Jump to

Keyboard shortcuts

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