Skip to content

Commit

Permalink
Merge pull request #24 from getsafle/test
Browse files Browse the repository at this point in the history
Stable code to NPM
  • Loading branch information
apoorvq authored Jul 5, 2023
2 parents a4d44ba + ae605dc commit df34400
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 2,578 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
jscoverage
.nyc_output
1 change: 0 additions & 1 deletion .nyc_output/07f46989-8716-44a6-9743-139dd5d5323e.json

This file was deleted.

1 change: 0 additions & 1 deletion .nyc_output/09640e31-adc6-4cfb-b744-bc9e47acc1f6.json

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .nyc_output/processinfo/index.json

This file was deleted.

33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# vault-mantle-controller
# vault-mantle-controller<code><a href="https://www.docker.com/" target="_blank"><img height="50" src="https://www.gitbook.com/cdn-cgi/image/width=256,dpr=2,height=40,fit=contain,format=auto/https%3A%2F%2F2129957930-files.gitbook.io%2F~%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNHXgeqhgrznnRobzznxl%252Flogo%252FVdd8If7PeIF0Mrftq3Er%252FNYDPMM5Q.png%3Falt%3Dmedia%26token%3D2dd08523-d5b3-4bcf-aaf4-70368842ecdb"></a></code>

This repository contains `MANTLEHdKeyring` class to create **Mantle wallet** from **Safle Vault**.
[![npm version](https://badge.fury.io/js/@getsafle%2Fvault-mantle-controller.svg)](https://badge.fury.io/js/@getsafle%2Fvault-mantle-controller) <img alt="Static Badge" src="https://img.shields.io/badge/License-MIT-green"> [![Discussions][discussions-badge]][discussions-link]
<img alt="Static Badge" src="https://img.shields.io/badge/Mantle_controller-documentation-purple">

## Install
A Module is written in javascript for managing various keyrings of Mantle accounts, encrypting them, and using them. This repository contains `MANTLEHdKeyring` class to create **Mantle wallet** from **Safle Vault**.

`npm install --save @getsafle/vault-mantle-controller`
- [Installation](#installation)
- [Initialize the Mantle Controller class](#initialize-the-mantle-controller-class)
- [Methods](#methods)
- [Generate Keyring with 1 account and encrypt](#generate-keyring-with-1-account-and-encrypt)
- [Restore a keyring with the first account using a mnemonic](#restore-a-keyring-with-the-first-account-using-a-mnemonic)
- [Add a new account to the keyring object](#add-a-new-account-to-the-keyring-object)
- [Export the private key of an address present in the keyring](#export-the-private-key-of-an-address-present-in-the-keyring)
- [Sign a transaction](#sign-a-transaction)
- [Sign a message](#sign-a-message)
- [Get balance](#get-balance)

## Initialize the MANTLE Controller class

## Installation
```
npm install --save @getsafle/vault-mantle-controller
```
## Initialize the Mantle Controller class

```
const { KeyringController, getBalance } = require('@getsafle/vault-mantle-controller');
Expand Down Expand Up @@ -74,9 +89,5 @@ const signedObj = await mantleController.sign(msgParams, pvtKey, web3Obj);
```
const balance = await getBalance(address, web3);
```

### Import Wallet into keyring

```
const address = await mantleController.importWallet(_privatekey);
```
[discussions-badge]: https://img.shields.io/badge/Code_Quality-passing-rgba
[discussions-link]: https://github.com/getsafle/vault-mantle-controller/actions
Binary file removed jscoverage/.DS_Store
Binary file not shown.
224 changes: 0 additions & 224 deletions jscoverage/lcov-report/base.css

This file was deleted.

87 changes: 0 additions & 87 deletions jscoverage/lcov-report/block-navigation.js

This file was deleted.

Binary file removed jscoverage/lcov-report/favicon.png
Binary file not shown.
Loading

0 comments on commit df34400

Please sign in to comment.