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

@wireio/stake

v3.1.2

Published

WireDev v3 Outpost and LIQ SDK

Readme

@wireio/stake

@wireio/stake version 3.1.0 targets WireDev v3 Outpost and LIQ staking integrations. The package name remains @wireio/stake; "Outpost" is the WireDev v3 infrastructure/API domain used by the EVM and Solana clients.

GitHub Release Notes: v3.0.1

@wireio/stake 3.0.1 is a breaking refactor from the experimental staking SDK surface to the current WireDev v3 Outpost/LIQ infrastructure.

Highlights:

  • Rebuilt the EVM integration around the new WireDev v3 contract suite: OPP, OPPInbound, ReserveManager, StakingManager, OperatorRegistry, OutpostManager, BAR, and the LIQ contracts.
  • Added EvmOutpostClient with ABI-aligned helpers for native/LiqETH conversion, queued withdrawals, LIQ staking, pretoken purchases, reserve creation/cancellation, swap requests, operator collateral, BAR bonding, OPP epoch reads/submits, and portfolio/status reads.
  • Aligned EVM reserve creation with the current ReserveManager ABI: reserve creates now require isPrivate and the creator's compressed secp256k1 creatorPubKey.
  • Preserved the Staker facade and familiar staking-domain methods where they map cleanly to v3 contracts: deposit, withdraw, stake, unstake, buy, depositAndStake, depositAndBuy, and unstakeAndWithdraw.
  • Updated WireDev EVM to chain id 31337 and the VM RPC target https://ethereum-vm.gitgo.app, with future-proof registry slots for additional EVM chains once their v3 artifacts and address books exist.
  • Updated the WireDev EVM address book to the current deployment set, including OPP, reserve/staking managers, LIQ contracts, linked libraries, and mock/test helper addresses.
  • Added the Solana WireDev opp_outpost IDL/type surface while keeping the existing liqSOL program layout intact. WireDev Solana type helpers now derive directly from their checked-in JSON IDLs so imported artifacts and SDK types stay in sync during the v3 rollout.
  • Kept deprecated legacy EVM entrypoints as explicit failures where possible so old imports fail with actionable migration messages instead of silently calling removed contracts.

Breaking changes and removals:

  • Legacy EVM Depositor, Pretoken, ReceiptNFT, Pool, EthUsdPriceConsumer, bridge, and Instaswap flows are no longer part of the live WireDev v3 contract model.
  • EVM stake-to-Wire account-name variants and the pre-reserve bridge/Instaswap clients are removed; swaps use ReserveManager/OPP requests.
  • IStakingClient remains only as a deprecated alias; new code should use IOutpostClient.
  • This release is not intended to support the legacy experimental EVM infrastructure and WireDev v3 side by side.

Known follow-up work:

  • Add mainnet/Hoodi/Monad/Polygon contract deployments when v3 artifacts are available.
  • Complete additional chain deployments as their ReserveManager/OPP artifacts become available.
  • Add OPP reserve programs for public Solana devnet/mainnet when matching deployments and IDLs are available.

Current Direction

Version 3.0.1 is not backward compatible with the earlier experimental SDK. The EVM WireDev artifact set no longer exposes the old Depositor, Pretoken, ReceiptNFT, Pool, EthUsdPriceConsumer, legacy bridge, or legacy Instaswap contracts. The SDK now treats the new infrastructure names as the public integration model:

  • EVM Outpost: OPP, OPPInbound, ReserveManager, StakingManager, OperatorRegistry, OutpostManager, BAR
  • EVM LIQ: LiqEthToken, DepositManager, StakingModule, YieldOracle, WithdrawalQueue
  • Solana WireDev: existing liqSOL programs plus the new opp_outpost program

Mainnet, Hoodi, Monad, and Polygon remain in the chain registry for connection/read-only future proofing, but the WireDev v3 EVM contract service is currently configured only for WireDev chain id 31337.

Important IDs

  • EVM_WIRE_DEVNET_CHAIN_ID: 31337
  • SOL_WIRE_DEVNET_CHAIN_ID: wiredev
  • Solana OPP Outpost program: derived from src/assets/solana/wiredev/idl/opp_outpost.json

Primary Usage

import {EVM_WIRE_DEVNET_CHAIN_ID, EvmOutpostClient, Staker} from '@wireio/stake';
import {ethers} from 'ethers';

const provider = new ethers.providers.Web3Provider(window.ethereum);

const client = new EvmOutpostClient({
    provider,
    network: {
        chainId: EVM_WIRE_DEVNET_CHAIN_ID,
        name: 'WireDev EVM',
        rpcUrls: ['https://ethereum-vm.gitgo.app'],
        nativeCurrency: {symbol: 'ETH', decimals: 18},
    },
});

const summary = await client.getOutpostSummary();
const reserve = await client.getReserve(1n, 1n);

Staker still exists as the multi-chain selector used by Hub. It keeps the staking-domain convenience methods (deposit, withdraw, stake, unstake, buy) where those actions still exist, and concrete clients expose more explicit modules for reserves, swaps, operators, OPP, and chain-specific details.

EVM v3 Methods

EvmOutpostClient exposes ABI-aligned helpers:

  • Reserve lifecycle: createNativeReserve, createErc20ReserveWithApproval, createErc20ReserveWithPermit, cancelReserve, getReserve, reserveBalance
  • Reserve create helpers verify the configured ReserveManager interface and chain/token setup before opening a value-bearing wallet transaction. A stale deployment address now fails locally with a configuration error instead of broadcasting against an incompatible proxy. Reserve creates also treat a failed gas simulation as a blocking error rather than substituting the general write fallback gas limit.
  • Swap requests: requestNativeSwap, requestErc20SwapWithApproval, requestErc20SwapWithPermit
  • LIQ conversion: depositNativeForLiqETH, requestLiqETHWithdrawal, claimLiqETHWithdrawal, getPendingWithdraws
  • LIQ staking: stakeLiqETH, withdrawStakedLiqETH, refundStakedLiqETH
  • Pretokens: purchaseWirePretokensWithLiqETH, purchaseWirePretokensFromYield
  • Operators/BAR: depositOperatorCollateral, depositNonNativeOperatorCollateral, withdrawOperatorCollateral, commitUnderwriteIntent, bondActor, unbondActor
  • OPP: emitOutboundEnvelope, finalizeOppEpoch, submitInboundEpoch
  • Reads: getContracts, getNativeBalance, getErc20Balance, getPortfolio, getOutpostSummary

The flat compatibility methods map to the v3 contracts as follows:

  • deposit(amount) -> DepositManager.deposit() through depositNativeForLiqETH
  • withdraw(amount) -> LiqEthToken.safeBurn(...) through requestLiqETHWithdrawal
  • stake(amount) -> StakingManager.stakeLiqETH(...)
  • unstake(tokenId) -> StakingManager.withdrawStake(...) through withdrawStakedLiqETH
  • buy(amount) -> StakingManager.purchasePretokensWithLiqETH(...)
  • depositAndStake(amount) and depositAndBuy(amount) run two-step flows using the net liqETH minted by the deposit event when available
  • unstakeAndWithdraw(tokenId) withdraws the stake to liqETH, then burns the received liqETH into a withdrawal request

Reserve-create helpers require the current ABI payload:

await client.createNativeReserve({
    tokenCode,
    reserveCode,
    externalTokenAmount,
    requestedWireAmount,
    connectorWeightBps,
    name,
    description,
    isPrivate: false,
    creatorPubKey, // 33-byte compressed secp256k1 key for the connected EVM signer
});

Deprecated from v3

These legacy flows are intentionally deprecated for WireDev v3:

  • getTrancheSnapshot for EVM pretoken ladders
  • EVM validatorDeposit
  • stake(amount, wireAccount) / depositAndStake(amount, wireAccount) account-name variants from Depositor.stakeLiqETHToWire
  • Pre-reserve Instaswap and bridge-deposit helpers

New swap flows call ReserveManager through EvmOutpostClient, the Solana opp_outpost program through SolanaSwapClient, and sysio.uwrit for WIRE-origin submission and final lifecycle state.

The Depositor-era Pretoken unit test and local transaction/routing scripts have also been retired. They imported the removed src/networks/ethereum tree and were not valid compatibility coverage. Active tests now exercise only the v3 client surface; local EVM smoke checks start from EvmOutpostClient.

Solana WireDev

The existing four Solana program IDLs remain in place. WireDev now also includes:

  • IDL: src/assets/solana/wiredev/idl/opp_outpost.json
  • Type helper: src/assets/solana/wiredev/types/opp_outpost.ts
  • Program lookup name: oppOutpost
  • Program ID constant: PROGRAM_IDS_BY_CHAIN[SOL_WIRE_DEVNET_CHAIN_ID].OPP_OUTPOST

The changed WireDev Solana type helpers (liqsol_core, opp_outpost, transfer_hook, and validator_leaderboard) intentionally derive their exported TypeScript shape from the adjacent JSON IDL. This avoids stale generated literal types while the backend programs are still changing. liqsol_token remains unchanged for this refresh.

Reserve lifecycle helpers use the PDA seed contract confirmed in the matching wire-solana program source. They are available through either client.reserves or the standalone SolanaReserveClient:

const signature = await solanaClient.reserves.create({
    tokenCode,
    reserveCode,
    externalTokenAmount,
    requestedWireAmount,
    connectorWeightBps: 5_000,
    name: 'USDC / WIRE',
    description: 'Public Solana reserve',
    isPrivate: false,
    mint: usdcMint,
});

const reserve = await solanaClient.reserves.get({tokenCode, reserveCode});

create ensures the creator's classic SPL associated token account by default, derives the reserve/vault/config/message-buffer PDAs, and submits the current opp_outpost::create_reserve account shape. Matching and WIRE collateral remain Wire-chain operations owned by @wireio/sdk-core's sysio.reserv client.

The same client exposes current native and classic-SPL source escrow through client.swaps. The returned Solana signature confirms source submission, not cross-chain settlement; applications should read sysio.uwrit for relay, underwriting, completion, and revert state.

const signature = await solanaClient.swaps.requestNative({
    sourceTokenCode: solTokenCode,
    sourceReserveCode: primaryReserveCode,
    sourceAmount: 100_000_000n,
    targetChainCode: wireChainCode,
    targetTokenCode: wireTokenCode,
    targetReserveCode: primaryReserveCode,
    targetRecipient: new TextEncoder().encode('alice'),
    targetAmount: quotedWireAmount,
    targetToleranceBps: 500,
});

Both EVM and Solana creation paths validate the shared depot constraints before opening a wallet prompt, including the portable connector-weight range of 1–9,999 and the on-chain UTF-8 metadata limits.

Commands

npm ci
npx tsc -p tsconfig.json --noEmit
npm run prepare
npm test

Notes for Hub Migration

Use WireDev as the first v3 target. Keep the familiar staking actions in Hub where the user intent is unchanged, but route advanced outpost work through the explicit modules: client.reserves, client.swaps, client.operators, and client.opp. Add mainnet/Hoodi/Monad/Polygon deployments when their v3 artifacts and address books are available.