https://github.com/starknet-io/types-js
https://github.com/starknet-io/types-js
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/starknet-io/types-js
- Owner: starknet-io
- License: mit
- Created: 2024-02-13T14:02:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-10T08:30:07.000Z (7 days ago)
- Last Synced: 2025-04-10T09:11:05.016Z (7 days ago)
- Language: TypeScript
- Size: 738 KB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starknet - types-js - TypeScript types. (Additional developer resources)
README
![]()
🐺 Starknet TypeScript types 🚀 definitions for Starknet projects## Installation
RPC 0.8 - Latest
```bash
npm i @starknet-io/types-js
```RPC 0.7
```bash
npm i @starknet-io/[email protected]
```## Types
#### API [Starknet JSON RPC Specification](https://github.com/starkware-libs/starknet-specs/tree/master/api)
```ts
// type import
import type { SomeApiType } from '@starknet-io/types-js';
// or entire namespace import
import { API } from '@starknet-io/types-js';
```#### Wallet API [Wallet JSON RPC Specification](https://github.com/starkware-libs/starknet-specs/tree/48e77bf4aaf687388b40b8198e3105401941517a/wallet-api)
```ts
// type import
import type { SomeWalletApiType } from '@starknet-io/types-js';
// or entire namespace import
import { WALLET_API } from '@starknet-io/types-js';
```##### SNIPs [StarkNet Improvement Proposals](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-1.md)
- [SNIP-12 Hashing and signing typed structured data](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-12.md) - [/src/wallet-api/typedData.ts](https://github.com/starknet-io/types-js/blob/main/src/wallet-api/typedData.ts)
## Versioning
MAJOR and MINOR version of this package follows [starknet-spec](https://github.com/starkware-libs/starknet-specs/tags) semantic versioning. The PATCH version can diverge based on the bug fixes.
Ex. Starknet types-js v0.7 == Starknet Spec v0.7
## Devs Build
```bash
npm run build
```## Devs Testing
```bash
npm run lint
```## License
This repository is licensed under the MIT License, see [LICENSE](LICENSE) for more information.