How to properly sign transaction from non-base address?

I extracted wallet keys using cardano-address binary and wallet recovery phrase, that way I got base address of a wallet and couple of private signing keys, such as payment.skey and stake.skey, now I was trying to rebalance the UTXOs in the wallet by transferring some UTXO on non-base address to base address, but I keep getting:

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash "0dff37ed19839204f7a97c06d5ca7389de8b07fd3134f4602e710bd8"]))))])

Do I need to generate some special skey to sign transactions from non-base addresses? What is wrong here? I signed this using:

cardano-cli transaction sign \
>  --tx-body-file tx.raw \
>  --signing-key-file payment.skey \
>  --signing-key-file stake.skey \
>  $CLI_NET \
>  --out-file tx.signed

this is how I created the transaction

cardano-cli transaction build-raw \
 --tx-in ba7f6a4df5cfd1441c17fad2e13151836ab4dffd399f96d2de8ccfb8aec9c2e8#0 \
 --tx-out addr_test1qrkgk39056jpqwam5rgnf29ey8tquyyqw495t8ptdevvvuyf6ahuf3sz9zexykpa884wl0687hut78u3xg66fvnldt4qjxzxyw+17653114 \
 --invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee ${fee} \
 --out-file tx.raw

Note: this has nothing to do with pool operation, I am coding some tipping bot and this is part of it. I would like to understand which exact signature is missing here? Similar commands work with base address, but not with alternative addresses.

Follow step 18.9 from

that only works with base address as I already mentioned, I am looking for a way to send from secondary address

basically what I am doing is pretty much same as in this example: Listening for ADA payments using cardano-cli | Cardano Developer Portal except that documentation is never going to work in practice, as you need to distinguish “customers” from each other, for that reason I am generating non-base addresses for each “customer” so that I can track how much each of them sent. But then I am “coalescing” the UTXOs into one huge on the base address, and that’s where I get the problems, because the payment.skey doesn’t work for non-base addresses it seems.

Perhaps an example of fully operational payment model would be great.

1 Like