Class to manage Accounts and Identity

### Hierarchy

- Wallet

## Index

### Properties

- accounts
- createTime
- defaultAccountAddress
- defaultOntid
- extra
- identities
- name
- scrypt
- version

### Methods

- addAccount
- addIdentity
- setDefaultAccount
- setDefaultIdentity
- signatureData
- toJson
- toJsonObj
- toWalletFile
- create
- fromWalletFile
- parseJson
- parseJsonObj

## Properties

### accounts

accounts: Account[] = []

- Defined in wallet.ts:96

### createTime

createTime: string

- Defined in wallet.ts:87

### defaultAccountAddress

defaultAccountAddress: string = ""

- Defined in wallet.ts:86

### defaultOntid

defaultOntid: string = ""

- Defined in wallet.ts:85

### extra

extra: null

- Defined in wallet.ts:97

### identities

identities: Identity[] = []

- Defined in wallet.ts:95

### name

name: string

- Defined in wallet.ts:84

### scrypt

scrypt: object

- Defined in wallet.ts:89

#### Type declaration

- ##### dkLen: number

- ##### n: number

- ##### p: number

- ##### r: number

### version

version: string

- Defined in wallet.ts:88

## Methods

### addAccount

- addAccount(account: Account): void

- - Defined in wallet.ts:99

  #### Parameters

  - ##### account: Account

  #### Returns void

### addIdentity

- addIdentity(identity: Identity): void

- - Defined in wallet.ts:108

  #### Parameters

  - ##### identity: Identity

  #### Returns void

### setDefaultAccount

- setDefaultAccount(address: string): void

- - Defined in wallet.ts:117

  #### Parameters

  - ##### address: string

  #### Returns void

### setDefaultIdentity

- setDefaultIdentity(ontid: string): void

- - Defined in wallet.ts:121

  #### Parameters

  - ##### ontid: string

  #### Returns void

### signatureData

- signatureData(): string

- - Defined in wallet.ts:151

  #### Returns string

### toJson

- toJson(): string

- - Defined in wallet.ts:125

  #### Returns string

### toJsonObj

- toJsonObj(): any

- - Defined in wallet.ts:135

  Serializes to JSON object.

  Returned object will not be stringified.

  #### Returns any

### toWalletFile

- toWalletFile(): any

- - Defined in wallet.ts:158

  #### Returns any

### Static create

- create(name: string): Wallet

- - Defined in wallet.ts:67
  example

        import { Wallet } from 'ontology-ts-sdk';
        const wallet = Wallet.create('test');

  #### Parameters

  - ##### name: string

    Wallet's name

  #### Returns Wallet

### Static fromWalletFile

- fromWalletFile(obj: any): Wallet

- - Defined in wallet.ts:52

  #### Parameters

  - ##### obj: any

  #### Returns Wallet

### Static parseJson

- parseJson(json: string): Wallet

- - Defined in wallet.ts:27

  #### Parameters

  - ##### json: string

  #### Returns Wallet

### Static parseJsonObj

- parseJsonObj(obj: any): Wallet

- - Defined in wallet.ts:38

  Deserializes JSON object.

  Object should be real object, not stringified.

  #### Parameters

  - ##### obj: any

    JSON object

  #### Returns Wallet

Generated using TypeDoc