Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/starknet-io/types-js
https://github.com/starknet-io/types-js
Last synced: 1 day 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 (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T16:36:49.000Z (11 days ago)
- Last Synced: 2024-10-28T22:51:10.619Z (11 days ago)
- Language: TypeScript
- Size: 389 KB
- Stars: 8
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
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 types JS/TS
🐺 Starknet TypeScript types 🚀
[![GitHub Workflow Status](https://github.com/starknet-io/types-js/actions/workflows/publish.yml/badge.svg)](https://github.com/starknet-io/types-js/actions/workflows/publish.yml)
[![Project license](https://img.shields.io/github/license/starknet-io/types-js.svg?style=flat-square)](LICENSE)
[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/starknet-io/types-js/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)Shared TypeScript type definitions for Starknet projects
## Installation
```bash
npm i @starknet-io/types-js
```## 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'
```##### 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## Versioning (pending SPEC PR merge)
(MAJOR.MINOR) Version of this package should follow [starknet-spec](https://github.com/starkware-libs/starknet-specs) semantic versioning.
PATCH version can diverge based on bug-fixes
ex. Starknet types v0.7.x <-> Starknet Spec v0.7.x## 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.