Uint8Array. All methods are added as prototypes on these types.
The Pattern
Address constructor returns a Uint8Array (20 bytes) with methods attached to its prototype. No wrapper classes, no hidden state—just bytes with convenient methods.
Why Data-First?
| Benefit | Description |
|---|---|
| Interoperability | Pass to any function expecting Uint8Array |
| Serialization | No custom serializers needed |
| Memory efficiency | No wrapper object overhead |
| Predictable | What you see is what you get |
Prototype Methods
All methods are attached to the prototype of the branded type:Static vs Instance Methods
Every instance method has a corresponding static method:- Passing to higher-order functions (
map,filter, etc.) - Working with values that might be from different sources
- You prefer functional style

