Module: ERPC

Defined in:
lib/erpc_sdk/rpc.rb,
lib/erpc_sdk/rest.rb,
lib/erpc_sdk/client.rb,
lib/erpc_sdk/config.rb,
lib/erpc_sdk/errors.rb,
lib/erpc_sdk/version.rb,
lib/erpc_sdk/transport.rb,
lib/erpc_sdk/websocket.rb

Defined Under Namespace

Modules: Redaction, URLs, Validation Classes: AccountClient, BatchPolicyError, Client, ClientConfig, CloudCatalogClient, CloudClient, CloudClientConfig, CloudCreditClient, CloudResourcesClient, ConfigError, Error, EthereumClient, EthereumSubscriptions, HttpError, HttpJsonRpcTransport, HttpResponse, InvalidResponseError, JsonRpcError, NetHttpAdapter, PendingRpcBatchRequest, PendingRpcRequest, PriceClient, RestTransport, RpcNamespace, RpcSubscription, SolanaClient, SolanaSubscriptions, SubscriptionsBase, TimeoutError, TransportError, UsageClient, WebSocketConnection, WebSocketJsonRpcTransport

Constant Summary collapse

SOLANA_RPC_METHODS =
[
  "getAccountInfo",
  "getBalance",
  "getBlock",
  "getBlockCommitment",
  "getBlockHeight",
  "getBlockProduction",
  "getBlockTime",
  "getBlocks",
  "getBlocksWithLimit",
  "getClusterNodes",
  "getEpochInfo",
  "getEpochSchedule",
  "getFeeForMessage",
  "getFirstAvailableBlock",
  "getGenesisHash",
  "getHealth",
  "getHighestSnapshotSlot",
  "getIdentity",
  "getInflationGovernor",
  "getInflationRate",
  "getInflationReward",
  "getLargestAccounts",
  "getLatestBlockhash",
  "getLeaderSchedule",
  "getMaxRetransmitSlot",
  "getMaxShredInsertSlot",
  "getMinimumBalanceForRentExemption",
  "getMultipleAccounts",
  "getParsedTransaction",
  "getPriorityFeeEstimate",
  "getProgramAccounts",
  "getProgramAccountsV2",
  "getRecentPerformanceSamples",
  "getRecentPrioritizationFees",
  "getSignatureStatuses",
  "getSignaturesForAddress",
  "getSlot",
  "getSlotLeader",
  "getSlotLeaders",
  "getStakeMinimumDelegation",
  "getSupply",
  "getTokenAccountBalance",
  "getTokenAccountsByDelegate",
  "getTokenAccountsByOwner",
  "getTokenLargestAccounts",
  "getTokenSupply",
  "getTransaction",
  "getTransactionCount",
  "getVersion",
  "getVoteAccounts",
  "isBlockhashValid",
  "minimumLedgerSlot",
  "requestAirdrop",
  "sendTransaction",
  "simulateTransaction"
].freeze
SOLANA_DAS_METHODS =
[
  "getAsset",
  "getAssetBatch",
  "getAssetProof",
  "getAssetProofBatch",
  "getAssetsByAuthority",
  "getAssetsByCreator",
  "getAssetsByGroup",
  "getAssetsByOwner",
  "getNftEditions",
  "getSignaturesForAsset",
  "getTokenAccounts",
  "getTokensByDelegate",
  "getTokensByOwner",
  "searchAssets"
].freeze
SOLANA_HISTORY_METHODS =
[
  "getTransactionsForAddress",
  "getTransfersByAddress"
].freeze
SOLANA_LEADER_METHODS =
[
  "getLeaderSlots",
  "getValidatorsInformation"
].freeze
SOLANA_ANALYTICS_METHODS =
[
  "jetEpochSummary",
  "jetProgramStats",
  "jetSlotStats",
  "jetTopPrograms",
  "jetTpsTimeseries"
].freeze
SOLANA_ENHANCED_SUBSCRIPTION_METHODS =
[
  "accountSubscribe",
  "accountUnsubscribe",
  "transactionSubscribe",
  "transactionUnsubscribe"
].freeze
ETHEREUM_RPC_METHODS =
[
  "eth_accounts",
  "eth_baseFee",
  "eth_blobBaseFee",
  "eth_blockNumber",
  "eth_call",
  "eth_callMany",
  "eth_capabilities",
  "eth_chainId",
  "eth_createAccessList",
  "eth_estimateGas",
  "eth_feeHistory",
  "eth_gasPrice",
  "eth_getAccount",
  "eth_getBalance",
  "eth_getBlockByHash",
  "eth_getBlockByNumber",
  "eth_getBlockReceipts",
  "eth_getBlockTransactionCountByHash",
  "eth_getBlockTransactionCountByNumber",
  "eth_getCode",
  "eth_getFilterChanges",
  "eth_getFilterLogs",
  "eth_getLogs",
  "eth_getProof",
  "eth_getRawTransactionByHash",
  "eth_getStorageAt",
  "eth_getTransactionByBlockHashAndIndex",
  "eth_getTransactionByBlockNumberAndIndex",
  "eth_getTransactionByHash",
  "eth_getTransactionBySenderAndNonce",
  "eth_getTransactionCount",
  "eth_getTransactionReceipt",
  "eth_getUncleCountByBlockHash",
  "eth_getUncleCountByBlockNumber",
  "eth_maxPriorityFeePerGas",
  "eth_newBlockFilter",
  "eth_newFilter",
  "eth_newPendingTransactionFilter",
  "eth_sendRawTransaction",
  "eth_signTransaction",
  "eth_simulateV1",
  "eth_submitWork",
  "eth_syncing",
  "eth_uninstallFilter",
  "net_listening",
  "net_peerCount",
  "net_version",
  "txpool_content",
  "txpool_contentFrom",
  "txpool_inspect",
  "txpool_status",
  "web3_clientVersion",
  "web3_sha3"
].freeze
ETHEREUM_SUBSCRIPTION_METHODS =
[
  "eth_subscribe",
  "eth_unsubscribe"
].freeze
DEFAULT_ENDPOINT =
"https://edge.erpc.global"
DEFAULT_ACCOUNT_ENDPOINT =
"https://solana-rpc.erpc.global"
DEFAULT_USER_ENDPOINT =
"https://user-api.erpc.global"
DEFAULT_TIMEOUT =
30.0
VERSION =
"0.4.0"

Class Method Summary collapse

Class Method Details

.create_client(config, **options) ⇒ Object



129
130
131
# File 'lib/erpc_sdk/client.rb', line 129

def create_client(config, **options)
  Client.new(config, **options)
end

.create_cloud_client(config, **options) ⇒ Object



133
134
135
# File 'lib/erpc_sdk/client.rb', line 133

def create_cloud_client(config, **options)
  CloudClient.new(config, **options)
end