NFT Gen 2 Tech Doc
  • Introduction
  • Overview
    • NFT Data Chain
    • Cosmos SDK
    • Modules
      • Core Module
      • Oracle
  • Integration
    • Creating Schema
    • System Mode
      • Minting
      • Sending Action
    • User Mode
      • Minting
      • Sending Action
  • Data-chain Base URI
  • Getting Started
    • Installation (Golang)
    • Getting Started
      • Download Binary
      • Developer Resources
      • Binary Overview
      • Create Account
      • Faucet
      • Deploy NFT Gen2
      • Perform Action of NFT Gen2
      • Update NFT Schema
      • Script
    • SDK Package for NodeJs
      • Example Resources
      • Deploy NFT Gen2
      • Perform Action of NFT Gen2
      • Update NFT Schema
    • SDK for GO
      • Requirements
      • Installation
      • Usage
      • Preparing Key for Authentication
      • Supported Messages and Queries
      • Examples
    • Six Protocol Developer Community
Powered by GitBook
On this page
  • Specific for SIX-Protocol
  • Specific Query for SIX Protocol
  1. Getting Started
  2. SDK for GO

Supported Messages and Queries

The list of supported messages including Cosmos-SDK and SIX-Protocol specific types.

Specific for SIX-Protocol

Import on your code:

import nftmngrtypes "github.com/thesixnetwork/sixnft/x/nftmngr/types"
Message Type

Create NFT Schema

Create Meta Data

Perform Action By Admin

action-name: A name of the action to perform reference-id: A unique ID (for all actions on the chain) that serves as a reference to the performing action. You can use a query to retrieve the transaction of this action using the reference ID, without the need to search through other transaction APIs. parameters: A list of parameter need for the action.

Add System Actioner

Remove System Actioner

actioner-address: An address that will be allowed/denied to perform actions on the token on behalf of the admin

Add Action

Change Schema Owner

new-owner-address: An address of a new owner for the NFT.

Change Organization Owner

org-name: The name of the organization is to be changed. For example, suppose you have created a schema with the code 'mycompany.schema1'. No one else will be able to create a schema with a code name starting with 'mycompany', except for you. The system will assume that 'mycompany' is the organization code, and you will have the ability to transfer ownership to others. to-new-owner: A new organization owner.

Toggle Action

disable: A flag to set if the action is disabled or not. Action cannot be called when it is disabled. By setting this flag to false, action will be available again.

Show Attribute

show: A boolean flag to set if the attribute will be visible on marketplace or not. attribute-name: A list of attribute names in which to set the flag.

Add Attribute

location: A place to add a new attribute. 0 is to add new attribute as a NFT Attribute (Attribute which available for all Token) and 1 is to add new attribute to Token Attribute base64-new-attribute-definition: An attribute definition of the new attribute in Base64 encoded JSON.

Specific Query for SIX Protocol

Below is the list of query specific for SIX Protocol in version 0.8.0

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a NFTSchema by index.
	NFTSchema(ctx context.Context, in *QueryGetNFTSchemaRequest, opts ...grpc.CallOption) (*QueryGetNFTSchemaResponse, error)
	// will be deprecated next version (074)
	// Queries a NFTSchema by index.
	NFTSchemaV063(ctx context.Context, in *QueryGetNFTSchemaRequest, opts ...grpc.CallOption) (*QueryGetNFTSchemaResponseV063, error)
	// Queries a NFTSchema by index.
	NFTSchemaV072(ctx context.Context, in *QueryGetNFTSchemaRequest, opts ...grpc.CallOption) (*QueryGetNFTSchemaResponseV072, error)
	// Queries a list of NFTSchema items.
	NFTSchemaAll(ctx context.Context, in *QueryAllNFTSchemaRequest, opts ...grpc.CallOption) (*QueryAllNFTSchemaResponse, error)
	// will be deprecated next version (074)
	// Queries a list of NFTSchema items.
	NFTSchemaAllV063(ctx context.Context, in *QueryAllNFTSchemaRequest, opts ...grpc.CallOption) (*QueryAllNFTSchemaResponseV063, error)
	// Queries a list of NFTSchema items.
	NFTSchemaAllV072(ctx context.Context, in *QueryAllNFTSchemaRequest, opts ...grpc.CallOption) (*QueryAllNFTSchemaResponseV072, error)
	// Queries a NftData by index.
	NftData(ctx context.Context, in *QueryGetNftDataRequest, opts ...grpc.CallOption) (*QueryGetNftDataResponse, error)
	// Queries a list of NftData items.
	NftDataAll(ctx context.Context, in *QueryAllNftDataRequest, opts ...grpc.CallOption) (*QueryAllNftDataResponse, error)
	// Queries a ActionByRefId by index.
	ActionByRefId(ctx context.Context, in *QueryGetActionByRefIdRequest, opts ...grpc.CallOption) (*QueryGetActionByRefIdResponse, error)
	// Queries a list of ActionByRefId items.
	ActionByRefIdAll(ctx context.Context, in *QueryAllActionByRefIdRequest, opts ...grpc.CallOption) (*QueryAllActionByRefIdResponse, error)
	// Queries a Organization by index.
	Organization(ctx context.Context, in *QueryGetOrganizationRequest, opts ...grpc.CallOption) (*QueryGetOrganizationResponse, error)
	// Queries a list of Organization items.
	OrganizationAll(ctx context.Context, in *QueryAllOrganizationRequest, opts ...grpc.CallOption) (*QueryAllOrganizationResponse, error)
	// Queries a NftCollection by index.
	NftCollection(ctx context.Context, in *QueryGetNftCollectionRequest, opts ...grpc.CallOption) (*QueryGetNftCollectionResponse, error)
	// Queries a NFTSchemaByContract by index.
	NFTSchemaByContract(ctx context.Context, in *QueryGetNFTSchemaByContractRequest, opts ...grpc.CallOption) (*QueryGetNFTSchemaByContractResponse, error)
	// Queries a list of NFTSchemaByContract items.
	NFTSchemaByContractAll(ctx context.Context, in *QueryAllNFTSchemaByContractRequest, opts ...grpc.CallOption) (*QueryAllNFTSchemaByContractResponse, error)
	// Queries a NFTFeeConfig by index.
	NFTFeeConfig(ctx context.Context, in *QueryGetNFTFeeConfigRequest, opts ...grpc.CallOption) (*QueryGetNFTFeeConfigResponse, error)
	// Queries a NFTFeeBalance by index.
	NFTFeeBalance(ctx context.Context, in *QueryGetNFTFeeBalanceRequest, opts ...grpc.CallOption) (*QueryGetNFTFeeBalanceResponse, error)
	// Queries a MetadataCreator by index.
	MetadataCreator(ctx context.Context, in *QueryGetMetadataCreatorRequest, opts ...grpc.CallOption) (*QueryGetMetadataCreatorResponse, error)
	// Queries a list of MetadataCreator items.
	MetadataCreatorAll(ctx context.Context, in *QueryAllMetadataCreatorRequest, opts ...grpc.CallOption) (*QueryAllMetadataCreatorResponse, error)
}
PreviousPreparing Key for AuthenticationNextExamples

Last updated 2 years ago

creator-address: Same address which will be used to sign the transaction nft-schema-base64: NFT Schema in JSON encoded with Base64. For more information about the schema , go to or see example

nft-schema-code: The code of the NFT schema previously created token-id: An id of the token to create meta data base64-nft-data: Data corresponding to the schema created for the token in JSON format, and encoded with Base64. Find more about NFT data in

base64-new-action: A new action to add to the schema in Base64 encoded JSON. See more in action

For more detail on the query please see our on github

&nftmngrtypes.MsgCreateNFTSchema{
    Creator: "<creator-address>",
    NftSchemaBase64: "<nft-schema-base64>"
}
&nftmngrtypes.MsgCreateMetadata{
    Creator : "creator-address",
    NftSchemaCode : "nft-schema-code",
    TokenId : "token-id",
    Base64NFTData : "base64-nft-data"
}
&nftmngrtypes.MsgPerformActionByAdmin{
    Creator:       "creator-address",
    NftSchemaCode: "nft-schema-code",
    TokenId:       "token-id",
    Action:        "action-name",
    RefId:         "reference-id",
    Parameters:    []*nftmngrtypes.ActionParameter{}, // parameter lists
}
type ActionParameter struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
&nftmngrtypes.MsgAddSystemActioner{
    Creator: "<creator-address>",
    NftSchemaCode: "<nft-schema-code>",
    Actioner: "<actioner-address>",
}
&nftmngrtypes.MsgRemoveSystemActioner{
    Creator: "creator-address",
    NftSchemaCode: "nft-schema-code",
    Actioner: "actioner-address",
}
&nftmngrtypes.MsgAddAction{
    Creator: "<creator-address>",
    Code: "<nft-schema-code>",
    Base64NewAction: "<base64-new-action>",
}
&nftmngrtypes.MsgChangeSchemaOwner{
    Creator: "<creator-address>",
    NftSchemaCode: "<nft-schema-code>",
    NewOwner: "<new-owner-address>",
}
&nftmngrtypes.MsgChangeOrgOwner{
    Creator: "<creator-address>",
    OrgName: "<org-name>",
    ToNewOwner: "<to-new-owner>",
}
&nftmngrtypes.MsgToggleAction{
    Creator: "<creator-address>",
    Code: "<nft-schema-code>",
    Action: "<action-name>",
    Disable: <disable>,
}
&nftmngrtypes.MsgShowAttributes{
    Creator: "<creator-address>",
    NftSchemaCode: "<nft-schema-code>",
    Show: "<show>",
    AttributeNames: []string{"<attribute-name>"},
}
&nftmngrtypes.MsgAddAttribute{
    Creator: "creator-address",
    Code:   "nft-schema-code",
    Location: <location>,
    Base64NewAttriuteDefenition: "base64-new-attriute-defenition",
}
repositiry
Metadata Schema
NFT Schema Example
NFT Metadata Example
New Action Example