factom: github.com/Factom-Asset-Tokens/factom/fat Index | Files

package fat

import "github.com/Factom-Asset-Tokens/factom/fat"


Package Files

chainid.go issuance.go type.go


const MaxPrecision = 18

func Coinbase Uses

func Coinbase() factom.FAAddress

func ComputeChainID Uses

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

ComputeChainID returns the ChainID for a given tokenID and issuerChainID.

func NameIDs Uses

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

NameIDs returns valid NameIDs

func ParseTokenIssuer Uses

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 Uses

func ValidNameIDs(nameIDs []factom.Bytes) bool

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

type Issuance Uses

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 Uses

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

func (Issuance) Sign Uses

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

func (*Issuance) UnmarshalJSON Uses

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

type Type Uses

type Type uint
const (
    TypeFAT0 Type = iota

func (Type) IsValid Uses

func (t Type) IsValid() bool

func (Type) MarshalText Uses

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

func (*Type) Set Uses

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

func (Type) String Uses

func (t Type) String() string

func (*Type) UnmarshalText Uses

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

Package fat imports 7 packages (graph) and is imported by 10 packages. Updated 2020-03-24. Refresh now. Tools for package owners.