Metadata-Version: 2.4
Name: dpx-sdk
Version: 0.2.0
Summary: Python SDK for the DPX Protocol — compliance-grade stablecoin settlement rail with LangChain and LlamaIndex toolkits
Project-URL: Homepage, https://untitledfinancial.com
Project-URL: Documentation, https://docs.untitledfinancial.com
Project-URL: Repository, https://github.com/untitledfinancial/dpx-mcp
License: BUSL-1.1
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27.0
Provides-Extra: all
Requires-Dist: langchain-core>=0.2.0; extra == 'all'
Requires-Dist: langchain>=0.2.0; extra == 'all'
Requires-Dist: llama-index-core>=0.10.0; extra == 'all'
Requires-Dist: pydantic>=2.0; extra == 'all'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2.0; extra == 'langchain'
Requires-Dist: langchain>=0.2.0; extra == 'langchain'
Requires-Dist: pydantic>=2.0; extra == 'langchain'
Provides-Extra: llamaindex
Requires-Dist: llama-index-core>=0.10.0; extra == 'llamaindex'
Description-Content-Type: text/markdown

# dpx-sdk

Python SDK for [DPX Protocol](https://untitledfinancial.com) — compliance-grade stablecoin settlement rail with native LangChain and LlamaIndex toolkits.

```bash
pip install dpx-sdk                      # core client
pip install "dpx-sdk[langchain]"         # + LangChain toolkit
pip install "dpx-sdk[llamaindex]"        # + LlamaIndex ToolSpec
pip install "dpx-sdk[all]"              # everything
```

## Quick start

```python
from dpx_sdk import DPX

with DPX() as dpx:
    # Check oracle before settling
    oracle = dpx.oracle_status()
    print(oracle.status, oracle.recommendation)  # STABLE  PROCEED

    # Get a binding quote
    quote = dpx.quote(amount_usd=500_000, has_fx=True, esg_score=75)
    print(f"Net: ${quote.net_amount_usd:,.2f}  Fee: {quote.total_fee_pct:.3f}%")

    # Execute in sandbox (safe default)
    result = dpx.settle(
        amount=500_000,
        source_currency="USD",
        destination_currency="EUR",
        recipient_address="0xYourRecipientAddress",
        sandbox=True,  # set False for live execution
    )
    print(result.status, result.settlement_id)
```

## LangChain

```python
from dpx_sdk.tools import DPXToolkit
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI

tools = DPXToolkit().get_tools()
agent = initialize_agent(tools, ChatOpenAI(), agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION)
agent.run("Check oracle stability, get a quote for $1M USD→EUR, and screen the counterparty 0x123...")
```

Available tools: `dpx_oracle_status` · `dpx_esg_score` · `dpx_compliance_screen` · `dpx_quote` · `dpx_settle`

**LangChain Hub:** `untitledfinancial/dpx-toolkit`

## LlamaIndex

```python
from dpx_sdk.tools import DPXToolSpec
from llama_index.agent.openai import OpenAIAgent

tools = DPXToolSpec().to_tool_list()
agent = OpenAIAgent.from_tools(tools, verbose=True)
agent.chat("Get a quote for $500K USD to EUR and execute in sandbox mode")
```

Available functions: `get_settlement_quote` · `execute_settlement` · `get_oracle_status` · `get_esg_score` · `screen_compliance`

**LlamaIndex Hub:** `untitledfinancial/dpx-tool-spec`

## MCP (Claude / Cursor)

```bash
npx @untitledfinancial/dpx-mcp
```

32 MCP tools for Claude Desktop and Cursor. [Setup →](https://docs.untitledfinancial.com/integrations/mcp)

## Links

- [Documentation](https://docs.untitledfinancial.com)
- [MCP on Smithery](https://smithery.ai/server/@untitledfinancial/dpx-mcp)
- [npm package](https://www.npmjs.com/package/@untitledfinancial/dpx-mcp)
- [Contracts on Base mainnet](https://base.blockscout.com/address/0xe333551E18ef0471A71d7e8e761212766aa5AD4f)
