Documentation
¶
Index ¶
- func ChainID(tokenID string, issuerChainID factom.Bytes32) factom.Bytes32
- func Coinbase() factom.FAAddress
- func NameIDs(tokenID string, issuerChainID factom.Bytes32) []factom.Bytes
- func ValidTokenNameIDs(nameIDs []factom.Bytes) bool
- type Entry
- func (e Entry) FAAddress(rcdSigID int) factom.FAAddress
- func (e *Entry) MarshalEntry(v interface{}) error
- func (e Entry) MetadataJSONLen() int
- func (e *Entry) Sign(signingSet ...factom.RCDPrivateKey)
- func (e Entry) UnmarshalEntry(v interface{}) error
- func (e Entry) ValidExtIDs(numRCDSigPairs int) error
- type Issuance
- func (i *Issuance) MarshalEntry() error
- func (i Issuance) MarshalJSON() ([]byte, error)
- func (i *Issuance) UnmarshalEntry() error
- func (i *Issuance) UnmarshalJSON(data []byte) error
- func (i *Issuance) Valid(idKey factom.IDKey) error
- func (i Issuance) ValidData() error
- func (i Issuance) ValidExtIDs() error
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidTokenNameIDs ¶
ValidTokenNameIDs returns true if the nameIDs match the pattern for a valid token chain.
Types ¶
type Entry ¶
type Entry struct {
Metadata json.RawMessage `json:"metadata,omitempty"`
factom.Entry `json:"-"`
}
Entry has variables and methods common to all fat0 entries.
func (Entry) FAAddress ¶ added in v0.4.0
FAAddress computes the FAAddress corresponding to the rcdSigID'th RCD/Sig pair.
func (*Entry) MarshalEntry ¶
func (Entry) MetadataJSONLen ¶
func (*Entry) Sign ¶
func (e *Entry) Sign(signingSet ...factom.RCDPrivateKey)
Sign the RCD/Sig ID Salt + Timestamp Salt + Chain ID Salt + Content of the factom.Entry and add the RCD + signature pairs for the given addresses to the ExtIDs. This clears any existing ExtIDs.
func (Entry) UnmarshalEntry ¶
UnmarshalEntry unmarshals the content of the factom.Entry into the provided variable v, disallowing all unknown fields.
func (Entry) ValidExtIDs ¶
ValidExtIDs validates the structure of the ExtIDs of the factom.Entry to make sure that it has a valid timestamp salt and a valid set of RCD/signature pairs.
type Issuance ¶
type Issuance struct {
Type Type `json:"type"`
Supply int64 `json:"supply"`
Symbol string `json:"symbol,omitempty"`
Entry
}
Issuance represents the Issuance of a token.
func NewIssuance ¶
NewIssuance returns an Issuance initialized with the given entry.
func (*Issuance) MarshalEntry ¶
MarshalEntry marshals the entry content as an Issuance.
func (Issuance) MarshalJSON ¶
func (*Issuance) UnmarshalEntry ¶
UnmarshalEntry unmarshals the entry content as an Issuance.
func (*Issuance) UnmarshalJSON ¶
func (*Issuance) Valid ¶
Valid performs all validation checks and returns nil if i is a valid Issuance.
func (Issuance) ValidData ¶
ValidData validates the Issuance data and returns nil if no errors are present. ValidData assumes that the entry content has been unmarshaled.
func (Issuance) ValidExtIDs ¶
ValidExtIDs validates the structure of the external IDs of the entry to make sure that it has an RCD and signature. It does not validate the content of the RCD or signature.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fat0 provides data types corresponding to valid FAT-0 entries for Transaction and Issuance as well as methods for validating the structure and content of the factom entry.
|
Package fat0 provides data types corresponding to valid FAT-0 entries for Transaction and Issuance as well as methods for validating the structure and content of the factom entry. |