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

fix address format handling of tx summaries endpoint #411

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yushih
Copy link
Contributor

@yushih yushih commented Dec 21, 2022

Background:
Previously when I was implementing the API, I didn't get the input address handing correct. To be consistent with other APIs that take address (set) inputs, the supported address types should be:

  1. Byron addresses encoded in Base58
  2. Full Shelley addresses in bech32
  3. Stake key encoded in bech32, converted to hex string internally
  4. Stake key encoded in hex string
  5. Payment key hash encoded in bech32, converted to hex string internally

For a shelly address, if the client wants to match by full address (payment key hash and stake address), it should pass 2. If the client wants to match only the payment key hash and disregard the stake part, it should pass 5.

Type 1 & 2 should be matched against tx_out.address. Type 5 should be matched against tx_out.payment_cred (after the conversion to hex string).

This PR fixes handling of address type 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant