Repository navigation
Conversation
…ar-split#1075), example apps (Stellar-split#1074), and debug logging (Stellar-split#1073)
|
@faith-ng Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This branch has not been deployed
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.
Overview
This pull request addresses and resolves four related issues for the
@stellar-split/sdk:What changed
1. Architecture Documentation (#1076)
ARCHITECTURE.mddocumenting the complete system topology and component interactions:2. JSDoc Documentation (#1075)
@paramtypes, descriptions, and constraints.@returnstypes and resolution semantics.@exampleblocks across public SDK methods illustrating realistic usage patterns.3. TypeScript Example Applications (#1074)
examples/:basic-split-invoice.ts: Canonical invoice splitting lifecycle—multi-party recipient definition with exact stroop allocations, simulation against Soroban RPC, proportional disbursements, and receipt generation.batch-payments.ts: High-volume payroll and payout batch operations with automatic footprint chunking, pre-flight verification, and atomic multi-payment execution.dispute-and-arbitration.ts: Escrow dispute workflows—transitioning to contested states with IPFS evidence attachments, multi-arbiter consensus voting (e.g. 2-of-3 threshold), and automated dispute settlement.realtime-monitoring.ts: Real-time event subscription and live state synchronization viaTypedEventEmitter.examples/README.mdwith quick-start instructions (npx tsx), flow explanations, and environment variable configuration options.4. Debug Logging Subsystem (#1073)
src/logger.ts:LogLevelenum (DEBUG,INFO,WARN,ERROR,NONE) and string union type (LogLevelString) with flexible parsing (parseLogLevel).SdkLogger: Structured logging class supporting severity filtering, runtime level mutation (setLevel), and hierarchical child loggers (child()).S[A-Z0-9]{55}) and credential keys (secret,privateKey,password,token,apiKey, etc.) from messages and context payloads.defaultLogFormatteranddefaultConsoleSinkwith support for custom formatters and destination sinks.client.logger,client.setLogLevel,client.enableDebugLogging,loggerandlogLevelclient config options, andSPLIT_SDK_LOG_LEVELenvironment variable support.src/index.ts.Testing
test/logger.test.ts: 19 passed (level parsing, string mapping, level filtering, secret redaction, formatting, child loggers, and client integration)test/client.test.ts: 68 passedtest/retryPolicy.test.ts: 31 passedtest/network-environment.test.ts: 11 passedtest/webhookMiddleware.test.ts: 51 passedtest/bundleSizeGuard.test.ts: 8 passednpm run build: Successfully generated ESM, CJS, and DTS bundles.npx tsx:npx tsx examples/basic-split-invoice.ts(exited 0)npx tsx examples/batch-payments.ts(exited 0)npx tsx examples/dispute-and-arbitration.ts(exited 0)npx tsx examples/realtime-monitoring.ts(exited 0)Issues
closes #1076
closes #1075
closes #1074
closes #1073