refactor: reorganize flat modules into semantic concept folders#231
refactor: reorganize flat modules into semantic concept folders#231solidsnakedev merged 9 commits intomainfrom
Conversation
Move ~130 flat root-level files into 24 concept folders following Effect v4 conventions. Dissolve utils/ anti-pattern, merge datum/ into data/, extract certificate/ from governance/, add bytes/, numeric/, encoding/ folders. Delete dead code (Combinator.ts, FormatError.ts, NativeScriptsOLD.ts, Function.ts). Rename folders to camelCase (Assets→assets, Time→time, message-signing→messageSigning). All public API exports preserved. Build 6/6, tests 1092/1092.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR refactors the @evolution-sdk/evolution package by reorganizing a large flat module layout into semantic “concept folders” (Effect v4-style), while updating internal imports, tests, and subpath exports to match the new structure.
Changes:
- Reworked module layout into concept folders (
address/,transaction/,script/,value/, etc.) and added new barrelindex.tsfiles per folder. - Migrated hashing utilities from
utils/Hash.tsinto the owning domain modules (TransactionBody.toHash*,Redeemers.toScriptDataHash,AuxiliaryData.toHash,Redeemer.totalExUnits,Data.toDatumHash). - Updated tests, SDK internals, and
package.jsonexports to use the new concept-folder import paths.
Reviewed changes
Copilot reviewed 263 out of 301 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/evolution/test/provider/fixtures/evaluateTx.ts | Updates fixture imports to new concept-folder paths. |
| packages/evolution/test/provider/fixtures/constants.ts | Updates fixture imports to new concept-folder paths. |
| packages/evolution/test/provider/conformance.ts | Updates provider conformance test imports to new concept-folder paths. |
| packages/evolution/test/plutus/Value.test.ts | Updates test imports for Bytes/Text to new locations. |
| packages/evolution/test/plutus/OutputReference.test.ts | Updates test imports for Bytes to new location. |
| packages/evolution/test/plutus/Credential.test.ts | Updates test imports for Bytes to new location. |
| packages/evolution/test/plutus/CIP68Metadata.test.ts | Updates test imports for Data/Text to new locations. |
| packages/evolution/test/plutus/Address.test.ts | Updates test imports for Bytes to new location. |
| packages/evolution/test/Withdrawals.CML.test.ts | Updates Withdrawals import to staking/. |
| packages/evolution/test/WalletFromSeed.test.ts | Updates Address import to address/. |
| packages/evolution/test/VotingProcedures.individual.test.ts | Updates VotingProcedures import to governance/. |
| packages/evolution/test/VotingProcedures.CML.test.ts | Updates governance-related imports to new concept folders. |
| packages/evolution/test/UtilsHash.CML.test.ts | Repoints hash helpers to new to* APIs on domain modules. |
| packages/evolution/test/Unfrack.test.ts | Updates imports to address/ and assets/. |
| packages/evolution/test/UPLC.test.ts | Updates imports to data/, encoding/, script/. |
| packages/evolution/test/TxBuilder.UnfrackMinUTxO.test.ts | Updates imports to address/ and assets/. |
| packages/evolution/test/TxBuilder.UnfrackDrain.test.ts | Updates imports to address/, assets/, transaction/. |
| packages/evolution/test/TxBuilder.UnfrackChangeHandling.test.ts | Updates imports to address/, assets/, transaction/. |
| packages/evolution/test/TxBuilder.SlotConfig.test.ts | Updates imports to time/ and assets/. |
| packages/evolution/test/TxBuilder.SendAll.test.ts | Updates imports to address/, assets/, transaction/. |
| packages/evolution/test/TxBuilder.Reselection.test.ts | Updates imports to credential/ and transaction/ (fee validation move). |
| packages/evolution/test/TxBuilder.Mint.test.ts | Updates imports (Mint → value/, Text → primitives/, scripts → script/). |
| packages/evolution/test/TxBuilder.MinUtxoLovelace.test.ts | Updates imports to address/, assets/, script/. |
| packages/evolution/test/TxBuilder.InsufficientChange.test.ts | Updates imports to credential/ and transaction/. |
| packages/evolution/test/TxBuilder.FeeCalculation.test.ts | Updates assets import to new assets/ path. |
| packages/evolution/test/TxBuilder.EdgeCases.test.ts | Updates imports to address/, assets/, transaction/. |
| packages/evolution/test/TxBuilder.CoinSelectionFailures.test.ts | Updates imports to address/, assets/, transaction/. |
| packages/evolution/test/TransactionWitnessSet.CML.test.ts | Updates witness-related imports to credential/, script/, transaction/. |
| packages/evolution/test/TransactionWitnessSet-with-format.test.ts | Updates CBOR/Data and witness imports to encoding/, data/, credential/, transaction/. |
| packages/evolution/test/TransactionOutput.CML.test.ts | Updates import to transaction/TransactionOutput. |
| packages/evolution/test/TransactionMetadatum.CML.test.ts | Updates import to metadata/TransactionMetadatum. |
| packages/evolution/test/TransactionBody.CML.test.ts | Updates imports to transaction/, network/, value/. |
| packages/evolution/test/TransactionBody-with-format.test.ts | Updates import to transaction/TransactionBody. |
| packages/evolution/test/Transaction.CML.test.ts | Updates imports to encoding/CBOR and transaction/Transaction. |
| packages/evolution/test/Transaction-witness-add.test.ts | Updates imports to encoding/, data/, credential/, transaction/. |
| packages/evolution/test/Transaction-with-format.test.ts | Updates imports to encoding/, credential/, transaction/. |
| packages/evolution/test/Transaction-byte-splice.test.ts | Updates imports to encoding/, data/, transaction/. |
| packages/evolution/test/TSchema.test.ts | Updates imports to bytes/, data/. |
| packages/evolution/test/TSchema.recursive.test.ts | Updates imports to bytes/, data/. |
| packages/evolution/test/TSchema.equivalence.test.ts | Updates imports to bytes/, data/. |
| packages/evolution/test/TSchema.TaggedUnion.test.ts | Updates imports to data/. |
| packages/evolution/test/TSchema-flat-option.test.ts | Updates imports to bytes/, data/. |
| packages/evolution/test/SignData.test.ts | Updates imports to bytes/, credential/, messageSigning/. |
| packages/evolution/test/SignData.Parity.test.ts | Updates imports to bytes/, credential/, messageSigning/. |
| packages/evolution/test/SignData.CSL.test.ts | Updates imports to credential/ and messageSigning/. |
| packages/evolution/test/Script.CML.test.ts | Updates imports to script/. |
| packages/evolution/test/RewardAccount.CML.test.ts | Updates imports to address/, credential/, network/. |
| packages/evolution/test/Redeemer.CML.prop.test.ts | Updates imports to encoding/ and script/Redeemer. |
| packages/evolution/test/ProtocolParamUpdate.CML.test.ts | Updates import to network/ProtocolParamUpdate. |
| packages/evolution/test/ProposalProcedures.CML.test.ts | Updates imports to address/ and governance/. |
| packages/evolution/test/PrivateKey.CML.test.ts | Updates imports to credential/ (and ensures .js extensions). |
| packages/evolution/test/ParameterChangeAction.CML.test.ts | Updates imports to address/, governance/, network/, value/. |
| packages/evolution/test/NativeScripts.CML.test.ts | Updates import to script/NativeScripts. |
| packages/evolution/test/MultiAsset.equals.test.ts | Updates import to value/MultiAsset. |
| packages/evolution/test/Mint.CML.test.ts | Updates import to value/Mint. |
| packages/evolution/test/Metadata.CML.test.ts | Updates imports to metadata/. |
| packages/evolution/test/GovernanceAction.CML.test.ts | Updates imports to new concept folders for governance-related types. |
| packages/evolution/test/GovernanceAction.CML.prop.test.ts | Updates imports to governance/, network/, script/. |
| packages/evolution/test/Data.test.ts | Updates imports to bytes/ and data/. |
| packages/evolution/test/Data.prop.test.ts | Updates import to data/Data. |
| packages/evolution/test/Data.golden.test.ts | Updates import to data/Data. |
| packages/evolution/test/Credential.CML.test.ts | Updates import to credential/Credential. |
| packages/evolution/test/CoinSelection.test.ts | Updates imports to assets/ and transaction/UTxO types. |
| packages/evolution/test/CBOR.test.ts | Updates import to encoding/CBOR. |
| packages/evolution/test/CBOR.BoundedBytes.test.ts | Updates imports to bytes/, data/, encoding/. |
| packages/evolution/test/CBOR.Aiken.test.ts | Updates imports to bytes/, data/, encoding/, primitives/Text. |
| packages/evolution/test/CBOR-with-format.test.ts | Updates import to encoding/CBOR. |
| packages/evolution/test/BootstrapWitness.CML.test.ts | Updates imports to credential/, encoding/, transaction/. |
| packages/evolution/test/Bip32PrivateKey.CML.test.ts | Updates imports to credential/. |
| packages/evolution/test/AuxiliaryData.CML.test.ts | Updates import to metadata/AuxiliaryData. |
| packages/evolution/test/Address.test.ts | Updates import to address/AddressEras. |
| packages/evolution/src/value/index.ts | Adds value/ barrel exports. |
| packages/evolution/src/value/Value.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/value/PolicyId.ts | Repoints Bytes/Hash28 imports to new folders. |
| packages/evolution/src/value/MultiAsset.ts | Repoints Bytes/CBOR/Codec imports to new folders. |
| packages/evolution/src/value/Mint.ts | Repoints low-level imports to bytes/, encoding/, numeric/. |
| packages/evolution/src/value/AssetName.ts | Repoints Bytes/Bytes32 imports to bytes/. |
| packages/evolution/src/utils/Hash.ts | Removes legacy hash utility module (logic migrated to domain modules). |
| packages/evolution/src/uplc/UPLC.ts | Repoints imports to bytes/, data/, encoding/. |
| packages/evolution/src/transaction/index.ts | Adds transaction/ barrel exports. |
| packages/evolution/src/transaction/UTxO.ts | Repoints imports to address/, assets/, data/, numeric/, script/. |
| packages/evolution/src/transaction/TxOut.ts | Repoints imports to address/, assets/, data/, encoding/, script/. |
| packages/evolution/src/transaction/TransactionWitnessSet.ts | Repoints imports to credential/, data/, encoding/, script/. |
| packages/evolution/src/transaction/TransactionOutput.ts | Repoints imports to address/, data/, encoding/, script/, value/. |
| packages/evolution/src/transaction/TransactionInput.ts | Repoints imports to encoding/, numeric/. |
| packages/evolution/src/transaction/TransactionIndex.ts | Repoints import to numeric/. |
| packages/evolution/src/transaction/TransactionHash.ts | Repoints imports to bytes/. |
| packages/evolution/src/transaction/TransactionBody.ts | Adds toHash/toHashFromBytes; repoints imports to new concept folders. |
| packages/evolution/src/transaction/Transaction.ts | Repoints imports to encoding/ and metadata/. |
| packages/evolution/src/transaction/FeeValidation.ts | Repoints imports to the new transaction/ module paths. |
| packages/evolution/src/transaction/BootstrapWitness.ts | Repoints imports to bytes/, credential/, encoding/. |
| packages/evolution/src/staking/index.ts | Adds staking/ barrel exports. |
| packages/evolution/src/staking/Withdrawals.ts | Repoints imports to address/, encoding/, value/. |
| packages/evolution/src/staking/StakeReference.ts | Repoints imports to address/Pointer and credential/. |
| packages/evolution/src/staking/PoolParams.ts | Repoints imports to multiple concept folders. |
| packages/evolution/src/staking/PoolMetadata.ts | Repoints imports to bytes/, encoding/, relay/. |
| packages/evolution/src/staking/PoolKeyHash.ts | Repoints imports to bytes/ and primitives/Hash28. |
| packages/evolution/src/sdk/wallet/Wallet.ts | Repoints wallet core type imports to new folders. |
| packages/evolution/src/sdk/wallet/Derivation.ts | Repoints imports to address/ and credential/. |
| packages/evolution/src/sdk/provider/internal/Ogmios.ts | Repoints provider parsing types to new folders. |
| packages/evolution/src/sdk/provider/internal/MaestroEffect.ts | Repoints provider parsing types to new folders. |
| packages/evolution/src/sdk/provider/internal/Maestro.ts | Repoints provider parsing/types to new folders. |
| packages/evolution/src/sdk/provider/internal/KupmiosEffects.ts | Repoints provider parsing/types to new folders. |
| packages/evolution/src/sdk/provider/internal/KoiosEffect.ts | Repoints provider parsing/types to new folders. |
| packages/evolution/src/sdk/provider/internal/Koios.ts | Repoints provider parsing/types to new folders. |
| packages/evolution/src/sdk/provider/internal/BlockfrostEffect.ts | Repoints provider parsing/types to new folders. |
| packages/evolution/src/sdk/provider/internal/Blockfrost.ts | Repoints imports to assets/, script/, staking/. |
| packages/evolution/src/sdk/provider/Provider.ts | Repoints public provider type imports to new folders. |
| packages/evolution/src/sdk/client/internal/Wallets.ts | Switches runtime helper import to EffectRuntime and repoints types to new folders. |
| packages/evolution/src/sdk/client/internal/Signing.ts | Switches hashing to TransactionBody.toHash* and runtime helper path to EffectRuntime. |
| packages/evolution/src/sdk/client/internal/Client.ts | Repoints runtime helper import to EffectRuntime. |
| packages/evolution/src/sdk/client/Client.ts | Repoints UTxO type import to transaction/. |
| packages/evolution/src/sdk/client/Chain.ts | Repoints slot config imports to time/. |
| packages/evolution/src/sdk/builders/phases/Selection.ts | Repoints imports to assets/ and transaction/. |
| packages/evolution/src/sdk/builders/phases/FeeCalculation.ts | Repoints imports to assets/ and transaction/. |
| packages/evolution/src/sdk/builders/phases/Evaluation.ts | Repoints imports to bytes/, numeric/, script/, transaction/, value/. |
| packages/evolution/src/sdk/builders/phases/Collateral.ts | Repoints imports to assets/ and transaction/. |
| packages/evolution/src/sdk/builders/phases/ChangeCreation.ts | Repoints imports to address/, assets/, transaction/. |
| packages/evolution/src/sdk/builders/phases/Balance.ts | Repoints imports to assets/, certificate/, staking/. |
| packages/evolution/src/sdk/builders/operations/Vote.ts | Repoints imports to governance/. |
| packages/evolution/src/sdk/builders/operations/Stake.ts | Repoints imports to address/, bytes/, certificate/. |
| packages/evolution/src/sdk/builders/operations/SendAll.ts | Repoints CoreAddress type import to address/. |
| packages/evolution/src/sdk/builders/operations/ReadFrom.ts | Repoints import to transaction/UTxO. |
| packages/evolution/src/sdk/builders/operations/Propose.ts | Repoints imports to governance/. |
| packages/evolution/src/sdk/builders/operations/Pool.ts | Repoints imports to certificate/ and staking/. |
| packages/evolution/src/sdk/builders/operations/Pay.ts | Repoints assets import to assets/. |
| packages/evolution/src/sdk/builders/operations/Operations.ts | Repoints operation type imports to concept folders. |
| packages/evolution/src/sdk/builders/operations/Mint.ts | Repoints imports to assets/, numeric/, value/. |
| packages/evolution/src/sdk/builders/operations/Governance.ts | Repoints imports to bytes/ and certificate/. |
| packages/evolution/src/sdk/builders/operations/Collect.ts | Repoints imports to assets/, script/, transaction/. |
| packages/evolution/src/sdk/builders/operations/AttachMetadata.ts | Repoints metadata imports to metadata/. |
| packages/evolution/src/sdk/builders/operations/Attach.ts | Repoints script imports to script/. |
| packages/evolution/src/sdk/builders/internal/txBuilder.ts | Updates hashing calls to domain to* APIs; repoints many imports to new folders. |
| packages/evolution/src/sdk/builders/internal/state.ts | Repoints assets import to assets/. |
| packages/evolution/src/sdk/builders/internal/resolve.ts | Repoints core types to new folders. |
| packages/evolution/src/sdk/builders/internal/factory.ts | Repoints runtime helper import to EffectRuntime and scripts to script/. |
| packages/evolution/src/sdk/builders/internal/ctx.ts | Repoints builder context type imports to new folders. |
| packages/evolution/src/sdk/builders/internal/build.ts | Repoints transaction imports to transaction/. |
| packages/evolution/src/sdk/builders/Unfrack.ts | Repoints imports to address/, assets/, transaction/. |
| packages/evolution/src/sdk/builders/TransactionResult.ts | Repoints transaction type import to transaction/. |
| packages/evolution/src/sdk/builders/TransactionBuilder.ts | Updates doc examples and type imports to new script/ and transaction/ paths. |
| packages/evolution/src/sdk/builders/SubmitBuilderImpl.ts | Repoints transaction types to transaction/. |
| packages/evolution/src/sdk/builders/SubmitBuilder.ts | Repoints transaction hash/witness types to transaction/. |
| packages/evolution/src/sdk/builders/SignBuilderImpl.ts | Switches hashing to TransactionBody.toHash; repoints imports to new folders. |
| packages/evolution/src/sdk/builders/SignBuilder.ts | Repoints transaction types to transaction/. |
| packages/evolution/src/sdk/builders/RedeemerBuilder.ts | Repoints Data and UTxO type imports to data/ and transaction/. |
| packages/evolution/src/sdk/builders/CoinSelection.ts | Repoints imports to assets/ and transaction/. |
| packages/evolution/src/sdk/EvalRedeemer.ts | Repoints redeemer type import to script/. |
| packages/evolution/src/script/index.ts | Adds script/ barrel exports. |
| packages/evolution/src/script/ScriptRef.ts | Repoints imports to bytes/ and encoding/. |
| packages/evolution/src/script/ScriptHash.ts | Repoints Bytes/Hash28 imports to new folders. |
| packages/evolution/src/script/ScriptDataHash.ts | Repoints Bytes/Bytes32 imports to bytes/. |
| packages/evolution/src/script/Script.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/script/Redeemers.ts | Adds toScriptDataHash (migrated from utils/Hash.ts) and repoints core imports. |
| packages/evolution/src/script/Redeemer.ts | Adds totalExUnits and repoints imports to data/, encoding/, numeric/. |
| packages/evolution/src/script/PlutusV3.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/script/PlutusV2.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/script/PlutusV1.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/script/NativeScripts.ts | Repoints imports to bytes/, encoding/, primitives/. |
| packages/evolution/src/script/CostModel.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/relay/index.ts | Adds relay/ barrel exports. |
| packages/evolution/src/relay/Url.ts | Repoints Text128 import to primitives/. |
| packages/evolution/src/relay/SingleHostName.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/relay/SingleHostAddr.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/relay/Relay.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/relay/Port.ts | Repoints Numeric import to numeric/. |
| packages/evolution/src/relay/MultiHostName.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/relay/IPv6.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/relay/IPv4.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/relay/DnsName.ts | Repoints Text128 import to primitives/. |
| packages/evolution/src/primitives/index.ts | Adds primitives/ barrel exports. |
| packages/evolution/src/primitives/Hash28.ts | Repoints Bytes import to bytes/. |
| packages/evolution/src/plutus/Value.ts | Repoints imports to data/. |
| packages/evolution/src/plutus/OutputReference.ts | Repoints imports to data/. |
| packages/evolution/src/plutus/Credential.ts | Repoints imports to data/. |
| packages/evolution/src/plutus/CIP68Metadata.ts | Repoints imports to data/. |
| packages/evolution/src/plutus/Address.ts | Repoints imports to data/. |
| packages/evolution/src/numeric/index.ts | Adds numeric/ barrel exports. |
| packages/evolution/src/numeric/UnitInterval.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/network/index.ts | Adds network/ barrel exports. |
| packages/evolution/src/network/ProtocolVersion.ts | Repoints imports to encoding/ and numeric/. |
| packages/evolution/src/network/ProtocolParamUpdate.ts | Repoints imports to encoding/, numeric/, script/, value/. |
| packages/evolution/src/network/NonnegativeInterval.ts | Repoints imports to encoding/ and numeric/. |
| packages/evolution/src/network/EpochNo.ts | Repoints imports to encoding/ and numeric/. |
| packages/evolution/src/metadata/index.ts | Adds metadata/ barrel exports. |
| packages/evolution/src/metadata/TransactionMetadatum.ts | Repoints imports to encoding/ and numeric/. |
| packages/evolution/src/metadata/Metadata.ts | Repoints imports to encoding/ and numeric/. |
| packages/evolution/src/metadata/AuxiliaryDataHash.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/metadata/AuxiliaryData.ts | Adds toHash and repoints imports to encoding/ and script/. |
| packages/evolution/src/messageSigning/Utils.ts | Repoints Bytes import to bytes/. |
| packages/evolution/src/messageSigning/SignData.ts | Repoints imports to bytes/, credential/, and encoding/. |
| packages/evolution/src/messageSigning/Header.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/messageSigning/CoseSign1.ts | Repoints imports to bytes/, credential/, encoding/. |
| packages/evolution/src/messageSigning/CoseSign.ts | Repoints imports to bytes/, credential/, encoding/. |
| packages/evolution/src/messageSigning/CoseKey.ts | Repoints imports to bytes/, credential/, encoding/. |
| packages/evolution/src/index.ts | Updates root exports to new concept-folder module paths. |
| packages/evolution/src/governance/index.ts | Adds governance/ barrel exports. |
| packages/evolution/src/governance/VotingProcedures.ts | Repoints imports across credential/, encoding/, script/, staking/, transaction/. |
| packages/evolution/src/governance/ProposalProcedures.ts | Repoints imports to address/, encoding/, value/. |
| packages/evolution/src/governance/ProposalProcedure.ts | Repoints imports to address/, encoding/, value/. |
| packages/evolution/src/governance/GovernanceAction.ts | Repoints imports across new concept folders. |
| packages/evolution/src/governance/DRep.ts | Repoints imports to credential/, encoding/, script/. |
| packages/evolution/src/governance/Constitution.ts | Repoints imports to encoding/ and script/. |
| packages/evolution/src/governance/Anchor.ts | Repoints imports to bytes/, encoding/, relay/. |
| packages/evolution/src/encoding/index.ts | Adds encoding/ barrel exports. |
| packages/evolution/src/encoding/CBOR.ts | Repoints Bytes import to bytes/. |
| packages/evolution/src/data/index.ts | Adds data/ barrel exports. |
| packages/evolution/src/data/DatumOption.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/data/DatumHash.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/data/Data.ts | Introduces toDatumHash + deprecated alias; repoints imports to encoding/, numeric/. |
| packages/evolution/src/credential/index.ts | Adds credential/ barrel exports. |
| packages/evolution/src/credential/VKey.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/credential/PrivateKey.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/credential/KeyHash.ts | Repoints to bytes/ and primitives/Hash28. |
| packages/evolution/src/credential/Ed25519Signature.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/credential/Credential.ts | Repoints imports to encoding/ and script/. |
| packages/evolution/src/credential/CommitteeHotCredential.ts | Repoints ScriptHash import to script/. |
| packages/evolution/src/credential/CommitteeColdCredential.ts | Repoints ScriptHash import to script/. |
| packages/evolution/src/credential/Bip32PublicKey.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/credential/Bip32PrivateKey.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/certificate/index.ts | Adds certificate/ barrel exports. |
| packages/evolution/src/certificate/StakeCertificates.ts | Adds new stake certificate types under certificate/. |
| packages/evolution/src/certificate/PoolCertificates.ts | Adds new pool certificate types under certificate/. |
| packages/evolution/src/certificate/DelegationCertificates.ts | Adds new delegation certificate types under certificate/. |
| packages/evolution/src/certificate/DRepCertificates.ts | Adds new DRep certificate types under certificate/. |
| packages/evolution/src/certificate/CommitteeCertificates.ts | Adds new committee certificate types under certificate/. |
| packages/evolution/src/bytes/index.ts | Adds bytes/ barrel exports. |
| packages/evolution/src/block/index.ts | Adds block/ barrel exports. |
| packages/evolution/src/block/VrfVkey.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/block/VrfKeyHash.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/block/VrfCert.ts | Repoints imports to bytes/ and encoding/. |
| packages/evolution/src/block/OperationalCert.ts | Repoints imports to credential/, encoding/, numeric/. |
| packages/evolution/src/block/KesSignature.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/block/KESVkey.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/block/HeaderBody.ts | Repoints imports across credential/, encoding/, network/, numeric/. |
| packages/evolution/src/block/Header.ts | Repoints CBOR import to encoding/. |
| packages/evolution/src/block/BlockHeaderHash.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/block/BlockBodyHash.ts | Repoints byte imports to bytes/. |
| packages/evolution/src/block/Block.ts | Repoints transaction imports to transaction/ (and leaves commented placeholders). |
| packages/evolution/src/address/index.ts | Adds address/ barrel exports. |
| packages/evolution/src/address/RewardAccount.ts | Repoints imports to bytes/, credential/, network/, script/. |
| packages/evolution/src/address/PointerAddress.ts | Repoints imports to credential/, network/, numeric/, script/. |
| packages/evolution/src/address/Pointer.ts | Repoints Natural import to numeric/. |
| packages/evolution/src/address/EnterpriseAddress.ts | Repoints imports to bytes/, credential/, network/, script/. |
| packages/evolution/src/address/ByronAddress.ts | Repoints NetworkId import to network/. |
| packages/evolution/src/address/BaseAddress.ts | Repoints imports to bytes/, credential/, network/, script/. |
| packages/evolution/src/address/Address.ts | Repoints imports to bytes/, credential/, network/, script/. |
| packages/evolution/src/Time/index.ts | Updates Network type import to new network/ path. |
| packages/evolution/src/Time/SlotConfig.ts | Updates Network type import to new network/ path. |
| packages/evolution/src/Function.ts | Removes legacy Function helpers module. |
| packages/evolution/src/FormatError.ts | Removes legacy FormatError. |
| packages/evolution/src/EffectRuntime.ts | Updates doc import paths to new exported location. |
| packages/evolution/src/Combinator.ts | Removes legacy Combinator module. |
| packages/evolution/src/Assets/index.ts | Repoints imports to bytes/, encoding/, value/. |
| packages/evolution/src/Assets/Unit.ts | Repoints imports to bytes/ and value/. |
| packages/evolution/src/Assets/Label.ts | Updates Bytes import and documentation import examples. |
| packages/evolution/package.json | Updates exports map to add new concept-folder subpaths and rename message-signing/time/assets. |
| .specs/implementation/tx-builder-internal-layer-composition.md | Adds a new spec document describing tx-builder internal composition. |
| .specs/client-module-minimal-effect-layout.md | Adds a new spec document for SDK client module layout. |
| .changeset/refactor-semantic-concept-folders.md | Adds changeset describing the refactor and new module layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "./address": "./src/address/index.ts", | ||
| "./block": "./src/block/index.ts", | ||
| "./bytes": "./src/bytes/index.ts", | ||
| "./credential": "./src/credential/index.ts", | ||
| "./data": "./src/data/index.ts", | ||
| "./encoding": "./src/encoding/index.ts", | ||
| "./governance": "./src/governance/index.ts", | ||
| "./metadata": "./src/metadata/index.ts", | ||
| "./network": "./src/network/index.ts", | ||
| "./numeric": "./src/numeric/index.ts", | ||
| "./primitives": "./src/primitives/index.ts", | ||
| "./relay": "./src/relay/index.ts", | ||
| "./script": "./src/script/index.ts", | ||
| "./staking": "./src/staking/index.ts", | ||
| "./transaction": "./src/transaction/index.ts", | ||
| "./value": "./src/value/index.ts", | ||
| "./assets": "./src/assets/index.ts", | ||
| "./time": "./src/time/index.ts", | ||
| "./blueprint": "./src/blueprint/index.ts", | ||
| "./message-signing": "./src/message-signing/index.ts", | ||
| "./messageSigning": "./src/messageSigning/index.ts", | ||
| "./plutus": "./src/plutus/index.ts", | ||
| "./uplc": "./src/uplc/index.ts", | ||
| "./*": "./src/*.ts", |
There was a problem hiding this comment.
The PR description says “All public API exports preserved”, but this exports map no longer includes the previously exported subpaths ./Assets, ./Time, and ./message-signing. If those subpaths were part of the supported consumer import surface, removing them is a breaking change (and also conflicts with the changeset marking this as a patch). Consider adding backward-compatible export aliases (e.g. ./Assets → ./src/assets/index.ts, ./Time → ./src/time/index.ts, ./message-signing → ./src/messageSigning/index.ts) or, if this is intended to be breaking, update the PR description + changeset version bump accordingly.
| @@ -47,7 +47,7 @@ function checksum(num: string): string { | |||
| * @category conversions | |||
| * @example | |||
| * ```typescript | |||
| * import * as Label from "@evolution-sdk/evolution/Assets/Label" | |||
| * import * as Label from "@evolution-sdk/evolution/assets/Label" | |||
There was a problem hiding this comment.
These documentation examples reference @evolution-sdk/evolution/assets/Label, but the package.json exports shown in this PR only defines ./assets (the barrel) and ./* (single-segment files), not ./assets/*. As written, the example path is likely not a valid ESM export target for consumers. Recommend updating examples to use a supported import path (e.g. import from @evolution-sdk/evolution/assets and access Label via the barrel) or expand the exports map to include ./assets/* if deep imports are intended to be public and supported.
| @@ -71,7 +71,7 @@ export const toLabel = (num: number): string => { | |||
| * @category conversions | |||
| * @example | |||
| * ```typescript | |||
| * import * as Label from "@evolution-sdk/evolution/Assets/Label" | |||
| * import * as Label from "@evolution-sdk/evolution/assets/Label" | |||
There was a problem hiding this comment.
These documentation examples reference @evolution-sdk/evolution/assets/Label, but the package.json exports shown in this PR only defines ./assets (the barrel) and ./* (single-segment files), not ./assets/*. As written, the example path is likely not a valid ESM export target for consumers. Recommend updating examples to use a supported import path (e.g. import from @evolution-sdk/evolution/assets and access Label via the barrel) or expand the exports map to include ./assets/* if deep imports are intended to be public and supported.
| @@ -98,7 +98,7 @@ export const fromLabel = (label: string): number | undefined => { | |||
| * @category schemas | |||
| * @example | |||
| * ```typescript | |||
| * import * as Label from "@evolution-sdk/evolution/Assets/Label" | |||
| * import * as Label from "@evolution-sdk/evolution/assets/Label" | |||
There was a problem hiding this comment.
These documentation examples reference @evolution-sdk/evolution/assets/Label, but the package.json exports shown in this PR only defines ./assets (the barrel) and ./* (single-segment files), not ./assets/*. As written, the example path is likely not a valid ESM export target for consumers. Recommend updating examples to use a supported import path (e.g. import from @evolution-sdk/evolution/assets and access Label via the barrel) or expand the exports map to include ./assets/* if deep imports are intended to be public and supported.
| toJSON() { | ||
| return { | ||
| _tag: "VoteDelegCert" as const, | ||
| stakeCredential: this.stakeCredential.toJSON(), | ||
| drep: this.drep | ||
| } | ||
| } |
There was a problem hiding this comment.
toJSON() is returning drep: this.drep, which appears to be a domain object rather than a JSON-serializable value (in other modules, nested domain values typically call .toJSON()). This can lead to surprising output (e.g., {}) or non-serializable structures depending on how DRep is implemented. Prefer serializing drep explicitly (e.g., this.drep.toJSON() or a stable primitive representation) to keep toJSON() output consistent and reliably JSON-safe.
- Delete ctx.ts, update 29 internal consumers to import directly from TransactionBuilder.ts - Fix Certificate.ts re-exports: convert export-from to export-const pattern for docgen compatibility - Fix stale @example import paths (Address, PrivateKey, Data) for semantic folder structure - Remove stale untracked files (src/datum/, src/governance/Certificate.ts, src/primitives/Data.ts, src/utils/) - Regenerate docgen markdown for new folder structure
…e->time) macOS is case-insensitive, so imports like './assets/index.js' resolved to './Assets/index.ts' locally. Linux CI is case-sensitive and failed. - Rename Assets/ -> assets/ and Time/ -> time/ in git - Delete ctx.ts that survived previous commit due to same casing issue - Set core.ignorecase=false locally to prevent recurrence
Update all imports in evolution-devnet, aiken-uplc, and scalus-uplc from flat paths (e.g. @evolution-sdk/evolution/Address) to concept folder paths (e.g. @evolution-sdk/evolution/address/Address).
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 300 out of 807 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
docs/source.config.ts:1
- Removing the filesystem-backed Twoslash types cache can significantly slow docs builds (Twoslash typically re-typechecks many snippets). If the cache was removed due to an API change, consider switching to the new recommended cache hook for your fumadocs-twoslash version; otherwise, reintroduce a persistent types cache to keep local/CI docs builds fast.
import { defineConfig, defineDocs, frontmatterSchema, metaSchema } from "fumadocs-mdx/config"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,6 +1,5 @@ | |||
| import { defineConfig, defineDocs, frontmatterSchema, metaSchema } from "fumadocs-mdx/config" | |||
| import { transformerTwoslash } from "fumadocs-twoslash" | |||
There was a problem hiding this comment.
Removing the filesystem-backed Twoslash types cache can significantly slow docs builds (Twoslash typically re-typechecks many snippets). If the cache was removed due to an API change, consider switching to the new recommended cache hook for your fumadocs-twoslash version; otherwise, reintroduce a persistent types cache to keep local/CI docs builds fast.
| @@ -163,9 +163,8 @@ Use amount: 0n to trigger stake validator without withdrawing (coordinator patte | |||
|
|
|||
There was a problem hiding this comment.
The Effect environment type is shown as a union (TxContext | TxBuilderConfigTag), which usually misrepresents required dependencies (an Effect that needs both should be an intersection like TxContext & TxBuilderConfigTag). If the underlying type really is a union, callers could incorrectly think providing either one is sufficient; otherwise, the docs/type generation likely needs correction or regeneration.
|
|
||
| ## hashData | ||
| ## ~~hashData~~ | ||
|
|
There was a problem hiding this comment.
The deprecated hashData entry is struck through, but there’s no explicit deprecation note explaining what to use instead or whether behavior differs. Consider adding a brief 'Deprecated: use toDatumHash' note under ~~hashData~~ (and optionally clarifying if hashData is an alias) so readers don't miss the migration path when scanning the page.
| Deprecated: use `toDatumHash`. |
| ## toDatumHash | ||
|
|
||
| Compute the hash of PlutusData using blake2b-256 over its CBOR encoding. |
There was a problem hiding this comment.
The deprecated hashData entry is struck through, but there’s no explicit deprecation note explaining what to use instead or whether behavior differs. Consider adding a brief 'Deprecated: use toDatumHash' note under ~~hashData~~ (and optionally clarifying if hashData is an alias) so readers don't miss the migration path when scanning the page.
Reorganize ~130 flat root-level files in
packages/evolution/src/into 24 semantic concept folders (camelCase folders, PascalCase files).New folder structure
address/assets/block/blueprint/bytes/certificate/credential/data/encoding/governance/messageSigning/metadata/network/numeric/plutus/primitives/relay/script/staking/time/transaction/uplc/value/Key decisions
datum/intodata/— DatumHash, DatumOption, InlineDatum alongside Data, TSchema, DataJsoncertificate/fromgovernance/— StakeCertificates and PoolCertificates have zero governance depsutils/anti-pattern — hash functions moved to input-type modules viatopattern (TransactionBody.toHash,Data.toDatumHash, etc.)Combinator.ts(zero consumers, contained a bug),FormatError.ts(zero consumers),NativeScriptsOLD.ts,Function.tsAssets/→assets/,Time/→time/,message-signing/→messageSigning/CI fix (latest commit)
The refactor moved
client(factory function) into theClientnamespace asClient.make. All 17 devnet test files were still importing{ client }directly, causingTypeError: (0 , client) is not a functionin everybeforeAllhook on CI. The failure was hidden locally by a Turborepo cache hit —turbo run testreturned a cached pass from before the refactor without re-executing. CI had no cache and caught it. Updated all affected test files, JSDoc examples inCluster.ts, and the docs homepage quickstart.Verification