0.1.0-8 • Published 11 months ago

@lit-protocol/aw-cli v0.1.0-8

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

Agent Wallet CLI

The Agent Wallet CLI is a command-line interface (CLI) application designed to demonstrate the capabilities of agent wallets. It allows users to manage policies, delegate permissions, and execute tools within defined constraints. This tool is particularly useful for developers and administrators working with decentralized systems and Lit Protocol.


Table of Contents

  1. Features
  2. Prerequisites
  3. Installation
  4. Configuration
  5. Usage
  6. Getting Test Tokens
  7. Contributing
  8. License

Features

  • Admin Role: Set policies and manage delegatees.
  • Delegatee Role: Execute tools within policy constraints.
  • Lit Action Tools: Deploy tools to IPFS for decentralized execution.
  • Policy Management: Define and enforce tool usage policies for delegatees.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v16 or higher)
  • pnpm (Package manager)
  • A wallet (e.g., MetaMask) with a private key for authentication
  • A Pinata API key for IPFS interactions

Installation

# Clone the repository
git clone https://github.com/your-username/agent-wallet-cli.git
cd agent-wallet-cli

# Install dependencies
pnpm install

# Build the project
pnpm build

Configuration
bash
Copy

Rename the .env.example file to .env

mv .env.example .env

Open the .env file and add your Pinata API key:

PINATA_API_KEY=your-pinata-api-key

Usage Starting the CLI bash Copy

pnpm start:cli

The CLI will deploy Lit Action tools to IPFS and display a wall of text confirming the deployment. Selecting a Lit Network

You will be prompted to select a Lit network:

? Select a Lit network: › - Use arrow-keys. Return to submit.
❯   Datil Dev - Development network
    Datil Test
    Datil

    Datil Dev: For development purposes.

    Datil Test: For testing environments.

    Datil: For production use.

If you're just getting started, choose Datil. You can obtain test tokens (tstLit) from the Chronicle Yellowstone Faucet. https://chronicle-yellowstone-faucet.getlit.dev/

Selecting Your Role

Next, select your role. If you are just gettig started, choose Admin: plaintext Copy

? Select your role: › - Use arrow-keys. Return to submit.
❯   Admin - Can set policies and manage delegatees
    Delegatee - Can execute tools within policy constraints

Admin Actions

If you choose the Admin role:

Enter your private key when prompted. This key remains local and is not shared.

Use the following actions:

    Add Delegatee: Add a wallet address as a delegatee.

    Permit Tool: Allow a tool to be used by delegatees.

    Set Tool Policy: Define usage policies for delegatees.

Delegatee Actions

If you choose the Delegatee role:

Restart the CLI by pressing ^C and running pnpm start:cli again.

Select Delegatee as your role.

Execute tools within the constraints set by the admin.
0.1.0-16

10 months ago

0.1.0-15

10 months ago

0.1.0-13

10 months ago

0.1.0-12

10 months ago

0.1.0-11

10 months ago

0.1.0-9

11 months ago

0.1.0-8

11 months ago

0.1.0-7

11 months ago

0.1.0-6

11 months ago

0.1.0-5

11 months ago

0.1.0-4

11 months ago

0.1.0-3

11 months ago