Build Wallet

As a builder, you want to build your own multi-chains compliant wallet on multiple chains.

Requirements

Wallet Methods

Claim NFT

Method

wallet.smartAsset.claim(network, tokenId, passphrase, receiver?)
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.
receiverString❌Recipient wallet of the NFT.
import { Wallet } from '@arianee/wallet';

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

Return Payload

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[]})
ParameterTypeRequiredDescription
languageen-US, fr-FR...❌Language(s) returned in order of preference.
chainTypetestnet or mainnet✅Blockchain network of the NFT ID.
brandsString❌Allows to return NFTs owned by the user and issued by the brand(s) only.

Return Payload

promise returns an array with the NFTs information.

FieldDescription
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.

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[]})
ParameterTypeRequiredDescription
languageen-US, fr-FR...❌Language(s) returned in order of preference.

Return Payload

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?