feat(account): introduce AccountDataKey and update related exports an… - #83
Merged
N-i-xx merged 1 commit intoAug 25, 2026
Merged
Conversation
…d tests - Added AccountDataKey for horizon account data-entry names to avoid naming collisions. - Updated exports in account module and index files to reflect the new naming. - Modified smoke tests and other related tests to use AccountDataKey instead of the previous DataKey. - Enhanced README to document the new account module features.
N-i-xx
approved these changes
Aug 25, 2026
8 tasks
|
Merged — thanks for the contribution! If you've got a moment, a rating on GrantFox helps the project. |
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.
Related issue
Closes #67
Summary
The account module (
loader,data,balances,types) was compiled intodistbut never re-exported from the package root, so consumers of@vero-protocol/sdkcould not importAccountLoader. This PR adds the root export, renames the account-sideDataKeytoAccountDataKeyto avoid colliding with the contract storageDataKey, and adds a root-barrel regression test so future modules cannot be omitted the same way.Changes made
src/index.ts(export * from './account/index.js'), soimport { AccountLoader } from '@vero-protocol/sdk'type-checks and resolves.DataKeytoAccountDataKeyinsrc/account/data.tsand updated the account barrel plus local tests, leaving the protocolDataKeyinsrc/typesunchanged.src/__tests__/index.test.ts, which imports from the package root, asserts account symbols are present, keepsDataKeyandAccountDataKeydistinct, and checks that every module directory is reachable from the root barrel (contractremains excluded becauseexport *would collide onTask/Vote/SubmitResult).scripts/smoke-test.mjsso CJS/ESM entry points and declaration files must exposeAccountLoaderandAccountDataKey.Testing performed
npm test— 14 suites, 192 tests passed.npm run test:coverage— coverage thresholds met (stmts 93.03%, branches 84.89%, funcs 95.23%, lines 95.37%).npm run typecheck— no errors.npm run lint— no errors.npm run build— CJS + ESM succeeded with no duplicate-export error forDataKey.npm run test:package— smoke-test OK; 13 exports verified in CJS and ESM, includingAccountLoaderandAccountDataKey.npm run size— 4.75 kB / 6.5 kB budget.npm run docs— TypeDoc generated without errors.Checklist
npm testpassesnpm run typecheckreports no errorsnpm run lintreports no errorsCloses #<issue-number>