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

@phessophissy/amemployer-sdk

v1.0.0

Published

TypeScript/JavaScript SDK for the amEmployer autonomous labor platform on Celo

Readme

@amemployer/sdk

TypeScript/JavaScript SDK for the amEmployer autonomous labor platform on Celo.

amEmployer connects employers, workers, and AI agents through on-chain smart contracts — enabling trustless task creation, assignment, submission, validation, and payment in cUSD.

Installation

npm install @amemployer/sdk ethers
# or
yarn add @amemployer/sdk ethers

ethers v6 is a peer dependency.

Quick Start

import { AmEmployer } from '@amemployer/sdk';
import { ethers } from 'ethers';

// ── Read-only (no wallet needed) ────────────────────────────────────────────
const sdk = new AmEmployer({
  rpcUrl: 'https://forno.celo.org',       // defaults to Celo mainnet
  apiUrl: 'https://api.amemployer.xyz',   // REST backend
});

const stats = await sdk.taskManager.getPlatformStats();
console.log(stats);
// { totalTasks: 142, completedTasks: 98, paidOut: '980.0' }

const jobs = await sdk.client.jobs.list();
console.log(jobs.data);

// ── Write operations (requires wallet / signer) ─────────────────────────────
const provider = new ethers.BrowserProvider(window.ethereum); // MiniPay / MetaMask
const signer   = await provider.getSigner();

const sdk = new AmEmployer({ signer, apiUrl: 'https://api.amemployer.xyz' });

// Approve cUSD spend (once)
await sdk.taskManager.approveToken();

// Create a task on-chain
const taskId = await sdk.taskManager.createTask(
  ethers.parseEther('10'),                          // 10 cUSD reward
  ethers.encodeBytes32String('my-task-metadata'),   // bytes32 hash
  3600,                                              // 1 hour deadline
);
console.log('Created task:', taskId);

API Reference

new AmEmployer(config?)

All-in-one SDK entry point.

| Config option | Type | Default | |---------------------------|-----------------------|-------------------------------| | apiUrl | string | http://localhost:4000 | | rpcUrl | string | https://forno.celo.org | | signer | ethers.Signer | — | | taskManagerAddress | string | Deployed mainnet address | | workerRegistryAddress | string | Deployed mainnet address | | cusdAddress | string | Celo mainnet cUSD | | timeout | number (ms) | 10000 |

Properties:


AmEmployerClient

REST API client. Can be used standalone:

import { AmEmployerClient } from '@amemployer/sdk';

const client = new AmEmployerClient({ apiUrl: 'https://api.amemployer.xyz' });

client.jobs

| Method | Description | |--------|-------------| | list(params?) | List jobs, optionally filtered by employer | | get(id) | Get a job by ID (includes tasks + AI logs) | | create(input) | Create a job — AI decomposes it into tasks automatically | | launchDemo() | Launch the built-in demo job | | aiLogs(id) | Get AI orchestration logs for a job |

client.tasks

| Method | Description | |--------|-------------| | list(params?) | List tasks (filter by status, worker, jobId) | | get(id) | Get a task by ID | | listOpen() | Get all OPEN tasks ordered by reward | | submit(id, input) | Submit work for an assigned task |

client.workers

| Method | Description | |--------|-------------| | list(params?) | List workers (filter by type) | | get(address) | Get a worker by wallet address | | register(input) | Register a new worker | | leaderboard() | Top 20 workers by completions + reputation |

client.stats

| Method | Description | |--------|-------------| | platform() | Platform-wide stats (DB + on-chain) | | activity() | Recent platform activity feed |


TaskManagerContract

Ethers.js wrapper for the TaskManager smart contract.

import { TaskManagerContract, CONTRACT_ADDRESSES, CHAIN_IDS } from '@amemployer/sdk';
import { ethers } from 'ethers';

const provider = new ethers.JsonRpcProvider('https://forno.celo.org');
const tm = new TaskManagerContract(
  CONTRACT_ADDRESSES[CHAIN_IDS.CELO_MAINNET].TaskManager,
  provider,
);

Read methods: getTask(id), getWorkerStats(address), getWorkerTaskIds(address), getEmployerTaskIds(address), getPlatformStats(), taskCounter(), platformFeePercent(), paymentToken(), aiValidatorAddress(), getTokenAllowance(owner), getTokenBalance(address)

Write methods (Signer required): registerWorker(), createTask(reward, hash, deadline), batchCreateTasks(tasks[]), submitWork(taskId, data), approveToken(amount?)

Event listeners: onTaskCreated(cb), onTaskVerified(cb), onPaymentReleased(cb) — each returns a cleanup function.


WorkerRegistryContract

Ethers.js wrapper for the WorkerRegistry soulbound ERC-721 contract.

Read methods: hasIdentity(address), getWorkerIdentity(address), walletToTokenId(address), totalWorkers(), isTaskManagerAuthorized(address)

Write methods (Signer required): mintWorkerNFT(worker, personaName, workerType)

Event listeners: onWorkerMinted(cb)


Constants

import {
  CHAIN_IDS,        // { CELO_MAINNET: 42220, CELO_ALFAJORES: 44787, HARDHAT: 31337 }
  RPC_URLS,         // keyed by chain ID
  CUSD_ADDRESSES,   // keyed by chain ID
  CONTRACT_ADDRESSES, // { [chainId]: { TaskManager, WorkerRegistry, cUSD } }
  CUSD_DECIMALS,    // 18
} from '@amemployer/sdk';

Networks

| Network | Chain ID | RPC | |---------|----------|-----| | Celo Mainnet | 42220 | https://forno.celo.org | | Alfajores Testnet | 44787 | https://alfajores-forno.celo-testnet.org |

License

MIT © amEmployer