@turnkey/api-key-stamper
package simplifies the process of using your public/private API keys and passkeys to stamp and approve activity requests for Turnkey’s API. This stamping mechanism is central to the API’s security, ensuring that each request is authenticated and authorized. For an in-depth understanding of API keys see this section.
@turnkey/api-key-stamper
client.
ApiKeyStamper
class implements the TStamper
interface used by the TurnkeyClient in the @turnkey/http
module. It encapsulates the logic necessary to sign activity requests and generates the appropriate HTTP headers for authentication. To get started with an ApiKeyStamper
, you can initialize it using its constructor:
constructor(config: TApiKeyStamperConfig): TStamper
TApiKeyStamperConfig
TStamper
ApiKeyStamper
with the TurnkeyClient
to make a request to Turnkey’s /public/v1/query/whoami
endpoint:
stamp: (input: string) => Promise<TStamp>
TStamp