Options for generating authentication headers for API requests.

interface GetAuthHeadersOptions {
    apiKeyId: string;
    apiKeySecret: string;
    expiresIn?: number;
    requestBody?: unknown;
    requestHost: string;
    requestMethod: string;
    requestPath: string;
    source?: string;
    sourceVersion?: string;
    walletSecret?: string;
}

Properties

apiKeyId: string

The API key ID

Examples: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' 'organizations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apiKeys/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

apiKeySecret: string

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))

expiresIn?: number

Optional expiration time in seconds (defaults to 120)

requestBody?: unknown

Optional request body data

requestHost: string

The host for the request (e.g. 'api.cdp.coinbase.com')

requestMethod: string

The HTTP method for the request (e.g. 'GET', 'POST')

requestPath: string

The path for the request (e.g. '/platform/v1/wallets')

source?: string

The source identifier for the request

sourceVersion?: string

The version of the source making the request

walletSecret?: string

The Wallet Secret for wallet authentication