feat(Address): add fromSeed for synchronous address derivation#246
Merged
solidsnakedev merged 3 commits intomainfrom Apr 10, 2026
Merged
feat(Address): add fromSeed for synchronous address derivation#246solidsnakedev merged 3 commits intomainfrom
solidsnakedev merged 3 commits intomainfrom
Conversation
Replace network string option with numeric networkId in Derivation module. Add Address.fromSeed() that derives addresses from a BIP-39 seed phrase without requiring a Client or Chain instance.
Replace Client.make(preprod) pattern with Address.fromSeed() for pre-start address derivation and Cluster.getChain() for post-start connected clients. Add Yaci DevKit comparison section to index.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a synchronous, client-free address derivation API to the Evolution SDK and updates derivation/config surfaces and devnet docs to use numeric networkId consistently (defaulting to testnet).
Changes:
- Introduces
Address.fromSeed()for synchronous address derivation from a BIP-39 mnemonic. - Replaces Derivation’s
networkstring option with numericnetworkIdacross derivation helpers (and updates internal wallet wiring). - Updates devnet documentation to derive pre-start addresses via
Address.fromSeed()and to construct clients withCluster.getChain(cluster).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/evolution/test/WalletFromSeed.test.ts | Updates expected addresses/behavior to reflect networkId usage and new defaults. |
| packages/evolution/src/sdk/wallet/Derivation.ts | Switches derivation APIs from network to networkId and updates default network behavior. |
| packages/evolution/src/sdk/client/internal/Wallets.ts | Passes chain.id directly as networkId into derivation. |
| packages/evolution/src/Address.ts | Adds Address.fromSeed() wrapper API. |
| docs/content/docs/devnet/integration.mdx | Updates examples to derive addresses offline and build clients from the running cluster’s chain. |
| docs/content/docs/devnet/configuration.mdx | Updates genesis funding examples to use Address.fromSeed() rather than a preprod client workaround. |
| docs/content/docs/devnet/index.mdx | Adds a “Yaci DevKit” comparison section. |
| .changeset/address-from-seed.md | Announces the new API and the networkId migration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
11
to
15
| import * as KeyHash from "./KeyHash.js" | ||
| import * as NetworkId from "./NetworkId.js" | ||
| import * as ScriptHash from "./ScriptHash.js" | ||
| import { addressFromSeed as _addressFromSeed } from "./sdk/wallet/Derivation.js" | ||
|
|
Comment on lines
+253
to
+257
| export const fromSeed = ( | ||
| seed: string, | ||
| options: { | ||
| password?: string | ||
| addressType?: "Base" | "Enterprise" |
| @@ -0,0 +1,10 @@ | |||
| --- | |||
| "@evolution-sdk/evolution": patch | |||
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.
The Derivation module required a
networkstring option ("Mainnet" | "Testnet" | "Custom") that callers had to construct from a numeric chain ID — and then Derivation immediately converted it back to a number. Devnet docs usedClient.make(preprod)as a workaround to derive addresses before a cluster existed, which was misleading sincepreprodhad nothing to do with devnet.Add
Address.fromSeed()that derives an address synchronously from a BIP-39 seed phrase with noClientorChainrequired. Replace thenetworkstring option with a numericnetworkIdacross all Derivation functions, defaulting to0(testnet). Update all devnet documentation to useAddress.fromSeed()for pre-start address derivation andCluster.getChain(cluster)for post-start clients. Add a Yaci DevKit comparison section to the devnet index page.