PrivateKeyBundle
Class: PrivateKeyBundle
Implements
PrivateKeyBundleV1
Constructors
constructor
• new PrivateKeyBundle(identityKey
, preKeys?
)
Parameters
Name | Type |
---|---|
identityKey | PrivateKey |
preKeys? | PrivateKey [] |
Defined in
Properties
identityKey
• identityKey: PrivateKey
Implementation of
proto.PrivateKeyBundleV1.identityKey
Defined in
preKeys
• preKeys: PrivateKey
[]
Implementation of
proto.PrivateKeyBundleV1.preKeys
Defined in
Methods
addPreKey
▸ addPreKey(): Promise
<void
>
Returns
Promise
<void
>
Defined in
encode
▸ encode(): Uint8Array
Returns
Uint8Array
Defined in
crypto/PrivateKeyBundle.ts:142
findPreKey
▸ findPreKey(which
): PrivateKey
Parameters
Name | Type |
---|---|
which | PublicKey |
Returns
Defined in
getCurrentPreKey
▸ getCurrentPreKey(): PrivateKey
Returns
Defined in
getPublicKeyBundle
▸ getPublicKeyBundle(): PublicKeyBundle
Returns
Defined in
sharedSecret
▸ sharedSecret(peer
, myPreKey
, isRecipient
): Promise
<Uint8Array
>
Parameters
Name | Type |
---|---|
peer | PublicKeyBundle |
myPreKey | PublicKey |
isRecipient | boolean |
Returns
Promise
<Uint8Array
>
Defined in
toEncryptedBytes
▸ toEncryptedBytes(wallet
): Promise
<Uint8Array
>
Parameters
Name | Type |
---|---|
wallet | Signer |
Returns
Promise
<Uint8Array
>
Defined in
crypto/PrivateKeyBundle.ts:115
decode
▸ Static
decode(bytes
): PrivateKeyBundle
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Defined in
crypto/PrivateKeyBundle.ts:146
fromEncryptedBytes
▸ Static
fromEncryptedBytes(wallet
, bytes
): Promise
<PrivateKeyBundle
>
Parameters
Name | Type |
---|---|
wallet | Signer |
bytes | Uint8Array |
Returns
Promise
<PrivateKeyBundle
>
Defined in
crypto/PrivateKeyBundle.ts:158
generate
▸ Static
generate(wallet?
): Promise
<PrivateKeyBundle
>
Parameters
Name | Type |
---|---|
wallet? | Signer |
Returns
Promise
<PrivateKeyBundle
>
Defined in
storageSigRequestText
▸ Static
storageSigRequestText(preKey
): string
Parameters
Name | Type |
---|---|
preKey | Uint8Array |
Returns
string