Overview
This guide shows how to:- Sign a raw payload and read the resulting signature
- Access the
activityreturned by the API - Use custom Stampers (e.g., passkey) with
TurnkeyClient
The HTTP client
To make advanced API requests, use theTurnkeyClient exposed by TurnkeyContext.This client is tied to the active session, so stamping and organization context are automatically handled for you. You can see the API Reference for a complete list of available API endpoints and their parameters. All of these can be accessed through the
TurnkeyClient.
Sign a raw payload
UsesignRawPayload with a TSignRawPayloadBody. The response includes the activity and the ECDSA signature components r, s, and v. Below, we call it using the session‑bound client from TurnkeyContext (no extra configuration needed).
Access the activity
When creating, modifying, or using resources within Turnkey, an activity is created. You can learn more about activities in the Activities section. If you use theTurnkeyClient, you can view all the metadata of the activity you are performing. This includes the activity ID, votes list, status, and more.
Using other stampers: Passkey
By default, the session-boundTurnkeyClient handles stamping for you.If you want to stamp a request using a passkey explicitly, instantiate a passkey
Stamper, create a TurnkeyClient with it, and sign a payload:
TurnkeyClient, you can call any signing or activity endpoint (e.g., signRawPayload, signTransaction) and the client will handle stamping under the hood using your chosen stamper.
When using the passkey stamper, the user will be prompted to sign using the
passkey before every request is made.