Display NFT
As a builder, you want to retrieve an Arianee NFT among multiple chains and display its content on your website.
Requirements
- Arianee Access Token or Wallet Connect.
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[])| Parameter | Type | Required | Description |
|---|---|---|---|
link | String | ✅ | Deeplink of the NFT → https://arian.ee/tokenId,passphrase |
resolveFinalNft | Boolean | ✅ |
|
language | en-US, fr-FR... | ❌ | Language(s) returned in order of preference. |
Return Payload
promise returns an object with the NFT information.
| Parameter | Description |
|---|---|
ArianeeProductCertificateI18N | NFT 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?)| Parameter | Type | Required | Description |
|---|---|---|---|
network | String | ✅ | Network of the NFT. |
tokenId | Number | ✅ | Arianee token ID of the NFT. |
passphrase | String | ✅ | 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[])| Parameter | Type | Required | Description |
|---|---|---|---|
messageId | String | ✅ | Identification number of the message. |
resolveFinalNft | Boolean | ✅ |
|
protocol | String | ✅ | Protocol name. |
language | en-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.
| Parameter | Description |
|---|---|
ArianeeProductCertificateI18N | NFT 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.
Updated over 1 year ago
Did this page help you?
