Skip to content

feat(wallets): add channel option for phone signer OTP delivery - #2002

Merged
maxsch-xmint merged 3 commits into
mainfrom
devin/phone-signer-whatsapp-channel
Aug 7, 2026
Merged

feat(wallets): add channel option for phone signer OTP delivery#2002
maxsch-xmint merged 3 commits into
mainfrom
devin/phone-signer-whatsapp-channel

Conversation

@maxsch-xmint

@maxsch-xmint maxsch-xmint commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Adds an optional channel option to the phone signer configuration so that OTPs can be delivered via WhatsApp as well as SMS.

  • PhoneSignerConfig now accepts channel?: "sms" | "whatsapp".
  • The phone signer descriptor includes channel in the internal signer config.
  • NcsSigner.sendMessageWithOtp forwards channel in the request:start-onboarding payload.
  • @crossmint/client-signers StartOnboardingPayloadSchema.request.data allows an optional channel field.
  • WalletFactory merges the client-supplied channel back into API-returned phone signer configs, since channel is a client-only field that does not round-trip through the wallet-creation API.
  • Added changeset for @crossmint/client-signers and @crossmint/wallets-sdk.

Test plan

  • pnpm lint passes.
  • pnpm --filter @crossmint/wallets-sdk... build succeeds.
  • pnpm --filter @crossmint/wallets-sdk test:vitest passes, including the new phone signer channel test.

Package updates

  • Changeset added: .changeset/whatsapp-channel.md bumps @crossmint/client-signers and @crossmint/wallets-sdk as minor.

Cross-repo dependencies

  • This PR pairs with Crossmint/open-signer#211 (TEE channel support) and Crossmint/open-signer#212 (frame forwarding of channel), and Paella-Labs/crossbit-main (relay validation/forwarding of channel).

Link to Devin session: https://crossmint.devinenterprise.com/sessions/616ce59b2b1146ab96dd633e551f838e
Requested by: @maxsch-xmint

…via WhatsApp

- Add channel to PhoneSignerConfig (sms | whatsapp)
- Forward channel from phone signer descriptor into NcsSigner
- Include channel in request:start-onboarding payload
- Update @crossmint/client-signers StartOnboardingPayloadSchema to allow channel
- Add tests for channel propagation

Co-Authored-By: max@paella.dev <max@paella.dev>
@maxsch-xmint maxsch-xmint self-assigned this Aug 4, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor
Original prompt from Max

We are expanding the ncs otp delivery channel in case of phone signers. We will allow the channel to be whatsapp.
in the @Crossmint/open-signer repo open a new branch. we need on the start-onboarding to allow a new channel parameter that defaults to "sms" to be forwarded all down to the sms service in the tee, and when calling the twilio sdk we send this param in the channel field.
For @Crossmint/crossmint-sdk, when you call useSigner with a phone signer, you specify whether to use phone or WhatsApp.
Make the necessary changes in @Paella-Labs/crossbit-main as well.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d36cf5d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@crossmint/client-signers Minor
@crossmint/wallets-sdk Minor
@crossmint/client-sdk-react-base Patch
@crossmint/client-sdk-react-native-ui Patch
@crossmint/client-sdk-react-ui Patch
@crossmint/wallets-quickstart-devkit Patch
@crossmint/wallets-playground-react Patch
@crossmint/wallets-playground-expo Patch
@crossmint/auth-ssr-nextjs-demo Patch
@crossmint/client-sdk-nextjs-starter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devin-ai-integration devin-ai-integration Bot changed the title Add channel option for phone signer OTP delivery feat(wallets): add channel option for phone signer OTP delivery Aug 4, 2026
@maxsch-xmint
maxsch-xmint marked this pull request as ready for review August 5, 2026 01:31
@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
apps/wallets/quickstart-devkit/app/providers.tsx:302
The raw query-param string is spread into the SDK config without checking it's one of the accepted `"sms" | "whatsapp"` values. `createOnLogin` is typed as `any`, so TypeScript won't catch this, and an invalid value (e.g. `?channel=telegram`) will sail past the client and be rejected by the TEE's Zod schema with a cryptic validation error instead of an early, human-readable one.

```suggestion
    const rawPhoneChannel = searchParams.get("channel");
    const phoneChannel =
        rawPhoneChannel === "sms" || rawPhoneChannel === "whatsapp" ? rawPhoneChannel : undefined;
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "undo" | Re-trigger Greptile

Comment thread apps/wallets/quickstart-devkit/app/providers.tsx
@maxsch-xmint
maxsch-xmint merged commit 08b4f7b into main Aug 7, 2026
7 checks passed
@maxsch-xmint
maxsch-xmint deleted the devin/phone-signer-whatsapp-channel branch August 7, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants