ClawPayClawPay Docs
Hedera Agent Kit

Configuration

Configure the ClawPay Hedera Agent Kit plugin for testnet or mainnet

Default Configuration

By default, the plugin connects to Hedera Testnet with the ClawPay AgentRegistry contract. No configuration needed for testnet:

import { clawPayPlugin } from "@clawpay-hedera/hak-plugin";

// Uses testnet defaults — ready to go
const toolkit = new HederaLangchainToolkit({
  client,
  configuration: { plugins: [clawPayPlugin] },
});

Custom Configuration

Override any config option using createClawPayPlugin():

import { createClawPayPlugin } from "@clawpay-hedera/hak-plugin";

const plugin = createClawPayPlugin({
  network: "mainnet",
  registryAddress: "0x...",
  operatorId: "0.0.xxxxx",
  operatorKey: process.env.HEDERA_OPERATOR_KEY,
  facilitatorFeePayer: "0.0.7162784",
});

Environment Variables

The plugin reads these environment variables as fallbacks:

VariableDescriptionDefault
HEDERA_OPERATOR_IDYour Hedera account ID0.0.6514537 (testnet)
HEDERA_OPERATOR_KEYECDSA private key (hex)

Config Options

OptionTypeDefaultDescription
network"testnet" | "mainnet""testnet"Hedera network to use
registryAddress0x${string}0x4112...02bAgentRegistry contract address
rpcUrlstringhttps://testnet.hashio.io/apiJSON-RPC endpoint
reputationTopicIdstring0.0.8107518HCS topic for reputation logs
paymentTopicIdstring0.0.8058213HCS topic for payment logs
operatorIdstringfrom envHedera account ID for transactions
operatorKeystringfrom envECDSA private key for signing
facilitatorFeePayerstring0.0.7162784Blocky402 facilitator fee payer

Standalone Usage

The plugin can also be used without Hedera Agent Kit — the tools array works with any LangChain setup:

import { createClawPayPlugin } from "@clawpay-hedera/hak-plugin";

const plugin = createClawPayPlugin();
const tools = plugin.tools();

// Use tools directly
const agents = await tools[0].execute({ toolName: "hedera_account_deep_dive" });