ECDSA (secp256k1) public key.

### Hierarchy

- PublicKey

## Index

### Constructors

- constructor

### Properties

- key
- prefix

### Methods

- inspect
- toJSON
- toString
- verify
- from
- fromString

## Constructors

### constructor

- new PublicKey(key: Buffer, prefix?: string): PublicKey

- - Defined in crypto.ts:154

  #### Parameters

  - ##### key: Buffer

  - ##### Default value prefix: string = DEFAULT_ADDRESS_PREFIX

  #### Returns PublicKey

## Properties

### key

key: Buffer

- Defined in crypto.ts:156

### prefix

prefix: string

- Defined in crypto.ts:156

## Methods

### inspect

- inspect(): string

- - Defined in crypto.ts:186

  Used by `utils.inspect` and `console.log` in node.js.

  #### Returns string

### toJSON

- toJSON(): string

- - Defined in crypto.ts:179

  Return JSON representation of this key, same as toString().

  #### Returns string

### toString

- toString(): string

- - Defined in crypto.ts:172

  Return a WIF-encoded representation of the key.

  #### Returns string

### verify

- verify(message: Buffer, signature: Signature): boolean

- - Defined in crypto.ts:165

  Verify a 32-byte signature.

  #### Parameters

  - ##### message: Buffer

    32-byte message to verify.

  - ##### signature: Signature

    Signature to verify.

  #### Returns boolean

### Static from

- from(value: string | PublicKey | Buffer, prefix?: string): PublicKey

- - Defined in crypto.ts:145

  Create a new instance.

  #### Parameters

  - ##### value: string | PublicKey | Buffer

  - ##### Default value prefix: string = DEFAULT_ADDRESS_PREFIX

  #### Returns PublicKey

### Static fromString

- fromString(wif: string, prefix?: string): PublicKey

- - Defined in crypto.ts:138

  Create a new instance from a WIF-encoded key.

  #### Parameters

  - ##### wif: string

  - ##### Default value prefix: string = DEFAULT_ADDRESS_PREFIX

  #### Returns PublicKey

Generated using TypeDoc