class

BitShares::Client

Inherits BitShares::GrapheneConnection < Reference < Object

Constructors

new(config_object : BitShares::Config | Nil = nil)
Source

Instance methods

cache

获取关联的 cache 对象。

Source
do_account_create(registrar, referrer, referrer_percent, voting_account, name, owner_public_key, active_public_key, memo_public_key = nil)
Source
do_account_storage_map(account, remove, catalog, key_values)
Source
do_account_storage_map_core(account, account_storage_map_opdata)

OP - 存储账号自定义数据(REMARK:在 custom OP 的 data 字段中存储数据)

Source
do_account_upgrade(account)
Source
do_assert(op_data)
Source
do_asset_create(issuer, symbol : String, precision : UInt8, common_options, bitasset_opts = nil, is_prediction_market = false)
Source
do_asset_publish_feed(publisher_id, core_asset, feeds)

OP - 发布喂价 TODO:ing

Source
do_balance_claim(deposit_to_account, balance_to_claim, balance_owner_key, total_claimed_amount, total_claimed_asset_id)
Source
do_liquidity_pool_create(account, asset_a, asset_b, share_asset, taker_fee_percent, withdrawal_fee_percent)
Source
do_liquidity_pool_delete(account, pool_or_id)
Source
do_liquidity_pool_deposit(account, pool_or_id, amount_a, amount_b)
Source
do_liquidity_pool_exchange(account, pool_or_id, sell_amount, sell_asset_id, receive_amount, receive_asset_id)
Source
do_liquidity_pool_withdraw(account, pool_or_id, share_amount)
Source
do_samet_fund_borrow(borrower, fund : JSON::Any | String, borrow_asset_id_or_symbol, borrow_amount)
Source
do_samet_fund_create(account, asset_id_or_symbol, balance, fee_rate)
Source
do_samet_fund_delete(account, fund : JSON::Any | String)
Source
do_samet_fund_repay(borrower, fund : JSON::Any | String, asset_id_or_symbol, repay_amount, fee_amount)
Source
do_transfer(from, to, asset_amount, asset_id, memo = nil)
Source
do_witness_update(witness_account_name_or_id, new_url = nil, new_signing_key = nil)

OP - 更新见证人

Source
fast_build(data_dynamic_global_properties, &) : Bytes

=> REMARK: 需要手动设置 opdata 的 fee。

Source
loop_new_block(sleep_interval = 0.2, &)
Source
make_account_create(registrar, referrer, referrer_percent, voting_account, name, owner_public_key, active_public_key, memo_public_key = nil, ext = nil)

OP - 创建账号

Source
make_account_upgrade(account)

OP - 升级终生会员

Source
make_assert_account(fee_account, account_id, account_name)

OP - 断言

Source
make_assert_asset(fee_account, asset_id, asset_symbol)
Source
make_assert_block(fee_account, block_id)
Source
make_asset_create(issuer, symbol : String, precision : UInt8, common_options, bitasset_opts = nil, is_prediction_market = false)

TODO: class OP_asset_create < T_composite add_field :fee, T_asset add_field :issuer, Tm_protocol_id_type(ObjectType::Account) add_field :symbol, T_string add_field :precision, T_uint8 add_field :common_options, T_asset_options add_field :bitasset_opts, Tm_optional(T_bitasset_options) add_field :is_prediction_market, T_bool add_field :extensions, Tm_set(T_future_extensions) end

Source
make_balance_claim(deposit_to_account, balance_to_claim, balance_owner_key, total_claimed_amount, total_claimed_asset_id)

OP - 提取资金

Source
make_liquidity_pool_create(account, asset_a, asset_b, share_asset, taker_fee_percent, withdrawal_fee_percent)

OP - 创建流动性池 taker_fee_percent - 有效值 0..100 单位:百分之1 withdrawal_fee_percent - 有效值 0..100 单位:百分之1

Source
make_liquidity_pool_delete(account, pool_or_id)

OP - 删除流动性池

Source
make_liquidity_pool_deposit(account, pool_or_id, amount_a, amount_b)

OP - 流动性池注资

Source
make_liquidity_pool_exchange(account, pool_or_id, sell_amount, sell_asset_id, receive_amount, receive_asset_id)

OP - 流动性池兑换

Source
make_liquidity_pool_withdraw(account, pool_or_id, share_amount)

OP - 流动性池撤资

Source
make_samet_fund_borrow(borrower, fund : JSON::Any | String, borrow_asset_id_or_symbol, borrow_amount)
Source
make_samet_fund_create(account, asset_id_or_symbol, balance, fee_rate)
Source
make_samet_fund_delete(account, fund : JSON::Any | String)
Source
make_samet_fund_repay(borrower, fund : JSON::Any | String, asset_id_or_symbol, repay_amount, fee_amount)
Source
make_transfer(from, to, asset_amount, asset_id, memo = nil)

OP - 转账操作 from 付款账号 to 收款账号 asset_amount 转账数量 asset_id 转账资产名称或ID。 memo 转账备注

Source
query_account(account_name_or_id : String) : JSON::Any | Nil

API - 查询账号信息。

DEPRECATED: Use query_account?

Source
query_account!(account_name_or_id : String) : JSON::Any | Nil
Source
query_account?(account_name_or_id : String) : JSON::Any | Nil
Source
query_asset(asset_symbol_or_id : String) : JSON::Any | Nil

API - 查询资产信息。

DEPRECATED: Use query_asset?

Source
query_asset!(asset_symbol_or_id : String) : JSON::Any | Nil
Source
query_asset?(asset_symbol_or_id : String) : JSON::Any | Nil
Source
query_objects(object_id_or_id_array : String | Array(String)) : Hash(String, JSON::Any)

API - 根据对象ID或者ID数组查询对象。

Source
query_one_object(oid : String) : JSON::Any | Nil

API - 根据对象ID查询对象。

DEPRECATED: Use query_one_object?

Source
query_one_object!(oid : String) : JSON::Any
Source
query_one_object?(oid : String) : JSON::Any | Nil
Source
query_witness(witness_account_name_or_id)

API - 查询见证人信息

Source
query_witness_by_id(witness_account_id : String) : JSON::Any | Nil

API - 根据见证人账号ID查询见证人信息

Source
wallet

获取关联的 wallet 对象。

Source