@azizuysal/wallet-kit API Documentation - v1.1.0
    Preparing search index...

    Variable WalletKitModuleConst

    WalletKitModule: {
        canAddPasses(): Promise<boolean>;
        addPass(passData: string): Promise<boolean>;
        addPasses(passDataArray: string[]): Promise<boolean>;
    } = ...

    WalletKit public API. All methods validate input at the JS layer before delegating to the native module, so invalid calls fail fast with a stable error shape on every platform.

    Type Declaration

    • canAddPasses: function
      • Check if the device can add passes to the wallet.

        Returns Promise<boolean>

        true if the device supports adding passes, false otherwise. Rejects if the availability check itself fails (e.g. Google Play Services error on Android).

    • addPass: function
      • Add a single pass to the wallet.

        Parameters

        • passData: string

          Base64-encoded .pkpass on iOS, JWT on Android.

        Returns Promise<boolean>

        A promise that resolves with true when the pass was newly added in this session, or false when the user cancelled or the pass was already in the wallet. Rejects with a WalletError on any error.

        WalletError with code INVALID_PASS if passData is empty or not a recognized format.

        WalletError with code ERR_WALLET_IN_PROGRESS if a previous add-pass call is still awaiting a result.

        The same outcome is also delivered via the AddPassCompleted event on createWalletEventEmitter. The event is retained as a secondary notification channel for multi-listener setups; the Promise return value is the primary API in 2.x.

    • addPasses: function
      • Add one or more passes to the wallet.

        Parameters

        • passDataArray: string[]

          Non-empty array of pass data strings (base64 for iOS, JWT for Android).

        Returns Promise<boolean>

        A promise that resolves with true when every pass was newly added in this session, or false when the user cancelled or any pass was already in the wallet. Rejects with a WalletError on any error.

        WalletError with code INVALID_PASS if the array is empty or contains an entry that is not a recognized format.

        WalletError with code ERR_WALLET_MULTIPLE_NOT_SUPPORTED on Android when the array contains more than one entry. The Google Wallet API only accepts a single JWT per call; combine multiple passes into one JWT on your server.

        WalletError with code ERR_WALLET_IN_PROGRESS if a previous add-pass call is still awaiting a result.

        The same outcome is also delivered via the AddPassCompleted event on createWalletEventEmitter. The event is retained as a secondary notification channel for multi-listener setups; the Promise return value is the primary API in 2.x.