Documentation
¶
Index ¶
- func TypeVerify(t Type) *errors.Error
- type BID
- type Book
- type Chain
- type CoinLead
- type Invariable
- type InvariableCoin
- func (i *InvariableCoin) GetSignature() []byte
- func (i *InvariableCoin) GetTimestamp() int64
- func (i *InvariableCoin) GetType() Type
- func (i *InvariableCoin) GetVN() vn.ID
- func (i *InvariableCoin) GetVersion() Version
- func (i *InvariableCoin) Sign(pri ki.PRI) ([]byte, *errors.Error)
- func (i *InvariableCoin) SignVerify(guardianPub ki.PUB) (bool, *errors.Error)
- type InvariableGenesis
- type InvariableLead
- type InvariableNFT
- func (i *InvariableNFT) GetSignature() []byte
- func (i *InvariableNFT) GetTimestamp() int64
- func (i *InvariableNFT) GetType() Type
- func (i *InvariableNFT) GetVN() vn.ID
- func (i *InvariableNFT) GetVersion() Version
- func (i *InvariableNFT) Sign(pri ki.PRI) ([]byte, *errors.Error)
- func (i *InvariableNFT) SignVerify(vnGuardianPub ki.PUB) (bool, *errors.Error)
- type InvariableSP
- func (i *InvariableSP) GetSP() sp.ID
- func (i *InvariableSP) GetSignature() []byte
- func (i *InvariableSP) GetTimestamp() int64
- func (i *InvariableSP) GetType() Type
- func (i *InvariableSP) GetVN() vn.ID
- func (i *InvariableSP) GetVersion() Version
- func (i *InvariableSP) Sign(pri ki.PRI) ([]byte, *errors.Error)
- func (i *InvariableSP) SignVerify(originPub ki.PUB) (bool, *errors.Error)
- type InvariableTemplate
- type InvariableTx
- func (i *InvariableTx) GetSignature() []byte
- func (i *InvariableTx) GetTimestamp() int64
- func (i *InvariableTx) GetType() Type
- func (i *InvariableTx) GetVersion() Version
- func (i *InvariableTx) Sign(pri ki.PRI) ([]byte, *errors.Error)
- func (i *InvariableTx) SignVerify(guardianPub ki.PUB) (bool, *errors.Error)
- type InvariableVN
- func (i *InvariableVN) GetSignature() []byte
- func (i *InvariableVN) GetTimestamp() int64
- func (i *InvariableVN) GetType() Type
- func (i *InvariableVN) GetVN() vn.ID
- func (i *InvariableVN) GetVersion() Version
- func (i *InvariableVN) Sign(pri ki.PRI) ([]byte, *errors.Error)
- func (i *InvariableVN) SignVerify() (bool, *errors.Error)
- type InvariableYin
- func (i *InvariableYin) GetSignature() []byte
- func (i *InvariableYin) GetTimestamp() int64
- func (i *InvariableYin) GetType() Type
- func (i *InvariableYin) GetVN() vn.ID
- func (i *InvariableYin) GetVersion() Version
- func (i *InvariableYin) Sign(pri ki.PRI) ([]byte, *errors.Error)
- func (i *InvariableYin) SignVerify(originPub ki.PUB) (bool, *errors.Error)
- type Ki
- type Knot
- type KnotIDX
- type Linkable
- type Rope
- type SPLead
- type SignBuilder
- type Tag
- type Tie
- type Type
- type VNLead
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TypeVerify ¶ added in v1.0.3
Types ¶
type Book ¶
type Book interface {
RegisterDataType(tpl interface{})
Inscribe(data Invariable) (BID, *errors.Error)
}
type Invariable ¶
type Invariable interface {
GetType() Type
GetVersion() Version
GetVN() vn.ID
GetTimestamp() int64
GetSignature() []byte
}
func BuildGenesis ¶ added in v1.0.3
func BuildGenesis() Invariable
type InvariableCoin ¶ added in v1.0.3
type InvariableCoin struct {
Type Type `json:"type"`
Version Version `json:"version"`
Vn *VNLead `json:"vn"`
Coin *CoinLead `bson:"coin" json:"coin"`
Wei uc.WEI `bson:"wei" json:"wei"`
Infinite bool `bson:"infinite" json:"infinite"`
Issuance *uc.Amount `bson:"issuance" json:"issuance"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func NewInvariableCoin ¶ added in v1.0.3
func (*InvariableCoin) GetSignature ¶ added in v1.0.3
func (i *InvariableCoin) GetSignature() []byte
func (*InvariableCoin) GetTimestamp ¶ added in v1.0.3
func (i *InvariableCoin) GetTimestamp() int64
func (*InvariableCoin) GetType ¶ added in v1.0.3
func (i *InvariableCoin) GetType() Type
func (*InvariableCoin) GetVN ¶ added in v1.0.3
func (i *InvariableCoin) GetVN() vn.ID
func (*InvariableCoin) GetVersion ¶ added in v1.0.3
func (i *InvariableCoin) GetVersion() Version
func (*InvariableCoin) SignVerify ¶ added in v1.0.3
type InvariableGenesis ¶ added in v1.0.3
type InvariableGenesis struct {
Type Type `json:"type"`
Version Version `json:"version"`
Chain Chain `json:"chain"`
Vn vn.ID `json:"vn"`
}
func NewInvariableGenesis ¶ added in v1.0.3
func NewInvariableGenesis(vnID vn.ID, chain Chain) *InvariableGenesis
func (*InvariableGenesis) GetSignature ¶ added in v1.0.3
func (i *InvariableGenesis) GetSignature() []byte
func (*InvariableGenesis) GetTimestamp ¶ added in v1.0.3
func (i *InvariableGenesis) GetTimestamp() int64
func (*InvariableGenesis) GetType ¶ added in v1.0.3
func (i *InvariableGenesis) GetType() Type
func (*InvariableGenesis) GetVN ¶ added in v1.0.3
func (i *InvariableGenesis) GetVN() vn.ID
func (*InvariableGenesis) GetVersion ¶ added in v1.0.3
func (i *InvariableGenesis) GetVersion() Version
type InvariableLead ¶ added in v1.0.3
type InvariableLead struct {
Type Type `json:"type"`
Version Version `json:"version"`
Invariable BID `json:"invariable"`
}
func (*InvariableLead) S ¶ added in v1.0.3
func (lead *InvariableLead) S() string
type InvariableNFT ¶ added in v1.0.3
type InvariableNFT struct {
Type Type `json:"type"`
Version Version `json:"version"`
Vn *VNLead `json:"vn"`
Category nft.Category `json:"category"`
Token nft.Token `json:"token"`
Tag []nft.Tag `json:"tag"`
Link nft.Link `json:"link"`
Title string `json:"title"`
Description string `json:"desc"`
Meta nft.Meta `json:"meta"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func NewInvariableNFT ¶ added in v1.0.3
func (*InvariableNFT) GetSignature ¶ added in v1.0.3
func (i *InvariableNFT) GetSignature() []byte
func (*InvariableNFT) GetTimestamp ¶ added in v1.0.3
func (i *InvariableNFT) GetTimestamp() int64
func (*InvariableNFT) GetType ¶ added in v1.0.3
func (i *InvariableNFT) GetType() Type
func (*InvariableNFT) GetVN ¶ added in v1.0.3
func (i *InvariableNFT) GetVN() vn.ID
func (*InvariableNFT) GetVersion ¶ added in v1.0.3
func (i *InvariableNFT) GetVersion() Version
func (*InvariableNFT) SignVerify ¶ added in v1.0.3
type InvariableSP ¶ added in v1.0.3
type InvariableSP struct {
Type Type `json:"type"`
Version Version `json:"version"`
Vn *VNLead `json:"vn"`
Sp sp.ID `json:"sp"`
Guardian *Ki `json:"guardian"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func NewInvariableSP ¶ added in v1.0.3
func (*InvariableSP) GetSP ¶ added in v1.0.3
func (i *InvariableSP) GetSP() sp.ID
func (*InvariableSP) GetSignature ¶ added in v1.0.3
func (i *InvariableSP) GetSignature() []byte
func (*InvariableSP) GetTimestamp ¶ added in v1.0.3
func (i *InvariableSP) GetTimestamp() int64
func (*InvariableSP) GetType ¶ added in v1.0.3
func (i *InvariableSP) GetType() Type
func (*InvariableSP) GetVN ¶ added in v1.0.3
func (i *InvariableSP) GetVN() vn.ID
func (*InvariableSP) GetVersion ¶ added in v1.0.3
func (i *InvariableSP) GetVersion() Version
func (*InvariableSP) SignVerify ¶ added in v1.0.3
type InvariableTemplate ¶ added in v1.0.3
type InvariableTemplate struct {
Type Type `json:"type"`
Version Version `json:"version"`
Vn vn.ID `json:"vn"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func (*InvariableTemplate) GetSignature ¶ added in v1.0.3
func (i *InvariableTemplate) GetSignature() []byte
func (*InvariableTemplate) GetTimestamp ¶ added in v1.0.3
func (i *InvariableTemplate) GetTimestamp() int64
func (*InvariableTemplate) GetType ¶ added in v1.0.3
func (i *InvariableTemplate) GetType() Type
func (*InvariableTemplate) GetVN ¶ added in v1.0.3
func (i *InvariableTemplate) GetVN() vn.ID
func (*InvariableTemplate) GetVersion ¶ added in v1.0.3
func (i *InvariableTemplate) GetVersion() Version
type InvariableTx ¶ added in v1.0.3
type InvariableTx struct {
Type Type `json:"type"`
Version Version `json:"version"`
Tx string `json:"tx"`
Coin *CoinLead `json:"coin"`
From ki.ADR `json:"from"`
To ki.ADR `json:"to"`
Amount *uc.Amount `json:"amount"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func NewInvariableTx ¶ added in v1.0.3
func (*InvariableTx) GetSignature ¶ added in v1.0.3
func (i *InvariableTx) GetSignature() []byte
func (*InvariableTx) GetTimestamp ¶ added in v1.0.3
func (i *InvariableTx) GetTimestamp() int64
func (*InvariableTx) GetType ¶ added in v1.0.3
func (i *InvariableTx) GetType() Type
func (*InvariableTx) GetVersion ¶ added in v1.0.3
func (i *InvariableTx) GetVersion() Version
func (*InvariableTx) SignVerify ¶ added in v1.0.3
type InvariableVN ¶ added in v1.0.3
type InvariableVN struct {
Type Type `json:"type"`
Version Version `json:"version"`
Vn vn.ID `json:"vn"`
Guardian *Ki `json:"guardian"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func NewInvariableVN ¶ added in v1.0.3
func (*InvariableVN) GetSignature ¶ added in v1.0.3
func (i *InvariableVN) GetSignature() []byte
func (*InvariableVN) GetTimestamp ¶ added in v1.0.3
func (i *InvariableVN) GetTimestamp() int64
func (*InvariableVN) GetType ¶ added in v1.0.3
func (i *InvariableVN) GetType() Type
func (*InvariableVN) GetVN ¶ added in v1.0.3
func (i *InvariableVN) GetVN() vn.ID
func (*InvariableVN) GetVersion ¶ added in v1.0.3
func (i *InvariableVN) GetVersion() Version
func (*InvariableVN) SignVerify ¶ added in v1.0.3
func (i *InvariableVN) SignVerify() (bool, *errors.Error)
type InvariableYin ¶ added in v1.0.3
type InvariableYin struct {
Type Type `json:"type"`
Version Version `json:"version"`
Vn *VNLead `json:"vn"`
Sp *SPLead `json:"sp"`
Tag []Tag `json:"tag"`
Who *yn.Who `json:"who"`
When yn.When `json:"when"`
Act yn.Act `json:"act"`
What *yn.What `json:"what"`
Exp *yn.Expense `json:"exp"`
Title yn.Title `json:"title"`
Data []byte `json:"data"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func NewInvariableYin ¶ added in v1.0.3
func (*InvariableYin) GetSignature ¶ added in v1.0.3
func (i *InvariableYin) GetSignature() []byte
func (*InvariableYin) GetTimestamp ¶ added in v1.0.3
func (i *InvariableYin) GetTimestamp() int64
func (*InvariableYin) GetType ¶ added in v1.0.3
func (i *InvariableYin) GetType() Type
func (*InvariableYin) GetVN ¶ added in v1.0.3
func (i *InvariableYin) GetVN() vn.ID
func (*InvariableYin) GetVersion ¶ added in v1.0.3
func (i *InvariableYin) GetVersion() Version
func (*InvariableYin) SignVerify ¶ added in v1.0.3
type Knot ¶ added in v1.0.3
type Knot struct {
Type Type `json:"type"`
Version Version `json:"version"`
Vn vn.ID `json:"vn"`
Chain Chain `json:"chain"`
Knot KnotIDX `json:"knot"`
Invariable *InvariableLead `json:"invariable"`
Previous BID `json:"previous"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
func (*Knot) GetPrevious ¶ added in v1.0.3
func (*Knot) GetSignature ¶ added in v1.0.3
func (*Knot) GetTimestamp ¶ added in v1.0.3
func (*Knot) GetVersion ¶ added in v1.0.3
type SignBuilder ¶ added in v1.0.3
type SignBuilder struct {
// contains filtered or unexported fields
}
func NewSignBuilder ¶ added in v1.0.3
func NewSignBuilder() *SignBuilder
func (*SignBuilder) Add ¶ added in v1.0.3
func (b *SignBuilder) Add(key string, val string) *SignBuilder
func (*SignBuilder) Build ¶ added in v1.0.3
func (b *SignBuilder) Build() string
func (*SignBuilder) Hash ¶ added in v1.0.3
func (b *SignBuilder) Hash() string
type Tie ¶ added in v1.0.3
type Tie struct {
Tie string `json:"tie"`
Type Type `json:"type"`
Version Version `json:"version"`
Vn vn.ID `json:"vn"`
Chain Chain `json:"chain"`
Invariable *InvariableLead `json:"invariable"`
Timestamp int64 `json:"timestamp"`
Signature []byte `json:"signature"`
}
type Type ¶
type Type string
const ( InvariableCoinType Type = "hotu.coin" InvariableCoinVersion = DefaultVersion )
const ( InvariableGenesisType Type = "hotu.chain.genesis" InvariableGenesisVersion = DefaultVersion )
const ( InvariableNFTType Type = "hotu.nft" InvariableNFTVersion = DefaultVersion )
const ( InvariableSPType Type = "hotu.sp" InvariableSPVersion = DefaultVersion )
const ( InvariableTxType Type = "hotu.tx" InvariableTxVersion = DefaultVersion )
const ( InvariableVNType Type = "hotu.vn" InvariableVNVersion = DefaultVersion )
const ( InvariableYinType Type = "yin" InvariableYinVersion = DefaultVersion )
const ( KnotType Type = "knot" KnotVersion = DefaultVersion )
const ( TieType Type = "hotu.tie" TieVersion = DefaultVersion )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.