Twitter URL

Arcana Storage SDK

What is Storage SDK?

The Arcana Storage SDK enables you to configure dApp and allow users to store files in a region enabled by the application, share it with other users, revoke access or transfer file ownership to another user.

In the beta release, the storage nodes are operated by Arcana Networks. In the future, the storage subsystem will be fully decentralized, and third party storage nodes can be plugged into the Arcana Network storage subsystem once they meet the Arcana storage QoS criteria.

⚠️ Caution: Arcana Network SDKs and apps (Beta Release), not meant for production usage.

Simple to Integrate

It is super easy to integrate Arcana's Storage SDK with your dApp. Just install, add a few lines of code, and you are all set:

import { StorageProvider } from '@arcana/storage';
const storage = await StorageProvider.init({ appId, provider });
let did = await storage.upload(file)
await storage.download(did)

See Usage Guide, for details.

💪 Key Features

🗄️   Save dApp user data in Arcana data store

🧩   Encrypt / Decrypt File data and metadata

📂   Share data with other dApp users

🔒   Revoke access to shared data

🖼️   Change data ownership

📈   Track data accesses via public blockchain browsers

🏗️ Installation

npm

npm i @arcana/storage

yarn

yarn add @arcana/storage

You can also use the standalone module, which includes the polyfills.

<script src="./dist/standalone/storage.umd.js"></script>
import { StorageProvider } from '@arcana/storage'

📋 Prerequisites

Before you can start using the Arcana Storage SDK, you need to register your dApp using Arcana Developer Dashboard.

A unique AppId will be assigned to your dApp. You need to provide this to Arcana Storage SDK in order to use the SDK functionality.

📚 Documentation

Check out Arcana Network documentation for Storage SDK Quick Start Guide, Usage Guide and Storage SDK Reference Guide.

Refer to the demo app or the How To Guides for performing specific tasks such as uploading/downloading a file, sharing file or revoking access to a file, and change file ownership.

💡 Support

For any support or integration related queries, contact Arcana support team.

🤝 Contributing

We welcome all contributions to the Arcana Storage SDK from the community. Read our contributing guide to learn about the SDK development process, how to propose bug fixes and improvements, and the code of conduct that we expect the participants to adhere to. Refer to the build and test section of this readme for details on how to test and validate your changes to the Auth SDK code before submitting your contributions.

💻 Development

Build

npm run build

Integration testing

  1. In the /integration-tets/test.js file, make sure you are using the correct chain-ID (40405) and gateway URL (https://gateway001-testnet.arcana.network/) while initializing the Arcana Storage SDK instance.

Start running an HTTP server using one of these suggested methods:

+ Eg for python 3
```
python3 -m http.server
```

+ Eg for python
```
python -m SimpleHTTPServer
```
+ One can also use packages like [http-server](https://www.npmjs.com/package/http-server), [browser-sync](https://browsersync.io/)
  1. Change directory to /integration-tests/ folder.

  2. Make sure to configure MetaMask for Arcana network's RPC URL as https://blockchain001-testnet.arcana.network/.

ℹ️ License

Arcana Storage is distributed under the MIT License.

For details, see Arcana License.