Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

850 B
Raw Blame
// agent-payments-sdk
// Copyright (c) 2026 nirholas | x.com/nichxbt | github.com/nirholas
// All rights reserved.

import { OFFLINE_PUMP_PROGRAM } from "./program";
import type {
  GlobalConfig,
  TokenAgentPaymentInCurrency,
  TokenAgentPayments,
} from "./types";

export function decodeGlobalConfig(accountData: Buffer): GlobalConfig {
  return OFFLINE_PUMP_PROGRAM.coder.accounts.decode(
    "globalConfig",
    accountData,
  );
}

export function decodeTokenAgentPaymentInCurrency(
  accountData: Buffer,
): TokenAgentPaymentInCurrency {
  return OFFLINE_PUMP_PROGRAM.coder.accounts.decode(
    "tokenAgentPaymentInCurrency",
    accountData,
  );
}

export function decodeTokenAgentPayments(
  accountData: Buffer,
): TokenAgentPayments {
  return OFFLINE_PUMP_PROGRAM.coder.accounts.decode(
    "tokenAgentPayments",
    accountData,
  );
}