@sudoplatform/sudo-email
    Preparing search index...

    Type Alias SudoEmailClientConfig

    Options for how a DefaultSudoEmailClient manages the key pairs that email addresses and email aliases are provisioned with.

    enforceSingletonPublicKey allowCallerManagedKeys Key used when provisioning Removed on deprovision
    false true (default) Supplied keyId, otherwise a new key pair Nothing
    false false Always a new key pair (keyId rejected) The address's key pairs, unless still in use
    true true Supplied keyId, otherwise the singleton Nothing
    true false Always the singleton (keyId rejected) Nothing

    Only false/false ties a key pair's lifecycle to provisioning and deprovisioning.

    Single key mode registers the same public key for every address and alias, so the email service must allow address public key reuse. Otherwise the second registration fails.

    type SudoEmailClientConfig = {
        allowCallerManagedKeys?: boolean;
        enforceSingletonPublicKey?: boolean;
    }
    Index
    allowCallerManagedKeys?: boolean

    Whether the app may supply the key pair an email address or email alias is provisioned with, through the keyId of ProvisionEmailAddressInput or ProvisionEmailAliasInput.

    When true, the app manages the key pairs it supplies, so the client never removes a key pair when an email address is deprovisioned. Key pairs the client generated itself are still removed when the service rejects the provisioning they were generated for.

    When false, the client manages every key pair itself: provisioning with a keyId throws InvalidArgumentError, and deprovisioning an email address removes its key pairs from the key store, except a key pair another email address or email alias still uses, and the singleton key pair. Nothing is removed while enforceSingletonPublicKey is true.

    Defaults to true.

    enforceSingletonPublicKey?: boolean

    Whether every email address and email alias is provisioned with one shared key pair instead of a key pair of its own.

    When true, the app creates the singleton with createSingletonKeysIfAbsent before provisioning. The client never creates it itself: provisioning without it throws SingletonKeyPairNotFoundError. Deprovisioning never removes any key pair; only reset removes the singleton.

    Defaults to false.