Skip to main content

initSecureFields

function initSecureFields(payload): Promise<SecureFieldsClient>;

Internal

Initializes the Secure Fields SDK with the provided tenant ID and configuration.

Parameters

ParameterTypeDescription
payload{ config: SecureFieldsConfig; tenantId: string; }An object containing the tenant ID and configuration for the SDK.
payload.configSecureFieldsConfig-
payload.tenantIdstring-

Returns

Promise<SecureFieldsClient>

A promise that resolves to an instance of the SDK identified for the tenantId.

Throws

SdkError Throws an error if initialization parameters are invalid. Possible errors include:

Error Code
INIT_FAILED
TENANT_ID_REQUIRED
FIELD_CONFIG_REQUIRED
FIELD_TARGET_INVALID
NOT_SUPPORTED_FIELD

See

SecureFieldsErrors