Repository navigation
Conversation
Pin swift-sdk to the head of its Calimero 1.0 branch (6c5f116, PR #85) and adapt the iOS app: passkey sign-in and account creation with a node-URL path (mock attestation for merod local), orgs/teams/app instances in place of namespaces/groups/contexts, org invite tokens in invitation links, pending releases and upgrades approved on the node's consent page in the system browser, and the typed 1.0 errors in words. Tests and README updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Both apps call the contract's component ABI (apps#710) through a hand-typed MerrariaClient per platform: camelCase methods, u32 seconds, paged getOverrides, and a world created as the web does (organization, app instance, then createWorld). The game page keeps its v1 method names; the bridge maps them. APP_ERROR codes read as words. - Android moves from 0.x (relay, wallet) to kotlin-sdk#68: Calimero Cloud cluster by name or URL, or a development node with a soft passkey; passkey sign-in / create account; org invite links; approvals on the node's consent page with the confirmation code first. - iOS moves to swift-sdk#85 at 37c09f3 with the same sign-in choices and the confirmation code before the consent page. - Pins: swift-sdk 37c09f3f96e7d98440f6618eef8a0e83ddee8ebd, kotlin-sdk 61b65e9c0c87db8fbb2d3b2ce827603b0c84d5f9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iOS takes the swift-sdk release (exactVersion 0.5.0) instead of the swift-sdk#85 head; Android's kotlin-sdk.ref moves to the v0.2.0 tag commit (still a composite build: the release is on GitHub Packages, not Maven Central). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The iOS/Android apps are ported to Calimero 1.0 and this component ABI in their own PR, #702, which owns apps/merraria/mobile/ and depends on this one. So mobile/README.md is restored to main's (the only mobile file this PR had touched), and the app README, the root README row and the native-host comments say the apps move in #702 instead of "not ported". The bridge keeps v1 method names (V1_METHOD), which #702's BridgeDispatcher maps onto the component ABI. notReadyYet also matches `NoWorld` in an error's text, the shape a bridged error arrives in, so the game waits for a just-founded world in the apps as it does on the web. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7MHpFosvnuf8dbWwRPVQi
|
Compatibility note from the merraria web port (#710), which this PR depends on: the contract methods, parameters, answer fields and error codes all match the clients here. One thing to check on this side. The bundled game page ( Minor: Generated by Claude Code |
What and why
Calimero core 1.0 removed
/admin-api,/jsonrpc, relays, delegated execution and mero-auth. Clients talk to attested cluster nodes over the sealed channel and sign in with passkeys. This PR moves both native apps (apps/merraria/mobile/iosandapps/merraria/mobile/android) onto the 1.0 SDKs, and they now call the contract's component ABI as ported in #710. Both apps keep the same screens, flows and copy. Onlyapps/merraria/mobile/**changes.SDK pins (they move when the SDK PRs merge)
37c09f3f96e7d98440f6618eef8a0e83ddee8ebd, the head of swift-sdk#85. It's set inios/project.yml,ios/MerrariaCore/Package.swiftandPackage.resolved.61b65e9c0c87db8fbb2d3b2ce827603b0c84d5f9, the head of kotlin-sdk#68. It's set inandroid/kotlin-sdk.ref, using the same composite build as before.Contract surface (#710)
MerrariaClientis now typed by hand on both platforms (Contract/MerrariaClient.swift,contract/MerrariaClient.kt) and mirrors the web app'sapp/src/net/merraria.ts. abi-codegen can't read a component ABI yet, so the generated clients andscripts/regenerate.share gone.createWorld,setTiles,join,heartbeat,leave.worldMeta,getOverrides,getPlayers.seed,createdAtand everynoware u32 seconds.getOverridesis paged ({items, next}), andallOverrides()reads page by page.init()takes no arguments.createWorld(name, seed, now), which only the creator may run.APP_ERRORcodes show as plain sentences:NoWorld,WorldExists,WorldFull {max}andTooManyEdits {max}.host.tsV1_METHOD), the page still sends v1 names (get_overrides,set_tiles,world_meta,get_players).BridgeDispatcheris the one place that maps those names to the component methods.get_overridesreads every page and answers v1's single array.nowfrom the page is clamped to u32.ContractTests/ContractTestcompare the method lists withlogic/res/abi.json. They skip until feat(merraria): move to the component SDK, merod local and CalimeroClient #710 is onmain, because the ABI there is still v1. I ran them against feat(merraria): move to the component SDK, merod local and CalimeroClient #710'sabi.jsonlocally and they pass.Sign-in, invites, approvals
merod localURL. The app setsallowMockand keeps a soft passkey per node, and the first sign-in creates the account. Android allows cleartext http tolocalhost,127.0.0.1and10.0.2.2in debug builds only.MeroNodeURL,MeroNodesandMeroAllowMock.-PmeroCluster,-PmeroNodeUrland-PmeroAllowMock.MeroAppSessionis rebuilt for each cluster chosen. The activity setssession.passkey = PlatformPasskey(activity)inonCreateand clears it inonDestroy, so invite step-ups work.OrgInvitation, plusgroupIdfor a world that lives in a team, and is the same on iOS and Android. Pre-1.0 links are refused (tested).merraria://consent.LoginRequired,WrongNode,Unavailable,ReleaseDeadline,ConsentStale, a cancelled passkey, a missing step-up passkey and failed attestation.InMemoryAppBackend,RecordingContextContract) still backs every model and bridge test.Verification (build-only)
swift test --package-path MerrariaCoreran 47 tests with 0 failures. One test is skipped: the ABI comparison, until feat(merraria): move to the component SDK, merod local and CalimeroClient #710 lands.xcodegen generate, thenxcodebuild build -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO: BUILD SUCCEEDED../gradlew ktlintCheck detekt testDebugUnitTest lint assembleDebugagainst the pinned kotlin-sdk all pass. That covers 43 JVM tests, 0 failures, with the same ABI comparison skipped.Gaps
<frontend>/?invite=<token>, a bare token) aren't accepted by the apps. Links the apps make uselinks.calimero.network, which the web launcher doesn't read either. Invites cross between iOS and Android, but not with the web yet.webcredentials:<rp-id>and Android Digital Asset Links for that cluster's rp-id. Neither is set yet.game/wwwis still the last v1 build. It works through the bridge's name mapping. Rebuilding it from feat(merraria): move to the component SDK, merod local and CalimeroClient #710 is optional.🤖 Generated with Claude Code