[BOUNTY] Create TypeScript SDK Package Structure and Core Utilities#214
Open
TeapoyY wants to merge 1 commit intoANAVHEOBA:mainfrom
Open
[BOUNTY] Create TypeScript SDK Package Structure and Core Utilities#214TeapoyY wants to merge 1 commit intoANAVHEOBA:mainfrom
TeapoyY wants to merge 1 commit intoANAVHEOBA:mainfrom
Conversation
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.
Bounty: Create TypeScript SDK Package Structure and Core Utilities
Reward: Per bounty specification | Domain: SDK
Changes
Created the foundational TypeScript SDK package (@privacylayer/sdk) for PrivacyLayer with the following structure and implementations:
Package Structure
sdk/ ├── package.json # Package configuration with all dependencies ├── tsconfig.json # Strict TypeScript configuration ├── .eslintrc.js # ESLint with TypeScript support ├── .prettierrc # Code formatting rules ├── jest.config.js # Jest test configuration with coverage thresholds ├── README.md # Installation and usage documentation ├── src/ │ ├── index.ts # Main exports + PrivacyLayer client class │ ├── types.ts # Note, Denomination, DepositReceipt, NetworkConfig, etc. │ ├── constants.ts # NETWORKS config, MERKLE_TREE_DEPTH, FIELD_SIZE │ ├── utils/ │ │ ├── index.ts │ │ ├── crypto.ts # randomFieldElement, hashPair, computeCommitment, deriveNullifier │ │ ├── encoding.ts # bytesToHex, hexToBytes, hexToBase64, etc. │ │ └── validation.ts # validateAddress, validateAmount, validateFieldElement, etc. │ └── __tests__/ │ └── utils.test.ts # Comprehensive unit tests for all utilities └── dist/ # Build output (generated on npm run build)Key Implementations
Build & Test
pm run build compiles TypeScript to dist/ with type declarations
pm test runs Jest with all utility tests
pm run coverage validates >80% coverage threshold
pm run lint validates TypeScript with ESLint
Files Changed
Acceptance Criteria
pm install ready (dependencies specified)
pm run build compiles TypeScript successfully
pm test runs Jest tests
pm run lint passes ESLint checks
Closes #7