Bitcoinj
Bitcoinj 如何使用 bitcoinj 創建多重簽名地址
有人可以幫助我逐步列出如何使用 bitcoinj api 創建多簽名 2-of-3 交易嗎?
ECKey keyA = <something> ECKey keyB = <something> ECKey keyC = <something> Transaction aTransaction = new Transaction(params); List<ECKey> keyList = ImmutableList.of(keyA, keyB, keyC); Script script = ScriptBuilder.createMultiSigOutputScript(2, keyList); //2 of 3 multisig Coin value = Coin.valueOf(0,10); // 0.1 btc aTransaction.addOutput(value, script); Wallet.SendRequest request = Wallet.SendRequest.forTx(aTransaction.addOutput); wallet.completeTx(request); // fill in coins
見麥克文件