Skip to content

Exodus-compatible Ed25519 import and on-chain transaction signing#317

Open
roccomuso wants to merge 3 commits into
ontio:masterfrom
roccomuso:feature/exodus-ed25519-import-and-signing
Open

Exodus-compatible Ed25519 import and on-chain transaction signing#317
roccomuso wants to merge 3 commits into
ontio:masterfrom
roccomuso:feature/exodus-ed25519-import-and-signing

Conversation

@roccomuso

@roccomuso roccomuso commented Mar 25, 2026

Copy link
Copy Markdown

Adds support for importing 64-character hex private keys produced by wallets that use BIP32 + Ed25519 on the same Ontology path as OWallet (e.g. Exodus), and fixes Ed25519 transaction signing so signatures match what the network verifies.

Problem

Import: Default import treats 64-hex keys as ECDSA P-256, so addresses did not match Exodus even when the derivation path matched on paper.
Decrypt: Encrypted keystores for EDDSA / Ed25519 must be wrapped with algorithm + parameters from the saved JSON; using only the ciphertext string breaks decryption.
Send: After import, txs failed with “transaction verify signature fail” because ontology-ts-sdk applied an extra SHA512 step before Ed25519 signing, while the chain verifies Ed25519 over the raw transaction hash (getSignContent() / double-SHA256 payload).

Test

  1. Import a known Exodus 64-hex key with the new option enabled → address and balances match Exodus.
  2. Send ONT / ONG (and an OEP-4 if you use one) → tx confirms; no signature error.
  3. Regression: create/import a normal ECDSA wallet → send still works.
image

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