Initializing The Core Module
import { OobeCore, ConfigManager, IConfiguration } from "oobe-protocol";
const configManager = new ConfigManager();
const config: IConfiguration = {...}
const overrideDefConfig = configManager.createDefaultConfig(config)
const oobe = new OobeCore(configManager.getDefaultConfig()) || new OobeCore(overrideDefConfig) */
* @name OobeCore
* @description Core module for the OOBE protocol
* @example const core = new OobeCore(config)
* @author oobe-protocol
*/
export class OobeCore {
private agent: Agent;
private logger: Logger;
private memory: MemorySaver;
constructor(config: IConfiguration) {
this.logger = new Logger();
if (verifyConfig(config)) {
this.agent = new Agent(config.solanaEndpoint, config.private_key, config.openAiKey, this.logger);
} else {
this.logger.error("Invalid configuration");
throw new Error("Invalid configuration");
}
this.memory = new MemorySaver();
}
}Usage
1. Starting the OobeCore
2. Creating and Executing the Agent
3. Accessing the Agent Instance
4. Registering OOBE Actions
5. Creating Solana Tools
6. Setting up Agent Memory
7. Creating a React Agent
8. Sending Human Messages
9. Merkle Validation and On-Chain Inscription
10. Stopping the OobeCore
Last updated