/mvcapi-sdk-rust

Rust client to interact with MVCApi

Primary LanguageRust

Rust API client for mvcapi

API definition for MicrovisionChain provided apis

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 3.0.11
  • Package version: 3.0.11
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named mvcapi and add the following to Cargo.toml under [dependencies]:

mvcapi = { path = "./mvcapi" }

Documentation for API Endpoints

All URIs are relative to https://testnet.mvcapi.com

Class Method HTTP request Description
AddressApi address_address_balance_get GET /address/{address}/balance Get address balance by specific address.
AddressApi address_address_tx_get GET /address/{address}/tx Get address history by specific address(recent 10 days available).
AddressApi address_address_utxo_get GET /address/{address}/utxo Get address utxos by specific address(100 per page).
BlockApi block_block_id_get GET /block/{blockId} Get block request by height or hash
BlockApi block_get GET /block Get recent block list by paging. 30 items per page.
BlockApi block_info_get GET /block/info Get current blockchain info from full node.
ContractApi contract_ft_address_address_balance_confirmed_get GET /contract/ft/address/{address}/balance/confirmed Get all contract token balances for specific address ignoring all unconfirmed txs.
ContractApi contract_ft_address_address_balance_get GET /contract/ft/address/{address}/balance Get all contract token balances for specific address.
ContractApi contract_ft_address_address_code_hash_genesis_tx_get GET /contract/ft/address/{address}/{codeHash}/{genesis}/tx Get all contract token balances for specific address.
ContractApi contract_ft_address_address_utxo_get GET /contract/ft/address/{address}/utxo Get all contract token utxos for specific address.
ContractApi contract_ft_genesis_code_hash_genesis_circulation_get GET /contract/ft/genesis/{codeHash}/{genesis}/circulation Get all sum of circulation ft token utxos by codeHash and genesisId(10min cached).
ContractApi contract_nft_address_address_count_confirmed_get GET /contract/nft/address/{address}/count/confirmed Get confirmed utxo count for specific nft(ignore all unconfirmed txs).
ContractApi contract_nft_address_address_summary_get GET /contract/nft/address/{address}/summary Get nft summary(NFT count group by genesis) for address.
ContractApi contract_nft_address_address_utxo_get GET /contract/nft/address/{address}/utxo Get all contract nft token utxos for specific address.
ContractApi contract_nft_genesis_code_hash_genesis_summary_get GET /contract/nft/genesis/{codeHash}/{genesis}/summary Get nft summary(count group by address) for specific codeHash and genesisId(result cached for 60s).
ContractApi contract_nft_genesis_code_hash_genesis_utxo_get GET /contract/nft/genesis/{codeHash}/{genesis}/utxo Get all contract nft token utxos by codeHash and genesisId.
ContractApi contract_nft_sell_address_address_utxo_get GET /contract/nft/sell/address/{address}/utxo Get all contract sell sell utxos for specific address.
ContractApi contract_nft_sell_genesis_code_hash_genesis_utxo_get GET /contract/nft/sell/genesis/{codeHash}/{genesis}/utxo Get all contract nft token utxos by codeHash and genesisId.
ContractApi contract_unique_genesis_code_hash_genesis_utxo_get GET /contract/unique/genesis/{codeHash}/{genesis}/utxo Get contract unique utxos by codeHash and genesisId.
MerchantApi merchant_utxo_post POST /merchant/utxo Pick utxos by addresses and amount.
OutpointApi outpoint_txid_index_get GET /outpoint/{txid}/{index} Get tx output(outpoint for vin) spent status.
TreasuryApi treasury_get GET /treasury Get current treasury info.
TreasuryApi treasury_history_get GET /treasury/history Get all treasury history.
TxApi tx_broadcast_batch_post POST /tx/broadcast/batch Broadcast a batch of tx to MvcApi fullnode. This endpoint use rpc sendrawtransactions.
TxApi tx_broadcast_post POST /tx/broadcast Broadcast tx to MvcApi fullnode.
TxApi tx_txid_get GET /tx/{txid} Get transaction detail by specific txid.
TxApi tx_txid_raw_get GET /tx/{txid}/raw Get transaction raw hex by specific txid.
TxApi tx_txid_seen_get GET /tx/{txid}/seen Whether MvcApi have seen this tx before. This is a fast approach to know if the tx exist or not.
TxApi vin_txid_detail_get GET /vin/{txid}/detail Get all output point of vins in the tx with detailed output script.
XpubApi xpub_lite_xpub_address_address_get GET /xpubLite/{xpub}/address/{address} Get xpub address type and index. Only index under /0/70 /1/30 is valid. Otherwise not found.
XpubApi xpub_lite_xpub_balance_get GET /xpubLite/{xpub}/balance Get xpub balances including confirmed and unconfirmed.
XpubApi xpub_lite_xpub_utxo_get GET /xpubLite/{xpub}/utxo Get xpub utxos by specific xpub(300 per page).

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

heqiming@metasv.com