mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-31 07:36:46 +00:00
fixes and renames
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js";
|
||||
import { SolanaAgentKit } from "../index";
|
||||
import { SolanaAgent } from "../index";
|
||||
|
||||
/**
|
||||
* Get the balance of SOL or an SPL token for the agent's wallet
|
||||
* @param agent - SolanaAgentKit instance
|
||||
* @param agent - SolanaAgent instance
|
||||
* @param token_address - Optional SPL token mint address. If not provided, returns SOL balance
|
||||
* @returns Promise resolving to the balance as a number (in UI units) or null if account doesn't exist
|
||||
*/
|
||||
export async function get_balance(
|
||||
agent: SolanaAgentKit,
|
||||
agent: SolanaAgent,
|
||||
token_address?: PublicKey,
|
||||
): Promise<number | null> {
|
||||
if (!token_address)
|
||||
|
||||
Reference in New Issue
Block a user