CLI
Development Kit for building with Solayer
The Solayer command-line interface allows you to interact directly with Solayer’s core functionalities, including restaking and managing endogenous Actively Validated Services (AVS). Whether you’re a developer integrating Solayer into your project or an advanced user managing your stake, this CLI provides the tools you need.
Installation
Clone the repository
Navigate to the project directory
Install the dependencies
Restaking
The restaking feature is at the heart of Solayer, allowing you to manage your stake efficiently. Here’s how to use it:
Basic Usage
To start the restaking CLI tool, use:
This command will guide you through the process interactively.
Partner Restake
To restake native SOL through the partner API endpoint:
<amount>
: The amount of native SOL to restake<referrer>
: Your partner wallet address for tracking referral stakes
Example:
Unrestake SOL
To withdraw restaked native SOL:
<amount>
: Amount of SOL to unrestake
Example:
Endogenous AVS
The endoAVS program allows you to create and manage endogenous Actively Validated Service instances.
Basic Usage
To start the endoAVS CLI tool, use:
This command will guide you through the available actions interactively.
Create EndoAVS
To create a new endogenous AVS:
<avsName>
: Name of the new AVS<avsTokenMintKeyPairPath>
: Path to the keypair file for the AVS token mint
Example:
Delegate SOL
To delegate SOL to an endogenous AVS:
Undelegate SOL
To undelegate SOL from an endogenous AVS:
Additional EndoAVS Operations
The CLI supports several other operations for managing your endoAVS:
- Transfer Authority
- Update AVS
- Update/Set Metadata
Transfer Authority
Change the authority of your endoAVS:
Update AVS
Update the name and URL of your endoAVS:
Update/Set Metadata
Update or set token metadata for your endoAVS:
Technical Details
For those interested in the underlying mechanics, here are some key technical details:
- The restaking program (sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn) manages the restaking process, including the restake and unrestake operations.
- The EndoAVS program facilitates the creation and management of endogenous AVS instances.
- Both programs involve interaction with multiple accounts, including token mints, user token accounts, vaults, and pools.
For more detailed information, refer to our Restaking Program IDL and EndoAVS Program IDL.
Was this page helpful?