UNPKG

@ghostspeak/sdk

Version:

TypeScript SDK for GhostSpeak AI Agent Commerce Protocol - Production Ready Beta

781 lines (717 loc) 132 kB
import { P as PrivacyMode, R as ReputationTier, S as ScoreRange, a as PrivacySettings, M as MetricVisibility, V as VisibleReputation } from './GhostSpeakClient-qdLGyuDp.js'; export { j as ApplyPresetParams, A as AuthorizationModule, G as GhostSpeakClient, h as GrantAccessParams, I as InitializePrivacyParams, n as IssuedCredentialResult, e as PRIVACY_CONSTANTS, b as PrivacyModule, f as PrivacyPreset, d as PrivacyPresets, i as RevokeAccessParams, g as SetMetricVisibilityParams, m as UnifiedCredentialConfig, k as UnifiedCredentialService, U as UpdatePrivacyModeParams, c as VisibilityLevel, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-qdLGyuDp.js'; import { Address, ReadonlyUint8Array, Option, Decoder, TransactionSigner, AccountMeta, Instruction, InstructionWithData, InstructionWithAccounts, WritableAccount, ReadonlySignerAccount, AccountSignerMeta, ReadonlyAccount, OptionOrNullable, WritableSignerAccount, Slot, Lamports, Epoch, Base58EncodedBytes, Base64EncodedBytes, TransactionError, Base64EncodedWireTransaction, Signature, TransactionMessageBytesBase64, Commitment as Commitment$1, KeyPairSigner } from '@solana/kit'; export { TransactionSigner, address, createKeyPairSignerFromBytes, createSolanaRpc, generateKeyPairSigner } from '@solana/kit'; export { AddressOf, Agent, AgentCreationParams, AgentEvent, AgentMetadata, AgentType, Attachment, Channel, ChannelCreationParams, ChannelEvent, ChannelType, CommunicationMessage, CommunicationSession, ConfidentialBalance, ConfidentialTransfer, CreateCommunicationSessionParams, DeepPartial, ErrorCode, Escrow, EscrowCreationParams, EscrowEvent, Event, FilterOptions, Message, MessageType, Milestone, PaginationOptions, ParticipantStatus, ParticipantType, QueryResult, Rating, Reaction, Reputation, Result, SDKError, SendCommunicationMessageParams, SimulationResult, Transaction, TransferProof, UpdateParticipantStatusParams, WithAddress, isError, isSuccess, unwrap } from './types.js'; export { AccountNotFoundError, ErrorFactory, ErrorHandler, InsufficientBalanceError, InvalidInputError, NetworkError, SimulationFailedError, TimeoutError, TransactionFailedError, ValidationError } from './errors.js'; import { c as AccessTier, d as GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, P as PricingModelArgs, E as ExtendedRpcApi, B as BaseModule } from './StakingModule-CPhp_ZY0.js'; export { a8 as AgentAccount, A as AgentModule, a7 as AgentRegistrationData, a6 as AgentWithAddress, e as CacheConfig, C as CacheManager, f as ClaimGhostParams, am as Commitment, a0 as CreateDidDocumentParams, j as CreateProposalParams, p as Credential, n as CredentialKind, m as CredentialModule, o as CredentialStatus, q as CredentialTemplate, a2 as DeactivateDidDocumentParams, X as DidDocument, t as DidError, u as DidErrorClass, D as DidModule, _ as DidResolutionMetadata, al as EmergencyConfig, l as ExecutionParams, a as GhostModule, G as GhostSpeakConfig, aa as GhostSpeakError, b as GovernanceModule, i as InitializeStakingConfigParams, I as InstructionBuilder, M as MultisigModule, N as Network, a5 as PayAIReputationRecordInput, g as PreparedClaimResult, a9 as PricingModel, k as ProposalType, ab as RegisterAgentParams, a4 as ReputationData, R as ReputationModule, a3 as ResolveDidDocumentParams, an as RetryConfig, ad as RpcAccountInfo, ag as RpcAccountInfoResponse, ao as RpcApi, ah as RpcMultipleAccountsResponse, ae as RpcProgramAccount, af as RpcProgramAccountsResponse, ac as RpcResponse, ap as RpcSubscriptionApi, Z as ServiceEndpoint, s as ServiceEndpointType, aj as SimulatedTransactionResponse, ak as SolanaRpcClient, h as StakeParams, aq as StakingAccount, ar as StakingConfig, S as StakingModule, ai as TransactionResponse, U as UnstakeParams, a1 as UpdateDidDocumentParams, Y as VerificationMethod, V as VerificationMethodType, r as VerificationRelationship, $ as W3CDidDocument, W as W3CVerifiableCredential, L as canPerformAction, F as createEd25519VerificationMethod, H as createServiceEndpoint, at as decodeAgent, v as deriveDidDocumentPda, O as didDocumentToJson, z as exportAsW3CDidDocument, au as fetchAgent, av as fetchMaybeAgent, w as generateDidString, as as getAgentDecoder, T as getIdentifierFromDid, K as getMethodsForRelationship, Q as getNetworkFromDid, aw as getStakingAccountDecoder, ax as getStakingConfigDecoder, J as isDidActive, y as parseDidString, x as validateDidString } from './StakingModule-CPhp_ZY0.js'; import * as gill from 'gill'; import { SolanaClient } from 'gill'; import { Address as Address$1 } from '@solana/addresses'; export { l as AuthorizationFilter, p as AuthorizationInvalidReason, q as AuthorizationMessage, n as AuthorizationMetadata, o as AuthorizationProof, u as AuthorizationRevocation, A as AuthorizationStatus, t as AuthorizationUsage, k as AuthorizationWithStatus, B as BatchAuthorizationVerification, C as CreateAuthorizationParams, R as ReputationAuthorization, m as SolanaNetwork, V as VerificationDetails, r as VerifyAuthorizationParams, c as createAuthorizationMessage, b as createSignedAuthorization, e as deserializeAuthorization, g as generateNonce, f as getAuthorizationId, h as isAuthorizationExhausted, i as isAuthorizationExpired, d as serializeAuthorization, a as signAuthorizationMessage, j as validateAuthorizationNetwork, v as verifyAuthorizationSignature } from './signature-verification-BDzoR1MG.js'; export { h as ASSOCIATED_TOKEN_PROGRAM_ADDRESS, A as ATTESTATION_SEED, d as AttestationPDAResult, C as CREDENTIAL_SEED, e as CreateAttestationConfig, f as GHOSTSPEAK_PROGRAM_ID, c as GhostOwnershipAttestationData, G as GhostSpeakCredentialConfig, N as NATIVE_MINT_ADDRESS, S as SASAttestationHelper, a as SAS_PROGRAM_ID, b as SCHEMA_SEED, g as TOKEN_2022_PROGRAM_ADDRESS, T as TOKEN_PROGRAM_ADDRESS } from './browser-D1TpjbjZ.js'; import { I as IPFSClient, C as ClientEncryptionService } from './feature-flags-B1g0DCPe.js'; export { A as AccountInspectionResult, a5 as AssociatedTokenAccount, K as BatchDiagnosticReport, af as ClientEncryptionOptions, a7 as ConfidentialTransferConfig, J as DiagnosticReport, D as DiscriminatorValidationResult, ad as EncryptedData, ai as FeatureFlagManager, aj as FeatureFlags, G as GhostSpeakSDKError, a8 as InterestBearingConfig, L as LegacyAgentData, M as MigrationPlan, x as MigrationResult, ae as PrivateMetadata, R as ReputationTagEngine, _ as TokenExtension, T as TokenProgram, a6 as TransferFeeConfig, m as createDiscriminatorErrorMessage, c as createErrorContext, o as createMigrationPlan, q as createMigrationReport, d as deriveAssociatedTokenAddress, a9 as deriveMultisigPda, aa as deriveProposalPda, S as deriveSplTokenAssociatedTokenAddress, U as deriveToken2022AssociatedTokenAddress, a as detectTokenProgram, B as diagnoseAccountFromChain, F as diagnoseBatchFromChain, e as enhanceTransactionError, H as exportDiagnosticReport, Q as extractInstructionName, u as extractLegacyData, f as formatTokenAmount, ab as generateLocalPrivacyProof, W as getAllAssociatedTokenAddresses, V as getAssociatedTokenAccount, a3 as getConfidentialTransferConfig, ag as getFeatureFlags, a4 as getInterestBearingConfig, t as getMigrationInstructions, Y as getTokenProgramAddress, Z as getTokenProgramFromAddress, g as getTokenProgramType, a2 as getTransferFeeConfig, a0 as hasConfidentialTransferExtension, a1 as hasInterestBearingExtension, $ as hasTransferFeeExtension, n as inspectAccountData, ah as isFeatureEnabled, i as isToken2022Mint, O as logEnhancedError, p as parseTokenAmount, y as runAccountDiagnostics, z as runBatchDiagnostics, s as safeDecodeAgent, r as simulateMigration, v as validateAccountDiscriminator, X as validateAssociatedTokenAddress, P as validatePreconditions, ac as verifyLocalPrivacyProof, w as withEnhancedErrors, N as withEnhancedErrorsSync } from './feature-flags-B1g0DCPe.js'; import { Rpc, GetSignaturesForAddressApi, GetTransactionApi, GetAccountInfoApi } from '@solana/rpc'; import { I as IPFSConfig, g as IPFSUploadOptions, C as ContentStorageResult, m as IPFSContentMetadata, h as IPFSOperationResult, r as IPFSError } from './reputation-types-Yebf0Rm_.js'; export { B as BadgeType, t as BehaviorTag, A as BulkTagUpdateRequest, o as CategoryReputation, u as ComplianceTag, D as DEFAULT_TAG_DECAY, K as FlexibleContent, l as IPFSPinResult, H as IPFSProviderConfig, j as IPFSRetrievalOptions, k as IPFSRetrievalResult, i as IPFSUploadResult, J as JobPerformance, F as ProposalStatus, s as REPUTATION_CONSTANTS, a as ReputationCalculationResult, p as ReputationTier, S as SkillTag, v as TAG_CONSTANTS, q as TagCategory, w as TagConfidenceLevel, x as TagCriteria, T as TagDecayConfig, y as TagEvaluation, d as TagFilters, e as TagQueryResult, b as TagReputationMetrics, c as TagScoreType, z as TagUpdateRequest } from './reputation-types-Yebf0Rm_.js'; export { CrossmintClientOptions, CredentialType as CrossmintCredentialType, IssuedCredential as CrossmintIssuedCredential, CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES } from './credentials.js'; export { ElGamalCiphertext, ElGamalKeypair, TransferProof as ElGamalTransferProof, WasmModule, WithdrawProof, decrypt, elgamal, encrypt, generateKeypair, generateTransferProof, generateWithdrawProof, isWasmAvailable, loadWasmModule, wasmBridge } from './crypto.js'; export { d as deriveAgentPda, b as deriveAgentVerificationPda, a as deriveUserRegistryPda, f as findProgramDerivedAddress } from './pda-Ce7VYg4T.js'; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ /** Arbitrator's final decision on disputed escrow */ type ArbitratorDecision = { __kind: "FavorClient"; reason: string; } | { __kind: "FavorAgent"; reason: string; } | { __kind: "Split"; clientPercentage: number; reason: string; }; type ArbitratorDecisionArgs = ArbitratorDecision; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type DeliverySubmittedEvent = { escrowId: bigint; agent: Address; deliveryProof: string; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type DisputeFiledEvent = { escrowId: bigint; client: Address; reason: string; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type DisputeResolvedEvent = { escrowId: bigint; decision: ArbitratorDecision; arbitrator: Address; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type EscrowCompletedEvent = { escrowId: bigint; agent: Address; amount: bigint; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type EscrowCreatedEvent = { escrowId: bigint; client: Address; agent: Address; amount: bigint; deadline: bigint; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ /** Escrow lifecycle states */ declare enum EscrowStatus { Active = 0, Completed = 1, Disputed = 2, Cancelled = 3 } /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type GhostSlashedEvent = { agent: Address; amount: bigint; reason: SlashReason; newTier: AccessTier; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type GhostStakedEvent = { agent: Address; amount: bigint; unlockAt: bigint; reputationBoostBps: number; tier: AccessTier; dailyApiCalls: number; votingPower: bigint; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type GhostUnstakedEvent = { agent: Address; amount: bigint; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type ReputationTagsUpdatedEvent = { agent: Address; totalTags: number; skillTagsCount: number; behaviorTagsCount: number; complianceTagsCount: number; tagScoresCount: number; timestamp: bigint; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type ServiceEndpointArgs = { /** Service identifier (e.g., "agent-api") */ id: string; /** Type of service */ serviceType: ServiceEndpointTypeArgs; /** Service endpoint URI */ serviceEndpoint: string; /** Optional description */ description: string; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ /** Service endpoint type */ declare enum ServiceEndpointType { AIAgentService = 0, DIDCommMessaging = 1, CredentialRepository = 2, LinkedDomains = 3, Custom = 4 } type ServiceEndpointTypeArgs = ServiceEndpointType; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ /** Reasons for slashing staked tokens */ declare enum SlashReason { Fraud = 0, DisputeLoss = 1, Custom = 2 } type SlashReasonArgs = SlashReason; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type TagDecayAppliedEvent = { agent: Address; tagsRemoved: number; remainingTags: number; timestamp: bigint; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ /** Tag score with confidence tracking */ type TagScore = { /** Tag name (e.g., "fast-responder", "defi-expert") */ tagName: string; /** Confidence score in basis points (0-10000) */ confidence: number; /** Number of supporting data points for this tag */ evidenceCount: number; /** Last time this tag was updated */ lastUpdated: bigint; }; type TagScoreArgs = { /** Tag name (e.g., "fast-responder", "defi-expert") */ tagName: string; /** Confidence score in basis points (0-10000) */ confidence: number; /** Number of supporting data points for this tag */ evidenceCount: number; /** Last time this tag was updated */ lastUpdated: number | bigint; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type VerificationMethodArgs = { /** Method identifier (e.g., "key-1") */ id: string; /** Type of verification method */ methodType: VerificationMethodTypeArgs; /** DID of the controller (usually the DID itself) */ controller: string; /** Public key in multibase format (base58btc) */ publicKeyMultibase: string; /** Verification relationships this key has */ relationships: Array<VerificationRelationshipArgs>; /** Creation timestamp */ createdAt: number | bigint; /** Revoked flag */ revoked: boolean; }; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ /** Verification method type for DIDs */ declare enum VerificationMethodType { Ed25519VerificationKey2020 = 0, X25519KeyAgreementKey2020 = 1, EcdsaSecp256k1VerificationKey2019 = 2 } type VerificationMethodTypeArgs = VerificationMethodType; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ /** Verification relationship types */ declare enum VerificationRelationship { Authentication = 0, AssertionMethod = 1, KeyAgreement = 2, CapabilityInvocation = 3, CapabilityDelegation = 4 } type VerificationRelationshipArgs = VerificationRelationship; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type GhostProtectEscrow = { discriminator: ReadonlyUint8Array; /** Unique escrow ID */ escrowId: bigint; /** Client (payer) */ client: Address; /** Agent (service provider) */ agent: Address; /** Payment amount */ amount: bigint; /** Payment token mint */ tokenMint: Address; /** Escrow status */ status: EscrowStatus; /** Job description (IPFS hash) */ jobDescription: string; /** Delivery proof (IPFS hash) */ deliveryProof: Option<string>; /** Deadline timestamp */ deadline: bigint; /** Created timestamp */ createdAt: bigint; /** Completed/disputed timestamp */ completedAt: Option<bigint>; /** Dispute reason (if disputed) */ disputeReason: Option<string>; /** Arbitrator decision (if disputed) */ arbitratorDecision: Option<ArbitratorDecision>; bump: number; }; /** Gets the decoder for {@link GhostProtectEscrow} account data. */ declare function getGhostProtectEscrowDecoder(): Decoder<GhostProtectEscrow>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type ApproveDeliveryInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountEscrow extends string | AccountMeta<string> = string, TAccountEscrowVault extends string | AccountMeta<string> = string, TAccountAgentTokenAccount extends string | AccountMeta<string> = string, TAccountClient extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountEscrow extends string ? WritableAccount<TAccountEscrow> : TAccountEscrow, TAccountEscrowVault extends string ? WritableAccount<TAccountEscrowVault> : TAccountEscrowVault, TAccountAgentTokenAccount extends string ? WritableAccount<TAccountAgentTokenAccount> : TAccountAgentTokenAccount, TAccountClient extends string ? ReadonlySignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, ...TRemainingAccounts ]>; type ApproveDeliveryInput<TAccountEscrow extends string = string, TAccountEscrowVault extends string = string, TAccountAgentTokenAccount extends string = string, TAccountClient extends string = string, TAccountTokenProgram extends string = string> = { escrow: Address<TAccountEscrow>; escrowVault: Address<TAccountEscrowVault>; agentTokenAccount: Address<TAccountAgentTokenAccount>; client: TransactionSigner<TAccountClient>; tokenProgram?: Address<TAccountTokenProgram>; }; declare function getApproveDeliveryInstruction<TAccountEscrow extends string, TAccountEscrowVault extends string, TAccountAgentTokenAccount extends string, TAccountClient extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: ApproveDeliveryInput<TAccountEscrow, TAccountEscrowVault, TAccountAgentTokenAccount, TAccountClient, TAccountTokenProgram>, config?: { programAddress?: TProgramAddress; }): ApproveDeliveryInstruction<TProgramAddress, TAccountEscrow, TAccountEscrowVault, TAccountAgentTokenAccount, TAccountClient, TAccountTokenProgram>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type ArbitrateDisputeInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountEscrow extends string | AccountMeta<string> = string, TAccountEscrowVault extends string | AccountMeta<string> = string, TAccountAgentTokenAccount extends string | AccountMeta<string> = string, TAccountClientTokenAccount extends string | AccountMeta<string> = string, TAccountAgentStaking extends string | AccountMeta<string> = string, TAccountArbitrator extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountEscrow extends string ? WritableAccount<TAccountEscrow> : TAccountEscrow, TAccountEscrowVault extends string ? WritableAccount<TAccountEscrowVault> : TAccountEscrowVault, TAccountAgentTokenAccount extends string ? WritableAccount<TAccountAgentTokenAccount> : TAccountAgentTokenAccount, TAccountClientTokenAccount extends string ? WritableAccount<TAccountClientTokenAccount> : TAccountClientTokenAccount, TAccountAgentStaking extends string ? WritableAccount<TAccountAgentStaking> : TAccountAgentStaking, TAccountArbitrator extends string ? ReadonlySignerAccount<TAccountArbitrator> & AccountSignerMeta<TAccountArbitrator> : TAccountArbitrator, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, ...TRemainingAccounts ]>; type ArbitrateDisputeInstructionDataArgs = { decision: ArbitratorDecisionArgs; }; type ArbitrateDisputeInput<TAccountEscrow extends string = string, TAccountEscrowVault extends string = string, TAccountAgentTokenAccount extends string = string, TAccountClientTokenAccount extends string = string, TAccountAgentStaking extends string = string, TAccountArbitrator extends string = string, TAccountTokenProgram extends string = string> = { escrow: Address<TAccountEscrow>; escrowVault: Address<TAccountEscrowVault>; agentTokenAccount: Address<TAccountAgentTokenAccount>; clientTokenAccount: Address<TAccountClientTokenAccount>; /** Agent's staking account (for potential slashing) */ agentStaking: Address<TAccountAgentStaking>; arbitrator: TransactionSigner<TAccountArbitrator>; tokenProgram?: Address<TAccountTokenProgram>; decision: ArbitrateDisputeInstructionDataArgs["decision"]; }; declare function getArbitrateDisputeInstruction<TAccountEscrow extends string, TAccountEscrowVault extends string, TAccountAgentTokenAccount extends string, TAccountClientTokenAccount extends string, TAccountAgentStaking extends string, TAccountArbitrator extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: ArbitrateDisputeInput<TAccountEscrow, TAccountEscrowVault, TAccountAgentTokenAccount, TAccountClientTokenAccount, TAccountAgentStaking, TAccountArbitrator, TAccountTokenProgram>, config?: { programAddress?: TProgramAddress; }): ArbitrateDisputeInstruction<TProgramAddress, TAccountEscrow, TAccountEscrowVault, TAccountAgentTokenAccount, TAccountClientTokenAccount, TAccountAgentStaking, TAccountArbitrator, TAccountTokenProgram>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type ClaimGhostInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAgentAccount extends string | AccountMeta<string> = string, TAccountDidDocument extends string | AccountMeta<string> = string, TAccountSasAttestation extends string | AccountMeta<string> = string, TAccountClaimer extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountAgentAccount extends string ? WritableAccount<TAccountAgentAccount> : TAccountAgentAccount, TAccountDidDocument extends string ? WritableAccount<TAccountDidDocument> : TAccountDidDocument, TAccountSasAttestation extends string ? ReadonlyAccount<TAccountSasAttestation> : TAccountSasAttestation, TAccountClaimer extends string ? WritableSignerAccount<TAccountClaimer> & AccountSignerMeta<TAccountClaimer> : TAccountClaimer, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts ]>; type ClaimGhostInstructionDataArgs = { sasCredential: Address; sasSchema: Address; ipfsMetadataUri: OptionOrNullable<string>; network: string; }; type ClaimGhostInput<TAccountAgentAccount extends string = string, TAccountDidDocument extends string = string, TAccountSasAttestation extends string = string, TAccountClaimer extends string = string, TAccountSystemProgram extends string = string> = { agentAccount: Address<TAccountAgentAccount>; /** * DID document to create for this Ghost * Seeds: [b"did_document", agent_account.x402_payment_address.as_ref()] */ didDocument: Address<TAccountDidDocument>; /** * SAS Attestation proving ownership of x402_payment_address * PDA: [b"attestation", sas_credential, sas_schema, x402_payment_address] */ sasAttestation: Address<TAccountSasAttestation>; /** The claimer must have created a SAS attestation proving they own x402_payment_address */ claimer: TransactionSigner<TAccountClaimer>; systemProgram?: Address<TAccountSystemProgram>; sasCredential: ClaimGhostInstructionDataArgs["sasCredential"]; sasSchema: ClaimGhostInstructionDataArgs["sasSchema"]; ipfsMetadataUri: ClaimGhostInstructionDataArgs["ipfsMetadataUri"]; network: ClaimGhostInstructionDataArgs["network"]; }; declare function getClaimGhostInstruction<TAccountAgentAccount extends string, TAccountDidDocument extends string, TAccountSasAttestation extends string, TAccountClaimer extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: ClaimGhostInput<TAccountAgentAccount, TAccountDidDocument, TAccountSasAttestation, TAccountClaimer, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress; }): ClaimGhostInstruction<TProgramAddress, TAccountAgentAccount, TAccountDidDocument, TAccountSasAttestation, TAccountClaimer, TAccountSystemProgram>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type CreateDidDocumentInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountDidDocument extends string | AccountMeta<string> = string, TAccountController extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountClock extends string | AccountMeta<string> = "SysvarC1ock11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountDidDocument extends string ? WritableAccount<TAccountDidDocument> : TAccountDidDocument, TAccountController extends string ? WritableSignerAccount<TAccountController> & AccountSignerMeta<TAccountController> : TAccountController, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock, ...TRemainingAccounts ]>; type CreateDidDocumentInstructionDataArgs = { didString: string; verificationMethods: Array<VerificationMethodArgs>; serviceEndpoints: Array<ServiceEndpointArgs>; }; type CreateDidDocumentAsyncInput<TAccountDidDocument extends string = string, TAccountController extends string = string, TAccountSystemProgram extends string = string, TAccountClock extends string = string> = { /** DID document account with canonical PDA */ didDocument?: Address<TAccountDidDocument>; /** Controller of the DID (owner) */ controller: TransactionSigner<TAccountController>; /** System program for account creation */ systemProgram?: Address<TAccountSystemProgram>; /** Clock sysvar for timestamp validation */ clock?: Address<TAccountClock>; didString: CreateDidDocumentInstructionDataArgs["didString"]; verificationMethods: CreateDidDocumentInstructionDataArgs["verificationMethods"]; serviceEndpoints: CreateDidDocumentInstructionDataArgs["serviceEndpoints"]; }; declare function getCreateDidDocumentInstructionAsync<TAccountDidDocument extends string, TAccountController extends string, TAccountSystemProgram extends string, TAccountClock extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: CreateDidDocumentAsyncInput<TAccountDidDocument, TAccountController, TAccountSystemProgram, TAccountClock>, config?: { programAddress?: TProgramAddress; }): Promise<CreateDidDocumentInstruction<TProgramAddress, TAccountDidDocument, TAccountController, TAccountSystemProgram, TAccountClock>>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type CreateEscrowInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountEscrow extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountClientTokenAccount extends string | AccountMeta<string> = string, TAccountEscrowVault extends string | AccountMeta<string> = string, TAccountTokenMint extends string | AccountMeta<string> = string, TAccountClient extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountEscrow extends string ? WritableAccount<TAccountEscrow> : TAccountEscrow, TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent, TAccountClientTokenAccount extends string ? WritableAccount<TAccountClientTokenAccount> : TAccountClientTokenAccount, TAccountEscrowVault extends string ? WritableAccount<TAccountEscrowVault> : TAccountEscrowVault, TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint, TAccountClient extends string ? WritableSignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts ]>; type CreateEscrowInstructionDataArgs = { escrowId: number | bigint; amount: number | bigint; jobDescription: string; deadline: number | bigint; }; type CreateEscrowAsyncInput<TAccountEscrow extends string = string, TAccountAgent extends string = string, TAccountClientTokenAccount extends string = string, TAccountEscrowVault extends string = string, TAccountTokenMint extends string = string, TAccountClient extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string> = { escrow?: Address<TAccountEscrow>; agent: Address<TAccountAgent>; clientTokenAccount: Address<TAccountClientTokenAccount>; escrowVault: Address<TAccountEscrowVault>; tokenMint: Address<TAccountTokenMint>; client: TransactionSigner<TAccountClient>; tokenProgram?: Address<TAccountTokenProgram>; systemProgram?: Address<TAccountSystemProgram>; escrowId: CreateEscrowInstructionDataArgs["escrowId"]; amount: CreateEscrowInstructionDataArgs["amount"]; jobDescription: CreateEscrowInstructionDataArgs["jobDescription"]; deadline: CreateEscrowInstructionDataArgs["deadline"]; }; declare function getCreateEscrowInstructionAsync<TAccountEscrow extends string, TAccountAgent extends string, TAccountClientTokenAccount extends string, TAccountEscrowVault extends string, TAccountTokenMint extends string, TAccountClient extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: CreateEscrowAsyncInput<TAccountEscrow, TAccountAgent, TAccountClientTokenAccount, TAccountEscrowVault, TAccountTokenMint, TAccountClient, TAccountTokenProgram, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress; }): Promise<CreateEscrowInstruction<TProgramAddress, TAccountEscrow, TAccountAgent, TAccountClientTokenAccount, TAccountEscrowVault, TAccountTokenMint, TAccountClient, TAccountTokenProgram, TAccountSystemProgram>>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type DeactivateDidDocumentInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountDidDocument extends string | AccountMeta<string> = string, TAccountController extends string | AccountMeta<string> = string, TAccountClock extends string | AccountMeta<string> = "SysvarC1ock11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountDidDocument extends string ? WritableAccount<TAccountDidDocument> : TAccountDidDocument, TAccountController extends string ? WritableSignerAccount<TAccountController> & AccountSignerMeta<TAccountController> : TAccountController, TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock, ...TRemainingAccounts ]>; type DeactivateDidDocumentAsyncInput<TAccountDidDocument extends string = string, TAccountController extends string = string, TAccountClock extends string = string> = { /** DID document account with canonical PDA validation */ didDocument?: Address<TAccountDidDocument>; /** Controller of the DID (must match document controller) */ controller: TransactionSigner<TAccountController>; /** Clock sysvar for timestamp validation */ clock?: Address<TAccountClock>; }; declare function getDeactivateDidDocumentInstructionAsync<TAccountDidDocument extends string, TAccountController extends string, TAccountClock extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: DeactivateDidDocumentAsyncInput<TAccountDidDocument, TAccountController, TAccountClock>, config?: { programAddress?: TProgramAddress; }): Promise<DeactivateDidDocumentInstruction<TProgramAddress, TAccountDidDocument, TAccountController, TAccountClock>>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type FileDisputeInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountEscrow extends string | AccountMeta<string> = string, TAccountClient extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountEscrow extends string ? WritableAccount<TAccountEscrow> : TAccountEscrow, TAccountClient extends string ? ReadonlySignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient, ...TRemainingAccounts ]>; type FileDisputeInstructionDataArgs = { reason: string; }; type FileDisputeInput<TAccountEscrow extends string = string, TAccountClient extends string = string> = { escrow: Address<TAccountEscrow>; client: TransactionSigner<TAccountClient>; reason: FileDisputeInstructionDataArgs["reason"]; }; declare function getFileDisputeInstruction<TAccountEscrow extends string, TAccountClient extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: FileDisputeInput<TAccountEscrow, TAccountClient>, config?: { programAddress?: TProgramAddress; }): FileDisputeInstruction<TProgramAddress, TAccountEscrow, TAccountClient>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type InitializeStakingConfigInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountStakingConfig extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountStakingConfig extends string ? WritableAccount<TAccountStakingConfig> : TAccountStakingConfig, TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts ]>; type InitializeStakingConfigInstructionDataArgs = { minStake: number | bigint; treasury: Address; }; type InitializeStakingConfigAsyncInput<TAccountStakingConfig extends string = string, TAccountAuthority extends string = string, TAccountSystemProgram extends string = string> = { stakingConfig?: Address<TAccountStakingConfig>; authority: TransactionSigner<TAccountAuthority>; systemProgram?: Address<TAccountSystemProgram>; minStake: InitializeStakingConfigInstructionDataArgs["minStake"]; treasury: InitializeStakingConfigInstructionDataArgs["treasury"]; }; declare function getInitializeStakingConfigInstructionAsync<TAccountStakingConfig extends string, TAccountAuthority extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: InitializeStakingConfigAsyncInput<TAccountStakingConfig, TAccountAuthority, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress; }): Promise<InitializeStakingConfigInstruction<TProgramAddress, TAccountStakingConfig, TAccountAuthority, TAccountSystemProgram>>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type RegisterAgentInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAgentAccount extends string | AccountMeta<string> = string, TAccountStakingAccount extends string | AccountMeta<string> = string, TAccountSigner extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountClock extends string | AccountMeta<string> = "SysvarC1ock11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountAgentAccount extends string ? WritableAccount<TAccountAgentAccount> : TAccountAgentAccount, TAccountStakingAccount extends string ? ReadonlyAccount<TAccountStakingAccount> : TAccountStakingAccount, TAccountSigner extends string ? WritableSignerAccount<TAccountSigner> & AccountSignerMeta<TAccountSigner> : TAccountSigner, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock, ...TRemainingAccounts ]>; type RegisterAgentInstructionDataArgs = { agentType: number; name: string; description: string; metadataUri: string; agentId: string; pricingModel: PricingModelArgs; }; type RegisterAgentAsyncInput<TAccountAgentAccount extends string = string, TAccountStakingAccount extends string = string, TAccountSigner extends string = string, TAccountSystemProgram extends string = string, TAccountClock extends string = string> = { /** Agent account with enhanced 2025 PDA security */ agentAccount?: Address<TAccountAgentAccount>; /** Staking account - REQUIRED for Sybil resistance (must have >= 1K GHOST staked) */ stakingAccount?: Address<TAccountStakingAccount>; /** * User registry with enhanced validation * Authority with enhanced verification */ signer: TransactionSigner<TAccountSigner>; /** System program for account creation */ systemProgram?: Address<TAccountSystemProgram>; /** Clock sysvar for timestamp validation */ clock?: Address<TAccountClock>; agentType: RegisterAgentInstructionDataArgs["agentType"]; name: RegisterAgentInstructionDataArgs["name"]; description: RegisterAgentInstructionDataArgs["description"]; metadataUri: RegisterAgentInstructionDataArgs["metadataUri"]; agentId: RegisterAgentInstructionDataArgs["agentId"]; pricingModel: RegisterAgentInstructionDataArgs["pricingModel"]; }; declare function getRegisterAgentInstructionAsync<TAccountAgentAccount extends string, TAccountStakingAccount extends string, TAccountSigner extends string, TAccountSystemProgram extends string, TAccountClock extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: RegisterAgentAsyncInput<TAccountAgentAccount, TAccountStakingAccount, TAccountSigner, TAccountSystemProgram, TAccountClock>, config?: { programAddress?: TProgramAddress; }): Promise<RegisterAgentInstruction<TProgramAddress, TAccountAgentAccount, TAccountStakingAccount, TAccountSigner, TAccountSystemProgram, TAccountClock>>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type ResolveDidDocumentInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountDidDocument extends string | AccountMeta<string> = string, TAccountDidController extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountDidDocument extends string ? ReadonlyAccount<TAccountDidDocument> : TAccountDidDocument, TAccountDidController extends string ? ReadonlyAccount<TAccountDidController> : TAccountDidController, ...TRemainingAccounts ]>; type ResolveDidDocumentAsyncInput<TAccountDidDocument extends string = string, TAccountDidController extends string = string> = { /** DID document account */ didDocument?: Address<TAccountDidDocument>; /** Controller public key (used for PDA derivation) */ didController: Address<TAccountDidController>; }; declare function getResolveDidDocumentInstructionAsync<TAccountDidDocument extends string, TAccountDidController extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: ResolveDidDocumentAsyncInput<TAccountDidDocument, TAccountDidController>, config?: { programAddress?: TProgramAddress; }): Promise<ResolveDidDocumentInstruction<TProgramAddress, TAccountDidDocument, TAccountDidController>>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type SlashStakeInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountStakingAccount extends string | AccountMeta<string> = string, TAccountStakingConfig extends string | AccountMeta<string> = string, TAccountStakingVault extends string | AccountMeta<string> = string, TAccountTreasury extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountStakingAccount extends string ? WritableAccount<TAccountStakingAccount> : TAccountStakingAccount, TAccountStakingConfig extends string ? ReadonlyAccount<TAccountStakingConfig> : TAccountStakingConfig, TAccountStakingVault extends string ? WritableAccount<TAccountStakingVault> : TAccountStakingVault, TAccountTreasury extends string ? WritableAccount<TAccountTreasury> : TAccountTreasury, TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, ...TRemainingAccounts ]>; type SlashStakeInstructionDataArgs = { owner: Address; reason: SlashReasonArgs; customAmount: OptionOrNullable<number | bigint>; }; type SlashStakeAsyncInput<TAccountStakingAccount extends string = string, TAccountStakingConfig extends string = string, TAccountStakingVault extends string = string, TAccountTreasury extends string = string, TAccountAuthority extends string = string, TAccountTokenProgram extends string = string> = { stakingAccount?: Address<TAccountStakingAccount>; stakingConfig?: Address<TAccountStakingConfig>; stakingVault?: Address<TAccountStakingVault>; treasury: Address<TAccountTreasury>; authority: TransactionSigner<TAccountAuthority>; tokenProgram?: Address<TAccountTokenProgram>; owner: SlashStakeInstructionDataArgs["owner"]; reason: SlashStakeInstructionDataArgs["reason"]; customAmount: SlashStakeInstructionDataArgs["customAmount"]; }; declare function getSlashStakeInstructionAsync<TAccountStakingAccount extends string, TAccountStakingConfig extends string, TAccountStakingVault extends string, TAccountTreasury extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: SlashStakeAsyncInput<TAccountStakingAccount, TAccountStakingConfig, TAccountStakingVault, TAccountTreasury, TAccountAuthority, TAccountTokenProgram>, config?: { programAddress?: TProgramAddress; }): Promise<SlashStakeInstruction<TProgramAddress, TAccountStakingAccount, TAccountStakingConfig, TAccountStakingVault, TAccountTreasury, TAccountAuthority, TAccountTokenProgram>>; /** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ type StakeGhostInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountStakingAccount extends string | AccountMeta<string> = string, TAccountOwnerTokenAccount ext