### Hierarchy

- Identity

## Index

### Properties

- controls
- extra
- label
- lock
- ontid

### Methods

- addControl
- toJson
- toJsonObj
- create
- importIdentity
- parseJson
- parseJsonObj

## Properties

### controls

controls: ControlData[] = []

- Defined in identity.ts:161

### extra

extra: null

- Defined in identity.ts:162

### label

label: string

- Defined in identity.ts:159

### lock

lock: boolean

- Defined in identity.ts:160

### ontid

ontid: string

- Defined in identity.ts:158

## Methods

### addControl

- addControl(control: ControlData): void

- - Defined in identity.ts:164

  #### Parameters

  - ##### control: ControlData

  #### Returns void

### toJson

- toJson(): string

- - Defined in identity.ts:174

  #### Returns string

### toJsonObj

- toJsonObj(): any

- - Defined in identity.ts:184

  Serializes to JSON object.

  Returned object will not be stringified.

  #### Returns any

### Static create

- create(privateKey: PrivateKey, keyphrase: string, label: string, params?: ScryptParams): Identity

- - Defined in identity.ts:117

  Creates Identity object encrypting specified private key.

  The identity is not registered on the blockchain. Caller needs to register it.

  #### Parameters

  - ##### privateKey: PrivateKey

    Private key associated with the identity

  - ##### keyphrase: string

    Password use to encrypt the private key

  - ##### label: string

    Custom label

  - ##### Optional params: ScryptParams

    Optional scrypt params

  #### Returns Identity

### Static importIdentity

- importIdentity(label: string, encryptedPrivateKey: PrivateKey, password: string, address: Address, saltBase64: string, params?: ScryptParams): Identity

- - Defined in identity.ts:77

  Import identity

  #### Parameters

  - ##### label: string

    Name of identity

  - ##### encryptedPrivateKey: PrivateKey

    Encrypted private key

  - ##### password: string

    User's password to decrypt

  - ##### address: Address

    Address to decrypt

  - ##### saltBase64: string

    Salt to decrypt

  - ##### Optional params: ScryptParams

    Optional params to decrypt

  #### Returns Identity

### Static parseJson

- parseJson(json: string): Identity

- - Defined in identity.ts:137

  #### Parameters

  - ##### json: string

  #### Returns Identity

### Static parseJsonObj

- parseJsonObj(obj: any): Identity

- - Defined in identity.ts:148

  Deserializes JSON object.

  Object should be real object, not stringified.

  #### Parameters

  - ##### obj: any

    JSON object

  #### Returns Identity

Generated using TypeDoc