Skip to content

Unify and improve SDK#760

Merged
feruzm merged 7 commits intodevelopfrom
unify
Apr 17, 2026
Merged

Unify and improve SDK#760
feruzm merged 7 commits intodevelopfrom
unify

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented Apr 17, 2026

Summary by CodeRabbit

  • New Features

    • SDK adds native Hive transaction support: build, sign, broadcast, check status, and encrypted memos.
  • Chores

    • Consolidated legacy transaction package into the unified SDK and updated cryptography/serialization dependencies for improved reliability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

Warning

Rate limit exceeded

@github-actions[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 31 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 31 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 153df8b4-8b1e-4b49-b829-2c0741dc169c

📥 Commits

Reviewing files that changed from the base of the PR and between c84d6e8 and 40ae6db.

⛔ Files ignored due to path filters (7)
  • packages/sdk/dist/browser/index.d.ts is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.cjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.mjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.mjs.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (7)
  • packages/sdk/CHANGELOG.md
  • packages/sdk/package.json
  • packages/sdk/src/hive-tx/helpers/aes.ts
  • packages/sdk/src/hive-tx/helpers/call.ts
  • packages/sdk/src/hive-tx/types.ts
  • packages/wallets/CHANGELOG.md
  • packages/wallets/package.json
📝 Walkthrough

Walkthrough

Move Hive transaction/crypto/call implementations into @ecency/sdk, remove @ecency/hive-tx workspace usage, add a new hive-tx implementation inside the SDK (crypto helpers, serializers, RPC/REST callers, Transaction class), and update imports across apps/packages to use the new SDK surface or local hive-tx module.

Changes

Cohort / File(s) Summary
Workspace manifests
apps/self-hosted/hosting/api/package.json, apps/self-hosted/package.json, apps/web/package.json, packages/sdk/package.json, packages/wallets/package.json
Removed @ecency/hive-tx entries; added/adjusted @ecency/sdk workspace usage and updated SDK peer/runtime deps.
SDK hive-tx core (new)
packages/sdk/src/hive-tx/index.ts, packages/sdk/src/hive-tx/types.ts, packages/sdk/src/hive-tx/Transaction.ts, packages/sdk/src/hive-tx/config.ts, packages/sdk/src/hive-tx/api-types.ts
Added new internal hive-tx public surface: types, config, Transaction class (digest/sign/broadcast/status) and API method typing.
SDK helpers & serializers (new)
packages/sdk/src/hive-tx/helpers/* (ByteBuffer.ts, HexBuffer.ts, PrivateKey.ts, PublicKey.ts, Signature.ts, Asset.ts, aes.ts, memo.ts, serializer.ts, deserializer.ts, call.ts, utils.ts, sleep.ts)
Implemented cryptography, key formats, signature handling, memo AES, serializers/deserializers, node-aware RPC/REST callers with health/failover, and utility functions.
SDK build config
packages/sdk/tsup.config.ts, packages/wallets/tsup.config.ts
Updated externals for bundling: removed @ecency/hive-tx; added/externalized noble libs and bs58.
SDK modules & re-exports
packages/sdk/src/modules/core/*
Rewrote re-exports to use local hive-tx module; removed legacy init/set functions and unified hive node config to use hiveTxConfig.
Import/type migrations
many files across apps/web, apps/self-hosted, packages/sdk, packages/wallets (src/**/*.ts(x))
Replaced imports from @ecency/hive-tx with @ecency/sdk or relative .../hive-tx for values and types (PrivateKey, PublicKey, Operation, callRPC, hiveTxConfig, etc.).
Broadcast & adapters
apps/web/src/providers/sdk/broadcast-adapter.ts, apps/web/src/providers/sdk/web-broadcast-adapter.ts, apps/web/src/api/mutations/create-community.ts
Consolidated broadcast/adapter type/value imports to the SDK hive-tx surface; adjusted adapter type imports to match new types.
Self-hosted backend usage
apps/self-hosted/.../payment-listener.ts, apps/self-hosted/.../routes/auth.ts, apps/self-hosted/.../services/tenant-service.ts
Switched server-side imports to SDK-provided callRPC/hiveTxConfig and updated package manifest to workspace SDK.
Tests & mocks
apps/web/src/specs/*, apps/web/src/specs/setup-any-spec.ts, apps/web/src/specs/features/next-middleware/post-age-cache.spec.ts, apps/web/src/specs/master-password.spec.ts
Updated Vitest mocks and test imports to target @ecency/sdk and adjusted mocked exports to the new SDK surface.
Consumers & UI
multiple apps/web/src/... (auth, keys, wallet, tipping, signing, permissions components)
Updated cryptography and operation type imports to the SDK surface; component APIs unchanged but now reference SDK implementations/types.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant SDK as "@ecency/sdk (Transaction & callRPC)"
  participant Hive as "Hive Node(s)"
  Client->>SDK: build transaction (operations)
  Client->>SDK: sign(keys)
  SDK->>Hive: condenser_api.broadcast_transaction(tx)
  Hive-->>SDK: RPC response (tx accepted or duplicate)
  alt checkStatus enabled
    SDK->>Hive: transaction_status_api.find_transaction(tx_id) [polling]
    Hive-->>SDK: status (confirmed|pending|failed)
    SDK-->>Client: BroadcastResult { tx_id, status }
  else no checkStatus
    SDK-->>Client: BroadcastResult { tx_id, status: "unknown" }
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested labels

patch

"I hopped through bytes and nodes tonight,
Keys tucked in fur, signatures bright.
SDK now shelters hive-tx's art,
Transactions signed with rabbit heart.
Hooray — the codebase snuggles tight!" 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Unify and improve SDK' accurately describes the main objective of the changeset, which replaces the separate @ecency/hive-tx dependency with unified implementation in @ecency/sdk across the entire codebase.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch unify

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@feruzm feruzm added the patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR label Apr 17, 2026
@feruzm feruzm added minor:sdk Minor bump for @ecency/sdk and removed patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR labels Apr 17, 2026
@feruzm feruzm merged commit 4a1887a into develop Apr 17, 2026
1 check passed
@feruzm feruzm deleted the unify branch April 17, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor:sdk Minor bump for @ecency/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant