New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@sima-prime/agent-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sima-prime/agent-sdk

TypeScript SDK foundation for SIMA agent and bot integrations.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

SIMA Agent SDK

TypeScript client for SIMA's production agent protection purchase API.

Package: @sima-prime/agent-sdk
OpenAPI: https://sima-prime.com/openapi.json
API base: https://api.sima-prime.com

Core principle:

For bots and AI agents, the API is the product.

Install

npm install @sima-prime/agent-sdk
pnpm add @sima-prime/agent-sdk
yarn add @sima-prime/agent-sdk

Production purchase flow

Aligned to OpenAPI x-sima-agent-protection-purchase-flow-path:

POST /agent/wallet/nonce
POST /agent/wallet/verify
POST /agent/protection/offer
POST /agent/protection/purchase
GET  /agent/protection/certificates/{id}/payment-intent
     → caller sends SOL on-chain (outside SDK)
POST /agent/protection/certificates/{id}/confirm-payment
GET  /agent/protection/certificates/{id}

All commercial amounts are asset-denominated (contract asset / SOL). There are no USD commercial fields.

Quickstart

import { SimaAgentClient } from "@sima-prime/agent-sdk";

const client = new SimaAgentClient();

const nonce = await client.requestWalletNonce("YOUR_WALLET_ADDRESS");
// Sign nonce.message with your wallet outside this SDK.
const auth = await client.verifyWalletSignature({
  chain: "SOLANA",
  walletAddress: "YOUR_WALLET_ADDRESS",
  message: nonce.message,
  signature: "YOUR_SIGNATURE",
});
client.setAccessToken(auth.accessToken);

const offer = await client.getProtectionOffer({
  chain: "SOLANA",
  walletAddress: "YOUR_WALLET_ADDRESS",
  assetAddress: "YOUR_ASSET_ADDRESS",
  assetSymbol: "EXAMPLE",
  assetType: "TOKEN",
  protectedAmount: "1000",
});

const purchase = await client.purchaseProtection({
  ...offer,
  chain: "SOLANA",
  walletAddress: "YOUR_WALLET_ADDRESS",
  assetAddress: "YOUR_ASSET_ADDRESS",
  assetType: "TOKEN",
  protectedAmount: offer.protectedAmount,
  offerId: offer.offerId,
  protectionDecision: "PURCHASE_PROTECTION",
});

if (purchase.protectionDecision !== "PURCHASE_PROTECTION") {
  throw new Error("Protection declined");
}

const intent = await client.getPurchasePaymentIntent(purchase.certificateId);
// Send intent.amountDue SOL to intent.destinationTreasuryWalletAddress
// with your wallet / bot runtime. Keep the on-chain signature.

const active = await client.confirmPurchasePayment(purchase.certificateId, {
  paymentReference: intent.paymentReference,
  transactionSignature: "YOUR_ON_CHAIN_SIGNATURE",
});

console.log(active.certificateNumber, active.certificateStatus);

Client methods

MethodEndpoint
requestWalletNoncePOST /agent/wallet/nonce
verifyWalletSignaturePOST /agent/wallet/verify
getProtectionOfferPOST /agent/protection/offer
purchaseProtectionPOST /agent/protection/purchase
getPurchasePaymentIntentGET /agent/protection/certificates/{id}/payment-intent
confirmPurchasePaymentPOST /agent/protection/certificates/{id}/confirm-payment
getProtectionCertificateGET /agent/protection/certificates/{id}

SIMA V1 economics

Premium             = 5% of protected amount
Coverage            = 50% of protected amount
Deductible          = 10% of protected amount
Maximum Net Payment = 40% of protected amount

Official timing (BM-001)

ConceptDuration
Quote Validity30 seconds
Payment Window30 seconds after acceptance
Protection Window5 minutes after premium payment
Certificate Lifetime24 hours from issuance
Claim Window24 hours from issuance
Historical RecordPermanent

Safety boundaries

The SDK does not:

  • store private keys or seed phrases
  • sign wallet messages
  • execute blockchain transfers or collect premium on-chain
  • approve claims or authorize payouts
  • change SIMA V1 economics

A certificate is purchased coverage and the right to submit a claim for investigation. Claim decisions and treasury payout remain separate steps.

MCP

Read-only discovery MCP (does not call the API):

npx @sima-prime/mcp-server

sima_get_quote_flow documents getProtectionOffer with protectedAmount (asset-denominated).

Examples

examples/basic-flow.ts
examples/purchase-flow.ts

Placeholders only: YOUR_WALLET_ADDRESS, YOUR_SIGNATURE, YOUR_ON_CHAIN_SIGNATURE, etc.

Documentation

https://sima-prime.com/developers/public
https://sima-prime.com/openapi.json
https://sima-prime.com/llms.txt
https://sima-prime.com/ai-catalog.json

Build

npm install
npm run build

Open source boundary

This repository is the public SDK, examples, and discovery metadata.

Private core systems (treasury ops, claims investigation internals, production deployment) remain in the private SIMA monorepo.

Keywords

solana

FAQs

Package last updated on 13 Jul 2026

Related posts