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: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

































Support starknet.js on drips.network





🐺 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.