feat(sdk,shared): add SDK README usage example and network/address helpers - #20
Merged
Mona-i merged 1 commit intoSep 10, 2026
Conversation
…lpers Issue lumio-network#10 — add packages/sdk/README.md usage example: - Full LumioClient construction example using NETWORKS.testnet and a ContractIds map, mirroring the shape from sdk.test.ts - Shows read methods (mock return values) and write methods (NotImplementedError) - Documents individual client exports and @lumio/shared type re-exports - States scaffold/stub caveat prominently - Links README from root README.md package table (also links shared + ui) Issue lumio-network#11 — add getNetwork() and isValidAddress() to @lumio/shared: - getNetwork(name: NetworkName): NetworkConfig — resolves a config by name - isValidAddress(value: string): boolean — format guard for Stellar strkeys (56 chars, G/C prefix, base32 A-Z/2-7 charset); documents shape-check limitation - Both functions exported via existing index re-export (export * from './utils') - Updated import in utils.ts to bring in NetworkConfig, NetworkName, NETWORKS - Added 11 new tests (4 getNetwork + 7 isValidAddress); all 36 pass
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
closes #10
closes #11
Issue #10 —
docs(sdk): addpackages/sdk/README.mdusage exampleLumioClientconstruction example usingNETWORKS.testnetand aContractIdsmap (mirrors the real shape fromsdk.test.ts)NotImplementedErrorhandling@lumio/sharedre-exportsREADME.mdpackage table now links topackages/sdk/README.md,packages/shared/README.md, andpackages/ui/README.mdIssue #11 —
feat(shared): addgetNetwork()andisValidAddress()packages/shared/src/utils.tsgetNetwork(name: NetworkName): NetworkConfig— resolves a well-known network config by nameisValidAddress(value: string): boolean— lightweight format guard for Stellar strkeys (56 chars,G/Cprefix, base32 A–Z/2–7 charset); documents that it is a shape check only, not a checksum or on-chain verificationBoth functions are automatically exported via the existing
export * from "./utils"inindex.ts.packages/shared/src/utils.test.tsgetNetwork(testnet/futurenet/mainnet configs, same reference asNETWORKS)isValidAddress(valid G and C keys, too short, too long, wrong prefix, non-base32 chars, empty string)Validation
pnpm lint✅pnpm typecheck✅pnpm build✅pnpm test✅ — 36 tests in@lumio/shared(up from 25), all passing