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

Improve http observer/get_tss_address #2638

Open
swift1337 opened this issue Aug 6, 2024 · 0 comments
Open

Improve http observer/get_tss_address #2638

swift1337 opened this issue Aug 6, 2024 · 0 comments
Labels
good first issue Good for newcomers zetacore Issues related to ZetaCore

Comments

@swift1337
Copy link
Contributor

GET $base/observer/get_tss_address/{btcChainId}

While exploring zeta RPCs, I noticed we have a weird way of getting TSS addresses via observer keeper.

func (k Keeper) GetTssAddress(

btc_chain_id=8332
curl -s "https://zetachain.blockpi.network/lcd/v1/public/zeta-chain/observer/get_tss_address/$btc_chain_id" | jq
{
  "eth": "0x70e967acFcC17c3941E87562161406d41676FD83",
  "btc": "bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y"
}

Proposed changes

  • Caller needs to specify BTC chain id — this should be done automatically by the node
  • We need to output ALL chains in a list, not only chain types
GET $base/observer/get_tss_addresses
{
  "chains": [
    {
      "id": "1",
      "tss": "0x70e967acFcC17c3941E87562161406d41676FD83"
    },
    {
      "id": "56",
      "tss": "0x70e967acFcC17c3941E87562161406d41676FD83"
    },
    {
      "id": "8332",
      "tss": "bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y"
    },
    // ...
  ]
}
@swift1337 swift1337 added good first issue Good for newcomers zetacore Issues related to ZetaCore labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers zetacore Issues related to ZetaCore
Projects
None yet
Development

No branches or pull requests

1 participant