资讯专栏INFORMATION COLUMN

eosjs 文档(JSON-RPC)

dockerclub / 1270人阅读

JSON-RPC

JsonRpc

函数

arrayToHex

函数 arrayToHex
arrayToHex(data: Uint8Array): string

定义于eosjs-jsonrpc.ts:11

参数:

名称 类型
data Uint8Array

返回:string

JsonRpc 实现接口

AuthorityProvider

AbiProvider

构造函数
new JsonRpc(endpoint: string, args?: object): JsonRpc

定义于eosjs-jsonrpc.ts:22

参数:

endpoint:string
Default value args:object

fetch

浏览器:保留nullundefined

node:提供实现

名称 类型
(可选的)fetch function

返回:JsonRpc

属性 endpoint

endpoint:string

定义于eosjs-jsonrpc.ts:21

fetchBuiltin

fetchBuiltin:function

定义于eosjs-jsonrpc.ts:22

类型声明
(input?: Request | string, init?: RequestInit): Promise

参数:

名称 类型
(可选的)input Request | string
(可选的)init RequestInit

返回:Promise

方法 db_size_get
db_size_get(): Promise

定义于eosjs-jsonrpc.ts:182

原始调用/v1/db_size/get

返回:Promise

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

定义于eosjs-jsonrpc.ts:42

发布bodyendpoint + path,在可用时在RpcError中抛出详细的错误信息。

参数:

名称 类型
path string
body any

返回:Promise

getRawAbi
getRawAbi(accountName: string): Promise

定义于eosjs-jsonrpc.ts:129

调用/v1/chain/get_raw_code_and_abi并提取不需要的原始wasm代码。

参数:

名称 类型
accountName string

返回:Promise

getRequiredKeys
getRequiredKeys(args: AuthorityProviderArgs): Promise

定义于eosjs-jsonrpc.ts:164

获取满足transaction权限所需的availableKeys子集,实现AuthorityProvider

参数:

名称 类型
args AuthorityProviderArgs

返回:Promise

get_abi
get_abi(account_name: string): Promise

定义于eosjs-jsonrpc.ts:67

原始调用/v1/chain/get_abi

参数:

名称 类型
account_name string

返回:Promise

get_account
get_account(account_name: string): Promise

定义于eosjs-jsonrpc.ts:73

原始调用/v1/chain/get_account

参数:

名称 类型
account_name string

返回:Promise

get_block
get_block(block_num_or_id: number | string): Promise

定义于eosjs-jsonrpc.ts:85

原始调用/v1/chain/get_block

参数:

名称 类型
block_num_or_id number | string

返回:Promise

get_block_header_state
get_block_header_state(block_num_or_id: number | string): Promise

定义于eosjs-jsonrpc.ts:79

原始调用/v1/chain/get_block_header_state

参数:

名称 类型
block_num_or_id number | string

返回:Promise

get_code
get_code(account_name: string): Promise

定义于eosjs-jsonrpc.ts:91

原始调用/v1/chain/get_code

参数:

名称 类型
account_name string

返回:Promise

get_currency_balance
get_currency_balance(code: string, account: string, symbol?: string): Promise

定义于eosjs-jsonrpc.ts:96

原始调用/v1/chain/get_currency_balance

参数:

名称 类型 默认值
code string -
account string -
Default value symbol string null

返回:Promise

get_currency_stats
get_currency_stats(code: string, symbol: string): Promise

定义于eosjs-jsonrpc.ts:101

原始调用/v1/chain/get_currency_stats

参数:

名称 类型
code string
symbol string

返回:Promise

get_info
get_info(): Promise

定义于eosjs-jsonrpc.ts:106

原始调用/v1/chain/get_info

返回:Promise

get_producer_schedule
get_producer_schedule(): Promise

定义于eosjs-jsonrpc.ts:111

原始调用/v1/chain/get_producer_schedule

返回:Promise

get_producers
get_producers(json?: boolean, lower_bound?: string, limit?: number): Promise

定义于eosjs-jsonrpc.ts:117

原始调用/v1/chain/get_producers

参数:

名称 类型 默认值
Default value json boolean true
Default value lower_bound string ""
Default value limit number 50

返回:Promise

get_raw_code_and_abi
get_raw_code_and_abi(account_name: string): Promise

定义于eosjs-jsonrpc.ts:123

原始调用/v1/chain/get_raw_code_and_abi

参数:

名称 类型
account_name string

返回:Promise

get_table_rows
get_table_rows(__namedParameters: object): Promise

定义于eosjs-jsonrpc.ts:136

原始调用/v1/chain/get_table_rows

参数:

__namedParameters:object

名称 类型 默认值
code any -
index_position any 1
json any true
key_type any ""
limit any 10
lower_bound any ""
scope any -
table any -
table_key any ""
upper_bound any ""

返回:Promise

history_get_actions
history_get_actions(account_name: string, pos?: number, offset?: number): Promise

定义于eosjs-jsonrpc.ts:186

原始调用/v1/history/get_actions

参数:

名称 类型 默认值
account_name string -
Default value pos number null
Default value offset number null

返回:Promise

history_get_controlled_accounts
history_get_controlled_accounts(controlling_account: string): Promise

定义于eosjs-jsonrpc.ts:204

原始调用/v1/history/get_controlled_accounts

参数:

名称 类型
controlling_account string

返回:Promise

history_get_key_accounts
history_get_key_accounts(public_key: string): Promise

定义于eosjs-jsonrpc.ts:198

原始调用/v1/history/get_key_accounts

参数:

名称 类型
public_key string

返回:Promise

history_get_transaction
history_get_transaction(id: string, block_num_hint?: number): Promise

定义于eosjs-jsonrpc.ts:192

原始调用/v1/history/get_transaction

参数:

名称 类型 默认值
id Uint8Array -
Default value block_num_hint number null

返回:Promise

push_transaction
push_transaction(__namedParameters: object): Promise

定义于eosjs-jsonrpc.ts:172

推送序列化交易。

参数:

__namedParameters:object

名称 类型
serializedTransaction Uint8Array
signatures string[]

返回:Promise

上一篇:JS-Sig 下一篇:Numeric

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/100624.html

相关文章

  • eosjs 文档(介绍)

    摘要:介绍用于使用与基于的区块链集成的。在浏览器中使用并不安全,只能用于开发目的,在网页上下文之外使用安全保管库,以确保在生产中签名交易时的安全性。错误处理使用处理错误。上一篇文档目录下一篇浏览器 介绍 用于使用EOSIO RPC API与基于EOSIO的区块链集成的Javascript API。 安装 NodeJS依赖 npm install eosjs@beta or yarn add ...

    Forest10 评论0 收藏0
  • eosjs 文档(JS-Sig)

    摘要:类实现接口构造函数定义于参数名称类型描述用于签名的私钥返回属性定义于公钥。方法定义于与保存的私钥关联的公钥。返回定义于签名交易。 JS-Sig 类 JsSignatureProvider JsSignatureProvider 实现接口 SignatureProvider 构造函数 new JsSignatureProvider(privateKeys: string[]): JsSi...

    chengtao1633 评论0 收藏0
  • eosjs 文档(目录)

    摘要:文档用于使用与基于的区块链集成的。重要最近发布了针对的重大改写,一定要锁定你的依赖项。如果你正在寻找以前版本的,可以在这里找到它。指南介绍浏览器交易读取区块链参考接口接口类接口 eosjs 文档 用于使用EOSIO RPC API与基于EOSIO的区块链集成的Javascript API。 重要!最近发布了针对eosjs的重大改写,一定要锁定你的依赖项。 如果你正在寻找以前版本的eos...

    shleyZ 评论0 收藏0
  • eosjs 文档(Numeric)

    摘要:定义于类型声明参数名称类型返回定义于签名数据大小,不包括类型字段。参数名称类型返回定义于如果密钥是旧格式前缀,则将其转换为新格式,保持其他格式不变。参数名称类型返回定义于返回定义于返回定义于将中的无符号十进制数转换为。 Numeric 枚举 KeyType 接口 Key 变量 base58Chars base58Map base64Chars base64Map privateKey...

    superw 评论0 收藏0
  • eosjs 文档(RPC接口)

    摘要:接口接口属性定义于定义于定义于定义于定义于定义于定义于定义于定义于属性定义于定义于定义于属性定义于定义于属性定义于定义于定义于定义于定义于定义于定义于定义于 RPC接口 接口 Abi BlockTaposInfo GetAbiResult GetBlockResult GetCodeResult GetInfoResult GetRawCodeAndAbiResult PushTra...

    call_me_R 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<