Skip to content

API Reference

Namespace: Byteria.SDK. Getters throw AlphynException("SDK_NOT_INITIALIZED", ...) when called before Initialize.

MethodDescription
Initialize(scanIntervalSeconds = 30f, appKey = ...)Initialize SDK with a scan interval. Pass "" as the second argument in production; use your app’s debug hash from the Alphyn Portal only in development builds (see Quick Start)
Register()Registers the SDK’s background tasks (iOS device builds only, no-op elsewhere). Also runs automatically at app launch via the plugin’s app controller, so calling it manually is a fallback
IsInitializedWhether the plugin has initialized the SDK
IsNativeInitializedWhether the native SDK layer reports itself initialized
GetScanResult()Get last scan result summary
GetAllScanResults(start, end)Get historical scans with date filter
GetDeviceId()Get unique device identifier
GetAppHash()Get app integrity hash
GetModules()Get active security modules as List<string>
GetModulesJson()Get active security modules as a raw JSON string
GetLastScanDate()Get timestamp of last scan
GetRejectReasons()Get rejection codes if untrusted
GetResult()Legacy convenience getter kept for compatibility. Prefer GetScanResult() / GetAllRiskFactors()
GetAllRiskFactors()Get all detected risk factors as List<string>
SignAction(userId, label, contextJson, pin, subject)Sign a high-risk action with an enrolled user’s hardware key; returns a JSON string - parse with ActionVerificationResult.Parse(). See MFA Transaction Signing
EventDescription
OnInitialized(bool, string)Fired when SDK initialization completes. On iOS, initialization runs on a background thread, so this event may fire off the main thread
OnThreatDetected(string)Reserved for threat notifications. Read the current threat status with GetScanResult() / GetAllRiskFactors().
PropertyTypeDescription
trustedboolOverall trust status
deviceRootedboolRoot detection result
emulatedboolEmulator detection result
debuggerAttachedboolDebugger detection result
fridaDetectedboolFrida detection result
xposedDetectedboolXposed detection result
proxyDetectedboolProxy detection result
vpnDetectedboolVPN detection result
tamperedboolTamper detection result

Helpers: ScanResult.Parse(json), HasThreats(), GetThreatSummary().

PropertyTypeDescription
successboolWhether verification succeeded
verificationTokenstringVerification token (JWT) if successful
expiresAtMslongToken expiration timestamp in milliseconds since epoch
errorCodestringError code if verification failed
errorMessagestringError message if verification failed

Helpers: ActionVerificationResult.Parse(json), IsTokenValid().