Skip to main content

Documentation Index

Fetch the complete documentation index at: https://0xcaptain.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

AnalystClient wraps the SignalBoardV2 contract. Access it via client.analyst.

Methods

register

Register the connected wallet as an analyst.
const txHash = await client.analyst.register();
// with optional metadata (IPFS CID or arbitrary bytes):
const txHash = await client.analyst.register("0xdeadbeef");
Parameters: metadata?: Hex — optional profile metadata (default "0x") Returns: Promise<Hash>

deregister

Remove the connected wallet from the analyst registry.
const txHash = await client.analyst.deregister();
Returns: Promise<Hash>

postSignal

Post a directional trading signal to the SignalBoard.
const txHash = await client.analyst.postSignal({
  asset: "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111",
  direction: 1,       // -1 = short, 0 = neutral, 1 = long
  magnitude: 750,     // 750 bps = 7.5% confidence
  reasoning: "RSI divergence on 4H timeframe — bullish",
  ttl: 7200,          // 2 hours in seconds
});
Parameters (SignalParams):
FieldTypeDescription
assetAddressTarget token address
direction-1 | 0 | 1Short / neutral / long
magnitudenumberSignal strength in bps (0–10,000)
reasoningstring | HexReasoning text (auto-hashed) or pre-hashed 32-byte hex
ttlnumberSignal lifetime in seconds
Returns: Promise<Hash>

getReputation

Fetch on-chain reputation for an analyst address.
const rep = await client.analyst.getReputation("0x...");
// rep.score            bigint
// rep.totalSignals     bigint
// rep.profitableSignals bigint
// rep.avgPnlBps        bigint
Returns: Promise<ReputationData>

isRegistered

Check whether an address is a registered analyst.
const ok = await client.analyst.isRegistered("0x...");
Returns: Promise<boolean>

getAnalystInfo

Get full analyst struct from the SignalBoard.
const info = await client.analyst.getAnalystInfo("0x...");
// info.registered    boolean
// info.stakedAmount  bigint
// info.reputation    bigint
// info.registeredAt  bigint
Returns: Promise<AnalystInfo>