Created
March 20, 2025 16:17
-
-
Save pyropy/5a709291870e716ed390bc7867816ab8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { getFullnodeUrl, SuiClient } from '@mysten/sui.js/client'; | |
| const url = getFullnodeUrl('testnet') | |
| const client = new SuiClient({ | |
| url | |
| }); | |
| // sys info | |
| // const objectId = '0x99f4831d1c2265b3856de0ace013f8d760522aa87a0ca678802fe736cce134b6' | |
| // staking info inner | |
| const objectId = '0x161434e1e4bf91f0d55111602d407039394bb9a72d3e90e74d1ee26f2b16c7b5' | |
| // active set of nodes | |
| // const objectId = '0x0bbcf36f9d831e5689680ee0330f3dfbed0c750727c335cfc93327b948696a18' | |
| // const packageId = '0xfdc88f7d7cf30afab2f82e8380d11ee8f70efb90e863d1de8616fae1bb09ea77' | |
| const object = await client.getObject({ | |
| id: objectId, | |
| options: { showContent: true }, | |
| }); | |
| console.log(object.data.content.fields); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment