WalletProtobufSerializer serializer = new WalletProtobufSerializer();
return serializer.walletToProto(this);
}
public static PledgingWallet deserialize(org.bitcoinj.wallet.Protos.Wallet proto) throws UnreadableWalletException {
WalletProtobufSerializer serializer = new WalletProtobufSerializer(PledgingWallet::new);
NetworkParameters params = NetworkParameters.fromID(proto.getNetworkIdentifier());
return (PledgingWallet) serializer.readWallet(params, new WalletExtension[]{new PledgeStorage(null)}, proto);
}