Introduction
The@turnkey/http package is a fully-typed lower-level HTTP client for developers integrating with Turnkey.
Installing
To get started install the@turnkey/http client.
Initializing
Create a new client for use in your JavaScript/Typescript applications. You can initialize a newTurnkeyClient using the TurnkeyClient constructor. The TurnkeyClient serves as your entry point to interact with the Turnkey API.
Parameters
The base URL for the Turnkey API. Note: An error
Missing base URL. Please verify env vars. will be thrown if a value is not provided.An instance of a stamper class (e.g.
ApiKeyStamper) used to create signatures for authenticating API requests.- applications signing requests with Passkeys or webauthn devices should use
@turnkey/webauthn-stamper - applications signing requests with API keys should use
@turnkey/api-key-stamper - applications that need to sign requests within an iframe, particularly when handling sensitive operations like Auth, or Key or Wallet Export, should use the
@turnkey/iframe-stamper.