Back to

Package fat

v0.0.0 (fba5860)
Latest Go to latest
Published: Feb 26, 2020 | License: MIT | Module:


Package Files


const MaxPrecision = 18

func Coinbase

func Coinbase() factom.FAAddress

func ComputeChainID

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

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

func ValidNameIDs(nameIDs []factom.Bytes) bool

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

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

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

func (Type) IsValid

func (t Type) IsValid() bool

func (Type) MarshalText

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

func (t *Type) UnmarshalText(text []byte) error
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier