Skip to content

@aldea/sdk / Exports / KeyPair

Class: KeyPair ​

Aldea Key Pair

Convinience wrapper around a PrivKey and PubKey pair.

Table of contents ​

Constructors ​

Properties ​

Methods ​

Constructors ​

constructor ​

• new KeyPair(privKey, pubKey): KeyPair

Parameters ​

NameType
privKeyPrivKey
pubKeyPubKey

Returns ​

KeyPair

Defined in ​

packages/core/dist/keypair.d.ts:10

Properties ​

privKey ​

• privKey: PrivKey

Defined in ​

packages/core/dist/keypair.d.ts:8


pubKey ​

• pubKey: PubKey

Defined in ​

packages/core/dist/keypair.d.ts:9

Methods ​

fromPrivKey ​

▸ fromPrivKey(privKey): KeyPair

Returns a KeyPair from the given PrivKey.

Parameters ​

NameType
privKeyPrivKey

Returns ​

KeyPair

Defined in ​

packages/core/dist/keypair.d.ts:18


fromRandom ​

▸ fromRandom(): KeyPair

Generates and returns a new random KeyPair.

Returns ​

KeyPair

Defined in ​

packages/core/dist/keypair.d.ts:14