Display NFT

As a builder, you want to retrieve an Arianee NFT among multiple chains and display its content on your website.

Requirements

Wallet 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[])
ParameterTypeRequiredDescription
linkStringβœ…Deeplink 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.

Return Payload

promise returns an object with the NFT information.

ParameterDescription
ArianeeProductCertificateI18NNFT Schema.
BlockchainEvent[]Gathering of transaction 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?)
ParameterTypeRequiredDescription
networkStringβœ…Network of the NFT.
tokenIdNumberβœ…Arianee token ID of the NFT.
passphraseStringβœ…Token request passphrase.
This param is optional if you are the NFT owner.
const wallet = new Wallet({ chainType: 'mainnet' });
const nft = await wallet.smartAsset.getOwned();
const proofLink = await nft[0].createProofLink();

Return Payload

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[])
ParameterTypeRequiredDescription
messageIdStringβœ…Identification number of the message.
resolveFinalNftBooleanβœ…- true: try to add the Arianee Access Token in the request.

- false: get the landing NFT.
protocolStringβœ…Protocol name.
languageen-US, fr-FR...❌Language(s) returned in order of preference.
const wallet = new Wallet({ chainType: 'mainnet' });
const myMessage = await wallet.message.getReceived();
await myMessage[0].readMessage();

Return Payload

promise returns an object with the message information.

ParameterDescription
ArianeeProductCertificateI18NNFT Schema.
BlockchainEvent[]Gathering of transaction 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.