Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement client #5

Merged
merged 4 commits into from
Oct 22, 2024
Merged

feat: implement client #5

merged 4 commits into from
Oct 22, 2024

Conversation

outerlook
Copy link
Collaborator

@outerlook outerlook commented Oct 22, 2024

Description

  • main implementation of client
  • deploy/destroy stream methods
  • hardcode template contracts

Related Problem

How Has This Been Tested?

run new tests

Updated the Vitest configuration to include a setup file, added new dependencies "disposablestack", "vite", "ethers", and "vite-plugin-plain-text" in package.json. Also, downgraded the module and module resolution options in tsconfig.json for better compatibility.
Introduced a new TypeScript file, `contractsContent.ts`, to export JSON templates. Added extensive JSON structure in `primitive_stream_template.json` to represent the schema and procedures for a primitive stream database. Created tests to verify the definition and attributes of these templates.
Introduce `deployStream` and `destroyStream` functions for handling stream operations in `deployStream.ts` and `destroyStream.ts`. Additionally, refactor `EthereumAddress.ts` to convert bytes correctly and update client interfaces to use `StreamId`. Enhance type safety for `StreamType`, `MetadataKey`, and `MetadataType` with const enums.
Implemented the `listAllStreams` function to retrieve all streams from the TSN network. Added comprehensive client tests for creating, deploying, waiting for transactions, and listing streams to ensure functionality and reliability.
@outerlook outerlook changed the title Refactor type definitions and add new utility classes feat: implement client Oct 22, 2024
@outerlook outerlook self-assigned this Oct 22, 2024
@outerlook outerlook requested a review from MicBun October 22, 2024 17:43
@outerlook outerlook merged commit f9eb627 into main Oct 22, 2024
6 checks passed
@outerlook outerlook deleted the feat/client branch October 22, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem(tsn-sdk-ts): client not implemented
2 participants