Skip to content

Add event fetching for jar creation #14

Description

@Abioladory123

Summary

The contract deliberately has no on-chain list of jars. Discovery is
event-driven: create_jar emits jar_crtd, and indexers are expected to
reconstruct the jar list by scanning those events. The SDK only fetches tip
events, so it offers no way to do the thing the contract's design assumes.

Anything wanting to enumerate jars has to build its own filter and decoder,
which is exactly the encoding work this package already solved once for tips.

Acceptance criteria

  • A function fetches and decodes jar_crtd events into a typed result
    carrying the jar id, owner, ledger and transaction hash.
  • It reuses the existing topic filter construction rather than duplicating
    the XDR encoding.
  • The function is exported from the package entry point and documented.

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/fetch-jar-created-events

Suggested commit message:

feat: fetch and decode jar_crtd events

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

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions