Build Wallet

Before you begin

As a brand, let's say you want to build your own multi-chains compliant wallet on multiple chains.

Requirement: Arianee Access Token or Wallet Connect

Methods

Claim NFT

wallet.smartAsset.claim(network, tokenId, passphrase, receiver?)
ParameterMandatoryTypeDescription
network✅StringNetwork of the NFT.
tokenId✅NumberArianee token ID of the NFT.
passphrase✅StringToken request passphrase.
This param is optional if you are the NFT owner.
receiver❌StringRecipient wallet of the NFT.

Example:

import { Wallet } from '@arianee/wallet';

(async () => {
  const wallet = new Wallet({ chainType: 'testnet', auth: { mnemonic: '' } });
  const nft = await wallet.smartAsset.getFromLink('');
  await nft.claim();
})();

Response: The transaction request is sent to the blockchain.

Retrieve NFT(s)

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

Method

wallet.smartAsset.getOwned(onlyFromBrands?:string[], i18nStrategy?:{useLanguages?: string[]})
InputMandatoryTypeDescription
language❌en-US, fr-FR...Language(s) returned in order of preference.
chainType✅testnet or mainnetBlockchain network of the NFT ID.
brands❌StringAllows to return NFTs owned by the user and issued by the brand(s) only.

Result: promise returns an array with the NFTs information.

  • 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?)
ParameterTypeMandatoryDescription
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.

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.

Retrieve dMessages

Retrieve the data and content of dMessages for a given chain type and NFTs owned by a wallet.

Method

wallet.message.getReceived(i18nStrategy?:{useLanguages?: string[]})
InputMandatoryTypeDescription
language❌en-US, fr-FR...Language(s) returned in order of preference.

Result: promise returns an array with messages information.

[{
    data: {
      id: '238153639',
      certificateId: '86429342',
      content: ArianeeMessageI18N,
      rawContent: ArianeeMessageI18N,
      imprint: 'TODO',
      isRead: true,
      protocol: { name: "testnet"; chainId: 77 }
      receiver: '0xa9bc90d24d0b8495043ab5857455444630028caf',
      sender: '0xb908b66915ecd1ec31e669adc9c71bdce44ec601',
      timestamp: 1682609160
    }
  }]
💡

For more information about Arianee SDK, dig deeper into the documentation.


Did this page help you?