Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listening-for-payments-cli doesn't explain how to distinguish customers #302

Open
benapetr opened this issue Sep 16, 2021 · 5 comments
Open
Labels
integrate Cardano Integrate Cardano category

Comments

@benapetr
Copy link

@katomm I read your https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-cli but there is major issue in that flow - you can't distinguish between individual customers in that model, you can only track what is current balance of that one address. This would work if you only ever had 1 customer.

How would the proper flow look? Each customer has dedicated address? If yes, then how would you generate a secondary address for the same wallet? And how would you send ADA out of it using cardano-cli? I was experimenting with that but ultimately failed every time - https://forum.cardano.org/t/how-to-properly-sign-transaction-from-non-base-address/74462

It would be of great help if that page could be expanded to cover a fully functional model instead of this trivial example that assumes only 1 customer ever. Thanks!

@katomm
Copy link
Member

katomm commented Sep 16, 2021

Hello @benapetr. Yes, you need to create one new address for every order (not customers) otherwise you were right you can not distinguish the transactions.

There are different ways how to generate many addresses and this should be definitely shown in the portal as well.

@rdlrt
Copy link
Collaborator

rdlrt commented Sep 16, 2021

I think we can be a bit careful about amount of details on how HD wallets work, mixing with this page (maybe a seperate page can be linked at top about wallet basics on BIP32/39/44 schemes for actual example on derivations itself using cardano-addresses as an example?).

@benapetr
Copy link
Author

benapetr commented Sep 16, 2021

yes I don't mind if it's a separate page, but I think this should be definitely covered, because right now for someone who never implemented anything similar, it's not easy to understand how to implement fully operational "merchant" system, where you can track individual orders and manage them all under one wallet with multiple addresses.

For example one thing that is extremely unclear to me right now is how to actually USE the secondary addresses, when I follow the cardano-cli commands in example and sign the transaction that has --tx-in UTXO from secondary address, I get

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

so it seems that secondary addresses need dedicated signing keys? even if they belong to same wallet? if yes, how to generate them?

@Pic2490
Copy link

Pic2490 commented Sep 16, 2021

I have the same problem

@rdlrt
Copy link
Collaborator

rdlrt commented Sep 17, 2021

For example one thing that is extremely unclear to me right now is how to actually USE the secondary addresses, when I follow the cardano-cli commands in example and sign the transaction that has --tx-in UTXO from secondary address, I get

For starters , what might be helpful is checking out HD Wallets and how derivation works:

image

The Root key above can be derived from cardano-addresses CLI (see README ).


Coming to the point, I see that there was already a place holder link as a note, the destination page needs to cover the above , so only the destination page needs to be created 🙂 .

image

We would love to see community to step up and compile the instructions to be included using above, rather than us depending on same two-three individuals creating contents (as 90% of get-started pages is initiated by Tommy/Clark) - before others add corrections/updates , if we really want to make the concept of developer-portal fully successful.

@katomm katomm added the integrate Cardano Integrate Cardano category label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrate Cardano Integrate Cardano category
Projects
None yet
Development

No branches or pull requests

4 participants