Skip to main content

Class: Ed25519PublicKey

An Ed25519 public key

Extends

Constructors

new Ed25519PublicKey()

new Ed25519PublicKey(value): Ed25519PublicKey

Create a new Ed25519PublicKey object

Parameters

value: PublicKeyInitData

ed25519 public key as buffer or base-64 encoded string

Returns

Ed25519PublicKey

Overrides

PublicKey.constructor

Properties

SIZE

static SIZE: number = PUBLIC_KEY_SIZE

Methods

toBase64()

toBase64(): string

Return the base-64 representation of the public key

Returns

string

Inherited from

PublicKey.toBase64


toString()

toString(): never

Returns

never

Inherited from

PublicKey.toString


toIotaPublicKey()

toIotaPublicKey(): string

Return the IOTA representation of the public key encoded in base-64. A IOTA public key is formed by the concatenation of the scheme flag with the raw bytes of the public key

Returns

string

Inherited from

PublicKey.toIotaPublicKey


verifyWithIntent()

verifyWithIntent(bytes, signature, intent): Promise<boolean>

Parameters

bytes: Uint8Array

signature: string | Uint8Array

intent: IntentScope

Returns

Promise<boolean>

Inherited from

PublicKey.verifyWithIntent


verifyPersonalMessage()

verifyPersonalMessage(message, signature): Promise<boolean>

Verifies that the signature is valid for for the provided PersonalMessage

Parameters

message: Uint8Array

signature: string | Uint8Array

Returns

Promise<boolean>

Inherited from

PublicKey.verifyPersonalMessage


verifyTransaction()

verifyTransaction(transaction, signature): Promise<boolean>

Verifies that the signature is valid for for the provided Transaction

Parameters

transaction: Uint8Array

signature: string | Uint8Array

Returns

Promise<boolean>

Inherited from

PublicKey.verifyTransaction


toIotaBytes()

toIotaBytes(): Uint8Array

Returns the bytes representation of the public key prefixed with the signature scheme flag

Returns

Uint8Array

Inherited from

PublicKey.toIotaBytes


toIotaBytesForAddress()

toIotaBytesForAddress(): Uint8Array

Returns the bytes representation of the public key prefixed with the signature scheme flag. If the signature scheme is ED25519, no prefix is set.

Returns

Uint8Array

Inherited from

PublicKey.toIotaBytesForAddress


toIotaAddress()

toIotaAddress(): string

Return the IOTA address associated with this Ed25519 public key

Returns

string

Inherited from

PublicKey.toIotaAddress


equals()

equals(publicKey): boolean

Checks if two Ed25519 public keys are equal

Parameters

publicKey: Ed25519PublicKey

Returns

boolean

Overrides

PublicKey.equals


toRawBytes()

toRawBytes(): Uint8Array

Return the byte array representation of the Ed25519 public key

Returns

Uint8Array

Overrides

PublicKey.toRawBytes


flag()

flag(): number

Return the IOTA address associated with this Ed25519 public key

Returns

number

Overrides

PublicKey.flag


verify()

verify(message, signature): Promise<boolean>

Verifies that the signature is valid for for the provided message

Parameters

message: Uint8Array

signature: string | Uint8Array

Returns

Promise<boolean>

Overrides

PublicKey.verify