cloudwallet

0.5.9 • Public • Published

cloudwallet

Cloudwallet Implementation

npm npm CO2OffsetCode Quality[CircleCI](https://circleci.com/gh/energychain/cloudwallet/tree/main

API Usage

You need to register for the Cloudwallet-API on RapidAPI. Replace rapidApiKey with yours.

const Cloudwallet = require("cloudwallet");
const instance1 = new Cloudwallet('<rapidApiKey>'); // Create a new KeyPair
await instance1.set('Hello','World'); // Store a Keyvalue like a presentation

// ReUse wallet remembering privateKey
const keys = instance1.getKeys();
console.log(keys);

const instance2 = new Cloudwallet('<rapidAPIkey>',keys.privateKey);
console.log(await instance2.get('Hello'));

In other words: You might create an instance as a new object. If you do not specify a privateKey as the second argument - a new keyset is generated. Values are values of the instance object and could be accessed via get() or set()methods. It is a good practice to retrieve at least the privateKey and store it externally as there is no possibility to recover wallet data in case this key is lost.

Background

The node module CloudWallet uses an Ethereum-PrivateKey to generate an Decentralized Identifier as a signed JSON-WebToken (JWT) . The token itself gets transferred to the CloudWallet-API using an HTTPS-POST. Upon receiving the JWT by the CloudWallet-API the JWT and its containing DID get decoded and the signature is verified before the fields get stored. As a result, the HTTPS-POST will return a JSON containing all values stored in the Wallet.

Maintainer / Imprint

STROMDAO GmbH
Gerhard Weiser Ring 29
69256 Mauer
Germany

+49 6226 968 009 0

kontakt@stromdao.com

Handelsregister: HRB 728691 (Amtsgericht Mannheim)

Project Website: https://co2offset.io/

LICENSE

Apache-2.0

Package Sidebar

Install

npm i cloudwallet

Weekly Downloads

12

Version

0.5.9

License

Apache-2.0

Unpacked Size

19.5 kB

Total Files

5

Last publish

Collaborators

  • zoernert