Skip to content

feat(Address): add fromSeed for synchronous address derivation#246

Merged
solidsnakedev merged 3 commits intomainfrom
feat/address-from-seed
Apr 10, 2026
Merged

feat(Address): add fromSeed for synchronous address derivation#246
solidsnakedev merged 3 commits intomainfrom
feat/address-from-seed

Conversation

@solidsnakedev
Copy link
Copy Markdown
Collaborator

The Derivation module required a network string 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 used Client.make(preprod) as a workaround to derive addresses before a cluster existed, which was misleading since preprod had nothing to do with devnet.

Add Address.fromSeed() that derives an address synchronously from a BIP-39 seed phrase with no Client or Chain required. Replace the network string option with a numeric networkId across all Derivation functions, defaulting to 0 (testnet). Update all devnet documentation to use Address.fromSeed() for pre-start address derivation and Cluster.getChain(cluster) for post-start clients. Add a Yaci DevKit comparison section to the devnet index page.

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.
Copilot AI review requested due to automatic review settings April 10, 2026 22:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 network string option with numeric networkId across derivation helpers (and updates internal wallet wiring).
  • Updates devnet documentation to derive pre-start addresses via Address.fromSeed() and to construct clients with Cluster.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
@solidsnakedev solidsnakedev merged commit 2b50737 into main Apr 10, 2026
12 checks passed
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.

2 participants