coinbase_agentkit.action_providers.cdp package¶
Submodules¶
coinbase_agentkit.action_providers.cdp.cdp_api_action_provider module¶
CDP API action provider.
- class coinbase_agentkit.action_providers.cdp.cdp_api_action_provider.CdpApiActionProvider(config=None)¶
Bases:
ActionProvider
[EvmWalletProvider
]Provides actions for interacting with CDP API.
This provider is used for any action that uses the CDP API, but does not require a CDP Wallet.
- address_reputation(args)¶
Check the reputation of an Ethereum address.
- Parameters:
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- request_faucet_funds(wallet_provider, args)¶
Request test tokens from the Base Sepolia faucet.
- Parameters:
wallet_provider (EvmWalletProvider) – The wallet provider instance.
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- coinbase_agentkit.action_providers.cdp.cdp_api_action_provider.cdp_api_action_provider(config=None)¶
Create a new CDP API action provider.
- Parameters:
config (CdpProviderConfig | None) – Configuration for the CDP API provider.
- Returns:
A new CDP API action provider instance.
- Return type:
coinbase_agentkit.action_providers.cdp.cdp_wallet_action_provider module¶
CDP Wallet action provider.
- class coinbase_agentkit.action_providers.cdp.cdp_wallet_action_provider.CdpWalletActionProvider(config=None)¶
Bases:
ActionProvider
[CdpWalletProvider
]Action provider for CDP wallet operations.
- deploy_contract(wallet_provider, args)¶
Deploy an arbitrary smart contract.
- Parameters:
wallet_provider (CdpWalletProvider) – The CDP wallet provider instance.
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- deploy_nft(wallet_provider, args)¶
Deploy an NFT (ERC-721) smart contract.
- Parameters:
wallet_provider (CdpWalletProvider) – The CDP wallet provider instance.
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- deploy_token(wallet_provider, args)¶
Deploy an ERC20 token smart contract.
- Parameters:
wallet_provider (CdpWalletProvider) – The CDP wallet provider instance.
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- supports_network(_)¶
Check if the CDP action provider supports the given network.
- Parameters:
_ – The network to check.
- Return type:
bool
- Returns:
True
- trade(wallet_provider, args)¶
Trade assets using the CDP wallet provider.
- Parameters:
wallet_provider (CdpWalletProvider) – The CDP wallet provider instance.
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- coinbase_agentkit.action_providers.cdp.cdp_wallet_action_provider.cdp_wallet_action_provider(config=None)¶
Create a new CDP wallet action provider.
- Parameters:
config (CdpProviderConfig | None) – Configuration for the CDP wallet provider.
- Returns:
A new CDP wallet action provider instance.
- Return type:
coinbase_agentkit.action_providers.cdp.constants module¶
Constants for CDP action provider.
coinbase_agentkit.action_providers.cdp.schemas module¶
Schemas for CDP action providers.
- class coinbase_agentkit.action_providers.cdp.schemas.AddressReputationSchema(**data)¶
Bases:
BaseModel
Input argument schema for checking address reputation.
-
address:
str
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
network:
str
¶
-
address:
- class coinbase_agentkit.action_providers.cdp.schemas.DeployContractSchema(**data)¶
Bases:
BaseModel
Input argument schema for deploy contract action.
-
constructor_args:
dict
[str
,Any
] |None
¶
-
contract_name:
str
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
solidity_input_json:
str
¶
-
solidity_version:
str
¶
-
constructor_args:
- class coinbase_agentkit.action_providers.cdp.schemas.DeployNftSchema(**data)¶
Bases:
BaseModel
Input argument schema for deploy NFT action.
-
base_uri:
str
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
name:
str
¶
-
symbol:
str
¶
-
base_uri:
- class coinbase_agentkit.action_providers.cdp.schemas.DeployTokenSchema(**data)¶
Bases:
BaseModel
Input argument schema for deploy token action.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
name:
str
¶
-
symbol:
str
¶
-
total_supply:
str
¶
- class coinbase_agentkit.action_providers.cdp.schemas.RequestFaucetFundsSchema(**data)¶
Bases:
BaseModel
Input schema for requesting faucet funds.
-
asset_id:
str
|None
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
asset_id:
- class coinbase_agentkit.action_providers.cdp.schemas.TradeSchema(**data)¶
Bases:
BaseModel
Input argument schema for trade action.
-
from_asset_id:
str
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
to_asset_id:
str
¶
-
value:
str
¶
-
from_asset_id:
Module contents¶
CDP action provider for CDP protocol interactions.