Skip to content

Commit

Permalink
Merge pull request #19 from getsafle/test
Browse files Browse the repository at this point in the history
Readme Badges Update and fixes
  • Loading branch information
apoorvq committed Jul 5, 2023
2 parents e291f6a + cdecb6d commit 0c17a70
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@

### 1.2.1 (2023-06-21)

- update import wallet to accept private key with or without '0x’ prefixed
- update import wallet to accept private key with or without '0x’ prefixed


### 1.2.2 (2023-07-05)

- Adding badges to readme.md
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# vault-bsc-controller
# vault-bsc-controller<code><a href="https://www.docker.com/" target="_blank"><img height="50" src="https://dex-bin.bnbstatic.com/static/images/logo_BNB_Chain.svg"></a></code>

This repository contains `BSCHdKeyring` class to create **Binance smart chain wallet** from **Safle Vault**.
[![npm version](https://badge.fury.io/js/@getsafle%2Fvault-bsc-controller.svg)](https://badge.fury.io/js/@getsafle%2Fvault-bsc-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/BSC_controller-documentation-purple">

## Install
A Module written in javascript for managing various keyrings of BSCereum accounts, encrypting them, and using them. This repository contains `BSCHdKeyring` class to create **Binance smart chain wallet** from **Safle Vault**.


- [Installation](#installation)
- [Initialize the BSC Controller class](#initialize-the-bsc-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)



## Installation

`npm install --save @getsafle/vault-bsc-controller`

Expand Down Expand Up @@ -80,3 +97,17 @@ const signedData = await bscController.signTypedMessage(msgParams);
```
const balance = await getBalance(address, web3);
```

### Send Transaction

```
const receipt = await bscController.sendTransaction(signedTx, web3);
```

### Calculate Tx Fees

```
const fees = await bscController.getFees(rawTx, web3);
```
[discussions-badge]: https://img.shields.io/badge/Code_Quality-passing-rgba
[discussions-link]: https://github.com/getsafle/vault-bsc-controller/actions
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getsafle/vault-bsc-controller",
"version": "1.2.1",
"version": "1.2.2",
"description": "",
"engines": {
"node": ">= 10"
Expand Down

0 comments on commit 0c17a70

Please sign in to comment.