pub struct MetaClient { /* private fields */ }Implementations§
Source§impl MetaClient
 
impl MetaClient
pub fn new_target(target: MetaMinerTarget) -> Self
pub fn new(miner_host: &str) -> Self
pub fn with_timeout(self, request_timeout: Duration) -> Self
pub async fn get_balance( &self, account: &ObjectId, coin_id: u8, ) -> BuckyResult<ViewBalanceResult>
pub async fn trans( &self, from: &StandardObject, to: &ObjectId, v: i64, coin_id: u8, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn trans_ex( &self, from: TxCaller, to: &ObjectId, v: i64, coin_id: u8, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn trans_request( &self, from: &StandardObject, to: &ObjectId, v: i64, coin_id: u8, secret: &PrivateKey, ) -> BuckyResult<Request>
pub async fn trans_request_ex( &self, from: TxCaller, to: &ObjectId, v: i64, coin_id: u8, secret: &PrivateKey, ) -> BuckyResult<Request>
pub async fn create_tx_not_sign( &self, caller: TxCaller, body: MetaTxBody, gas_price: u16, max_fee: u32, tx_data: Vec<u8>, ) -> BuckyResult<Tx>
pub async fn create_tx_not_sign2( &self, caller: TxCaller, bodys: Vec<MetaTxBody>, gas_price: u16, max_fee: u32, tx_data: Vec<u8>, ) -> BuckyResult<Tx>
pub fn get_balance_request(&self, account: &ObjectId, coin_id: u8) -> Request
pub fn view_request(&self, view: ViewRequest) -> Request
pub async fn get_desc(&self, id: &ObjectId) -> BuckyResult<SavedMetaObject>
pub fn get_raw_request(&self, id: &ObjectId) -> Request
pub async fn get_raw_data(&self, id: &ObjectId) -> BuckyResult<Vec<u8>>
pub async fn get_chain_status(&self) -> BuckyResult<ChainStatus>
pub async fn get_block(&self, height: i64) -> BuckyResult<Block>
pub fn get_desc_request(&self, id: &ObjectId) -> Request
pub async fn create_desc( &self, owner: &StandardObject, desc: &SavedMetaObject, v: i64, price: u32, coin_id: u8, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn create_desc_ex( &self, caller: TxCaller, desc: &SavedMetaObject, v: i64, price: u32, coin_id: u8, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn create_desc_request( &self, owner: &StandardObject, desc: &SavedMetaObject, v: i64, coin_id: u8, price: u32, secret: &PrivateKey, ) -> BuckyResult<Request>
pub async fn create_desc_request_ex( &self, owner: TxCaller, desc: &SavedMetaObject, v: i64, coin_id: u8, price: u32, secret: &PrivateKey, ) -> BuckyResult<Request>
pub async fn update_desc( &self, owner: &StandardObject, desc: &SavedMetaObject, price: Option<u32>, coin_id: Option<u8>, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn update_desc_ex( &self, owner: TxCaller, desc: &SavedMetaObject, price: Option<u32>, coin_id: Option<u8>, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn update_desc_request( &self, owner: &StandardObject, desc: &SavedMetaObject, price: Option<u32>, coin_id: Option<u8>, secret: &PrivateKey, ) -> BuckyResult<Request>
pub async fn update_desc_request_ex( &self, owner: TxCaller, desc: &SavedMetaObject, price: Option<u32>, coin_id: Option<u8>, secret: &PrivateKey, ) -> BuckyResult<Request>
pub async fn bid_name( &self, caller: &StandardObject, owner: Option<ObjectId>, name: &str, price: u64, rent: u32, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn get_name( &self, name: &str, ) -> BuckyResult<Option<(NameInfo, NameState)>>
pub async fn update_name( &self, caller: &StandardObject, name: &str, info: NameInfo, write_flag: u8, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn trans_name( &self, caller: &StandardObject, new_owner: &ObjectId, sub_name: Option<&str>, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn get_tx_receipt( &self, tx_hash: &TxId, ) -> BuckyResult<Option<(Receipt, i64)>>
pub async fn get_tx(&self, tx_hash: &TxId) -> BuckyResult<TxInfo>
pub fn get_nonce_request(&self, account: &ObjectId) -> Request
pub fn get_receipt_request(&self, tx: &TxId) -> Request
pub async fn send_to_miner(&self, tx: MetaTx) -> BuckyResult<TxId>
pub async fn request_miner<'de, T: RawDecode<'de>>( &self, req: Request, buf: &'de mut Vec<u8>, ) -> BuckyResult<T>
pub async fn create_union_account( &self, caller: &StandardObject, create_union_tx: CreateUnionTx, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn create_deviate_tx( &self, caller: &StandardObject, deviate_tx: DeviateUnionTx, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn withdraw_union( &self, caller: &StandardObject, ctid: CoinTokenId, union_id: &ObjectId, value: i64, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn set_config( &self, caller: &StandardObject, key: &str, value: &str, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn auction_name( &self, caller: &StandardObject, name: &str, startting_price: u64, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn cancel_auction_name( &self, caller: &StandardObject, name: &str, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn buy_back_name( &self, caller: &StandardObject, name: &str, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn remove_desc( &self, caller: &StandardObject, desc_id: &ObjectId, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn withdraw_from_file( &self, caller: TxCaller, file_id: &ObjectId, v: i64, coin_id: u8, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn create_sub_chain_account( &self, caller: TxCaller, miner_group: MinerGroup, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn withdraw_from_sub_chain( &self, caller: TxCaller, coin_id: CoinTokenId, value: i64, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn commit_extension_tx( &self, caller: TxCaller, extension_tx: MetaExtensionTx, secret: &PrivateKey, tx_data: Vec<u8>, ) -> BuckyResult<TxId>
pub async fn commit_tx(&self, tx: MetaTx) -> BuckyResult<TxId>
pub async fn create_contract( &self, caller: &StandardObject, secret: &PrivateKey, value: u64, init_data: Vec<u8>, gas_price: u16, max_fee: u32, ) -> BuckyResult<TxId>
pub async fn create_contract2( &self, caller: &StandardObject, secret: &PrivateKey, value: u64, init_data: Vec<u8>, salt: [u8; 32], gas_price: u16, max_fee: u32, ) -> BuckyResult<TxId>
pub async fn call_contract( &self, caller: &StandardObject, secret: &PrivateKey, address: ObjectId, value: u64, data: Vec<u8>, gas_price: u16, max_fee: u32, ) -> BuckyResult<TxId>
pub async fn view_contract( &self, address: ObjectId, data: Vec<u8>, ) -> BuckyResult<ViewContractResult>
pub async fn set_benefi( &self, address: &ObjectId, benefi: &ObjectId, caller: &StandardObject, secret: &PrivateKey, ) -> BuckyResult<TxId>
pub async fn get_benefi(&self, address: &ObjectId) -> BuckyResult<ObjectId>
pub async fn get_logs( &self, address: ObjectId, topics: Vec<Option<H256>>, from: i64, to: i64, ) -> BuckyResult<Vec<(Vec<H256>, Vec<u8>)>>
pub async fn nft_create( &self, caller: TxCaller, secret: &PrivateKey, desc: NFTDesc, name: String, state: NFTState, ) -> BuckyResult<TxId>
pub async fn nft_get( &self, nft_id: ObjectId, ) -> BuckyResult<(NFTDesc, String, ObjectId, NFTState)>
pub async fn nft_get_apply_buy_list( &self, nft_id: ObjectId, offset: u32, length: u8, ) -> BuckyResult<ViewNFTBuyListResult>
pub async fn nft_get_bid_list( &self, nft_id: ObjectId, offset: u32, length: u8, ) -> BuckyResult<ViewNFTBuyListResult>
pub async fn nft_get_largest_buy_price( &self, nft_id: ObjectId, ) -> BuckyResult<Option<(ObjectId, CoinTokenId, u64)>>
pub async fn nft_auction( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, price: u64, coin_id: CoinTokenId, duration_block_num: u64, ) -> BuckyResult<TxId>
pub async fn nft_bid( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, price: u64, coin_id: CoinTokenId, ) -> BuckyResult<TxId>
pub async fn nft_buy( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, price: u64, coin_id: CoinTokenId, ) -> BuckyResult<TxId>
pub async fn nft_sell( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, price: u64, coin_id: CoinTokenId, duration_block_num: u64, ) -> BuckyResult<TxId>
pub async fn nft_apply_buy( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, price: u64, coin_id: CoinTokenId, ) -> BuckyResult<TxId>
pub async fn nft_cancel_apply_buy( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, ) -> BuckyResult<TxId>
pub async fn nft_agree_apply( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, user_id: ObjectId, ) -> BuckyResult<TxId>
pub async fn nft_like( &self, caller: TxCaller, secret: &PrivateKey, nft_id: ObjectId, ) -> BuckyResult<TxId>
Auto Trait Implementations§
impl Freeze for MetaClient
impl RefUnwindSafe for MetaClient
impl Send for MetaClient
impl Sync for MetaClient
impl Unpin for MetaClient
impl UnwindSafe for MetaClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more