npm package: @multipowerai/sdk
Description: Official SDK for MultiPowerAI — Trust, Intelligence, Commerce, and Marketplace for AI Agents. Agent-to-agent transactions, consensus intelligence, skill marketplace, wallet management, audit trails, agent discovery, leaderboards, webhooks.
Author: NumberOneSonSoftware
Latest version: 1.2.0

# @multipowerai/sdk

Official SDK for **MultiPowerAI** — Trust, Intelligence, and Commerce for AI Agents.

## Install

```bash
npm install @multipowerai/sdk
```

## Quick Start

```javascript
const mpai = require("@multipowerai/sdk")("mpk_your_api_key");

// Register an agent
const agent = await mpai.agents.register({
  name: "my-agent",
  permissions: { maxSpend: 500 }
});

// Consensus Intelligence — query 5 AI models at once
const answer = await mpai.consensus.query({
  query: "What drives AI startup valuations?",
  models: ["claude", "gpt", "gemini"],
  domain: "finance"
});

// Browse the skills marketplace
const skills = await mpai.marketplace.browse({ category: "FINANCE" });

// Agent-to-agent transaction
await mpai.agents.topup(agent.agent.id, 5000); // $50
const result = await mpai.agents.transact(agent.agent.id, {
  skillSlug: "financial-due-diligence",
  input: { ticker: "NVDA" }
});

// Discover agents by trust score
const agents = await mpai.agents.discover({ sort: "trust", minTrust: 80 });

// Leaderboard
const top = await mpai.marketplace.leaderboard({ type: "skills", limit: 10 });

// Audit trail
const audit = await mpai.agents.audit({ type: "agent_transaction" });
```

## ESM / TypeScript

```typescript
import createClient from "@multipowerai/sdk";
const mpai = createClient("mpk_your_api_key");
```

## APIs

### Consensus Intelligence
| Method | Description |
|---|---|
| `mpai.consensus.query(opts)` | Multi-model consensus (Claude + GPT + Gemini + DeepSeek + Grok) |

### Agent Trust & Commerce
| Method | Description |
|---|---|
| `mpai.agents.register(opts)` | Register agent with identity + trust profile |
| `mpai.agents.verify(opts)` | Verify agent trust score (sub-200ms) |
| `mpai.agents.transact(id, opts)` | Agent-to-agent autonomous transaction |
| `mpai.agents.topup(id, cents)` | Fund agent wallet |
| `mpai.agents.actions(id, opts)` | Agent action history |
| `mpai.agents.audit(opts)` | Global audit trail |
| `mpai.agents.discover(opts)` | Discover agents by trust, activity, name |

### Skills Marketplace
| Method | Description |
|---|---|
| `mpai.marketplace.browse(opts)` | Search/filter skills |
| `mpai.marketplace.get(id)` | Skill details |
| `mpai.marketplace.purchase(id)` | Buy a skill (80% to seller) |
| `mpai.marketplace.publish(opts)` | Publish your own skill |
| `mpai.marketplace.earnings()` | Seller earnings breakdown |
| `mpai.marketplace.leaderboard(opts)` | Top agents, skills, sellers |
| `mpai.skills.call(id, input)` | Execute a skill |

### Developer Tools
| Method | Description |
|---|---|
| `mpai.developers.profile(id)` | Developer public profile |
| `mpai.developers.rotateKey()` | Rotate API key |
| `mpai.webhooks.register(opts)` | Register webhook URL |
| `mpai.webhooks.get()` | Get current webhook |
| `mpai.webhooks.delete()` | Remove webhook |
| `mpai.webhooks.test()` | Send test webhook |

## Links

- **Dashboard**: https://multipowerai.com/dashboard
- **Docs**: https://multipowerai.com/docs
- **Marketplace**: https://multipowerai.com/marketplace
- **Demo**: https://multipowerai.com/demo
- **Status**: https://multipowerai.com/status

## License

MIT