Implement the following java class for dealing with Bitcoin ( the implementation should be compatible with Java7 and the only external library on top of JVM allowed is BitcoinJ) a example for how to implement the first two clases in details can be found here : http://boye1024.blogspot.com/2018/07/how-to-use-bitcoinj-to-implement.html
A test using this two classes filing a transaction to the BTC test net and spending the output of it should be provided together with the three classes
public class MultisigTransaction { // generate multi sig locking script 2 of 3 , parametres (in/out) in HEX (string) public String genLockStript(String pubKey1, String pubKey2, String pubKey3)
// generate unlocking multi sig script - with only 2 provided private keys , parameters (in/out) in HEX (string) public String genUnlockingScript(String privKey1, String privKey2)
} public class KeyPair { // generate one priv/pub key pair in HEX ( string) - ret [0] is private, ret[0] is private public String[] genKeyPair() { return null;}; } public interface DifficultyListener { // will receive callback whenever the difficulty changes public void Update(double percent); } public class Difficulty { // return millis from 01.01.1970 of teh exact time whne the difficulty will change next public long nextDificultyChange();
// register to receive callbacks when difficulty changes ( with teh exact difficulty in %) // multiple listeners can be registered public void register(DifficultyListener listener);
// unregister to receive callbacks public void unregister(DifficultyListener listener); }