# @seald-io/sdk-plugin-ssks-password

This module is a plugin for the Seald SDK : @seald-io/sdk (opens new window).

The @seald-io/sdk-plugin-ssks-password (opens new window) module allows to use the SSKS key storage service to store Seald identities easily and securely, encrypted by a user password.

This module exposes a function, that takes keyStorageURL as argument, and returns a SDKPlugin which can be passed to the SealdSDK constructor.

When the Seald SDK is passed this plugin, the SealdSDK instance is modified to have a ssksPassword property, which exposes the SSKSPassword interface.

Example:

import SealdSDK from '@seald-io/sdk'
import SealdSDKPluginSSKSPassword from '@seald-io/sdk-plugin-ssks-password'

const seald = SealdSDK({
  appId,
  apiURL,
  plugins: [SealdSDKPluginSSKSPassword(keyStorageURL)] // passing the plugin to SealdSDK
})
await seald.initialize()

// Creating a Seald identity
await seald.initiateIdentity({ userId, userLicenseToken })
// The SealdSDK instance now has a `ssksPassword` property : we can use `saveIdentity`
await seald.ssksPassword.saveIdentity({ userId, password })

# Table of contents

# Interfaces

# Type Aliases

# Functions

# Type Aliases

# KeyStorePassword

Ƭ KeyStorePassword: Object

Internal interface to the SSKS API.

WARNING: Do not use directly.

# Type declaration

Name Type
extraHeaders Record<string, string>
push (args: { data: Buffer ; password?: string ; rawEncryptionKey?: string ; rawStorageKey?: string ; userId: string }) => Promise<void>
search (args: { password?: string ; rawEncryptionKey?: string ; rawStorageKey?: string ; userId: string }) => Promise<Buffer>

# Functions

# default

default(keyStorageURL?): SDKPlugin

# Parameters

Name Type Default value Description
keyStorageURL string 'https://ssks.seald.io/' Optional. URL of the SSKS server to use. Defaults to 'https://ssks.seald.io/'.

# Returns

SDKPlugin