Skip to main content

Crate erpc_sdk

Crate erpc_sdk 

Source
Expand description

Async Rust client for ERPC JSON-RPC, subscriptions, price, account, usage, and Cloud APIs.

Re-exports§

pub use dex_catalog::DEX_ALIASES;
pub use dex_catalog::DEX_CATALOG_AS_OF_DATE;
pub use dex_catalog::DEX_CATALOG_CONTENT_DIGEST;
pub use dex_catalog::DEX_CATALOG_VERSION;
pub use dex_catalog::DEX_CHAIN_IDS;
pub use dex_catalog::DEX_DEPLOYMENTS;
pub use dex_catalog::DexAlias;
pub use dex_catalog::DexChainId;
pub use dex_catalog::DexDeployment;
pub use dex_catalog::ListPoolDefinitionsOptions;
pub use dex_catalog::NATIVE_WRAP_DEFINITIONS;
pub use dex_catalog::NativeWrapDefinition;
pub use dex_catalog::POOL_DEFINITIONS;
pub use dex_catalog::PoolAdapter;
pub use dex_catalog::PoolDefinition;
pub use dex_catalog::dexes;
pub use dex_catalog::find_pool_definition_by_address;
pub use dex_catalog::find_pool_definitions_by_pair;
pub use dex_catalog::get_dex_deployment;
pub use dex_catalog::get_native_wrap_definition;
pub use dex_catalog::get_pool_definition;
pub use dex_catalog::list_pool_definitions;
pub use dex_catalog::pools;
pub use token_catalog::TOKEN_ALIASES;
pub use token_catalog::TOKEN_ASSETS;
pub use token_catalog::TOKEN_CATALOG_AS_OF_DATE;
pub use token_catalog::TOKEN_CATALOG_CONTENT_DIGEST;
pub use token_catalog::TOKEN_CATALOG_VERSION;
pub use token_catalog::TOKEN_CHAIN_IDS;
pub use token_catalog::TOKEN_DEPLOYMENTS;
pub use token_catalog::TokenAlias;
pub use token_catalog::TokenAsset;
pub use token_catalog::TokenChainId;
pub use token_catalog::TokenDeployment;
pub use token_catalog::TokenRepresentationKind;
pub use token_catalog::TokenStandard;
pub use token_catalog::TokenStatus;
pub use token_catalog::find_token_deployment_by_address;
pub use token_catalog::find_token_deployments_by_symbol;
pub use token_catalog::get_native_token_deployment;
pub use token_catalog::get_token_asset;
pub use token_catalog::get_token_deployment;
pub use token_catalog::list_token_deployments;
pub use token_catalog::token_chain_ids;
pub use token_catalog::tokens;
pub use token_rankings::TOKEN_RANKINGS;
pub use token_rankings::TOKEN_RANKINGS_AS_OF;
pub use token_rankings::TOKEN_RANKINGS_CONTENT_DIGEST;
pub use token_rankings::TOKEN_RANKINGS_COVERAGE;
pub use token_rankings::TOKEN_RANKINGS_METADATA;
pub use token_rankings::TOKEN_RANKINGS_METRIC;
pub use token_rankings::TOKEN_RANKINGS_SCHEMA_VERSION;
pub use token_rankings::TOKEN_RANKINGS_SOURCE_IDS;
pub use token_rankings::TOKEN_RANKINGS_STATUS;
pub use token_rankings::TokenRanking;
pub use token_rankings::TokenRankingCoverage;
pub use token_rankings::TokenRankingMetadata;
pub use token_rankings::list_token_rankings;

Modules§

dex_catalog
Offline DEX deployment, pool, alias, and native-wrap lookups.
token_catalog
Offline token and deployment catalog lookups.
token_rankings
Offline token ranking snapshot lookups.

Structs§

AccountClient
Account and token-balance API.
AddressTransaction
One indexed address transaction.
AddressTransactionPage
Paginated indexed address transactions.
AddressTransactionsOptions
Options for indexed address transactions.
AddressTransfer
One indexed address transfer.
AddressTransferFilters
Numeric filters for indexed transfers.
AddressTransferPage
Paginated indexed address transfers.
AddressTransfersOptions
Options for indexed address transfers.
ArbitrumClient
Arbitrum One read-only service client.
ArbitrumRpcClient
Arbitrum One read-only JSON-RPC namespace.
ArcClient
Arc read-only service client.
ArcRpcClient
Arc read-only JSON-RPC namespace.
AssetBatchRequest
Named request for a batch of indexed assets or proofs.
AssetListRequest
Shared indexed-asset pagination request.
AssetRequest
Named request for one indexed asset or proof.
AvalancheAvaxClient
AvalancheAvaxClient JSON-RPC namespace.
AvalancheClient
Avalanche C-Chain and native-chain RPC namespaces.
AvalancheIndexClient
Explicit chain/container routes exposed by the Avalanche Index API.
AvalancheIndexRpcClient
AvalancheIndexRpcClient JSON-RPC namespace.
AvalancheInfoClient
AvalancheInfoClient JSON-RPC namespace.
AvalanchePChainClient
AvalanchePChainClient JSON-RPC namespace.
AvalancheProposerVmClient
AvalancheProposerVmClient JSON-RPC namespace.
AvalancheXChainClient
AvalancheXChainClient JSON-RPC namespace.
BaseClient
Base read-only service client.
BaseRpcClient
Base read-only JSON-RPC namespace.
BinaryUpdate
Binary price update payload.
BitcoinClient
Bitcoin service client.
BitcoinRpcClient
Bitcoin Core JSON-RPC namespace.
BridgeError
Secret-free error returned by the standalone bridge client.
BscClient
BNB Smart Chain read-only service client.
BscRpcClient
BNB Smart Chain read-only JSON-RPC namespace.
CancellationToken
A token which can be used to signal a cancellation request to one or more tasks.
CloudCatalogClient
Public Cloud catalog API.
CloudCredit
Point-in-time Cloud credit and burn-rate quote.
CloudCreditClient
Cloud credit API.
CloudOffering
One available Cloud offering.
CloudOfferingBilling
Hourly catalog billing quote.
CloudOfferingCompute
Compute section of an offering.
CloudOfferingSolana
Solana section of an offering.
CloudResource
Credential-free Cloud resource projection.
CloudResourceStatus
Cloud resource status response.
CloudResourceStatusBilling
Billing state attached to a resource status response.
CloudResourcesClient
Cloud resource inventory and status API.
EpochSummary
Epoch analytics summary.
ErpcClient
A configured ERPC client containing all public service clients.
ErpcClientConfig
Configuration used to create an crate::ErpcClient.
ErpcCloudClient
Authenticated Cloud catalog, credit, resources, and usage APIs.
ErpcCloudClientConfig
Configuration for an authenticated ERPC Cloud client.
EthereumClient
Standard Ethereum JSON-RPC and subscriptions.
EthereumRpcClient
Standard Ethereum JSON-RPC namespace.
EthereumSubscriptions
Ethereum subscription client.
EvmBlockSnapshot
EVM block snapshot included in an exact-input quote.
EvmUnsignedTransaction
Chain-bound unsigned EVM transaction envelope.
ExactInputQuoteRequest
Exact-input quote request with the six contract fields.
ExactInputQuoteResult
Exact-input quote result.
ExactInputSwapPreparation
Unsigned ERC20-to-ERC20 router preparation.
ExactInputSwapSimulation
Result of a simulated prepared swap.
HttpJsonRpcTransport
Credential-safe HTTP JSON-RPC transport.
HttpTransportConfig
Configuration for the HTTP JSON-RPC transport.
HyperliquidClient
Hyperliquid HyperEVM mainnet read-only JSON-RPC service client.
HyperliquidRpcClient
Hyperliquid HyperEVM mainnet read-only JSON-RPC namespace.
IndexedAssetList
Paginated indexed-asset list.
JsonRpcErrorObject
Wire representation of a JSON-RPC error object.
KaiaClient
Kaia Mainnet read-only service client.
KaiaRpcClient
Kaia Mainnet read-only JSON-RPC namespace.
LeaderSlot
Scheduled leader and public network metadata.
LeaderSlotsResult
Leader slot response envelope.
MayanEvmUnsignedTransaction
Unsigned EVM transaction returned by Mayan’s builder.
MayanSolanaUnsignedTransaction
Unsigned Solana v0 transaction returned by Mayan’s builder.
MayanSwiftV2Allowance
ERC20 allowance requirement for an Ethereum-source build.
MayanSwiftV2BridgeClient
Standalone optional Mayan Swift v2 bridge client.
MayanSwiftV2BridgeConfig
Configuration for MayanSwiftV2BridgeClient.
MayanSwiftV2Build
Unsigned provider build result.
MayanSwiftV2BuildRequest
Build request containing a previously returned quote.
MayanSwiftV2BuildValidation
Structural validation disclosure for a provider build.
MayanSwiftV2LocalBuild
Locally constructed unsigned build.
MayanSwiftV2LocalBuildConfig
Configuration for local Mayan source-swap preparation and unsigned builds.
MayanSwiftV2LocalBuildRequest
Local build request containing a previously prepared plan.
MayanSwiftV2LocalBuildValidation
Local build validation disclosure.
MayanSwiftV2LocalConstruction
Local construction metadata.
MayanSwiftV2LocalContext
Local source-swap preparation context.
MayanSwiftV2LocalEvmRpcEvidence
EVM source RPC evidence.
MayanSwiftV2LocalSolanaRpcEvidence
Solana source RPC evidence.
MayanSwiftV2LocalSolanaRpcLookupTableEvidence
Solana lookup-table evidence.
MayanSwiftV2LocalSourceSwapInstruction
A validated source-swap instruction.
MayanSwiftV2LocalSourceSwapInstructionAccount
Account metadata in a source-swap instruction.
MayanSwiftV2Quote
Normalized provider-signed Mayan Swift v2 quote.
MayanSwiftV2QuoteRequest
Exact native EURC or USDC bridge quote request.
MayanSwiftV2SourceSwap
Provider-selected intermediate source swap.
MayanSwiftV2SourceSwapPlan
Prepared local source-swap plan.
MayanSwiftV2Status
Read-only indexed explorer status.
MayanSwiftV2StatusRequest
Explorer status request.
MonadClient
Monad mainnet read-only service client.
MonadRpcClient
Monad mainnet read-only JSON-RPC namespace.
MonthlyApiKeyChainUsage
Monthly usage aggregated by chain.
MonthlyApiKeyMethodUsage
Usage for one method within a chain.
MonthlyApiKeyUsage
Monthly API key usage response.
MonthlyApiKeyUsageEntry
Credential-safe usage for one API key.
MonthlyApiKeyUsageParams
Parameters for monthly usage retrieval.
NearAccountView
Typed account state returned by the fixed NEAR view_account query.
NearBlockHeader
Stable fields from a NEAR block header.
NearBlockView
A typed NEAR block response with a guarded chunk collection.
NearClient
NEAR service client.
NearNodeVersion
NEAR node software version.
NearRpcClient
Read-only NEAR JSON-RPC namespace.
NearStatus
NEAR node status.
NearSyncInfo
NEAR node synchronization information.
NumericFilter
Numeric range filter for indexed history.
OptimismClient
OP Mainnet read-only service client.
OptimismRpcClient
OP Mainnet read-only JSON-RPC namespace.
ParsedPriceMetadata
Optional timing and slot metadata.
ParsedPriceUpdate
Parsed update for one feed.
ParsedPublisherStakeCaps
Parsed publisher stake cap envelope.
PendingRpcBatchRequest
An inert batch request that preserves one caller batch on the wire.
PendingRpcRequest
An inert typed request. Network I/O begins only when send is awaited.
PendingSuiGrpcWebRequest
An inert, typed Sui gRPC-Web request.
PingMeasurement
One network measurement to a scheduled leader.
PolygonClient
Polygon PoS mainnet read-only service client.
PolygonRpcClient
Polygon PoS mainnet read-only JSON-RPC namespace.
PrepareExactInputSwapRequest
Request for unsigned ERC20-to-ERC20 preparation or RPC simulation.
PriceClient
Price metadata, updates, publisher caps, and streaming API.
PriceFeedMetadata
Price feed identifier and optional attributes.
PricePoint
One published price point.
PriceStreamEvent
Parsed server-sent event from the price stream.
PriceStreamOptions
Options for the server-sent-events price stream.
PriceUpdateOptions
Options shared by latest, historical, and streaming price updates.
PriceUpdateResponse
Latest or historical price updates.
PriorityFeeEstimate
Priority fee estimate with forward-compatible additional fields.
ProgramStatsBucket
One program statistics time bucket.
ProgramStatsOptions
Program statistics options.
PublisherStakeCap
One publisher and its stake cap.
PublisherStakeCapsResponse
Latest publisher stake caps.
QuoteFee
Fee fraction included in an exact-input quote.
RequestOptions
Per-request cancellation options.
RobinhoodClient
Robinhood Chain Public Mainnet read-only JSON-RPC service client.
RobinhoodRpcClient
Robinhood Chain Public Mainnet read-only JSON-RPC namespace.
RpcBatchCall
One call in an unsplit JSON-RPC batch.
RpcEndpointConfig
Configuration for one caller-owned JSON-RPC endpoint.
RpcNamespace
Typed request builder over one JSON-RPC endpoint and parameter mode.
RpcNotification
One JSON-RPC notification received over WebSocket.
RpcSubscription
Active subscription with typed notification retrieval and idempotent unsubscribe.
SlotStatsRow
One slot statistics row.
SolanaAnalyticsClient
SolanaAnalyticsClient JSON-RPC namespace.
SolanaClient
Standard and extended Solana APIs.
SolanaContext
Standard Solana response context.
SolanaContextResult
Value wrapped with a Solana response context.
SolanaDasClient
SolanaDasClient JSON-RPC namespace.
SolanaHistoryClient
SolanaHistoryClient JSON-RPC namespace.
SolanaLeaderClient
SolanaLeaderClient JSON-RPC namespace.
SolanaRpcClient
Standard Solana JSON-RPC namespace.
SolanaSubscriptions
Solana WebSocket subscription client.
SoneiumClient
Soneium mainnet read-only service client.
SoneiumRpcClient
Soneium mainnet read-only JSON-RPC namespace.
SuiBalance
Sui balance projection returned by GetBalance.
SuiClient
Public Sui namespace containing only the binary gRPC-Web client.
SuiGrpcWebClient
Read-only Sui gRPC-Web client.
SuiGrpcWebEndpointConfig
Configuration for one caller-owned binary Sui gRPC-Web endpoint.
SuiObjectSummary
Sui object identity projection returned by GetObject.
SuiServiceInfo
Sui service identity returned by GetServiceInfo.
SwapAllowance
Allowance requirement attached to a prepared swap.
SwapClient
Configured RPC-backed swap client.
SwapFreshness
Freshness limits for an exact-input quote. Omitted fields use SDK defaults.
SwapPathEntry
One ERC20 deployment and address in an execution path.
TokenBalance
Current account token balance.
TopProgramRow
One top-program analytics row.
TopProgramsOptions
Top-program analytics options.
TpsBucket
One TPS time bucket.
TpsTimeseriesOptions
TPS time-series options.
TronClient
TRON Mainnet read-only JSON-RPC service client.
TronRpcClient
TRON Mainnet read-only JSON-RPC namespace.
UsageClient
Monthly usage API.
ValidatorInformation
Validator information and public network metadata.
ValidatorsInformationOptions
Validator information query.
ValidatorsInformationResult
Validator information response envelope.

Enums§

AddressTransferDirection
Direction for an indexed transfer query.
AddressTransferType
Indexed transfer operation.
AnalyticsTimeBound
Number or timestamp string accepted by analytics time bounds.
BridgeErrorCode
Stable error codes for the optional bridge client.
CloudCreditAlertLevel
Credit alert level.
CloudOfferingComputeTenancy
Compute metadata for an offering.
CloudOfferingSolanaTransport
Solana transport offered by a catalog item.
CloudResourceBillingStatus
Resource billing state.
CloudResourceKind
Cloud resource kind.
CloudResourceMode
Cloud resource delivery mode.
ErpcError
All errors produced by the SDK.
ErpcErrorCode
Stable category for an SDK error.
ErpcPlan
ERPC account plan returned by the token balance API.
JsonRpcId
JSON-RPC request or response identifier.
MayanSwiftV2LocalSourceRpcEvidence
Source RPC evidence for either source chain.
MayanSwiftV2LocalSourceSwapPlan
Direct source-swap plan variant.
MayanSwiftV2UnsignedTransaction
Unsigned provider transaction for either reviewed source chain.
NearBlockId
A height or opaque hash identifying a NEAR block.
NearBlockReference
One mutually exclusive selector for a NEAR block or account read.
NearFinality
A named NEAR block finality selector.
PriceAssetType
Asset category used to filter feed metadata.
PriceEncoding
Binary encoding requested from the price API.
SlotStatsOptions
Slot statistics query by one slot or inclusive range.
SolanaCommitment
Solana commitment level.
SolanaEncoding
Solana account or transaction encoding.
SubscriptionId
JSON-RPC subscription identifier.
SwapExecutionError
Errors produced by unsigned EVM swap preparation and simulation.
SwapExecutionErrorCode
Fixed domain error codes for unsigned EVM swap preparation and simulation.
SwapQuoteError
Domain errors produced by quote validation, with upstream errors preserved.
SwapQuoteErrorCode
Fixed domain error codes for exact-input quote validation.

Constants§

ARBITRUM_RPC_METHODS
Arbitrum One read-only JSON-RPC methods represented by this release.
ARC_RPC_METHODS
Arc read-only JSON-RPC methods represented by this release.
AVALANCHE_AVAX_METHODS
C-Chain AVAX API methods represented by this release.
AVALANCHE_INDEX_METHODS
Index API methods represented by this release.
AVALANCHE_INFO_METHODS
Node information API methods represented by this release.
AVALANCHE_PROPOSER_VM_METHODS
P-Chain proposer VM API methods represented by this release.
AVALANCHE_P_CHAIN_METHODS
P-Chain API methods represented by this release.
AVALANCHE_X_CHAIN_METHODS
X-Chain API methods represented by this release.
BASE_RPC_METHODS
Base read-only JSON-RPC methods represented by this release.
BITCOIN_RPC_METHODS
Bitcoin Core JSON-RPC methods represented by this release.
BSC_RPC_METHODS
BNB Smart Chain read-only JSON-RPC methods represented by this release.
DEFAULT_ACCOUNT_ENDPOINT
Default account endpoint.
DEFAULT_ARBITRUM_ENDPOINT
Default Arbitrum One JSON-RPC endpoint.
DEFAULT_ARC_ENDPOINT
Default Arc mainnet JSON-RPC endpoint.
DEFAULT_AVALANCHE_ENDPOINT
Default Avalanche JSON-RPC endpoint.
DEFAULT_BASE_ENDPOINT
Default Base JSON-RPC endpoint.
DEFAULT_BSC_ENDPOINT
Default BNB Smart Chain mainnet JSON-RPC endpoint.
DEFAULT_ENDPOINT
Default JSON-RPC and price endpoint.
DEFAULT_HYPERLIQUID_ENDPOINT
Default Hyperliquid HyperEVM mainnet JSON-RPC endpoint.
DEFAULT_KAIA_ENDPOINT
Default Kaia mainnet JSON-RPC endpoint.
DEFAULT_MONAD_ENDPOINT
Default Monad mainnet JSON-RPC endpoint.
DEFAULT_NEAR_ENDPOINT
Default NEAR mainnet JSON-RPC endpoint.
DEFAULT_OPTIMISM_ENDPOINT
Default OP Mainnet JSON-RPC endpoint.
DEFAULT_POLYGON_ENDPOINT
Default Polygon PoS mainnet JSON-RPC endpoint.
DEFAULT_ROBINHOOD_ENDPOINT
Default Robinhood Chain Public Mainnet JSON-RPC endpoint.
DEFAULT_SONEIUM_ENDPOINT
Default Soneium mainnet JSON-RPC endpoint.
DEFAULT_SUI_ENDPOINT
Default Sui mainnet binary gRPC-Web endpoint.
DEFAULT_TIMEOUT
Default request and connection-establishment timeout.
DEFAULT_TRON_ENDPOINT
Default TRON mainnet JSON-RPC endpoint.
DEFAULT_USER_ENDPOINT
Default user and Cloud endpoint.
ETHEREUM_RPC_METHODS
Ethereum JSON-RPC methods represented by this release.
ETHEREUM_SUBSCRIPTION_METHODS
Ethereum WebSocket subscription methods represented by this release.
HYPERLIQUID_RPC_METHODS
Hyperliquid HyperEVM mainnet read-only JSON-RPC methods represented by this release.
KAIA_RPC_METHODS
Kaia Mainnet read-only JSON-RPC methods represented by this release.
MONAD_RPC_METHODS
Monad mainnet read-only JSON-RPC methods represented by this release.
NEAR_RPC_METHODS
NEAR JSON-RPC methods represented by this release.
OPTIMISM_RPC_METHODS
OP Mainnet read-only JSON-RPC methods represented by this release.
POLYGON_RPC_METHODS
Polygon PoS mainnet read-only JSON-RPC methods represented by this release.
ROBINHOOD_RPC_METHODS
Robinhood Chain Public Mainnet read-only JSON-RPC methods represented by this release.
SOLANA_ANALYTICS_METHODS
Analytics RPC methods represented by this release.
SOLANA_DAS_METHODS
Indexed asset RPC methods represented by this release.
SOLANA_ENHANCED_SUBSCRIPTION_METHODS
Solana enhanced WebSocket subscription methods.
SOLANA_HISTORY_METHODS
Indexed address history RPC methods represented by this release.
SOLANA_LEADER_METHODS
Leader information RPC methods represented by this release.
SOLANA_RPC_METHODS
Standard Solana JSON-RPC methods represented by this release.
SONEIUM_RPC_METHODS
Soneium mainnet read-only JSON-RPC methods represented by this release.
SUI_GRPC_WEB_CONTENT_TYPE
Binary gRPC-Web content type required by the Sui endpoint.
SUI_GRPC_WEB_METHODS
Exact case-sensitive Sui unary method paths supported by this SDK.
TRON_RPC_METHODS
TRON Mainnet read-only JSON-RPC methods represented by this release.

Functions§

create_mayan_swift_v2_bridge_client
Creates a standalone Mayan Swift v2 bridge client.

Type Aliases§

BridgeClient
Alias for the standalone bridge client.
BridgeResult
Result type used by the standalone Mayan bridge client.
ExactInputSwapPathEntry
Alias matching the full exact-input path entry name.
ExactInputSwapRequest
Alias for callers that prefer a shorter execution request name.
IndexedAsset
Forward-compatible indexed asset object.
IndexedAssetProof
Forward-compatible indexed asset proof object.
MayanSwiftV2BuildResult
Alias for callers that use a result suffix.
MayanSwiftV2BuildUnsignedRequest
Alias for callers that include unsigned in the method name.
MayanSwiftV2QuoteResult
Alias for callers that use a result suffix.
MayanSwiftV2StatusResult
Alias for callers that use a result suffix.
PrepareExactInputSwapResult
Alias for the preparation result.
PriceStream
Boxed asynchronous stream returned by PriceClient::stream_price_updates.
Result
Result type returned by this crate.
SimulateExactInputSwapResult
Alias for the simulation result.
SwapExecutionResult
Result type for unsigned swap preparation and simulation.
SwapPreparation
Alias for callers that use the generic preparation name.
SwapQuoteRequest
Alias for callers that prefer the swap-specific request name.
SwapResult
Result type for the public swap quote client.
SwapSimulation
Alias for callers that use the generic simulation name.