/** * @module attestation * @description Web-of-trust attestations — create, revoke, and close * on-chain attestations that vouch for agent trustworthiness. * * Attestations are signed endorsements from one wallet to an agent, * forming a composable trust graph on Solana. * * @category Modules * @since v0.1.0 * @packageDocumentation */ import { type PublicKey, type TransactionSignature } from "@solana/web3.js"; import { BaseModule } from "./base"; import type { AgentAttestationData, CreateAttestationArgs } from "../types"; /** * @name AttestationModule * @description Manages on-chain attestations for the Synapse Agent Protocol. * Provides methods to create, revoke, close, and fetch attestation PDAs * that form the web-of-trust layer. * * @category Modules * @since v0.1.0 * @extends BaseModule * * @example * ```ts * const sap = new SapClient(provider); * // Create an attestation for an agent * const sig = await sap.attestation.create(agentWallet, { * attestationType: { identity: {} }, * metadataHash: [...], * expiresAt: null, * }); * ``` */ export declare class AttestationModule extends BaseModule { /** * @name deriveAttestation * @description Derive the `AgentAttestation` PDA for a given agent and attester. * @param agentPda - The agent account PDA to attest. * @param attester - The attester wallet. Defaults to the connected wallet. * @returns A tuple of `[PublicKey, bump]` for the attestation PDA. * @see {@link deriveAttestation} from `pda/` module for the underlying derivation. * @since v0.1.0 */ deriveAttestation(agentPda: PublicKey, attester?: PublicKey): readonly [PublicKey, number]; /** * @name create * @description Create an on-chain attestation vouching for an agent. * The connected wallet becomes the attester. * @param agentWallet - The wallet that owns the target agent. * @param args - Attestation parameters (type, metadata hash, optional expiry). * @returns {Promise} The transaction signature. * @since v0.1.0 */ create(agentWallet: PublicKey, args: CreateAttestationArgs): Promise; /** * @name revoke * @description Revoke a previously issued attestation. Only the original * attester may revoke. * @param agentWallet - The wallet of the attested agent. * @returns {Promise} The transaction signature. * @since v0.1.0 */ revoke(agentWallet: PublicKey): Promise; /** * @name close * @description Close a revoked attestation PDA and reclaim rent to the attester. * @param agentWallet - The wallet of the attested agent. * @returns {Promise} The transaction signature. * @since v0.1.0 */ close(agentWallet: PublicKey): Promise; /** * @name fetch * @description Fetch a deserialized `AgentAttestation` account. * @param agentPda - The agent account PDA. * @param attester - The attester wallet. Defaults to the connected wallet. * @returns {Promise} The attestation account data. * @throws Will throw if the attestation account does not exist. * @since v0.1.0 */ fetch(agentPda: PublicKey, attester?: PublicKey): Promise; /** * @name fetchNullable * @description Fetch a deserialized `AgentAttestation` account, or `null` * if it does not exist on-chain. * @param agentPda - The agent account PDA. * @param attester - The attester wallet. Defaults to the connected wallet. * @returns {Promise} The attestation data or `null`. * @since v0.1.0 */ fetchNullable(agentPda: PublicKey, attester?: PublicKey): Promise; } //# sourceMappingURL=attestation.d.ts.map