# @seald-io/sdk

# Table of contents

# SDK Interfaces

# Helpers Interfaces

# SDK Constructor Type aliases

# Helpers Type aliases

# Other Type aliases

# SDK Constructor Type aliases

# SDKConstructor

Ƭ SDKConstructor: (args: { apiURL?: string ; appId: string ; databaseKey?: string ; databasePath?: string ; hairlessURL?: string ; nedbClient?: NedbClient ; plugins?: SDKPlugin[] }) => SealdSDK

# Type declaration

▸ (args): SealdSDK

# Parameters
Name Type Description
args Object -
args.apiURL? string The Seald server URL to use. Only change it if asked to by the Seald team.
args.appId string The appId given to you by Seald. It is the unique identifier of your application for Seald's servers.
args.databaseKey? string If you are using a persistent database, the key to encrypt it with. A random string of at least 32 alphanumeric characters, stored by your back-end and given after authentication, is recommended.
args.databasePath? string If you want to have a persistent database, use this argument. On Node, takes a directory path. On the browser, takes an arbitrary string that will be a localStorage key. If not given, defaults to a memory-only non-persistent database.
args.hairlessURL? string The Seald URL to use for documents for non-Seald users. Only change it if asked to by the Seald team.
args.nedbClient? NedbClient To manually pass a follicle database client instance to the SDK. For advanced use only.
args.plugins? SDKPlugin[] -
# Returns

SealdSDK


# Helpers Type aliases

# AuthorizeRecipientResult

Ƭ AuthorizeRecipientResult: Object

# Type declaration

Name Type
addedHairlessRecipients Object
addedRecipients Object
addedRecipients.status Object

# Recipients

Ƭ Recipients: Object

# Type declaration

Name Type
APConnectors? string[]
emails? string[]
sealdIds? string[]
userIds? string[]

# RevokeResult

Ƭ RevokeResult: Object

# Type declaration

Name Type Description
entrustedEmails Object Of the form { 'email@domain.com': 'ok'
revokeAll Object When revoking everyone. Contains subvalues of the same form as the other properties.
revokeAll.entrustedEmails Object -
revokeAll.userIDs Object -
userIDs Object Of the form { 'sealdId': 'ok'

# SCrypt

Ƭ SCrypt: (password: Buffer, salt: Buffer) => Promise<Buffer>

# Type declaration

▸ (password, salt): Promise<Buffer>

# Parameters
Name Type
password Buffer
salt Buffer
# Returns

Promise<Buffer>


# Other Type aliases

# SerializationHook

Ƭ SerializationHook: (s: string) => string

# Type declaration

▸ (s): string

# Parameters
Name Type
s string
# Returns

string


# SerializationHooks

Ƭ SerializationHooks: Object

# Type declaration

Name Type
afterSerialization SerializationHook
beforeDeserialization SerializationHook