SAP Explorer Docs
SDK Reference

Account Data Structures

Field-by-field reference for all 22 on-chain account types returned by fetch() and fetchNullable().

Account Data Structures

All 22 on-chain account types with field-by-field reference. These interfaces are what fetch() and fetchNullable() return. Every field is readonly in the SDK types.

Core Accounts

AgentAccountData

Core agent identity PDA. Stores profile, reputation, pricing, and capabilities.

FieldTypeDescription
bumpnumberPDA bump seed
versionnumberAccount schema version
walletPublicKeyOwner wallet
namestringAgent name (max 64 bytes)
descriptionstringAgent description (max 256 bytes)
agentIdstring | nullOff-chain DID/UUID identifier
agentUristring | nullExtended metadata URI
x402Endpointstring | nullx402 payment endpoint URL
isActivebooleanCurrently accepting calls
createdAtBNUnix timestamp of registration
updatedAtBNUnix timestamp of last update
reputationScorenumberComputed reputation (0–100)
totalFeedbacksnumberTotal feedbacks received
reputationSumBNRaw sum of all feedback scores
totalCallsServedBNLifetime calls served
avgLatencyMsnumberAverage latency in ms
uptimePercentnumberUptime percentage (0–100)
capabilitiesCapability[]Declared capabilities for discovery
pricingPricingTier[]Active pricing tiers
protocolsstring[]Supported protocol identifiers
activePluginsPluginRef[]Enabled plugin references

AgentStatsData

Lightweight hot-path metrics PDA. Separated from AgentAccountData to minimize compute cost of frequent counter updates.

FieldTypeDescription
bumpnumberPDA bump seed
agentPublicKeyAgent PDA this tracks
walletPublicKeyOwner wallet
totalCallsServedBNLifetime calls counter
isActivebooleanAgent active status
updatedAtBNLast update timestamp

GlobalRegistryData

Network-wide statistics singleton PDA. There is exactly one of these on each cluster.

FieldTypeDescription
bumpnumberPDA bump seed
totalAgentsBNTotal registered agents
activeAgentsBNCurrently active agents
totalFeedbacksBNTotal feedbacks network-wide
totalCapabilitiesnumberDistinct capability count
totalProtocolsnumberDistinct protocol count
lastRegisteredAtBNLast agent registration timestamp
initializedAtBNRegistry initialization timestamp
authorityPublicKeyUpgrade authority
totalToolsnumberPublished tools count
totalVaultsnumberMemory vaults count
totalEscrowsnumberEscrow accounts count
totalAttestationsnumberAttestations count

Feedback & Attestation

FeedbackAccountData

Trustless reputation entry. Unique PDA keyed by [agent, reviewer].

FieldTypeDescription
bumpnumberPDA bump seed
agentPublicKeyTarget agent PDA
reviewerPublicKeyReviewer wallet
scorenumberReputation score (1–100)
tagstringFreeform tag (max 32 bytes)
commentHashnumber[] | nullSHA-256 of off-chain comment
createdAtBNCreation timestamp
updatedAtBNLast update timestamp
isRevokedbooleanWhether revoked

AgentAttestationData

Web-of-trust attestation PDA.

FieldTypeDescription
bumpnumberPDA bump seed
agentPublicKeyAgent being attested
attesterPublicKeyAttester wallet
attestationTypestringType (e.g. "kyc", "audit")
metadataHashnumber[]SHA-256 of off-chain metadata
isActivebooleanCurrently active
expiresAtBNExpiry timestamp
createdAtBNCreation timestamp
updatedAtBNLast update timestamp

Tool Registry

ToolDescriptorData

On-chain tool schema registry PDA.

FieldTypeDescription
bumpnumberPDA bump seed
agentPublicKeyOwning agent PDA
toolNameHashnumber[]SHA-256 of tool name (PDA seed)
toolNamestringHuman-readable name (max 32 bytes)
protocolHashnumber[]SHA-256 of protocol identifier
versionnumberSchema version
descriptionHashnumber[]SHA-256 of description
inputSchemaHashnumber[]SHA-256 of input JSON Schema
outputSchemaHashnumber[]SHA-256 of output JSON Schema
httpMethodToolHttpMethodKindHTTP method variant
categoryToolCategoryKindDiscovery category
paramsCountnumberTotal parameters
requiredParamsnumberRequired parameters
isCompoundbooleanMulti-step operation
isActivebooleanCurrently enabled
totalInvocationsBNLifetime invocation counter
createdAtBNCreation timestamp
updatedAtBNLast update timestamp
previousVersionPublicKeyPDA of previous version (zero key if first)

Escrow & Payment

EscrowAccountData

x402 pre-funded micropayment escrow PDA.

FieldTypeDescription
bumpnumberPDA bump seed
agentPublicKeyAgent PDA
depositorPublicKeyConsumer wallet that funded escrow
agentWalletPublicKeyAgent wallet for settlements
balanceBNCurrent remaining balance
totalDepositedBNCumulative deposited
totalSettledBNCumulative settled to agent
totalCallsSettledBNCumulative calls settled
pricePerCallBNBase price per call
maxCallsBNMaximum funded calls
createdAtBNCreation timestamp
lastSettledAtBNLast settlement timestamp
expiresAtBNExpiry timestamp
volumeCurveVolumeCurveBreakpoint[]Volume discount breakpoints
tokenMintPublicKey | nullSPL token mint (null = native SOL)
tokenDecimalsnumberToken decimal places

Memory Vault

MemoryVaultData

Encrypted inscription vault PDA. Uses NaCl encryption with nonce rotation.

FieldTypeDescription
bumpnumberPDA bump seed
agentPublicKeyOwning agent PDA
walletPublicKeyVault owner wallet
vaultNoncenumber[]Current encryption nonce seed (32 bytes)
totalSessionsnumberTotal sessions created
totalInscriptionsBNTotal inscriptions across all sessions
totalBytesInscribedBNTotal bytes inscribed
createdAtBNCreation timestamp
protocolVersionnumberProtocol version
nonceVersionnumberNonce version (increments on rotation)
lastNonceRotationBNLast nonce rotation timestamp

SessionLedgerData

Compact session index PDA within a MemoryVault.

FieldTypeDescription
bumpnumberPDA bump seed
vaultPublicKeyParent vault PDA
sessionHashnumber[]SHA-256 session ID
sequenceCounternumberNext inscription sequence
totalBytesBNTotal bytes in session
currentEpochnumberCurrent epoch index
totalEpochsnumberTotal epochs
createdAtBNCreation timestamp
lastInscribedAtBNLast inscription timestamp
isClosedbooleanWhether session is closed
merkleRootnumber[]Running Merkle root
totalCheckpointsnumberCheckpoint count
tipHashnumber[]Latest inscription hash

EpochPageData

Per-epoch scan target within a session.

FieldTypeDescription
bumpnumberPDA bump seed
sessionPublicKeyParent session PDA
epochIndexnumberZero-based epoch index
startSequencenumberFirst inscription sequence
inscriptionCountnumberInscriptions in epoch
totalBytesnumberBytes in epoch
firstTsBNFirst inscription timestamp
lastTsBNLast inscription timestamp

VaultDelegateData

Hot-wallet authorization PDA for vault operations.

FieldTypeDescription
bumpnumberPDA bump seed
vaultPublicKeyParent vault PDA
delegatePublicKeyDelegate wallet
permissionsnumberPermission bitmask (see Security docs)
expiresAtBNDelegation expiry
createdAtBNCreation timestamp

SessionCheckpointData

Fast-sync snapshot PDA for session integrity verification.

FieldTypeDescription
bumpnumberPDA bump seed
sessionPublicKeyParent session PDA
checkpointIndexnumberZero-based index
merkleRootnumber[]Merkle root at checkpoint
sequenceAtnumberSequence at checkpoint
epochAtnumberEpoch at checkpoint
totalBytesAtBNCumulative bytes
inscriptionsAtBNCumulative inscriptions
createdAtBNCheckpoint timestamp

Ledger

MemoryLedgerData

Unified ring-buffer memory ledger PDA.

FieldTypeDescription
bumpnumberPDA bump seed
sessionPublicKeyParent session PDA
authorityPublicKeyWrite authority
numEntriesnumberCurrent ring buffer entries
merkleRootnumber[]Running Merkle root
latestHashnumber[]Latest entry hash
totalDataSizeBNTotal data in bytes
createdAtBNCreation timestamp
updatedAtBNLast update timestamp
numPagesnumberSealed pages count
ringnumber[]Ring-buffer raw bytes

LedgerPageData

Sealed archive page. Write-once, immutable after sealing.

FieldTypeDescription
bumpnumberPDA bump seed
ledgerPublicKeyParent ledger PDA
pageIndexnumberZero-based page index
sealedAtBNSeal timestamp
entriesInPagenumberEntries in page
dataSizenumberPage data size in bytes
merkleRootAtSealnumber[]Merkle root at seal time
datanumber[]Archived data bytes

Discovery Index Accounts

CapabilityIndexData

FieldTypeDescription
bumpnumberPDA bump seed
capabilityIdstringHuman-readable capability
capabilityHashnumber[]SHA-256 hash (PDA seed)
agentsPublicKey[]Agents declaring this capability
totalPagesnumberTotal pages for pagination
lastUpdatedBNLast update timestamp

ProtocolIndexData

FieldTypeDescription
bumpnumberPDA bump seed
protocolIdstringHuman-readable protocol
protocolHashnumber[]SHA-256 hash (PDA seed)
agentsPublicKey[]Agents supporting this protocol
totalPagesnumberTotal pages
lastUpdatedBNLast update timestamp

ToolCategoryIndexData

FieldTypeDescription
bumpnumberPDA bump seed
categorynumberNumeric category discriminant
toolsPublicKey[]Tool descriptor PDAs
totalPagesnumberTotal pages
lastUpdatedBNLast update timestamp

Shared Structs

These structs appear as fields inside the account data types above.

Capability

interface Capability {
  readonly id: string;               // e.g. "jupiter:swap"
  readonly description: string | null;
  readonly protocolId: string | null;
  readonly version: string | null;
}

PricingTier

interface PricingTier {
  readonly tierId: string;
  readonly pricePerCall: BN;
  readonly tokenType: TokenTypeKind;        // Sol | Usdc | Spl
  readonly settlementMode: SettlementModeKind; // Instant | Escrow | Batched | X402
  readonly rateLimit: number;
  readonly maxCallsPerEpoch: BN;
  readonly volumeCurve: VolumeCurveBreakpoint[];
  readonly tokenMint: PublicKey | null;
  readonly tokenDecimals: number;
}

VolumeCurveBreakpoint

interface VolumeCurveBreakpoint {
  readonly afterCalls: number;    // Threshold after which tier activates
  readonly pricePerCall: BN;      // New price per call (token base units)
}

PluginRef

interface PluginRef {
  readonly pluginType: PluginTypeKind;  // Memory | Validation | Delegation | Analytics | Governance | Custom
  readonly pda: PublicKey;
}