npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ultratestbro/wdk-swidge-core

v0.2.0

Published

Shared WDK Swidge protocol engine, validation, execution and provider interfaces.

Readme

@ultratestbro/wdk-swidge-core

Shared WDK Swidge protocol engine, validation, execution and provider interfaces.

Installation

npm install @ultratestbro/wdk-swidge-core @tetherto/wdk-wallet

What's inside

Two layers. The engine speaks CrossChainProviderenabled(), supportsRoute(), getQuote(), buildDeposit(), trackIntent(), plus optional notifyDeposit/registerSignedOrder/preflightDeposit hooks — and knows nothing about keys. On top of it BaseSwidgeProtocol and SingleProviderSwidge implement the WDK SwidgeProtocol contract: they translate SwidgeOptions into engine parameters, bind the account, and execute.

The execution path is chosen by the shape of the unsigned transaction, not by provider name: calldata means an EVM send with approval handling (including the Ethereum-USDT approve-to-zero dance); a bare to+value means a native transfer whose amount is re-checked against the quote; a token id means an SPL / TON jetton / TRC-20 transfer through the account's official transfer() capability; a memo or a base64 cell means TON, the latter only with an injected decoder; typed data means a signed EIP-712 order with no source transaction at all.

CrossChainRouter quotes providers in parallel under a per-provider timeout, validates every candidate before it can be scored, and ranks on price, speed and reliability. Aggregation on top of it lives in wdk-protocol-swidge-router.

remoteProvider moves provider REST/WebSocket calls (and their secrets) behind an HTTP boundary while the whole WDK layer — account binding, approvals, id lifecycle — stays on the client. It ships no quote-integrity binding across that boundary: a deployment that splits quote and build should seal quotes itself, e.g. an HMAC over every execution-relevant field, verified before build.

Durable status ids (wdk1.<venue>.<intent>.<sourceTxHash>) let getSwidgeStatus resolve a swap on a process that never quoted it, and typed errors (WdkSwidgeError and codes) keep the WDK boundary machine-readable.

Extension points: write a CrossChainProvider for a new venue, adapt any SwidgeProtocol or BridgeProtocol module, inject decodeTonBody, or replace the scoring engine outright.

Safety contract

  • This is a support package, not a WDK protocol module: it implements no protocol interface and is installed as a dependency of the modules that do.
  • Non-EVM token-source deposits use the official WDK account transfer({ token, recipient, amount }) capability. They fail closed when the bound account does not expose it; token metadata is never passed to native sendTransaction().
  • Provider credentials, affiliate settings, endpoints and enablement are explicit constructor options. The package reads no application environment variables.
  • Before production use, validate with limited funds and configure fee caps appropriate for the source asset.

Links

  • Source: https://github.com/ultratestbro/wdk-swidge-modules
  • Upstream discussion: https://github.com/tetherto/wdk/issues/85

Licensed under Apache-2.0.