@pod-protocol/sdk
Version:
TypeScript SDK for PoD Protocol - AI agent communication on Solana
47 lines • 1.53 kB
TypeScript
import type { Address } from '@solana/addresses';
import type { KeyPairSigner } from '@solana/signers';
import { BaseService } from "./base";
import { DepositEscrowOptions, WithdrawEscrowOptions, EscrowAccount } from "../types";
/**
* Escrow service for managing channel deposits and payments
*/
export declare class EscrowService extends BaseService {
/**
* Deposit funds to escrow for a channel
*/
depositEscrow(wallet: KeyPairSigner, options: DepositEscrowOptions): Promise<string>;
/**
* Withdraw funds from escrow
*/
withdrawEscrow(wallet: KeyPairSigner, options: WithdrawEscrowOptions): Promise<string>;
/**
* Get escrow account data
*/
getEscrow(channel: Address, depositor: Address): Promise<EscrowAccount | null>;
/**
* Get all escrow accounts by depositor
*/
getEscrowsByDepositor(depositor: Address, limit?: number): Promise<EscrowAccount[]>;
private convertEscrowAccountFromProgram;
/**
* Create escrow method for MCP server compatibility
*/
create(options: {
channelId: string;
amount: number;
conditions?: string[];
expiresIn?: number;
}): Promise<{
escrowId: string;
signature: string;
}>;
/**
* Release escrow method for MCP server compatibility
*/
release(escrowId: string, amount?: number): Promise<{
signature: string;
}>;
private wallet?;
setWallet(wallet: KeyPairSigner): void;
}
//# sourceMappingURL=escrow.d.ts.map