The main class for performing Wallet operations.

Methods

  • Authenticates the user with the provided authentication configuration. This method configures the Wallet API to allow access to user resources.

    Parameters

    Returns Promise<AuthenticationResult>

    A Promise that resolves to the result of the authentication.

    Throws

    If the authentication configuration is invalid.

    Example

    // Example usage:
    const authenticationConfiguration = {
    accessToken: 'user_access_token'
    };

    wallet.authenticate(authenticationConfiguration)
    .then((result) => {
    console.log('User authenticated successfully:', result);
    })
    .catch((error) => {
    console.error('Error during user authentication:', error.message);
    });
  • Configures the SDK with the provided configuration.

    Parameters

    Returns Promise<ConfigurationResult>

    A Promise that resolves to the result of the configuration.

    Throws

    If the provided configuration is invalid.

    Example

    // Example usage:
    const sdkConfiguration = {
    apiEnvironment: ApiEnvironment.TEST,
    configToken: 'configToken'
    };

    wallet.configure(sdkConfiguration)
    .then((result) => {
    console.log('SDK configured successfully:', result);
    })
    .catch((error) => {
    console.error('Error configuring the SDK:', error.message);
    });
  • Retrieves the authentication service instance.

    Returns AuthenticationService

    The authentication service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const authenticationService = wallet.getAuthenticationService();
  • Retrieves the authorization history service instance.

    Returns AuthorizationHistoryService

    The authorization history service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const authorizationHistoryService = wallet.getAuthorizationHistoryService();
  • Retrieves the card service instance.

    Returns CardService

    The card service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const cardService = wallet.getCardService();
  • Retrieves the currency exchange service instance.

    Returns CurrencyExchangeService

    The currency exchange service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const currencyExchangeService = wallet.getCurrencyExchangeService();
  • Retrieves the customer verification service instance.

    Returns CustomerVerificationService

    The customer verification service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const customerVerificationService = wallet.getCustomerVerificationService();
  • Retrieves the deposit service instance.

    Returns DepositService

    The deposit service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const depositService = wallet.getDepositService();
  • Retrieves the payment instrument service instance.

    Returns PaymentInstrumentService

    The payment instrument service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const paymentInstrumentService = wallet.getPaymentInstrumentService();
  • Retrieves the profile service instance.

    Returns ProfileService

    The profile service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage:
    const profileService = wallet.getProfileService();
  • Retrieves the transaction history service instance.

    Returns TransactionHistoryService

    The transaction history service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const transactionHistoryService = wallet.getTransactionHistoryService();
  • Retrieves the transfer service instance.

    Returns TransferService

    The transfer service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const transferService = wallet.getTransferService();
  • Retrieves the wallet setup service instance.

    Returns WalletSetupService

    The wallet setup service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const walletSetupService = wallet.getWalletSetupService();
  • Retrieves the withdrawal service instance.

    Returns WithdrawalService

    The withdrawal service instance.

    Throws

    If there is no valid SDK configuration or if API access is not validated.

    Example

    // Example usage
    const withdrawalService = wallet.getWithdrawalService();
  • Retrieves the singleton instance of the Wallet class.

    Returns Wallet

    The singleton instance of the Wallet class.

    Function

    Static

    Example

    // Usage:
    const wallet = Wallet.getInstance();