# Global

##

### Methods

#### add0x(data)

Adds 0x prefix to string

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | string | string that should be prefixed by 0x

Source:
  - utils/add0x.js, line 6

##### Returns:

String with 0x prefix

#### (async) allEvents(props)

Subscribes to all contract events

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`options` | object | <optional> | Event options (@see subscribe)
`callback` | function | <optional> | Event callback (@see subscribe)
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20.js, line 98

##### Returns:

Promise that will be resolved with the event emitter (@see subsribe)

#### (async) balanceOf(props)

Gets balance of specific address

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`owner` | string |  | Address to check balance
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20.js, line 28

##### Returns:

Promise that will be resolved with the balance of owner address

#### (async) call()

Wrapper for callContractMethod function (@see callContractMethod)

Source:
  - api/contracts/contractMethod.js, line 20

#### (async) call()

Wrapper for callETHMethod function (@see callETHMethod)

Source:
  - api/eth/ethMethod.js, line 18

#### (async) callContractMethod(payload)

Calls specific contract method with provided arguments

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`contractInstance` | object | Contract instance
`interfaceName` | string | Interface name
`method` | string | Method name
`args` | array | Method arguments

Source:
  - api/contracts/contractMethod.js, line 78

##### Returns:

Promise that will be resolved with the result of contract method execution

#### (async) callETHMethod(payload)

Calls specific web3.eth method with provided arguments

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`method` | string | Method name
`args` | array | Method arguments

Source:
  - api/eth/ethMethod.js, line 75

##### Returns:

Promise that will be resolved with the result of web3.eth method execution

#### checkWeb3(payload) → {object}

Checks web3 connection status. Sets web3 globally if it does not exist

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - utils/checkWeb3.js, line 11

##### Returns:

The same (as input) payload object

Type
  object

#### (async) decimals(props)

Gets token decimals

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Named.js, line 46

##### Returns:

Promise that will be resolved with token decimals

#### (async) estimateContractGas(payload)

Gets estimate gas for the contract transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Description
--- | --- | ---
`method` | string | Contract method name
`args` | array | Contract method arguments
`privateKey` | string | Private key (64 hex symbols, without '0x' prefix)
`contractInstance` | object | Contract instance

Source:
  - api/contracts/contractMethod.js, line 183

##### Returns:

Promise (@see getContractGasLimit)

#### (async) estimateETHGas(payload)

Gets estimate gas for the transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | Method properties

Source:
  - api/eth/ethMethod.js, line 162

##### Returns:

Promise that will be resolved with estimate gas value

#### (async) estimateGas(props)

Gets estimate gas for the contract transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Description
--- | --- | ---
`rpcaddr` | string | RPC address of Ethereum node to connect on
`rpcport` | number | RPC port of Ethereum node to connect on
`contractAddress` | string | Contract address
`privateKey` | string | Private key (64 hex symbols, without '0x' prefix)
`method` | string | Method name
`args` | array | Method arguments

Source:
  - api/contracts/erc20.js, line 138

##### Returns:

Promise that will be resolved with estimate gas value

#### (async) estimateGas()

Wrapper for estimateContractGas function (@see estimateContractGas)

Source:
  - api/contracts/contractMethod.js, line 60

#### (async) estimateGas(props)

Gets estimate gas for the transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`to` | string |  | Address of the transaction receiver
`value` | BigNumber |  | Transaction value
`data` | string | <optional> | Transaction data
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 190

##### Returns:

Promise that will be resolved with estimate gas value

#### (async) estimateGas(props)

Gets estimate gas for the contract transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Description
--- | --- | ---
`rpcaddr` | string | RPC address of Ethereum node to connect on
`rpcport` | number | RPC port of Ethereum node to connect on
`contractAddress` | string | Contract address
`privateKey` | string | Private key (64 hex symbols, without '0x' prefix)
`method` | string | Method name
`args` | array | Method arguments

Source:
  - api/contracts/erc20Validatable.js, line 177

##### Returns:

Promise that will be resolved with estimate gas value

#### (async) estimateGas()

Wrapper for estimateETHGas function (@see estimateETHGas)

Source:
  - api/eth/ethMethod.js, line 58

#### filter(optionsopt) → {object}

Gets filter object, that can be used for getting of past logs or watching of new

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`options` | object | <optional> | {} | Filter options ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`fromBlock` | number | string | <optional> | The number of the earliest block
`toBlock` | number | string | <optional> | The number of the latest block
`address` | string | Array.<string> | <optional> | An address(es) to get logs from
`topics` | Array.<string> | <optional> | Allows to manually set the topics for the event filter

Source:
  - utils/logUtils.js, line 10

##### Returns:

(@see https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethfilter)

Type
  object

#### filterETHLogs(payload) → {object}

Initializes filter object

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`options` | object | <optional> | Filter options (@see filter)

Source:
  - api/eth/ethMethod.js, line 131

##### Returns:

The event emitter (@see subscribe)

Type
  object

#### (async) filterLogs()

Wrapper for filterETHLogs function (@see filterETHLogs)

Source:
  - api/eth/ethMethod.js, line 38

#### getAddressFromPrivateKey(privateKey) → {string}

Gets account's address from its private key

##### Parameters:

Name | Type | Description
--- | --- | ---
`privateKey` | string | Private key (64 hex symbols, without '0x' prefix)

Source:
  - api/getAddressFromPrivateKey.js, line 13

##### Returns:

Account's address

Type
  string

#### (async) getBalance(props)

Gets balance of the provided address

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`props` | object | {} | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`address` | string |  | Address to check balance
`defaultBlock` | number | string | <optional> | Redefines of web3.eth.defaultBlock
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 34

##### Returns:

Promise that will be resolved with balance of the provided address

#### (async) getBlock(props)

Returns block data

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`props` | object | {} | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`blockId` | string | <optional> | block number or hash. Or the string "earliest"/"latest"/"pending"
`returnTransactionObjects` | boolean | <optional> | return all transactions as objects if true
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 82

##### Returns:

Promise that will be resolved with block data

#### (async) getBlockNumber(props)

Gets current block number

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`props` | object | {} | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 60

##### Returns:

Promise that will be resolved with current block number

#### (async) getContractGasLimit(method, args)

Gets gas limit for the contract transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`method` | function | Contract method that used to send transaction
`args` | array | Contract method argumets

Source:
  - utils/txUtils.js, line 122

##### Returns:

Promise that will be resolved with estimate gas for sending of the contract transaction

#### getContractInstance(payload) → {object}

Gets contract instance

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Description
--- | --- | ---
`contractAddress` | string | Contract address
`interfaceName` | string | Interface name

Source:
  - api/contracts/getContractInstance.js, line 10

##### Returns:

Contract instance

Type
  object

#### (async) getContractRawTx(payload)

Gets raw contract transaction data

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`contractAddress` | string |  | Contract address
`gasLimit` | BigNumber | <optional> | Gas limit for the contract transaction
`gasPrice` | BigNumber | <optional> | Gas price for the transaction
`nonce` | number | <optional> | Nonce for the transaction
`address` | string | Address of the transaction sender
`contractMethod` | function | Contract method that used to send transaction
`args` | array | Contract method arguments

Source:
  - utils/txUtils.js, line 68

##### Returns:

Promise that will be resolved with raw contract transaction data

#### (async) getEvents(Event, optionsopt)

Gets past events

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`Event` | function |  |  | Function to get past events
`options` | object | <optional> | {} | Event options ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`filter` | object | <optional> | Filter options by indexed event parameters
`fromBlock` | number | string | <optional> | The number of the earliest block
`toBlock` | number | string | <optional> | The number of the latest block
`address` | string | Array.<string> | <optional> | An address(es) to get logs from
`topics` | Array.<string> | <optional> | Allows to manually set the topics for the event filter

Source:
  - utils/eventUtils.js, line 78

##### Returns:

Promise that will be resolved with past events

#### (async) getGasLimit(props)

Gets gas limit for the transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | Properties of the web3.eth.estimateGas function

Source:
  - utils/txUtils.js, line 106

##### Returns:

Promise that will be resolved with estimate gas for sending of the transaction

#### (async) getLogs(optionsopt)

Gets past logs

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`options` | object | <optional> | {} | Filter options ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`fromBlock` | number | string | <optional> | The number of the earliest block
`toBlock` | number | string | <optional> | The number of the latest block
`address` | string | Array.<string> | <optional> | An address(es) to get logs from
`topics` | Array.<string> | <optional> | Allows to manually set the topics for the event filter

Source:
  - utils/logUtils.js, line 27

##### Returns:

Promise that will be resolved with past logs

#### (async) getLogsFilter(props)

Returns object for filtering of logs

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`options` | object | <optional> | Filter options (@see filter)
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 154

##### Returns:

Promise that will be resolved with the filter object (@see filter)

#### (async) getPastContractEvents(payload)

Gets past contract events

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`event` | string |  | Event name
`options` | object | <optional> | Event options (@see getEvents)
`contractInstance` | object | Contract instance

Source:
  - api/contracts/contractMethod.js, line 162

##### Returns:

Promise that will be resolved with past events (@see getEvents)

#### (async) getPastETHLogs(payload)

Gets past ETH logs

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`options` | object | <optional> | Event options (@see getLogs)

Source:
  - api/eth/ethMethod.js, line 146

##### Returns:

Promise that will be resolved with past logs (@see getLogs)

#### (async) getPastEvents()

Wrapper for getPastContractEvents function (@see getPastContractEvents)

Source:
  - api/contracts/contractMethod.js, line 50

#### (async) getPastEvents(props)

Gets past events

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`event` | string |  | Event name (@see subscribe)
`options` | object | <optional> | Event options (@see subscribe)
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20.js, line 118

##### Returns:

Promise that will be resolved with the event logs (@see getPast)

#### (async) getPastLogs(props)

Gets past events

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`options` | object | <optional> | Logs options (@see filter)
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 172

##### Returns:

Promise that will be resolved with the event logs (@see getLogs)

#### (async) getPastLogs()

Wrapper for getPastETHLogs function (@see getPastETHLogs)

Source:
  - api/eth/ethMethod.js, line 48

#### (async) getRawTx(props)

Gets raw transaction data

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | Properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`address` | string |  | Address of the transaction sender
`to` | string |  | Address of the transaction receiver
`value` | BigNumber |  | Transaction value
`gasLimit` | BigNumber | <optional> | Gas limit for the transaction
`gasPrice` | BigNumber | <optional> | Gas price for the transaction
`nonce` | number | <optional> | Nonce for the transaction
`data` | string | <optional> | Transaction data

Source:
  - utils/txUtils.js, line 31

##### Returns:

Promise that will be resolved with raw transaction data

#### (async) getTransaction(props)

Returns transaction data

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`props` | object | {} | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`transactionHash` | string |  | Transaction hash
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 108

##### Returns:

Promise that will be resolved with transaction data

#### (async) getTransactionReceipt(props)

Returns the receipt of a transaction

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`props` | object | {} | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`transactionHash` | string |  | Transaction hash
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 131

##### Returns:

Promise that will be resolved with transaction receipt

#### (async) isApproveAllowed(props)

Gets isApproveAllowed flag

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`from` | string |  | Sender address
`spender` | string |  | Spender address
`value` | BigNumber |  | Transaction value
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Validatable.js, line 92

##### Returns:

Promise that will be resolved with the isApproveAllowed flag

#### (async) isApprovedSpendingAllowed(props)

Gets isApprovedSpendingAllowed flag

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`from` | string |  | Sender address
`spender` | string |  | Spender address
`value` | BigNumber |  | Transaction value
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Validatable.js, line 120

##### Returns:

Promise that will be resolved with the isApprovedSpendingAllowed flag

#### (async) isReceivingAllowed(props)

Gets isReceivingAllowed flag

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`account` | string |  | Account address
`value` | BigNumber |  | Transaction value
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Validatable.js, line 10

##### Returns:

Promise that will be resolved with the isReceivingAllowed flag

#### (async) isSpendingAllowed(props)

Gets isSpendingAllowed flag

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`account` | string |  | Account address
`value` | BigNumber |  | Transaction value
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Validatable.js, line 37

##### Returns:

Promise that will be resolved with the isSpendingAllowed flag

#### (async) isTransferAllowed(props)

Gets isTransferAllowed flag

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`from` | string |  | Sender address
`to` | string |  | Receiver address
`value` | BigNumber |  | Transaction value
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Validatable.js, line 64

##### Returns:

Promise that will be resolved with the isTransferAllowed flag

#### (async) isTransferFromAllowed(props)

Gets isTransferFromAllowed flag

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`spender` | string |  | Spender address
`from` | string |  | Sender address
`to` | string |  | Receiver address
`value` | BigNumber |  | Transaction value
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Validatable.js, line 148

##### Returns:

Promise that will be resolved with the isTransferFromAllowed flag

#### memoize(fn)

Caches result of some function

##### Parameters:

Name | Type | Description
--- | --- | ---
`fn` | function | Function to memoize

Source:
  - utils/memoize.js, line 6

##### Returns:

Result from cache (if exists) or result of the provided function excecution

#### (async) name(props)

Gets token name

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Named.js, line 10

##### Returns:

Promise that will be resolved with the token name

#### (async) sendContractTransaction(payload)

Sends contract transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Description
--- | --- | ---
`privateKey` | string | Private key (64 hex symbols, without '0x' prefix)
`contractInstance` | object | Contract instance
`interfaceName` | string | Interface name
`method` | string | Method name
`args` | array | Method arguments

Source:
  - api/contracts/contractMethod.js, line 103

##### Returns:

Promise that will be resolved with the hash of the contract transaction

#### (async) sendETHTransaction(payload)

Sends transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | Method properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`privateKey` | string |  | Private key (64 hex symbols, without '0x' prefix)
`to` | string |  | Address of the transaction receiver
`value` | BigNumber |  | Transaction value
`gasLimit` | BigNumber | <optional> | Gas limit for the transaction
`gasPrice` | BigNumber | <optional> | Gas price for the transaction
`nonce` | number | <optional> | Nonce for the transaction
`data` | string | <optional> | Transaction data

Source:
  - api/eth/ethMethod.js, line 98

##### Returns:

Promise that will be resolved with the hash of the transaction

#### (async) sendTransaction(props)

Sends transaction

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`privateKey` | string |  | Private key (64 hex symbols, without '0x' prefix)
`to` | string |  | Address of the transaction receiver
`value` | BigNumber |  | Transaction value (in wei)
`gasLimit` | BigNumber | <optional> | Gas limit for the transaction
`gasPrice` | BigNumber | <optional> | Gas price for the transaction
`nonce` | number | <optional> | Nonce for the transaction
`data` | string | <optional> | Transaction data
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/eth/index.js, line 10

##### Returns:

Promise that will be resolved with the hash of created transaction

#### (async) sendTransaction()

Wrapper for sendContractTransaction function (@see sendContractTransaction)

Source:
  - api/contracts/contractMethod.js, line 30

#### (async) sendTransaction()

Wrapper for sendETHTransaction function (@see sendETHTransaction)

Source:
  - api/eth/ethMethod.js, line 28

#### signTx(rawTx, privateKey) → {string}

Signs raw transaction data with the specified private key

##### Parameters:

Name | Type | Description
--- | --- | ---
`rawTx` | object | Transaction data
`privateKey` | string | Private key (64 hex symbols, without '0x' prefix)

Source:
  - utils/txUtils.js, line 13

##### Returns:

Serialized string of signed transaction

Type
  string

#### subscribe(Event, optionsopt, callbackopt) → {object}

Subscribes to provided event

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`Event` | function |  |  | Function for event subscribing
`options` | object | <optional> | {} | Event options ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`filter` | object | <optional> | Filter options by indexed event parameters
`fromBlock` | number | string | <optional> | The number of the earliest block
`toBlock` | number | string | <optional> | The number of the latest block
`address` | string | Array.<string> | <optional> | An address(es) to get logs from
`topics` | Array.<string> | <optional> | Allows to manually set the topics for the event filter
`callback` | eventCallback | <optional> |  | Callback which fired for each event or error

Source:
  - utils/eventUtils.js, line 18

##### Returns:

The event emitter has the following events:
- data: Fires on each incoming event with the event object as argument
- error: Fires when an error in the subscription occours

Type
  object

#### subscribeToContractEvent(payload) → {object}

Subscribes to specific contract event

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`options` | object | <optional> | Event options (@see subscribe)
`callback` | eventCallback | <optional> | Event callback (@see subscribe)
`contractInstance` | object | Contract instance
`method` | string | Event name

Source:
  - api/contracts/contractMethod.js, line 141

##### Returns:

The event emitter (@see subscribe)

Type
  object

#### (async) subscribeToEvent()

Wrapper for subscribeToContractEvent function (@see subscribeToContractEvent)

Source:
  - api/contracts/contractMethod.js, line 40

#### (async) symbol(props)

Gets token symbol

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20Named.js, line 28

##### Returns:

Promise that will be resolved with the token symbol

#### (async) totalSupply(props)

Gets total supply of tokens

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20.js, line 10

##### Returns:

Promise that will be resolved with the total supply of tokens

#### (async) Transfer(props)

Subscribes to Transfer event

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`options` | object | <optional> | Event options (@see subscribe)
`callback` | function | <optional> | Event callback (@see subscribe)
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20.js, line 78

##### Returns:

Promise that will be resolved with the event emitter (@see subsribe)

#### (async) transfer(props)

Transfers tokens

##### Parameters:

Name | Type | Description
--- | --- | ---
`props` | object | API function properties ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`rpcaddr` | string |  | RPC address of Ethereum node to connect on
`rpcport` | number |  | RPC port of Ethereum node to connect on
`contractAddress` | string |  | Contract address
`privateKey` | string |  | Private key (64 hex symbols, without '0x' prefix)
`to` | string |  | Address of tokens receiver
`value` | BigNumber |  | Transaction value
`gasLimit` | BigNumber | <optional> | Gas limit for the transaction
`gasPrice` | BigNumber | <optional> | Gas price for the transaction
`nonce` | number | <optional> | Nonce for the transaction
`ssl` | boolean | <optional> | Defines using of ssl for connection or not

Source:
  - api/contracts/erc20.js, line 47

##### Returns:

Promise that will be resolved with the hash of created contract transaction

#### (async) validate(payload)

Validates input parameters by schema

##### Parameters:

Name | Type | Description
--- | --- | ---
`payload` | object | Payload object ###### Properties
Name | Type | Description
--- | --- | ---
`props` | object | API function properties
`interfaceName` | string | Interface name
`method` | string | API function name
`args` | array | API function arguments

Source:
  - validation/validate.js, line 11

##### Returns:

Promise that will be resolved with received payload comprising validated properties

### Type Definitions

#### BigNumber

##### Type:

- Object

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`isBigNumber` | boolean | <optional> | type identifier, optional, because supported from v3.1.0
`c` | Array.<number> |  | coefficient
`e` | number |  | exponent
`s` | number |  | sign

Source:
  - validation/validationRules.js, line 8

#### eventCallback(error, event)

##### Parameters:

Name | Type | Description
--- | --- | ---
`error` | Object |
`event` | Object |

Source:
  - utils/eventUtils.js, line 11

### Events

#### subscribeDataEvent

Data event

##### Type:

- object

Source:
  - utils/eventUtils.js, line 62

#### subscribeErrorEvent

Error event

##### Type:

- object

Source:
  - utils/eventUtils.js, line 47