0.4.19 • Published 1 month ago

@docknetwork/wallet-sdk-core v0.4.19

Weekly downloads
-
License
LicenseRef-LICENS...
Repository
github
Last release
1 month ago

Dock Wallet SDK

The Dock Wallet SDK provides all the required functions to build a PolkaDot Wallet on top of a Universal Wallet 2020 document storage. It supports both Node.js and React Native.

For React Native usage please check @docknetwork/wallet-sdk-react-native

This is the core package and includes basic functionalities such as:

  • Document storage following Universal Wallet 2020 spec
  • Manage a wallet (CRUD)
  • Manage accounts (CRUD)
  • Fetch account balances
  • Wallet/Account backup
  • Import wallet/accounts

You might require to install extra packages depending on your needs, please refer to:

Installation

yarn add @docknetwork/wallet-sdk-core

React Native Example

import {Wallet} from '@docknetwork/wallet-sdk-core/lib/modules/wallet';

const wallet = await Wallet.create();

const account1 = await wallet.accounts.create({
  name: 'test',
});

console.log(`Account1 address ${account1.address}`);
// result: Account1 address 3D1M9UnR684eBfVujjQr6ucPqvXERSxYxcVBFGAhRohhRXxq

// Create account using an existing mnemonic
const mnemonic =
  'indicate mention thing discover clarify grief inherit vivid dish health market spoil';
const account2 = await wallet.accounts.create({
  name: 'Test',
  mnemonic,
});

console.log(`Account2 address ${account2.address}`);

// result: Account2 address 3FENesfZgFmBruv2H9Hc17GmobeTfxFAp8gHKXFmUtA38hcW

// Fetch accounts balance
const balance = await account1.getBalance();

console.log('Account1 balance', balance);

// result: Account1 balance 0
0.4.19

1 month ago

0.3.9

10 months ago

0.3.0

10 months ago

0.4.4

9 months ago

0.3.7

10 months ago

0.4.1

10 months ago

0.4.0

10 months ago

0.3.1

10 months ago

0.4.3

10 months ago

0.4.2

10 months ago

0.2.6

1 year ago

0.2.4

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.1.3

2 years ago

0.1.0

2 years ago