Documentation
¶
Index ¶
- Variables
- type BasePolicy
- type CollectionDesign
- type CollectionName
- type CollectionPolicy
- func (policy CollectionPolicy) Addresses() ([]mitumbase.Address, error)
- func (policy CollectionPolicy) Bytes() []byte
- func (policy *CollectionPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (policy *CollectionPolicy) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (policy CollectionPolicy) Equal(c BasePolicy) bool
- func (policy CollectionPolicy) IsValid([]byte) error
- func (policy CollectionPolicy) MarshalBSON() ([]byte, error)
- func (policy CollectionPolicy) MarshalJSON() ([]byte, error)
- func (policy CollectionPolicy) Name() CollectionName
- func (policy CollectionPolicy) Royalty() PaymentParameter
- func (policy CollectionPolicy) URI() URI
- func (policy CollectionPolicy) Whitelist() []mitumbase.Address
- type CollectionPolicyJSONMarshaler
- type CollectionPolicyJSONUnmarshaler
- type Design
- func (de Design) Active() bool
- func (de Design) Addresses() ([]mitumbase.Address, error)
- func (de Design) Bytes() []byte
- func (de Design) Creator() mitumbase.Address
- func (de *Design) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (de *Design) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (de Design) Equal(cd Design) bool
- func (de Design) GenerateHash() util.Hash
- func (de Design) Hash() util.Hash
- func (de Design) IsValid([]byte) error
- func (de Design) MarshalBSON() ([]byte, error)
- func (de Design) MarshalJSON() ([]byte, error)
- func (de Design) Parent() mitumbase.Address
- func (de Design) Policy() BasePolicy
- type DesignBSONUnmarshaler
- type DesignJSONMarshaler
- type DesignJSONUnmarshaler
- type NFT
- func (n NFT) Active() bool
- func (n NFT) Addresses() []base.Address
- func (n NFT) Approved() base.Address
- func (n NFT) Bytes() []byte
- func (n NFT) Creators() Signers
- func (n *NFT) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (n *NFT) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (n NFT) Equal(cn NFT) bool
- func (n NFT) ExistsApproved() bool
- func (n NFT) ID() uint64
- func (n NFT) IsValid([]byte) error
- func (n NFT) MarshalBSON() ([]byte, error)
- func (n NFT) MarshalJSON() ([]byte, error)
- func (n NFT) NFTHash() NFTHash
- func (n NFT) Owner() base.Address
- func (n NFT) URI() URI
- type NFTBSONUnmarshaler
- type NFTBox
- func (nbx *NFTBox) Append(n uint64) error
- func (nbx NFTBox) Bytes() []byte
- func (nbx *NFTBox) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (nbx *NFTBox) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (nbx NFTBox) Equal(b NFTBox) bool
- func (nbx NFTBox) Exists(id uint64) bool
- func (nbx NFTBox) GenerateHash() util.Hash
- func (nbx NFTBox) Hash() util.Hash
- func (nbx NFTBox) Hint() hint.Hint
- func (nbx NFTBox) IsEmpty() bool
- func (nbx NFTBox) IsValid([]byte) error
- func (nbx NFTBox) MarshalBSON() ([]byte, error)
- func (nbx NFTBox) MarshalJSON() ([]byte, error)
- func (nbx NFTBox) NFTs() []uint64
- func (nbx *NFTBox) Remove(n uint64) error
- func (nbx *NFTBox) Sort(ascending bool)
- type NFTBoxBSONUnmarshaler
- type NFTBoxJSONMarshaler
- type NFTBoxJSONUnmarshaler
- type NFTHash
- type NFTJSONMarshaler
- type NFTJSONUnmarshaler
- type OperatorsBook
- func (ob *OperatorsBook) Append(ag mitumbase.Address) error
- func (ob OperatorsBook) Bytes() []byte
- func (ob *OperatorsBook) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ob *OperatorsBook) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (ob OperatorsBook) Equal(b OperatorsBook) bool
- func (ob OperatorsBook) Exists(ag mitumbase.Address) bool
- func (ob OperatorsBook) GenerateHash() util.Hash
- func (ob OperatorsBook) Get(ag mitumbase.Address) (mitumbase.Address, error)
- func (ob OperatorsBook) Hash() util.Hash
- func (ob OperatorsBook) IsEmpty() bool
- func (ob OperatorsBook) IsValid([]byte) error
- func (ob OperatorsBook) MarshalBSON() ([]byte, error)
- func (ob OperatorsBook) MarshalJSON() ([]byte, error)
- func (ob OperatorsBook) Operators() []mitumbase.Address
- func (ob *OperatorsBook) Remove(ag mitumbase.Address) error
- func (ob *OperatorsBook) Sort(ascending bool)
- type OperatorsBookBSONUnmarshaler
- type OperatorsBookJSONMarshaler
- type OperatorsBookJSONUnmarshaler
- type PaymentParameter
- type PolicyBSONUnmarshaler
- type Signer
- func (sgn Signer) Account() base.Address
- func (sgn Signer) Bytes() []byte
- func (sgn *Signer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (sgn *Signer) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (sgn Signer) Equal(csigner Signer) bool
- func (sgn Signer) IsValid([]byte) error
- func (sgn Signer) MarshalBSON() ([]byte, error)
- func (sgn Signer) MarshalJSON() ([]byte, error)
- func (sgn Signer) Share() uint
- func (sgn Signer) Signed() bool
- type SignerBSONUnmarshaler
- type SignerJSONMarshaler
- type SignerJSONUnmarshaler
- type Signers
- func (sgns Signers) Addresses() []base.Address
- func (sgns Signers) Bytes() []byte
- func (sgns *Signers) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (sgns *Signers) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (xs Signers) Equal(ys Signers) bool
- func (sgns Signers) Exists(signer Signer) bool
- func (sgns Signers) Index(signer Signer) int
- func (sgns Signers) IndexByAddress(address base.Address) int
- func (sgns Signers) IsSigned(sgn Signer) bool
- func (sgns Signers) IsSignedByAddress(address base.Address) bool
- func (sgns Signers) IsValid([]byte) error
- func (sgns Signers) MarshalBSON() ([]byte, error)
- func (sgns Signers) MarshalJSON() ([]byte, error)
- func (sgns *Signers) SetSigner(sgn Signer) error
- func (sgns Signers) Signers() []Signer
- func (sgns Signers) Total() uint
- type SignersBSONUnmarshaler
- type SignersJSONMarshaler
- type SignersJSONUnmarshaler
- type URI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MinLengthCollectionName = 3 MaxLengthCollectionName = 30 ReValidCollectionName = regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9\s]+$`) )
View Source
var ( MaxSigners = 10 )
View Source
var CollectionDesignHint = hint.MustNewHint("mitum-nft-collection-design-v0.0.1")
View Source
var CollectionPolicyHint = hint.MustNewHint("mitum-nft-collection-policy-v0.0.1")
View Source
var DesignHint = hint.MustNewHint("mitum-nft-design-v0.0.1")
View Source
var MaxCreators = 10
View Source
var MaxNFTHashLength = 1024
View Source
var MaxNFTIndex uint64 = 10000
View Source
var MaxOperators = 10
View Source
var MaxPaymentParameter uint = 99
View Source
var MaxURILength = 1000
View Source
var MaxWhitelist = 10
View Source
var NFTBoxHint = hint.MustNewHint("mitum-nft-nft-box-v0.0.1")
View Source
var NFTHint = hint.MustNewHint("mitum-nft-nft-v0.0.1")
View Source
var OperatorsBookHint = hint.MustNewHint("mitum-nft-operator-book-v0.0.1")
View Source
var SignerHint = hint.MustNewHint("mitum-nft-signer-v0.0.1")
View Source
var SignersHint = hint.MustNewHint("mitum-nft-signers-v0.0.1")
Functions ¶
This section is empty.
Types ¶
type BasePolicy ¶
type CollectionDesign ¶
type CollectionDesign struct {
Design
}
func NewCollectionDesign ¶
func NewCollectionDesign(parent mitumbase.Address, creator mitumbase.Address, active bool, policy CollectionPolicy) CollectionDesign
type CollectionName ¶
type CollectionName string
func (CollectionName) Bytes ¶
func (cn CollectionName) Bytes() []byte
func (CollectionName) IsValid ¶
func (cn CollectionName) IsValid([]byte) error
func (CollectionName) String ¶
func (cn CollectionName) String() string
type CollectionPolicy ¶
type CollectionPolicy struct { hint.BaseHinter // contains filtered or unexported fields }
func NewCollectionPolicy ¶
func NewCollectionPolicy(name CollectionName, royalty PaymentParameter, uri URI, whitelist []mitumbase.Address) CollectionPolicy
func (CollectionPolicy) Addresses ¶
func (policy CollectionPolicy) Addresses() ([]mitumbase.Address, error)
func (CollectionPolicy) Bytes ¶
func (policy CollectionPolicy) Bytes() []byte
func (*CollectionPolicy) DecodeBSON ¶
func (policy *CollectionPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CollectionPolicy) DecodeJSON ¶
func (policy *CollectionPolicy) DecodeJSON(b []byte, enc encoder.Encoder) error
func (CollectionPolicy) Equal ¶
func (policy CollectionPolicy) Equal(c BasePolicy) bool
func (CollectionPolicy) IsValid ¶
func (policy CollectionPolicy) IsValid([]byte) error
func (CollectionPolicy) MarshalBSON ¶
func (policy CollectionPolicy) MarshalBSON() ([]byte, error)
func (CollectionPolicy) MarshalJSON ¶
func (policy CollectionPolicy) MarshalJSON() ([]byte, error)
func (CollectionPolicy) Name ¶
func (policy CollectionPolicy) Name() CollectionName
func (CollectionPolicy) Royalty ¶
func (policy CollectionPolicy) Royalty() PaymentParameter
func (CollectionPolicy) URI ¶
func (policy CollectionPolicy) URI() URI
func (CollectionPolicy) Whitelist ¶
func (policy CollectionPolicy) Whitelist() []mitumbase.Address
type CollectionPolicyJSONMarshaler ¶
type CollectionPolicyJSONMarshaler struct { hint.BaseHinter Name CollectionName `json:"name"` Royalty PaymentParameter `json:"royalty"` URI URI `json:"uri"` Whitelist []base.Address `json:"whitelist"` }
type Design ¶
type Design struct { hint.BaseHinter // contains filtered or unexported fields }
func (Design) GenerateHash ¶
func (Design) MarshalBSON ¶
func (Design) MarshalJSON ¶
func (Design) Policy ¶
func (de Design) Policy() BasePolicy
type DesignBSONUnmarshaler ¶
type DesignJSONMarshaler ¶
type DesignJSONMarshaler struct { hint.BaseHinter Parent mitumbase.Address `json:"parent"` Creator mitumbase.Address `json:"creator"` Active bool `json:"active"` Policy BasePolicy `json:"policy"` }
type DesignJSONUnmarshaler ¶
type NFT ¶
type NFT struct { hint.BaseHinter // contains filtered or unexported fields }
func (NFT) ExistsApproved ¶
func (NFT) MarshalBSON ¶
func (NFT) MarshalJSON ¶
type NFTBSONUnmarshaler ¶
type NFTBox ¶
type NFTBox struct { hint.BaseHinter // contains filtered or unexported fields }
func (NFTBox) GenerateHash ¶
func (NFTBox) MarshalBSON ¶
func (NFTBox) MarshalJSON ¶
type NFTBoxBSONUnmarshaler ¶
type NFTBoxJSONMarshaler ¶
type NFTBoxJSONMarshaler struct { hint.BaseHinter NFTs []uint64 `json:"nfts"` }
type NFTBoxJSONUnmarshaler ¶
type NFTJSONMarshaler ¶
type NFTJSONUnmarshaler ¶
type OperatorsBook ¶
type OperatorsBook struct { hint.BaseHinter // contains filtered or unexported fields }
func NewOperatorsBook ¶
func NewOperatorsBook(operators []mitumbase.Address) OperatorsBook
func (OperatorsBook) Bytes ¶
func (ob OperatorsBook) Bytes() []byte
func (*OperatorsBook) DecodeBSON ¶
func (ob *OperatorsBook) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*OperatorsBook) DecodeJSON ¶
func (ob *OperatorsBook) DecodeJSON(b []byte, enc encoder.Encoder) error
func (OperatorsBook) Equal ¶
func (ob OperatorsBook) Equal(b OperatorsBook) bool
func (OperatorsBook) GenerateHash ¶
func (ob OperatorsBook) GenerateHash() util.Hash
func (OperatorsBook) Hash ¶
func (ob OperatorsBook) Hash() util.Hash
func (OperatorsBook) IsEmpty ¶
func (ob OperatorsBook) IsEmpty() bool
func (OperatorsBook) IsValid ¶
func (ob OperatorsBook) IsValid([]byte) error
func (OperatorsBook) MarshalBSON ¶
func (ob OperatorsBook) MarshalBSON() ([]byte, error)
func (OperatorsBook) MarshalJSON ¶
func (ob OperatorsBook) MarshalJSON() ([]byte, error)
func (OperatorsBook) Operators ¶
func (ob OperatorsBook) Operators() []mitumbase.Address
func (*OperatorsBook) Sort ¶
func (ob *OperatorsBook) Sort(ascending bool)
type OperatorsBookJSONMarshaler ¶
type OperatorsBookJSONMarshaler struct { hint.BaseHinter Operators []base.Address `json:"operators"` }
type PaymentParameter ¶
type PaymentParameter uint
func (PaymentParameter) Bytes ¶
func (pp PaymentParameter) Bytes() []byte
func (PaymentParameter) IsValid ¶
func (pp PaymentParameter) IsValid([]byte) error
func (PaymentParameter) Uint ¶
func (pp PaymentParameter) Uint() uint
type PolicyBSONUnmarshaler ¶
type Signer ¶
type Signer struct { hint.BaseHinter // contains filtered or unexported fields }
func (Signer) MarshalBSON ¶
func (Signer) MarshalJSON ¶
type SignerBSONUnmarshaler ¶
type SignerJSONMarshaler ¶
type SignerJSONMarshaler struct { hint.BaseHinter Account base.Address `json:"account"` Signed bool `json:"signed"` }
type SignerJSONUnmarshaler ¶
type Signers ¶
type Signers struct { hint.BaseHinter // contains filtered or unexported fields }
func NewSigners ¶
func (Signers) MarshalBSON ¶
func (Signers) MarshalJSON ¶
type SignersBSONUnmarshaler ¶
type SignersJSONMarshaler ¶
type SignersJSONMarshaler struct { hint.BaseHinter Total uint `json:"total"` Signers []Signer `json:"signers"` }
type SignersJSONUnmarshaler ¶
type SignersJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` Total uint `json:"total"` Signers json.RawMessage `json:"signers"` }
Source Files
¶
- design.go
- design_bson.go
- design_encode.go
- design_json.go
- nft.go
- nft_box.go
- nft_box_bson.go
- nft_box_encode.go
- nft_box_json.go
- nft_bson.go
- nft_encode.go
- nft_json.go
- operators_book.go
- operators_book_bson.go
- operators_book_encode.go
- operators_book_json.go
- policy.go
- policy_bson.go
- policy_encode.go
- policy_json.go
- signer.go
- signer_bson.go
- signer_encode.go
- signer_json.go
- signers.go
- signers_bson.go
- signers_encode.go
- signers_json.go
Click to show internal directories.
Click to hide internal directories.