Skip to content

Conversation

@CreeptoGengar
Copy link

Moves the Address module from miden-protocol to miden-standards as per #2214.

Changes:

  • Moves Address, AddressId, AddressInterface, and RoutingParameters to miden-standards
  • Keeps AddressType and NetworkId in miden-protocol (used internally)
  • Updates AddressId::decode to use impl Iterator<Item = u8> instead of ByteIter
  • Makes AccountId::from_bech32_byte_iter public and accepts impl Iterator<Item = u8>
  • Makes NoteTag::from_network_account_id and from_local_account_id public
  • Updates all imports across the codebase
  • Removes circular dependency between crates

This commit introduces the Address struct and its associated methods for managing user-facing addresses in the Miden protocol, including encoding and decoding functionalities.
Implement AddressId enum with methods for address type, default note tag length, byte representation, and bech32 decoding.
Implement AddressInterface enum with basic wallet variant and conversion methods.
Updated visibility of from_hrp and into_hrp methods to public for usage in miden-standards, while adding cautionary notes regarding bech32 types.
Refactor from_bech32_byte_iter to use an iterator and collect bytes.
Update comments to reflect changes in re-exports.
@PhilippGackstatter
Copy link
Contributor

@CreeptoGengar Thank you for the PR. Could you also add an entry in CHANGELOG.md to make CI happy?

Could you also rebase this on the latest next? Note that NoteTag:from_local_account_id no longer exists, it was removed in #2219. Thank you!

Farukest and others added 5 commits January 15, 2026 21:42
* feat: move standard note scripts into standard library

Move note script logic from standalone files in `note_scripts/` directory
to `miden::standards::notes` namespace modules. This enables dynamic access
to script roots via `procref` instead of hardcoding values.

Changes:
- Add new modules under `standards/notes/`: p2id, p2ide, swap, burn, mint
- Each module contains a `pub proc main` with the script logic
- Original note script files now serve as minimal wrappers calling
  `exec.<note>::main`

Closes 0xMiden#2243

* chore: add changelog entry for note scripts refactoring

* docs: fix namespace references in note script documentation

* chore: update docs contracts->standards

---------

Co-authored-by: Marti <[email protected]>
@CreeptoGengar CreeptoGengar force-pushed the move-address-to-standarts branch from 318984a to 1919279 Compare January 15, 2026 21:51
@bobbinth
Copy link
Contributor

@CreeptoGengar - we've merged some work into next recently, and now this branch has some merge conflicts. Would you mind resolving them?

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.

4 participants