provider-cloud
Signer waves.exchange cloud auth provider
Overview
ProviderCloud developed by Waves.Exchange implements a Signature Provider for Signer protocol library. Signer enables easy deploy dApps based on Waves blockchain. User's private key and SEED phrase are encrypted and stored in Waves.Exchange, so your web app does not have access to them.
For now, signing is implemented for all types of transactions except exchange transactions.
Getting Started
1. Library installation
To install Signer and ProviderCloud libraries use
npm i @waves/signer @waves.exchange/provider-cloud
For Windows, use the following format:
npm i @waves/signer '@waves.exchange/provider-cloud'
2. Library initialization
Add library initialization to your app.
3. Basic example
Now your application is ready to work with Waves Platform. Let's test it by implementing basic functionality. For example, we could try to authenticate user, get his/her balances and transfer funds.
const user = await signer.login();
const balances = await signer.getBalance();
const [broadcastedTransfer] = await signer
.transfer({amount: 100000000, recipient: 'alias:T:merry'})
.broadcast();
const [signedTransfer] = await signer
.transfer({amount: 100000000, recipient: 'alias:T:merry'})
.sign();