From 2636265000a723ec39ff71a18ec70e19e4cfc0de Mon Sep 17 00:00:00 2001 From: Toni Tabak Date: Tue, 4 Jun 2024 13:39:32 +0200 Subject: [PATCH] fix: readme (#10) * fix: readme * ci: remove duplicate CI release --- .github/workflows/_release.yml | 31 -------------------- .github/workflows/manual-release.yml | 21 -------------- README.md | 42 +++++++++++----------------- 3 files changed, 17 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/_release.yml delete mode 100644 .github/workflows/manual-release.yml diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml deleted file mode 100644 index 221ecea..0000000 --- a/.github/workflows/_release.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: _ Run Release -on: - workflow_call: - inputs: - debug: - type: boolean - default: false - dry-run: - type: boolean - default: false - secrets: - NPM_TOKEN: - required: true - -jobs: - release: - name: Run release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'npm' - - run: npm ci --ignore-scripts ${{ inputs.dry-run }} - - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release --debug ${{ inputs.debug }} --dry-run ${{ inputs.dry-run }} diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml deleted file mode 100644 index bd67ae5..0000000 --- a/.github/workflows/manual-release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: '[Manual] Release' -on: - workflow_dispatch: - inputs: - debug: - description: 'Debug' - type: boolean - default: true - dry-run: - description: 'Dry run' - type: boolean - default: true - -jobs: - release: - name: Release - uses: ./.github/workflows/_release.yml - with: - debug: ${{ inputs.debug }} - dry-run: ${{ inputs.dry-run }} - secrets: inherit diff --git a/README.md b/README.md index 27a6942..05686bc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# starknet-types +# Starknet types JS/TS 🐺 Starknet TypeScript types 🚀 @@ -8,28 +8,28 @@ Shared TypeScript type definitions for Starknet projects -## Types +## Installation -#### api [Starknet JSON RPC Specification](https://github.com/starkware-libs/starknet-specs/tree/master/api) -- /src/api/* -- usage -```ts - import type { SomeType } from 'starknet-types' -``` -- or usage from api namespace import -```ts - import { API } from 'starknet-types' +```bash +npm i @starknet-io/types-js ``` -#### wallet-api [Wallet JSON RPC Specification](https://github.com/starkware-libs/starknet-specs/tree/48e77bf4aaf687388b40b8198e3105401941517a/wallet-api) -- /src/wallet-api/* -- usage from top level type import +## Types + +#### API [Starknet JSON RPC Specification](https://github.com/starkware-libs/starknet-specs/tree/master/api) ```ts - import type { SomeType } from 'starknet-types' + // type import + import type { SomeApiType } from '@starknet-io/types-js' + // or entire namespace import + import { API } from '@starknet-io/types-js' ``` -- or usage from api namespace import + +#### Wallet API [Wallet JSON RPC Specification](https://github.com/starkware-libs/starknet-specs/tree/48e77bf4aaf687388b40b8198e3105401941517a/wallet-api) ```ts - import { WALLET_API } from 'starknet-types' + // 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) @@ -41,14 +41,6 @@ Shared TypeScript type definitions for Starknet projects PATCH version can diverge based on bug-fixes ex. Starknet types v0.7.x <-> Starknet Spec v0.7.x -## Usage - -As a package - -```bash -npm i starknet-types -``` - ## Devs Build ```bash