Function: resolveCantonJwtFromConfig()
resolveCantonJwtFromConfig(
config:CantonConfig,options?:OAuthRequestOptions):Promise<string>
Defined in: canton/index.ts:209
Resolve a JWT from a CantonConfig.
Priority:
config.jwt(explicit override)config.auth(OAuth2 provider — client credentials, authorization code, or static)
For clientCredentials and authorizationCode flows, clientId and
clientSecret may be omitted from the auth block and will be resolved
from CANTON_CLIENT_ID / CANTON_CLIENT_SECRET env vars. This keeps
secrets out of config files that may be committed to version control.
The AuthProvider is memoized per auth-config fingerprint so repeated calls within one process reuse the same cached token.
Parameters
| Parameter | Type |
|---|---|
config | CantonConfig |
options? | OAuthRequestOptions |
Returns
Promise<string>
Throws
CCIPError (CANTON_AUTH_ERROR) when neither jwt nor auth is set.