Open devtrix opened 2 years ago
For #2 the CIP-30 spec that defines wallet-dApp communication on Cardano is potentially due to have minor changes so keep that in mind. You can use the cardano.signData(address, payload)
endpoint. It should return a verification key as well (since addresses on Cardano are key hashes so you can't use just an address to verify a signature but you can go the other way around and go from a key to an address). There's a description of this endpoint in the nami-wallet main readme at the root directory of this repo.
@rooooooooob You just stated the obvious here buddy. I saw that cardano.signData. What address and what payload? It would be helpful to have an example here since the documentation is not there. Plus, I cant believe Nami people arent even answering this simple question. Cheers!
@devtrix I mentioned it is defined in CIP-30 but the current specification is in slight flux (the PR cardano-foundation/CIPs#148 is already almost what nami does, further away from the in-master copy of CIP-30).
Any insight on how I can get the wallet address? BTW I am very, very new to the crypto world as it is and still learning my way around. I appreciate all the patience & guidance. Thank you.
@devtrix What are you wanting to do with it? The concept of "the address for a wallet" only makes sense for some wallet types. HD wallets for example will have many addresses associated with a wallet so which one is "the" address? That's why the data sign endpoint takes in an address as a parameter. Would you make an address out of the root pubkey hash? (I am not sure if most wallets would even recognize this or if they wouldn't find it when doing regular HD address discovery) Or pick an arbitrary one of the derived addresses? Or are you just looking for an arbitrary identifier regardless of it it's used as an address?
It's possible we will want to extend the CIP-30 API (it's still in draft status) as well.
@devtrix What are you wanting to do with it? The concept of "the address for a wallet" only makes sense for some wallet types. HD wallets for example will have many addresses associated with a wallet so which one is "the" address? That's why the data sign endpoint takes in an address as a parameter. Would you make an address out of the root pubkey hash? (I am not sure if most wallets would even recognize this or if they wouldn't find it when doing regular HD address discovery) Or pick an arbitrary one of the derived addresses? Or are you just looking for an arbitrary identifier regardless of it it's used as an address?
It's possible we will want to extend the CIP-30 API (it's still in draft status) as well.
I wanted to use it as a part of my client registration. I didnt want to use their name etc. For web 3.0 wallet integration. I dont care about HW wallets, just Nami and Yoroi.
@devtrix No, not HW (Hardware) wallet, but HD (Hierarchical Deterministic). All Yoroi wallets are HD wallets. I'm not sure about nami. It's a scheme that lets you generate many derived keys from a root passphrase in a secure (and potentially privacy-focused) way.
What if you just pick something like one of the reward addresses? I think for most(all or almost all?) wallets there will only be one and if they return multiple you could just pick the first one lexigraphically and when they go to sign in you just see if you recognize any of them? Or ask them which one they want to use in the case where they have multiple.
Hi, I have two questions here.