New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@waves.exchange/provider-cloud

Package Overview
Dependencies
Maintainers
7
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves.exchange/provider-cloud

ProviderCloud for Signer

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

provider-cloud

Signer waves.exchange cloud auth provider ​

  • ProviderCloud

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. ​

  • For Testnet: ​
    import Signer from '@waves/signer';
    import { ProviderCloud } from '@waves.exchange/provider-cloud';
    
    const signer = new Signer({
      // Specify URL of the node on Testnet
      NODE_URL: 'https://nodes-testnet.wavesnodes.com'
    });
    signer.setProvider(new ProviderCloud('https://testnet.wx.network/signer-cloud'));
    

  • For Mainnet: ​
    import Signer from '@waves/signer';
    import { ProviderCloud } from '@waves.exchange/provider-cloud';
    
    const signer = new Signer();
    signer.setProvider(new ProviderCloud());
    

  • For tetsnetwxnetwork env: ​
    import { ProviderCloud } from '@waves.exchange/provider-cloud';
    
    const provider = new ProviderCloud('https://testnet.wx.network/signer-cloud?env=testnetwxnetwork');
    

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'}) // Transfer 1 WAVES to alias merry
  .broadcast(); // Promise will resolved after user sign and node responseconst [signedTransfer] = await signer
  .transfer({amount: 100000000, recipient: 'alias:T:merry'}) // Transfer 1 WAVES to alias merry
  .sign(); // Promise will resolved after user sign

FAQs

Package last updated on 30 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc