createSignatureToListNFTForSale

This mutation is called to validate the NFT owner and to create the order for listing the NFT and create and return the message to sign via metamask for listing NFT.

Sample mutation

mutation createSignatureToListNFTForSale(
  $orgId: UUID1!
  $nftTokenId: UUID1!
  $tokenType: TokenType!
  $quantity: Int!
  $nftOwnerAddress: String!
  $fixedPrice: Float!
  $paymentToken: String!
  $currencyId: UUID1!
  $paymentSettlementAddress: String
	$currency: CurrencyCodeFiat
) {
  createSignatureToListNFTForSale(
    orgId: $orgId
    nftTokenId: $nftTokenId
    tokenType: $tokenType
    quantity: $quantity
    nftOwnerAddress: $nftOwnerAddress
    fixedPrice: $fixedPrice
    paymentToken: $paymentToken
    currencyId: $currencyId
    paymentSettlementAddress: $paymentSettlementAddress
    currency: $currency
  ) {
    messageToSign
    order {
      id
      nftTokenId
      tokenContract
      tokenId
      tokenType
      quantity
      nftOwnerAddress
      fixedPrice
      paymentToken
      orderType
    }
  }
}

Sample variable

{
  "orgId": "8fb128bd-f55d-4bcc-8b6c-0beb684e4d4e",
  "nftTokenId": "a3f42a21-c47a-45ea-a115-e209bb51b56e",
  "tokenType": "ERC721",
  "quantity": 1,
  "nftOwnerAddress": "0xa77915a574e1f9b88db152525ceBfEAA8c71bAa4",
  "fixedPrice": "0.04",
  "paymentToken": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
  "currencyId": "c41db347-0ee3-4212-563a-ca213b8e0ea8"
}

Sample response

{
  "data": {
    "createSignatureToListNFTForSale": {
      "messageToSign": "0x3edcc148e253c720337ba43cf4bb79211127326a953aebe79e024435a9906592",
      "order": {
        "id": "8e433465-fad7-409b-927d-121a5f2655fe",
        "nftTokenId": "a3f42a21-c47a-45ea-a115-e209bb51b56e",
        "tokenContract": "0xcef83635de6935cb85192090564b0a8e08594584",
        "tokenId": "1",
        "tokenType": "ERC721",
        "quantity": 1,
        "nftOwnerAddress": "0xa77915a574e1f9b88db152525ceBfEAA8c71bAa4",
        "fixedPrice": 0.04,
        "paymentToken": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
        "orderType": "LISTING"
      }
    }
  }
}

Arguments

NameTypeDescriptionRequired
orgIdUUIDOrganization id.Yes
nftTokenIdUUIDNft token id.Yes
tokenTypeEnumToken type ERC1155or ERC721.Yes
quantityIntegerQuantity of NFT.Yes
nftOwnerAddressStringOwner of the NFT.Yes
fixedPriceFloatListing amountYes
paymentTokenStringCurrency contract Address.Yes
currencyIdUUIDCurrency id like ETH or WETHYes
paymentSettlementAddressStringPayment settlement address of the saleNo
currencyEnumFiat currency codeNo

Fields

NameTypeDescription
messageToSignStringHash for sign in metamask
orderObjectContains all the information from Order such as the nft token id, token contract,fixed price, buyer address and etc.
isSigningRequiredBooleanIt indicates that the wallet is external.
gatedCollectionStringIf the NFT is under token gating, the gated collection will return.

Example

create signature for list. this is not for all users token owner only need to call this api.