nft

package
v2.0.0-...-092c721 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ApproveFactHint = hint.MustNewHint("mitum-nft-approve-operation-fact-v0.0.1")
	ApproveHint     = hint.MustNewHint("mitum-nft-approve-operation-v0.0.1")
)
View Source
var (
	CreateCollectionFactHint = hint.MustNewHint("mitum-nft-create-collection-operation-fact-v0.0.1")
	CreateCollectionHint     = hint.MustNewHint("mitum-nft-create-collection-operation-v0.0.1")
)
View Source
var (
	DelegateFactHint = hint.MustNewHint("mitum-nft-delegate-operation-fact-v0.0.1")
	DelegateHint     = hint.MustNewHint("mitum-nft-delegate-operation-v0.0.1")
)
View Source
var (
	DelegateAllow  = DelegateMode("allow")
	DelegateCancel = DelegateMode("cancel")
)
View Source
var (
	MintFactHint = hint.MustNewHint("mitum-nft-mint-operation-fact-v0.0.1")
	MintHint     = hint.MustNewHint("mitum-nft-mint-operation-v0.0.1")
)
View Source
var (
	SignFactHint = hint.MustNewHint("mitum-nft-sign-operation-fact-v0.0.1")
	SignHint     = hint.MustNewHint("mitum-nft-sign-operation-v0.0.1")
)
View Source
var (
	TransferFactHint = hint.MustNewHint("mitum-nft-transfer-operation-fact-v0.0.1")
	TransferHint     = hint.MustNewHint("mitum-nft-transfer-operation-v0.0.1")
)
View Source
var (
	UpdateCollectionPolicyFactHint = hint.MustNewHint("mitum-nft-update-collection-policy-operation-fact-v0.0.1")
	UpdateCollectionPolicyHint     = hint.MustNewHint("mitum-nft-update-collection-policy-operation-v0.0.1")
)
View Source
var ApproveItemHint = hint.MustNewHint("mitum-nft-approve-item-v0.0.1")
View Source
var DelegateItemHint = hint.MustNewHint("mitum-nft-delegate-item-v0.0.1")
View Source
var MaxApproveItems = 100
View Source
var MaxDelegateItems = 100
View Source
var MaxMintItems = 100
View Source
var MaxSignItems = 100
View Source
var MaxTransferItems = 100
View Source
var MintItemHint = hint.MustNewHint("mitum-nft-mint-item-v0.0.1")
View Source
var SignItemHint = hint.MustNewHint("mitum-nft-sign-item-v0.0.1")
View Source
var TransferItemHint = hint.MustNewHint("mitum-nft-transfer-item-v0.0.1")

Functions

func CalculateCollectionItemsFee

func CalculateCollectionItemsFee(getStateFunc mitumbase.GetStateFunc, items []CollectionItem) (
	map[currencytypes.CurrencyID]mitumbase.State, map[currencytypes.CurrencyID][2]common.Big, error)

func NewApproveProcessor

func NewApproveProcessor() currencytypes.GetNewProcessor

func NewCreateCollectionProcessor

func NewCreateCollectionProcessor() currencytypes.GetNewProcessor

func NewDelegateProcessor

func NewDelegateProcessor() currencytypes.GetNewProcessor

func NewMintProcessor

func NewMintProcessor() currencytypes.GetNewProcessor

func NewSignProcessor

func NewSignProcessor() currencytypes.GetNewProcessor

func NewTransferProcessor

func NewTransferProcessor() currencytypes.GetNewProcessor

func NewUpdateCollectionPolicyProcessor

func NewUpdateCollectionPolicyProcessor() currencytypes.GetNewProcessor

Types

type Approve

type Approve struct {
	common.BaseOperation
}

func NewApprove

func NewApprove(fact ApproveFact) (Approve, error)

func (*Approve) DecodeBSON

func (op *Approve) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Approve) DecodeJSON

func (op *Approve) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Approve) MarshalBSON

func (op Approve) MarshalBSON() ([]byte, error)

func (Approve) MarshalJSON

func (op Approve) MarshalJSON() ([]byte, error)

type ApproveFact

type ApproveFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewApproveFact

func NewApproveFact(token []byte, sender mitumbase.Address, items []ApproveItem) ApproveFact

func (ApproveFact) Addresses

func (fact ApproveFact) Addresses() ([]mitumbase.Address, error)

func (ApproveFact) Bytes

func (fact ApproveFact) Bytes() []byte

func (*ApproveFact) DecodeBSON

func (fact *ApproveFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*ApproveFact) DecodeJSON

func (fact *ApproveFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (ApproveFact) GenerateHash

func (fact ApproveFact) GenerateHash() util.Hash

func (ApproveFact) Hash

func (fact ApproveFact) Hash() util.Hash

func (ApproveFact) IsValid

func (fact ApproveFact) IsValid(b []byte) error

func (ApproveFact) Items

func (fact ApproveFact) Items() []ApproveItem

func (ApproveFact) MarshalBSON

func (fact ApproveFact) MarshalBSON() ([]byte, error)

func (ApproveFact) MarshalJSON

func (fact ApproveFact) MarshalJSON() ([]byte, error)

func (ApproveFact) Sender

func (fact ApproveFact) Sender() mitumbase.Address

func (ApproveFact) Token

func (fact ApproveFact) Token() mitumbase.Token

type ApproveFactBSONUnmarshaler

type ApproveFactBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Sender string   `bson:"sender"`
	Items  bson.Raw `bson:"items"`
}

type ApproveFactJSONMarshaler

type ApproveFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender mitumbase.Address `json:"sender"`
	Items  []ApproveItem     `json:"items"`
}

type ApproveFactJSONUnmarshaler

type ApproveFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender string          `json:"sender"`
	Items  json.RawMessage `json:"items"`
}

type ApproveItem

type ApproveItem struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewApproveItem

func NewApproveItem(contract mitumbase.Address, approved mitumbase.Address, idx uint64, currency types.CurrencyID) ApproveItem

func (ApproveItem) Addresses

func (it ApproveItem) Addresses() ([]mitumbase.Address, error)

func (ApproveItem) Approved

func (it ApproveItem) Approved() mitumbase.Address

func (ApproveItem) Bytes

func (it ApproveItem) Bytes() []byte

func (ApproveItem) Contract

func (it ApproveItem) Contract() mitumbase.Address

func (ApproveItem) Currency

func (it ApproveItem) Currency() types.CurrencyID

func (*ApproveItem) DecodeBSON

func (it *ApproveItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*ApproveItem) DecodeJSON

func (it *ApproveItem) DecodeJSON(b []byte, enc encoder.Encoder) error

func (ApproveItem) IsValid

func (it ApproveItem) IsValid([]byte) error

func (ApproveItem) MarshalBSON

func (it ApproveItem) MarshalBSON() ([]byte, error)

func (ApproveItem) MarshalJSON

func (it ApproveItem) MarshalJSON() ([]byte, error)

func (ApproveItem) NFT

func (it ApproveItem) NFT() uint64

type ApproveItemBSONUnmarshaler

type ApproveItemBSONUnmarshaler struct {
	Hint     string `bson:"_hint"`
	Contract string `bson:"contract"`
	Approved string `bson:"approved"`
	NFTidx   uint64 `bson:"nftidx"`
	Currency string `bson:"currency"`
}

type ApproveItemJSONMarshaler

type ApproveItemJSONMarshaler struct {
	hint.BaseHinter
	Contract mitumbase.Address `json:"contract"`
	Approved mitumbase.Address `json:"approved"`
	NFTidx   uint64            `json:"nftidx"`
	Currency types.CurrencyID  `json:"currency"`
}

type ApproveItemJSONUnmarshaler

type ApproveItemJSONUnmarshaler struct {
	Hint     hint.Hint `json:"_hint"`
	Contract string    `json:"contract"`
	Approved string    `json:"approved"`
	NFTidx   uint64    `json:"nftidx"`
	Currency string    `json:"currency"`
}

type ApproveItemProcessor

type ApproveItemProcessor struct {
	// contains filtered or unexported fields
}

func (*ApproveItemProcessor) Close

func (ipp *ApproveItemProcessor) Close()

func (*ApproveItemProcessor) PreProcess

func (ipp *ApproveItemProcessor) PreProcess(
	ctx context.Context, op mitumbase.Operation, getStateFunc mitumbase.GetStateFunc,
) error

func (*ApproveItemProcessor) Process

type ApproveProcessor

type ApproveProcessor struct {
	*mitumbase.BaseOperationProcessor
}

func (*ApproveProcessor) Close

func (opp *ApproveProcessor) Close() error

func (*ApproveProcessor) PreProcess

type CollectionItem

type CollectionItem interface {
	util.Byter
	util.IsValider
	Currency() currencytypes.CurrencyID
}

type CreateCollection

type CreateCollection struct {
	common.BaseOperation
}

func NewCreateCollection

func NewCreateCollection(fact CreateCollectionFact) (CreateCollection, error)

func (*CreateCollection) DecodeBSON

func (op *CreateCollection) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*CreateCollection) DecodeJSON

func (op *CreateCollection) DecodeJSON(b []byte, enc encoder.Encoder) error

func (CreateCollection) MarshalBSON

func (op CreateCollection) MarshalBSON() ([]byte, error)

func (CreateCollection) MarshalJSON

func (op CreateCollection) MarshalJSON() ([]byte, error)

type CreateCollectionFact

type CreateCollectionFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewCreateCollectionFact

func NewCreateCollectionFact(
	token []byte,
	sender mitumbase.Address,
	contract mitumbase.Address,
	name types.CollectionName,
	royalty types.PaymentParameter,
	uri types.URI,
	whitelist []mitumbase.Address,
	currency currencytypes.CurrencyID,
) CreateCollectionFact

func (CreateCollectionFact) Addresses

func (fact CreateCollectionFact) Addresses() ([]mitumbase.Address, error)

func (CreateCollectionFact) Bytes

func (fact CreateCollectionFact) Bytes() []byte

func (CreateCollectionFact) Contract

func (fact CreateCollectionFact) Contract() mitumbase.Address

func (CreateCollectionFact) Currency

func (*CreateCollectionFact) DecodeBSON

func (fact *CreateCollectionFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*CreateCollectionFact) DecodeJSON

func (fact *CreateCollectionFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (CreateCollectionFact) GenerateHash

func (fact CreateCollectionFact) GenerateHash() util.Hash

func (CreateCollectionFact) Hash

func (fact CreateCollectionFact) Hash() util.Hash

func (CreateCollectionFact) IsValid

func (fact CreateCollectionFact) IsValid(b []byte) error

func (CreateCollectionFact) MarshalBSON

func (fact CreateCollectionFact) MarshalBSON() ([]byte, error)

func (CreateCollectionFact) MarshalJSON

func (fact CreateCollectionFact) MarshalJSON() ([]byte, error)

func (CreateCollectionFact) Name

func (CreateCollectionFact) Royalty

func (CreateCollectionFact) Sender

func (fact CreateCollectionFact) Sender() mitumbase.Address

func (CreateCollectionFact) Token

func (fact CreateCollectionFact) Token() mitumbase.Token

func (CreateCollectionFact) URI

func (fact CreateCollectionFact) URI() types.URI

func (CreateCollectionFact) WhiteList

func (fact CreateCollectionFact) WhiteList() []mitumbase.Address

type CreateCollectionFactBSONUnmarshaler

type CreateCollectionFactBSONUnmarshaler struct {
	Hint      string   `bson:"_hint"`
	Sender    string   `bson:"sender"`
	Contract  string   `bson:"contract"`
	Name      string   `bson:"name"`
	Royalty   uint     `bson:"royalty"`
	URI       string   `bson:"uri"`
	Whitelist []string `bson:"whitelist"`
	Currency  string   `bson:"currency"`
}

type CreateCollectionFactJSONMarshaler

type CreateCollectionFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender    mitumbase.Address        `json:"sender"`
	Contract  mitumbase.Address        `json:"contract"`
	Name      types.CollectionName     `json:"name"`
	Royalty   types.PaymentParameter   `json:"royalty"`
	URI       types.URI                `json:"uri"`
	Whitelist []mitumbase.Address      `json:"whitelist"`
	Currency  currencytypes.CurrencyID `json:"currency"`
}

type CreateCollectionFactJSONUnmarshaler

type CreateCollectionFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender    string   `json:"sender"`
	Contract  string   `json:"contract"`
	Name      string   `json:"name"`
	Royalty   uint     `json:"royalty"`
	URI       string   `json:"uri"`
	Whitelist []string `json:"whitelist"`
	Currency  string   `json:"currency"`
}

type CreateCollectionProcessor

type CreateCollectionProcessor struct {
	*mitumbase.BaseOperationProcessor
}

func (*CreateCollectionProcessor) Close

func (opp *CreateCollectionProcessor) Close() error

func (*CreateCollectionProcessor) PreProcess

type Delegate

type Delegate struct {
	common.BaseOperation
}

func NewDelegate

func NewDelegate(fact DelegateFact) (Delegate, error)

func (*Delegate) DecodeBSON

func (op *Delegate) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Delegate) DecodeJSON

func (op *Delegate) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Delegate) MarshalBSON

func (op Delegate) MarshalBSON() ([]byte, error)

func (Delegate) MarshalJSON

func (op Delegate) MarshalJSON() ([]byte, error)

type DelegateFact

type DelegateFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewDelegateFact

func NewDelegateFact(token []byte, sender mitumbase.Address, items []DelegateItem) DelegateFact

func (DelegateFact) Addresses

func (fact DelegateFact) Addresses() ([]mitumbase.Address, error)

func (DelegateFact) Bytes

func (fact DelegateFact) Bytes() []byte

func (*DelegateFact) DecodeBSON

func (fact *DelegateFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DelegateFact) DecodeJSON

func (fact *DelegateFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DelegateFact) GenerateHash

func (fact DelegateFact) GenerateHash() util.Hash

func (DelegateFact) Hash

func (fact DelegateFact) Hash() util.Hash

func (DelegateFact) IsValid

func (fact DelegateFact) IsValid(b []byte) error

func (DelegateFact) Items

func (fact DelegateFact) Items() []DelegateItem

func (DelegateFact) MarshalBSON

func (fact DelegateFact) MarshalBSON() ([]byte, error)

func (DelegateFact) MarshalJSON

func (fact DelegateFact) MarshalJSON() ([]byte, error)

func (DelegateFact) Sender

func (fact DelegateFact) Sender() mitumbase.Address

func (DelegateFact) Token

func (fact DelegateFact) Token() mitumbase.Token

type DelegateFactBSONUnmarshaler

type DelegateFactBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Sender string   `bson:"sender"`
	Items  bson.Raw `bson:"items"`
}

type DelegateFactJSONMarshaler

type DelegateFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender mitumbase.Address `json:"sender"`
	Items  []DelegateItem    `json:"items"`
}

type DelegateFactJSONUnmarshaler

type DelegateFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender string          `json:"sender"`
	Items  json.RawMessage `json:"items"`
}

type DelegateItem

type DelegateItem struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDelegateItem

func NewDelegateItem(contract mitumbase.Address, operator mitumbase.Address, mode DelegateMode, currency types.CurrencyID) DelegateItem

func (DelegateItem) Addresses

func (it DelegateItem) Addresses() ([]mitumbase.Address, error)

func (DelegateItem) Bytes

func (it DelegateItem) Bytes() []byte

func (DelegateItem) Contract

func (it DelegateItem) Contract() mitumbase.Address

func (DelegateItem) Currency

func (it DelegateItem) Currency() types.CurrencyID

func (*DelegateItem) DecodeBSON

func (it *DelegateItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DelegateItem) DecodeJSON

func (it *DelegateItem) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DelegateItem) Delegatee

func (it DelegateItem) Delegatee() mitumbase.Address

func (DelegateItem) IsValid

func (it DelegateItem) IsValid([]byte) error

func (DelegateItem) MarshalBSON

func (it DelegateItem) MarshalBSON() ([]byte, error)

func (DelegateItem) MarshalJSON

func (it DelegateItem) MarshalJSON() ([]byte, error)

func (DelegateItem) Mode

func (it DelegateItem) Mode() DelegateMode

type DelegateItemBSONUnmarshaler

type DelegateItemBSONUnmarshaler struct {
	Hint      string `bson:"_hint"`
	Contract  string `bson:"contract"`
	Delegatee string `bson:"delegatee"`
	Mode      string `bson:"mode"`
	Currency  string `bson:"currency"`
}

type DelegateItemJSONMarshaler

type DelegateItemJSONMarshaler struct {
	hint.BaseHinter
	Contract  mitumbase.Address `json:"contract"`
	Delegatee mitumbase.Address `json:"delegatee"`
	Mode      DelegateMode      `json:"mode"`
	Currency  types.CurrencyID  `json:"currency"`
}

type DelegateItemJSONUnmarshaler

type DelegateItemJSONUnmarshaler struct {
	Hint      hint.Hint `json:"_hint"`
	Contract  string    `json:"contract"`
	Delegatee string    `json:"delegatee"`
	Mode      string    `json:"mode"`
	Currency  string    `json:"currency"`
}

type DelegateItemProcessor

type DelegateItemProcessor struct {
	// contains filtered or unexported fields
}

func (*DelegateItemProcessor) Close

func (ipp *DelegateItemProcessor) Close()

func (*DelegateItemProcessor) PreProcess

func (ipp *DelegateItemProcessor) PreProcess(
	ctx context.Context, op mitumbase.Operation, getStateFunc mitumbase.GetStateFunc,
) error

func (*DelegateItemProcessor) Process

type DelegateMode

type DelegateMode string

func (DelegateMode) Bytes

func (mode DelegateMode) Bytes() []byte

func (DelegateMode) Equal

func (mode DelegateMode) Equal(cmode DelegateMode) bool

func (DelegateMode) IsValid

func (mode DelegateMode) IsValid([]byte) error

func (DelegateMode) String

func (mode DelegateMode) String() string

type DelegateProcessor

type DelegateProcessor struct {
	*mitumbase.BaseOperationProcessor
}

func (*DelegateProcessor) Close

func (opp *DelegateProcessor) Close() error

func (*DelegateProcessor) PreProcess

type Mint

type Mint struct {
	common.BaseOperation
}

func NewMint

func NewMint(fact MintFact) (Mint, error)

func (*Mint) DecodeBSON

func (op *Mint) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Mint) DecodeJSON

func (op *Mint) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Mint) MarshalBSON

func (op Mint) MarshalBSON() ([]byte, error)

func (Mint) MarshalJSON

func (op Mint) MarshalJSON() ([]byte, error)

type MintFact

type MintFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewMintFact

func NewMintFact(token []byte, sender mitumbase.Address, items []MintItem) MintFact

func (MintFact) Addresses

func (fact MintFact) Addresses() ([]mitumbase.Address, error)

func (MintFact) Bytes

func (fact MintFact) Bytes() []byte

func (*MintFact) DecodeBSON

func (fact *MintFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*MintFact) DecodeJSON

func (fact *MintFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (MintFact) GenerateHash

func (fact MintFact) GenerateHash() util.Hash

func (MintFact) Hash

func (fact MintFact) Hash() util.Hash

func (MintFact) IsValid

func (fact MintFact) IsValid(b []byte) error

func (MintFact) Items

func (fact MintFact) Items() []MintItem

func (MintFact) MarshalBSON

func (fact MintFact) MarshalBSON() ([]byte, error)

func (MintFact) MarshalJSON

func (fact MintFact) MarshalJSON() ([]byte, error)

func (MintFact) Sender

func (fact MintFact) Sender() mitumbase.Address

func (MintFact) Token

func (fact MintFact) Token() mitumbase.Token

type MintFactBSONUnmarshaler

type MintFactBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Sender string   `bson:"sender"`
	Items  bson.Raw `bson:"items"`
}

type MintFactJSONMarshaler

type MintFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender mitumbase.Address `json:"sender"`
	Items  []MintItem        `json:"items"`
}

type MintFactJSONUnmarshaler

type MintFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender string          `json:"sender"`
	Items  json.RawMessage `json:"items"`
}

type MintItem

type MintItem struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewMintItem

func NewMintItem(
	contract mitumbase.Address,
	receiver mitumbase.Address,
	hash types.NFTHash,
	uri types.URI,
	creators types.Signers,
	currency currencytypes.CurrencyID,
) MintItem

func (MintItem) Addresses

func (it MintItem) Addresses() ([]mitumbase.Address, error)

func (MintItem) Bytes

func (it MintItem) Bytes() []byte

func (MintItem) Contract

func (it MintItem) Contract() mitumbase.Address

func (MintItem) Creators

func (it MintItem) Creators() types.Signers

func (MintItem) Currency

func (it MintItem) Currency() currencytypes.CurrencyID

func (*MintItem) DecodeBSON

func (it *MintItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*MintItem) DecodeJSON

func (it *MintItem) DecodeJSON(b []byte, enc encoder.Encoder) error

func (MintItem) IsValid

func (it MintItem) IsValid([]byte) error

func (MintItem) MarshalBSON

func (it MintItem) MarshalBSON() ([]byte, error)

func (MintItem) MarshalJSON

func (it MintItem) MarshalJSON() ([]byte, error)

func (MintItem) NFTHash

func (it MintItem) NFTHash() types.NFTHash

func (MintItem) Receiver

func (it MintItem) Receiver() mitumbase.Address

func (MintItem) URI

func (it MintItem) URI() types.URI

type MintItemBSONUnmarshaler

type MintItemBSONUnmarshaler struct {
	Hint     string   `bson:"_hint"`
	Contract string   `bson:"contract"`
	Receiver string   `bson:"receiver"`
	Hash     string   `bson:"hash"`
	Uri      string   `bson:"uri"`
	Creators bson.Raw `bson:"creators"`
	Currency string   `bson:"currency"`
}

type MintItemJSONMarshaler

type MintItemJSONMarshaler struct {
	hint.BaseHinter
	Contract mitumbase.Address        `json:"contract"`
	Receiver mitumbase.Address        `json:"receiver"`
	Hash     types.NFTHash            `json:"hash"`
	Uri      types.URI                `json:"uri"`
	Creators types.Signers            `json:"creators"`
	Currency currencytypes.CurrencyID `json:"currency"`
}

type MintItemJSONUnmarshaler

type MintItemJSONUnmarshaler struct {
	Hint     hint.Hint       `json:"_hint"`
	Contract string          `json:"contract"`
	Receiver string          `json:"receiver"`
	Hash     string          `json:"hash"`
	Uri      string          `json:"uri"`
	Creators json.RawMessage `json:"creators"`
	Currency string          `json:"currency"`
}

type MintItemProcessor

type MintItemProcessor struct {
	// contains filtered or unexported fields
}

func (*MintItemProcessor) Close

func (ipp *MintItemProcessor) Close()

func (*MintItemProcessor) PreProcess

func (ipp *MintItemProcessor) PreProcess(
	_ context.Context, _ base.Operation, getStateFunc base.GetStateFunc,
) error

func (*MintItemProcessor) Process

func (ipp *MintItemProcessor) Process(
	_ context.Context, _ base.Operation, getStateFunc base.GetStateFunc,
) ([]base.StateMergeValue, error)

type MintProcessor

type MintProcessor struct {
	*base.BaseOperationProcessor
}

func (*MintProcessor) Close

func (opp *MintProcessor) Close() error

func (*MintProcessor) PreProcess

func (*MintProcessor) Process

type Sign

type Sign struct {
	common.BaseOperation
}

func NewSign

func NewSign(fact SignFact) (Sign, error)

func (*Sign) DecodeBSON

func (op *Sign) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Sign) DecodeJSON

func (op *Sign) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Sign) MarshalBSON

func (op Sign) MarshalBSON() ([]byte, error)

func (Sign) MarshalJSON

func (op Sign) MarshalJSON() ([]byte, error)

type SignFact

type SignFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewSignFact

func NewSignFact(token []byte, sender mitumbase.Address, items []SignItem) SignFact

func (SignFact) Addresses

func (fact SignFact) Addresses() ([]mitumbase.Address, error)

func (SignFact) Bytes

func (fact SignFact) Bytes() []byte

func (*SignFact) DecodeBSON

func (fact *SignFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*SignFact) DecodeJSON

func (fact *SignFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (SignFact) GenerateHash

func (fact SignFact) GenerateHash() util.Hash

func (SignFact) Hash

func (fact SignFact) Hash() util.Hash

func (SignFact) IsValid

func (fact SignFact) IsValid(b []byte) error

func (SignFact) Items

func (fact SignFact) Items() []SignItem

func (SignFact) MarshalBSON

func (fact SignFact) MarshalBSON() ([]byte, error)

func (SignFact) MarshalJSON

func (fact SignFact) MarshalJSON() ([]byte, error)

func (SignFact) Sender

func (fact SignFact) Sender() mitumbase.Address

func (SignFact) Token

func (fact SignFact) Token() mitumbase.Token

type SignFactBSONUnmarshaler

type SignFactBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Sender string   `bson:"sender"`
	Items  bson.Raw `bson:"items"`
}

type SignFactJSONMarshaler

type SignFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender mitumbase.Address `json:"sender"`
	Items  []SignItem        `json:"items"`
}

type SignFactJSONUnmarshaler

type SignFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender string          `json:"sender"`
	Items  json.RawMessage `json:"items"`
}

type SignItem

type SignItem struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewSignItem

func NewSignItem(contract mitumbase.Address, n uint64, currency types.CurrencyID) SignItem

func (SignItem) Bytes

func (it SignItem) Bytes() []byte

func (SignItem) Contract

func (it SignItem) Contract() mitumbase.Address

func (SignItem) Currency

func (it SignItem) Currency() types.CurrencyID

func (*SignItem) DecodeBSON

func (it *SignItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*SignItem) DecodeJSON

func (it *SignItem) DecodeJSON(b []byte, enc encoder.Encoder) error

func (SignItem) IsValid

func (it SignItem) IsValid([]byte) error

func (SignItem) MarshalBSON

func (it SignItem) MarshalBSON() ([]byte, error)

func (SignItem) MarshalJSON

func (it SignItem) MarshalJSON() ([]byte, error)

func (SignItem) NFT

func (it SignItem) NFT() uint64

type SignItemBSONUnmarshaler

type SignItemBSONUnmarshaler struct {
	Hint     string `bson:"_hint"`
	Contract string `bson:"contract"`
	NFT      uint64 `bson:"nft"`
	Currency string `bson:"currency"`
}

type SignItemJSONMarshaler

type SignItemJSONMarshaler struct {
	hint.BaseHinter
	Contract mitumbase.Address `json:"contract"`
	NFT      uint64            `json:"nft"`
	Currency types.CurrencyID  `json:"currency"`
}

type SignItemJSONUnmarshaler

type SignItemJSONUnmarshaler struct {
	Hint     hint.Hint `json:"_hint"`
	Contract string    `json:"contract"`
	NFT      uint64    `json:"nft"`
	Currency string    `json:"currency"`
}

type SignItemProcessor

type SignItemProcessor struct {
	// contains filtered or unexported fields
}

func (*SignItemProcessor) Close

func (ipp *SignItemProcessor) Close()

func (*SignItemProcessor) PreProcess

func (ipp *SignItemProcessor) PreProcess(
	ctx context.Context, op mitumbase.Operation, getStateFunc mitumbase.GetStateFunc,
) error

func (*SignItemProcessor) Process

type SignProcessor

type SignProcessor struct {
	*mitumbase.BaseOperationProcessor
}

func (*SignProcessor) Close

func (opp *SignProcessor) Close() error

func (*SignProcessor) PreProcess

type Transfer

type Transfer struct {
	common.BaseOperation
}

func NewTransfer

func NewTransfer(fact TransferFact) (Transfer, error)

func (*Transfer) DecodeBSON

func (op *Transfer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Transfer) DecodeJSON

func (op *Transfer) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Transfer) MarshalBSON

func (op Transfer) MarshalBSON() ([]byte, error)

func (Transfer) MarshalJSON

func (op Transfer) MarshalJSON() ([]byte, error)

type TransferFact

type TransferFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewTransferFact

func NewTransferFact(token []byte, sender mitumbase.Address, items []TransferItem) TransferFact

func (TransferFact) Addresses

func (fact TransferFact) Addresses() ([]mitumbase.Address, error)

func (TransferFact) Bytes

func (fact TransferFact) Bytes() []byte

func (*TransferFact) DecodeBSON

func (fact *TransferFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*TransferFact) DecodeJSON

func (fact *TransferFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (TransferFact) GenerateHash

func (fact TransferFact) GenerateHash() util.Hash

func (TransferFact) Hash

func (fact TransferFact) Hash() util.Hash

func (TransferFact) IsValid

func (fact TransferFact) IsValid(b []byte) error

func (TransferFact) Items

func (fact TransferFact) Items() []TransferItem

func (TransferFact) MarshalBSON

func (fact TransferFact) MarshalBSON() ([]byte, error)

func (TransferFact) MarshalJSON

func (fact TransferFact) MarshalJSON() ([]byte, error)

func (TransferFact) Sender

func (fact TransferFact) Sender() mitumbase.Address

func (TransferFact) Token

func (fact TransferFact) Token() mitumbase.Token

type TransferFactBSONUnmarshaler

type TransferFactBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Sender string   `bson:"sender"`
	Items  bson.Raw `bson:"items"`
}

type TransferFactJSONMarshaler

type TransferFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender mitumbase.Address `json:"sender"`
	Items  []TransferItem    `json:"items"`
}

type TransferFactJSONUnmarshaler

type TransferFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender string          `json:"sender"`
	Items  json.RawMessage `json:"items"`
}

type TransferItem

type TransferItem struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewTransferItem

func NewTransferItem(contract mitumbase.Address, receiver mitumbase.Address, nft uint64, currency types.CurrencyID) TransferItem

func (TransferItem) Addresses

func (it TransferItem) Addresses() ([]mitumbase.Address, error)

func (TransferItem) Bytes

func (it TransferItem) Bytes() []byte

func (TransferItem) Contract

func (it TransferItem) Contract() mitumbase.Address

func (TransferItem) Currency

func (it TransferItem) Currency() types.CurrencyID

func (*TransferItem) DecodeBSON

func (it *TransferItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*TransferItem) DecodeJSON

func (it *TransferItem) DecodeJSON(b []byte, enc encoder.Encoder) error

func (TransferItem) IsValid

func (it TransferItem) IsValid([]byte) error

func (TransferItem) MarshalBSON

func (it TransferItem) MarshalBSON() ([]byte, error)

func (TransferItem) MarshalJSON

func (it TransferItem) MarshalJSON() ([]byte, error)

func (TransferItem) NFT

func (it TransferItem) NFT() uint64

func (TransferItem) Receiver

func (it TransferItem) Receiver() mitumbase.Address

type TransferItemBSONUnmarshaler

type TransferItemBSONUnmarshaler struct {
	Hint     string `bson:"_hint"`
	Contract string `bson:"contract"`
	Receiver string `bson:"receiver"`
	NFTidx   uint64 `bson:"nft"`
	Currency string `bson:"currency"`
}

type TransferItemJSONMarshaler

type TransferItemJSONMarshaler struct {
	hint.BaseHinter
	Contract mitumbase.Address `json:"contract"`
	Receiver mitumbase.Address `json:"receiver"`
	NFTidx   uint64            `json:"nft"`
	Currency types.CurrencyID  `json:"currency"`
}

type TransferItemJSONUnmarshaler

type TransferItemJSONUnmarshaler struct {
	Hint     hint.Hint `json:"_hint"`
	Contract string    `json:"contract"`
	Receiver string    `json:"receiver"`
	NFTidx   uint64    `json:"nft"`
	Currency string    `json:"currency"`
}

type TransferItemProcessor

type TransferItemProcessor struct {
	// contains filtered or unexported fields
}

func (*TransferItemProcessor) Close

func (ipp *TransferItemProcessor) Close()

func (*TransferItemProcessor) PreProcess

func (ipp *TransferItemProcessor) PreProcess(
	ctx context.Context, op mitumbase.Operation, getStateFunc mitumbase.GetStateFunc,
) error

func (*TransferItemProcessor) Process

type TransferProcessor

type TransferProcessor struct {
	*mitumbase.BaseOperationProcessor
}

func (*TransferProcessor) Close

func (opp *TransferProcessor) Close() error

func (*TransferProcessor) PreProcess

type UpdateCollectionPolicy

type UpdateCollectionPolicy struct {
	common.BaseOperation
}

func (*UpdateCollectionPolicy) DecodeBSON

func (op *UpdateCollectionPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*UpdateCollectionPolicy) DecodeJSON

func (op *UpdateCollectionPolicy) DecodeJSON(b []byte, enc encoder.Encoder) error

func (UpdateCollectionPolicy) MarshalBSON

func (op UpdateCollectionPolicy) MarshalBSON() ([]byte, error)

func (UpdateCollectionPolicy) MarshalJSON

func (op UpdateCollectionPolicy) MarshalJSON() ([]byte, error)

type UpdateCollectionPolicyFact

type UpdateCollectionPolicyFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewUpdateCollectionPolicyFact

func NewUpdateCollectionPolicyFact(
	token []byte,
	sender, contract mitumbase.Address,
	name types.CollectionName,
	royalty types.PaymentParameter,
	uri types.URI,
	whitelist []mitumbase.Address,
	currency currencytypes.CurrencyID,
) UpdateCollectionPolicyFact

func (UpdateCollectionPolicyFact) Addresses

func (fact UpdateCollectionPolicyFact) Addresses() ([]mitumbase.Address, error)

func (UpdateCollectionPolicyFact) Bytes

func (fact UpdateCollectionPolicyFact) Bytes() []byte

func (UpdateCollectionPolicyFact) Contract

func (UpdateCollectionPolicyFact) Currency

func (*UpdateCollectionPolicyFact) DecodeBSON

func (fact *UpdateCollectionPolicyFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*UpdateCollectionPolicyFact) DecodeJSON

func (fact *UpdateCollectionPolicyFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (UpdateCollectionPolicyFact) GenerateHash

func (fact UpdateCollectionPolicyFact) GenerateHash() util.Hash

func (UpdateCollectionPolicyFact) Hash

func (fact UpdateCollectionPolicyFact) Hash() util.Hash

func (UpdateCollectionPolicyFact) IsValid

func (fact UpdateCollectionPolicyFact) IsValid(b []byte) error

func (UpdateCollectionPolicyFact) MarshalBSON

func (fact UpdateCollectionPolicyFact) MarshalBSON() ([]byte, error)

func (UpdateCollectionPolicyFact) MarshalJSON

func (fact UpdateCollectionPolicyFact) MarshalJSON() ([]byte, error)

func (UpdateCollectionPolicyFact) Name

func (UpdateCollectionPolicyFact) Royalty

func (UpdateCollectionPolicyFact) Sender

func (UpdateCollectionPolicyFact) Token

func (UpdateCollectionPolicyFact) URI

func (UpdateCollectionPolicyFact) Whitelist

func (fact UpdateCollectionPolicyFact) Whitelist() []mitumbase.Address

type UpdateCollectionPolicyFactBSONUnmarshaler

type UpdateCollectionPolicyFactBSONUnmarshaler struct {
	Hint      string   `bson:"_hint"`
	Sender    string   `bson:"sender"`
	Contract  string   `bson:"contract"`
	Name      string   `bson:"name"`
	Royalty   uint     `bson:"royalty"`
	URI       string   `bson:"uri"`
	Whitelist []string `bson:"whitelist"`
	Currency  string   `bson:"currency"`
}

type UpdateCollectionPolicyFactJSONMarshaler

type UpdateCollectionPolicyFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender    mitumbase.Address        `json:"sender"`
	Contract  mitumbase.Address        `json:"contract"`
	Name      types.CollectionName     `json:"name"`
	Royalty   types.PaymentParameter   `json:"royalty"`
	URI       types.URI                `json:"uri"`
	Whitelist []mitumbase.Address      `json:"whitelist"`
	Currency  currencytypes.CurrencyID `json:"currency"`
}

type UpdateCollectionPolicyFactJSONUnmarshaler

type UpdateCollectionPolicyFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender    string   `json:"sender"`
	Contract  string   `json:"contract"`
	Name      string   `json:"name"`
	Royalty   uint     `json:"royalty"`
	URI       string   `json:"uri"`
	Whitelist []string `json:"whitelist"`
	Currency  string   `json:"currency"`
}

type UpdateCollectionPolicyProcessor

type UpdateCollectionPolicyProcessor struct {
	*mitumbase.BaseOperationProcessor
}

func (*UpdateCollectionPolicyProcessor) Close

func (*UpdateCollectionPolicyProcessor) PreProcess

func (*UpdateCollectionPolicyProcessor) Process

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL