AElf API

AElf

Kind: global class

new AElf(provider)

AElf

Param

Type

Description

provider

Object

the instance of HttpProvider

Example

const aelf = new AElf(new AElf.providers.HttpProvider('https://127.0.0.1:8000/chain'))

aelf.setProvider(provider)

change the provider of the instance of AElf

Kind: instance method of AElf

Param

Type

Description

provider

Object

the instance of HttpProvider

Example

const aelf = new AElf(new AElf.providers.HttpProvider('https://127.0.0.1:8000/chain'));
aelf.setProvider(new AElf.providers.HttpProvider('https://127.0.0.1:8010/chain'))

aelf.reset(keepIsSyncing)

reset

Kind: instance method of AElf

Param

Type

Description

keepIsSyncing

boolean

true/false

Example

// keepIsSyncing = true/false
aelf.reset(keepIsSyncing);

aelf.isConnected() ⇒ boolean

check the rpc node is work or not

Kind: instance method of AElf Returns: boolean - true/false whether can connect to the rpc. Example

aelf.isConnected()
// return true / false

AElf.wallet

wallet tool

Kind: static property of AElf

AElf.pbjs

protobufjs

Kind: static property of AElf

AElf.pbUtils

some method about protobufjs of AElf

Kind: static property of AElf

AElf.version

get the verion of the SDK

Kind: static property of AElf