The Cardano dApp-Wallet Web Bridge exposes an api.getRewardAddresses() function. This resolves to an array of stake keys, but I have only seen it contain one stake key in practice.

I'm developing a web app and want to store information about users' owned NFTs in a database. Can I use the first element in the stake keys/reward addresses array to identify the user, or should I show a dialogue window that allows the user to choose one? I am not aware of how most sites typically handle this.

1 Answer 1


The reason for the return type to be an array is CIP-18 (while it is not implemented yet, it is already taken into account in the web wallet bridge specification CIP-30).

So currently there should not be more than one stake key returned by api.getRewardAddresses().

However: Have a look at the mangled-addresses tag to find some more info about possible issues with looking at the stake key to identify ownership of NFTs. In short: Just because a wallet controls an address doesn't mean that it is the owner of the stake key part of the address.

  • Thanks for the help!
    – 0x6f6b
    Jul 12, 2023 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.