Nebula TypeScript SDK (Beta)

Nebula TypeScript SDK (Beta)

The thirdweb TypeScipt SDK v5.84.0 release adds support for Nebula, our new AI model designed interact with real time blockchain data and execute transactions with natural language.

Installation

Simply install the thirdweb package on your frontend or backend to get started.

npm install thirdweb

Natural Language Blockchain Queries

Nebula enables developers to query real-time blockchain data using simple natural language prompts. From checking contract symbols to analyzing on-chain metrics, Nebula provides human-readable responses to your blockchain queries.

import { Nebula } from "thirdweb/ai";

const response = await Nebula.chat({
  client,
  prompt: "What's the symbol of this contract: 0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8",
  context: {
    chains: [sepolia],
  },
});

console.log("chat response:", response.message);

AI-Powered Transaction Execution

Nebula goes beyond just querying data - it can now execute blockchain transactions based on natural language instructions. Simply connect your wallet and describe the transaction you want to perform.

import { Nebula } from "thirdweb/ai";

const wallet = createWallet("io.metamask");
const account = await wallet.connect({ client });

const result = await Nebula.execute({
  client,
  prompt: "send 0.0001 ETH to vitalik.eth",
  account,
  context: {
    chains: [sepolia],
  },
});

console.log("executed transaction:", result.transactionHash);

Key Features

  • Natural language processing for blockchain queries
  • Real-time data access across 2000+ chains
  • Transaction execution through simple prompts
  • Works with 300+ wallet providers, in-app wallets, smart wallets and engine
  • Context-aware responses and actions with multi step sessions

This addition to the SDK marks a significant step forward in making blockchain technology more accessible and user-friendly. Nebula's natural language capabilities greatly reduce the complexity of doing complex actions on the blockchain.

For detailed documentation and examples, please visit our documentation portal or join our Discord community for support and discussions.

Happy Building! 🛠️