CompatPrivateKeyBundle extension
This enhances the xmtp.PrivateKeyBundle to simplify access to the "wallet", "identity" and "preKeys".
This extension handles the compatibility logic required to support both V1 and V2 of PrivateKeyBundle.
TODO: roll this into a "PrivateKeyBundle" helper class
Properties
Methods
-
getPre(
EthereumAddress address) → EthPrivateKey -
Get the preKey with the specified
address
. Throws an error when it cannot be found. -
toV1(
) → PrivateKeyBundleV1 - Create the v1 bundle for these keys. Note: v1 bundles sign their identity key with type .ecdsaCompact
-
toV2(
) → PrivateKeyBundleV2 - Create the v2 bundle for these keys. Note: v2 bundles sign their identity key with type .walletEcdsaCompact