Credential Sharing

Share a credential from the wallet to a nearby verifier using proximity-based handoff flows.

This is the wallet-initiated verification flow. At a high level, the wallet starts the handoff, the verifier receives the credential request or transfer, and the SDK manages the sharing experience.

Bluetooth and Platform Setup Required

Credential sharing depends on host app platform setup. Before testing this flow, your application must configure the required Bluetooth-related entries in AndroidManifest.xml and Info.plist. NFC setup may also be required for NFC-based sharing flows.

The Main Idea

Credential sharing is used when the wallet starts the transfer instead of the verifier showing a QR code first.

At a high level:

  1. The driver starts sharing from the wallet
  2. The SDK prepares the nearby-device handoff
  3. The verifier receives the transfer or engagement details
  4. The sharing flow completes between the wallet and verifier

Depending on platform and flow, the handoff may involve Bluetooth, NFC, or a QR fallback step.

Most Common Setup

For most client integrations, this flow should still begin from the wallet experience rather than a fully custom sharing screen.

High-level example:

import { VECUProvider, WalletHub } from '@vecu/wallet-react-native-sdk';

function App() {
  return (
    <VECUProvider
      config={{
        authToken,
        deploymentStage: 'sandbox',
      }}
    >
      <WalletScreen />
    </VECUProvider>
  );
}

function WalletScreen() {
  return <WalletHub />;
}

In this setup, the host app still owns:

  • authentication and token setup
  • Bluetooth-related platform configuration
  • NFC setup when applicable
  • where the wallet screen appears in app navigation

The SDK owns the sharing flow once the user starts the transfer inside the wallet experience.

What The Driver Sees

During credential sharing, the driver may see:

  • a step to begin the sharing action
  • a nearby-device handoff step
  • a QR fallback step on some platforms or scenarios
  • a completion, cancellation, or failure result

The exact visual path can vary by platform and enabled capability, but the host app should treat this as a wallet-managed flow rather than a custom transport implementation.

When To Use This Flow

Credential sharing is a good fit when:

  • the wallet needs to start the transfer
  • the verifier is nearby
  • your use case depends on proximity-based handoff rather than a verifier QR request
  • your app needs NFC or Bluetooth-assisted sharing flows

Host App Requirements

Before using this flow, confirm your host app has:

  • mounted VECUProvider
  • a wallet screen that renders the SDK wallet experience
  • Bluetooth-related entries configured in AndroidManifest.xml
  • Bluetooth usage descriptions configured in Info.plist
  • NFC setup configured if your app enables NFC-based sharing
  • any required sharing dependencies installed

See Permissions and Installation for the platform setup details.

If You Need More Custom Control

The SDK also exposes lower-level public components and hooks for teams that need more control over how sharing is triggered or presented.

Most external client teams should not start there. Begin with the SDK-managed wallet experience first, then move to lower-level sharing components only if your application truly needs a more customized flow.

Credential Sharing vs. Credential Presentation

Credential sharing is wallet-initiated:

  • the wallet starts the handoff
  • the verifier receives the transfer through a nearby-device flow

Credential presentation is verifier-initiated:

  • the verifier displays a QR code
  • the driver scans and approves the request

See Credential Presentation for the verifier-initiated flow.

Related Guidance

  • Permissions for Bluetooth, NFC, and host app setup requirements
  • Installation for dependency and package setup
  • Quick Start for the minimum wallet integration path
  • Components for the default VECUProvider and WalletHub usage pattern