Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vipay-ethereum-wallet

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vipay-ethereum-wallet

``` npm install vipay-ethereum-wallet ``` ### import (es5) ```javascript const vipay = require('vipay-ethereum-wallet/src'); ``` ### import (es6) ```javascript import vipay from 'vipay-ethereum-wallet/src'; ``` ### functions - Create Wallet -

  • 1.0.1
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Vipay-Wallet (ethereum)

installation

npm install vipay-ethereum-wallet

import (es5)

const vipay = require('vipay-ethereum-wallet/src');

import (es6)

import vipay from 'vipay-ethereum-wallet/src';

functions

  • Create Wallet
  • Recover wallet from phrase words
  • Import account from private key
  • Get ETH balance
  • Send ETH
  • Approve/Transfer Token

usage

//Create Wallet
const wallet = await vipay.createWallet({network: 'ETHEREUM'});

//Import Wallet
const wallet = await vipay.importWallet({
	mnemonic: 'sea glup tiger cup zoo ...', //phrase words
	network: 'ETHEREUM'
});

//Import Account
const account = await vipay.importAccount({
	privateKey: '0x....', //private key
	network: 'ETHEREUM'
});

//Get ETH balance
const balance = await vipay.getBalance({
	defaultProviderRpcUrl: 'https://https://bsc-dataseed1.defibit.io/', //this is bsc mainnet rpc url (put any ethereum network rpc url here)
	address: '0x...', 
	network: 'ETHEREUM'
});

//Send ETH
const tx = await vipay.sendEther({
	rpcUrl: 'https://....',// (pur rpc url here)
	privateKey: '0x....',
	receiveAddress: '0x...',
	amount: '0.1' //ETH amount
	gasPrice: 'xxx', //transaction gas fee
	gasLimit: 'xxx', //gas limit
	network: 'ETHEREUM'
});

//Token Transfer
const tx = await vipay.tokenTransfer({
	rpcUrl: 'https://....',// (pur rpc url here)
	privateKey: '0x....',
	receiveAddress: '0x...',
	tokenAddress: '0x...',
	amount: '0.1' //Token amount
	gasPrice: 'xxx', //transaction gas fee
	gasLimit: 'xxx', //gas limit
	network: 'ETHEREUM'
});

//Token Approve
const tx = await vipay.tokenApprove({
	rpcUrl: 'https://....',// (pur rpc url here)
	privateKey: '0x....',
	receiveAddress: '0x...',
	tokenAddress: '0x...',
	amount: '0.1' //Token amount
	gasPrice: 'xxx', //transaction gas fee
	gasLimit: 'xxx', //gas limit
	network: 'ETHEREUM'
})

Enjoy your work ~!!!

FAQs

Package last updated on 30 Jul 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

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