Skip to main content

Goat plugin for JSON-RPC

Project description

GOAT SDK JSON-RPC Plugin

A plugin for the GOAT SDK that enables making JSON-RPC calls to any compatible endpoint.

Features

  • Make JSON-RPC calls to any compatible endpoint
  • Supports standard JSON-RPC 2.0 protocol
  • Fully async implementation using aiohttp
  • Integrates seamlessly with GOAT SDK and LangChain

Installation

poetry add goat-sdk-plugin-jsonrpc

Usage

from goat_plugins.jsonrpc import jsonrpc, JSONRpcPluginOptions

# Initialize the plugin with your RPC endpoint
tools = get_on_chain_tools(
    wallet=wallet_client,
    plugins=[
        jsonrpc(options=JSONRpcPluginOptions(endpoint="your-rpc-endpoint"))
    ],
)

# Example JSON-RPC call
response = await tools.JSONRpcFunc({
    "method": "eth_blockNumber",
    "params": [],
    "id": 1,
    "jsonrpc": "2.0"
})

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goat_sdk_plugin_jsonrpc-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goat_sdk_plugin_jsonrpc-0.1.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file goat_sdk_plugin_jsonrpc-0.1.1.tar.gz.

File metadata

  • Download URL: goat_sdk_plugin_jsonrpc-0.1.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.12.4-1-MANJARO

File hashes

Hashes for goat_sdk_plugin_jsonrpc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0baa9ba351184e006352d86b725fff328c6656a2e83c42db20cb2321ee7e8bac
MD5 2c17b09442d6a3c81d0d61c8f3a96a76
BLAKE2b-256 76d538531b6d536caeb73d0a05b61b6436fb915b0f04e2d3a07ce5e23cced9ba

See more details on using hashes here.

File details

Details for the file goat_sdk_plugin_jsonrpc-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for goat_sdk_plugin_jsonrpc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3187d698a6e14020b2543c0ac51056b85962eae09f3138cdb58ed40be0ef5a1e
MD5 3c65dcb4cb4ea9894985cf388c292a37
BLAKE2b-256 83e71aaa303eb5d96e3801be4453ca77f345c9902367fe5dadb93e31f4b9402f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page