nft

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_nft_proto protoreflect.FileDescriptor

Functions

func NewNftEndpoints

func NewNftEndpoints() []*api.Endpoint

func RegisterNftHandler

func RegisterNftHandler(s server.Server, hdlr NftHandler, opts ...server.HandlerOption) error

Types

type Asset

type Asset struct {

	// id of the asset
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// the token id
	TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
	// name of the asset
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// related description
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// the image url
	ImageUrl string `protobuf:"bytes,5,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	// number of sales
	Sales int32 `protobuf:"varint,6,opt,name=sales,proto3" json:"sales,omitempty"`
	// the permalink
	Permalink string `protobuf:"bytes,7,opt,name=permalink,proto3" json:"permalink,omitempty"`
	// asset contract
	Contract *Contract `protobuf:"bytes,8,opt,name=contract,proto3" json:"contract,omitempty"`
	// associated collection
	Collection *Collection `protobuf:"bytes,9,opt,name=collection,proto3" json:"collection,omitempty"`
	// Creator of the NFT
	Creator *User `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"`
	// Owner of the NFT
	Owner *User `protobuf:"bytes,11,opt,name=owner,proto3" json:"owner,omitempty"`
	// is it a presale
	Presale bool `protobuf:"varint,12,opt,name=presale,proto3" json:"presale,omitempty"`
	// last time sold
	LastSale *Sale `protobuf:"bytes,13,opt,name=last_sale,json=lastSale,proto3" json:"last_sale,omitempty"`
	// listing date
	ListingDate string `protobuf:"bytes,14,opt,name=listing_date,json=listingDate,proto3" json:"listing_date,omitempty"`
	// contains filtered or unexported fields
}

func (*Asset) Descriptor deprecated

func (*Asset) Descriptor() ([]byte, []int)

Deprecated: Use Asset.ProtoReflect.Descriptor instead.

func (*Asset) GetCollection

func (x *Asset) GetCollection() *Collection

func (*Asset) GetContract

func (x *Asset) GetContract() *Contract

func (*Asset) GetCreator

func (x *Asset) GetCreator() *User

func (*Asset) GetDescription

func (x *Asset) GetDescription() string

func (*Asset) GetId

func (x *Asset) GetId() int32

func (*Asset) GetImageUrl

func (x *Asset) GetImageUrl() string

func (*Asset) GetLastSale

func (x *Asset) GetLastSale() *Sale

func (*Asset) GetListingDate

func (x *Asset) GetListingDate() string

func (*Asset) GetName

func (x *Asset) GetName() string

func (*Asset) GetOwner

func (x *Asset) GetOwner() *User
func (x *Asset) GetPermalink() string

func (*Asset) GetPresale

func (x *Asset) GetPresale() bool

func (*Asset) GetSales

func (x *Asset) GetSales() int32

func (*Asset) GetTokenId

func (x *Asset) GetTokenId() string

func (*Asset) ProtoMessage

func (*Asset) ProtoMessage()

func (*Asset) ProtoReflect

func (x *Asset) ProtoReflect() protoreflect.Message

func (*Asset) Reset

func (x *Asset) Reset()

func (*Asset) String

func (x *Asset) String() string

type AssetsRequest

type AssetsRequest struct {

	// limit returned assets
	Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// offset for pagination
	Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// order "asc" or "desc"
	Order string `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"`
	// order by "sale_date", "sale_count", "sale_price", "total_price"
	OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	// limit to members of a collection by slug name (case sensitive)
	Collection string `protobuf:"bytes,5,opt,name=collection,proto3" json:"collection,omitempty"`
	// contains filtered or unexported fields
}

Return a list of NFT assets

func (*AssetsRequest) Descriptor deprecated

func (*AssetsRequest) Descriptor() ([]byte, []int)

Deprecated: Use AssetsRequest.ProtoReflect.Descriptor instead.

func (*AssetsRequest) GetCollection

func (x *AssetsRequest) GetCollection() string

func (*AssetsRequest) GetLimit

func (x *AssetsRequest) GetLimit() int32

func (*AssetsRequest) GetOffset

func (x *AssetsRequest) GetOffset() int32

func (*AssetsRequest) GetOrder

func (x *AssetsRequest) GetOrder() string

func (*AssetsRequest) GetOrderBy

func (x *AssetsRequest) GetOrderBy() string

func (*AssetsRequest) ProtoMessage

func (*AssetsRequest) ProtoMessage()

func (*AssetsRequest) ProtoReflect

func (x *AssetsRequest) ProtoReflect() protoreflect.Message

func (*AssetsRequest) Reset

func (x *AssetsRequest) Reset()

func (*AssetsRequest) String

func (x *AssetsRequest) String() string

type AssetsResponse

type AssetsResponse struct {

	// list of assets
	Assets []*Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"`
	// contains filtered or unexported fields
}

func (*AssetsResponse) Descriptor deprecated

func (*AssetsResponse) Descriptor() ([]byte, []int)

Deprecated: Use AssetsResponse.ProtoReflect.Descriptor instead.

func (*AssetsResponse) GetAssets

func (x *AssetsResponse) GetAssets() []*Asset

func (*AssetsResponse) ProtoMessage

func (*AssetsResponse) ProtoMessage()

func (*AssetsResponse) ProtoReflect

func (x *AssetsResponse) ProtoReflect() protoreflect.Message

func (*AssetsResponse) Reset

func (x *AssetsResponse) Reset()

func (*AssetsResponse) String

func (x *AssetsResponse) String() string

type Collection

type Collection struct {
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description   string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Slug          string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"`
	ImageUrl      string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	CreatedAt     string `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	PayoutAddress string `protobuf:"bytes,6,opt,name=payout_address,json=payoutAddress,proto3" json:"payout_address,omitempty"`
	// contains filtered or unexported fields
}

func (*Collection) Descriptor deprecated

func (*Collection) Descriptor() ([]byte, []int)

Deprecated: Use Collection.ProtoReflect.Descriptor instead.

func (*Collection) GetCreatedAt

func (x *Collection) GetCreatedAt() string

func (*Collection) GetDescription

func (x *Collection) GetDescription() string

func (*Collection) GetImageUrl

func (x *Collection) GetImageUrl() string

func (*Collection) GetName

func (x *Collection) GetName() string

func (*Collection) GetPayoutAddress

func (x *Collection) GetPayoutAddress() string

func (*Collection) GetSlug

func (x *Collection) GetSlug() string

func (*Collection) ProtoMessage

func (*Collection) ProtoMessage()

func (*Collection) ProtoReflect

func (x *Collection) ProtoReflect() protoreflect.Message

func (*Collection) Reset

func (x *Collection) Reset()

func (*Collection) String

func (x *Collection) String() string

type CollectionsRequest

type CollectionsRequest struct {
	Limit  int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

Get a list of collections

func (*CollectionsRequest) Descriptor deprecated

func (*CollectionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use CollectionsRequest.ProtoReflect.Descriptor instead.

func (*CollectionsRequest) GetLimit

func (x *CollectionsRequest) GetLimit() int32

func (*CollectionsRequest) GetOffset

func (x *CollectionsRequest) GetOffset() int32

func (*CollectionsRequest) ProtoMessage

func (*CollectionsRequest) ProtoMessage()

func (*CollectionsRequest) ProtoReflect

func (x *CollectionsRequest) ProtoReflect() protoreflect.Message

func (*CollectionsRequest) Reset

func (x *CollectionsRequest) Reset()

func (*CollectionsRequest) String

func (x *CollectionsRequest) String() string

type CollectionsResponse

type CollectionsResponse struct {
	Collections []*Collection `protobuf:"bytes,1,rep,name=collections,proto3" json:"collections,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectionsResponse) Descriptor deprecated

func (*CollectionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use CollectionsResponse.ProtoReflect.Descriptor instead.

func (*CollectionsResponse) GetCollections

func (x *CollectionsResponse) GetCollections() []*Collection

func (*CollectionsResponse) ProtoMessage

func (*CollectionsResponse) ProtoMessage()

func (*CollectionsResponse) ProtoReflect

func (x *CollectionsResponse) ProtoReflect() protoreflect.Message

func (*CollectionsResponse) Reset

func (x *CollectionsResponse) Reset()

func (*CollectionsResponse) String

func (x *CollectionsResponse) String() string

type Contract

type Contract struct {

	// name of contract
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ethereum address
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// type of contract e.g "semi-fungible"
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// timestamp of creation
	CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// owner id
	Owner int32 `protobuf:"varint,5,opt,name=owner,proto3" json:"owner,omitempty"`
	// aka "ERC1155"
	Schema string `protobuf:"bytes,6,opt,name=schema,proto3" json:"schema,omitempty"`
	// related symbol
	Symbol string `protobuf:"bytes,7,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// description of contract
	Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
	// payout address
	PayoutAddress string `protobuf:"bytes,9,opt,name=payout_address,json=payoutAddress,proto3" json:"payout_address,omitempty"`
	// seller fees
	SellerFees string `protobuf:"bytes,10,opt,name=seller_fees,json=sellerFees,proto3" json:"seller_fees,omitempty"`
	// contains filtered or unexported fields
}

func (*Contract) Descriptor deprecated

func (*Contract) Descriptor() ([]byte, []int)

Deprecated: Use Contract.ProtoReflect.Descriptor instead.

func (*Contract) GetAddress

func (x *Contract) GetAddress() string

func (*Contract) GetCreatedAt

func (x *Contract) GetCreatedAt() string

func (*Contract) GetDescription

func (x *Contract) GetDescription() string

func (*Contract) GetName

func (x *Contract) GetName() string

func (*Contract) GetOwner

func (x *Contract) GetOwner() int32

func (*Contract) GetPayoutAddress

func (x *Contract) GetPayoutAddress() string

func (*Contract) GetSchema

func (x *Contract) GetSchema() string

func (*Contract) GetSellerFees

func (x *Contract) GetSellerFees() string

func (*Contract) GetSymbol

func (x *Contract) GetSymbol() string

func (*Contract) GetType

func (x *Contract) GetType() string

func (*Contract) ProtoMessage

func (*Contract) ProtoMessage()

func (*Contract) ProtoReflect

func (x *Contract) ProtoReflect() protoreflect.Message

func (*Contract) Reset

func (x *Contract) Reset()

func (*Contract) String

func (x *Contract) String() string

type CreateRequest

type CreateRequest struct {

	// name of the NFT
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// description
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// image data
	Image []byte `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
	// data if not image
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Create your own NFT (coming soon)

func (*CreateRequest) Descriptor deprecated

func (*CreateRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetData

func (x *CreateRequest) GetData() []byte

func (*CreateRequest) GetDescription

func (x *CreateRequest) GetDescription() string

func (*CreateRequest) GetImage

func (x *CreateRequest) GetImage() []byte

func (*CreateRequest) GetName

func (x *CreateRequest) GetName() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

func (*CreateResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetAsset

func (x *CreateResponse) GetAsset() *Asset

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

func (x *CreateResponse) ProtoReflect() protoreflect.Message

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type NftService

type NftService interface {
	Assets(ctx context.Context, in *AssetsRequest, opts ...client.CallOption) (*AssetsResponse, error)
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	Collections(ctx context.Context, in *CollectionsRequest, opts ...client.CallOption) (*CollectionsResponse, error)
}

func NewNftService

func NewNftService(name string, c client.Client) NftService

type Sale

type Sale struct {
	AssetTokenId   string       `protobuf:"bytes,1,opt,name=asset_token_id,json=assetTokenId,proto3" json:"asset_token_id,omitempty"`
	AssetDecimals  int32        `protobuf:"varint,2,opt,name=asset_decimals,json=assetDecimals,proto3" json:"asset_decimals,omitempty"`
	EventType      string       `protobuf:"bytes,3,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"`
	EventTimestamp string       `protobuf:"bytes,4,opt,name=event_timestamp,json=eventTimestamp,proto3" json:"event_timestamp,omitempty"`
	TotalPrice     string       `protobuf:"bytes,5,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`
	Quantity       string       `protobuf:"bytes,6,opt,name=quantity,proto3" json:"quantity,omitempty"`
	CreatedAt      string       `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Transaction    *Transaction `protobuf:"bytes,8,opt,name=transaction,proto3" json:"transaction,omitempty"`
	PaymentToken   *Token       `protobuf:"bytes,9,opt,name=payment_token,json=paymentToken,proto3" json:"payment_token,omitempty"`
	// contains filtered or unexported fields
}

func (*Sale) Descriptor deprecated

func (*Sale) Descriptor() ([]byte, []int)

Deprecated: Use Sale.ProtoReflect.Descriptor instead.

func (*Sale) GetAssetDecimals

func (x *Sale) GetAssetDecimals() int32

func (*Sale) GetAssetTokenId

func (x *Sale) GetAssetTokenId() string

func (*Sale) GetCreatedAt

func (x *Sale) GetCreatedAt() string

func (*Sale) GetEventTimestamp

func (x *Sale) GetEventTimestamp() string

func (*Sale) GetEventType

func (x *Sale) GetEventType() string

func (*Sale) GetPaymentToken

func (x *Sale) GetPaymentToken() *Token

func (*Sale) GetQuantity

func (x *Sale) GetQuantity() string

func (*Sale) GetTotalPrice

func (x *Sale) GetTotalPrice() string

func (*Sale) GetTransaction

func (x *Sale) GetTransaction() *Transaction

func (*Sale) ProtoMessage

func (*Sale) ProtoMessage()

func (*Sale) ProtoReflect

func (x *Sale) ProtoReflect() protoreflect.Message

func (*Sale) Reset

func (x *Sale) Reset()

func (*Sale) String

func (x *Sale) String() string

type Token

type Token struct {
	Id       int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Symbol   string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Address  string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	ImageUrl string `protobuf:"bytes,5,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	Decimals int32  `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"`
	EthPrice string `protobuf:"bytes,7,opt,name=eth_price,json=ethPrice,proto3" json:"eth_price,omitempty"`
	UsdPrice string `protobuf:"bytes,8,opt,name=usd_price,json=usdPrice,proto3" json:"usd_price,omitempty"`
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

func (*Token) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAddress

func (x *Token) GetAddress() string

func (*Token) GetDecimals

func (x *Token) GetDecimals() int32

func (*Token) GetEthPrice

func (x *Token) GetEthPrice() string

func (*Token) GetId

func (x *Token) GetId() int32

func (*Token) GetImageUrl

func (x *Token) GetImageUrl() string

func (*Token) GetName

func (x *Token) GetName() string

func (*Token) GetSymbol

func (x *Token) GetSymbol() string

func (*Token) GetUsdPrice

func (x *Token) GetUsdPrice() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type Transaction

type Transaction struct {
	Id               int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Timestamp        string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	BlockHash        string `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
	BlockNumber      string `protobuf:"bytes,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	FromAccount      *User  `protobuf:"bytes,5,opt,name=from_account,json=fromAccount,proto3" json:"from_account,omitempty"`
	ToAccount        *User  `protobuf:"bytes,6,opt,name=to_account,json=toAccount,proto3" json:"to_account,omitempty"`
	TransactionHash  string `protobuf:"bytes,7,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
	TransactionIndex string `protobuf:"bytes,8,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"`
	// contains filtered or unexported fields
}

func (*Transaction) Descriptor deprecated

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetBlockHash

func (x *Transaction) GetBlockHash() string

func (*Transaction) GetBlockNumber

func (x *Transaction) GetBlockNumber() string

func (*Transaction) GetFromAccount

func (x *Transaction) GetFromAccount() *User

func (*Transaction) GetId

func (x *Transaction) GetId() int32

func (*Transaction) GetTimestamp

func (x *Transaction) GetTimestamp() string

func (*Transaction) GetToAccount

func (x *Transaction) GetToAccount() *User

func (*Transaction) GetTransactionHash

func (x *Transaction) GetTransactionHash() string

func (*Transaction) GetTransactionIndex

func (x *Transaction) GetTransactionIndex() string

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

type User

type User struct {
	Username   string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	ProfileUrl string `protobuf:"bytes,2,opt,name=profile_url,json=profileUrl,proto3" json:"profile_url,omitempty"`
	Address    string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAddress

func (x *User) GetAddress() string

func (*User) GetProfileUrl

func (x *User) GetProfileUrl() string

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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