Documentation ¶
Index ¶
- Variables
- func NewTestAddress() base.Address
- type BasePolicy
- type Design
- func (d Design) Active() bool
- func (d Design) Addresses() ([]base.Address, error)
- func (d Design) Bytes() []byte
- func (d Design) Creator() base.Address
- func (d Design) Equal(cd Design) bool
- func (d Design) GenerateHash() valuehash.Hash
- func (d Design) Hash() valuehash.Hash
- func (d Design) Hint() hint.Hint
- func (d Design) IsValid([]byte) error
- func (d Design) MarshalBSON() ([]byte, error)
- func (d Design) MarshalJSON() ([]byte, error)
- func (d Design) Parent() base.Address
- func (d Design) Policy() BasePolicy
- func (d Design) Rebuild() Design
- func (d Design) Symbol() extensioncurrency.ContractID
- func (d *Design) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *Design) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type DesignBSONUnpacker
- type DesignJSONPacker
- type DesignJSONUnpacker
- type NFT
- func (n NFT) Active() bool
- func (n NFT) Approved() base.Address
- func (n NFT) Bytes() []byte
- func (n NFT) Copyrighters() Signers
- func (n NFT) Creators() Signers
- func (n NFT) Equal(cn NFT) bool
- func (n NFT) ExistsApproved() bool
- func (n NFT) GenerateHash() valuehash.Hash
- func (n NFT) Hash() valuehash.Hash
- func (NFT) Hint() hint.Hint
- func (n NFT) ID() NFTID
- 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) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (n *NFT) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- func (n NFT) Uri() URI
- type NFTBSONUnpacker
- type NFTHash
- type NFTID
- func (nid NFTID) Bytes() []byte
- func (nid NFTID) Collection() extensioncurrency.ContractID
- func (nid NFTID) Equal(cnid NFTID) bool
- func (nid NFTID) GenerateHash() valuehash.Hash
- func (nid NFTID) Hash() valuehash.Hash
- func (nid NFTID) Hint() hint.Hint
- func (nid NFTID) Idx() uint64
- func (nid NFTID) IsValid([]byte) error
- func (nid NFTID) MarshalBSON() ([]byte, error)
- func (nid NFTID) MarshalJSON() ([]byte, error)
- func (nid NFTID) String() string
- func (nid *NFTID) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (nid *NFTID) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type NFTIDBSONUnpacker
- type NFTIDJSONPacker
- type NFTIDJSONUnpacker
- type NFTJSONPacker
- type NFTJSONUnpacker
- type PaymentParameter
- type Signer
- func (signer Signer) Account() base.Address
- func (signer Signer) Bytes() []byte
- func (signer Signer) Equal(csigner Signer) bool
- func (signer Signer) IsValid([]byte) error
- func (signer Signer) MarshalBSON() ([]byte, error)
- func (signer Signer) MarshalJSON() ([]byte, error)
- func (signer Signer) Share() uint
- func (signer Signer) Signed() bool
- func (signer *Signer) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (signer *Signer) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type SignerBSONUnpacker
- type SignerJSONPacker
- type SignerJSONUnpacker
- type Signers
- func (signers Signers) Addresses() []base.Address
- func (signers Signers) Bytes() []byte
- func (signers Signers) Equal(csigners Signers) bool
- func (signers Signers) Exists(signer Signer) bool
- func (signers Signers) Index(signer Signer) int
- func (signers Signers) IndexByAddress(address base.Address) int
- func (signers Signers) IsSigned(signer Signer) bool
- func (signers Signers) IsSignedByAddress(address base.Address) bool
- func (signers Signers) IsValid([]byte) error
- func (signers Signers) MarshalBSON() ([]byte, error)
- func (signers Signers) MarshalJSON() ([]byte, error)
- func (signers *Signers) SetSigner(signer Signer) error
- func (signers Signers) Signers() []Signer
- func (signers Signers) Total() uint
- func (signers *Signers) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (signers *Signers) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type SignersBSONUnpacker
- type SignersJSONPacker
- type SignersJSONUnpacker
- type TestPolicy
- func (tp TestPolicy) Addresses() ([]base.Address, error)
- func (tp TestPolicy) Bytes() []byte
- func (tp TestPolicy) Equal(c BasePolicy) bool
- func (tp TestPolicy) IsValid([]byte) error
- func (tp TestPolicy) MarshalBSON() ([]byte, error)
- func (tp TestPolicy) MarshalJSON() ([]byte, error)
- func (tp TestPolicy) Rebuild() BasePolicy
- func (tp *TestPolicy) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (tp *TestPolicy) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type TestPolicyBSONUnpacker
- type TestPolicyJSONPacker
- type TestPolicyJSONUnpacker
- type URI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DesignType = hint.Type("mitum-nft-design") DesignHint = hint.NewHint(DesignType, "v0.0.1") DesignHinter = Design{BaseHinter: hint.NewBaseHinter(DesignHint)} )
View Source
var ( NFTType = hint.Type("mitum-nft-nft") NFTHint = hint.NewHint(NFTType, "v0.0.1") NFTHinter = NFT{BaseHinter: hint.NewBaseHinter(NFTHint)} )
View Source
var ( NFTIDType = hint.Type("mitum-nft-nft-id") NFTIDHint = hint.NewHint(NFTIDType, "v0.0.1") NFTIDHinter = NFTID{BaseHinter: hint.NewBaseHinter(NFTIDHint)} )
View Source
var ( SignerType = hint.Type("mitum-nft-signer") SignerHint = hint.NewHint(SignerType, "v0.0.1") SignerHinter = Signer{BaseHinter: hint.NewBaseHinter(SignerHint)} )
View Source
var ( MaxSigners = 10 )
View Source
var ( SignersType = hint.Type("mitum-nft-signers") SignersHint = hint.NewHint(SignersType, "v0.0.1") SignersHinter = Signers{BaseHinter: hint.NewBaseHinter(SignersHint)} )
View Source
var ( TestPolicyType = hint.Type("mitum-nft-test-policy") TestPolicyHint = hint.NewHint(TestPolicyType, "v0.0.1") TestPolicyHinter = TestPolicy{BaseHinter: hint.NewBaseHinter(TestPolicyHint)} )
View Source
var MaxCopyrighters = 10
View Source
var MaxCreators = 10
View Source
var MaxNFTHashLength = 1024
View Source
var MaxNFTIdx uint64 = 10000
View Source
var MaxPaymentParameter uint = 99
View Source
var MaxURILength = 1000
Functions ¶
func NewTestAddress ¶
Types ¶
type BasePolicy ¶
type BasePolicy interface { isvalid.IsValider Bytes() []byte Addresses() ([]base.Address, error) Equal(c BasePolicy) bool Rebuild() BasePolicy }
type Design ¶
type Design struct { hint.BaseHinter // contains filtered or unexported fields }
func MustNewDesign ¶
func MustNewDesign(parent base.Address, creator base.Address, symbol extensioncurrency.ContractID, active bool, policy BasePolicy) Design
func NewDesign ¶
func NewDesign(parent base.Address, creator base.Address, symbol extensioncurrency.ContractID, active bool, policy BasePolicy) Design
func (Design) GenerateHash ¶
func (Design) MarshalBSON ¶
func (Design) MarshalJSON ¶
func (Design) Policy ¶
func (d Design) Policy() BasePolicy
func (Design) Symbol ¶
func (d Design) Symbol() extensioncurrency.ContractID
type DesignBSONUnpacker ¶
type DesignBSONUnpacker struct { PR base.AddressDecoder `bson:"parent"` CR base.AddressDecoder `bson:"creator"` SB string `bson:"symbol"` AC bool `bson:"active"` PO bson.Raw `bson:"policy"` }
type DesignJSONPacker ¶
type DesignJSONPacker struct { jsonenc.HintedHead PR base.Address `json:"parent"` CR base.Address `json:"creator"` SB extensioncurrency.ContractID `json:"symbol"` AC bool `json:"active"` PO BasePolicy `json:"policy"` }
type DesignJSONUnpacker ¶
type DesignJSONUnpacker struct { PR base.AddressDecoder `json:"parent"` CR base.AddressDecoder `json:"creator"` SB string `json:"symbol"` AC bool `json:"active"` PO json.RawMessage `json:"policy"` }
type NFT ¶
type NFT struct { hint.BaseHinter // contains filtered or unexported fields }
func MustNewNFT ¶
func (NFT) Copyrighters ¶
func (NFT) ExistsApproved ¶
func (NFT) GenerateHash ¶
func (NFT) MarshalBSON ¶
func (NFT) MarshalJSON ¶
type NFTBSONUnpacker ¶
type NFTID ¶
type NFTID struct { hint.BaseHinter // contains filtered or unexported fields }
func MustNewNFTID ¶
func MustNewNFTID(symbol extensioncurrency.ContractID, idx uint64) NFTID
func NewNFTID ¶
func NewNFTID(symbol extensioncurrency.ContractID, idx uint64) NFTID
func NewTestNFTID ¶
func (NFTID) Collection ¶
func (nid NFTID) Collection() extensioncurrency.ContractID
func (NFTID) GenerateHash ¶
func (NFTID) MarshalBSON ¶
func (NFTID) MarshalJSON ¶
type NFTIDBSONUnpacker ¶
type NFTIDJSONPacker ¶
type NFTIDJSONPacker struct { jsonenc.HintedHead CL extensioncurrency.ContractID `json:"collection"` ID uint64 `json:"idx"` }
type NFTIDJSONUnpacker ¶
type NFTJSONPacker ¶
type NFTJSONUnpacker ¶
type NFTJSONUnpacker struct { ID json.RawMessage `json:"id"` AC bool `json:"active"` ON base.AddressDecoder `json:"owner"` HS string `json:"hash"` UR string `json:"uri"` AP base.AddressDecoder `json:"approved"` CR json.RawMessage `json:"creators"` CP json.RawMessage `json:"copyrighters"` }
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 Signer ¶
type Signer struct { hint.BaseHinter // contains filtered or unexported fields }
func (Signer) MarshalBSON ¶
func (Signer) MarshalJSON ¶
type SignerBSONUnpacker ¶
type SignerBSONUnpacker struct { AC base.AddressDecoder `bson:"account"` SH uint `bson:"share"` SG bool `bson:"signed"` }
type SignerJSONPacker ¶
type SignerJSONUnpacker ¶
type SignerJSONUnpacker struct { AC base.AddressDecoder `json:"account"` SH uint `json:"share"` SG bool `json:"signed"` }
type Signers ¶
type Signers struct { hint.BaseHinter // contains filtered or unexported fields }
func MustNewSigners ¶
func NewSigners ¶
func NewTestSigners ¶
func NewTestSigners() Signers
func (Signers) IsSignedByAddress ¶
func (Signers) MarshalBSON ¶
func (Signers) MarshalJSON ¶
func (*Signers) UnpackBSON ¶
type SignersBSONUnpacker ¶
type SignersJSONPacker ¶
type SignersJSONPacker struct { jsonenc.HintedHead TT uint `json:"total"` SG []Signer `json:"signers"` }
type SignersJSONUnpacker ¶
type SignersJSONUnpacker struct { TT uint `json:"total"` SG json.RawMessage `json:"signers"` }
type TestPolicy ¶
type TestPolicy struct { hint.BaseHinter // contains filtered or unexported fields }
func NewTestPolicy ¶
func NewTestPolicy(value int) TestPolicy
func (TestPolicy) Bytes ¶
func (tp TestPolicy) Bytes() []byte
func (TestPolicy) Equal ¶
func (tp TestPolicy) Equal(c BasePolicy) bool
func (TestPolicy) IsValid ¶
func (tp TestPolicy) IsValid([]byte) error
func (TestPolicy) MarshalBSON ¶
func (tp TestPolicy) MarshalBSON() ([]byte, error)
func (TestPolicy) MarshalJSON ¶
func (tp TestPolicy) MarshalJSON() ([]byte, error)
func (TestPolicy) Rebuild ¶
func (tp TestPolicy) Rebuild() BasePolicy
func (*TestPolicy) UnpackBSON ¶
func (tp *TestPolicy) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*TestPolicy) UnpackJSON ¶
func (tp *TestPolicy) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type TestPolicyBSONUnpacker ¶
type TestPolicyBSONUnpacker struct {
VL int `bson:"value"`
}
type TestPolicyJSONPacker ¶
type TestPolicyJSONPacker struct { jsonenc.HintedHead VL int `json:"value"` }
type TestPolicyJSONUnpacker ¶
type TestPolicyJSONUnpacker struct {
VL int `json:"value"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.