Skip to main content
Version: near-api-js@1.1.0

Class: PublicKey

utils/key_pair.PublicKey

PublicKey representation that has type and bytes of the key.

Hierarchy

  • Assignable

    PublicKey

Constructors

constructor

new PublicKey(properties)

Parameters

NameType
propertiesany

Inherited from

Assignable.constructor

Defined in

utils/enums.ts:17

Properties

data

data: Uint8Array

Defined in

utils/key_pair.ts:36


keyType

keyType: ED25519

Defined in

utils/key_pair.ts:35

Methods

toString

toString(): string

Returns

string

Defined in

utils/key_pair.ts:56


verify

verify(message, signature): boolean

Parameters

NameType
messageUint8Array
signatureUint8Array

Returns

boolean

Defined in

utils/key_pair.ts:60


from

Static from(value): PublicKey

Parameters

NameType
valuestring | PublicKey

Returns

PublicKey

Defined in

utils/key_pair.ts:38


fromString

Static fromString(encodedKey): PublicKey

Parameters

NameType
encodedKeystring

Returns

PublicKey

Defined in

utils/key_pair.ts:45