1.0.2 • Published 3 years ago

@icvault/sdk-js v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

IC-Vault SDK

Use this SDK to interact with ic-vault.

IC-Vault is a blockchain based decentralized password & secret manager. IC-Vault uses Internet Computer Protocol as platform to host and store user passwords & project secrets over blockchain.

Project status & support

  • Status: in active development

NOTE! IC-VAULT and IC-VAULT-SDK is alpha-stage software. It means IC-Vault hasn't been security audited and programming APIs and data formats can still change. We encourage you to reach out to the maintainers, if you plan to use IC-Vault in mission critical systems.

Installation:

yarn add @icvault/sdk-js

or

npm install @icvault/sdk-js

Basic Usage:

import Vault from "@icvault/sdk-js";
const icVaultInstance = new Vault();
//use async function for this:
await icVaultInstance.initIdentity("----Private-key----");

icVaultInstance.getVaultList(); //to fetch all vault list owned by user.

Example:

import Vault from "@icvault/sdk-js";

const identity = "---Private key here ----";

const icVaultInstance = new Vault();
const canisterId = "qgxzx-lqaaa-aaaaj-aaltq-cai";

const main = async () => {
  await icVaultInstance.initIdentity(identity, canisterId);
  const vaultList = await icVaultInstance.getVaultList();
  console.log(vaultList); //logs list of vaults
};

main();