@sentinel-labs/sdk
v0.1.0
Published
TypeScript SDK for the Sentinel Labs on-chain security platform on Stellar Soroban
Readme
@sentinel-labs/sdk
TypeScript SDK for Sentinel Labs — on-chain smart contract security & bug bounty on Stellar Soroban.
Install
npm install @sentinel-labs/sdkQuick Start
import { SentinelClient, connectWallet } from "@sentinel-labs/sdk";
const publicKey = await connectWallet();
const client = new SentinelClient({
rpcUrl: "https://soroban-testnet.stellar.org",
networkPassphrase: "Test SDF Network ; September 2015",
contractId: "YOUR_CONTRACT_ID",
});
// Register a contract for monitoring
await client.registerContract({
owner: publicKey,
contractId: "CABC...TARGET",
name: "My DeFi Protocol",
});
// Log a security incident
const { incidentId } = await client.logIncident({
reporter: publicKey,
contractId: "CABC...TARGET",
description: "Unusual transfer volume detected",
severity: "High",
});
// Submit a bug bounty
const { bountyId } = await client.submitBounty({
whitehat: publicKey,
contractId: "CABC...TARGET",
description: "Integer overflow in swap function",
severity: "Critical",
token: "USDC_CONTRACT_ADDRESS",
});API Reference
| Method | Description |
|--------|-------------|
| registerContract(params) | Register a contract for monitoring |
| logIncident(params) | Log an immutable security incident |
| submitBounty(params) | Submit a bug bounty finding |
| acceptAndPayBounty(params) | Accept bounty and pay USDC to whitehat |
| rejectBounty(caller, bountyId) | Reject a pending bounty |
| getContract(contractId) | Fetch a monitored contract |
| getIncident(id) | Fetch an incident by ID |
| getBounty(id) | Fetch a bounty by ID |
Run Tests
npm testContributing via Drips Wave
This project participates in the Drips Wave Program. See CONTRIBUTING.md. Do not start coding until assigned.
