Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 0 additions & 238 deletions etc/sdk.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,6 @@

```ts

// @public (undocumented)
export interface AgentConfig {
// (undocumented)
chain: Chain | Chain[];
// (undocumented)
message?: string;
// (undocumented)
name: string;
// (undocumented)
signature: string;
// (undocumented)
wallet: string;
}

// @public (undocumented)
export interface AgentInfo {
// (undocumented)
addresses: Record<Chain, string>;
// (undocumented)
chains: Chain[];
// (undocumented)
id: string;
// (undocumented)
metaAddresses: Record<Chain, string>;
// (undocumented)
name: string;
}

// @public (undocumented)
export interface Balance {
// (undocumented)
native: string;
// (undocumented)
tokens: Record<string, string>;
}

// @public
export interface BaseWalletAdapter<TChain extends WalletAdapterChain, TSignature> {
// (undocumented)
Expand All @@ -50,24 +14,6 @@ export interface BaseWalletAdapter<TChain extends WalletAdapterChain, TSignature
signMessage(message: Uint8Array): Promise<TSignature>;
}

// @public (undocumented)
export enum Chain {
// (undocumented)
All = "all",
// (undocumented)
Base = "base",
// (undocumented)
Ethereum = "ethereum",
// (undocumented)
Horizen = "horizen",
// (undocumented)
Polygon = "polygon",
// (undocumented)
Solana = "solana",
// (undocumented)
Stellar = "stellar"
}

// @public
export interface ChainScannerAdapter<TItem = any, TKeys = any, TMatched = any, TMetaAddress = any> {
decodeMetaAddress(metaAddress: string): TMetaAddress;
Expand All @@ -76,16 +22,6 @@ export interface ChainScannerAdapter<TItem = any, TKeys = any, TMatched = any, T
scan(source: AsyncIterable<TItem>, keys: TKeys): AsyncGenerator<TMatched>;
}

// @public (undocumented)
export interface ChatResponse {
// (undocumented)
conversationId: string;
// (undocumented)
response: string;
// (undocumented)
toolCalls?: ToolCall[];
}

// @public (undocumented)
export interface CkbChainInput {
// Warning: (ae-forgotten-export) The symbol "StealthCell" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -113,18 +49,6 @@ export class ContractRevertError extends WraithContractError {
readonly reason: string;
}

// @public (undocumented)
export interface Conversation {
// (undocumented)
createdAt: string;
// (undocumented)
id: string;
// (undocumented)
title: string;
// (undocumented)
updatedAt: string;
}

// @public
export function createFreighterWalletAdapter(wallet: FreighterWalletApi): FreighterWalletAdapter;

Expand Down Expand Up @@ -276,28 +200,6 @@ export class InvalidSignatureError extends WraithInputError {
describe(): string;
}

// @public (undocumented)
export interface Invoice {
// (undocumented)
agentName: string;
// (undocumented)
amount: string;
// (undocumented)
asset: string;
// (undocumented)
createdAt: string;
// (undocumented)
id: string;
// (undocumented)
memo: string;
// (undocumented)
paymentLink: string;
// (undocumented)
status: 'pending' | 'paid';
// (undocumented)
txHash: string | null;
}

// @public (undocumented)
export class KeyDerivationFailedError extends WraithCryptoError {
constructor(reason: string);
Expand Down Expand Up @@ -356,47 +258,6 @@ export class NameNotFoundError extends WraithContractError {
// @public
export const NOOP_TRACER: Tracer;

// @public (undocumented)
interface Notification_2 {
// (undocumented)
body: string;
// (undocumented)
createdAt: string;
// (undocumented)
id: number;
// (undocumented)
read: boolean;
// (undocumented)
title: string;
// (undocumented)
type: string;
}
export { Notification_2 as Notification }

// @public (undocumented)
export interface Payment {
// (undocumented)
balance: string;
// (undocumented)
ephemeralPubKey: string;
// (undocumented)
stealthAddress: string;
}

// @public (undocumented)
export interface PrivacyReport {
// (undocumented)
bestPractices: string[];
// (undocumented)
issues: Array<{
severity: 'info' | 'low' | 'medium' | 'high' | 'critical';
issue: string;
recommendation: string;
}>;
// (undocumented)
score: number;
}

// @public (undocumented)
export class RetentionExceededError extends WraithNetworkError {
constructor(limit: number, actual: number);
Expand Down Expand Up @@ -443,24 +304,6 @@ export interface ScanAllInput {
stellar?: StellarChainInput;
}

// @public (undocumented)
export interface Schedule {
// (undocumented)
amount: string;
// (undocumented)
asset: string;
// (undocumented)
id: string;
// (undocumented)
interval: 'daily' | 'weekly' | 'monthly';
// (undocumented)
nextRun: string;
// (undocumented)
recipient: string;
// (undocumented)
status: 'active' | 'paused' | 'cancelled';
}

// @public
export function setTracer(tracer?: Tracer | null): void;

Expand Down Expand Up @@ -529,29 +372,11 @@ export type StellarWalletAdapter = BaseWalletAdapter<'stellar', Uint8Array>;
// @public
export type SupportedChain = 'evm' | 'stellar' | 'solana' | 'ckb';

// @public (undocumented)
export interface ToolCall {
// (undocumented)
detail?: string;
// (undocumented)
name: string;
// (undocumented)
status: string;
}

// @public
export interface Tracer {
startSpan(name: string, attributes?: Record<string, string | number | boolean>): Span;
}

// @public (undocumented)
export interface TxResult {
// (undocumented)
txHash: string;
// (undocumented)
txLink: string;
}

// @public (undocumented)
export class UnsupportedAssetError extends WraithBuilderError {
constructor(asset: string, chain?: string);
Expand Down Expand Up @@ -609,73 +434,10 @@ export type WalletAdapterChain = 'stellar' | 'evm' | 'solana';
// @public
export function withSpan<T>(name: string, attributes: Record<string, string | number | boolean> | undefined, fn: (span: Span) => T, tracer?: Tracer): T;

// @public (undocumented)
export class Wraith {
constructor(config: WraithConfig);
// (undocumented)
agent(agentId: string): WraithAgent;
createAgent(config: AgentConfig): Promise<WraithAgent>;
getAgentByName(name: string): Promise<WraithAgent>;
getAgentByWallet(walletAddress: string): Promise<WraithAgent>;
listAgents(): Promise<AgentInfo[]>;
// @internal
_request<T>(method: string, path: string, body?: unknown): Promise<T>;
}

// @public (undocumented)
export class WraithAgent {
constructor(wraith: Wraith, info: AgentInfo);
// (undocumented)
chat(message: string, conversationId?: string): Promise<ChatResponse>;
// (undocumented)
clearNotifications(): Promise<void>;
// (undocumented)
deleteConversation(conversationId: string): Promise<void>;
// (undocumented)
exportKey(signature: string, message: string): Promise<{
secret: string;
}>;
// (undocumented)
getBalance(): Promise<Balance>;
// (undocumented)
getConversations(): Promise<Conversation[]>;
// (undocumented)
getMessages(conversationId: string): Promise<Array<{
role: string;
text: string;
}>>;
// (undocumented)
getNotifications(): Promise<{
notifications: Notification_2[];
unreadCount: number;
}>;
// (undocumented)
getStatus(): Promise<any>;
// (undocumented)
readonly info: AgentInfo;
// (undocumented)
markNotificationsRead(): Promise<void>;
// (undocumented)
scanPayments(): Promise<Payment[]>;
}

// @public (undocumented)
export abstract class WraithBuilderError extends WraithError {
}

// @public (undocumented)
export interface WraithConfig {
// (undocumented)
ai?: {
provider: 'gemini' | 'openai' | 'claude';
apiKey: string;
};
// (undocumented)
apiKey: string;
// (undocumented)
baseUrl?: string;
}

// @public (undocumented)
export abstract class WraithContractError extends WraithError {
}
Expand Down
2 changes: 1 addition & 1 deletion examples/agent/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* AI chat, and chain operations — via the hosted TEE infrastructure.
* No crypto libraries, no contracts, no RPC calls.
*/
import { Wraith, Chain } from '@wraith-protocol/sdk';
import { Wraith, Chain } from '@wraith-protocol/sdk-agent';

async function main() {
// 1. Initialize with your API key
Expand Down
17 changes: 17 additions & 0 deletions examples/agent/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@wraith-protocol/example-agent",
"private": true,
"type": "module",
"main": "client.ts",
"scripts": {
"start": "npx tsx client.ts"
},
"dependencies": {
"@wraith-protocol/sdk": "file:../..",
"@wraith-protocol/sdk-agent": "workspace:*"
},
"devDependencies": {
"tsx": "^4.0.0",
"typescript": "^5.7.0"
}
}
2 changes: 1 addition & 1 deletion examples/stellar-spectre-agent/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import { Wraith, Chain } from '@wraith-protocol/sdk';
import { Wraith, Chain } from '@wraith-protocol/sdk-agent';

function getEnv(name: string): string {
const value = process.env[name];
Expand Down
3 changes: 2 additions & 1 deletion examples/stellar-spectre-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"start": "npx tsx index.ts"
},
"dependencies": {
"@wraith-protocol/sdk": "file:../.."
"@wraith-protocol/sdk": "file:../..",
"@wraith-protocol/sdk-agent": "file:../../packages/sdk-agent"
},
"devDependencies": {
"tsx": "^4.0.0",
Expand Down
Loading
Loading