@ecency/sdk 1.1.7 → 1.1.9
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 +30 -0
- package/package.json +1 -1
package/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# @ecency/sdk
|
2
|
+
|
3
|
+
Utilities for building Hive applications with React and TypeScript.
|
4
|
+
|
5
|
+
## Features
|
6
|
+
|
7
|
+
- Query and mutation option builders powered by [@tanstack/react-query](https://tanstack.com/query)
|
8
|
+
- Modules for accounts, posts, operations, communities, games, analytics, keychain integrations, and more
|
9
|
+
- Configurable Hive RPC client and storage via the `CONFIG` object
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
```sh
|
14
|
+
yarn add @ecency/sdk
|
15
|
+
# or
|
16
|
+
npm install @ecency/sdk
|
17
|
+
```
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
```ts
|
22
|
+
import { getAccountFullQueryOptions, ConfigManager } from '@ecency/sdk';
|
23
|
+
import { useQuery } from '@tanstack/react-query';
|
24
|
+
|
25
|
+
// optionally provide a custom QueryClient
|
26
|
+
// ConfigManager.setQueryClient(myQueryClient);
|
27
|
+
|
28
|
+
const { data } = useQuery(getAccountFullQueryOptions('ecency'));
|
29
|
+
```
|
30
|
+
|