feat(sdk): TypeScript client — @engram/client npm package#29
Open
JamesJi79 wants to merge 1 commit into
Open
Conversation
Implements the TypeScript SDK mirroring the Python SDK (engram/sdk/). ## Features - EngramClient with ingest, query, get, delete, list, health methods - Private namespace support with X25519 hybrid encryption (ECDH + HKDF + AES-256-GCM) - Password-based NamespaceEncryption (legacy compat) - sr25519 request signing via @polkadot/util-crypto integration - CID parsing and validation - Full error hierarchy matching Python SDK exceptions - Batch ingest, conversation ingest, URL ingest - Query by text or by pre-computed vector - 18 unit tests (all passing) ## Structure - packages/engram-client/ — the npm package - Full TypeScript types matching Python SDK interfaces - Uses only Node.js 18+ stdlib (fetch, crypto) + @polkadot/util-crypto - Zero external runtime deps for core client Closes Dipraise1#22
|
@JamesJi79 is attempting to deploy a commit to the praise's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TypeScript SDK — @engram/client
This PR implements a complete TypeScript SDK mirroring the Python
engram.sdkpackage, as requested in #22.What's Included
EngramClientHybridEncryptionNamespaceEncryptionsign_request()parse_cid()EngramError,MinerOfflineError, etc.batch_ingest_file()ingest_conversation()ingest_url()query(),query_by_vector()health(),is_online()from_subnet()Package Structure
Tests
All 18 tests pass:
Dependencies
@polkadot/util-crypto(sr25519 signing)typescript,vitestfetch,crypto)Integration Notes
crypto.diffieHellman()for X25519 ECDH (Node.js 18+)npm install @polkadot/util-crypto(optional dep)@engram/clientCloses #22