
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@dcprotocol/wallet-core
Advanced tools
Pure, dependency-light DCP wallet brain: tx build, decode, validation, and shared error types. No storage, no key custody, no native deps — safe to import from Node, browser, and React Native.
The pure wallet brain for DCP — transaction building, decoding, validation, the execution runner, and the shared protocol error type. Zero native dependencies, no storage, no key custody, no UI — so it imports identically in Node (the vault server, agents), the browser, and React Native (the mobile app).
This is the single source of truth for wallet logic. Higher packages
(@dcprotocol/core, @dcprotocol/vault, the official apps) build their platform
adapters on top of it, so a fix / feature / fee change happens once and every
surface gets it.
| Area | Exports |
|---|---|
| Build | buildSolanaTransferTx, buildSplTransferTx, getSolanaAtaAddress |
| Decode / validate | verifyTransferTx (anti-blind-sign), getTransactionSigners, getTransactionProgramIds |
| Swap safety | validateSwapQuote (quote↔intent), validateSwapTransaction (sole-signer + program allow-list), idempotencyIntentMatches |
| Jupiter | jupiterQuote, jupiterBuildSwapTx (fee + endpoint injected, never hardcoded) |
| Tokens | resolveToken, resolveSwapToken, WSOL_MINT, DEFAULT_KNOWN_TOKENS |
| Reads | SolanaReader (balances, tx status, history, token search) |
| Runner | executeTransfer, executeSwap + the ports (Signer, RpcClient, BudgetStore, IdempotencyStore, ApprovalUI, ActivityRecorder, ConfigProvider, SwapProvider) |
| Consent | ConsentRequiredError, normalizeApproval (supports both inline-PIN and async approve-later) |
| Errors | VaultError, VaultErrorCode (the shared protocol error type) |
@solana/web3.js, @solana/spl-token, fetch. A native
dependency (sqlite/sodium/keychain) would break the React Native build — that is the
whole reason this package exists separately from @dcprotocol/core.Signer port.import { executeTransfer, type TransferPorts } from '@dcprotocol/wallet-core';
const ports: TransferPorts = { signer, rpc, approval, budget, idempotency, activity };
const result = await executeTransfer(
{ chain: 'solana', to, amount, currency: 'SOL', idempotencyKey },
ports,
);
The runner runs: idempotency → build → validate → budget → approval → sign(port) → verify-after-sign → submit → record-on-success. Approval may return a boolean
(inline PIN) or { deferred, consentId } (async consent) — the latter throws
ConsentRequiredError for the host to surface as requires_consent.
Apache-2.0
FAQs
Pure, dependency-light DCP wallet brain: tx build, decode, validation, and shared error types. No storage, no key custody, no native deps — safe to import from Node, browser, and React Native.
The npm package @dcprotocol/wallet-core receives a total of 16 weekly downloads. As such, @dcprotocol/wallet-core popularity was classified as not popular.
We found that @dcprotocol/wallet-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.