public interface WalletExtension
An object implementing this interface can be added to a Wallet
and provide arbitrary byte arrays that will
be serialized alongside the wallet. Extensions can be mandatory, in which case applications that don't know how to
read the given data will refuse to load the wallet at all. Extensions identify themselves with a string ID that
should use a Java-style reverse DNS identifier to avoid being mixed up with other kinds of extension. To use an
extension, add an object that implements this interface to the wallet using Wallet.addExtension(WalletExtension)
before you load it (to read existing data) and ensure it's present when the wallet is save (to write the data).
Note that extensions are singletons - you cannot add two objects that provide the same ID to the same wallet.
Modifier and Type | Method and Description |
---|---|
void |
deserializeWalletExtension(Wallet containingWallet,
byte[] data)
Loads the contents of this object from the wallet.
|
String |
getWalletExtensionID()
Returns a Java package/class style name used to disambiguate this extension from others.
|
boolean |
isWalletExtensionMandatory()
If this returns true, the mandatory flag is set when the wallet is serialized and attempts to load it without
the extension being in the wallet will throw an exception.
|
byte[] |
serializeWalletExtension()
Returns bytes that will be saved in the wallet.
|
String getWalletExtensionID()
boolean isWalletExtensionMandatory()
byte[] serializeWalletExtension()
Copyright © 2016. All rights reserved.