yajsapi - Java Script high-level API
Yagna Contributor Guide

Class: PrivateKey

yajsapi / Exports / crypto / PrivateKey

Class: PrivateKey

crypto.PrivateKey

Hierarchy

  • PrivateKey

Table of contents

Constructors

Properties

Methods

Constructors

constructor

Returns: PrivateKey

Defined in: yajsapi/crypto.ts:11

Properties

inner

inner: Buffer

Defined in: yajsapi/crypto.ts:11

Methods

derive

derive(publicKey: PublicKey): Promise<Buffer>

Parameters:

Name

Type

publicKey

PublicKey

Returns: Promise<Buffer>

Defined in: yajsapi/crypto.ts:35

publicKey

publicKey(compressed?: boolean): PublicKey

Parameters:

Name

Type

Default value

compressed

boolean

true

Returns: PublicKey

Defined in: yajsapi/crypto.ts:28

sign

sign(msg: Buffer): Promise<Buffer>

Parameters:

Name

Type

msg

Buffer

Returns: Promise<Buffer>

Defined in: yajsapi/crypto.ts:39

toString

toString(): string

Returns: string

Defined in: yajsapi/crypto.ts:43

from

Staticfrom(buffer: Buffer): PrivateKey

Parameters:

Name

Type

buffer

Buffer

Returns: PrivateKey

Defined in: yajsapi/crypto.ts:17

fromHex

StaticfromHex(hex: string): PublicKey

Parameters:

Name

Type

hex

string

Returns: PublicKey

Defined in: yajsapi/crypto.ts:23