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

added support for standard cosmos chains (atom,kujira,dydx,terra) #29

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

SxMShaDoW
Copy link

@SxMShaDoW SxMShaDoW commented Nov 10, 2024

Features for #26

Added support for:

  1. Atom
  2. Kujira
  3. Dydx
  4. Terra (LUNC/LUNA)

Fixed generation of address output for:

  1. Maya

Added p2wpkh to the WIF BTC address for making it easier for someone to understand how to import

@SxMShaDoW SxMShaDoW changed the title added support for GAIA (Atom) chain added support for GAIA (Atom) and Kujira chain Nov 10, 2024
@SxMShaDoW SxMShaDoW changed the title added support for GAIA (Atom) and Kujira chain added support for traditional cosmos chains (atom,kujira,dydx,kujira,terra) Nov 10, 2024
@SxMShaDoW SxMShaDoW changed the title added support for traditional cosmos chains (atom,kujira,dydx,kujira,terra) added support for standard cosmos chains (atom,kujira,dydx,kujira,terra) Nov 10, 2024
@SxMShaDoW SxMShaDoW changed the title added support for standard cosmos chains (atom,kujira,dydx,kujira,terra) added support for standard cosmos chains (atom,kujira,dydx,terra) Nov 10, 2024
@SxMShaDoW SxMShaDoW marked this pull request as ready for review November 10, 2024 19:10
@SxMShaDoW
Copy link
Author

@johnnyluo

  • added support for traditional cosmos chains. There are def places we can refactor this - but kept it following the current implementation for simplicity.

@SxMShaDoW
Copy link
Author

SxMShaDoW commented Nov 10, 2024

I couldn't figure out how to get the keys from the EdDSA private key that gets generated from the binanceTss.Edwards() in order to generate valid TON / Solana / Polkadot, Sui addresses (to verify that the private key was correct)

If you want to provide an example in the code for one of them - I can probably figure out the other ones.

For example, is this part of the recovery code still valid - it seems valid from the binance library but no matter what I do with that tssPrivateKey I can't generate the SOL address that I am testing for?

	curve := binanceTss.Edwards()
	tssPrivateKey, err := vssShares[:threshold].ReConstruct(curve)
	if err != nil {
		return err
	}

I was then trying to do something like this:

seed, err := hex.DecodeString(tssPrivateKey) //trying different formats for tssPrivateKey
eddsaPrivKey := ed25519.NewKeyFromSeed(seed)
pubKeyBytes := eddsaPrivKey.Public().(ed25519.PublicKey)
solanaAddress := base58.Encode(pubKeyBytes)

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