Connect a wallet

Galliun payments use wallet adapters. Marketplace and inference each have their own adapter helpers (same chains, different proof schemes).

Sui

import {
  GalliunClient,
  createSuiWalletAdapter,
  createInferenceSuiWalletAdapter,
} from "galliun";

const wallet = createSuiWalletAdapter(suiSigner);
const inferenceWallet = createInferenceSuiWalletAdapter(suiSigner);

const client = new GalliunClient({
  baseUrl: "https://api.galliun.com",
  chain: "sui",
  wallet,
  inferenceWallet,
});

Your Sui signer must provide the address and signing methods expected by the adapter (typically from @mysten/dapp-kit or a similar wallet kit).

Solana

import {
  GalliunClient,
  createSolanaWalletAdapter,
  createInferenceSolanaWalletAdapter,
} from "galliun";
import { Connection } from "@solana/web3.js";

const connection = new Connection(rpcUrl);

const wallet = createSolanaWalletAdapter(solanaSigner, connection);
const inferenceWallet = createInferenceSolanaWalletAdapter(solanaSigner, connection);

const client = new GalliunClient({
  baseUrl: "https://api.galliun.com",
  chain: "solana",
  wallet,
  inferenceWallet,
});

The Solana signer must expose publicKey and sendTransaction (compatible with wallet-adapter style wallets).

Auth for conversations

Managed conversations require a signed wallet challenge. The inference wallet must implement signMessage. The SDK calls client.inference.auth.ensureAuthenticated() when you use storeConversation or conversation APIs.

See Conversations.

Safety