Living SDK

Developer Copilot becomes the Injective SDK control plane

This surface now documents the live package, the available frontend endpoints, the deployed contracts, and the environment variables needed to work with Injective safely.

SDK overview

InjectOS Injective SDK

Ready to integrate

The SDK is the standalone blockchain communication layer for InjectOS. It connects injected wallets, keeps the frontend state synchronized, and exposes the same workflow used by the command center: prompt, intent parsing, safety verification, preview, approval, execution, monitoring, and completion.

Install

npm install injectos-injective-sdk

Build

npm run build

Package command
npm install injectos-injective-sdk
npm run build

What this SDK does

Injective transport, wallets, safety, and analytics

Detects MetaMask or any injected EIP-1193 wallet.
Switches the user to Injective EVM and keeps the connection state synchronized.
Wraps the deployed contracts with typed ethers.js helpers.
Surfaces deterministic previews, local safety checks, event listeners, and analytics helpers.

Chain

Injective EVM Testnet, chain ID 2525

Runtime

Frontend, backend, and automation-ready

API endpoints

Frontend and orchestration routes

POST /api/developer

Generate Injective SDK examples and architecture guidance.

Response shape: { snippet, summary }

GET /api/ecosystem

Fetch live ecosystem health, validator, and liquidity signals.

Response shape: { whaleMovement, liquidityFlow, validatorHealth, protocolActivity }

POST /api/safety

Return approval gate signals and safety diagnostics for the current workflow.

Response shape: { gate, signals }

POST /api/transaction

Queue an execution request from the AI workflow.

Response shape: { status, executionId }

POST /api/ai

Provide the local AI analysis summary used by the InjectOS command center.

Response shape: { message, preview }

API keys and config

What developers need to supply

NEXT_PUBLIC_INJECTIVE_RPC_URL

Used for read-only contract and analytics access.

https://mainnet.rpc.inevm.com/http

NEXT_PUBLIC_INJECTIVE_CHAIN_ID

Keeps the wallet switch flow aligned with Injective EVM.

2525

NEXT_PUBLIC_INJECTOS_EXECUTION_ADDRESS

Execution contract used by the frontend SDK wrappers.

0x3Eb27ab9B7c9a7d0B1dc02367DEA9e49f7Fd9419

NEXT_PUBLIC_INJECTOS_SAFETY_ADDRESS

Safety contract address for analysis and approval gating.

0xd7412cB8b75A45fe5aD6Bf9Ca5500811BA3B3e97

REMIX_VERIFICATION_API_KEY

Required only if you want to verify contracts from Remix.

set in Remix settings

No private keys are embedded in the frontend. Wallet signing happens through the user’s injected wallet, and third-party service keys should be supplied through environment variables only.

Deployed contracts

InjectOSExecution

0x3Eb27ab9B7c9a7d0B1dc02367DEA9e49f7Fd9419

deployed

InjectOSSafety

0xd7412cB8b75A45fe5aD6bF9Ca5500811BA3B3e97

deployed

InjectOSEvents

0x33491e1b1fbD9F1d757a0ABd1a2930D189d4990E

deployed

InjectOSStorage

0xff0Ea64C7B7046929CAcDFeDd32D0d4208F00266

deployed

InjectOSInterfaces.sol

source-only

not deployed

Workflow coverage

Living InjectOS pipeline

1

Step 1

Prompt enters the command center.

2

Step 2

Intent is parsed into an execution plan.

3

Step 3

Safety logic scores the request and verifies the route.

4

Step 4

Preview is generated with output, slippage, and gas context.

5

Step 5

Human approval is requested before signing.

6

Step 6

Execution is sent through Injective EVM.

7

Step 7

Events stream back into the UI.

8

Step 8

Workflow is marked completed or failed with a synced snapshot.

Core modules

SDK file layout

provider.ts

Standardizes ethers.js read/write access, wallet detection, and chain switching.

wallet.ts

Handles injected wallet discovery, connection state, and approval-ready signing flows.

contracts.ts

Keeps the ABI surface aligned with deployed InjectOS contracts and typed helpers.

simulation.ts

Generates deterministic SAFE and OPTIMIZED previews before any signature request.

safety.ts

Applies the local policy layer and submits or reads safety analysis onchain.

events.ts

Listens to workflow events and synchronizes the UI with live execution state.

execution.ts

Acts as the workflow state machine for frontend synchronization and runtime monitoring.

analytics.ts

Exposes network health, activity, and ecosystem metrics for dashboard widgets.

Usage example

The package in action

src/index.tsReadable first
01import {
02 connectMetaMaskToInjective,
03 getBrowserProvider,
04 getExecutionContract,
05 simulateSwapPreview,
06 executionStore
07} from "./src/index.js";
08 
09const wallet = await connectMetaMaskToInjective();
10const provider = getBrowserProvider();
11const signer = await provider.getSigner();
12const executionContract = getExecutionContract(signer);
13 
14const preview = simulateSwapPreview(1000n, "SAFE");
15console.log(preview.summary);
16 
17const state = executionStore.getState();
18console.log(state.workflowState);
Frontend friendly

Use the SDK from React pages, Zustand stores, or other frontend services without hiding the workflow state.

Safety first

Always preview before signing, and keep the approval boundary visible in the UX.

Deployment notes

Execution, safety, events, and storage are deployed. InjectOSInterfaces.sol remains source-only.