UNPKG

1.9 kBMarkdownView Raw
1<h2>Welcome to VEROS.</h2>
2
3This package should be used by any party that wants to integrate the VEROS cryptocurrency in their services.
4
5<h3>Getting started</h3>
6
7Start by installing the module using:
8
9`npm install veros --save`
10
11Then import the library into your project by adding the following line:
12
13`var veros = require('veros');`
14
15
16In order to start using VEROS you need to connect to your local Ethereum node.
17Please make sure the node is up and running with the RPC API available and open.
18
19In order to connect to the node run the following code:
20
21`
22veros.connectToEthereumNode(address,
23coinbaseAddress,
24coinbasePassword,
25sandbox,
26completion);
27`
28
29The parameters are:
30
31- address = The HTTP address of the Ethereum node `http://127.0.0.1:8545`
32- coinbaseAddress = The Ethereum address of your coinbase account. This is used to pay ETH transaction fees
33- coinbasePassword = The password to your coinbase account
34- sandbox = a boolean that indicates if the ethereum is running on `testnet` or `production`
35- completion(err,blockNumber) = The complication block that is called after the connection is based. It will return an error or the current `blockNumber` or your ethereum node.
36
37
38<h3>Available methods</h3>
39
40- getBlockNumber = Returns the current block nunmber
41- createAccount(password) = Creates a new account with the specified password
42- checkAccount(address,password) = Returns true if the credentials are correct.
43- listAccounts = Returns a list of all accounts on the current Ethereum node.
44- getVerosBalance(address) = Returns the VEROS balance of the selected address
45- addChildrenAddress(ownerAccount, ownerAccountPassword,parentAddress,completion) = Adds a child address to your account.
46- transfer(fromAccount, fromAccountPassword, recipientAddress, amount, completions) = Sends VEROS from one account to another. You need to specify the credentials of the sender account.
47