Before you begin

You wish to mint your first NFT on the blockchain and communicate with Arianee NFT owners to engage and empower your community, and reward customers' loyalty. To do so, Arianee designed the Arianee SDK.

Requirements

💡

Arianee SDK repo

Workflow Overview

TBC

1 - Create & Manage Brand Identity

What's an identity on the Arianee Protocol?

A brand — the NFT issuer — must be validated to use the Arianee protocol's features fully. Note that in the NFT standard, there’s no concept about the NFT issuer, so a user cannot trust the provenance.

The Arianee protocol has introduced the Brand Identity concept. The Arianee protocol is managed by the Arianee Association, which acts as a trusted third party to guarantee that a brand is a real brand.

Identity registration process:

  • Test environment: Arianee allows anyone to create an identity for test purposes.
  • Production environment: Your brand must validate its identity through the KYB process (Know Your Business process).

Identity requirements:

  • Public address: Wallet public address that belongs to and is associated with a brand.
  • Identity metadata: Identity content.

Register Identity

Step 1. Install ArianeeJs.

npm i @arianee/arianeejs

Step 2. Follow the ArianeeJs set up recipe.

Your public key is returned. Example: 0xE6Ca1d03a2bf48778d3a7b88BB9A45701B504949.

Step 3. Define your brand identity content using the sample below. For test purposes, you can either create your own JSON file with your information or copy-paste the code snippet.

📌

{
    "$schema": "https://cert.arianee.org/version1/ArianeeBrandIdentity-i18n.json",
    "name": "Arianee",
    "description": "<b>The Digital Identity Consortium</b><br/>\nConsumption behaviors are changing, new generations have a digital life of their own and the demand for data privacy is increasing.\nWhat if brands could propose a modern way of owning their creations? What if, thanks to technology, we could augment the ownership of goods?\n\nAt Arianee we are building perpetual relationships between brands and owners, made of trust, respect and transparency.\n\nWith the Arianee protocol, ownership is augmented and groundbreaking features are added to the most valuable items.",
    "arianeeMembership": "associate_member",
    "address": {
      "street_address": "120 rue Réaumur",
      "zipcode": "75002",
      "city": "Paris",
      "country": "France"
    },
    "pictures": [
      {
        "type": "brandLogoHeader",
        "url": "https://theseus.arianee.org/pub/-LvRQM23uL73ArIyshF0"
      },
      {
        "type": "brandLogoHeaderReversed",
        "url": "https://theseus.arianee.org/pub/-LvRRVI126tywVNOHdOM"
      },
      {
        "type": "brandLogoSquare",
        "url": "https://theseus.arianee.org/pub/-M0vj64EKf288-E08H_K_arianeeResized"
      },
      {
        "type": "brandHomePicture",
        "url": "https://theseus.arianee.org/pub/-LvRQkAOVY9XBrQIR_TZ"
      },
      {
        "type": "brandItemBackgroundPicture",
        "url": "https://theseus.arianee.org/pub/-LvRQrmb_IvXRTKdkYx5"
      },
      {
        "type": "itemBackgroundPicture",
        "url": "https://theseus.arianee.org/pub/-Lvk4MBEz5KjmE95dr9n"
      },
      {
        "type": "brandBackgroundPicture",
        "url": "https://theseus.arianee.org/pub/-M0vhSQcadtYDapY8qdb_arianeeResized"
      },
      {
        "type": "certificateBackgroundPicture",
        "url": "https://theseus.arianee.org/pub/-LvRRHXoEBb_l89d1YdW"
      }
    ],
    "socialmedia": [
      {
        "type": "facebook",
        "value": "208072396631649"
      },
      {
        "type": "twitter",
        "value": "arianeeproject"
      },
      {
        "type": "youtube",
        "value": "UCE2QoVA3Fx29NM-lG6T52oQ"
      }
    ],
    "rpcEndpoint": "https://bdharianeetest.firebaseapp.com/rpc"
  }

Step 4. Register your brand's previously generated public key here. [LINK FOR UPCOMING INTERFACE]

📌

This process adds your public key to a list of "authorized" addresses. It will also send you a native test token so that you can broadcast transactions.

Step 5. Register your brand identity content using your identity url and imprint.

import { Arianee, NETWORK } from '@arianee/arianeejs'
import { ContractName } from '@arianee/arianeejs/dist/src/core/wallet/services/contractService/contractsService';

(async () => {
    const arianee = new Arianee();
    const arianeeClient = await arianee.init(NETWORK.testnet);
    const wallet = await arianeeClient.fromMnemonic("pave dance reason box fury trap chat latin flip upon jelly orient");
    console.log(wallet.address);

    const jsonContent = {
        "$schema": "https://cert.arianee.org/version1/ArianeeBrandIdentity-i18n.json",
        "name": "Arianee",
        "description": "<b>The Digital Identity Consortium</b><br/>\nConsumption behaviors are changing, new generations have a digital life of their own and the demand for data privacy is increasing.\nWhat if brands could propose a modern way of owning their creations? What if, thanks to technology, we could augment the ownership of goods?\n\nAt Arianee we are building perpetual relationships between brands and owners, made of trust, respect and transparency.\n\nWith the Arianee protocol, ownership is augmented and groundbreaking features are added to the most valuable items.",
        "arianeeMembership": "associate_member",
        "address": {
          "street_address": "120 rue Réaumur",
          "zipcode": "75002",
          "city": "Paris",
          "country": "France"
        },
        "pictures": [
          {
            "type": "brandLogoHeader",
            "url": "https://theseus.arianee.org/pub/-LvRQM23uL73ArIyshF0"
          },
          {
            "type": "brandLogoHeaderReversed",
            "url": "https://theseus.arianee.org/pub/-LvRRVI126tywVNOHdOM"
          },
          {
            "type": "brandLogoSquare",
            "url": "https://theseus.arianee.org/pub/-M0vj64EKf288-E08H_K_arianeeResized"
          },
          {
            "type": "brandHomePicture",
            "url": "https://theseus.arianee.org/pub/-LvRQkAOVY9XBrQIR_TZ"
          },
          {
            "type": "brandItemBackgroundPicture",
            "url": "https://theseus.arianee.org/pub/-LvRQrmb_IvXRTKdkYx5"
          },
          {
            "type": "itemBackgroundPicture",
            "url": "https://theseus.arianee.org/pub/-Lvk4MBEz5KjmE95dr9n"
          },
          {
            "type": "brandBackgroundPicture",
            "url": "https://theseus.arianee.org/pub/-M0vhSQcadtYDapY8qdb_arianeeResized"
          },
          {
            "type": "certificateBackgroundPicture",
            "url": "https://theseus.arianee.org/pub/-LvRRHXoEBb_l89d1YdW"
          }
        ],
        "socialmedia": [
          {
            "type": "facebook",
            "value": "208072396631649"
          },
          {
            "type": "twitter",
            "value": "arianeeproject"
          },
          {
            "type": "youtube",
            "value": "UCE2QoVA3Fx29NM-lG6T52oQ"
          }
        ],
        "rpcEndpoint": "https://bdharianeetest.firebaseapp.com/rpc"
      };

    // Calculate imprint. It's a fingerprint of your json file, to guarantee that you won't change it offline. 
    const imprint = await wallet.utils.calculateImprint(jsonContent);

    await wallet.contracts[ContractName.identityContract].methods.updateInformations(URL_OF_YOUR_BRAND_IDENTITY_FILE, imprint);

📌

This step allows you to update your identity, such as your description or logo, whenever you need to.

Result:

  • Test environment: Automatic brand identity validation process every 5 minutes.
  • Production environment: Once declared, your identity is in "pending validation" status from the Arianee Consortium. Our validation committee will review your application to validate your information. Mainly, to check if you do not impersonate another brand.

2 - Buy credits

3 - Create your NFT

Step 1. Load your $ARIA20 and buy credits.

Step 2. Use the createAndStoreCertificate method to create the NFT on the blockchain and store the content in the related Arianee Privacy Gateway previously defined in your identity. See the dedicated recipe.

Method:

creator.reserveSmartAssetId(smartAssetId?, overrideTransaction?:NonPayableOverrides)
ParameterMandatoryTypeDescription
smartAssetIdNumberIf ID defined → Checked if ID is free.
If ID undefined → Get a free ID.
overridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Response: promise returns reserved smartAssetId is returned.

3 - Send a dMessage

Send a dMessage to the returned smartAssetId and store the content on the Arianee Privacy Gateway.

Method:

creator.createAndStoreMessage(data, overrideTransaction?:NonPayableOverrides)
ParameterMandatoryTypeDescription
datasmartAssetIdStringRecipient NFT of the message.
datauriStringMessage uri. Mandatory with imprint if no content.
dataimprintStringImprint of the message. Mandatory with uri if no content.
datacontentObjectContent mandatory if no uri and imprint.
datamessageIdStringdMessage identification number. If not defined, a random one is generated.
overrridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Example:

const core = Core.fromRandom();
const creator = new Creator({
  creatorAddress: '', // address that will be rewarded for creator action
  core: core,
});
const isConnected = await creator.connect('polygon');
if (isConnected) {
  await creator.buyCredit(CreditType.message, 1);
  await creator.messages.createAndStoreMessage({
    smartAssetId: 12343,
    messageId: 1232143,
    content: {},
  }); 

Response:

  • The dMessage is created and received in the recipient's wallet.
  • An error may occur.
Error typeDescription
InsufficientMessageCreditsErrorThe core wallet address does not have enough message credits.
UnavailableMessageIdErrorThe messageId is not available.
NoIdentityErrorThe core wallet address does not have an Identity URI.
ArianeePrivacyGatewayErrorError while interacting with the Arianee Privacy Gateway.

4 - Link an Arianee Event

Link an Arianee Event to the target smartAssetId and store the content on the Arianee Privacy Gateway.

Method:

creator.createAndStoreEvent(data, overrideTransaction?:NonPayableOverrides)
ParameterMandatoryTypeDescription
datauriStringArianee event uri.
datasmartAssetIdStringIdentification number of the recipient NFT.
dataarianeeEventIdStringIdentification number of the Arianee Event. If not defined, a random ID is generated.
dataimprintStringArianee event imprint.
datacontentObjectContent of the Arianee Event.
overrridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Example:

const core = Core.fromRandom();
const creator = new Creator({
  creatorAddress: '', 
  core: core,
});
const isConnected = await creator.connect('polygon');
if (isConnected) {
  await creator.buyCredit(CreditType.event, 1);
  await creator.events.createAndStoreEvent({
    smartAssetId: 12343,
    eventId: 1232143,
    content: {},
  }); // return message imprint + messageId
}

Response:

  • The Arianee Event has been created.
  • An error may occur.
Error typeDescription
InsufficientMessageCreditsErrorThe core wallet address does not have enough message credits.
UnavailableEventIdErrorThe eventId is not available.
NoIdentityErrorThe core wallet address does not have an Identity URI.
ArianeePrivacyGatewayErrorError while interacting with the Arianee Privacy Gateway.