🚀 DAY 4 OF LAUNCH WEEK: Introducing GitHub Actions Scanning Support.Learn more →
Socket
Book a DemoInstallSign in
Socket

@waves/provider-ledger

Package Overview
Dependencies
Maintainers
15
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves/provider-ledger

* [Overview](#overview) * [Getting Started](#getting-started)

latest
npmnpm
Version
0.2.1
Version published
Maintainers
15
Created
Source

ProviderLedger

  • Overview
  • Getting Started

Overview

ProviderLedger

Getting Started

1. Library installation

To install Signer and ProviderLedger libraries use

npm i @waves/signer @waves/provider-ledger

2. Library initialization

Add library initialization to your app.

  • For Testnet:

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

    import { Signer } from '@waves/signer';
    import { ProviderLedger } from '@waves/provider-ledger';
    
    const signer = new Signer();
    const provider = new ProviderLedger();
    signer.setProvider(provider);
    

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 and transfer funds.

const user = await signer.login();
const [transfer] = await signer
  .transfer({
    amount: 1,
    recipient: 'alias:T:merry',
  })
  .sign();

For more information see Signer documentation.

FAQs

Package last updated on 06 Oct 2022

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