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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ichigo-sdk

v0.3.1

Published

Web3 Wallet SDK - Using AA (ERC-4337) and WebAuthn (PassKeys).

Downloads

14

Readme

🍓 Ichigo SDK

Web3 Wallet SDK - Using AA (ERC-4337) and WebAuthn (PassKeys).

Features:

  • Fully customisable UI
  • Integrated Paymaster support - Alchemy, Stackup, Custom.
  • No Extensiosn, No new apps necessary - Works directly into browser
  • Batch operations
  • Easy to use
  • Secured by web standard WebAuthn - Trusted by companies like Apple & Google.

Notes

Few important notes:

  • Users are identified by username - unique string
  • Each username has its own unique account address
  • Passkeys are used for authentication.
  • username is connected to the specific Passkey. The user who owns the Passkey, owns the account.
  • AA wallet is created on the first write operation. However you can always get the wallet address by username.

Current limitations

  • Chain: Base Sepolia
  • Browsers: Chrome, Brave

Initialization

Using Alchemy paymaster and bundler:

import { IchigoSDK } from "ichigo-sdk";

/**
 * You can get RPC URL and PolicyID from Alchemy Dashboard:
 * https://dashboard.alchemy.com/apps
 * https://dashboard.alchemy.com/gas-manager
 */

const RPC_URL =
  "https://base-sepolia.g.alchemy.com/v2/JOMsB_RG7ymuGmGM1NqlFRXuwYJ1E1Yh";
const POLICY_ID = "ae7829c6-25de-4150-9cc8-274d53bf209a";

export const sdk = new IchigoSDK({
  rpc: RPC_URL,
  paymaster: {
    type: "ALCHEMY",
    policyId: POLICY_ID,
    rpc: RPC_URL,
  },
});

Mint

Mint NFT (ERC721):

await sdk.mint({
  type: "ERC721",
  contractAddress: "0x10bb2Ee7761C2356F7D7e42311b0fDf8e5e4dCA1",

  username: "user_unique_username", // passkey will be attached to the username
});

Mint ERC20:

await sdk.mint({
  type: "ERC20",
  contractAddress: "0x72788aAd0e291cDC498dd814dE76c34ae2d46a39",

  username: "user_unique_username",
});

Transfer

Transfer NFT (ERC721):

await sdk.transfer({
  type: "ERC721",
  contractAddress: "0x10bb2Ee7761C2356F7D7e42311b0fDf8e5e4dCA1",
  toAddress: "0x91D76D31080ca88339a4E506aFfB4dED4b192bCb",
  id: 117,

  username: "user_unique_username",
});

Transfer ERC20:

await sdk.transfer({
  type: "ERC20",
  contractAddress: "0x10bb2Ee7761C2356F7D7e42311b0fDf8e5e4dCA1",
  toAddress: "0x91D76D31080ca88339a4E506aFfB4dED4b192bCb",
  count: 7,

  username: "user_unique_username",
});

Batch Call (Custom)

Low-level api to implement any smart contract call(s) into a single transaction:

const toAddress = "0x91D76D31080ca88339a4E506aFfB4dED4b192bCb";
const count = 7;

await sdk.batchCall(
  [
    {
      contractAddress: "0x10bb2Ee7761C2356F7D7e42311b0fDf8e5e4dCA1",
      fnName: "transfer",
      args: () => [toAddress, count], // function arguments
      abi: [/* ABI goes here */],
    },
  ],
  {
    username: "user_unique_username",
  }
);

Utility

You can always get the wallet address of any username. It will not do any operation on-chain.

const walletAddress = await sdk.getWalletAddress("user_unique_username");