> ## Documentation Index
> Fetch the complete documentation index at: https://docs.walley.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Typescript SDK (dApp)

> Integrate Walley into your Canton Network dApp with the @k2flabs/walley-dapp-sdk provider adapter. Let users connect, sign, and submit transactions from their self-custody wallet.

**Walley** is a self-custodial wallet for the Canton Network. The `@k2flabs/walley-dapp-sdk` package lets your dApp connect to a user's Walley wallet so they can approve connections, sign messages, and submit Daml transactions. With this SDK, your application should never need to touch users keys.

The SDK is a **provider adapter** for the official `@canton-network/dapp-sdk`. You register it once with the dApp SDK's `init()`, and Walley shows up as a wallet option next to any other Canton wallet your users have.

On the Canton dApp SDK 1.x? You don't need this package. [Add Walley as a remote wallet](https://docs.walley.cc/typescript-sdk/remote-gateway.md) instead. Your users get the same Walley popups either way.

> [card] [Quickstart](https://docs.walley.cc/typescript-sdk/quickstart.md)
>
> Install the SDK, register the adapter, and connect a wallet in a few minutes.

> [card] [Provider API](https://docs.walley.cc/typescript-sdk/provider-api.md)
>
> Every method you can call through the provider, with request and result shapes.

> [card] [Transactions & Fees](https://docs.walley.cc/typescript-sdk/transactions.md)
>
> Submit Daml commands and understand Walley's prepaid network-fee model.

> [card] [Ledger API](https://docs.walley.cc/typescript-sdk/ledger-api.md)
>
> Read ledger state through the wallet's authenticated read-only proxy.

> [card] [Remote Gateway](https://docs.walley.cc/typescript-sdk/remote-gateway.md)
>
> On the Canton dApp SDK 1.x? Add Walley without installing anything.

## How the integration works

Walley is a **hosted web wallet**. On interaction, the SDK opens a popup window to `walley.cc` for any action that needs the user's approval: connecting, signing a message, or reviewing and submitting a transaction. The user authenticates and approves inside that trusted Walley window, and the result is returned to your dApp.

This means:

* **Your dApp never sees the user's keys.** Signing happens entirely inside Walley.
* **Every sensitive action is user-approved** in a window your dApp does not control.
* **There is nothing to install.** Any user with a Walley account can connect from a normal browser.

> [!NOTE]
>
> Because each interaction opens a popup, call SDK methods like `connect`, `signMessage`, and `prepareExecute` in response to a user gesture (such as a button click). Browsers block popups that are not triggered by user interaction.

## What you can build

* **Connect a wallet** and read the user's party identity, public key, and network.
* **Request a signature** over an arbitrary message, useful for off-chain authentication.
* **Prepare and submit Daml commands**, either fire-and-forget or awaiting the committed result.
* **Query ledger state** through the wallet's authenticated read-only proxy.

## Requirements

* A browser-based dApp (the adapter is inactive during server-side rendering and in Node).
* [`@canton-network/dapp-sdk`](https://www.npmjs.com/package/@canton-network/dapp-sdk) `0.24.x` as a peer dependency. On 1.x, use the [remote gateway](https://docs.walley.cc/typescript-sdk/remote-gateway.md) instead.
* Your users each need a Walley wallet. They can create one at [walley.cc](https://walley.cc).

Ready to wire it up? Head to the [Quickstart](https://docs.walley.cc/typescript-sdk/quickstart.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.