refactor(types): extract security + config + tx-core type clusters - #840
Draft
graciangabriel8 wants to merge 4 commits into
Draft
refactor(types): extract security + config + tx-core type clusters#840graciangabriel8 wants to merge 4 commits into
graciangabriel8 wants to merge 4 commits into
Conversation
Part of #717. Cuts security (PrivilegedRole/SecurityReport, 2 exports) and config (UserConfig, 1 export) byte-identically into src/types/security.ts and src/types/config.ts. Also creates src/types/tx.ts with the tx-core subset (DecodedArg, HumanDecode, TxVerification) of the plan's 8-export `tx` cluster — these three are shared verification/decode building blocks referenced by every chain's unsigned-tx type (UnsignedTronTx.verification, UnsignedSolanaTx.verification, UnsignedTx.verification all point at TxVerification), so they extract first per the acyclicity rule; the remaining tx-Tron/Solana/EVM/BTC-LTC slices land in later PRs appended to this same file. index.ts re-exports all three new files via export * so all existing import specifiers stay byte-identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rity-config-txcore
Drops RpcProvider and the devices.js import (their only referencer, UserConfig, already left index.ts on this branch) and adds TxVerification from ./tx.js (still referenced by the inline UnsignedTronTx/UnsignedSolanaTx/UnsignedTx declarations).
…rity-config-txcore
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.
Cuts
security(PrivilegedRole/SecurityReport, 2 exports) andconfig(UserConfig, 1 export) byte-identically intosrc/types/security.tsandsrc/types/config.ts. Also createssrc/types/tx.tswith the tx-core subset (DecodedArg,HumanDecode,TxVerification) of the plan's 8-exporttxcluster.Placement judgment: the plan splits
tx's 8 exports across 5 sub-PRs (core here, Tron/Solana/EVM/BTC-LTC later, all appended to this sametx.ts).TxVerificationis referenced byUnsignedTronTx,UnsignedSolanaTx, andUnsignedTx(each has averification?: TxVerificationfield), so per the acyclicity rule it must extract before all three — hence "tx-core" here is the 3 shared verification/decode types, not the file's first 3 tx-prefixed exports in original line order.Part of #717
Note:
export * from "./x.js"re-exports but does not locally bind names, so index.ts also carriesimport type { ... } from "./x.js"for every moved name its own remaining declarations still reference by bare identifier — scope-plumbing that vanishes once the last domain leaves the file.