Skip to content

Commit

Permalink
chore(docs): add getState API to readme for ANTs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Jul 31, 2024
1 parent cb8a226 commit bb04f79
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
- [ANT APIs](#ant-apis)
- [`init({ processId, signer })`](#init-processid-signer-)
- [`getInfo()`](#getinfo)
- [`getState()`](#getstate)
- [`getOwner()`](#getowner)
- [`getControllers()`](#getcontrollers)
- [`getRecords()`](#getrecords)
Expand Down Expand Up @@ -1045,6 +1046,47 @@ const info = await ant.getInfo();

</details>

#### `getState()`

Retrieves the state of the ANT process.

```typescript
const state = await ant.getState();
```

<details>
<summary>Output</summary>

```json
{
"TotalSupply": 1,
"Balances": {
"98O1_xqDLrBKRfQPWjF5p7xZ4Jx6GM8P5PeJn26xwUY": 1
},
"Controllers": [],
"Records": {
"v1-0-0_whitepaper": {
"transactionId": "lNjWn3LpyhKC95Kqe-x8X2qgju0j98MhucdDKK85vc4",
"ttlSeconds": 900
},
"@": {
"transactionId": "2rMLb2uHAyEt7jSu6bXtKx8e-jOfIf7E-DOgQnm8EtU",
"ttlSeconds": 3600
},
"whitepaper": {
"transactionId": "lNjWn3LpyhKC95Kqe-x8X2qgju0j98MhucdDKK85vc4",
"ttlSeconds": 900
}
},
"Initialized": true,
"Ticker": "ANT-AR-IO",
"Logo": "Sie_26dvgyok0PZD_-iQAFOhOd5YxDTkczOLoqTTL_A",
"Denomination": 0,
"Name": "AR.IO Foundation",
"Owner": "98O1_xqDLrBKRfQPWjF5p7xZ4Jx6GM8P5PeJn26xwUY"
}
```

#### `getOwner()`

Returns the owner of the configured ANT process.
Expand Down

0 comments on commit bb04f79

Please sign in to comment.