[][src]Trait komodo_rpc_client::KomodoRpcApi

pub trait KomodoRpcApi {
    fn get_address_balance(
        &self,
        addresses: &AddressList
    ) -> Result<AddressBalance, ApiError>;
fn get_address_deltas(
        &self,
        addresses: &AddressList
    ) -> Result<AddressDeltas, ApiError>;
fn get_address_mempool(
        &self,
        addresses: &AddressList
    ) -> Result<AddressMempool, ApiError>;
fn get_address_tx_ids(
        &self,
        addresses: &AddressList
    ) -> Result<AddressTxIDs, ApiError>;
fn get_address_utxos(
        &self,
        addresses: &AddressList
    ) -> Result<AddressUtxos, ApiError>;
fn get_snapshot_max(&self, n: u32) -> Result<Snapshot, ApiError>;
fn get_snapshot(&self) -> Result<Snapshot, ApiError>;
fn coinsupply(&self, n: u32) -> Result<Coinsupply, ApiError>;
fn get_best_block_hash(&self) -> Result<BlockHash, ApiError>;
fn get_block(&self, hashorheight: String) -> Result<Block, ApiError>;
fn get_blockchain_info(&self) -> Result<BlockchainInfo, ApiError>;
fn get_block_count(&self) -> Result<Blockcount, ApiError>;
fn get_block_hash(&self, n: u32) -> Result<BlockHash, ApiError>;
fn get_block_header(&self, hash: String) -> Result<BlockHeader, ApiError>;
fn get_chaintips(&self) -> Result<ChainTips, ApiError>;
fn get_difficulty(&self) -> Result<f64, ApiError>;
fn get_mempool_info(&self) -> Result<MempoolInfo, ApiError>;
fn get_raw_mempool(&self) -> Result<RawMempool, ApiError>;
fn get_raw_mempool_verbose(&self) -> Result<RawMempoolVerbose, ApiError>;
fn get_tx_out(&self, txid: String, index: u8) -> Result<TxOut, ApiError>;
fn get_tx_out_set_info(&self) -> Result<TxOutSetInfo, ApiError>;
fn minerids(&self, height: String) -> Result<MinerIDs, ApiError>;
fn notaries(&self, height: String) -> Result<Notaries, ApiError>;
fn get_info(&self) -> Result<Info, ApiError>;
fn get_block_subsidy(
        &self,
        height: Option<u64>
    ) -> Result<BlockSubsidy, ApiError>;
fn get_block_template(
        &self,
        jsonrequestobject: Option<&RequestObject>
    ) -> Result<BlockTemplate, ApiError>;
fn get_local_sol_ps(&self) -> Result<f64, ApiError>;
fn get_mining_info(&self) -> Result<MiningInfo, ApiError>;
fn get_network_hash_ps(&self) -> Result<u64, ApiError>;
fn get_network_sol_ps(&self) -> Result<u64, ApiError>;
fn prioritise_transaction(
        &self,
        txid: TransactionId,
        prio_delta: f64,
        fee_delta: u32
    ) -> Result<bool, ApiError>;
fn submit_block(
        &self,
        hexdata: String,
        jsonparametersobject: Option<ParametersObject>
    ) -> Result<SubmitBlockResult, ApiError>;
fn get_added_node_info(
        &self,
        dns: bool,
        node: Option<&str>
    ) -> Result<Vec<AddedNodeInfo>, ApiError>;
fn get_connection_count(&self) -> Result<u32, ApiError>;
fn get_deprecation_info(&self) -> Result<DeprecationInfo, ApiError>;
fn get_net_totals(&self) -> Result<NetTotals, ApiError>;
fn get_network_info(&self) -> Result<NetworkInfo, ApiError>;
fn get_peer_info(&self) -> Result<Vec<Peer>, ApiError>;
fn list_banned(&self) -> Result<Vec<Option<BannedNode>>, ApiError>;
fn set_ban(
        &self,
        ip: String,
        command: String,
        bantime: Option<u32>,
        absolute: Option<bool>
    ) -> Result<(), ApiError>;
fn create_raw_transaction(
        &self,
        inputs: CreateRawTransactionInputs,
        outputs: CreateRawTransactionOutputs
    ) -> Result<SerializedRawTransaction, ApiError>;
fn decode_raw_transaction(
        &self,
        hexstring: &str
    ) -> Result<RawTransaction, ApiError>;
fn decode_script(&self, hexstring: &str) -> Result<DecodedScript, ApiError>;
fn get_raw_transaction(
        &self,
        txid: TransactionId
    ) -> Result<SerializedRawTransaction, ApiError>;
fn get_raw_transaction_verbose(
        &self,
        txid: TransactionId
    ) -> Result<RawTransaction, ApiError>;
fn sign_raw_transaction_with_wallet(
        &self,
        hexstring: SerializedRawTransaction
    ) -> Result<SignedRawTransaction, ApiError>;
fn sign_raw_transaction_with_key(
        &self,
        hexstring: &SerializedRawTransaction,
        txoutput_detail: Option<&P2SHInputSet>,
        private_keys: Option<Vec<&PrivateKey>>,
        signature_hash_type: Option<SigHashType>
    ) -> Result<SignedRawTransaction, ApiError>;
fn send_raw_transaction(
        &self,
        signed_tx: &SignedRawTransaction
    ) -> Result<TransactionId, ApiError>;
fn create_multisig(
        &self,
        nrequired: u8,
        keys: Vec<&str>
    ) -> Result<Multisig, ApiError>;
fn backup_wallet(&self, file_name: &str) -> Result<String, ApiError>;
fn dump_privkey(&self, address: &str) -> Result<String, ApiError>;
fn dump_wallet(&self, filename: &str) -> Result<String, ApiError>;
fn get_balance(
        &self,
        minconf: Option<u32>,
        include_watchonly: Option<bool>
    ) -> Result<f64, ApiError>;
fn get_new_address(&self) -> Result<String, ApiError>;
fn get_raw_change_address(&self) -> Result<Address, ApiError>;
fn get_received_by_address(
        &self,
        address: &Address
    ) -> Result<f64, ApiError>;
fn get_transaction(
        &self,
        tx: &TransactionId
    ) -> Result<Transaction, ApiError>;
fn get_unconfirmed_balance(&self) -> Result<f64, ApiError>;
fn get_wallet_info(&self) -> Result<WalletInfo, ApiError>;
fn import_address(
        &self,
        address: &Address,
        label: Option<String>,
        rescan: bool
    ) -> Result<(), ApiError>;
fn import_privkey(
        &self,
        key: &str,
        label: Option<&str>,
        rescan: bool
    ) -> Result<Address, ApiError>;
fn import_wallet(&self, path: &str) -> Result<(), ApiError>;
fn list_address_groupings(&self) -> Result<AddressGrouping, ApiError>;
fn list_lock_unspent(&self) -> Result<Vec<LockedUnspent>, ApiError>;
fn list_received_by_address(
        &self,
        minconf: Option<u32>,
        include_empty: Option<bool>,
        include_watch_only: Option<bool>
    ) -> Result<Vec<ReceivedByAddress>, ApiError>;
fn list_since_block(
        &self,
        blockhash: Option<&str>,
        confs: Option<u64>,
        include_watch_only: Option<bool>
    ) -> Result<TxListSinceBlock, ApiError>;
fn list_transactions(
        &self,
        count: Option<u32>,
        from: Option<u32>,
        include_watch_only: Option<bool>
    ) -> Result<ListTransactions, ApiError>;
fn list_unspent(
        &self,
        minconf: Option<u32>,
        maxconf: Option<u32>,
        addr_filter: Option<Vec<Address>>
    ) -> Result<Vec<Unspent>, ApiError>;
fn lock_unspent(
        &self,
        unlock: bool,
        txns: Vec<LockedUnspent>
    ) -> Result<bool, ApiError>;
fn resend_wallet_transactions(
        &self
    ) -> Result<ResentWalletTransactions, ApiError>;
fn send_many(
        &self,
        amounts: SendManyAmounts,
        minconf: Option<u32>,
        comment: Option<&str>,
        subtractfeefromaddresses: Option<Vec<Address>>
    ) -> Result<TransactionId, ApiError>;
fn send_to_address(
        &self,
        address: Address,
        amount: f64,
        comment: Option<&str>,
        comment_to: Option<&str>,
        subtractfee: Option<bool>
    ) -> Result<TransactionId, ApiError>;
fn set_pubkey(&self, pubkey: &str) -> Result<SetPubkey, ApiError>;
fn set_txfee(&self, fee: f64) -> Result<bool, ApiError>;
fn sign_message(
        &self,
        address: Address,
        message: &str
    ) -> Result<String, ApiError>;
fn z_exportkey(&self, a: &Address) -> Result<PrivateKey, ApiError>;
fn z_exportviewingkey(&self, a: &Address) -> Result<ViewingKey, ApiError>;
fn z_exportwallet(&self, filename: &str) -> Result<String, ApiError>;
fn z_getbalance(
        &self,
        a: &Address,
        minconf: Option<u32>
    ) -> Result<f64, ApiError>;
fn z_getnewaddress(&self) -> Result<Address, ApiError>;
fn z_getoperationresult(&self, v: Vec<&str>) -> Result<Operations, ApiError>;
fn z_getoperationstatus(&self, v: Vec<&str>) -> Result<Operations, ApiError>;
fn z_gettotalbalance(&self) -> Result<TotalBalance, ApiError>;
fn z_importkey(&self) -> Result<(), ApiError>;
fn z_importviewingkey(&self) -> Result<(), ApiError>;
fn z_importwallet(&self) -> Result<(), ApiError>;
fn z_listaddresses(
        &self,
        include_watch_only: Option<bool>
    ) -> Result<Vec<Address>, ApiError>;
fn z_listoperationids(&self) -> Result<Vec<String>, ApiError>;
fn z_listreceivedbyaddress(
        &self,
        a: &Address,
        minconf: Option<u32>
    ) -> Result<ReceivedByAddress, ApiError>;
fn z_mergetoaddress(
        &self,
        from_addresses: &FromAddresses,
        to_address: &Address,
        fee: Option<f64>,
        transparent_limit: Option<u32>,
        shielded_limit: Option<u32>,
        maximum_utxo_size: Option<u64>,
        memo: Option<String>
    ) -> Result<MergeResult, ApiError>;
fn z_sendmany(
        &self,
        from_address: &Address,
        amounts: &Amounts,
        minconf: Option<u32>,
        fee: Option<f64>
    ) -> Result<String, ApiError>;
fn z_shieldcoinbase(
        &self,
        from_address: &Address,
        to_address: &Address,
        fee: Option<f64>,
        limit: Option<u32>
    ) -> Result<ShieldResult, ApiError>; }

Required methods

fn get_address_balance(
    &self,
    addresses: &AddressList
) -> Result<AddressBalance, ApiError>

fn get_address_deltas(
    &self,
    addresses: &AddressList
) -> Result<AddressDeltas, ApiError>

fn get_address_mempool(
    &self,
    addresses: &AddressList
) -> Result<AddressMempool, ApiError>

fn get_address_tx_ids(
    &self,
    addresses: &AddressList
) -> Result<AddressTxIDs, ApiError>

fn get_address_utxos(
    &self,
    addresses: &AddressList
) -> Result<AddressUtxos, ApiError>

fn get_snapshot_max(&self, n: u32) -> Result<Snapshot, ApiError>

fn get_snapshot(&self) -> Result<Snapshot, ApiError>

fn coinsupply(&self, n: u32) -> Result<Coinsupply, ApiError>

fn get_best_block_hash(&self) -> Result<BlockHash, ApiError>

fn get_block(&self, hashorheight: String) -> Result<Block, ApiError>

fn get_blockchain_info(&self) -> Result<BlockchainInfo, ApiError>

fn get_block_count(&self) -> Result<Blockcount, ApiError>

fn get_block_hash(&self, n: u32) -> Result<BlockHash, ApiError>

fn get_block_header(&self, hash: String) -> Result<BlockHeader, ApiError>

fn get_chaintips(&self) -> Result<ChainTips, ApiError>

fn get_difficulty(&self) -> Result<f64, ApiError>

fn get_mempool_info(&self) -> Result<MempoolInfo, ApiError>

fn get_raw_mempool(&self) -> Result<RawMempool, ApiError>

fn get_raw_mempool_verbose(&self) -> Result<RawMempoolVerbose, ApiError>

fn get_tx_out(&self, txid: String, index: u8) -> Result<TxOut, ApiError>

fn get_tx_out_set_info(&self) -> Result<TxOutSetInfo, ApiError>

fn minerids(&self, height: String) -> Result<MinerIDs, ApiError>

fn notaries(&self, height: String) -> Result<Notaries, ApiError>

fn get_info(&self) -> Result<Info, ApiError>

fn get_block_subsidy(
    &self,
    height: Option<u64>
) -> Result<BlockSubsidy, ApiError>

fn get_block_template(
    &self,
    jsonrequestobject: Option<&RequestObject>
) -> Result<BlockTemplate, ApiError>

fn get_local_sol_ps(&self) -> Result<f64, ApiError>

fn get_mining_info(&self) -> Result<MiningInfo, ApiError>

fn get_network_hash_ps(&self) -> Result<u64, ApiError>

fn get_network_sol_ps(&self) -> Result<u64, ApiError>

fn prioritise_transaction(
    &self,
    txid: TransactionId,
    prio_delta: f64,
    fee_delta: u32
) -> Result<bool, ApiError>

fn submit_block(
    &self,
    hexdata: String,
    jsonparametersobject: Option<ParametersObject>
) -> Result<SubmitBlockResult, ApiError>

fn get_added_node_info(
    &self,
    dns: bool,
    node: Option<&str>
) -> Result<Vec<AddedNodeInfo>, ApiError>

fn get_connection_count(&self) -> Result<u32, ApiError>

fn get_deprecation_info(&self) -> Result<DeprecationInfo, ApiError>

fn get_net_totals(&self) -> Result<NetTotals, ApiError>

fn get_network_info(&self) -> Result<NetworkInfo, ApiError>

fn get_peer_info(&self) -> Result<Vec<Peer>, ApiError>

fn list_banned(&self) -> Result<Vec<Option<BannedNode>>, ApiError>

fn set_ban(
    &self,
    ip: String,
    command: String,
    bantime: Option<u32>,
    absolute: Option<bool>
) -> Result<(), ApiError>

fn create_raw_transaction(
    &self,
    inputs: CreateRawTransactionInputs,
    outputs: CreateRawTransactionOutputs
) -> Result<SerializedRawTransaction, ApiError>

fn decode_raw_transaction(
    &self,
    hexstring: &str
) -> Result<RawTransaction, ApiError>

fn decode_script(&self, hexstring: &str) -> Result<DecodedScript, ApiError>

fn get_raw_transaction(
    &self,
    txid: TransactionId
) -> Result<SerializedRawTransaction, ApiError>

fn get_raw_transaction_verbose(
    &self,
    txid: TransactionId
) -> Result<RawTransaction, ApiError>

fn sign_raw_transaction_with_wallet(
    &self,
    hexstring: SerializedRawTransaction
) -> Result<SignedRawTransaction, ApiError>

fn sign_raw_transaction_with_key(
    &self,
    hexstring: &SerializedRawTransaction,
    txoutput_detail: Option<&P2SHInputSet>,
    private_keys: Option<Vec<&PrivateKey>>,
    signature_hash_type: Option<SigHashType>
) -> Result<SignedRawTransaction, ApiError>

fn send_raw_transaction(
    &self,
    signed_tx: &SignedRawTransaction
) -> Result<TransactionId, ApiError>

fn create_multisig(
    &self,
    nrequired: u8,
    keys: Vec<&str>
) -> Result<Multisig, ApiError>

fn backup_wallet(&self, file_name: &str) -> Result<String, ApiError>

fn dump_privkey(&self, address: &str) -> Result<String, ApiError>

fn dump_wallet(&self, filename: &str) -> Result<String, ApiError>

fn get_balance(
    &self,
    minconf: Option<u32>,
    include_watchonly: Option<bool>
) -> Result<f64, ApiError>

fn get_new_address(&self) -> Result<String, ApiError>

fn get_raw_change_address(&self) -> Result<Address, ApiError>

fn get_received_by_address(&self, address: &Address) -> Result<f64, ApiError>

fn get_transaction(&self, tx: &TransactionId) -> Result<Transaction, ApiError>

fn get_unconfirmed_balance(&self) -> Result<f64, ApiError>

fn get_wallet_info(&self) -> Result<WalletInfo, ApiError>

fn import_address(
    &self,
    address: &Address,
    label: Option<String>,
    rescan: bool
) -> Result<(), ApiError>

fn import_privkey(
    &self,
    key: &str,
    label: Option<&str>,
    rescan: bool
) -> Result<Address, ApiError>

fn import_wallet(&self, path: &str) -> Result<(), ApiError>

fn list_address_groupings(&self) -> Result<AddressGrouping, ApiError>

fn list_lock_unspent(&self) -> Result<Vec<LockedUnspent>, ApiError>

fn list_received_by_address(
    &self,
    minconf: Option<u32>,
    include_empty: Option<bool>,
    include_watch_only: Option<bool>
) -> Result<Vec<ReceivedByAddress>, ApiError>

fn list_since_block(
    &self,
    blockhash: Option<&str>,
    confs: Option<u64>,
    include_watch_only: Option<bool>
) -> Result<TxListSinceBlock, ApiError>

fn list_transactions(
    &self,
    count: Option<u32>,
    from: Option<u32>,
    include_watch_only: Option<bool>
) -> Result<ListTransactions, ApiError>

fn list_unspent(
    &self,
    minconf: Option<u32>,
    maxconf: Option<u32>,
    addr_filter: Option<Vec<Address>>
) -> Result<Vec<Unspent>, ApiError>

fn lock_unspent(
    &self,
    unlock: bool,
    txns: Vec<LockedUnspent>
) -> Result<bool, ApiError>

fn resend_wallet_transactions(
    &self
) -> Result<ResentWalletTransactions, ApiError>

fn send_many(
    &self,
    amounts: SendManyAmounts,
    minconf: Option<u32>,
    comment: Option<&str>,
    subtractfeefromaddresses: Option<Vec<Address>>
) -> Result<TransactionId, ApiError>

fn send_to_address(
    &self,
    address: Address,
    amount: f64,
    comment: Option<&str>,
    comment_to: Option<&str>,
    subtractfee: Option<bool>
) -> Result<TransactionId, ApiError>

fn set_pubkey(&self, pubkey: &str) -> Result<SetPubkey, ApiError>

fn set_txfee(&self, fee: f64) -> Result<bool, ApiError>

fn sign_message(
    &self,
    address: Address,
    message: &str
) -> Result<String, ApiError>

fn z_exportkey(&self, a: &Address) -> Result<PrivateKey, ApiError>

fn z_exportviewingkey(&self, a: &Address) -> Result<ViewingKey, ApiError>

fn z_exportwallet(&self, filename: &str) -> Result<String, ApiError>

fn z_getbalance(
    &self,
    a: &Address,
    minconf: Option<u32>
) -> Result<f64, ApiError>

fn z_getnewaddress(&self) -> Result<Address, ApiError>

fn z_getoperationresult(&self, v: Vec<&str>) -> Result<Operations, ApiError>

fn z_getoperationstatus(&self, v: Vec<&str>) -> Result<Operations, ApiError>

fn z_gettotalbalance(&self) -> Result<TotalBalance, ApiError>

fn z_importkey(&self) -> Result<(), ApiError>

fn z_importviewingkey(&self) -> Result<(), ApiError>

fn z_importwallet(&self) -> Result<(), ApiError>

fn z_listaddresses(
    &self,
    include_watch_only: Option<bool>
) -> Result<Vec<Address>, ApiError>

fn z_listoperationids(&self) -> Result<Vec<String>, ApiError>

fn z_listreceivedbyaddress(
    &self,
    a: &Address,
    minconf: Option<u32>
) -> Result<ReceivedByAddress, ApiError>

fn z_mergetoaddress(
    &self,
    from_addresses: &FromAddresses,
    to_address: &Address,
    fee: Option<f64>,
    transparent_limit: Option<u32>,
    shielded_limit: Option<u32>,
    maximum_utxo_size: Option<u64>,
    memo: Option<String>
) -> Result<MergeResult, ApiError>

fn z_sendmany(
    &self,
    from_address: &Address,
    amounts: &Amounts,
    minconf: Option<u32>,
    fee: Option<f64>
) -> Result<String, ApiError>

fn z_shieldcoinbase(
    &self,
    from_address: &Address,
    to_address: &Address,
    fee: Option<f64>,
    limit: Option<u32>
) -> Result<ShieldResult, ApiError>

Loading content...

Implementors

impl KomodoRpcApi for Client[src]

Loading content...