Padloc Logo Docs & Resources

Module: platform

Classes

Interfaces

Functions

authenticate

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

Parameters

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

Returns

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

Defined in

core/src/platform.ts:308


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:297


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:270


getClipboard

getClipboard(): Promise<string>

Copies the given text to the system clipboard

Returns

Promise<string>

Defined in

core/src/platform.ts:240


getCryptoProvider

getCryptoProvider(): CryptoProvider

Returns

CryptoProvider

Defined in

core/src/platform.ts:254


getDeviceInfo

getDeviceInfo(): Promise<DeviceInfo>

Get information about the current device

Returns

Promise<DeviceInfo>

Defined in

core/src/platform.ts:250


getPlatform

getPlatform(): Platform

Get the current Platform implemenation

Returns

Platform

Defined in

core/src/platform.ts:235


getPlatformAuthType

getPlatformAuthType(): null | AuthType

Returns

null | AuthType

Defined in

core/src/platform.ts:327


getStorage

getStorage(): Storage

Returns

Storage

Defined in

core/src/platform.ts:258


openExternalUrl

openExternalUrl(url): void

Parameters

Name Type
url string

Returns

void

Defined in

core/src/platform.ts:331


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:278


registerPlatformAuthenticator

registerPlatformAuthenticator(purposes): Promise<string>

Parameters

Name Type
purposes AuthPurpose[]

Returns

Promise<string>

Defined in

core/src/platform.ts:323


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:274


scanQR

scanQR(): Promise<string>

Returns

Promise<string>

Defined in

core/src/platform.ts:262


setClipboard

setClipboard(val): Promise<void>

Retrieves the current text from the system clipboard

Parameters

Name Type
val string

Returns

Promise<void>

Defined in

core/src/platform.ts:245


setPlatform

setPlatform(p): void

Set the appropriate Platform implemenation for the current environment

Parameters

Name Type
p Platform

Returns

void

Defined in

core/src/platform.ts:228


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:287


stopScanQR

stopScanQR(): Promise<void>

Returns

Promise<void>

Defined in

core/src/platform.ts:266


supportsPlatformAuthenticator

supportsPlatformAuthenticator(): Promise<boolean>

Returns

Promise<boolean>

Defined in

core/src/platform.ts:319