@ar.io/sdk 2.3.2-alpha.1 → 2.3.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/common/io.js +5 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +5 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/io.d.ts +1 -0
- package/lib/types/io.d.ts +1 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
|
|
|
33
33
|
- [`getGateways({ cursor, limit, sortBy, sortOrder })`](#getgateways-cursor-limit-sortby-sortorder-)
|
|
34
34
|
- [`getArNSRecord({ name })`](#getarnsrecord-name-)
|
|
35
35
|
- [`getArNSRecords({ cursor, limit, sortBy, sortOrder })`](#getarnsrecords-cursor-limit-sortby-sortorder-)
|
|
36
|
+
- [`getDemandFactor()`](#getdemandfactor)
|
|
36
37
|
- [`getObservations({ epochIndex })`](#getobservations-epochindex-)
|
|
37
38
|
- [`getDistributions({ epochIndex })`](#getdistributions-epochindex-)
|
|
38
39
|
- [`getEpoch({ epochIndex })`](#getepoch-epochindex-)
|
|
@@ -571,6 +572,24 @@ Available `sortBy` options are any of the keys on the record object, e.g. `name`
|
|
|
571
572
|
|
|
572
573
|
</details>
|
|
573
574
|
|
|
575
|
+
#### `getDemandFactor()`
|
|
576
|
+
|
|
577
|
+
Retrieves the current demand factor of the network. The demand factor is a multiplier applied to the cost of ArNS interactions based on the current network demand.
|
|
578
|
+
|
|
579
|
+
```typescript
|
|
580
|
+
const io = IO.init();
|
|
581
|
+
const demandFactor = await io.getDemandFactor();
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
<details>
|
|
585
|
+
<summary>Output</summary>
|
|
586
|
+
|
|
587
|
+
```json
|
|
588
|
+
1.05256
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
</details>
|
|
592
|
+
|
|
574
593
|
#### `getObservations({ epochIndex })`
|
|
575
594
|
|
|
576
595
|
Returns the epoch-indexed observation list.
|