fat

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MaxPrecision = 18

Variables

This section is empty.

Functions

func Coinbase added in v0.4.0

func Coinbase() factom.FAAddress

func ComputeChainID added in v1.0.0

func ComputeChainID(tokenID string, issuerChainID *factom.Bytes32) factom.Bytes32

ComputeChainID returns the ChainID for a given tokenID and issuerChainID.

func NameIDs

func NameIDs(tokenID string, issuerChainID *factom.Bytes32) []factom.Bytes

NameIDs returns valid NameIDs

func ParseTokenIssuer added in v1.0.0

func ParseTokenIssuer(nameIDs []factom.Bytes) (string, factom.Bytes32)

ParseTokenIssuer returns the tokenID and identityChainID for a given set of nameIDs.

The caller must ensure that ValidNameIDs(nameIDs) returns true or else TokenIssuer will return garbage data or may panic.

func ValidNameIDs added in v1.0.0

func ValidNameIDs(nameIDs []factom.Bytes) bool

ValidNameIDs returns true if the nameIDs match the pattern for a valid token chain.

Types

type Issuance

type Issuance struct {
	Type      Type  `json:"type"`
	Supply    int64 `json:"supply"`
	Precision uint  `json:"precision,omitempty"`

	Symbol string `json:"symbol,omitempty"`

	Metadata json.RawMessage `json:"metadata,omitempty"`

	Entry factom.Entry `json:"-"`
}

func NewIssuance

func NewIssuance(e factom.Entry, idKey *factom.Bytes32) (Issuance, error)

func (Issuance) Sign added in v1.0.0

func (i Issuance) Sign(idKey factom.RCDSigner) (factom.Entry, error)

func (*Issuance) UnmarshalJSON

func (i *Issuance) UnmarshalJSON(data []byte) error

type Type

type Type uint
const (
	TypeFAT0 Type = iota
	TypeFAT1
)

func (Type) IsValid

func (t Type) IsValid() bool

func (Type) MarshalText added in v1.0.0

func (t Type) MarshalText() ([]byte, error)

func (*Type) Set

func (t *Type) Set(s string) error

func (Type) String

func (t Type) String() string

func (*Type) UnmarshalText added in v1.0.0

func (t *Type) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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