Class: JsonRpc
Hierarchy
- JsonRpc
Implements
Index
Constructors
Properties
Methods
- abi_bin_to_json
- abi_json_to_bin
- db_size_get
- fetch
- getRawAbi
- getRequiredKeys
- get_abi
- get_account
- get_accounts_by_authorizers
- get_activated_protocol_features
- get_block
- get_block_header_state
- get_block_info
- get_code
- get_code_hash
- get_currency_balance
- get_currency_stats
- get_info
- get_kv_table_rows
- get_producer_schedule
- get_producers
- get_raw_abi
- get_raw_code_and_abi
- get_scheduled_transactions
- get_table_by_scope
- get_table_rows
- history_get_actions
- history_get_controlled_accounts
- history_get_key_accounts
- history_get_transaction
- push_transaction
- push_transactions
- send_ro_transaction
- send_transaction
- trace_get_block
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?
: any, init?
: any): Promise‹any›
Parameters:
Name | Type |
---|---|
input? |
any |
init? |
any |
Methods
abi_bin_to_json
▸ abi_bin_to_json(code
: string, action
: string, binargs
: string): Promise‹AbiBinToJsonResult›
Parameters:
Name | Type |
---|---|
code |
string |
action |
string |
binargs |
string |
Returns: Promise‹AbiBinToJsonResult›
abi_json_to_bin
▸ abi_json_to_bin(code
: string, action
: string, args
: any[]): Promise‹AbiJsonToBinResult›
Parameters:
Name | Type |
---|---|
code |
string |
action |
string |
args |
any[] |
Returns: Promise‹AbiJsonToBinResult›
db_size_get
▸ db_size_get(): Promise‹DBSizeGetResult›
Returns: Promise‹DBSizeGetResult›
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‹GetAccountResult›
Parameters:
Name | Type |
---|---|
accountName |
string |
Returns: Promise‹GetAccountResult›
get_accounts_by_authorizers
▸ get_accounts_by_authorizers(accounts
: Authorization[], keys
: string[]): Promise‹GetAccountsByAuthorizersResult›
Parameters:
Name | Type |
---|---|
accounts |
Authorization[] |
keys |
string[] |
Returns: Promise‹GetAccountsByAuthorizersResult›
get_activated_protocol_features
▸ get_activated_protocol_features(__namedParameters
: object): Promise‹GetActivatedProtocolFeaturesResult›
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: Promise‹GetActivatedProtocolFeaturesResult›
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‹GetBlockHeaderStateResult›
Parameters:
Name | Type |
---|---|
blockNumOrId |
number | string |
Returns: Promise‹GetBlockHeaderStateResult›
get_block_info
▸ get_block_info(blockNum
: number): Promise‹GetBlockInfoResult›
Parameters:
Name | Type |
---|---|
blockNum |
number |
Returns: Promise‹GetBlockInfoResult›
get_code
▸ get_code(accountName
: string): Promise‹GetCodeResult›
Parameters:
Name | Type |
---|---|
accountName |
string |
Returns: Promise‹GetCodeResult›
get_code_hash
▸ get_code_hash(accountName
: string): Promise‹GetCodeHashResult›
Parameters:
Name | Type |
---|---|
accountName |
string |
Returns: Promise‹GetCodeHashResult›
get_currency_balance
▸ get_currency_balance(code
: string, account
: string, symbol
: string): Promise‹string[]›
Parameters:
Name | Type | Default |
---|---|---|
code |
string | - |
account |
string | - |
symbol |
string | null |
Returns: Promise‹string[]›
get_currency_stats
▸ get_currency_stats(code
: string, symbol
: string): Promise‹GetCurrencyStatsResult›
Parameters:
Name | Type |
---|---|
code |
string |
symbol |
string |
Returns: Promise‹GetCurrencyStatsResult›
get_info
▸ get_info(): Promise‹GetInfoResult›
Returns: Promise‹GetInfoResult›
get_kv_table_rows
▸ get_kv_table_rows(__namedParameters
: object): Promise‹GetTableRowsResult›
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: Promise‹GetTableRowsResult›
get_producer_schedule
▸ get_producer_schedule(): Promise‹GetProducerScheduleResult›
Returns: Promise‹GetProducerScheduleResult›
get_producers
▸ get_producers(json
: boolean, lowerBound
: string, limit
: number): Promise‹GetProducersResult›
Parameters:
Name | Type | Default |
---|---|---|
json |
boolean | true |
lowerBound |
string | "" |
limit |
number | 50 |
Returns: Promise‹GetProducersResult›
get_raw_abi
▸ get_raw_abi(accountName
: string): Promise‹GetRawAbiResult›
Parameters:
Name | Type |
---|---|
accountName |
string |
Returns: Promise‹GetRawAbiResult›
get_raw_code_and_abi
▸ get_raw_code_and_abi(accountName
: string): Promise‹GetRawCodeAndAbiResult›
Parameters:
Name | Type |
---|---|
accountName |
string |
Returns: Promise‹GetRawCodeAndAbiResult›
get_scheduled_transactions
▸ get_scheduled_transactions(json
: boolean, lowerBound
: string, limit
: number): Promise‹GetScheduledTransactionsResult›
Parameters:
Name | Type | Default |
---|---|---|
json |
boolean | true |
lowerBound |
string | "" |
limit |
number | 50 |
Returns: Promise‹GetScheduledTransactionsResult›
get_table_by_scope
▸ get_table_by_scope(__namedParameters
: object): Promise‹GetTableByScopeResult›
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: Promise‹GetTableByScopeResult›
get_table_rows
▸ get_table_rows(__namedParameters
: object): Promise‹GetTableRowsResult›
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: Promise‹GetTableRowsResult›
history_get_actions
▸ history_get_actions(accountName
: string, pos
: number, offset
: number): Promise‹GetActionsResult›
Parameters:
Name | Type | Default |
---|---|---|
accountName |
string | - |
pos |
number | null |
offset |
number | null |
Returns: Promise‹GetActionsResult›
history_get_controlled_accounts
▸ history_get_controlled_accounts(controllingAccount
: string): Promise‹GetControlledAccountsResult›
Parameters:
Name | Type |
---|---|
controllingAccount |
string |
Returns: Promise‹GetControlledAccountsResult›
history_get_key_accounts
▸ history_get_key_accounts(publicKey
: string): Promise‹GetKeyAccountsResult›
Parameters:
Name | Type |
---|---|
publicKey |
string |
Returns: Promise‹GetKeyAccountsResult›
history_get_transaction
▸ history_get_transaction(id
: string, blockNumHint
: number): Promise‹GetTransactionResult›
Parameters:
Name | Type | Default |
---|---|---|
id |
string | - |
blockNumHint |
number | null |
Returns: Promise‹GetTransactionResult›
push_transaction
▸ push_transaction(__namedParameters
: object): Promise‹TransactResult›
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: Promise‹TransactResult›
push_transactions
▸ push_transactions(transactions
: PushTransactionArgs[]): Promise‹TransactResult[]›
Parameters:
Name | Type |
---|---|
transactions |
PushTransactionArgs[] |
Returns: Promise‹TransactResult[]›
send_ro_transaction
▸ send_ro_transaction(__namedParameters
: object, returnFailureTraces
: boolean): Promise‹ReadOnlyTransactResult›
Parameters:
Name | Type | Default |
---|---|---|
__namedParameters |
object | - |
returnFailureTraces |
boolean | false |
Returns: Promise‹ReadOnlyTransactResult›
send_transaction
▸ send_transaction(__namedParameters
: object): Promise‹TransactResult›
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: Promise‹TransactResult›
trace_get_block
▸ trace_get_block(block_num
: number): Promise‹TraceApiGetBlockResult›
Parameters:
Name | Type |
---|---|
block_num |
number |
Returns: Promise‹TraceApiGetBlockResult›