fix: repair root typecheck and pin lint/format tooling#93
Conversation
The setupDashClient-core.d.mts was added as a narrow typed boundary for the example apps and only declared the subset they consume. Node16 resolution makes the root tsc lint resolve this .d.mts instead of the JSDoc-typed .mjs, so the root wrapper failed to typecheck against members it relies on. Declare the missing exports (createForNewIdentity, AddressKeyManager, KEY_SPECS, dip13KeyPath), export ConnectedDashClientLike, and widen createClient's return to ConnectedDashClientLike & EvoSDK so the wrapper sees the full SDK surface.
Move prettier and typescript from on-the-fly npx invocations to pinned devDependencies, and call the local binaries directly in the fmt and lint scripts.
Fetch the identity after resolving its ID and print the balance, converting credits to DASH (1000 credits = 1 duff, 1e8 duffs = 1 DASH).
|
Warning Review limit reached
More reviews will be available in 26 minutes and 36 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
The root
npm run lintwas failing againstsetupDashClient.mjs. This branch fixes the typecheck, pins the tooling it depends on, and adds an identity balance readout toview-wallet.mjs.What changed
setupDashClient-core.d.mtswas added as a narrow typed boundary for the example apps and only declared the subset they consume. Because the roottscresolves this.d.mtsinstead of the JSDoc-typed.mjs, the wrapper failed to typecheck against members it relies on. Declared the missing exports and widenedcreateClient's return to the full SDK surface; the example apps' imports are unaffected.prettierandtypescriptfromnpxto pinneddevDependenciesand pointed thefmt/lintscripts at the local binaries.view-wallet.mjsnow fetches the identity and prints its balance in credits and DASH.Test plan
npm run lintpasses (previously errored)node view-wallet.mjsshows the identity balance line