Skip to content

Commit ef45afa

Browse files
authored
docs(brotherId): clarify encodeBrotherDomain accepts names with/without .brother
1 parent 74b8d72 commit ef45afa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/provider/extensions/brotherId.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ export function isBrotherDomain(domain: string): boolean {
1616
/**
1717
* Encodes a Brother domain name into a bigint value.
1818
* This uses the same encoding logic as Starknet ID.
19-
* @param domain - The domain name without .brother suffix
19+
* @param domain - The domain name (with or without .brother suffix)
2020
* @returns encoded bigint value
2121
* @example
2222
* ```typescript
23-
* const encoded = encodeBrotherDomain("myname.brother");
24-
* // Returns a bigint value
23+
* const encoded1 = encodeBrotherDomain("myname.brother");
24+
* const encoded2 = encodeBrotherDomain("myname");
25+
* // Both return the same bigint value
2526
* ```
2627
*/
2728
export function encodeBrotherDomain(domain: string): bigint {

0 commit comments

Comments
 (0)