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

@moveindustries/movewright

v1.0.1

Published

End-to-End (E2E) testing for dApps using Playwright + Move Wallets

Readme

movewright

E2E testing for dApps using Playwright + Move Wallets on Movement Network

Installation

npm install @moveindustries/movewright
yarn add @moveindustries/movewright

Usage

Quick setup

Declare the wallet on each Playwright project, then use the fixture the package ships. One spec then runs against every wallet listed.

// playwright.config.ts
import { defineConfig } from '@playwright/test';
import { NightlyWallet } from '@moveindustries/movewright';

export default defineConfig({
  use: { headless: false },
  projects: [
    {
      name: 'Nightly',
      metadata: {
        wallet: 'nightly',
        version: NightlyWallet.recommendedVersion,
        seed: 'pioneer casual canoe gorilla embrace width fiction bounce spy exhibit another dog',
        password: 'password1234!@#$',
      },
    },
  ],
});
// wallet.spec.ts
import { expect } from '@playwright/test';
import { testWithMovewright } from '@moveindustries/movewright/fixtures';

const test = testWithMovewright();

test('should be able to connect', async ({ wallet, page }) => {
  // https, not http: wallets restrict their injected provider to secure
  // origins, so a dApp served over http is invisible to them.
  await page.goto('https://localhost:8080');

  await page.click('.connect-button');
  await wallet.approve();

  await page.waitForSelector('#connected');
  expect(await wallet.getAccountAddress()).toMatch(/^0x[0-9a-f]+$/i);
});

An extension needs a persistent browser context, which Playwright's own context fixture cannot create, so the fixture makes one at worker scope and hands it back. page and context work as you would expect, with one caveat: because the context is created by the package rather than by Playwright's own factory, the config options that factory applies — trace, video, screenshot, viewport, baseURL — do not reach it. Pass an argument to testWithMovewright({ ... }) to override the project metadata for one spec.

The fixture is a separate entry point because it imports @playwright/test. Importing the package itself never pulls the test runner in, so a consumer using only bootstrap does not need it installed.

If you would rather wire it yourself, bootstrap is still exported and returns [wallet, page, context].

API Reference

Network Management

The wallet provides full network management capabilities:

  • switchNetwork(network: string) - Switch between available networks (e.g., "Movement", "Bardock Testnet")
  • addNetwork(options: AddNetwork) - Point the current chain at a custom RPC endpoint
  • updateNetworkRpc(options: UpdateNetworkRpc) - Update the RPC URL for an existing network
  • hasNetwork(name: string) - Check if a network exists
  • confirmNetworkSwitch() - Confirm network switch requests from dApps

Motion compiles its two networks in and ships no custom-network UI, so addNetwork and updateNetworkRpc throw there rather than silently doing nothing.

Accounts

  • getAccountAddress() - The active account's address, in full
  • renameAccount(name: string) - Rename the active account
  • switchAccount(name: string) - Switch to another account
  • countAccounts() - How many accounts the wallet holds
  • createAccount(name?: string) - Add a new account, optionally naming it
  • importPK(privateKey: string, name: string) - Import an account from a private key

Neither wallet shows the full address in its header, so getAccountAddress reads it off the surface that does: Motion's receive card, and for Nightly the clipboard write its header fires.

Nightly names accounts itself and offers no naming step while creating one, so createAccount(name) creates and then renames.

Both wallets discard a name past their own limit without reporting anything — 15 characters for Nightly, 32 for Motion, readable as NightlyWallet.walletNameMaxLength and MotionWallet.walletNameMaxLength — so renameAccount, createAccount and importPK all refuse a longer name with a RangeError rather than leaving you with a name you cannot switch back to. Renaming to the name an account already has succeeds on both; Motion short-circuits, since it keeps its Save control disabled until the field changes.

Motion derives accounts inside its service worker and has no add-account control, so createAccount throws there whatever it is passed.

Navigation

  • openSettings() - Open the wallet's settings
  • goBackToHomePage() - Return to the wallet's home view
  • lock() / unlock(password?) - Lock and unlock the wallet

Example: Update Network RPC

// Point the current chain at a different RPC endpoint
await wallet.updateNetworkRpc({
  rpc: 'https://new-rpc-endpoint.example.com',
});

Special Thanks

This project is a fork of the Chainsafe and TenKeylabs version of dAppeteer and Metamask/Coinbase wallets.