Conflux

Classes

Conflux
The Client class that provides an interface to the Conflux network.

Typedefs

Conflux

The Client class that provides an interface to the Conflux network.
Kind: global class

new Conflux([options])

Param
Type
Description
[options]
Conflux and Provider constructor options.
Example
> const { Conflux } = require('js-conflux-sdk');
> const conflux = new Conflux({url:'https://test.confluxrpc.com', networkId: 1});
Example
> const conflux = new Conflux({
url: 'http://localhost:8000',
defaultGasPrice: 100,
logger: console,
});

conflux.version : string

Kind: instance property of Conflux

conflux.provider : BaseProvider | WechatProvider | HttpProvider | WebsocketProvider

Provider for rpc call
Kind: instance property of Conflux

conflux.wallet : Wallet

Wallet for sendTransaction to get Account by from field
Kind: instance property of Conflux

conflux.defaultGasPrice : number | string

Deprecated
Default gas price for following methods:
  • Conflux.sendTransaction
Kind: instance property of Conflux

conflux.defaultGasRatio : number

If transaction.gas is undefined, gas will be set by estimate, cause gas used might be change during estimateGasAndCollateral and sendTransaction, estimate value need to multiply by defaultGasRatio (>1.0) in case of gas not enough.
transaction.gas = estimate.gasUsed * defaultGasRatio
Default gas price for following methods:
  • Conflux.sendTransaction
Kind: instance property of Conflux

conflux.defaultStorageRatio : number

If transaction.storageLimit is undefined, storageLimit will be set by estimate, cause storage limit might be change during estimateGasAndCollateral and sendTransaction, estimate value need to multiply by defaultStorageRatio (>1.0) in case of storageLimit not enough.
transaction.storageLimit = estimate.storageCollateralized * defaultStorageRatio
Default gas price for following methods:
  • Conflux.sendTransaction
Kind: instance property of Conflux

conflux.pos : PoS

pos RPC methods
Kind: instance property of Conflux

conflux.trace : Trace

trace RPC methods
Kind: instance property of Conflux

conflux.txpool : TxPool

txpool RPC methods
Kind: instance property of Conflux

conflux.cfx : CFX

cfx RPC methods
Kind: instance property of Conflux

conflux.advanced : AdvancedRPCUtilities

Advanced RPC compose methods
Kind: instance property of Conflux

conflux.request()

Different kind provider API wrapper
Kind: instance method of Conflux

conflux.Contract(options) ⇒ Contract

A shout cut for new Contract(options, conflux);
Kind: instance method of Conflux
Param
Type
Description
options
object

conflux.InternalContract(name) ⇒ Contract

Create internal contract by default abi and address
Kind: instance method of Conflux
Param
Type
Description
name
"AdminControl" | "SponsorWhitelistControl" | "Staking" | "PoSRegister" | "CrossSpaceCall"
Internal contract name
Example
> conflux.InternalContract('AdminControl')
{
constructor: [Function: bound call],
abi: ContractABI { * },
address: '0x0888000000000000000000000000000000000000',
destroy: [Function: bound call],
getAdmin: [Function: bound call],
setAdmin: [Function: bound call],
'destroy(address)': [Function: bound call],
'0x00f55d9d': [Function: bound call],
'getAdmin(address)': [Function: bound call],
'0x64efb22b': [Function: bound call],
'setAdmin(address,address)': [Function: bound call],
'0xc55b6bb7': [Function: bound call]
}

conflux.CRC20(address) ⇒ Contract

Create an token CRC20 contract with standard CRC20 abi
Kind: instance method of Conflux Returns: Contract - A token contract instance
Param
Type
address
string

conflux.BatchRequest() ⇒ BatchRequester

Return a BatchRequester instance which can used to build batch request and decode response data
Kind: instance method of Conflux Returns: BatchRequester - - A BatchRequester instance

conflux.close()

close connection.
Kind: instance method of Conflux Example
> conflux.close();

conflux.updateNetworkId()

Update conflux networkId from RPC
Kind: instance method of Conflux

conflux.getClientVersion() ⇒ Promise.<string>

Get node client version
Kind: instance method of Conflux

conflux.getSupplyInfo([epochNumber]) ⇒ Promise.<SupplyInfo>

Get supply info
Kind: instance method of Conflux Returns: Promise.<SupplyInfo> - Return supply info
  • totalIssued BigInt: Total issued balance in Drip
  • totalStaking BigInt: Total staking balance in Drip
  • totalCollateral BigInt: Total collateral balance in Drip
Param
Type
Default
Description
[epochNumber]
string | number
"'latest_state'"
Example
> await conflux.getSupplyInfo()
{
totalCirculating: 28953062500000000000000n,
totalCollateral: 28953062500000000000000n,
totalIssued: 5033319899279074765657343554n,
totalStaking: 25026010834970490328077641n
}

conflux.getStatus() ⇒ Promise.<ChainStatus>

Get status
Kind: instance method of Conflux Returns: Promise.<ChainStatus> - Status information object
  • chainId number: Chain id
  • epochNumber number: Epoch number
  • blockNumber number: Block number
  • pendingTxNumber number: Pending transaction number
  • bestHash string: The block hash of best pivot block Example
> await conflux.getStatus()
{
chainId: 1029,
networkId: 1029,
epochNumber: 1117476,
blockNumber: 2230973,
pendingTxNumber: 4531,
bestHash: '0x8d581f13fa0548f2751450a7dabd871777875c9ccdf0d8bd629e07a7a5a7917a'
}

conflux.getGasPrice() ⇒ Promise.<BigInt>

Returns the current price per gas in Drip.
Kind: instance method of Conflux Returns: Promise.<BigInt> - Gas price in drip. Example
> await conflux.getGasPrice();
1n

conflux.getInterestRate([epochNumber]) ⇒ Promise.<BigInt>

Returns the interest rate of given parameter.
Kind: instance method of Conflux Returns: Promise.<BigInt> - The interest rate of given parameter.
Param
Type
Default
Description
[epochNumber]
string | number
"'latest_state'"
Example
> await conflux.getInterestRate();
2522880000000n

conflux.getAccumulateInterestRate([epochNumber]) ⇒ Promise.<BigInt>

Returns the accumulate interest rate of given parameter.
Kind: instance method of Conflux Returns: Promise.<BigInt> - The accumulate interest rate of given parameter.
Param
Type
Default
Description
[epochNumber]
string | number
"'latest_state'"
Example
> await conflux.getAccumulateInterestRate()
76357297457647044505744908994993n

conflux.getAccount(address, [epochNumber]) ⇒ Promise.<Account>

Return account related states of the given account
Kind: instance method of Conflux Returns: Promise.<Account> - Return the states of the given account:
  • balance BigInt: the balance of the account.
  • nonce BigInt: the nonce of the account's next transaction.
  • codeHash string: the code hash of the account.
  • stakingBalance BigInt: the staking balance of the account.
  • collateralForStorage BigInt: the collateral storage of the account.
  • accumulatedInterestReturn BigInt: accumulated unterest return of the account.
  • admin string: admin of the account.
Param
Type
Default
Description
address
string
address to get account.
[epochNumber]
string | number
"'latest_state'"
Example
> await conflux.getAccount('cfxtest:aasb661u2r60uzn5h0c4h63hj76wtgf552r9ghu7a4');
{
accumulatedInterestReturn: 0n,
balance: 824812401057514588670n,
collateralForStorage: 174187500000000000000n,
nonce: 1449n,
stakingBalance: 0n,
admin: 'CFXTEST:TYPE.NULL:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6F0VRCSW',
codeHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'
}

conflux.getBalance(address, [epochNumber]) ⇒ Promise.<BigInt>

Returns the balance of the account of given address.
Kind: instance method of Conflux Returns: Promise.<BigInt> - The balance in Drip.
Param
Type
Default
Description
address
string
The address to get the balance of.
[epochNumber]
string | number
"'latest_state'"
Example
> await conflux.getBalance("cfxtest:aasb661u2r60uzn5h0c4h63hj76wtgf552r9ghu7a4");
824812401057514588670n

conflux.getStakingBalance(address, [epochNumber]) ⇒ Promise.<BigInt>

Returns the balance of the staking account of given address.
Kind: instance method of Conflux Returns: Promise.<BigInt> - The staking balance in Drip.
Param
Type
Default
Description
address
string
Address to check for staking balance.
[epochNumber]
string | number
"'latest_state'"
Example
> await conflux.getStakingBalance('cfxtest:aasb661u2r60uzn5h0c4h63hj76wtgf552r9ghu7a4', 'latest_state');
0n

conflux.getNextNonce(address, [epochNumber]) ⇒ Promise.<BigInt>

Returns the next nonce should be used by given address.
Kind: instance method of Conflux Returns: Promise.<BigInt> - The next nonce should be used by given address.
Param
Type
Description
address
string
The address to get the numbers of transactions from.
[epochNumber]
string | number
Example
> await conflux.getNextNonce("cfxtest:aasb661u2r60uzn5h0c4h63hj76wtgf552r9ghu7a4");
1449n

conflux.getAdmin(address, [epochNumber]) ⇒ Promise.<string>

Returns the admin of given contract.
Kind: instance method of Conflux Returns: Promise.<string> - Address to admin, or null if the contract does not exist.
Param
Type
Default
Description
address
string
Address to contract.
[epochNumber]
string | number
"'latest_state'"
Example
> conflux.getAdmin('cfxtest:achc8nxj7r451c223m18w2dwjnmhkd6rxa2gc31euw')
"CFXTEST:TYPE.USER:AASB661U2R60UZN5H0C4H63HJ76WTGF552R9GHU7A4"

conflux.getVoteList(address, [epochNumber]) ⇒ Promise.<Array.<Vote>>

Returns vote list of the given account.
Kind: instance method of Conflux Returns: Promise.<Array.<Vote>> - Vote list
  • array:
    • amount BigInt: This is the number of tokens should be locked before
    • unlockBlockNumber number: This is the timestamp when the vote right will be invalid, measured in, the number of past blocks.
Param
Type
Default
Description
address
string
Address to contract.
[epochNumber]
string | number
"'latest_state'"

conflux.getDepositList(address, [epochNumber]) ⇒ Promise.<Array.<Deposit>>

Returns deposit list of the given account.
Kind: instance method of Conflux Returns: Promise.<Array.<Deposit>> - Deposit list
  • array:
    • amount BigInt: the number of tokens deposited
    • accumulatedInterestRate: BigInt: the accumulated interest rate at the time of the deposit
    • depositTime number: the time of the deposit
Param
Type
Default
Description
address
string
Address to contract.
[epochNumber]
string | number
"'latest_state'"

conflux.getEpochNumber([epochNumber]) ⇒ Promise.<number>

Returns the epoch number of given parameter.
Kind: instance method of Conflux Returns: Promise.<number> - integer of the current epoch number of given parameter.
Param
Type
Default
Description
[epochNumber]
string | number
"'latest_state'"
Example
> await conflux.getEpochNumber();
443

conflux.getBlockByEpochNumber(epochNumber, [detail]) ⇒ Promise.<(Block|null)>

Returns information about a block by epoch number.
Kind: instance method of Conflux Returns: Promise.<(Block|null)> - See getBlockByHash
Param
Type
Default
Description
epochNumber
string | number
[detail]
boolean
false
If true it returns the full transaction objects, if false only the hashes of the transactions.
Example
> await conflux.getBlockByEpochNumber('latest_mined', true);
{...}

conflux.getBlockByBlockNumber(blockNumber, [detail]) ⇒ Promise.<(Block|null)>

Returns information about a block by block number.
Kind: instance method of Conflux Returns: Promise.<(Block|null)> - See getBlockByHash
Param
Type
Default
Description
blockNumber
string | number
[detail]
boolean
false
If true it returns the full transaction objects, if false only the hashes of the transactions.
Example
> await conflux.getBlockByBlockNumber('0x123', true);
{...}

conflux.getBlocksByEpochNumber(epochNumber) ⇒ Promise.<Array.<string>>

Returns hashes of blocks located in some epoch.
Kind: instance method of Conflux Returns: Promise.<Array.<string>> - Array of block hashes, sorted by execution(topological) order.
Param
Type
Description
epochNumber
string | number
Example
> await conflux.getBlocksByEpochNumber(0);
['0xe677ae5206a5d67d9efa183d867b4b986ed82a3e62174a1488cf8364d58534ec']

conflux.getBlockRewardInfo(epochNumber) ⇒ Promise.<Array.<RewardInfo>>

Get epoch blocks reward info
Kind: instance method of Conflux Returns: Promise.<Array.<RewardInfo>> - List of block reward info
  • blockHash string: Hash of the block.
  • author string: The address of the beneficiary to whom the mining rewards were given.
  • baseReward BigInt: Block base reward in Drip
  • totalReward BigInt: Block total reward in Drip
  • txFee BigInt: Total gas fee of block transaction
Param
Type
Description
epochNumber
string | number
Example
> await conflux.getBlockRewardInfo(6);
[
{
baseReward: 6993700000000000000n,
totalReward: 6993700031741486703n,
txFee: 0n,
author: 'CFXTEST:TYPE.USER:AATXETSP0KDARPDB5STDYEX11DR3X6SB0J2XZETSG6',
blockHash: '0x73cd891aea310e2c0b8644de91746c7353cebfffb780126bc06101b20689c893'
},
{
baseReward: 6997200000000000000n,
totalReward: 6997200031760371742n,
txFee: 3000000n,
author: 'CFXTEST:TYPE.USER:AATXETSP0KDARPDB5STDYEX11DR3X6SB0J2XZETSG6',
blockHash: '0xaf4136d04e9e2cc470703251ec46f5913ab7955d526feed43771705e89c77390'
}
]

conflux.getBestBlockHash() ⇒ Promise.<string>

Returns the hash of best block.
Kind: instance method of Conflux Returns: Promise.<string> - hash of the best block. Example
> await conflux.getBestBlockHash();
"0xb8bb355bfeaf055a032d5b7df719917c090ee4fb6fee42383004dfe8911d7daf"

conflux.getBlockByHash(blockHash, [detail]) ⇒ Promise.<(Block|null)>

Returns information about a block by hash.
Kind: instance method of Conflux Returns: Promise.<(Block|null)> - A block object, or null when no block was found:
  • adaptive boolean: If true the weight of the block is adaptive under GHAST rule, if false otherwise.
  • blame number: If 0, then no blocks are blamed on its parent path, If greater than 0, then the nearest blamed block on the parent path is blame steps away.
  • deferredLogsBloomHash string: The bloom hash of deferred logs.
  • deferredReceiptsRoot string: The hash of the receipts of the block after deferred execution.
  • deferredStateRoot string: The root of the final state trie of the block after deferred execution.
  • difficulty string: Integer string of the difficulty for this block.
  • epochNumber number|null: The current block epoch number in the client's view. null when it's not in best block's past set and the epoch number is not determined.
  • gasLimit BigInt: The maximum gas allowed in this block.
  • hash string|null: Hash of the block. null when its pending block.
  • height number: The block heights. null when its pending block.
  • miner string: The address of the beneficiary to whom the mining rewards were given.
  • nonce string: Hash of the generated proof-of-work. null when its pending block.
  • parentHash string: Hash of the parent block.
  • powQuality string:Hash of the generated proof-of-work. null when its pending block.
  • refereeHashes string[]: Array of referee hashes.
  • size number: Integer the size of this block in bytes.
  • timestamp number: The unix timestamp for when the block was collated.
  • transactions string[]|object[]: Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • transactionsRoot string: The hash of the transactions of the block.
Param
Type
Default
Description
blockHash
string
hash of a block.
[detail]
boolean
false
If true it returns the full transaction objects, if false only the hashes of the transactions.
Example
> await conflux.getBlockByHash('0xaf4136d04e9e2cc470703251ec46f5913ab7955d526feed43771705e89c77390');
{
epochNumber: 6,
blame: 0,
height: 6,
size: 352,
timestamp: 1603901780,
gasLimit: 30000000n,
gasUsed: 61118n,
difficulty: 20000000000n,
transactions: [
'0xaad69c8c814aec3e418b68f60917c607920a531e7082dd2c642323b43ecadb94',
'0xbf7110474779ba2404433ef39a24cb5b277186ef1e6cb199b0b60907b029a1ce'
],
adaptive: false,
deferredLogsBloomHash: '0xd397b3b043d87fcd6fad1291ff0bfd16401c274896d8c63a923727f077b8e0b5',
deferredReceiptsRoot: '0x09f8709ea9f344a810811a373b30861568f5686e649d6177fd92ea2db7477508',
deferredStateRoot: '0x50c0fcbc5bafa7d1dba7b19c87629830106a6be8d0adf505cdc656bb43535d69',
hash: '0xaf4136d04e9e2cc470703251ec46f5913ab7955d526feed43771705e89c77390',
miner: 'CFXTEST:TYPE.USER:AATXETSP0KDARPDB5STDYEX11DR3X6SB0J2XZETSG6',
nonce: '0x17d86f2f6',
parentHash: '0xc8a412b4b77b48d61f694975f032d109f26bb0f9fc02e4b221d67a382fab386b',
powQuality: '0x5a0f86a6f4',
refereeHashes: [
'0x73cd891aea310e2c0b8644de91746c7353cebfffb780126bc06101b20689c893'
],
transactionsRoot: '0xd2f08676484ba2a3738194f44542eb29fb290b8ed74bf007f132fe51d89b2e7c'
}

conflux.getBlockByHashWithPivotAssumption(blockHash, pivotBlockHash, epochNumber) ⇒ Promise.<(Block|null)>

Get block by blockHash if pivot block of epochNumber is pivotBlockHash.
Kind: instance method of Conflux Returns: Promise.<(Block|null)> - See getBlockByHash
Param
Type
Description
blockHash
string
Block hash which epochNumber expect to be epochNumber.
pivotBlockHash
string
Block hash which expect to be the pivot block of epochNumber.
epochNumber
number
Epoch number

conflux.getConfirmationRiskByHash(blockHash) ⇒ Promise.<(number|null)>

Get the risk of the block could be reverted. All block in one same epoch returned same risk number
Kind: instance method of Conflux Returns: Promise.<(number|null)> - Number >0 and <1
Param
Type
Description
blockHash
string
Hash of a block
Example
> await conflux.getConfirmationRiskByHash('0xaf4136d04e9e2cc470703251ec46f5913ab7955d526feed43771705e89c77390')
1e-8

conflux.getTransactionByHash(transactionHash) ⇒ Promise.<(Transaction|null)>

Returns the information about a transaction requested by transaction hash.
Kind: instance method of Conflux Returns: Promise.<(Transaction|null)> - transaction object, or null when no transaction was found:
  • blockHash string: hash of the block where this transaction was in and got executed. null when its pending.
  • contractCreated string|null: address of created contract. null when it's not a contract creating transaction
  • data string: the data send along with the transaction.
  • epochHeight number: epoch height
  • from string: address of the sender.
  • gas BigInt: gas provided by the sender.
  • gasPrice number: gas price provided by the sender in Drip.
  • hash string: hash of the transaction.
  • nonce BigInt: the number of transactions made by the sender prior to this one.
  • r string: ECDSA signature r
  • s string: ECDSA signature s
  • status number: 0 for success, 1 for error occured, null when the transaction is skipped or not packed.
  • storageLimit BigInt: storage limit in bytes
  • chainId number: chain id
  • to string: address of the receiver. null when its a contract creation transaction.
  • transactionIndex number: integer of the transactions's index position in the block. null when its pending.
  • v string: ECDSA recovery id
  • value BigInt: value transferred in Drip.
Param
Type
Description
transactionHash
string
hash of a transaction
Example
> await conflux.getTransactionByHash('0xbf7110474779ba2404433ef39a24cb5b277186ef1e6cb199b0b60907b029a1ce');
{
nonce: 0n,
gasPrice: 10n,
gas: 200000n,
value: 0n,
storageLimit: 1024n,
epochHeight: 0,
chainId: 1029,
v: 1,
status: 0,
transactionIndex: 1,
blockHash: '0xaf4136d04e9e2cc470703251ec46f5913ab7955d526feed43771705e89c77390',
contractCreated: null,
data: '0xfebe49090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000162788589c8e386863f217faef78840919fb2854',
from: 'CFXTEST:TYPE.USER:AATXETSP0KDARPDB5STDYEX11DR3X6SB0J2XZETSG6',
hash: '0xbf7110474779ba2404433ef39a24cb5b277186ef1e6cb199b0b60907b029a1ce',
r: '0x495da01ae9f445847022a8bc7df0198577ba75f88b26699f61afb435bb9c50bc',
s: '0x2291051b1c53db1d6bfe2fb29be1bf512d063e726dc6b98aaf0f2259b7456be0',
to: 'CFXTEST:TYPE.USER:AATXETSP0KDARPDB5STDYEX11DR3X6SB0J2XZETSG6'
}

conflux.getTransactionReceipt(transactionHash) ⇒ Promise.<(TransactionReceipt|null)>

Returns the information about a transaction receipt requested by transaction hash.
Kind: instance method of Conflux Returns: Promise.<(TransactionReceipt|null)> - A transaction receipt object, or null when no transaction was found or the transaction was not executed yet:
  • transactionHash string: Hash of the given transaction.
  • index number: Transaction index within the block.
  • blockHash string: Hash of the block where this transaction was in and got executed.
  • epochNumber number: Epoch number of the block where this transaction was in and got executed.
  • from string: Address of the sender.
  • to string: Address of the receiver. null when its a contract creation transaction.
  • gasUsed number: Gas used the transaction.
  • contractCreated string|null: Address of created contract. null when it's not a contract creating transaction.
  • stateRoot string: Hash of the state root.
  • outcomeStatus number: the outcome status code, 0 was successful, 1 for an error occurred in the execution.
  • logsBloom string: Bloom filter for light clients to quickly retrieve related logs.
  • logs object[]: Array of log objects, which this transaction generated.
  • gasCoveredBySponsor boolean: true if this transaction's gas fee was covered by the sponsor.
  • storageCoveredBySponsor boolean: true if this transaction's storage collateral was covered by the sponsor.
  • storageCollateralized BigInt: the amount of storage collateral this transaction required.
  • storageReleased array: array of storage change objects, each specifying an address and the corresponding amount of storage collateral released
    • address string: address released
    • collaterals BigInt: corresponding amount of storage collateral released
Param
Type
Description
transactionHash
string
Hash of a transaction
Example
> await conflux.getTransactionReceipt('0xbf7110474779ba2404433ef39a24cb5b277186ef1e6cb199b0b60907b029a1ce');
{
index: 1,
epochNumber: 6,
outcomeStatus: 0,
gasUsed: 30559n,
gasFee: 1500000n,
blockHash: '0xaf4136d04e9e2cc470703251ec46f5913ab7955d526feed43771705e89c77390',
contractCreated: null,
from: 'CFXTEST:TYPE.USER:AAJJ1C2XGRKDY8RPG2828UPAN4A5BBSZNYB28K0PHS',
logs: [],
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
stateRoot: '0xd6a7c2c14cb0d1233010acca98e114db5a10e0b94803d23b01a6777b7fd3b2fd',
to: 'CFXTEST:TYPE.CONTRACT:ACB59FK6VRYH8DJ5VYVEHJ9APZHPD72RDP2FVP77R9',
transactionHash: '0xbf7110474779ba2404433ef39a24cb5b277186ef1e6cb199b0b60907b029a1ce',
txExecErrorMsg: null,
gasCoveredBySponsor: false,
storageCoveredBySponsor: false,
storageCollateralized: 0n,
storageReleased: [
address: '0x0000000000000000000000000000000000000001',
collaterals: 640n,
],
}

conflux.sendRawTransaction(hex) ⇒ Promise.<PendingTransaction>

Creates new message call transaction or a contract creation for signed transactions.
Kind: instance method of Conflux Returns: Promise.<PendingTransaction> - The transaction hash, or the zero hash if the transaction is not yet available.
Param
Type
Description
hex
string | Buffer
The signed transaction data.
Example
> await conflux.sendRawTransaction('0xf85f800382520894bbd9e9b...');
"0xbe007c3eca92d01f3917f33ae983f40681182cf618defe75f490a65aac016914"

conflux.sendTransaction(options, [password]) ⇒ Promise.<PendingTransaction>

Sign and send transaction if from field in conflux.wallet, sign by local account and send raw transaction, else call cfx_sendTransaction and sign by remote wallet
Kind: instance method of Conflux Returns: Promise.<PendingTransaction> - The PendingTransaction object.