BittiqSDK

public final class BittiqSDK : NSObject
extension BittiqSDK: URLSessionDelegate

Initialization

  • Initialize a new instance of the SDK. If an instance is already created an error is thrown.

    Declaration

    Swift

    public static func initialize(
        baseUrl: URL,
        apiKey: String,
        appVersion: String,
        encryptionKey: String,
        encryptionSalt: String,
        tokenRefreshFailureDelegate: RefreshTokenFailureDelegate?,
        acceptedLanguage: String?
    
    ) throws -> BittiqSDK

    Parameters

    baseUrl

    The base URL for the Bittiq SDK API.

    apiKey

    Your Bittiq API key.

    appVersion

    The CFBundleShortVersionString of the app that implements the SDK

    encryptionKey

    128-bit UTF-8 encoded string, to be used as the key for encrypting sensitive data before sending it to the server.

    encryptionSalt

    The salt to be used for encrypting sensitive data before sending it to the server.

    tokenRefreshFailureDelegate

    A delegate for refresh token update failure.

  • Returns the existing instance of the Bittiq SDK. Make sure to call initialize(baseUrl:apiKey:tokenResolver:) first. Failure to do so results in a fatalError.

    Declaration

    Swift

    public static var instance: BittiqSDK

    Return Value

    An instance of the BittiqSDK.

Properties

  • Declaration

    Swift

    public lazy var device: BittiqDevice { get set }
  • Build version.

    Declaration

    Swift

    public var buildVersion: String { get }
  • SDK version.

    Declaration

    Swift

    public var sdkVersion: String { get }

AppVersion

  • Can be called to make sure that the current version of the Bittiq SDK is still valid. When the version of this SDK is deprecated, the call will return an error.

    Declaration

    Swift

    @discardableResult
    public func checkSdkVersion(
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Bank accounts

Categories

  • Get an overview of all available categories and their subcategories.

    Declaration

    Swift

    @discardableResult
    public func getAllCategories(
        completion: @escaping (Result<[TransactionCategory], Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Declaration

    Swift

    @discardableResult
    public func getConfirmations(completion: @escaping (Result<[UsersConfirmation], Error>) -> Void) -> BittiqTask?

    Parameters

    confirmationType

    Type of confirmation to update

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Declaration

    Swift

    @discardableResult
    public func confirm(
        confirmationType: ConfirmationType,
        confirmed: Bool,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    confirmationType

    Type of confirmation to update

    confirmed

    Boolean indicator whether confirmation has been given by the user for the given confirmation type

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Consents

  • Instantiate a consent for the specified provider. A list of available providers can be retrieved through getAllProviders(completion:).

    Declaration

    Swift

    @discardableResult
    public func initializeConsent(
        providerCode: String,
        isPrivateAccount: Bool,
        completion: @escaping (Result<Consent, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    providerCode

    The Provider.code to connect to.

    isPrivateAccount

    Flag indicating if the consent is for an account of a private (non-business) entity.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the user’s current consents.

    Declaration

    Swift

    @discardableResult
    public func findConsents(
        completion: @escaping (Result<[Consent], Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the user’s current consents, filtered by the given statuses.

    Declaration

    Swift

    @discardableResult
    public func findConsentsByStatus(
        status: [ConsentStatus],
        completion: @escaping (Result<[Consent], Error>) -> Void
    ) -> BittiqTask?

    Parameters

    status

    Array of ConsentStatus to filter the consents by

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the details of a consent.

    Declaration

    Swift

    @discardableResult
    public func getConsent(
        consentId: String,
        completion: @escaping (Result<Consent, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    consentId

    The id of the consent to retrieve.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Delete a consent.

    Declaration

    Swift

    @discardableResult
    public func deleteConsent(
        consentId: String,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    consentId

    The id of the consent to delete.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Delete all consents.

    Declaration

    Swift

    @discardableResult
    public func deleteAllConsents(
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Finalizes the consent flow.

    Declaration

    Swift

    @discardableResult
    public func finishConsent(
        url: URL,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    url

    The url of the deeplink that was started by the consent return url.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Email

  • Requests for a verification email to be sent to the given email address. The user will verify their email address directly to Bittiq, by clicking on the link in the email.

    Declaration

    Swift

    @discardableResult
    public func verifyEmail(
        email: String,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    email

    The email address to be verified

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Financial overview

Financial summary

  • Get financial summary of the user.

    Declaration

    Swift

    @discardableResult
    public func getFinancialSummaryForPeriod(
        accountIds: [String]? = nil,
        startAt: Date? = nil,
        endAt: Date? = nil,
        completion: @escaping (Result<FinancialSummary, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    accountIds

    The account id’s to get the financial summary for. Leave nil to get the summary for all accounts.

    startAt

    The start of a range that’s used to calculate some of the response properties like BankAccount.freeSpace. If nil, the range will be based on Profile.monthFrom.

    endAt

    The end of a range that’s used to calculate some of the response properties like BankAccount.freeSpace. If nil, the range will be based on Profile.monthFrom.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the connected investment accounts.

    Declaration

    Swift

    @discardableResult
    public func getInvestmentAccounts(completion: @escaping (Result<[InvestmentAccount], Error>) -> Void) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Create an investment account.

    Declaration

    Swift

    @discardableResult
    public func createInvestmentAccount(
        number: String,
        bankAccountId: String,
        type: InvestmentAccountType,
        completion: @escaping (Result<InvestmentAccount, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    investmentNumber

    The number of investment account.

    bankAccountId

    The bank’s account uuid which investment account connected to.

    type

    The type of the investment account.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Delete an investment accounts.

    Declaration

    Swift

    @discardableResult
    public func deleteInvestmentAccount(
        investmentAccountId: String,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    investmentAccountId

    The id of investment account.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the list of investment funds.

    Declaration

    Swift

    @discardableResult
    public func getInvestmentFunds(completion: @escaping (Result<[InvestmentFund], Error>) -> Void) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Investment goal

  • Get the user’s investment goal.

    Declaration

    Swift

    @discardableResult
    public func getInvestmentGoal(
        completion: @escaping (Result<InvestmentGoal, Error>) -> Void
    ) -> BittiqTask?
  • Update the user’s investment goal.

    Important

    Please make sure to always supply the correct value for each property and not only the ones that need to be changed, as this will result in the other properties being reset to nil.

    Declaration

    Swift

    @discardableResult
    public func updateInvestmentGoal(
        _ investmentGoal: UpdateInvestmentGoal,
        completion: @escaping (Result<InvestmentGoal, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    profile

    UpdateInvestmentGoal struct, containing the new investment goal values.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Notifications

  • Registers a device to start receiving remote push notifications.

    Declaration

    Swift

    @discardableResult
    public func registerForNotifications(
        deviceToken: String,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    deviceToken

    The device token that was received from the system in application(_:didRegisterForRemoteNotificationsWithDeviceToken:).

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Unregisters a device from receiving remote push notifications.

    Declaration

    Swift

    @discardableResult
    public func unregisterFromNotifications(
        deviceToken: String,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    deviceToken

    The device token that was received from the system in application(_:didRegisterForRemoteNotificationsWithDeviceToken:).

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Tokens

  • Reset a user’s PIN code for when e.g. the user forgot his PIN code. An e-mail will be sent to the user with a link to reset the PIN code.

    Declaration

    Swift

    @discardableResult
    public func resetPin(
        email: String,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    email

    The email address of the user to reset the PIN for

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Update a user’s PIN to a new value.

    Declaration

    Swift

    @discardableResult
    public func changePin(
        oldPin: String,
        newPin: String,
        completion: @escaping (Result<Profile, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    oldPin

    The user’s current 5-digit PIN

    newPin

    The user’s new 5-digit PIN

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Set a user’s new PIN after a reset of the PIN was requested.

    Declaration

    Swift

    @discardableResult
    public func setPin(
        resetToken: String,
        newPin: String,
        completion: @escaping (Result<Profile, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    resetToken

    The reset token from the link in the reset PIN email.

    newPin

    The user’s new 5-digit PIN

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Create an investment payment.

    Declaration

    Swift

    @discardableResult
    public func createPayment(
        creditorAccount: String? = nil,
        bankAccount: String,
        investmentAccount: String,
        amount: Money,
        fund: String?,
        description: String? = nil,
        completion: @escaping (Result<PISPayment, Error>) -> Void) -> BittiqTask?

    Parameters

    creditorAccount

    Optional UUID of creditor account.

    bankAccount

    UUID of bank account which is paid from.

    investmentAccount

    UUID of investment account.

    amount

    Payment amount.

    fund

    Optional Id of investment fund.

    description

    Optional description.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the list of payment consents.

    Declaration

    Swift

    @discardableResult
    public func getPayments(completion: @escaping (Result<[PaymentConsent], Error>) -> Void) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Refresh payment.

    Declaration

    Swift

    @discardableResult
    public func refreshPayment(consentId: String, body: [String : Any], completion: @escaping (Result<PaymentConsent, Error>) -> Void) -> BittiqTask?

    Parameters

    consentId

    Id of payment consent.

    body

    Any required body parameters.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Cancel payment.

    Declaration

    Swift

    @discardableResult
    public func cancelPayment(consentId: String, completion: @escaping (Result<PaymentConsent, Error>) -> Void) -> BittiqTask?

    Parameters

    consentId

    Id of payment consent.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Profile

  • Get the user’s Bittiq profile.

    Declaration

    Swift

    @discardableResult
    public func getProfile(
        completion: @escaping (Result<Profile, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Update the user’s Bittiq profile.

    Important

    Please make sure to always supply the correct value for each property and not only the ones that need to be changed, as this will result in the other properties being reset to nil.

    Declaration

    Swift

    @discardableResult
    public func updateProfile(
        _ profile: UpdateProfile,
        completion: @escaping (Result<Profile, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    profile

    UpdateProfile struct, containing the new profile values.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Providers

  • Get the available providers to which the user can connect using initializeConsent(providerCode:completion:).

    Declaration

    Swift

    @discardableResult
    public func getAllProviders(
        completion: @escaping (Result<[Provider], Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the details of a provider.

    Declaration

    Swift

    @discardableResult
    public func getProvider(
        providerId: String,
        completion: @escaping (Result<Provider, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    providerId

    The id of the provider.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Registration

  • Register a Bittiq user.

    Declaration

    Swift

    @discardableResult
    public func register(
        verificationToken: String,
        email: String,
        firstName: String,
        lastName: String,
        birthday: Birthday,
        pin: String,
        completion: @escaping (Result<Profile, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    verificationToken

    The verification token from the email verification link

    email

    The user’s e-mail address

    firstName

    The user’s first name

    lastName

    The user’s last name

    pin

    The user’s 5-digit PIN

    birthday

    The user’s date of birth

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the user’s spend insights.

    Declaration

    Swift

    @discardableResult
    public func getSpendInsights(
        accountIds: [String]? = nil,
        completion: @escaping (Result<SpendInsights, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    accountIds

    The account id’s to get the spend insight for. Leave nil to get the summary for all accounts..

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Subscriptions

  • Get the user’s subscriptions.

    Declaration

    Swift

    @discardableResult
    public func findSubscriptions(
        accountIds: [String]? = nil,
        completion: @escaping (Result<[Subscription], Error>) -> Void
    ) -> BittiqTask?

    Parameters

    accountIds

    The account id’s to get the subscriptions for. Leave nil to get the subscriptions for all accounts.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get the details of a subscription.

    Declaration

    Swift

    @discardableResult
    public func getSubscription(
        subscriptionId: String,
        completion: @escaping (Result<Subscription, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    subscriptionId

    The id of the subscription to retrieve.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Mark a transaction as a subscription.

    Declaration

    Swift

    @discardableResult
    public func createSubscription(
        transactionId: String,
        name: String? = nil,
        fee: Decimal? = nil,
        frequency: SubscriptionFrequency = .other,
        completion: @escaping (Result<Subscription, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    transactionId

    The id of the transaction that needs to be marked as a subscription.

    name

    The name for the subscription. If nil, the name of the transaction’s counterparty will be used.

    fee

    The subscription fee. Will be rounded to max. 2 decimals. If nil, the amount of the transaction will be used.

    frequency

    The frequency for the subscription.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Update a subscription.

    Declaration

    Swift

    @discardableResult
    public func updateSubscription(
        subscriptionId: String,
        name: String,
        fee: Decimal,
        frequency: SubscriptionFrequency,
        completion: @escaping (Result<Subscription, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    subscriptionId

    The id of the subscription to update.

    name

    The name for the subscription.

    fee

    The subscription fee. Will be rounded to max. 2 decimals.

    frequency

    The frequency for the subscription.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Delete a subscription.

    Declaration

    Swift

    @discardableResult
    public func deleteSubscription(
        subscriptionId: String,
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    subscriptionId

    The id of the subscription to delete.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Cancel one or more subscriptions.

    • Subscriptions will not be canceled until the user confirms this from the email that will be send as a result of this call.

    Declaration

    Swift

    @discardableResult
    public func cancelSubscriptions(
        subscriptionIds: [String],
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    subscriptionIds

    An array of id’s for the subscriptions that should be canceled.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Tokens

  • Log in a Bittiq user.

    Declaration

    Swift

    @discardableResult
    public func login(
        email: String,
        pin: String,
        completion: @escaping (Result<Profile, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    email

    The user’s e-mail address

    pin

    The user’s 5-digit PIN

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • An alias for clearTokens(completion:). The two can be used interchangeably.

    Declaration

    Swift

    @discardableResult
    public func logout(
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?
  • Clear the user’s tokens. It’s recommended to execute this task when your user is logged out from your app so that the SDK can clean up the tokens. Any method that’s called after this will result in a call to TokenResolver.resolve(_:) to request new tokens.

    Declaration

    Swift

    @discardableResult
    public func clearTokens(
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Transactions

  • Retrieve transactions.

    Declaration

    Swift

    @discardableResult
    public func getTransactions(
        accountIds: [String]? = nil,
        startAt: Date? = nil,
        endAt: Date? = nil,
        search: String? = nil,
        limit: Int? = nil,
        cursor: String? = nil,
        completion: @escaping (Result<PagedData<Transaction>, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    accountIds

    The account id’s to get the transactions for. Leave nil to get the transactions for all accounts.

    startAt

    Retrieve transactions that were done on, or after this date.

    endAt

    Retrieve transactions that were done on, or before this date, inclusive.

    search

    Filter on transaction counterparty name and description.

    limit

    The amount of transactions that are returned. Defaults to 10. Max 50 results per batch.

    cursor

    If provided, the results for the given cursor are returned. This can be used for pagination.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Get details of a specific transaction.

    Declaration

    Swift

    @discardableResult
    public func getTransaction(
        transactionId: String,
        completion: @escaping (Result<Transaction, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    transactionId

    The id of the transaction to retrieve.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Find the transactions in a specific subcategory.

    Declaration

    Swift

    @discardableResult
    public func findTransactionsBySubcategory(
        subcategoryId: String,
        accountIds: [String]? = nil,
        limit: Int? = nil,
        cursor: String? = nil,
        completion: @escaping (Result<PagedData<Transaction>, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    subcategoryId

    The TransactionCategory.id of a TransactionCategory that is a subcategory.

    accountIds

    The account id’s to get the transactions for. Leave nil to get the transactions for all accounts.

    limit

    The amount of transactions that are returned. Defaults to 10. Max 50 transactions per batch.

    cursor

    If provided, the results for the given cursor are returned. This can be used for pagination.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Update the subcategory for a specific transaction.

    Declaration

    Swift

    @discardableResult
    public func updateTransactionSubcategory(
        transactionId: String,
        newSubcategoryId: String,
        comment: String? = nil,
        updateSimilar: Bool = false,
        completion: @escaping (Result<Transaction, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    transactionId

    The id of the transaction to retrieve.

    newSubcategoryId

    The id of the new subcategory.

    comment

    Comment on why the change is made.

    updateSimilar

    Indicates if the subcategory should be updated for transactions from the same counterparty.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

Users Event Settings

  • Get the user’s events settings.

    Declaration

    Swift

    @discardableResult
    public func getEventsSettings(
        completion: @escaping (Result<UsersEventSettings, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Update the user’s events settings.

    Important

    Please make sure to always supply the correct value for each property and not only the ones that need to be changed, as this will result in the other properties being reset to nil.

    Declaration

    Swift

    @discardableResult
    public func updateEventsSettings(
        _ settings: UpdateUsersEventSettings,
        completion: @escaping (Result<UsersEventSettings, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    settings

    UpdateUsersEventSettings struct, containing the new event settings values.

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Start id verification check

    Declaration

    Swift

    @discardableResult
    public func getIdCheckSession(
        completion: @escaping (Result<VeriffInitialization, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.

  • Cancel id verification check

    Declaration

    Swift

    @discardableResult
    public func cancelIdCheck(
        completion: @escaping (Result<Empty, Error>) -> Void
    ) -> BittiqTask?

    Parameters

    completion

    Completion handler.

    Return Value

    Optional BittiqTask that allows the task to be canceled.