yajsapi - JavaScript high-level API
Yagna Contributor Guide

Class: PrivateKey

yajsapi / Exports / crypto / PrivateKey

Class: PrivateKey

crypto.PrivateKey

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new PrivateKey()

Defined in

yajsapi/crypto.ts:11

Properties

inner

inner: Buffer

Defined in

yajsapi/crypto.ts:11

Methods

derive

derive(publicKey): Promise

Parameters

Name

Type

publicKey

PublicKey

Returns

Promise

Defined in

yajsapi/crypto.ts:35

publicKey

publicKey(compressed?): PublicKey

Parameters

Name

Type

Default value

compressed

boolean

true

Returns

PublicKey

Defined in

yajsapi/crypto.ts:28

sign

sign(msg): Promise

Parameters

Name

Type

msg

Buffer

Returns

Promise

Defined in

yajsapi/crypto.ts:39

toString

toString(): string

Returns

string

Defined in

yajsapi/crypto.ts:43

from

Static from(buffer): PrivateKey

Parameters

Name

Type

buffer

Buffer

Returns

PrivateKey

Defined in

yajsapi/crypto.ts:17

fromHex

Static fromHex(hex): PublicKey

Parameters

Name

Type

hex

string

Returns

PublicKey

Defined in

yajsapi/crypto.ts:23