Options
All
  • Public
  • Public/Protected
  • All
Menu

External module core

Index

Type aliases

AssertionError

AssertionError: assert.AssertionError

subtype of Error thrown by assert() in case AssertionCheck fails.

PlatformId

PlatformId: "android" | "ios" | "windowsphone" | "blackberry" | "browser" | "node"

platform IDs compatible to constants of ionic.

Notice, io.js is treated as node here. You may choose to use process.platform to further differentiate on desktops or window.device.platform on mobile devices. Both of this is exposed as Information.platform.name. That said, you should avoid platform-specific code of that level entirely.

Variables

assertions

assertions: boolean

enables/disables assertion testing at runtime.

When undefined, isDebugMode() controls whether assertions are validated.

debug

initOptions

initOptions: InitOptions

copy of options the SDK was initialized with using init function serving as defaults.

internal

for SDK internal use only!

ready

ready: Promise<Information>

resolves to Information object as soon as the device is ready.

internal

SDK client code is required to use init() to obtain the Information.

Functions

cloneServerInitOptions

decryptJson

  • decryptJson<T>(password: string, data: EncryptedJson<T>): Promise<T>
  • decrypts some encoded json data.

    internal

    Not part of public API, exported for library use only.

    Type parameters

    • T

    Parameters

    • password: string

      of a human.

    • data: EncryptedJson<T>

      encoded json data.

    Returns Promise<T>

    json to decoded.

encryptJson

  • encryptJson<T>(password: string, json: T): Promise<EncryptedJson<T>>
  • encrypts a JSON object using a user-provided password.

    This method is suitable for human-entered passwords and not appropriate for machine generated passwords. Make sure to read regarding pbkdf2.

    internal

    Not part of public API, exported for library use only.

    Type parameters

    • T

    Parameters

    • password: string

      of a human.

    • json: T

      to encode.

    Returns Promise<EncryptedJson<T>>

    encoded json data.

freeze

  • freeze<T>(self: T): T
  • turns the object deeply immutable.

    internal

    for library use only.

    Type parameters

    • T

    Parameters

    • self: T

      to freeze.

    Returns T

    self for convenience.

hashJson

  • hashJson(data: any, algorithm: string): Promise<Buffer>
  • computes a hash of some JSON object synchronously.

    internal

    Not part of public API, exported for library use only.

    Parameters

    • data: any

      to hash.

    • algorithm: string

      of choice.

    Returns Promise<Buffer>

    hash value.

hashJsonSync

  • hashJsonSync(data: any, algorithm: string): Buffer
  • computes a hash of some JSON object synchronously.

    Prefer the async variant if possible.

    internal

    Not part of public API, exported for library use only.

    Parameters

    • data: any

      to hash.

    • algorithm: string

      of choice.

    Returns Buffer

    hash value.

init

  • (re)initializes the SDK providing global configuration parameters.

    Parameters

    • Default value options: InitOptions = {}

      of configuration, often these are hardcoded values of the mobile client app.

    Returns Promise<Information>

    promise resolving to Information object as soon as the device is ready.

makeObjectID

  • makeObjectID(): string
  • Returns string

uuidOf

  • extracts the uuid of a Referenceable.

    Parameters

    Returns string

    uuid of referenceable.

Generated using TypeDoc