Display NFT

Before you begin

As a brand, let's say you want to retrieve an Arianee NFT among multiple chains and display its content on your website.

Requirement: Arianee Access Token or Wallet Connect.

Methods

Retrieve NFT

Retrieve NFTs owned by a wallet and the content associated with these tokens.

Method

wallet.smartAsset.getFromLink(link:string, resolveFinalNft?:boolean, i18nStrategy?:{useLanguages?: string[])
InputMandatoryTypeDescription
linkStringDeeplink of the NFT → https://arian.ee/tokenId,passphrase
resolveFinalNftBoolean- true: try to add the Arianee Access Token in the request.
- false: get the landing NFT.
languageen-US, fr-FR...Language(s) returned in order of preference.

Result: promise returns an object with the NFT information.

  • ArianeeProductCertificateI18N: NFT Schema.
  • BlockchainEvent[]: Gathering of transactions events of the token recorded on the blockchain.
  • Event[]: Event Schema.
{
    data: {
      certificateId: '58824256',
      content: ArianeeProductCertificateI18N,
      rawContent: ArianeeProductCertificateI18N,
      blockchainEvents: BlockchainEvent[],
      imprint: '0xce917f8d652187e7bf162b2c05d4b5439cef04142795eb6e5d2283b6193b8e88',
      isAuthentic: true,
      isRequestable: false,
      issuer: '0x90d181a3e977E8CcD7822B711Bb3A83E79beaEFF',
      owner: '0xa9bc90d24d0b8495043ab5857455444630028caf',
      protocol: { name: "testnet"; chainId: 77 }
    },
    arianeeEvents: Event[]
  }

Generate proof of ownership

Method

wallet.smartAsset.createProofLink(network, tokenId, passphrase?)
ParameterTypeMandatoryDescription
networkStringNetwork of the NFT.
tokenIdNumberArianee token ID of the NFT.
passphraseStringToken request passphrase.
This param is optional if you are the NFT owner.

Example:

const wallet = new Wallet({ chainType: 'mainnet' });
const nft = await wallet.smartAsset.getOwned();
const proofLink = await nft[0].createProofLink();

Result: The proof of ownership link is returned.

Read a dMessage

Retrieve a specific dMessage for a given protocol instance.

Method

wallet.smartAsset.getFromLink(link:string, resolveFinalNft?:boolean, i18nStrategy?:{useLanguages?: string[])
InputMandatoryTypeDescription
messageIdStringIdentification number of the message.
resolveFinalNftBoolean- true: try to add the Arianee Access Token in the request.

- false: get the landing NFT.
protocolStringProtocol name.
languageen-US, fr-FR...Language(s) returned in order of preference.

Example:

const wallet = new Wallet({ chainType: 'mainnet' });
const myMessage = await wallet.message.getReceived();
await myMessage[0].readMessage();

Result: promise returns an object with the message information.

  • ArianeeProductCertificateI18N: NFT Schema.
  • BlockchainEvent[]: Gathering of transactions events of the token recorded on the blockchain.
  • Event[]: Event Schema.
{
    data: {
      certificateId: '58824256',
      content: ArianeeProductCertificateI18N,
      rawContent: ArianeeProductCertificateI18N,
      blockchainEvents: BlockchainEvent[],
      imprint: '0xce917f8d652187e7bf162b2c05d4b5439cef04142795eb6e5d2283b6193b8e88',
      isAuthentic: true,
      isRequestable: false,
      issuer: '0x90d181a3e977E8CcD7822B711Bb3A83E79beaEFF',
      owner: '0xa9bc90d24d0b8495043ab5857455444630028caf',
      protocol: { name: "testnet"; chainId: 77 }
    },
    arianeeEvents: Event[]
  }

💡

  • At the blockchain level, the gas fees of a proof transaction are paid by the Arianee protocol.
  • For more information about Arianee SDK, dig deeper into the documentation.