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

@radiustechsystems/ai-agent-plugin-crypto

v1.0.4

Published

Cryptographic utilities for the Radius AI Agent Toolkit

Readme

Radius AI Agent Toolkit - Crypto Plugin

This plugin provides AI agents with cryptographic utilities for working with Radius, including address validation and hash generation capabilities.

This package is part of the Radius AI Agent Toolkit, which provides tools for integrating AI agents with the Radius platform.

Installation

# Install this specific package
npm install @radiustechsystems/ai-agent-plugin-crypto

# Required peer dependencies
npm install @radiustechsystems/ai-agent-core
npm install @radiustechsystems/ai-agent-wallet
npm install @radiustechsystems/sdk

Prerequisites

  • Node.js >=20.12.2 <23

Usage

import { crypto } from "@radiustechsystems/ai-agent-plugin-crypto";
import { createRadiusWallet } from "@radiustechsystems/ai-agent-wallet";
import { getOnChainTools } from "@radiustechsystems/ai-agent-adapter-vercel-ai";

// Create a Radius wallet
const wallet = await createRadiusWallet({
  rpcUrl: process.env.RPC_PROVIDER_URL,
  privateKey: process.env.WALLET_PRIVATE_KEY
});

// Initialize the Crypto plugin
const cryptoPlugin = crypto();

// Create AI agent tools with the Crypto plugin
const tools = await getOnChainTools({
  wallet,
  plugins: [cryptoPlugin]
});

Example: Using Crypto Tools

// Example of using the crypto plugin through an AI agent
const result = await generateText({
  model: openai("gpt-4o"),
  tools,
  maxSteps: 10,
  prompt: `Validate if 0x1234abcd... is a valid Ethereum address and generate a Keccak-256 hash of the text "Hello Radius"`,
});

// The AI will use the validate_address and hash_data tools

API Reference

crypto()

Creates a new Crypto plugin instance.

Returns:

  • A CryptoPlugin instance that can be used with AI agent frameworks

Provided Tools

The Crypto plugin provides the following AI agent tools:

validate_address

Validates if an address is properly formatted and checksummed for Radius.

Parameters:

  • address (string): The address to validate

Example:

try {
  const validationResult = await validateAddressTool.execute({
    address: "0xefbf7a6fa61a1602eb7630c92e79e5b6e63909e1"
  });
  console.log(`Is valid address: ${validationResult.isValid}`);
  console.log(`Checksummed address: ${validationResult.address}`);
} catch (error) {
  console.error(`Validation failed: ${error.message}`);
}

hash_data

Generates a Keccak-256 hash of input data with support for different encodings.

Parameters:

  • data (string): The data to hash
  • encoding (string, optional): The encoding to use ("utf8" or "hex", defaults to "utf8")

Example:

try {
  // Hash UTF-8 string
  const hashResult = await hashDataTool.execute({
    data: "Hello, Radius!",
    encoding: "utf8"
  });
  console.log(`Hash: ${hashResult.hash}`);
  
  // Hash hex data
  const hexHashResult = await hashDataTool.execute({
    data: "0x1234567890abcdef",
    encoding: "hex"
  });
  console.log(`Hash of hex: ${hexHashResult.hash}`);
} catch (error) {
  console.error(`Hashing failed: ${error.message}`);
}

Note on Tool Naming: The tool names in this documentation (validate_address, hash_data) match the actual names used at runtime. The @Tool decorator in the implementation automatically converts camelCase method names to snake_case for the final tool names.

Integration Examples

For a complete example integrating this plugin with AI frameworks, see:

Related Packages

Resources

Contributing

Please see the Contributing Guide for detailed information about contributing to this toolkit.

License

This project is licensed under the MIT License.