File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 11---
2- sidebar_position : 6
2+ sidebar_position : 7
33---
44
55# CHANGELOG
Original file line number Diff line number Diff line change 1+ ---
2+ sidebar_position : 6
3+ ---
4+
5+ # Utils
6+
7+ Util functions are provided so you can use low level functions in your application.
8+
9+ ## ` address `
10+
11+ the address helpers can be imported using:
12+
13+ ``` js
14+ import { address } from ' starknet.js' ;
15+ ```
16+
17+ ### ` getChecksumAddress(address: BigNumberish): string `
18+
19+ This function accepts an address as a ` BigNumberish ` and returns the checksummed address as a string.
20+ An example:
21+
22+ ``` js
23+ import { address } from ' starknet.js' ;
24+
25+ const addressToCheck = ' 0x2fd23d9182193775423497fc0c472e156c57c69e4089a1967fb288a2d84e914' ;
26+
27+ const checksummedAddress = address .getChecksumAddress (addressToCheck);
28+
29+ console .log (checksummedAddress); // 0x02FD23D9182193775423497Fc0c472E156C57C69E4089a1967fb288a2D84e914
30+ ```
31+
32+ ### ` validateChecksumAddress(address: string): boolean `
33+
34+ This function validates the checksum address. It returns true if the address is valid, false otherwise.
You can’t perform that action at this time.
0 commit comments