monero-java
monero-java copied to clipboard
XMR 两个子地址之间的转账 在交易中如何解析出来??
这笔交易是一笔出金,接受地址和金额有办法解析出来么?谢谢!
I'm sorry I'm not able to understand well.
After using createTx()
to withdraw funds, you can get destination addresses and amounts like this:
MoneroTxWallet tx = wallet.createTx(...);
for (MoneroDestination : tx.getOutgoingTransfer().getDestinations()) { // destinations only available from local wallet data
String address = destination.getAddress();
BigInteger amount = destination.getAmount();
}
Note that destination amount and addresses are only available from local wallet data and are not recoverable from the blockchain.
I'm sorry I'm not able to understand well.
After using
createTx()
to withdraw funds, you can get destination addresses and amounts like this:MoneroTxWallet tx = wallet.createTx(...); for (MoneroDestination : tx.getOutgoingTransfer().getDestinations()) { // destinations only available from local wallet data String address = destination.getAddress(); BigInteger amount = destination.getAmount(); }
Note that destination amount and addresses are only available from local wallet data and are not recoverable from the blockchain.
在转出的时候没有解析该信息,即该交易广播上链之后,对于扫描区块交易的时候,就是扫描哪些是入金到平台钱包地址的,如何可以解析接收地址和金额。
另外一个问题:转出时 如果需要找零,那找零地址是每次使用一个新地址 还是找零到固定地址??
The destination addresses and amounts are not recoverable from scanning the blockchain. This information is only stored with your local wallet file where you sent the transaction.
Change always goes to your wallet's primary address (account 0, subaddress 0). On the blockchain, this appears as a unique address since Monero always uses one-time addresses on the blockchain.
The destination addresses and amounts are not recoverable from scanning the blockchain. This information is only stored with your local wallet file where you sent the transaction.
Change always goes to your wallet's primary address (account 0, subaddress 0). On the blockchain, this appears as a unique address since Monero always uses one-time addresses on the blockchain.
https://web.getmonero.org/resources/moneropedia/change.html
I found a document, but it's different from what you said
What is different from what I said? Change is always returned to the wallet's primary address.
Closing as stale.