Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,45 @@

> This changelog keeps track of all updates and improvements made to `W3sSampleWallet`.

## v2.1.0 - _(2026-04-13)_

### 🚀 What's New

- Bumped `@circle-fin/w3s-pw-react-native-sdk` to **v2.2.1** [(npm)](https://www.npmjs.com/package/@circle-fin/w3s-pw-react-native-sdk); bumped app metadata to **2.1.0**.
- Updated README for **iOS/Android** requirements aligned with SDK **2.2.1** (including **Android SDK Platform 36** where applicable).
- Fixed **iOS tab switching** when using `react-native-collapsible-tab-view` v8 with React Native **0.81**.
- Added **AGENTS.md** with local verification steps for contributors and agents.
- CI: **ESLint**, **Prettier**, and **TypeScript** (`tsc --noEmit`) on pull requests; **AI PR** optional review workflow; internal **quality-checks** wired for **Cloudsmith** auth during `npm ci`.
- Dependency and security-related upgrades, including **tar**, **minimatch**, **picomatch**, **undici**, **node-forge**, **flatted**, and **brace-expansion** (addressing reported advisories).

## v2.0.0 - _(2026-03-10)_

### 🚀 What's New

- Migrated from **bare React Native** to **Expo 54**
- Upgraded `@circle-fin/w3s-pw-react-native-sdk` from v1 to v2
- Updated README with configuration details
- Added MIGRATION_GUIDE

## v1.1.6 - _(2026-03-06)_

### 🚀 What's New

- Bumped `@circle-fin/w3s-pw-react-native-sdk` to v1.1.7 [(npm)](https://www.npmjs.com/package/@circle-fin/w3s-pw-react-native-sdk)
- Upgraded dependencies and improved SDK integration.

## v1.1.2 - _(2025-03-19)_

### 🚀 What's New

- Upgrade React Native version from _0.73.6_ to _0.75.5_.
- Recommended upgrade to `w3s-react-native-sdk` v1.1.2 [(npm)](https://www.npmjs.com/package/@circle-fin/w3s-pw-react-native-sdk)
- Upgraded dependencies and improved SDK integration.

## v1.0.1 - _(2024-09-04)_

### 🚀 Initial Release

- First official release of `W3sSampleWallet`.
- Example project included to demonstrate SDK integration.
- Integrated with `w3s-react-native-sdk` v1.1.1 [(npm)](https://www.npmjs.com/package/@circle-fin/w3s-pw-react-native-sdk).
Expand Down
28 changes: 20 additions & 8 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ If you have an existing bare React Native project using SDK v1 and want to upgra
- [Path 2: Migrate to Expo-Managed Workflow](#path-2-migrate-to-expo-managed-workflow)
- [API Changes](#api-changes)


---

### Understanding the Architecture Change

**SDK v1**: Traditional bare React Native architecture

- Package: `"@circle-fin/w3s-pw-react-native-sdk": "^1.0.0"`
- Architecture: Bare React Native
- Build: Manual native project setup

**SDK v2**: Expo Modules architecture

- Package: `"@circle-fin/w3s-pw-react-native-sdk": "^2.0.0"`
- Architecture: Expo Modules
- Build: Expo Prebuild
Expand All @@ -43,11 +44,13 @@ Choose the migration path based on your project's native code customizations:
This approach preserves your existing native projects and adds Expo Modules support to them.

**Best for:**

- Projects with **custom native code** (native modules, custom configurations, etc.)
- Teams that want to **continue managing** `ios/` and `android/` directories manually
- Minimal changes to existing workflow

**How it works:**

- Uses `npx install-expo-modules@latest` to automatically configure native projects
- Keeps your existing `ios/` and `android/` directories
- Adds necessary Expo Modules configuration without removing customizations
Expand Down Expand Up @@ -76,11 +79,13 @@ npm install @circle-fin/w3s-pw-react-native-sdk@^2.0.0
4. **Build and test:**

For iOS:

```bash
npm run ios
```

For Android:

```bash
npm run android
```
Expand All @@ -92,11 +97,13 @@ npm run android
This approach converts your project to use Expo's managed workflow where `expo prebuild` generates and manages native code.

**Best for:**

- Projects with **minimal or no custom native code**
- Teams that want **Expo to manage** native configurations
- Simpler maintenance through declarative `app.json` configuration

**How it works:**

- Deletes and regenerates `ios/` and `android/` directories from `app.json`
- Native code is managed by Expo (don't edit directly)
- Run `expo prebuild` whenever you change native configuration
Expand Down Expand Up @@ -146,11 +153,13 @@ The `--clean` flag will delete and regenerate the native directories.
5. **Build and test:**

For iOS:

```bash
npx expo run:ios
```

For Android:

```bash
npx expo run:android
```
Expand All @@ -167,31 +176,34 @@ npx expo run:android
**Add listener:**

SDK v1:

```typescript
WalletSdk.addListener((event) => {
// Handle event
})
});
```

SDK v2:

```typescript
const eventListener = ProgrammablewalletRnSdk.addListener(
'CirclePwOnEvent',
"CirclePwOnEvent",
(event) => {
// Handle event
}
)
},
);
```

**Remove listener:**

SDK v1:

```typescript
WalletSdk.removeAllListeners()
WalletSdk.removeAllListeners();
```

SDK v2:

```typescript
eventListener.remove()
eventListener.remove();
```

33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ This sample app supports three authentication methods:
<img src="readme_images/running_app_pin.png" alt="PIN Authentication" width="200"/>&nbsp;&nbsp;<img src="readme_images/running_app_email.png" alt="Email OTP Authentication" width="200"/>&nbsp;&nbsp;<img src="readme_images/running_app_social.png" alt="Social Login Authentication" width="200"/>

### 1. PIN Code (Recommended for quick start)

- **Simplest setup** - Only requires Circle App ID

### 2. Email OTP

- **Backend configuration** - Requires email service setup on Circle developer console
- No additional client-side configuration needed

### 3. Social Login (Google, Facebook, Apple)

- **Advanced setup** - Requires OAuth provider accounts and platform-specific configuration
- Additional setup for iOS and Android

Expand All @@ -33,29 +36,33 @@ This sample app supports three authentication methods:
## Requirements

### Development Environment

- Node.js 20.19.4 or higher
- npm
- Expo CLI

### Android

- Java 17 (JDK 17 recommended)
- Android Studio and Android SDK
- Android SDK Platform 35 (Android 15 VanillaIceCream)
- Android SDK Platform 36 (Android 16 Baklava)
- Android SDK Build-Tools 36.0.0
- Android device or emulator (API level 35+)
- Android device or emulator (API level 36+)

### iOS
- macOS with Xcode 16.1+ (Xcode 26 is recommended)

- macOS with Xcode 16.3+ (Xcode 26 is recommended)
- Xcode Command Line Tools
- CocoaPods
- iOS device (iOS 15.0+) or Simulator
- iOS device (iOS 15.1+) or Simulator
- Apple Developer account (for physical device testing)

---

## Quick Start (PIN Mode)

### Prerequisites

1. **Circle Developer Console Account** - [Sign up here](https://console.circle.com)
2. **App ID** - Get from [Circle Developer Console](https://console.circle.com/wallets/user/configurator) → Wallets → User Controlled → Configurator
3. **GitHub PAT** (Android only) - [Create token](https://github.com/settings/tokens) with `read:packages` permission
Expand Down Expand Up @@ -95,11 +102,13 @@ npx expo prebuild
**Step 5: Run the app**

For iOS:

```bash
npm run ios
```

For Android:

```bash
npm run android
```
Expand All @@ -123,6 +132,7 @@ Email OTP authentication requires an SMTP email service configured on your backe
Follow [our tutorial](https://developers.circle.com/wallets/user-controlled/create-user-wallets-with-email#step-1-get-mailtrap-smtp-credentials) to configure your SMTP credentials. The tutorial uses [Mailtrap](https://mailtrap.io/) for testing.

The tutorial covers:

- **Step 1:** Getting SMTP credentials from your email provider
- **Step 2:** Configuring SMTP settings in Circle Developer Console

Expand All @@ -146,6 +156,7 @@ Before configuring your app, you need to obtain IDs from each social provider.
<summary><b>Google</b></summary>

**What you need:**

- Web Client ID
- `google-services.json` file from Firebase (for Android)
- iOS Client ID (extracted from `GoogleService-Info.plist`)
Expand All @@ -159,9 +170,9 @@ Before configuring your app, you need to obtain IDs from each social provider.
- Click "Add app" → Select Android
- Package name: `com.circle.w3s.rn.sample.wallet`
- Download the `google-services.json` file
For detailed Android setup steps, see [Firebase Android setup guide](https://firebase.google.com/docs/android/setup#create-firebase-project)

For detailed Android setup steps, see [Firebase Android setup guide](https://firebase.google.com/docs/android/setup#create-firebase-project)

3. Add an **iOS app** to your project:
- Go to Project Settings → Your apps
- Click "Add app" → Select iOS
Expand All @@ -178,6 +189,7 @@ Before configuring your app, you need to obtain IDs from each social provider.
- In the **Web SDK configuration** panel, copy the **Web client ID**

**Save these values:**

```
✓ Web Client ID: xxxxx.apps.googleusercontent.com
✓ google-services.json: Downloaded
Expand All @@ -190,6 +202,7 @@ Before configuring your app, you need to obtain IDs from each social provider.
<summary><b>Facebook</b></summary>

**What you need:**

- Facebook App ID
- Facebook Client Token
- Facebook Display Name
Expand All @@ -205,6 +218,7 @@ Before configuring your app, you need to obtain IDs from each social provider.
- **Facebook Display Name** (your app name)

**Save these values:**

```
✓ Facebook App ID: xxxxxxxxxxxx
✓ Facebook Client Token: xxxxxxxxxxxxxxxx
Expand All @@ -217,6 +231,7 @@ Before configuring your app, you need to obtain IDs from each social provider.
<summary><b>Apple</b></summary>

**What you need:**

- Service ID (for Sign in with Apple on Android)

**Steps:**
Expand All @@ -225,6 +240,7 @@ Before configuring your app, you need to obtain IDs from each social provider.
2. Note down your **Service ID**

**Save this value:**

```
✓ Apple Service ID: com.yourcompany.yourapp
```
Expand Down Expand Up @@ -311,6 +327,7 @@ Edit `prebuild-sync-src/android/app/src/main/res/values/strings.xml`:
```

Replace:

- `YOUR_FACEBOOK_APP_ID` with your Facebook App ID
- `YOUR_FACEBOOK_CLIENT_TOKEN` with your Facebook Client Token

Expand Down Expand Up @@ -340,13 +357,15 @@ Replace `YOUR_APPLE_SERVICE_ID` with your Apple Service ID (e.g., `com.yourcompa
If you encounter build or Metro bundler errors:

1. **Clean install and rebuild:**

```sh
rm -rf node_modules package-lock.json android ios .expo
npm install
npx expo prebuild --clean
```

2. **Clear Metro bundler cache:**

```sh
npx expo start --clear
```
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Reporting a Vulnerability

Please do not file public issues on Github for security vulnerabilities. All security vulnerabilities should be reported to Circle privately, through Circle's [Vulnerability Disclosure Program](https://hackerone.com/circle). Please read through the program policy before submitting a report.
Please do not file public issues on GitHub for security vulnerabilities. All security vulnerabilities should be reported to Circle privately, through Circle's [Vulnerability Disclosure Program](https://hackerone.com/circle). Please read through the program policy before submitting a report.
Loading
Loading