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

@gomuweb3/sdk

v0.2.7

Published

Create Web 3 experiences easily with Gomu SDK.

Readme

Gomu SDK

Create Web 3 experiences easily with Gomu SDK.

Installation

Install with npm:

npm install @gomuweb3/sdk

Install with yarn:

yarn add @gomuweb3/sdk

Getting Started

Initialization

Initialization with metamask (wallet accounts must be connected first) and ethers:

import { Web3Provider } from '@ethersproject/providers';
import { Gomu } from '@gomuweb3/sdk';
// OR
const { Gomu } = require('@gomuweb3/gomu'); // commonjs

const provider = new Web3Provider(window.ethereum);

const gomuSdk = new Gomu({
  provider,
  signer: provider.getSigner(),
  address: '<ACCOUNT_ADDRESS>',
  chainId: 1, // defaults to 1
  openseaConfig: { apiKey: '<API_KEY>' },
});

NodeJS example with Ropsten network:

npm install @gomuweb3/sdk ethers @truffle/hdwallet-provider
import { Web3Provider } from '@ethersproject/providers';
import { Wallet } from '@ethersproject/wallet';
import HDWalletProvider from '@truffle/hdwallet-provider';
import { Gomu } from '@gomuweb3/sdk';

const networkUrl = '<ALCHEMY_OR_INFURA_URL>';
const mnemonic = '<WALLET_MNEMONIC>';

const provider = new HDWalletProvider({
  mnemonic,
  networkUrl,
});

const wallet = Wallet.fromMnemonic(mnemonic);

const gomuSdk = new Gomu({
  provider: new Web3Provider(provider),
  signer: wallet,
  address: wallet.address,
  chainId: 3, // ropsten
});

React hook example that re-initializes sdk on chainId/address change:

import { useMemo } from 'react';
import { Web3Provider } from '@ethersproject/providers';
import { Gomu } from '@gomuweb3/sdk';

const useGomuSdk = (chainId, address) => {
  return useMemo(() => {
    const provider = new Web3Provider(window.ethereum);

    return new Gomu({
      provider,
      signer: provider.getSigner(),
      address,
      chainId,
      openseaConfig: { apiKey: process.env.REACT_APP_OPENSEA_KEY },
    });
  }, [chainId, address]);
};

Please note that some node-native sub-dependencies aren't polyfilled in Webpack 5, so consider using other versions of Webpack. If you are using create-react-app, then downgrading react-script to version 4 might help.

Usage

Creating sell orders for asset on opensea and traderxyz in WETH on mainnet:

const YOUR_ASSET = {
  contractAddress: '<ASSET_CONTRACT_ADDRESS>',
  tokenId: '<TOKEN_ID>',
  type: 'ERC721', // or ERC1155
};

const WETH_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; // WETH ERC20 Contract Address
const amount = 12000000000000000000n; // 12 WETH in BigInt
// OR
const amount = BigInt('12000000000000000000');

gomuSdk.makeSellOrder({
  assets: [YOUR_ASSET],
  erc20Asset: {
    contractAddress: WETH_ADDRESS
    amount,
  },
}).then(console.log); // Order[]

// alternative with makeOrder method

gomuSdk.makeOrder({
  makerAssets: [YOUR_ASSET],
  takerAssets: [{
    contractAddress: WETH_ADDRESS,
    amount,
    type: 'ERC20',
  }],
}).then(console.log); // Order[]

Creating buy orders in WETH on mainnet:

const WETH_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; // WETH ERC20 Contract Address
const amount = 33000000000000000000n; // 33 WETH in BigInt

const TARGET_ASSET = {
  contractAddress: '<ASSET_CONTRACT_ADDRESS>',
  tokenId: '<TOKEN_ID>',
  type: 'ERC721', // or ERC1155
};

gomuSdk.makeBuyOrder({
  assets: [TARGET_ASSET],
  erc20Asset: {
    contractAddress: WETH_ADDRESS,
    amount,
  },
}).then(console.log); // Order[]

// alternative with makeOrder method

gomuSdk.makeOrder({
  makerAssets: [{
    contractAddress: WETH_ADDRESS,
    amount,
    type: 'ERC20',
  }],
  takerAssets: [TARGET_ASSET],
}).then(console.log); // Order[]

Get orders where you are maker, and cancel first one:

const getOrdersThenCancelFirstOne = async() {
  const { orders } = await gomuSdk.getOrders({
    maker: '<YOUR_ACCOUNT_ADDRESS>',
  });
  const cancelledResponse = await gomuSdk.cancelOrder(orders[0]);
};

Get orders for specific asset for sale and take first order. Do note, when implementing this, orders are not sorted by value, so you probably want to sort for higher values:

const getOrdersThenTakeFirstOne = async() {
  const { orders } = await gomuSdk.getOrders({
    makerAsset: {
      contractAddress: '<ASSET_CONTRACT_ADDRESS>',
      tokenId: '<TOKEN_ID>',
      type: 'ERC721',
    },
  });
  const takenOrderResponse = await gomuSdk.takeOrder(orders[0]);
};