Skip to main content

Quick Start

note

Version: 1.0 (Beta)

Let us put you on a fast track 💨 for on boarding the Arcana Platform!

In this guide, you will learn how developers can quickly get started and integrate any dApp with Arcana Network SDKs in a few simple steps. Next, it uses an example dApp use case to illustrate these steps.

Arcana Network Dashboard

Use these two simple steps to integrate any dApp with Arcana Network:

  1. Use Arcana Network Developer Dashboard to register your dApp. As part of this registration, a unique appID will be assigned per dApp. For details, see dashboard and dApp setup guide. Make sure you save the appID assigned to your dApp. This will be required for integrating with Arcana SDKs in the next step.

  2. Install and integrate your dApp with Arcana Auth SDK and Arcana Storage SDK as per your use case.

    Arcana Network SDKdApp integration use casesExample
    Auth

    ➡️ Plug in dApp user authentication using social OAuth and passwordless login

    ➡️ Enable user data privacy through data encryption / decryption

    ➡️ Use standard Ethereum provider interface for allowing dApp user to sign Arcana Storage blockchain transactions for every file access

    For example, if you wish to enable one or more popular social authentication mechanisms in your dApp, you will be first required to register your app on the dashboard, configure dApp settings and then integrate with the Auth SDK.
    Storage

    ➡️ Enable data ownership for dApp user by enabling file data upload, download operations in your dApp

    ➡️ Monitor storage usage metrics, allow file owners to list files uploaded by them or shared with them

    ➡️ Allow data owners to share file data with other users, revoke access to shared data, change file owner and delete file

    For example, if your dApp requires access to private, distributed storage, or if your use case requires creating and storing NFTs or any data files, then you need to integrate your dApp with the Storage SDK. To initialize the Arcana Storage SDK, you need the standard Ethereum provider. For accessing the provider, you can either integrate with Arcana Auth SDK or use a third party wallet provider. This provider is used for signing blockchain transactions powering storage operations in the Arcana Store.

That's all! 🏆

You are all set for Arcana Network. 🎉

For details, refer to the integration example in the next section. For step by step instructions on how to use Arcana Network SDKs for specific dApp use cases, see how to guides.

Example

This example demonstrates a simple dApp use case where the developer needs to enable passwordless login for onboarding dApp users. After authentication, the dApp needs to provide data privacy for any user data that is stored and accessed via this dApp.

dApp Use Case

  • Enable dApp user onboarding via passwordless login the dApp.
  • Allow dApp users to store any data file of their choice in the distributed Arcana Store and retrieve it later.

Step 1: Configure dApp

First, register and configure your dApp using the Arcana Developer Dashboard:

https://dashboard.beta.arcana.network

As part of registration, each dApp is assigned a unique appID.

While configuring your dApp using the dashboard, make sure you select the passwordless login option as shown in the figure: Dashboard Configure dApp Passwordless

Specify the origin and Redirect URI for password-less login.

  • origin URI: The URI of dApp page that will capture dApp user's email ID.
  • Redirect URI: The URI of dApp page where the control would return to after user has clicked on the magic link in the email received for passwordless authentication.

Step 2: Integrate Auth, Storage SDKs

Step 2a: Integrate with Arcana Auth SDK

After dApp configuration, follow the instructions on how to integrate your dApp with Auth SDK

Once the Auth SDK is integrated and initialized, you can trigger social login through your dApp as shown in the passwordless login step later.

Step 2b: Integrate with Arcana Storage SDK

After integrating with the Auth SDK, follow the instructions on how to integrate with Storage SDK

Once the Storage SDK is integrated and initialized, you can call file data store and retrieve functions through your dApp as shown in the following steps.

Step 2c: Trigger passwordless login

After your dApp is successfully integrated with the Auth SDK, you can plug in passwordless login functionality. Make sure you check that a user is not already logged in before triggering a fresh login.

  const loginStatus = await wallet.isLoggedIn();
if (!loginStatus){
const promise = await wallet.requestPasswordlessLogin(`${email}`)
}

Here, the email is the string specified by the dApp user through the dApp user interfaces. A one time magic link is emailed to the user. User is authenticated once they successfully receive this email and choose to click on the magic link shared via email. For more details, see how to enable passwordless login in dApp using Auth SDK.

Step 2d: Store File/Retrieve File

Once the Storage SDK is integrated and initialized, you can invoke file access operations from the SDK in response to user actions such as upload, download a file etc. The example could below shows how to integrate file upload and download from the Arcana Store.

  const Uploader = dAppStorageProvider.getUploader();
// file: Blob format
const fileID = Uploader.upload(file);
const Downloader = dAppStorageProvider.getDownloader();
Downloader.download(fileID);

Refer to these How To guides for more details: how to upload a file using Storage SDK and how to download a file using Storage SDK.

tip

Check out code samples and tutorial to integrate your dApp with Arcana Network SDKs and enable social, passwordless authentication in a dApp and store, access dApp user data in a secure and privacy preserving manner.

See Also

note

We would love to hear your feedback and how you are using Arcana Network. You can reach us through various channels listed on our website or contact support.