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

@cfxdevkit/protocol

v2.0.11

Published

Conflux protocol helpers, precompile ABIs, and reusable DevKit contract ABI/bytecode metadata.

Downloads

262

Readme

@cfxdevkit/protocol

Scope: Pure Conflux protocol helpers, precompile ABIs, and reusable DevKit contract metadata.

This package is intentionally non-UI and has no RPC side effects. It gives backend services, MCP tools, CLIs, and tests a stable place to import:

  • Receipt and chain helpers built around @cfxdevkit/cdk clients,
  • Conflux internal contract addresses and ABIs (AdminControl, SponsorWhitelist, Staking, CrossSpaceCall, PoSRegister),
  • WCFX ABI/address constants for app-level wrap, unwrap, and approval flows,
  • DevKit reusable contract ABIs, bytecode, and generated address maps (AutomationManager, PermitHandler, SwappiPriceAdapter).

ParamsControl is included in CONFLUX_PRECOMPILE_ADDRESSES; the legacy DevKit source did not ship a verified ABI for it.

Install

npm install @cfxdevkit/protocol

Sub-paths

| Sub-path | Exports | |----------|---------| | . | 47 symbols |


.

export declare const __packageName: "@cfxdevkit/protocol";

// DevKit contract metadata
export { AUTOMATION_MANAGER_ABI }
export { automationManagerAbi }
export { automationManagerAddress }
export { automationManagerBytecode }
export { automationManagerConfig }

export { PERMIT_HANDLER_ABI }
export { permitHandlerAbi }
export { permitHandlerAddress }
export { permitHandlerBytecode }
export { permitHandlerConfig }

export { SWAPPI_PRICE_ADAPTER_ABI }
export { swappiPriceAdapterAbi }
export { swappiPriceAdapterAddress }
export { swappiPriceAdapterBytecode }
export { swappiPriceAdapterConfig }

// Conflux precompile contracts
export { ADMIN_CONTROL_ABI }
export { adminControlAbi }
export { adminControlAddress }

export { CROSS_SPACE_CALL_ABI }
export { crossSpaceCallAbi }
export { crossSpaceCallAddress }

export { POS_REGISTER_ABI }
export { posRegisterAbi }
export { posRegisterAddress }

export { SPONSOR_WHITELIST_ABI }
export { sponsorWhitelistAbi }
export { sponsorWhitelistAddress }

export { STAKING_ABI }
export { stakingAbi }
export { stakingAddress }

// WCFX (wrapped CFX)
export { WCFX_ABI }
export { WCFX_ADDRESSES }
export { wcfxAbi }
export { wcfxAddresses }

// Precompile addresses
export { CFX_NATIVE_ADDRESS }
export { CONFLUX_PRECOMPILE_ADDRESSES }
export { PRECOMPILE_ADDRESSES }

// Chain & receipt helpers
export interface WaitForReceiptOptions {
  timeout?: number;
  retryInterval?: number;
}

export interface ChainProgress {
  epochNumber: number;
  epochIndex: number;
  blockNumber: number;
}

export interface GasEstimate {
  gasLimit: bigint;
  gasPrice: bigint;
  storageLimit: bigint;
}

export declare function isSuccessfulReceipt(receipt: TxReceipt): boolean;
export declare function assertSuccessfulReceipt(receipt: TxReceipt, hash?: Hash): TxReceipt;
export declare function waitForTransactionReceipt(client: Client, hash: Hash, options?: WaitForReceiptOptions): Promise<TxReceipt>;
export declare function getChainProgress(client: Client): Promise<ChainProgress>;
export declare function estimateTransaction(client: Client, request: TxRequest): Promise<GasEstimate>;
export declare function collectLogs(client: Client, filter: CoreLogFilter): Promise<CoreLog[]>;

Usage

import { automationManagerAddress, waitForTransactionReceipt, estimateTransaction } from '@cfxdevkit/protocol';
import { createClient } from '@cfxdevkit/cdk';

const client = createClient({ url: 'https://main.confluxrpc.com' });

// Estimate gas for a transaction
const gas = await estimateTransaction(client, {
  from: '0x...',
  to: automationManagerAddress,
  data: '0x',
});

// Wait for a transaction receipt
const receipt = await waitForTransactionReceipt(client, '0x...');

API Reference

See API.md for the full public surface.

Tier

Tier 0 — framework — Must not runtime-import from any higher tier.