mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-19 23:26:45 +00:00
16 lines
413 B
TypeScript
16 lines
413 B
TypeScript
import { Tool } from "langchain/tools";
|
|
import { SolanaAgentKit } from "../../agent";
|
|
|
|
export class SolanaGetWalletAddressTool extends Tool {
|
|
name = "solana_get_wallet_address";
|
|
description = `Get the wallet address of the agent`;
|
|
|
|
constructor(private solanaKit: SolanaAgentKit) {
|
|
super();
|
|
}
|
|
|
|
async _call(_input: string): Promise<string> {
|
|
return this.solanaKit.wallet_address.toString();
|
|
}
|
|
}
|