Versions in this module Expand all Collapse all v2 v2.0.1 Apr 3, 2024 v2.0.0 Mar 25, 2024 Changes in this version + var ErrInvalidNonce = errors.New("invalid nonce") + func BlockString(block *protocol.Block) string + func BlockTopologyString(topo *koinos.BlockTopology) string + func CalculateMerkleRoot(nodes [][]byte) ([]byte, error) + func CheckIsValidAddress(s string) bool + func DecimalToSatoshi(d *decimal.Decimal, precision int) (uint64, error) + func DecodeWIF(wif string) ([]byte, error) + func DisplayAddress(addressBytes []byte) string + func EncodeWIF(privKey []byte, compress bool, netID byte) string + func EnsureDir(dir string) error + func GenerateBase58ID(length int) string + func GetAppDir(baseDir string, appName string) string + func GetBoolOption(key string, defaultValue bool, cliArg bool, configs ...map[string]interface{}) bool + func GetHomeDir() string + func GetIntOption(key string, defaultValue int, cliArg int, configs ...map[string]interface{}) int + func GetStringOption(key string, defaultValue string, cliArg string, ...) string + func GetStringSliceOption(key string, cliArg []string, configs ...map[string]interface{}) []string + func HashMessage(message proto.Message) ([]byte, error) + func HexStringToBytes(s string) ([]byte, error) + func InitBaseDir(baseDir string) (string, error) + func MultihashString(hash []byte) string + func NonceBytesToUInt64(nonceBytes []byte) (uint64, error) + func SatoshiToDecimal(balance uint64, precision int) (*decimal.Decimal, error) + func SignTransaction(key []byte, tx *protocol.Transaction) error + func TransactionString(transaction *protocol.Transaction) string + func UInt64ToNonceBytes(value uint64) ([]byte, error) + type KoinosKey struct + PrivateKey *ecdsa.PrivateKey + func GenerateKoinosKey() (*KoinosKey, error) + func NewKoinosKeyFromBytes(private []byte) (*KoinosKey, error) + func (keys *KoinosKey) AddressBytes() []byte + func (keys *KoinosKey) Private() string + func (keys *KoinosKey) PrivateBytes() []byte + func (keys *KoinosKey) Public() string + func (keys *KoinosKey) PublicBytes() []byte + type Void struct + type YamlConfig struct + BlockStore map[string]interface{} + ContractMetaStore map[string]interface{} + Global map[string]interface{} + JSONRPC map[string]interface{} + P2P map[string]interface{} + TransactionStore map[string]interface{} + func InitYamlConfig(baseDir string) *YamlConfig Other modules containing this package github.com/koinos/koinos-util-golang