8个稳定版本

1.7.0 2022年9月12日
1.6.0 2022年6月24日
1.5.0 2022年4月26日
1.4.0 2021年12月23日
1.0.0 2021年5月12日

2292 in 魔法豆

MIT许可证

4MB
49K SLoC

Rust API客户端,用于cryptoapis

Crypto APIs是一个复杂且创新的架构层,极大地简化了任何区块链和加密相关应用的开发。围绕REST组织,Crypto APIs可以帮助新手和专家开发其区块链应用。Crypto APIs提供统一的端点和数据、原始数据、自动代币和硬币转发、回调功能等。

概述

此API客户端由OpenAPI Generator项目生成。通过使用远程服务器上的openapi-spec,您可以轻松生成API客户端。

  • API版本:2021-03-20
  • 包版本:1.7.0
  • 构建包:org.openapitools.codegen.languages.RustClientCodegen。更多信息请访问https://cryptoapis.io

安装

将包放入您的项目文件夹,并在Cargo.toml下的[dependencies]中添加以下内容:

cryptoapis = { path = "./cryptoapis" }

API端点文档

所有URI均相对于https://rest.cryptoapis.io

方法 HTTP请求 描述
AssetsApi get_asset_details_by_asset_id GET /market-data/assets/assetId/{assetId} 通过资产ID获取资产详情
AssetsApi get_asset_details_by_asset_symbol GET /market-data/assets/{assetSymbol} 通过资产符号获取资产详情
AutomaticCoinsForwardingApi create_automatic_coins_forwarding POST /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations 创建自动代币转发
AutomaticCoinsForwardingApi delete_automatic_coins_forwarding 删除 /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations/{referenceId} 删除自动货币转发
AutomaticCoinsForwardingApi list_coins_forwarding_automations 获取 /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations 列出货币转发自动化
AutomaticTokensForwardingApi add_tokens_to_existing_from_address POST /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations/add-token 从fromAddress添加令牌到现有
AutomaticTokensForwardingApi create_automatic_tokens_forwarding POST /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations 创建自动令牌转发
AutomaticTokensForwardingApi delete_automatic_tokens_forwarding 删除 /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations/{referenceId} 删除自动令牌转发
AutomaticTokensForwardingApi get_fee_address_details GET /blockchain-automations/{blockchain}/{network}/tokens-forwarding/fee-addresses 获取手续费地址详情
AutomaticTokensForwardingApi list_tokens_forwarding_automations GET /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations 列出令牌转发自动化
CallbackDataApi get_address_details_from_callback GET /blockchain-events/{blockchain}/{network}/addresses/{address} 从回调获取地址详情
CallbackDataApi get_block_details_by_block_hash_from_callback GET /blockchain-events/{blockchain}/{network}/blocks/hash/{blockHash} 从回调根据区块哈希获取区块详情
CallbackDataApi get_block_details_by_block_height_from_callback GET /blockchain-events/{blockchain}/{network}/blocks/height/{blockHeight} 从回调根据区块高度获取区块详情
CallbackDataApi get_transaction_details_by_transaction_id_from_callback GET /blockchain-events/{blockchain}/{network}/transactions/{transactionId} 从回调根据交易ID获取交易详情
CreateSubscriptionsForApi block_height_reached POST /blockchain-events/{blockchain}/{network}/subscriptions/block-height-reached 区块高度达到
CreateSubscriptionsForApi mined_transaction POST /blockchain-events/{blockchain}/{network}/subscriptions/transaction-mined 挖矿交易
CreateSubscriptionsForApi new_block POST /blockchain-events/{blockchain}/{network}/subscriptions/block-mined 新区块
CreateSubscriptionsForApi new_confirmed_coins_transactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed 新确认的货币交易
CreateSubscriptionsForApi new_confirmed_coins_transactions_and_each_confirmation POST /blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed-each-confirmation 新确认的货币交易以及每次确认
CreateSubscriptionsForApi new_confirmed_coins_transactions_for_specific_amount POST /blockchain-events/{blockchain}/{network}/subscriptions/coins-transactions-for-specific-amount 特定金额的新确认货币交易
CreateSubscriptionsForApi new_confirmed_internal_transactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed 新确认的内部交易
CreateSubscriptionsForApi new_confirmed_internal_transactions_and_each_confirmation POST /blockchain-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed-each-confirmation 新确认的内部交易以及每次确认
CreateSubscriptionsForApi new_confirmed_internal_transactions_for_specific_amount POST /blockchain-events/{blockchain}/{network}/subscriptions/internal-transactions-for-specific-amount 特定金额的新确认内部交易
CreateSubscriptionsForApi new_confirmed_token_transactions_for_specific_amount POST /blockchain-events/{blockchain}/{network}/subscriptions/tokens-transfers-for-specific-amount 特定金额的新确认令牌交易
CreateSubscriptionsForApi new_confirmed_tokens_transactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed 新确认的令牌交易
CreateSubscriptionsForApi new_confirmed_tokens_transactions_and_each_confirmation POST /blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed-each-confirmation 新确认的令牌交易以及每次确认
CreateSubscriptionsForApi new_unconfirmed_coins_transactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-unconfirmed 新未确认的货币交易
CreateSubscriptionsForApi new_unconfirmed_tokens_transactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-unconfirmed 新未确认的令牌交易
ExchangeRatesApi get_exchange_rate_by_asset_symbols GET /market-data/exchange-rates/by-symbols/{fromAssetSymbol}/{toAssetSymbol} 根据资产符号获取汇率
ExchangeRatesApi get_exchange_rate_by_assets_ids GET /market-data/exchange-rates/by-asset-ids/{fromAssetId}/{toAssetId} 根据资产ID获取汇率
FeaturesApi broadcast_locally_signed_transaction POST /blockchain-tools/{blockchain}/{network}/transactions/broadcast 广播本地签名交易
FeaturesApi convert_bitcoin_cash_address POST /blockchain-tools/{blockchain}/{network}/address/convert 转换比特币现金地址
FeaturesApi decode_raw_transaction_hex POST /blockchain-tools/{blockchain}/{network}/decode-raw-transaction 解码原始交易十六进制
FeaturesApi decode_x_address GET /blockchain-tools/{blockchain}/{network}/decode-x-address/{xAddress} 解码X地址
FeaturesApi derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses GET /blockchain-tools/{blockchain}/{network}/hd/{extendedPublicKey}/addresses/derive-address 推导HD钱包(xPub, yPub, zPub)的更改或接收地址
FeaturesApi encode_x_address GET /blockchain-tools/{blockchain}/{network}/encode-x-address/{classicAddress}/{addressTag} 编码X地址
FeaturesApi estimate_gas_limit POST /blockchain-tools/{blockchain}/{network}/gas-limit 估计Gas限制
FeaturesApi estimate_token_gas_limit POST /blockchain-tools/{blockchain}/{network}/gas-limit/contract 估计代币Gas限制
FeaturesApi get_eip_1559_fee_recommendations GET /blockchain-tools/{blockchain}/{network}/fees/eip1559 获取EIP 1559费用建议
FeaturesApi validate_address POST /blockchain-tools/{blockchain}/{network}/addresses/validate 验证地址
GeneratingApi generate_deposit_address POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses 生成存款地址
HDWalletsApi derive_and_sync_new_change_addresses POST /blockchain-data/{blockchain}/{network}/hd/derive-sync-change 推导并同步新更改地址
HDWalletsApi derive_and_sync_new_receiving_addresses POST /blockchain-data/{blockchain}/{network}/hd/derive-and-sync 推导并同步新接收地址
HDWalletsApi get_hd_wallet__x_pub_y_pub_z_pub_assets GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/assets 获取HD钱包(xPub, yPub, zPub)资产
HDWalletsApi get_hd_wallet__x_pub_y_pub_z_pub_details GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/details 获取HD钱包(xPub, yPub, zPub)详情
HDWalletsApi list_hd_wallet__x_pub_y_pub_z_pub_transactions GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/transactions 列出HD钱包(xPub, yPub, zPub)交易
HDWalletsApi list_hd_wallet__x_pub_y_pub_z_pub_utxos GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/utxos 列出HD钱包(xPub, yPub, zPub)未花费交易输出(UTXOs)
HDWalletsApi list_synced_addresses GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/synced-addresses 列出同步地址
HDWalletsApi prepare_a_utxo_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub POST /blockchain-data/{blockchain}/{network}/transactions/prepare-utxo-transaction 从HD钱包(xPub, yPub, zPub)准备基于UTXO的交易
HDWalletsApi prepare_an_account_based_transaction_from_hd_wallet__x_pub_y_pub_z_pub POST /blockchain-data/{blockchain}/{network}/transactions/prepare-account-based-transaction 从HD钱包(xPub, yPub, zPub)准备基于账户的交易
HDWalletsApi sync_hd_wallet__x_pub_y_pub_z_pub POST /blockchain-data/{blockchain}/{network}/hd/sync 同步HD钱包(xPub, yPub, zPub)
HDWalletsApi sync_new_hd_wallet__x_pub_y_pub_z_pub POST /blockchain-data/{blockchain}/{network}/hd/sync-new 同步新HD钱包(xPub, yPub, zPub)
InformativeApi get_transaction_request_details GET /wallet-as-a-service/transactionRequests/{transactionRequestId} 获取交易请求详情
InformativeApi get_wallet_asset_details GET /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network} 获取钱包资产详情
InformativeApi get_wallet_transaction_details_by_transaction_id GET /wallet-as-a-service/wallets/{blockchain}/{network}/transactions/{transactionId} 通过交易ID获取钱包交易详情
InformativeApi list_all_assets_by_wallet_id GET /wallet-as-a-service/wallets/{walletId}/assets 按钱包ID列出所有资产
InformativeApi list_all_assets_from_all_wallets GET /wallet-as-a-service/wallets/all-assets 从所有钱包列出所有资产
InformativeApi list_deposit_addresses GET /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses 列出存款地址
InformativeApi list_supported_tokens GET /wallet-as-a-service/info/{blockchain}/{network}/supported-tokens 列出支持的代币
InformativeApi list_wallet_transactions GET /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/transactions 列出钱包交易
内部API 通过交易哈希和操作ID获取内部交易 GET /blockchain-data/{blockchain}/{network}/transactions/{transactionHash}/internal/{operationId} 通过交易哈希和操作ID获取内部交易
内部API 按交易哈希列表内部交易详情 GET /blockchain-data/{blockchain}/{network}/transactions/{transactionHash}/internal 按交易哈希列表内部交易详情
内部API 按地址列表内部交易 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/internal 按地址列表内部交易
管理订阅API 激活区块链事件订阅 POST /blockchain-events/subscriptions/{referenceId}/activate 激活区块链事件订阅
管理订阅API 删除区块链事件订阅 DELETE /blockchain-events/{blockchain}/{network}/subscriptions/{referenceId} 删除区块链事件订阅
管理订阅API 通过参考ID获取区块链事件订阅详情 GET /blockchain-events/subscriptions/{referenceId} 通过参考ID获取区块链事件订阅详情
管理订阅API 列表区块链事件订阅 GET /blockchain-events/{blockchain}/{network}/subscriptions 列表区块链事件订阅
元数据API 列表支持的资产 GET /market-data/assets/supported 列表支持的资产
代币API 通过合约地址获取代币详情 GET /blockchain-data/{blockchain}/{network}/addresses/{contractAddress}/contract 通过合约地址获取代币详情
代币API 按地址列表已确认的代币转账 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers 按地址列表已确认的代币转账
代币API 按地址列表代币 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens 按地址列表代币
代币API 按交易哈希列表代币转账 GET /blockchain-data/{blockchain}/{network}/transactions/{transactionHash}/tokens-transfers 按交易哈希列表代币转账
代币API 按地址列表未确认的代币转账 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers-unconfirmed 按地址列表未确认的代币转账
交易API 从地址创建整金额币交易 POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/all-transaction-requests 从地址创建整金额币交易
交易API 从地址创建币交易请求 POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/transaction-requests 从地址创建币交易请求
交易API 从钱包创建币交易请求 POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/transaction-requests 从钱包创建币交易请求
交易API 从地址创建无手续费优先级的可交易代币交易请求 POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/feeless-token-transaction-requests 从地址创建无手续费优先级的可交易代币交易请求
交易API 从地址创建可交易代币交易请求 POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/token-transaction-requests 从地址创建可交易代币交易请求
交易API 从地址创建无手续费优先级的单笔交易请求 POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/feeless-transaction-requests 从地址创建无手续费优先级的单笔交易请求
统一端点API 估算交易智能费用 GET /blockchain-data/{blockchain}/{network}/estimate-transaction-smart-fee 估算交易智能费用
统一端点API 获取地址余额 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/balance 获取地址余额
统一端点API 获取地址详情 GET /blockchain-data/{blockchain}/{network}/addresses/{address} 获取地址详情
统一端点API 按块哈希获取块详情 GET /blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash} 按块哈希获取块详情
统一端点API 按块高获取块详情 GET /blockchain-data/{blockchain}/{network}/blocks/height/{height} 按块高获取块详情
统一端点API 获取费用建议 GET /blockchain-data/{blockchain}/{network}/mempool/fees 获取费用建议
统一端点API 获取最后挖矿的块 GET /blockchain-data/{blockchain}/{network}/blocks/last 获取最后挖矿的块
统一端点API 获取下一个可用的nonce GET /blockchain-data/{blockchain}/{network}/addresses/{address}/next-available-nonce 获取下一个可用的nonce
统一端点API 获取原始交易数据 GET /blockchain-data/{blockchain}/{network}/transactions/{transactionId}/raw-data 获取原始交易数据
统一端点API 通过交易ID获取交易详情 GET /blockchain-data/{blockchain}/{network}/transactions/{transactionId} 通过交易ID获取交易详情
统一端点API 按地址和时间范围列出确认的代币转账 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers-by-time-range 按地址和时间范围列出确认的代币转账
统一端点API 按地址列出确认的交易 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/transactions 按地址列出确认的交易
统一端点API 按地址和时间范围列出确认的交易 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/transactions-by-time-range 按地址和时间范围列出确认的交易
统一端点API 按地址和时间范围列出内部交易 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/internal-by-time-range 按地址和时间范围列出内部交易
统一端点API 列出最新挖掘的区块 GET /blockchain-data/{blockchain}/{network}/blocks/last/{count} 列出最新挖掘的区块
统一端点API 按区块哈希列出交易 GET /blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash}/transactions 按区块哈希列出交易
统一端点API 按区块高度列出交易 GET /blockchain-data/{blockchain}/{network}/blocks/height/{height}/transactions 按区块高度列出交易
统一端点API 按地址列出未确认的交易 GET /blockchain-data/{blockchain}/{network}/address-transactions-unconfirmed/{address} 按地址列出未确认的交易
统一端点API 按地址列出未花费的交易输出 GET /blockchain-data/{blockchain}/{network}/addresses/{address}/unspent-outputs 按地址列出未花费的交易输出
XRPRippleApi get_latest_mined_xrp__ripple_block GET /blockchain-data/xrp-specific/{network}/blocks/last 获取最新挖掘的XRP (Ripple) 区块
XRPRippleApi get_xrp__ripple_address_details GET /blockchain-data/xrp-specific/{network}/addresses/{address} 获取XRP (Ripple) 地址详情
XRPRippleApi get_xrp__ripple_block_details_by_block_hash GET /blockchain-data/xrp-specific/{network}/blocks/hash/{blockHash} 按区块哈希获取XRP (Ripple) 区块详情
XRPRippleApi get_xrp__ripple_block_details_by_block_height GET /blockchain-data/xrp-specific/{network}/blocks/height/{blockHeight} 按区块高度获取XRP (Ripple) 区块详情
XRPRippleApi get_xrp__ripple_transaction_details_by_transaction_id GET /blockchain-data/xrp-specific/{network}/transactions/{transactionHash} 按交易ID获取XRP (Ripple) 交易详情
XRPRippleApi list_xrp__ripple_transactions_by_address GET /blockchain-data/xrp-specific/{network}/addresses/{address}/transactions 按地址列出XRP (Ripple) 交易
XRPRippleApi list_xrp__ripple_transactions_by_address_and_time_range GET /blockchain-data/xrp-specific/{network}/addresses/{address}/transactions-by-time-range 按地址和时间范围列出XRP (Ripple) 交易
XRPRippleApi list_xrp__ripple_transactions_by_block_hash GET /blockchain-data/xrp-specific/{network}/blocks/hash/{blockHash}/transactions 按区块哈希列出XRP (Ripple) 交易
XRPRippleApi list_xrp__ripple_transactions_by_block_height GET /blockchain-data/xrp-specific/{network}/blocks/height/{blockHeight}/transactions 按区块高度列出XRP (Ripple) 交易
ZilliqaApi get_latest_mined_zilliqa_block GET /blockchain-data/zilliqa-specific/{network}/blocks/last 获取最新挖掘的Zilliqa 区块
ZilliqaApi get_zilliqa_address_details GET /blockchain-data/zilliqa-specific/{network}/addresses/{address} 获取Zilliqa 地址详情
ZilliqaApi get_zilliqa_block_details_by_block_hash GET /blockchain-data/zilliqa-specific/{network}/blocks/hash/{blockHash} 按区块哈希获取Zilliqa 区块详情
ZilliqaApi get_zilliqa_block_details_by_block_height GET /blockchain-data/zilliqa-specific/{network}/blocks/height/{blockHeight} 按区块高度获取Zilliqa 区块详情
ZilliqaApi get_zilliqa_transaction_details_by_transaction_id GET /blockchain-data/zilliqa-specific/{network}/transactions/{transactionHash} 按交易ID获取Zilliqa 交易详情
ZilliqaApi list_zilliqa_transactions_by_address GET /blockchain-data/zilliqa-specific/{network}/addresses/{address}/transactions 按地址列出Zilliqa 交易
ZilliqaApi list_zilliqa_transactions_by_block_hash GET /blockchain-data/zilliqa-specific/{network}/blocks/hash/{blockHash}/transactions 按区块哈希列出Zilliqa 交易
ZilliqaApi list_zilliqa_transactions_by_block_height GET /blockchain-data/zilliqa-specific/{network}/blocks/height/{blockHeight}/transactions 按区块高度列出Zilliqa 交易

模型文档说明

要获取crate生成的文档,请使用

cargo doc --open

作者

[email protected]

依赖关系

~4-18MB
~245K SLoC