Beo Network Client

Connection management class that encapsulates REST calls to publicly exposed endpoints of Beo nodes. The methods provided in this class provide information on the Beo Blockchain

new BeoNetworkClient(host)arrow-up-right

Param
Type

host

string

Example

// Connection to a local node
let local_connection = new BeoNetworkClient("http://localhost:3030");

// Connection to a public beacon node
let public_connection = new BeoNetworkClient("https://api.explorer.provable.com/v1");

BeoNetworkClient.setHost(host)arrow-up-right

Set a new host for the networkClient

Param
Type

host

string

Example

// New connection to a public beacon node
let public_connection = BeoNetworkClient.setHost("https://api.explorer.provable.com/v1");

BeoNetworkClient.setAccount(account)arrow-up-right

Set an account

Kind: instance method of BeoNetworkClient

Param
Type

account

Account

Example

BeoNetworkClient.getAccount()arrow-up-right

Return the Beo account used in the node connection

Kind: instance method of BeoNetworkClient Example

BeoNetworkClient.getBlock(height)arrow-up-right

Returns the block contents of the block at the specified block height

Kind: instance method of BeoNetworkClient

Param
Type

height

number

Example

BeoNetworkClient.getBlockRange(start, end)arrow-up-right

Returns a range of blocks between the specified block heights

Kind: instance method of BeoNetworkClient

Param
Type

start

number

end

number

Example

BeoNetworkClient.getProgram(programId)arrow-up-right

Returns the source code of a program

Kind: instance method of BeoNetworkClient

Param
Type

programId

string

Example

BeoNetworkClient.getProgramObject(programId)arrow-up-right

Returns a program object from a program ID or program source code

Kind: instance method of BeoNetworkClient

Param
Type

programId

string

Example

BeoNetworkClient.getProgramImports(programId)arrow-up-right

Returns an object containing the source code of a program and the source code of all programs it imports

Kind: instance method of BeoNetworkClient

Param
Type

programId

string

Example

BeoNetworkClient.getDeploymentTransactionIDForProgram(programId)arrow-up-right

Returns the deployment transaction id associated with the specified program

Kind: instance method of BeoNetworkClient

Param
Type

programId

string

Example

BeoNetworkClient.getDeploymentTransactionForProgram(programId)arrow-up-right

Returns the deployment transaction associated with a specified program

Kind: instance method of BeoNetworkClient

Param
Type

programId

string

Last updated