Interfaces

AuthInterceptorOptions

Defined in: hooks/axios/withAuth.ts:10

Properties

apiKeyId
apiKeyId: string;
Defined in: hooks/axios/withAuth.ts:18 The API key ID Examples: ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ ‘organizations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apiKeys/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’
apiKeySecret
apiKeySecret: string;
Defined in: hooks/axios/withAuth.ts:27 The API key secret Examples: ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==’ (Edwards key (Ed25519)) ‘-----BEGIN EC PRIVATE KEY-----\n…\n…\n…==\n-----END EC PRIVATE KEY-----\n’ (EC key (ES256))
walletSecret?
optional walletSecret: string;
Defined in: hooks/axios/withAuth.ts:30 The Wallet Secret
source?
optional source: string;
Defined in: hooks/axios/withAuth.ts:33 The source of the request
sourceVersion?
optional sourceVersion: string;
Defined in: hooks/axios/withAuth.ts:36 The version of the source of the request
expiresIn?
optional expiresIn: number;
Defined in: hooks/axios/withAuth.ts:39 Optional expiration time in seconds (defaults to 120)
debug?
optional debug: boolean;
Defined in: hooks/axios/withAuth.ts:42 Whether to log request/response details

Functions

withAuth()

function withAuth(axiosClient: AxiosInstance, options: AuthInterceptorOptions): AxiosInstance;
Defined in: hooks/axios/withAuth.ts:52 Axios interceptor for adding the JWT to the Authorization header.

Parameters

axiosClient
AxiosInstance The Axios client instance to add the interceptor to
options
AuthInterceptorOptions Options for the request including API keys and debug flag

Returns

AxiosInstance The modified request configuration with the Authorization header added