Menu

Class: JsonRpc

Hierarchy

  • JsonRpc

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new JsonRpc(endpoint: string, args: object): JsonRpc

Parameters:

Name Type Default Description
endpoint string - -
args object {} fetch: browsers: leave null or undefined * node: provide an implementation

Returns: JsonRpc

Properties

endpoint

endpoint: string


fetchBuiltin

fetchBuiltin: function

Type declaration:

▸ (input?: Request | string, init?: RequestInit): Promise‹Response›

Parameters:

Name Type
input? Request | string
init? RequestInit

Methods

db_size_get

db_size_get(): Promise‹any›

Returns: Promise‹any›


fetch

fetch(path: string, body: any): Promise‹any›

Parameters:

Name Type
path string
body any

Returns: Promise‹any›


getRawAbi

getRawAbi(accountName: string): Promise‹BinaryAbi

Parameters:

Name Type
accountName string

Returns: Promise‹BinaryAbi


getRequiredKeys

getRequiredKeys(args: AuthorityProviderArgs): Promise‹string[]›

Parameters:

Name Type
args AuthorityProviderArgs

Returns: Promise‹string[]›


get_abi

get_abi(accountName: string): Promise‹GetAbiResult

Parameters:

Name Type
accountName string

Returns: Promise‹GetAbiResult


get_account

get_account(accountName: string): Promise‹any›

Parameters:

Name Type
accountName string

Returns: Promise‹any›


get_block

get_block(blockNumOrId: number | string): Promise‹GetBlockResult

Parameters:

Name Type
blockNumOrId number | string

Returns: Promise‹GetBlockResult


get_block_header_state

get_block_header_state(blockNumOrId: number | string): Promise‹any›

Parameters:

Name Type
blockNumOrId number | string

Returns: Promise‹any›


get_code

get_code(accountName: string): Promise‹GetCodeResult

Parameters:

Name Type
accountName string

Returns: Promise‹GetCodeResult


get_currency_balance

get_currency_balance(code: string, account: string, symbol: string): Promise‹any›

Parameters:

Name Type Default
code string -
account string -
symbol string null

Returns: Promise‹any›


get_currency_stats

get_currency_stats(code: string, symbol: string): Promise‹any›

Parameters:

Name Type
code string
symbol string

Returns: Promise‹any›


get_info

get_info(): Promise‹GetInfoResult

Returns: Promise‹GetInfoResult


get_producer_schedule

get_producer_schedule(): Promise‹any›

Returns: Promise‹any›


get_producers

get_producers(json: boolean, lowerBound: string, limit: number): Promise‹any›

Parameters:

Name Type Default
json boolean true
lowerBound string ""
limit number 50

Returns: Promise‹any›


get_raw_code_and_abi

get_raw_code_and_abi(accountName: string): Promise‹GetRawCodeAndAbiResult

Parameters:

Name Type
accountName string

Returns: Promise‹GetRawCodeAndAbiResult


get_table_by_scope

get_table_by_scope(__namedParameters: object): Promise‹any›

Parameters:

Name Type
__namedParameters object

Returns: Promise‹any›


get_table_rows

get_table_rows(__namedParameters: object): Promise‹any›

Parameters:

Name Type
__namedParameters object

Returns: Promise‹any›


history_get_actions

history_get_actions(accountName: string, pos: number, offset: number): Promise‹any›

Parameters:

Name Type Default
accountName string -
pos number null
offset number null

Returns: Promise‹any›


history_get_controlled_accounts

history_get_controlled_accounts(controllingAccount: string): Promise‹any›

Parameters:

Name Type
controllingAccount string

Returns: Promise‹any›


history_get_key_accounts

history_get_key_accounts(publicKey: string): Promise‹any›

Parameters:

Name Type
publicKey string

Returns: Promise‹any›


history_get_transaction

history_get_transaction(id: string, blockNumHint: number): Promise‹any›

Parameters:

Name Type Default
id string -
blockNumHint number null

Returns: Promise‹any›


push_transaction

push_transaction(__namedParameters: object): Promise‹any›

Parameters:

Name Type
__namedParameters object

Returns: Promise‹any›