v3.2.1 — Latest Release

AIVISION SDK

Build powerful decentralized applications with our comprehensive developer toolkit. Available in JavaScript, Python, and Go.

Quick Install

JS JavaScript / TypeScript
npm install @aivision/sdk
PY Python
pip install aivision-sdk
GO Go
go get github.com/aivision/sdk-go

Code Examples

JavaScript — Connect & Query JS
import { AIVisionSDK } from '@aivision/sdk';

const client = new AIVisionSDK({
  network: 'mainnet',
  apiKey: process.env.AIV_API_KEY
});

const balance = await client.getBalance(
  '0x1b2c...8d4e'
);
console.log('Balance:', balance.aiv);
JavaScript — Send Transaction JS
const tx = await client.sendTransaction({
  to: '0x9f8a...3c7b',
  amount: 1000,
  token: 'AIV',
  memo: 'Payment for services'
});

console.log('Tx Hash:', tx.hash);
console.log('Status:', tx.status);
Python — Staking PY
from aivision import Client

client = Client(network="mainnet")
stake = client.stake(
    amount=5000,
    validator="avnode-ai-01",
    duration_days=90
)

print(f"Stake ID: {stake.id}")
print(f"APY: {stake.apy}%")
Go — Event Listener GO
package main

import "github.com/aivision/sdk-go"

func main() {
    client := sdk.NewClient("mainnet")
    events := client.SubscribeEvents()

    for event := range events {
        switch event.Type {
        case "transfer":
            fmt.Println(event.Data)
        }
    }
}

API Reference

GET

/v1/balance/{address}

Returns the AIV and token balances for a given address.

POST

/v1/transaction/send

Broadcast a signed transaction to the network.

GET

/v1/block/{height}

Retrieve block details by height or hash.

POST

/v1/stake

Create a new stake on a validator node.

WS

/v1/events/subscribe

Real-time event streaming via WebSocket.

GET

/v1/governance/proposals

List all active governance proposals.