Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add ts-sdk get states #2060

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# getStates

## 查看资源

```ts
import { getRoochNodeUrl, RoochClient } from "@roochnetwork/rooch-sdk";

const neturl = getRoochNodeUrl('localnet');
const mc = new RoochClient({url: neturl});

const result = mc.getStates({accessPath: '/resource/0x05a646529424ac20ef3c4201e00d0da07e61a5523e5b652a674e163f820083f6/0x05a646529424ac20ef3c4201e00d0da07e61a5523e5b652a674e163f820083f6::quick_start_counter::Counter'})

console.log(result);
```

```
decoded_value
:
null
display_fields
:
null
value
:
"0x0000000000000000"
value_type
:
"0x5a646529424ac20ef3c4201e00d0da07e61a5523e5b652a674e163f820083f6::quick_start_counter::Counter"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# getStates

## 查看资源

```ts
import { getRoochNodeUrl, RoochClient } from "@roochnetwork/rooch-sdk";

const neturl = getRoochNodeUrl('localnet');
const mc = new RoochClient({url: neturl});

const result = mc.getStates({accessPath: '/resource/0x05a646529424ac20ef3c4201e00d0da07e61a5523e5b652a674e163f820083f6/0x05a646529424ac20ef3c4201e00d0da07e61a5523e5b652a674e163f820083f6::quick_start_counter::Counter'})

console.log(result);
```

```
decoded_value
:
null
display_fields
:
null
value
:
"0x0000000000000000"
value_type
:
"0x5a646529424ac20ef3c4201e00d0da07e61a5523e5b652a674e163f820083f6::quick_start_counter::Counter"
```
Loading