本文整理了Java中org.bitcoinj.wallet.Wallet.currentReceiveKey()
方法的一些代码示例,展示了Wallet.currentReceiveKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wallet.currentReceiveKey()
方法的具体详情如下:
包路径:org.bitcoinj.wallet.Wallet
类名称:Wallet
方法名:currentReceiveKey
[英]An alias for calling #currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose) with org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS as the parameter.
[中]用org调用#currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)的别名。比特币。钱包钥匙链。KeyPurpose#接收#资金作为参数。
代码示例来源:origin: HashEngineering/dashj
private static void currentReceiveAddr() {
ECKey key = wallet.currentReceiveKey();
System.out.println(key.toAddress(params) + " " + key);
}
代码示例来源:origin: HashEngineering/dashj
Address sendToAddress = kit.wallet().currentReceiveKey().toAddress(params);
System.out.println("Send coins to: " + sendToAddress);
System.out.println("Waiting for coins to arrive. Press Ctrl-C to quit.");
代码示例来源:origin: greenaddress/GreenBits
public void setUp() throws Exception {
BriefLogFormatter.init();
Context.propagate(new Context(PARAMS, 100, Coin.ZERO, false));
wallet = new Wallet(PARAMS);
myKey = wallet.currentReceiveKey();
myAddress = myKey.toAddress(PARAMS);
blockStore = new MemoryBlockStore(PARAMS);
chain = new BlockChain(PARAMS, wallet, blockStore);
}
代码示例来源:origin: greenaddress/GreenBits
@Test
public void receiveCoins() throws Exception {
int height = 1;
// Quick check that we can actually receive coins.
Transaction tx1 = createFakeTx(PARAMS,
COIN,
wallet.currentReceiveKey().toAddress(PARAMS));
Block b1 = createFakeBlock(blockStore, height, tx1).block;
chain.add(b1);
assertTrue(wallet.getBalance().signum() > 0);
}
代码示例来源:origin: greenaddress/GreenBits
wallet.currentReceiveKey().toAddress(PARAMS));
TransactionOutput prevOut = new TransactionOutput(PARAMS, prevTx, COIN, wallet.currentReceiveKey().toAddress(PARAMS));
prevTx.addOutput(prevOut);
代码示例来源:origin: greenaddress/GreenBits
@Before
public void setUp() throws Exception {
BriefLogFormatter.initVerbose();
Context.propagate(new Context(testNet, 100, Coin.ZERO, false));
testNetChain = new BlockChain(testNet, new Wallet(testNet), new MemoryBlockStore(testNet));
Context.propagate(new Context(PARAMS, 100, Coin.ZERO, false));
wallet = new Wallet(PARAMS) {
@Override
public void receiveFromBlock(Transaction tx, StoredBlock block, BlockChain.NewBlockType blockType,
int relativityOffset) throws VerificationException {
super.receiveFromBlock(tx, block, blockType, relativityOffset);
BlockChainTest.this.block[0] = block;
if (isTransactionRelevant(tx) && tx.isCoinBase()) {
BlockChainTest.this.coinbaseTransaction = tx;
}
}
};
wallet.freshReceiveKey();
resetBlockStore();
chain = new BlockChain(PARAMS, wallet, blockStore);
coinbaseTo = wallet.currentReceiveKey().toAddress(PARAMS);
}
代码示例来源:origin: greenaddress/GreenBits
final ECKey key = wallet.currentReceiveKey();
代码示例来源:origin: greenaddress/GreenBits
Block b1 = PARAMS.getGenesisBlock().createNextBlockWithCoinbase(Block.BLOCK_VERSION_GENESIS, wallet.currentReceiveKey().getPubKey(), height++);
chain.add(b1);
内容来源于网络,如有侵权,请联系作者删除!