PrivateKeyBundleV2
Class: PrivateKeyBundleV2
Implements
PrivateKeyBundleV2
Constructors
constructor
new PrivateKeyBundleV2(bundle)
Parameters
| Name | Type |
|---|---|
bundle | PrivateKeyBundleV2 |
Defined in
Properties
identityKey
identityKey: SignedPrivateKey
Implementation of
proto.PrivateKeyBundleV2.identityKey
Defined in
preKeys
preKeys: SignedPrivateKey[]
Implementation of
proto.PrivateKeyBundleV2.preKeys
Defined in
version
version: number = 2
Defined in
Methods
addPreKey
addPreKey(): Promise<void>
Returns
Promise<void>
Defined in
encode
encode(): Uint8Array
Returns
Uint8Array
Defined in
crypto/PrivateKeyBundle.ts:104
equals
equals(other): boolean
Parameters
| Name | Type |
|---|---|
other | PrivateKeyBundleV2 |
Returns
boolean
Defined in
crypto/PrivateKeyBundle.ts:108
findPreKey
findPreKey(which): SignedPrivateKey
Parameters
| Name | Type |
|---|---|
which | SignedPublicKey |
Returns
SignedPrivateKey
Defined in
getCurrentPreKey
getCurrentPreKey(): SignedPrivateKey
Returns
SignedPrivateKey
Defined in
getPublicKeyBundle
getPublicKeyBundle(): SignedPublicKeyBundle
Returns
Defined in
sharedSecret
sharedSecret(peer, myPreKey, isRecipient): Promise<Uint8Array>
Parameters
| Name | Type |
|---|---|
peer | SignedPublicKeyBundle |
myPreKey | SignedPublicKey |
isRecipient | boolean |
Returns
Promise<Uint8Array>
Defined in
fromLegacyBundle
Static fromLegacyBundle(bundle): PrivateKeyBundleV2
Parameters
| Name | Type |
|---|---|
bundle | PrivateKeyBundleV1 |
Returns
Defined in
crypto/PrivateKeyBundle.ts:120
generate
Static generate(wallet): Promise<PrivateKeyBundleV2>
Parameters
| Name | Type |
|---|---|
wallet | Signer |
Returns
Promise<PrivateKeyBundleV2>