For the complete documentation index, see llms.txt. This page is also available as Markdown.

City Protocol SDK

TypeScript clients for integrating City Protocol wallets, funding, swaps, lending, vaults, portfolio data and AML screening.

The City Protocol SDK (@cityprotocol/core) is the builder-facing integration layer for City Protocol. It sits between your product and the underlying provider stack, so your team can offer wallets, funding, swaps, lending, vaults and screening without wiring each provider together independently.

What your team owns

Your product keeps its own logic. Your team owns:

  • the user experience;

  • the customer, account and ledger models;

  • policy, permissions and support operations;

  • how financial capabilities are packaged into your product.

The integration model

A typical City Protocol integration has three layers: your product, the City Protocol SDK with the City Protocol-managed backend flows, and the upstream providers and protocols.

Your frontend sends intent to your backend, which holds the credentials and calls the seven City Protocol SDK clients, each of which reaches its own upstream provider or protocol
Backend-first integration. Your backend holds credentials and calls the SDK clients, and the frontend renders the results.

For production, default to backend-first:

  1. The frontend collects user intent and renders the interface.

  2. The frontend calls your backend.

  3. Your backend calls the City Protocol SDK clients.

  4. Your backend stores state, enforces policy and processes asynchronous updates.

  5. The frontend renders normalized results.

Module map

Module
Client
Use it for

CityClient

Yield and managed vault interactions

CityPortfolioClient

Indexed portfolio and activity data

verifyPrivyWallet

Wallet login, session verification and connected-account identity

CityFundClient

Deposit addresses and supported-asset flows

CitySwapClient

Quotes, approvals, route building and execution orchestration

CityLendingClient

Morpho Blue and Aave V3 interactions

CityAmlClient

Wallet and transaction screening

Suggested rollout order

Most teams integrate in this sequence:

  1. wallet and account identity;

  2. funding and money movement;

  3. swaps, lending, vaults and portfolio features.

Start with Get started.

Last updated