
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
@ixo/assistant-sdk
Advanced tools
This repo and product is intentionally managed as Open Source and we aim to use this guide to light our way https://opensource.guide/. Let us know how we are doing!
npm install @ixo/assistant-sdk
# or
yarn add @ixo/assistant-sdk
The IXO Assistant SDK simplifies interactions with the Ixo blockchain via ChatGPT. It's designed for users of all technical levels to query blockchain data and generate transactions with ease.
Key Features:
The SDK acts as a conduit between the assistant server and the ixo blockchain, enabling tasks like querying data or initiating transactions through simple prompts and commands.
The Assistant class is central to the SDK, managing chat sessions and blockchain transactions.
import Assistant from '@ixo/assistant-sdk';
const assistant = new Assistant({
apiKey: 'your-api-key',
address: 'user-address',
did: 'user-did',
network: 'testnet',
// Optional: assistantUrl
});
Configuration Parameters:
⚠️ Important: Do not change these parameters during usage. For different networks or user accounts, instantiate a new Assistant.
The IXO Assistant SDK utilizes the observer pattern to allow real-time updates to the state of the chat session. This feature is particularly useful for applications that need to react dynamically to changes in chat content, such as updating a UI in response to new messages.
const [messages, setMessages] = React.useState<ChatMessage[]>([]);
useEffect(() => {
const observer: Observer = {
update: (updatedMessages: ChatMessage[]) => setMessages([...updatedMessages]),
};
// Subscribe to the observable
assistant.subscribe(observer);
// Unsubscribe from the observable when the component unmounts
return () => {
assistant.unsubscribe(observer);
};
}, [assistant]);
Once subscribed, the update method of your observer will be called whenever there are new messages. If you need to stop receiving updates (for example, when a user navigates away from a chat screen), you can unsubscribe your observer from the Assistant.
Start a new chat session with the assistant (no chat will persist past its session).
const response = await assistant.newChat(stream, contextMessages);
Parameters:
Communicate with the assistant:
const response = await assistant.chat(stream, message);
Parameters:
Set a transaction handler that accepts a transaction and must return a string that indicates transaction success or failure or the full blockchain response to correctly determine transaction success or failure.
assistant.onTransaction((txBody: Uint8Array) => {
// Process the transaction
});
The arguments provided to the transaction handler are as follows:
@ixo/impactxclient-sdk registry)Retrieve chat messages:
const messages = assistant.getMessages;
Returns an array of chat messages (excluding context and function messages).
FAQs
An SDK to easily access the Ixo transaction assistant
We found that @ixo/assistant-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.