Padloc Logo Docs & Resources

Interface: Platform

platform.Platform

Generic interface for various platform APIs

Implemented by

Properties

biometricKeyStore

biometricKeyStore: BiometricKeyStore

Defined in

core/src/platform.ts:91


crypto

crypto: CryptoProvider

Defined in

core/src/platform.ts:87


platformAuthType

Readonly platformAuthType: null | AuthType

Defined in

core/src/platform.ts:128


storage

storage: Storage

Defined in

core/src/platform.ts:89


supportedAuthTypes

Readonly supportedAuthTypes: AuthType[]

Defined in

core/src/platform.ts:102

Methods

completeAuthRequest

completeAuthRequest(req): Promise<{ accountStatus: AccountStatus ; deviceTrusted: boolean ; email: string ; legacyData?: PBES2Container ; provisioning: AccountProvisioning ; token: string }>

Parameters

Name Type
req StartAuthRequestResponse

Returns

Promise<{ accountStatus: AccountStatus ; deviceTrusted: boolean ; email: string ; legacyData?: PBES2Container ; provisioning: AccountProvisioning ; token: string }>

Defined in

core/src/platform.ts:119


composeEmail

composeEmail(addr, subject, message): Promise<void>

Parameters

Name Type
addr string
subject string
message string

Returns

Promise<void>

Defined in

core/src/platform.ts:96


getClipboard

getClipboard(): Promise<string>

Retrieves the current text from the system clipboard

Returns

Promise<string>

Defined in

core/src/platform.ts:82


getDeviceInfo

getDeviceInfo(): Promise<DeviceInfo>

Get information about the current device

Returns

Promise<DeviceInfo>

Defined in

core/src/platform.ts:85


getPlatformAuthToken

getPlatformAuthToken(_purpose): Promise<string>

Parameters

Name Type
_purpose AuthPurpose[]

Returns

Promise<string>

Defined in

core/src/platform.ts:131


openExternalUrl

openExternalUrl(_url): void

Parameters

Name Type
_url string

Returns

void

Defined in

core/src/platform.ts:98


registerAuthenticator

registerAuthenticator(opts): Promise<string>

Parameters

Name Type
opts Object
opts.data? any
opts.device? DeviceInfo
opts.purposes AuthPurpose[]
opts.type AuthType

Returns

Promise<string>

Defined in

core/src/platform.ts:104


registerPlatformAuthenticator

registerPlatformAuthenticator(purposes): Promise<string>

Parameters

Name Type
purposes AuthPurpose[]

Returns

Promise<string>

Defined in

core/src/platform.ts:130


saveFile

saveFile(name, type, contents): Promise<void>

Parameters

Name Type
name string
type string
contents Uint8Array

Returns

Promise<void>

Defined in

core/src/platform.ts:100


scanQR

scanQR(): Promise<string>

Returns

Promise<string>

Defined in

core/src/platform.ts:93


setClipboard

setClipboard(text): Promise<void>

Copies the given text to the system clipboard

Parameters

Name Type
text string

Returns

Promise<void>

Defined in

core/src/platform.ts:79


startAuthRequest

startAuthRequest(opts): Promise<StartAuthRequestResponse>

Parameters

Name Type
opts Object
opts.authenticatorId? string
opts.authenticatorIndex? number
opts.email? string
opts.purpose AuthPurpose
opts.type? AuthType

Returns

Promise<StartAuthRequestResponse>

Defined in

core/src/platform.ts:111


stopScanQR

stopScanQR(): Promise<void>

Returns

Promise<void>

Defined in

core/src/platform.ts:94


supportsPlatformAuthenticator

supportsPlatformAuthenticator(): Promise<boolean>

Returns

Promise<boolean>

Defined in

core/src/platform.ts:129