1.4.3 • Published 1 year ago

vipay-multichain-wallet v1.4.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Vipay-Wallet

installation

npm install vipay-multichain-wallet

import (es5)

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

import (es6)

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

functions (ethereum)

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

usage (ethereum)

//Create Wallet
const wallet = await vipay.Ethereum.createWallet({});

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

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

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

//Send ETH
const tx = await vipay.Ethereum.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
});

//Token Transfer
const tx = await vipay.Ethereum.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
});

//Token Approve
const tx = await vipay.Ethereum.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
})

functions (solana)

  • Create Wallet
  • Recover wallet from phrase words
  • Import account from private key
  • Send SOL token
  • Get token info
  • Get availale token list
  • Get balance
  • Get transaction

usage (solana)

const wallet = await vipay.Solana.createWallet({});

const importWallet = await vipay.Solana.importWallet({
	mnemonic: 'xxx'//mnemonic
})

const importAccount = await vipay.Solana.importWallet({
	privateKey: 'xxx' //privatekey
})

const tx = await vipay.Solana.transfer({
	rpcUrl: 'https://api.devnet.solana.com', //rpcurl
	privateKey: 'xxx',
	from: 'xxx',
	to: 'xxx',
	amount: 0.1
})

// please refer library for more functions

More blockchains and networks will be added.

Estimated next update time: Aug 15 2022 :tw-1f551:

Enjoy your work ~!!!

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.9

1 year ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.2.0

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.49

2 years ago

1.3.1

1 year ago

1.3.0

1 year ago

1.1.52

2 years ago

1.1.51

2 years ago

1.1.50

2 years ago

1.1.56

1 year ago

1.1.55

1 year ago

1.1.54

2 years ago

1.1.53

2 years ago

1.1.59

1 year ago

1.1.58

1 year ago

1.1.61

1 year ago

1.2.9

1 year ago

1.1.60

1 year ago

1.1.29

2 years ago

1.1.30

2 years ago

1.1.34

2 years ago

1.1.33

2 years ago

1.1.32

2 years ago

1.1.31

2 years ago

1.1.38

2 years ago

1.1.37

2 years ago

1.1.35

2 years ago

1.1.39

2 years ago

1.1.41

2 years ago

1.1.40

2 years ago

1.1.45

2 years ago

1.1.44

2 years ago

1.1.43

2 years ago

1.1.42

2 years ago

1.1.48

2 years ago

1.1.47

2 years ago

1.1.46

2 years ago

1.1.27

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.1.24

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago