Skip to content

Add a jarExists method to the client #12

Description

@Abioladory123

Summary

The contract exposes jar_exists, added specifically so a slug availability
check does not have to call get_jar and catch a JarNotFound panic.
TipSplitterClient never wraps it, so consumers cannot reach it and end up
doing exactly the thing it was added to avoid.

The onboarding slug field is the direct consumer: it needs a cheap boolean it
can call on every debounced keystroke.

Acceptance criteria

  • jarExists(jarId) returns a boolean using the contract's view, following
    the read pattern the other view methods use.
  • It returns false for an unregistered slug rather than throwing.
  • The method is added to the client section of the README's API reference.

Getting started

Fork this repository, clone your fork, and add this repo as upstream:

git clone https://github.com/<your-username>/novatip-sdk.git
cd novatip-sdk
git remote add upstream https://github.com/Novatip/novatip-sdk.git
npm install

Create a branch for this issue:

git checkout -b feat/client-jar-exists

Suggested commit message:

feat: add jarExists to the client

Run npm run lint, npm run typecheck, and npm run build before pushing, then open a pull request from your fork against main and link this issue. See the contributing guide for the full workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions