<p>The address is an encoding of a hash of a public key. Different address means different public key, means different private key. A transaction such as Transaction 9f56ebbf115dc4a5d0370117b164800a74033b9e84b4fd0cefdd65cdbf5e7582 - Cardanoscan, which takes inputs from different addresses has to be signed by multiple private keys for all of the input addresses.</p>
<p>Wallet apps do that automatically. They can derive the private keys by the process described, e.g., in Address Derivation – Cardano Wallet.
It doesn’t matter if the addresses are staked or not (“enterprise”) for this.</p>
<p>If that can be done with this (quite strange) Java API, I don’t know. It seems their transaction builder assumes that there is only one “sender” for each transaction.</p>
<p>In that issue, you mention that the proposed solution with selecting another index in the Account constructor did not work.</p>
<p>Did you choose the index for the address, where the asset resides? It’s the last component of the m/1852’/… derivation path shown to you by Eternl.</p>
<p>According to this, I solve it.</p>
<p>DerivationPath build = DerivationPath.builder()
.purpose(new Segment(1852, true))
.coinType(new Segment(1815, true))
.account(new Segment(0, true))
.role(new Segment(1, false))
.index(new Segment(2, false))
.build();</p>
<p>Not only need to modify (index), but also need to modify (role)</p>
<p>address: m/1852’/1815’/0’/1/2</p>

CC BY-SA 4.0
2022-04-24T01:26:08.193Z
2022-04-24T01:26:08.193Z
zjavax
<p>I am currently learning about wallet sending and now I have a question.
One mnemonic corresponds to many addresses, and one address has many utxo</p>
<p>wallet: address1(baseaddr), address2(asset1)</p>
<p>What I restore by mnemonic is address1, but I want to send asset1</p>
<p><a href="https://github.com/bloxbean/cardano-client-lib/issues/106" rel="nofollow noreferrer">https://github.com/bloxbean/cardano-client-lib/issues/106</a></p>

<java>
The baseaddress I get based on the mnemonic doesn't have the utxo I want (cardano-client-lib)
# The baseaddress I get based on the mnemonic doesn't have the utxo I want (cardano-client-lib)

(Asked by: username_0 on 2022-04-23)

I am currently learning about wallet sending and now I have a question.
One mnemonic corresponds to many addresses, and one address has many utxo

wallet: address1(baseaddr), address2(asset1)

What I restore by mnemonic is address1, but I want to send asset1

<https://github.com/bloxbean/cardano-client-lib/issues/106>

**Tags:** java

---

## 1 answers

### Answer by username_0 on 2022-04-24. Score: 1

The address is an encoding of a hash of a public key. Different address means different public key, means different private key. A transaction such as Transaction 9f56ebbf115dc4a5d0370117b164800a74033b9e84b4fd0cefdd65cdbf5e7582 - Cardanoscan, which takes inputs from different addresses has to be signed by multiple private keys for all of the input addresses.

Wallet apps do that automatically. They can derive the private keys by the process described, e.g., in Address Derivation – Cardano Wallet.
It doesn’t matter if the addresses are staked or not (“enterprise”) for this.

If that can be done with this (quite strange) Java API, I don’t know. It seems their transaction builder assumes that there is only one “sender” for each transaction.

In that issue, you mention that the proposed solution with selecting another index in the Account constructor did not work.

Did you choose the index for the address, where the asset resides? It’s the last component of the m/1852’/… derivation path shown to you by Eternl.

According to this, I solve it.

DerivationPath build = DerivationPath.builder()
.purpose(new Segment(1852, true))
.coinType(new Segment(1815, true))
.account(new Segment(0, true))
.role(new Segment(1, false))
.index(new Segment(2, false))
.build();

Not only need to modify (index), but also need to modify (role)

address: m/1852’/1815’/0’/1/2


---

