getSignatureForOfferApproval

getSignatureForOfferApproval Mutation is called next to get the message to sign via metamask for listing NFT.

Sample query

query ($orderId: UUID1!, $orgId: UUID1!, $creatorFee: Float) {
  getSignatureForOfferApproval(
    orderId: $orderId
    orgId: $orgId
    creatorFee: $creatorFee
  ) {
    proofOfApproval
    order {
      id
      nftTokenId
      tokenId
      tokenType
      quantity
      nftOwnerAddress
      fixedPrice
      price {
        value
        unit
        type
        __typename
      }
      buyerAddress
      buyerTax
      paymentToken
      orderType
      orderStatus
      offerExpiryDate
      createdByUserId
      createdBy {
        id
        username
        name
        email
        __typename
      }
      createdAt
      updatedAt
      __typename
    }
    Network {
      id
      name
      chainID
      rpcURL
      nftAPIURL
      openSeaProxyAddress
      wethAddress
      safeMasterContractAddress
      safeFactoryAddress
      safeFallbackHandler
      defaultCurrency
      isTestnet
      paymentCurrency
      __typename
    }
    __typename
  }
}

Sample variable

{
  "orderId": "b19a308e-d773-4fd9-8ea8-b91b7e68bd06",
  "orgId": "f2f5c627-5421-4c40-9913-edfd09dd98b3",
  "creatorFee": 0
}

Sample response

{
  "data": {
    "getSignatureForOfferApproval": {
      "proofOfApproval": "0x884f97da71127dbb3e7ae44936e4a304156157981e2d64c152a29dac75c491fe7ab0075d7d542d0641457e0dd744a68f10d05633c5c6311e2c214635b370c8251b",
      "order": {
        "id": "b19a308e-d773-4fd9-8ea8-b91b7e68bd06",
        "nftTokenId": "ba7be6d2-0294-4eca-b124-a9c46dbb11bc",
        "tokenId": "57",
        "tokenType": "ERC721",
        "quantity": 1,
        "nftOwnerAddress": "0x5f6FD7dBd82cD6De4a25913Ee92E79863f00db33",
        "fixedPrice": 0.04,
        "price": [],
        "buyerAddress": "0x823e14E47EaB5118FDd9d55BB4bd55C415255AF7",
        "buyerTax": 0,
        "paymentToken": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
        "orderType": "OFFER",
        "orderStatus": "PENDING",
        "offerExpiryDate": "2023-03-09T07:52:04Z",
        "createdByUserId": "9b30d71e-01e5-4a31-b921-9e2ffee9fcf6",
        "createdBy": null,
        "createdAt": "2023-03-07T07:52:09Z",
        "updatedAt": "2023-03-07T07:52:15Z",
        "__typename": "Order"
      },
      "Network": {
        "id": "c41db347-0ee3-4212-943a-ca213b8e0ea8",
        "name": "Goerli Testnet",
        "chainID": 5,
        "rpcURL": "https://eth-goerli.alchemyapi.io/v2/5XejNDt-OJPDq1SZHqY_D5Q92OFTElmb",
        "nftAPIURL": "https://eth-goerli.alchemyapi.io/v2/5XejNDt-OJPDq1SZHqY_D5Q92OFTElmb/getNFTs/?withMetadata=true&owner=",
        "openSeaProxyAddress": "0xf57b2c51ded3a29e6891aba85459d600256cf317",
        "wethAddress": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
        "safeMasterContractAddress": "0x6851D6fDFAfD08c0295C392436245E5bc78B0185",
        "safeFactoryAddress": "0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B",
        "safeFallbackHandler": "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4",
        "defaultCurrency": "ETH",
        "isTestnet": true,
        "paymentCurrency": "WETH",
        "__typename": "Network"
      },
      "__typename": "NFTSaleDetails"
    }
  }
}

Arguments

NameTypeDescription
orderIdUUIDThe order id.
orgIdUUIDThe organization id.
creatorFeeFloatNFT royalty fee.

Fields

NameTypeDescription
getSignatureForOfferApprovalObjectContains all the information from order, Network, proof of approval for metamask transaction.

Example