coinbase_agentkit.action_providers.weth package¶
Submodules¶
coinbase_agentkit.action_providers.weth.constants module¶
Constants for WETH action provider.
coinbase_agentkit.action_providers.weth.schemas module¶
Schemas for WETH action provider.
- class coinbase_agentkit.action_providers.weth.schemas.WrapEthSchema(**data)¶
Bases:
BaseModel
Input schema for wrapping ETH to WETH.
-
amount_to_wrap:
str
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod validate_amount(v)¶
Validate that amount is a valid wei value (whole number as string).
- Return type:
str
-
amount_to_wrap:
coinbase_agentkit.action_providers.weth.weth_action_provider module¶
- class coinbase_agentkit.action_providers.weth.weth_action_provider.WethActionProvider¶
Bases:
ActionProvider
[EvmWalletProvider
]Provides actions for interacting with WETH.
- supports_network(network)¶
Check if network is supported by WETH actions.
- Parameters:
network (Network) – The network to check support for.
- Returns:
True if the network is supported, False otherwise.
- Return type:
bool
- wrap_eth(wallet_provider, args)¶
Wrap ETH to WETH by calling the deposit function on the WETH contract.
- Parameters:
wallet_provider (EvmWalletProvider) – The wallet provider to wrap ETH from.
args (dict[str, Any]) – Arguments containing amount_to_wrap in wei.
- Returns:
A message containing the wrap details or error message.
- Return type:
str
- coinbase_agentkit.action_providers.weth.weth_action_provider.weth_action_provider()¶
Create a new WethActionProvider instance.
- Returns:
A new instance of the WETH action provider.
- Return type:
Module contents¶
WETH action provider for wrapped ETH operations.