common

package
v0.0.0-...-be50d8c Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT, Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAddressIsRequired = fmt.Errorf("address is required")
View Source
var ErrInsufficientCoins = fmt.Errorf("coins is insufficient")
View Source
var ErrInvalidCoins = fmt.Errorf("coins is invaild")

Functions

func MustSortJSON

func MustSortJSON(toSortJSON []byte) []byte

MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.

func SortJSON

func SortJSON(toSortJSON []byte) ([]byte, error)

SortedJSON takes any JSON and returns it sorted by keys. Also, all white-spaces are removed. This method can be used to canonicalize JSON to be returned by GetSignBytes, e.g. for the ledger integration. If the passed JSON isn't valid it will return an error.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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