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

@celo/contractkit

v9.0.0

Published

Celo's ContractKit to interact with Celo network

Downloads

98,419

Readme

ContractKit

Celo's ContractKit is a library to help developers and validators to interact with the Celo blockchain.

ContractKit supports the following functionality:

  • Interact with json RPC API
  • Send Transaction with celo's extra fields: (feeCurrency)
  • Build apps to interact with governance and staking

User Guide

[!TIP] You might not need the ContractKit. For new projects we recommened viem or web3 optionally with our celo plugin.

Getting Started

To install you will need Node.js v18.14.2. or greater. v20 reccomended.

npm install @celo/contractkit
// or
yarn add @celo/contractkit

Examples

To start working with contractkit you need a kit instance:

import { newKit } from '@celo/contractkit' // or import { newKit } from '@celo/contractkit/lib/mini-kit'

const kit = newKit("https://alfajores-forno.celo-testnet.org")

List Registered ValidatorGroups


const validatorsContractWrapper = await kit.contracts.getValidators()
const validatorGroups = await validatorsContractWrapper.getRegisteredValidatorGroups()

Show locked Celo balance for account

const lockedGoldContractWrapper = await kit.contracts.getLockedGold()

const accountAddress = kit.defaultAccount 
const summary = lockedGoldContractWrapper.getAccountSummary(accountAddress!)

More Information

You can find more information about the ContractKit in the Celo docs at https://docs.celo.org/developer-guide/contractkit.

How we work

We are a GitHub-first team, which means we have a strong preference for communicating via GitHub. Please use GitHub to:

🐞 File a bug report

💬 Ask a question

Suggest a feature

🧑‍💻 Contribute!

🚔 Report a security vulnerability

[!TIP]

Please avoid messaging us via Slack, Telegram, or email. We are more likely to respond to you on GitHub than if you message us anywhere else. We actively monitor GitHub, and will get back to you shortly 🌟

Debugging

If you need to debug kit, we use the well known debug node library.

So set the environment variable DEBUG as:

DEBUG="kit:*,