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

dgen-base-sdk

v0.2.1

Published

React Native wrapper for Ethereum Phone WalletSDK (Android)

Downloads

13

Readme

dgen-base-sdk

React Native wrapper for the Android WalletSDK used on Ethereum Phone custom OS.

  • Uses WalletSDK from JitPack (currently b50e1fa116)
  • Exposes a simple JS API with autolinking on Android
  • Includes OS detection and custom gas estimation via bundler RPC

Install

npm install dgen-base-sdk
# or
yarn add dgen-base-sdk

Android will autolink. Ensure your app-level repositories include JitPack (RN 0.72+ projects typically do). If not, add to your root android/build.gradle:

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}

Usage

import {
  initialize,
  isRunningOnDgen,
  getAddress,
  sendTransaction,
  getChainId,
  signMessage,
} from 'dgen-base-sdk';

await initialize('https://your-bundler.example'); // bundler RPC for gas estimation & submission

const onCustomOS = await isRunningOnDgen();
if (!onCustomOS) {
  // Fallback or inform user
}

const address = await getAddress();
const chainId = await getChainId();

const txHash = await sendTransaction(
  '0xRecipient',
  '0',
  '0x',
);

const sig = await signMessage('hello', chainId);

API

  • initialize(bundlerRpcUrl: string): Promise<void>
  • isRunningOnDgen(): Promise<boolean> // true if Platform is Android and getSystemService("wallet") exists
  • isWalletConnected(): Promise<boolean>
  • isEthOS(): Promise<boolean>
  • getAddress(): Promise<string>
  • getPair(): Promise<{ x: string; y: string } | null>
  • getPrecomputedAddress(pubKeyX: string, pubKeyY: string, salt?: string): Promise<string>
  • encodeSignatureData(r: string, s: string): Promise<string> // returns 0x-prefixed hex
  • encodeInitCode(factoryAddress: string, owners: string[], nonce: string): Promise<string>
  • getGasPrice(bundlerRpcUrl: string): Promise<{ maxFeePerGas: string; maxPriorityFeePerGas: string }>
  • getNonce(senderAddress: string, rpcEndpoint?: string): Promise<string>
  • getChainId(): Promise<number>
  • changeChain(chainId: number, rpcEndpoint: string, bundlerRpcUrl: string): Promise<string>
  • signMessage(message: string, chainId: number, type?: string): Promise<string>
  • sendTransaction(to: string, value: string, data: string, callGas?: string, chainId?: number, rpcEndpoint?: string): Promise<string>
  • sendBatchTransaction(txParamsList: { to: string; value: string; data: string }[], callGas?: string, chainId?: number, rpcEndpoint?: string, bundlerRpcUrl?: string): Promise<string>
  • isDeployed(address: string): Promise<boolean>
  • sendUserOpToBundler(userOp: UserOperation): Promise<string>

Notes:

  • Big integers are accepted/returned as strings. Hex strings should be 0x-prefixed.
  • Android only. On iOS, isRunningOnDgen() returns false and other methods are not available.
  • Gas estimation: the library constructs a dummy-signed UserOperation and calls eth_estimateUserOperationGas on your bundler RPC. It uses exact preVerificationGas and callGasLimit returned by the API and fixes verificationGasLimit to 800k (pre-doubled to 400k before WalletSDK’s internal doubling).

Requirements

  • Android minSdk 24
  • React Native >= 0.72 (tested on 0.82)
  • JDK 17 for Android builds

License

MIT