Skip to main content
Not yet released. The packages on this page are not published to npm yet, so the install commands below will not resolve. The documented interface is stable and the code exists; only publication is outstanding. To use KeyStone from a frontend today, call the REST API or the TypeScript SDK, which is published. Contact us if you need early access.

What Are Action Delegates?

Action delegates are callback functions you pass to KeystoneProvider that handle on-chain operations. When the widget needs to deposit tokens or approve a token transfer, it calls your delegate instead of interacting with the blockchain directly. This is how Tier 2 (Interactive + Custody) integration works - your frontend collects the user’s intent, and your backend executes it through Fireblocks, BitGo, or any signing infrastructure.
KeyStone integrates no custody provider. Custodians named anywhere in these docs are examples of what you might run at your end; the delegate is your code calling your own infrastructure, and KeyStone never holds a custody relationship or a key of yours.

The Deposit Flow

When a user clicks “Deposit” in the widget:

Setting Up Delegates

Deposit Info Object

The depositInfo parameter passed to onDepositRequired contains everything needed to execute the deposit: Your backend can submit the calldata directly to escrowAddress on the specified chainId. No ABI knowledge needed.

Approval Info Object

The approvalInfo parameter passed to onApprovalRequired:

Backend Implementation

Your backend receives the deposit info and routes it to your custody provider:

Without Delegates (Tier 3)

If no delegates are provided and a wagmi provider is detected, the widget uses the connected wallet directly. No backend needed.

Without Delegates and No Wallet (Tier 1)

If no delegates and no wallet context, the deposit button is hidden. The settlement displays as view-only, and your backend handles deposits entirely through the SDK.