Namespace: Byteria.SDK. Getters throw AlphynException("SDK_NOT_INITIALIZED", ...) when called before Initialize.
| Method | Description |
|---|
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 |
IsInitialized | Whether the plugin has initialized the SDK |
IsNativeInitialized | Whether 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 |
| Event | Description |
|---|
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(). |
| Property | Type | Description |
|---|
trusted | bool | Overall trust status |
deviceRooted | bool | Root detection result |
emulated | bool | Emulator detection result |
debuggerAttached | bool | Debugger detection result |
fridaDetected | bool | Frida detection result |
xposedDetected | bool | Xposed detection result |
proxyDetected | bool | Proxy detection result |
vpnDetected | bool | VPN detection result |
tampered | bool | Tamper detection result |
Helpers: ScanResult.Parse(json), HasThreats(), GetThreatSummary().
| Property | Type | Description |
|---|
success | bool | Whether verification succeeded |
verificationToken | string | Verification token (JWT) if successful |
expiresAtMs | long | Token expiration timestamp in milliseconds since epoch |
errorCode | string | Error code if verification failed |
errorMessage | string | Error message if verification failed |
Helpers: ActionVerificationResult.Parse(json), IsTokenValid().