Skip to main content

Interfaces

GetAuthHeadersOptions

Defined in: utils/http.ts:11 Options for generating authentication headers for API requests.

Properties

apiKeyId
Defined in: utils/http.ts:19 The API key ID Examples: ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ ‘organizations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apiKeys/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’
apiKeySecret
Defined in: utils/http.ts:28 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))
requestMethod
Defined in: utils/http.ts:33 The HTTP method for the request (e.g. ‘GET’, ‘POST’)
requestHost
Defined in: utils/http.ts:38 The host for the request (e.g. ‘api.cdp.coinbase.com’)
requestPath
Defined in: utils/http.ts:43 The path for the request (e.g. ‘/platform/v1/wallets’)
requestBody?
Defined in: utils/http.ts:48 Optional request body data
walletSecret?
Defined in: utils/http.ts:53 The Wallet Secret for wallet authentication
source?
Defined in: utils/http.ts:58 The source identifier for the request
sourceVersion?
Defined in: utils/http.ts:63 The version of the source making the request
expiresIn?
Defined in: utils/http.ts:68 Optional expiration time in seconds (defaults to 120)
audience?
Defined in: utils/http.ts:73 Optional audience claim for the JWT

Functions

getAuthHeaders()

Defined in: utils/http.ts:82 Gets authentication headers for a request.

Parameters

options
GetAuthHeadersOptions The configuration options for generating auth headers

Returns

Promise<Record<string, string>> Object containing the authentication headers

getCorrelationData()

Defined in: utils/http.ts:145 Returns encoded correlation data including the SDK version and language.

Parameters

source?
string The source identifier for the request
sourceVersion?
string The version of the source making the request

Returns

string Encoded correlation data as a query string