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

@glideco/recovery

v0.1.0

Published

Pure encoders for Glide's social-recovery primitives. EVM: Zodiac Delay module deploy + queue + execute + cancel. Solana: Squads v4 config-transaction encoders for owner / threshold changes. Operator brings its own KMS-held signer + chain RPC + DB.

Readme

@glideco/recovery

Pure encoders for Glide's social-recovery primitives. Two surfaces:

  • EVM — Safe + Zodiac Delay v1.0.1: deploy + enable the module, queue / execute / cancel a recovery action, read on-chain queue state.
  • Solana — Squads v4: compose the propose-triple (config-tx-create + proposal-create + proposal-approve) for an owner / threshold change, plus proposal-cancel + config-transaction-execute helpers.

I/O-free. Every export is a pure function that produces calldata bytes (EVM) or pre-built TransactionInstruction-shaped objects (Solana). Operators bring their own KMS-held signer, RPC client, and DB.

Install

npm install @glideco/recovery

EVM — recovery proposal end-to-end

import {
  composeEnableRecoveryModuleCalls,
  composeQueueRecoveryCall,
  composeExecuteRecoveryCall,
  RECOVERY_COOLDOWN_SECONDS,
} from '@glideco/recovery';

// 1. Compute the deterministic Delay-module address + the deploy +
//    enable bundle. One user signature on the Safe activates recovery.
const setup = composeEnableRecoveryModuleCalls({
  safe: userSafeAddress,
  recoverySigner: glideRecoveryEvmAddress, // address of the KMS key
  cooldownSeconds: RECOVERY_COOLDOWN_SECONDS, // 72h default
});
// setup = { moduleAddress, deploy: { to, data, value }, enable: { to, data, value } }

// 2. Later, recovery key proposes "rotate to new owner":
const queue = composeQueueRecoveryCall({
  delayModule: setup.moduleAddress,
  inner: {
    to: userSafeAddress,
    value: '0',
    data: encodeSafeSwapOwnerCalldata(/* ... */),
    operation: 0,
  },
});
// queue.calldata is what the recovery key signs + broadcasts.

// 3. After 72h cooldown, anyone can execute:
const execute = composeExecuteRecoveryCall({
  delayModule: setup.moduleAddress,
  inner: queue.inner,
});

EVM — read on-chain queue state

import { readDelayModuleQueueState } from '@glideco/recovery';
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';

const client = createPublicClient({ chain: mainnet, transport: http() });

const state = await readDelayModuleQueueState({
  client,
  delayModule: setup.moduleAddress,
});
// state = { cooldownSeconds, expirationSeconds, queueNonce, txNonce, queue: [...] }

Solana — Squads recovery

import {
  composeSolanaRecoveryAction,
  composeSolanaCancelRecoveryInstruction,
  recomposeSolanaExecuteRecoveryInstruction,
} from '@glideco/recovery';

// Propose: "swap_owner" expands to [RemoveMember, AddMember] under the
// hood because Squads v4 has no atomic SwapMember instruction.
const composed = composeSolanaRecoveryAction({
  multisigPda,
  transactionIndex,
  currentThreshold,
  creator, // recovery key pubkey (= Seat R)
  action: {
    kind: 'swap_owner',
    oldOwner: '<base58>',
    newOwner: '<base58>',
  },
});
// composed.instructions = [configTxCreate, proposalCreate, proposalApprove]
// composed.innerTx       = serialized actions (persisted in DB for replay)

// User-initiated cancel:
const cancel = composeSolanaCancelRecoveryInstruction({
  multisigPda,
  transactionIndex,
  member: userSeatPubkey,
});

// Execute (after cooldown):
const exec = recomposeSolanaExecuteRecoveryInstruction({
  multisigPda,
  transactionIndex,
  member: anyMemberPubkey,
});

Allowlist

The Squads encoder also exports the canonical set of accepted instruction discriminators for the broadcaster's calldata-pinning check:

import {
  RECOVERY_ALLOWED_INSTRUCTION_HEX,
  extractInstructionDiscriminatorHex,
} from '@glideco/recovery';

for (const ix of tx.instructions) {
  const disc = extractInstructionDiscriminatorHex(ix.data);
  if (!RECOVERY_ALLOWED_INSTRUCTION_HEX.has(disc)) {
    throw new Error(
      `recovery tx contains a non-recovery instruction (${disc})`
    );
  }
}

What this package does NOT include

  • KMS / env-var / file-based signer loading. Operators build their own (e.g. ethers.Wallet from KMS, or @solana/web3.js Keypair.fromSecretKey).
  • Database persistence of the multi-step recovery state machine.
  • The Inngest cron that ticks queued recoveries through cooldown → execute.
  • The router that gates "is the user allowed to start recovery on this vault" — that's policy the operator owns.

These live in apps/web/src/server/lib/user-multisig/ on the source repo as a reference implementation operators can fork.

License

MIT.