Skip to content

chore(react-native-mdocs-holder-tutorial): update for Holder SDK 10.0.0 - #321

Merged
avner-m merged 1 commit into
masterfrom
chore/rn-mdocs-holder-tutorial-10.0.0
Aug 17, 2026
Merged

chore(react-native-mdocs-holder-tutorial): update for Holder SDK 10.0.0#321
avner-m merged 1 commit into
masterfrom
chore/rn-mdocs-holder-tutorial-10.0.0

Conversation

@avner-m

@avner-m avner-m commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Updates the React Native mDocs Holder tutorial sample app for Holder SDK 10.0.0, shipping 2026-08-14.

Both projects were pinned to ^8.1.1 (resolving to 8.1.2). v8 reached End of Life on 2026-06-23, so this skips the v9 line and moves straight to ^10.0.0.

The MATTR Learn quickstart and credential-claiming tutorial send readers to these projects and instruct them to run yarn install, so the pin here is what a reader actually gets.

Changes

react-native-mdocs-holder-tutorial-starter needed only the version bump. Its SDK surface is a single type-only import, and the tutorial code is what the reader writes.

react-native-mdocs-holder-tutorial-complete:

  • OfferedCredential.doctype is now docType (app/claim-credential.tsx). Two sites: the React key and the rendered "Document Type" text. Both would have become undefined.
  • getCredentials and deleteCredential now return a Result (providers/HolderProvider.tsx). getCredentials was being passed straight into a state setter typed as an array. The deleteCredential handler was wrapped in try/catch and always reported "Success": expected failures are now returned rather than thrown, so that catch was dead code for them and deletions could fail silently. Both were already wrong at v9.
  • Credential retrieval results are discriminated on isSuccess (app/claim-credential.tsx). The code reported retrieved.value.length as the success count, so a credential that failed to retrieve was announced as retrieved. Now narrows each item and reports successes and failures separately.
  • UserAuthenticationType.BiometricOrPasscode is replaced by UserPresence, which is also the new default.
  • claims on an offered credential is now optional, so the claim count renders 0 rather than blank when absent.

Deliberately not changed

  • No platformConfiguration / SDK Backend. It is optional in 10.0.0, and enabling it would require a quickstart reader to own a MATTR VII tenant and two Holder Applications. The Learn quickstart links the SDK Backend guide as a next step instead.
  • The lockfiles. They still pin 8.1.2 and cannot be regenerated correctly until 10.0.0 is published. See below.
  • biome format was not run. These projects are tab-indented at roughly 80 columns while biome.json specifies 2-space at 120, so formatting them would rewrite whole files. Each edit matches its file's existing style. biome lint passes on both changed files.

This diff is not typechecked

10.0.0 is not yet published to npm, so yarn install cannot resolve it and neither project has node_modules. Every change was made by reading the real 10.0.0 signatures in js-credential-sdk at origin/am/rn-holder-10.0.0-changelog, but nothing was compiled or run.

Once 10.0.0 is on npm, per project:

yarn install         # regenerates yarn.lock, which must be committed
npx tsc --noEmit     # the real gate on this PR
npx expo run:ios     # and run:android

Please treat tsc --noEmit passing as the merge condition, and do not merge before the release lands.

One thing worth confirming

withAndroidHolderSDK.js references global.mattr.mobilecredential.common.webcallback.WebCallbackActivity. The v9 note about the package path moving from ...common to ...holder made this look like a break, but three sources agree the class FQN is unchanged: the native SDK source defines it under common/, the SDK's own AndroidManifest.xml declares the .common name, and the RN SDK's public README still documents it. Left as-is. Worth a one-line confirmation from the Android SDK team, because the internal Wallet app's manifests use a .holder.webcallback name that does not exist in the SDK source. If the class did move, Android credential claiming breaks here.

Related: mattrinternal/mattr-learn#1261 (the Learn changelog and docs for this release).

Moves both the starter and complete projects from the End of Life 8.x line to
10.0.0, and updates the complete project for the breaking changes:

- OfferedCredential.doctype is now docType.
- getCredentials and deleteCredential return a Result, so unwrap them. The
  previous deleteCredential handler reported failures as successes because
  expected errors are returned rather than thrown.
- Credential retrieval results are discriminated on isSuccess, so narrow each
  item instead of reporting the array length as successes.
- UserAuthenticationType.BiometricOrPasscode becomes UserPresence.
- claims on an offered credential is optional.

The lockfiles are deliberately untouched. They must be regenerated once
10.0.0 is published, which is also when this can first be typechecked.
@avner-m
avner-m requested a review from a team as a code owner August 13, 2026 00:19
@avner-m
avner-m merged commit 15e8624 into master Aug 17, 2026
2 checks passed
@avner-m
avner-m deleted the chore/rn-mdocs-holder-tutorial-10.0.0 branch August 17, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants