Representation of Address.

There are 4 types of address:

1. Public key based
2. Multi public key based (m, n)
3. Contract based
4. ONT ID based

The value is stored as base58 or hex encoded, therefore always use toBase58() or serialize() according to requirements.

### Hierarchy

- Address

## Index

### Constructors

- constructor

### Properties

- value

### Methods

- getB58Checksum
- serialize
- toBase58
- toHexString
- deserialize
- fromMultiPubKeys
- fromOntid
- fromPubKey
- fromVmCode
- generateOntid

## Constructors

### constructor

- new Address(value: string): Address

- - Defined in crypto/address.ts:120

  #### Parameters

  - ##### value: string

  #### Returns Address

## Properties

### value

value: string

- Defined in crypto/address.ts:120

Base58 or Hex encoded address

## Methods

### getB58Checksum

- getB58Checksum(): string

- - Defined in crypto/address.ts:165

  Computes the salt from address for decrypt.

  #### Returns string

### serialize

- serialize(): string

- - Defined in crypto/address.ts:154

  #### Returns string

### toBase58

- toBase58(): string

- - Defined in crypto/address.ts:133

  Gets Base58 encoded representation of the address.

  #### Returns string

### toHexString

- toHexString(): string

- - Defined in crypto/address.ts:144

  Gets Hex encoded representation of the address.

  #### Returns string

### Static deserialize

- deserialize(sr: StringReader): Address

- - Defined in crypto/address.ts:42

  #### Parameters

  - ##### sr: StringReader

  #### Returns Address

### Static fromMultiPubKeys

- fromMultiPubKeys(m: number, publicKeys: PublicKey[]): Address

- - Defined in crypto/address.ts:86

  Generates (m, n) threshold address.

  m - threshold n - total number of public keys

  #### Parameters

  - ##### m: number

    The threshold

  - ##### publicKeys: PublicKey[]

    Public key

  #### Returns Address

### Static fromOntid

- fromOntid(ontid: string): Address

- - Defined in crypto/address.ts:61

  Generates identity based address.

  #### Parameters

  - ##### ontid: string

    ONT ID in the form did:ont:AXmQDzzvpEtPkNwBEFsREzApTTDZFW6frD

  #### Returns Address

### Static fromPubKey

- fromPubKey(publicKey: PublicKey): Address

- - Defined in crypto/address.ts:50

  Generates public key based address.

  #### Parameters

  - ##### publicKey: PublicKey

    Public key to use

  #### Returns Address

### Static fromVmCode

- fromVmCode(vmCode: string): Address

- - Defined in crypto/address.ts:71

  Generates address from smart contract code.

  #### Parameters

  - ##### vmCode: string

    Hex encoded smart contract code

  #### Returns Address

### Static generateOntid

- generateOntid(publicKey: PublicKey): string

- - Defined in crypto/address.ts:110

  Deterministicaly generates ONT ID from this public key.

  #### Parameters

  - ##### publicKey: PublicKey

  #### Returns string

Generated using TypeDoc