@azizuysal/wallet-kit API Documentation - v2.0.0
    Preparing search index...

    Function createWalletEventEmitter

    • Creates an event emitter for listening to wallet events.

      Returns NativeEventEmitter

      Use the boolean returned by WalletKitModule.addPass or WalletKitModule.addPasses for operation outcomes. This event API is retained for compatibility throughout 2.x and may be removed in 3.x.

      The emitted AddPassCompleted event payload is the same raw boolean outcome as the add-pass promise. It is not wrapped in an object. On iOS, false also covers an already-present pass. On Android, true is the provider's successful-save result and can include an already-linked object.

      const emitter = createWalletEventEmitter();
      const subscription = emitter.addListener(
      'AddPassCompleted',
      (added: boolean) => {
      console.log(added);
      }
      );

      subscription.remove();