Skip to main content

PrivateKeyBundleV2

Class: PrivateKeyBundleV2

Implements

  • PrivateKeyBundleV2

Constructors

constructor

new PrivateKeyBundleV2(bundle)

Parameters

NameType
bundlePrivateKeyBundleV2

Defined in

crypto/PrivateKeyBundle.ts:17

Properties

identityKey

identityKey: SignedPrivateKey

Implementation of

proto.PrivateKeyBundleV2.identityKey

Defined in

crypto/PrivateKeyBundle.ts:13


preKeys

preKeys: SignedPrivateKey[]

Implementation of

proto.PrivateKeyBundleV2.preKeys

Defined in

crypto/PrivateKeyBundle.ts:14


version

version: number = 2

Defined in

crypto/PrivateKeyBundle.ts:15

Methods

addPreKey

addPreKey(): Promise<void>

Returns

Promise<void>

Defined in

crypto/PrivateKeyBundle.ts:54


encode

encode(): Uint8Array

Returns

Uint8Array

Defined in

crypto/PrivateKeyBundle.ts:104


equals

equals(other): boolean

Parameters

NameType
otherPrivateKeyBundleV2

Returns

boolean

Defined in

crypto/PrivateKeyBundle.ts:108


findPreKey

findPreKey(which): SignedPrivateKey

Parameters

NameType
whichSignedPublicKey

Returns

SignedPrivateKey

Defined in

crypto/PrivateKeyBundle.ts:45


getCurrentPreKey

getCurrentPreKey(): SignedPrivateKey

Returns

SignedPrivateKey

Defined in

crypto/PrivateKeyBundle.ts:40


getPublicKeyBundle

getPublicKeyBundle(): SignedPublicKeyBundle

Returns

SignedPublicKeyBundle

Defined in

crypto/PrivateKeyBundle.ts:60


sharedSecret

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

Parameters

NameType
peerSignedPublicKeyBundle
myPreKeySignedPublicKey
isRecipientboolean

Returns

Promise<Uint8Array>

Defined in

crypto/PrivateKeyBundle.ts:72


fromLegacyBundle

Static fromLegacyBundle(bundle): PrivateKeyBundleV2

Parameters

NameType
bundlePrivateKeyBundleV1

Returns

PrivateKeyBundleV2

Defined in

crypto/PrivateKeyBundle.ts:120


generate

Static generate(wallet): Promise<PrivateKeyBundleV2>

Parameters

NameType
walletSigner

Returns

Promise<PrivateKeyBundleV2>

Defined in

crypto/PrivateKeyBundle.ts:27