import type { OneclawClientConfig, OneclawResponse } from "../types.js"; import { HttpClient } from "./http.js"; import { VaultResource } from "../resources/vault.js"; import { SecretsResource } from "../resources/secrets.js"; import { AccessResource } from "../resources/access.js"; import { AgentsResource } from "../resources/agents.js"; import { SharingResource } from "../resources/sharing.js"; import { ApprovalsResource } from "../resources/approvals.js"; import { BillingResource } from "../resources/billing.js"; import { AuditResource } from "../resources/audit.js"; import { OrgResource } from "../resources/org.js"; import { AuthResource } from "../resources/auth.js"; import { ApiKeysResource } from "../resources/api-keys.js"; import { ChainsResource } from "../resources/chains.js"; import { X402Resource } from "../resources/x402.js"; import { TreasuryResource } from "../resources/treasury.js"; import { SigningKeysResource } from "../resources/signing-keys.js"; import { TreasuryWalletsResource } from "../resources/treasury-wallets.js"; import { PlatformResource, type InspectContentRequest, type InspectContentResponse } from "../resources/platform.js"; import { OtelResource } from "../resources/otel.js"; import { DevicesResource } from "../resources/devices.js"; import { PasskeysResource } from "../resources/passkeys.js"; import { DepositDestinationsResource } from "../resources/deposit-destinations.js"; import { InternalAccountsResource } from "../resources/internal-accounts.js"; import { FiatResource } from "../resources/fiat.js"; import { RiskResource } from "../resources/risk.js"; import { TokensResource } from "../resources/tokens.js"; import { BindingsResource } from "../resources/bindings.js"; import { CardsResource } from "../resources/cards.js"; import { PayResource } from "../resources/pay.js"; import { MemoryResource } from "../resources/memory.js"; import { AutomationsResource } from "../resources/automations.js"; import { RuntimesResource } from "../resources/runtimes.js"; import { DiscoveryResource } from "../resources/discovery.js"; import { ChatResource } from "../resources/chat.js"; import { ChannelsResource } from "../resources/channels.js"; import { WebhooksResource } from "../resources/webhooks.js"; import { ConnectorsResource } from "../resources/connectors.js"; import { NotificationTargetsResource } from "../resources/notification-targets.js"; import { PeersResource } from "../resources/peers.js"; import { OAuthConnectResource } from "../resources/oauth-connect.js"; import { CedarPoliciesResource } from "../resources/cedar-policies.js"; import { OpaPoliciesResource } from "../resources/opa-policies.js"; import { SubOrgsResource } from "../resources/sub-orgs.js"; import { PortfolioResource } from "../resources/portfolio.js"; import { ContractAbisResource } from "../resources/contract-abis.js"; import { PendingApprovalsResource } from "../resources/pending-approvals.js"; import { EnvVarsResource } from "../resources/env-vars.js"; /** * The main 1Claw SDK client. All API resources are exposed as * namespaced properties for discoverability and tree-shaking. * * @example * ```ts * import { createClient } from "@1claw/sdk"; * * const client = createClient({ * baseUrl: "https://api.1claw.co", * apiKey: "ocv_...", * }); * * // Authenticate (exchanges API key for a JWT) * await client.auth.apiKeyToken({ api_key: "ocv_..." }); * * // Use resources * const vaults = await client.vault.list(); * const secret = await client.secrets.get(vaultId, "my-key"); * ``` */ export declare class OneclawClient { readonly http: HttpClient; /** Vault management — create, list, get, delete vaults. */ readonly vault: VaultResource; /** Secret management — store, retrieve, list, rotate, delete secrets. */ readonly secrets: SecretsResource; /** Access control — grant/revoke policies for humans and agents. */ readonly access: AccessResource; /** Agent management — register, update, delete agents and rotate keys. */ readonly agents: AgentsResource; /** Secret sharing — create and manage time-limited share links. */ readonly sharing: SharingResource; /** Human-in-the-loop approvals — request, review, approve/deny. */ readonly approvals: ApprovalsResource; /** Billing and usage — view usage summaries and per-request history. */ readonly billing: BillingResource; /** Audit log — query the immutable audit trail. */ readonly audit: AuditResource; /** Organization — manage members and roles. */ readonly org: OrgResource; /** Authentication — login, agent auth, API key auth, Google OAuth. */ readonly auth: AuthResource; /** API keys — create, list, and revoke personal API keys. */ readonly apiKeys: ApiKeysResource; /** Supported blockchains — list chains and manage RPC configuration. */ readonly chains: ChainsResource; /** x402 payment protocol — inspect, pay, and verify micropayments. */ readonly x402: X402Resource; /** Safe multisig treasuries — CRUD, signers, agent access requests. */ readonly treasury: TreasuryResource; /** Multi-chain signing keys — create, list, rotate, deactivate per-agent keys. */ readonly signingKeys: SigningKeysResource; /** Execution Intents — bindings, execute, and execution history. */ readonly bindings: BindingsResource; /** Treasury wallets — multi-chain wallet generation for human users. */ readonly treasuryWallets: TreasuryWalletsResource; /** Platform API — build multi-tenant apps on top of 1Claw. */ readonly platform: PlatformResource; /** Control-plane telemetry — topology, threats, posture, metrics, flows, live stream. Human users only. */ readonly otel: OtelResource; /** Mobile device attestation — register devices, step-up auth. */ readonly devices: DevicesResource; /** WebAuthn passkeys — register and assert FIDO2 credentials. */ readonly passkeys: PasskeysResource; /** Deposit destinations — unique addresses for tracking incoming payments. */ readonly depositDestinations: DepositDestinationsResource; /** Internal accounts — off-chain double-entry ledger for instant transfers. */ readonly internalAccounts: InternalAccountsResource; /** Fiat on/off ramps — buy and sell crypto via partner integrations. */ readonly fiat: FiatResource; /** Risk engine — events, verdicts, and honeytokens. */ readonly risk: RiskResource; /** Token registry — list and manage known tokens for guardrail enforcement. */ readonly tokens: TokensResource; /** Payment Card Vault — order, list, reveal, void, and refresh payment cards. */ readonly cards: CardsResource; /** x402 micropayments (`1claw pay`). */ readonly pay: PayResource; /** Agent memory — namespaced key-value storage with optional TTL. */ readonly memory: MemoryResource; /** Automations — scheduled, event-driven, and webhook-triggered workflows. */ readonly automations: AutomationsResource; /** Runtimes — managed compute environments for agent code execution. */ readonly runtimes: RuntimesResource; /** Discovery — agent cards, directory, and marketplace. */ readonly discovery: DiscoveryResource; /** Chat — send messages to agents via Shroud LLM, manage conversations. */ readonly chat: ChatResource; /** Channels — register external messaging channels (Telegram, WhatsApp, Discord). */ readonly channels: ChannelsResource; /** Webhooks — register and manage event notification webhooks. */ readonly webhooks: WebhooksResource; /** OAuth Connected Accounts — manage OAuth connections for agents. */ readonly oauthConnect: OAuthConnectResource; /** Pre-built connectors: catalogue, install, and what is installed. */ readonly connectors: ConnectorsResource; /** Where approvals reach a human: SMS, webhook, email, push. */ readonly notificationTargets: NotificationTargetsResource; /** Peer memory: a shared model of one human across the agents serving them. */ readonly peers: PeersResource; /** Cedar policy engine — create and test Cedar authorization policies. */ readonly cedarPolicies: CedarPoliciesResource; /** OPA policy engine — create and test Rego policies. */ readonly opaPolicies: OpaPoliciesResource; /** Sub-organizations — partition resources under the parent org. */ readonly subOrgs: SubOrgsResource; /** Portfolio — unified view of all wallet balances across chains. */ readonly portfolio: PortfolioResource; /** Contract ABI registry — upload and manage contract ABIs for policy evaluation. */ readonly contractAbis: ContractAbisResource; /** Pending approvals — consensus-based approval workflows for policy-gated actions. */ readonly pendingApprovals: PendingApprovalsResource; /** Environment variables — per-vault env var CRUD with environment scoping and resolve. */ readonly envVars: EnvVarsResource; constructor(config: OneclawClientConfig); /** Standalone threat inspection (plt_, agent, or user JWT). */ inspectContent(body: InspectContentRequest): Promise>; private autoAuthenticateUserKey; } /** * Factory function to create a new 1Claw SDK client. * * @example * ```ts * // User with API key * const client = createClient({ * baseUrl: "https://api.1claw.co", * apiKey: "ocv_...", * }); * * // Agent with API key * const agent = createClient({ * baseUrl: "https://api.1claw.co", * apiKey: "ocv_...", * agentId: "agent-uuid", * }); * * // Pre-authenticated with JWT * const authed = createClient({ * baseUrl: "https://api.1claw.co", * token: "eyJ...", * }); * ``` */ export declare function createClient(config: OneclawClientConfig): OneclawClient; //# sourceMappingURL=client.d.ts.map