Reference

API reference

Methods the store apps actually call. iOS is Arnacon on the iArnacon package. Android is the ArnaconWeb3 wrapper over org.Arnacon.

Copied from source after pull. If a method is not in these tables, do not invent it. Balance monitor, ABI dumps, and cache-stat helpers are omitted on purpose.

Swift / iOS

Arnacon

Class Arnacon : AArnacon. Product iArnacon. iOS 13+. CallKit is not in this SDK.

Setup

MethodWhat it does
init(dataSaveHelper:gpsCoordinates:)Create the SDK. gpsCoordinates is the local encryption password.
setLogger(_:)Install your PLogger.
setNetworkSettings(_:_:_:)Connect PServer (use CloudFunctions), app version, optional forceFresh. Required before chain calls.

Identity and signing

MethodWhat it does
getMainCoordinates()Main coordinates for this install.
getENSOwner(memberName:forceFresh:)Resolve a name to its owner.
getXData(identity:) / getXSign(_:)Identity headers used when the app registers to call.
signMessage(_:)Sign a payload. Never expose the mnemonic or key.
processIdentity(_:serviceIdentity:)Normalize a peer identity for the sender’s service.

Notifications

MethodWhat it does
prepareNotification(sender:target:message:notificationType:)Build a plan. Types: call 0, message 1, fetch 2, fallback 3, realtimeSignal 4, deliveryStatus 5.
executeNotification(_:)Send a prepared plan.
sendNotification(...)Prepare and execute in one step.
sendCallNotification(sender:target:)Preferred one-shot for a call invite.
sendFCMMessage(sender:target:)Orchestrated FCM message when you already have that path.
sendNotiTokens(_:_:)Register this device’s FCM and VoIP tokens.
supportedNotificationTypes(sender:)Which types this identity can send.
getNotificationTokensForTarget(target:)Look up the recipient’s tokens. Do not register them as yours.

Products

MethodWhat it does
getProductsList() / getProductLabels()Identities installed on this device.
installProduct(_:)Add an identity. User Allows. Do not auto-run from FCM in new code.
deleteProduct(_:)Remove an identity from this device.
addProductStateListener(_:)Observe pending → active (and the other states).

Encrypted chat (optional)

MethodWhat it does
encryptMessageForRecipient(message:recipient:)Curve25519 + AES-GCM for a direct message body.
sendDirectMessage(...)Deliver an already-encrypted body via the server.
decryptMessage(encryptedPass:recipient:)Open a body encrypted for this install.

Java / Android

ArnaconWeb3

Open wrapper in com.arnacon.app.arnacon.ArnaconWeb3. JAR Arnacon-0.4.15, type org.Arnacon. Not Maven. Methods below are on the wrapper unless marked JAR.

Setup

MethodWhat it does
getInstance(ctx)Singleton wrapper. Constructs new Arnacon(PreferencesDataSaver, appKey).
setNetworkSettings()Connects CloudFunctions.getCloudFunctions(logger) to the JAR. Call after init. Wait for ready.
isNetworkSettingsReady()True after the first successful set.

Identity and signing

MethodWhat it does
getPublicKey()Main coordinates for this install.
getENSOwner(name, forceFresh)Resolve a name to its owner.
getXData() / getXSign(data)Identity headers used when the app registers to call.
signMessage(message)Sign a payload. Never log the key.
checkIdentity(label)True if that label is already on this device.
getIdentities()Installed products as an identity list.

Notifications

MethodWhat it does
sendFCMMessage(local, remote, message)Prepare MESSAGE, then execute.
sendCallNotification(local, remote, message)Prepare CALL, then execute. This is the ring.
sendRealtimeSignal(local, remote, message)Prepare REALTIME_SIGNAL. SDP / ICE / hangup. Does not ring.
sendPlaintextMessage(local, remote, json)MESSAGE plan without a WebRTC session.
sendFallbackMessage(local, remote, json)FALLBACK plan after WebRTC failed.
sendFcmToken(token)Register this device’s push token.
prepareNotification / executeNotificationJAR. Same plan path the wrapper convenience methods call.

Products

MethodWhat it does
installProduct(item)Add an identity. Intended policy: user Allows.
deleteProduct(product)Remove an identity from this device.
getProductFromName / getProductFromLabelLook up an installed product.
addProductListenerObserve product state changes.

Website product

Arnauth

A product installed in Arnacon already knows the user. iOS appends web3identity on the ticket or install URL. Upsert that name in your users table. That is in-app auth. Do not invent a password.

Desktop login is a different job. The phone has the signature. The laptop does not. Use the Arnauth mailbox, then write the same web3identity into that table. Two loads of your site are not a backend. Reference UI: /arnauth.

Create-session is origin-locked to arnacon.com and localhost today. A real product origin is added to that allowlist when the site exists — not a public embed, not a client registry.

Mailbox

Base https://europe-west1-arnacon-production-gcp.cloudfunctions.net/arnauth. Browser sends Origin. No WebSocket. Poll GET.

CallWhat it does
POST {}Create. Returns sessionId, requestId (same uuid), site (Origin host), expiresAt. TTL 5 minutes.
GET ?session=Poll. open · confirmed · expired. Identity and address only when confirmed.
POST { xData, xSign }Confirm. Approve page only, after native sign. Not the desktop tab.

Ticket (iOS): arnacon://ticket?storeUrl= + encode https://www.arnacon.com/arnauth/approve?session=<id>. The store appends &web3identity=. Do not append it yourself. Do not use arnacon://install or arnacon://auth for login. Android has no ticket host yet.

Signed JSON, EIP-191 personal_sign of this exact string:

xData
{"v":1,"requestId":"<uuid>","site":"<session.site>","web3identity":"<name.arnacon.global>","ts":<ms>}

If you do not trust the mailbox GET, recover the signer with verifyMessage and compare to the Polygon ENS owner of that name. You still need the mailbox (or your own table) to move xData / xSign to the desktop. Do not call the private IAM mapping from the browser. Do not fake Connected.

Prompt for an implementing AI

Copy into the product repo
You are adding Arnacon login to an installed website product.

In-app (product already installed):
- Read web3identity from the query string (iOS appends it on ticket/install).
- Upsert users(web3identity, address?, firstSeen). That is the user id.
- Do not invent a password. Do not call a private IAM mapping API.

Desktop (optional, same account):
- POST {} to https://europe-west1-arnacon-production-gcp.cloudfunctions.net/arnauth
- Show a QR / Open Arnacon for
  arnacon://ticket?storeUrl=https://www.arnacon.com/arnauth/approve?session=<id>
  (encode the storeUrl). iOS appends web3identity. Android ticket is not shipped.
- Poll GET ?session= every 1.5s until confirmed, expired, or expiresAt.
- On confirmed, upsert the same users row. Poll is enough for Connected UI.
- You only need your own cookie/backend if your server must trust the user.
- Create fails with 403 until this origin is on the Arnauth allowlist. Stop. Do not mock login.

Signed payload (approve page only):
{"v":1,"requestId":"<uuid>","site":"<session.site>","web3identity":"<name.arnacon.global>","ts":<ms>}
Confirm is POST { xData, xSign }. Desktop never sends that.

Optional extra check: ethers.verifyMessage + Polygon ENS owner of the name.
That does not replace the mailbox.

Do not use WebSockets, arnacon://install, or arnacon://auth for this.
Do not fake a connected user.

Out of scope

Do not document these as integration APIs.

Never expose or wrap for a third party:
  • Mnemonic or private keys
  • The iOS gpsCoordinates password or the Android Keystore app key
  • setRsaKey
  • Sending as another identity
  • Payments or store checkout
  • installProduct without an explicit user Allow

Next

Go implement a path.