Skip to main content

PrivateKeyBundle

Class: PrivateKeyBundle

Implements

  • PrivateKeyBundleV1

Constructors

constructor

new PrivateKeyBundle(identityKey, preKeys?)

Parameters

NameType
identityKeyPrivateKey
preKeys?PrivateKey[]

Defined in

crypto/PrivateKeyBundle.ts:18

Properties

identityKey

identityKey: PrivateKey

Implementation of

proto.PrivateKeyBundleV1.identityKey

Defined in

crypto/PrivateKeyBundle.ts:15


preKeys

preKeys: PrivateKey[]

Implementation of

proto.PrivateKeyBundleV1.preKeys

Defined in

crypto/PrivateKeyBundle.ts:16

Methods

addPreKey

addPreKey(): Promise<void>

Returns

Promise<void>

Defined in

crypto/PrivateKeyBundle.ts:50


encode

encode(): Uint8Array

Returns

Uint8Array

Defined in

crypto/PrivateKeyBundle.ts:142


findPreKey

findPreKey(which): PrivateKey

Parameters

NameType
whichPublicKey

Returns

PrivateKey

Defined in

crypto/PrivateKeyBundle.ts:41


getCurrentPreKey

getCurrentPreKey(): PrivateKey

Returns

PrivateKey

Defined in

crypto/PrivateKeyBundle.ts:36


getPublicKeyBundle

getPublicKeyBundle(): PublicKeyBundle

Returns

PublicKeyBundle

Defined in

crypto/PrivateKeyBundle.ts:57


sharedSecret

sharedSecret(peer, myPreKey, isRecipient): Promise<Uint8Array>

Parameters

NameType
peerPublicKeyBundle
myPreKeyPublicKey
isRecipientboolean

Returns

Promise<Uint8Array>

Defined in

crypto/PrivateKeyBundle.ts:69


toEncryptedBytes

toEncryptedBytes(wallet): Promise<Uint8Array>

Parameters

NameType
walletSigner

Returns

Promise<Uint8Array>

Defined in

crypto/PrivateKeyBundle.ts:115


decode

Static decode(bytes): PrivateKeyBundle

Parameters

NameType
bytesUint8Array

Returns

PrivateKeyBundle

Defined in

crypto/PrivateKeyBundle.ts:146


fromEncryptedBytes

Static fromEncryptedBytes(wallet, bytes): Promise<PrivateKeyBundle>

Parameters

NameType
walletSigner
bytesUint8Array

Returns

Promise<PrivateKeyBundle>

Defined in

crypto/PrivateKeyBundle.ts:158


generate

Static generate(wallet?): Promise<PrivateKeyBundle>

Parameters

NameType
wallet?Signer

Returns

Promise<PrivateKeyBundle>

Defined in

crypto/PrivateKeyBundle.ts:25


storageSigRequestText

Static storageSigRequestText(preKey): string

Parameters

NameType
preKeyUint8Array

Returns

string

Defined in

crypto/PrivateKeyBundle.ts:101