Skip to content

Commit 6247d8c

Browse files
committed
docs: ✏️ Added readme file for the types package
1 parent 390b34f commit 6247d8c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

packages/types/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# @windingtree/sdk-types
2+
3+
The `@windingtree/sdk-types` package provides a collection of TypeScript interfaces and types which are commonly used across the Winding Tree SDK. It includes data types for messages, requests, offers, deals, contracts, and various configuration options.
4+
5+
## Installation
6+
7+
```bash
8+
pnpm i @windingtree/sdk-types
9+
```
10+
11+
## Key concepts
12+
13+
This package encapsulates a variety of data types used across the SDK:
14+
15+
- Message, Request, Offer, and Deal types: These provide structure for core data transactions within the SDK.
16+
- ContractConfig and Contracts: These interfaces define configurations for interacting with Ethereum smart contracts.
17+
- PaginationOptions: This interface is used for paged responses in some methods.
18+
- Other utility types such as NodeKeyJson, PeerOptions, ChainsConfigOption, NoncePeriodOption and more.
19+
20+
## Usage
21+
22+
These types are generally used for type checking purposes within the SDK and might not be directly interacted with during typical usage of the SDK. They are imported when needed for type annotations in TypeScript files.
23+
24+
```typescript
25+
import { RequestData, GenericQuery } from '@windingtree/sdk-types';
26+
27+
const requestData: RequestData<GenericQuery> = {
28+
// populate data here
29+
};
30+
```
31+
32+
## Documentation
33+
34+
For full documentation and examples, visit [windingtree.github.io/sdk](https://windingtree.github.io/sdk)
35+
36+
## Testing
37+
38+
```bash
39+
pnpm test
40+
```
41+
42+
## Contributing
43+
44+
[Contribution guidelines](https://windingtree.github.io/sdk/#/docs/contribution)

0 commit comments

Comments
 (0)