Chain registry, dynamic EVM/UTXO, EIP-1559 and EIP-712#38
Merged
Conversation
Introduce ChainRegistry with EvmChainRegistration and UtxoChainRegistration plus CustomBitcoinStyleNetParams and ChainCatalogLoader for JSON bulk registration. ChainType.validate and WalletManager mnemonic import routes use the registry; AddressCreatorManager resolves registered EVM and UTXO chains. Identity derives registered EVM/UTXO wallets from default paths. Add Eip1559Transaction (type-2 raw tx), Eip712Hasher and TypedDataSigner, and EthereumSign.signDigest for reuse. Document global chain strategy in README and add unit tests for registry, BIP44 helpers, EIP-1559, and EIP-712. Co-authored-by: Galaxy <GalaxySciTech@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change implements runtime chain registration for EVM and bitcoin-style UTXO networks, unifies chain validation and mnemonic import routing through
ChainRegistry, extendsAddressCreatorManagerandIdentityderivation for registered chains, and adds EIP-1559 type-2 transaction signing plus EIP-712 typed-data hashing and signing.Details
org.consenlabs.tokencore.wallet.chain):EvmChainRegistration,UtxoChainRegistration,ChainFamily, thread-safe singleton registry.family: EVM|UTXO,chainId,slip44or explicit paths; UTXO rows require address/BIP32 header fields).NetworkParametersfor registered UTXO chains (genesis/difficulty scaffolding cloned from mainnet or testnet3 template).findWalletByPrivateKeyvalidates private key for all registered EVM types.0x02 || rlpsigning; legacyEthereumTransactionunchanged.(chainType, address)wallet keying.Notes
NetworkParametersreuse bitcoin mainnet/testnet3 genesis scaffolding for library compatibility; callers supply real address and BIP32 magic bytes for their chain.