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:160

  #### Parameters

  - ##### key: Buffer

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

  #### Returns PublicKey

## Properties

### key

key: Buffer

- Defined in crypto.ts:162

### prefix

prefix: string

- Defined in crypto.ts:163

## Methods

### inspect

- inspect(): string

- - Defined in crypto.ts:213

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

  #### Returns string

### toJSON

- toJSON(): string

- - Defined in crypto.ts:206

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

  #### Returns string

### toString

- toString(): string

- - Defined in crypto.ts:199

  Return a WIF-encoded representation of the key.

  #### Returns string

### verify

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

- - Defined in crypto.ts:192

  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): PublicKey

- - Defined in crypto.ts:179

  Create a new instance.

  #### Parameters

  - ##### value: string | PublicKey

  #### Returns PublicKey

### Static fromString

- fromString(wif: string): PublicKey

- - Defined in crypto.ts:171

  Create a new instance from a WIF-encoded key.

  #### Parameters

  - ##### wif: string

  #### Returns PublicKey

Generated using TypeDoc