Skip to main content

Installation

Install the packages you need:

1. Create a Session Token (Backend)

Session tokens are scoped, short-lived JWTs that your frontend uses to call the KeyStone API. Your backend creates them using M2M credentials.

2. Set Up the Provider (Frontend)

Wrap your app (or the relevant section) with KeystoneProvider:

3. Use Hooks

Now you can use any hook inside the provider:

4. Submit an Instruction

Create a settlement by submitting your side of the trade. A DvP instruction requires two legs - one for asset delivery and one for payment. The direction of each leg is derived from your role:

5. Handle Deposits (Tier 2)

For custody wallet integration, provide action delegates:
Your backend receives the calldata and submits it through your custody provider:

6. Handle Webhooks (Backend)

Set up webhook processing with signature verification:

Next: Hooks Reference

Explore the full hooks API.