@ghostspeak/sdk
Version:
TypeScript SDK for GhostSpeak AI Agent Commerce Protocol - Production Ready Beta
1,177 lines (1,094 loc) • 77.1 kB
TypeScript
import { Address, ReadonlyUint8Array, Option, Decoder, AccountMeta, Instruction, InstructionWithData, InstructionWithAccounts, WritableAccount, WritableSignerAccount, AccountSignerMeta, ReadonlyAccount, ReadonlySignerAccount, Rpc, GetLatestBlockhashApi, SendTransactionApi, GetAccountInfoApi, SimulateTransactionApi, GetFeeForMessageApi, GetProgramAccountsApi, GetEpochInfoApi, GetSignatureStatusesApi, GetMultipleAccountsApi, RpcSubscriptions, SignatureNotificationsApi, SlotNotificationsApi, AccountRole, TransactionSigner, Signature as Signature$1 } from '@solana/kit';
import { I as IPFSConfig, V as VoteChoice, G as GovernanceProposal } from './ipfs-types-KJcvy9Qk.js';
import { Address as Address$1 } from '@solana/addresses';
import { IInstruction } from '@solana/instructions';
/**
* 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
*/
declare enum AccountState {
Uninitialized = 0,
Initialized = 1,
Frozen = 2
}
/**
* 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
*/
declare enum ApplicationStatus {
Submitted = 0,
Accepted = 1,
Rejected = 2,
Withdrawn = 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 AuctionBid = {
bidder: Address;
amount: bigint;
timestamp: bigint;
isWinning: 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
*/
declare enum AuctionStatus {
Active = 0,
Ended = 1,
Cancelled = 2,
Settled = 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
*/
declare enum AuctionType {
English = 0,
Dutch = 1,
SealedBid = 2,
Vickrey = 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 DutchAuctionConfig = {
decayType: DutchAuctionDecayType;
priceStepCount: number;
stepDuration: bigint;
decayRateBasisPoints: number;
};
/**
* 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
*/
declare enum DutchAuctionDecayType {
Linear = 0,
Exponential = 1,
Stepped = 2
}
/**
* 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
*/
declare enum PricingModel$1 {
Fixed = 0,
Hourly = 1,
PerTask = 2,
Subscription = 3,
Auction = 4,
Dynamic = 5,
RevenueShare = 6,
Tiered = 7
}
/**
* 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
*/
declare enum PurchaseStatus {
Pending = 0,
Confirmed = 1,
Completed = 2,
Cancelled = 3,
Paid = 4
}
/**
* 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 Agent = {
discriminator: ReadonlyUint8Array;
owner: Address;
name: string;
description: string;
capabilities: Array<string>;
pricingModel: PricingModel$1;
reputationScore: number;
totalJobsCompleted: number;
totalEarnings: bigint;
isActive: boolean;
createdAt: bigint;
updatedAt: bigint;
originalPrice: bigint;
genomeHash: string;
isReplicable: boolean;
replicationFee: bigint;
serviceEndpoint: string;
isVerified: boolean;
verificationTimestamp: bigint;
metadataUri: string;
frameworkOrigin: string;
supportedTokens: Array<Address>;
cnftMint: Option<Address>;
merkleTree: Option<Address>;
supportsA2a: boolean;
transferHook: Option<Address>;
parentAgent: Option<Address>;
generation: number;
bump: number;
};
declare function getAgentDecoder(): Decoder<Agent>;
/**
* 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 AuctionMarketplace = {
discriminator: ReadonlyUint8Array;
auction: Address;
agent: Address;
creator: Address;
auctionType: AuctionType;
startingPrice: bigint;
reservePrice: bigint;
isReserveHidden: boolean;
reserveMet: boolean;
currentPrice: bigint;
currentWinner: Option<Address>;
winner: Option<Address>;
auctionEndTime: bigint;
minimumBidIncrement: bigint;
totalBids: number;
status: AuctionStatus;
bids: Array<AuctionBid>;
createdAt: bigint;
endedAt: Option<bigint>;
metadataUri: string;
dutchConfig: Option<DutchAuctionConfig>;
extensionCount: number;
originalEndTime: bigint;
reservePriceLocked: boolean;
reserveShortfallNotified: boolean;
bump: number;
};
/**
* 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 JobApplication = {
discriminator: ReadonlyUint8Array;
jobPosting: Address;
agent: Address;
agentOwner: Address;
coverLetter: string;
proposedRate: bigint;
estimatedDelivery: bigint;
portfolioItems: Array<string>;
status: ApplicationStatus;
appliedAt: bigint;
bump: number;
};
/**
* 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 JobPosting$1 = {
discriminator: ReadonlyUint8Array;
employer: Address;
title: string;
description: string;
requirements: Array<string>;
budget: bigint;
deadline: bigint;
skillsNeeded: Array<string>;
budgetMin: bigint;
budgetMax: bigint;
paymentToken: Address;
jobType: string;
experienceLevel: string;
isActive: boolean;
applicationsCount: number;
createdAt: bigint;
updatedAt: bigint;
bump: number;
};
/**
* 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 ServiceListing = {
discriminator: ReadonlyUint8Array;
agent: Address;
owner: Address;
title: string;
description: string;
price: bigint;
tokenMint: Address;
serviceType: string;
paymentToken: Address;
estimatedDelivery: bigint;
tags: Array<string>;
isActive: boolean;
totalOrders: number;
rating: number;
createdAt: bigint;
updatedAt: bigint;
transferHook: Option<Address>;
bump: number;
};
/**
* 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 ServicePurchase = {
discriminator: ReadonlyUint8Array;
customer: Address;
agent: Address;
listing: Address;
listingId: bigint;
quantity: number;
requirements: Array<string>;
customInstructions: string;
deadline: bigint;
paymentAmount: bigint;
paymentToken: Address;
status: PurchaseStatus;
purchasedAt: bigint;
updatedAt: bigint;
transferHookApplied: boolean;
bump: number;
};
/**
* 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
*/
declare const GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS: Address<"GssMyhkQPePLzByJsJadbQePZc6GtzGi22aQqW5opvUX">;
/**
* 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 AcceptJobApplicationInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountJobContract extends string | AccountMeta<string> = string, TAccountJobPosting extends string | AccountMeta<string> = string, TAccountJobApplication extends string | AccountMeta<string> = string, TAccountEmployer extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountJobContract extends string ? WritableAccount<TAccountJobContract> : TAccountJobContract,
TAccountJobPosting extends string ? WritableAccount<TAccountJobPosting> : TAccountJobPosting,
TAccountJobApplication extends string ? WritableAccount<TAccountJobApplication> : TAccountJobApplication,
TAccountEmployer extends string ? WritableSignerAccount<TAccountEmployer> & AccountSignerMeta<TAccountEmployer> : TAccountEmployer,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
...TRemainingAccounts
]>;
/**
* 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 ApplyToJobInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountJobApplication extends string | AccountMeta<string> = string, TAccountJobPosting extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountAgentOwner extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountJobApplication extends string ? WritableAccount<TAccountJobApplication> : TAccountJobApplication,
TAccountJobPosting extends string ? WritableAccount<TAccountJobPosting> : TAccountJobPosting,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountAgentOwner extends string ? WritableSignerAccount<TAccountAgentOwner> & AccountSignerMeta<TAccountAgentOwner> : TAccountAgentOwner,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
...TRemainingAccounts
]>;
/**
* 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 ApproveExtensionInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountExtension extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountClock extends string | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountExtension extends string ? WritableAccount<TAccountExtension> : TAccountExtension,
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
...TRemainingAccounts
]>;
/**
* 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 CastVoteInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountProposal extends string | AccountMeta<string> = string, TAccountVoter extends string | AccountMeta<string> = string, TAccountVoterTokenAccount extends string | AccountMeta<string> = string, TAccountDelegateTokenAccount extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountProposal extends string ? WritableAccount<TAccountProposal> : TAccountProposal,
TAccountVoter extends string ? WritableSignerAccount<TAccountVoter> & AccountSignerMeta<TAccountVoter> : TAccountVoter,
TAccountVoterTokenAccount extends string ? ReadonlyAccount<TAccountVoterTokenAccount> : TAccountVoterTokenAccount,
TAccountDelegateTokenAccount extends string ? ReadonlyAccount<TAccountDelegateTokenAccount> : TAccountDelegateTokenAccount,
...TRemainingAccounts
]>;
/**
* 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 CreateJobPostingInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountJobPosting extends string | AccountMeta<string> = string, TAccountEmployer extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountJobPosting extends string ? WritableAccount<TAccountJobPosting> : TAccountJobPosting,
TAccountEmployer extends string ? WritableSignerAccount<TAccountEmployer> & AccountSignerMeta<TAccountEmployer> : TAccountEmployer,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
...TRemainingAccounts
]>;
/**
* 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 CreateServiceAuctionInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuction extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountUserRegistry extends string | AccountMeta<string> = string, TAccountCreator 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<[
TAccountAuction extends string ? WritableAccount<TAccountAuction> : TAccountAuction,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountUserRegistry extends string ? ReadonlyAccount<TAccountUserRegistry> : TAccountUserRegistry,
TAccountCreator extends string ? WritableSignerAccount<TAccountCreator> & AccountSignerMeta<TAccountCreator> : TAccountCreator,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
...TRemainingAccounts
]>;
/**
* 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 CreateServiceListingInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountServiceListing extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountUserRegistry extends string | AccountMeta<string> = string, TAccountCreator 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<[
TAccountServiceListing extends string ? WritableAccount<TAccountServiceListing> : TAccountServiceListing,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountUserRegistry extends string ? WritableAccount<TAccountUserRegistry> : TAccountUserRegistry,
TAccountCreator extends string ? WritableSignerAccount<TAccountCreator> & AccountSignerMeta<TAccountCreator> : TAccountCreator,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
...TRemainingAccounts
]>;
/**
* 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 CreateToken2022MintInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountRent extends string | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountMint extends string ? WritableSignerAccount<TAccountMint> & AccountSignerMeta<TAccountMint> : TAccountMint,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
TAccountRent extends string ? ReadonlyAccount<TAccountRent> : TAccountRent,
...TRemainingAccounts
]>;
/**
* 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 DelegateVoteInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountProposal extends string | AccountMeta<string> = string, TAccountDelegator extends string | AccountMeta<string> = string, TAccountDelegate extends string | AccountMeta<string> = string, TAccountDelegatorTokenAccount extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountProposal extends string ? WritableAccount<TAccountProposal> : TAccountProposal,
TAccountDelegator extends string ? WritableSignerAccount<TAccountDelegator> & AccountSignerMeta<TAccountDelegator> : TAccountDelegator,
TAccountDelegate extends string ? ReadonlyAccount<TAccountDelegate> : TAccountDelegate,
TAccountDelegatorTokenAccount extends string ? ReadonlyAccount<TAccountDelegatorTokenAccount> : TAccountDelegatorTokenAccount,
...TRemainingAccounts
]>;
/**
* 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 ExecuteProposalInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountProposal extends string | AccountMeta<string> = string, TAccountExecutor extends string | AccountMeta<string> = string, TAccountTargetProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountProposal extends string ? WritableAccount<TAccountProposal> : TAccountProposal,
TAccountExecutor extends string ? WritableSignerAccount<TAccountExecutor> & AccountSignerMeta<TAccountExecutor> : TAccountExecutor,
TAccountTargetProgram extends string ? ReadonlyAccount<TAccountTargetProgram> : TAccountTargetProgram,
...TRemainingAccounts
]>;
/**
* 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 FinalizeAuctionInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuction extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountClock extends string | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAuction extends string ? WritableAccount<TAccountAuction> : TAccountAuction,
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
...TRemainingAccounts
]>;
/**
* 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 InitializeConfidentialTransferMintInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
/**
* 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 InitializeDefaultAccountStateInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
/**
* 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 InitializeGovernanceProposalInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountProposal extends string | AccountMeta<string> = string, TAccountProposer extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountProposal extends string ? WritableAccount<TAccountProposal> : TAccountProposal,
TAccountProposer extends string ? WritableSignerAccount<TAccountProposer> & AccountSignerMeta<TAccountProposer> : TAccountProposer,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
...TRemainingAccounts
]>;
/**
* 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 InitializeInterestBearingConfigInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountRateAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountRateAuthority extends string ? ReadonlyAccount<TAccountRateAuthority> : TAccountRateAuthority,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
/**
* 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 InitializeMintCloseAuthorityInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountCloseAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountCloseAuthority extends string ? ReadonlyAccount<TAccountCloseAuthority> : TAccountCloseAuthority,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
/**
* 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 InitializeTransferFeeConfigInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountAgent extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint,
TAccountAgent extends string ? ReadonlyAccount<TAccountAgent> : TAccountAgent,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
/**
* 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 PlaceAuctionBidInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAuction extends string | AccountMeta<string> = string, TAccountUserRegistry extends string | AccountMeta<string> = string, TAccountBidder 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<[
TAccountAuction extends string ? WritableAccount<TAccountAuction> : TAccountAuction,
TAccountUserRegistry extends string ? ReadonlyAccount<TAccountUserRegistry> : TAccountUserRegistry,
TAccountBidder extends string ? WritableSignerAccount<TAccountBidder> & AccountSignerMeta<TAccountBidder> : TAccountBidder,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
...TRemainingAccounts
]>;
/**
* 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 PurchaseServiceInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountServicePurchase extends string | AccountMeta<string> = string, TAccountServiceListing extends string | AccountMeta<string> = string, TAccountBuyer extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountServicePurchase extends string ? WritableAccount<TAccountServicePurchase> : TAccountServicePurchase,
TAccountServiceListing extends string ? WritableAccount<TAccountServiceListing> : TAccountServiceListing,
TAccountBuyer extends string ? WritableSignerAccount<TAccountBuyer> & AccountSignerMeta<TAccountBuyer> : TAccountBuyer,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
...TRemainingAccounts
]>;
/**
* 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 TallyVotesInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountProposal extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountProposal extends string ? WritableAccount<TAccountProposal> : TAccountProposal,
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
...TRemainingAccounts
]>;
/**
* 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 UpdateAgentServiceInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountAgent extends string | AccountMeta<string> = string, TAccountOwner extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountAgent extends string ? WritableAccount<TAccountAgent> : TAccountAgent,
TAccountOwner extends string ? WritableSignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
...TRemainingAccounts
]>;
type RpcApi = Rpc<GetLatestBlockhashApi & SendTransactionApi & GetAccountInfoApi & SimulateTransactionApi & GetFeeForMessageApi & GetProgramAccountsApi>;
type ExtendedRpcApi = RpcApi & Rpc<GetEpochInfoApi & GetSignatureStatusesApi & GetMultipleAccountsApi>;
type RpcSubscriptionApi = RpcSubscriptions<SignatureNotificationsApi & SlotNotificationsApi>;
type Commitment = 'processed' | 'confirmed' | 'finalized';
interface GhostSpeakConfig {
programId?: Address$1;
rpc: ExtendedRpcApi;
rpcSubscriptions?: RpcSubscriptionApi;
commitment?: Commitment;
transactionTimeout?: number;
defaultFeePayer?: Address$1;
retryConfig?: RetryConfig;
cluster?: 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet';
rpcEndpoint?: string;
wsEndpoint?: string;
/** Token 2022 configuration options */
token2022?: Token2022Config;
/** IPFS configuration for large content storage */
ipfsConfig?: IPFSConfig;
}
interface Token2022Config {
/** Enable Token 2022 features by default */
enabled?: boolean;
/** Default behavior for transfer fees */
defaultExpectTransferFees?: boolean;
/** Maximum transfer fee slippage (basis points) */
maxFeeSlippageBasisPoints?: number;
/** Enable confidential transfers by default */
enableConfidentialTransfers?: boolean;
/** Default Token 2022 program address (for custom deployments) */
programAddress?: Address$1;
/** Cache token program detection results for this many seconds */
tokenProgramCacheTtl?: number;
}
interface RetryConfig {
maxRetries?: number;
baseDelay?: number;
maxDelay?: number;
backoffMultiplier?: number;
retryableErrors?: string[];
}
interface AgentWithAddress {
address: Address$1;
data: Agent;
}
interface ServiceListingWithAddress {
address: Address$1;
data: ServiceListing;
}
interface AgentRegistrationData {
name: string;
description: string;
capabilities: string[];
metadataUri: string;
serviceEndpoint: string;
}
interface AgentAccount {
owner: Address$1;
name: string;
description: string;
capabilities: string[];
metadataUri: string;
serviceEndpoint: string;
isActive: boolean;
registeredAt: bigint;
reputation: number;
totalEarnings: bigint;
totalJobs: number;
successRate: number;
bump: number;
}
interface ServiceListingData {
id: string;
agent: Address$1;
title: string;
description: string;
price: bigint;
currency: Address$1;
category: string;
isActive: boolean;
createdAt: bigint;
}
interface JobPosting {
id: string;
poster: Address$1;
title: string;
description: string;
budget: bigint;
currency: Address$1;
deadline: bigint;
requirements: string[];
isActive: boolean;
createdAt: bigint;
}
interface EscrowAccount {
buyer: Address$1;
seller: Address$1;
agent: Address$1;
amount: bigint;
currency: Address$1;
status: EscrowStatus;
createdAt: bigint;
completedAt?: bigint;
}
declare enum EscrowStatus {
Active = "Active",
Completed = "Completed",
Disputed = "Disputed",
Cancelled = "Cancelled"
}
interface A2ASession {
sessionId: bigint;
initiator: Address$1;
responder: Address$1;
sessionType: string;
metadata: string;
isActive: boolean;
createdAt: bigint;
expiresAt: bigint;
}
interface A2AMessage {
messageId: bigint;
session: Address$1;
sender: Address$1;
content: string;
messageType: string;
sentAt: bigint;
}
declare enum PricingModel {
Fixed = "Fixed",
Hourly = "Hourly",
PerTask = "PerTask",
Subscription = "Subscription",
Auction = "Auction"
}
declare class GhostSpeakError extends Error {
code?: string | undefined;
constructor(message: string, code?: string | undefined);
}
interface RegisterAgentParams {
agentData: AgentRegistrationData;
}
interface CreateServiceListingParams {
title: string;
description: string;
price: bigint;
currency: Address$1;
category: string;
}
interface CreateJobPostingParams {
title: string;
description: string;
budget: bigint;
currency: Address$1;
deadline: bigint;
requirements: string[];
}
interface CreateEscrowParams {
seller: Address$1;
agent: Address$1;
amount: bigint;
currency: Address$1;
}
interface CreateA2ASessionParams {
responder: Address$1;
sessionType: string;
metadata: string;
expiresAt: bigint;
}
interface SendA2AMessageParams {
session: Address$1;
content: string;
messageType: string;
}
interface RpcResponse<T> {
value: T | null;
}
interface RpcAccountInfo {
executable: boolean;
lamports: bigint;
owner: Address$1;
rentEpoch: bigint;
space: bigint;
data: string | Uint8Array;
}
interface RpcProgramAccount {
pubkey: Address$1;
account: RpcAccountInfo;
}
interface RpcProgramAccountsResponse {
value: RpcProgramAccount[] | null;
}
interface RpcAccountInfoResponse {
value: RpcAccountInfo | null;
}
interface RpcMultipleAccountsResponse {
value: (RpcAccountInfo | null)[];
}
interface TransactionResponse {
signature: string;
confirmationStatus?: Commitment;
err?: unknown | null;
}
interface SimulatedTransactionResponse {
value: {
err?: unknown | null;
logs?: string[];
unitsConsumed?: number;
};
}
interface SolanaRpcClient {
getAccountInfo(address: Address$1, options?: {
commitment?: Commitment;
encoding?: string;
}): Promise<RpcAccountInfoResponse>;
getMultipleAccounts(addresses: Address$1[], options?: {
commitment?: Commitment;
encoding?: string;
}): Promise<RpcMultipleAccountsResponse>;
getProgramAccounts(programId: Address$1, options?: {
commitment?: Commitment;
encoding?: string;
filters?: unknown[];
}): Promise<RpcProgramAccountsResponse>;
sendTransaction(transaction: unknown, options?: {
commitment?: Commitment;
}): Promise<TransactionResponse>;
simulateTransaction(transaction: unknown, options?: {
commitment?: Commitment;
}): Promise<SimulatedTransactionResponse>;
}
interface EmergencyConfig {
emergencyDelay?: bigint;
emergencyThreshold?: number;
emergencySigners?: Address$1[];
canEmergencyPause?: boolean;
emergencyContact?: string;
}
/**
* Developer Tools for GhostSpeak SDK
*
* Provides debugging, inspection, and development utilities
*/
/**
* Transaction analysis result
*/
interface TransactionAnalysis {
instructions: InstructionAnalysis[];
totalAccounts: number;
signerCount: number;
writableAccounts: Address$1[];
readonlyAccounts: Address$1[];
estimatedSize: number;
estimatedComputeUnits: bigint;
estimatedFee: bigint;
warnings: string[];
}
/**
* Individual instruction analysis
*/
interface InstructionAnalysis {
index: number;
programId: Address$1;
accountCount: number;
dataSize: number;
humanReadable: string;
accounts: AccountInfo[];
}
/**
* Account information in instruction
*/
interface AccountInfo {
address: Address$1;
isWritable: boolean;
isSigner: boolean;
role: AccountRole;
}
/**
* Type for instruction-like objects from generated code
*/
type InstructionLike = {
programAddress: Address$1;
accounts?: readonly unknown[];
data?: unknown;
};
/**
* Unified instruction builder that eliminates duplication across all instruction classes.
* This is the single source of truth for instruction execution patterns.
*/
declare class InstructionBuilder {
private rpcClient;
private config;
private devTools;
private debugMode;
constructor(config: GhostSpeakConfig);
/**
* Execute a single instruction with unified error handling and transaction patterns
*/
execute<T = string>(instructionName: string, instructionGetter: () => Promise<InstructionLike> | InstructionLike, signers: TransactionSigner[], options?: {
simulate?: boolean;
returnDetails?: boolean;
skipPreflight?: boolean;
maxRetries?: number;
}): Promise<T>;
/**
* Execute multiple instructions in a single transaction
*/
executeBatch<T = string>(batchName: string, instructionGetters: (() => Promise<InstructionLike> | InstructionLike)[], signers: TransactionSigner[], options?: {
simulate?: boolean;
returnDetails?: boolean;
skipPreflight?: boolean;
}): Promise<T>;
/**
* Get and decode account data with unified error handling
*/
getAccount<T>(address: Address$1, decoderImportName: string): Promise<T | null>;
/**
* Get multiple accounts with unified pattern
*/
getAccounts<T>(addresses: Address$1[], decoderImportName: string): Promise<(T | null)[]>;
/**
* Get program accounts with filters
*/
getProgramAccounts<T>(decoderImportName: string, filters?: ({
dataSize: bigint;
} | {
memcmp: {
offset: bigint;
bytes: string;
encoding?: 'base58' | 'base64';
};
})[]): Promise<{
address: Address$1;
data: T;
}[]>;
/**
* Enable debug mode for next transaction
*/
enableDebug(): this;
/**
* Debug transaction - analyze without executing
*/
debug(instructionName: string, instructionGetters: (() => Promise<InstructionLike> | InstructionLike)[]): Promise<TransactionAnalysis>;
/**
* Get human-readable explanation of transaction
*/
explain(instructionName: string, instructionGetters: (() => Promise<InstructionLike> | InstructionLike)[]): Promise<string>;
/**
* Estimate transaction cost
*/
estimateCost(instructionGetters: (() => Promise<InstructionLike> | InstructionLike)[]): Promise<bigint>;
private sendAndConfirm;
private simulateInstruction;
private simulateBatch;
private estimateTransactionSize;
private extractRawData;
}
/**
* Solana cluster types for URL generation
*/
type SolanaCluster = 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet';
/**
* Transaction result with verification URLs
*/
interface TransactionResult {
signature: string | Signature$1;
cluster: SolanaCluster;
urls: {
solanaExplorer: string;
solscan: string;
solanaFM: string;
xray: string;
};
commitment: Commitment;
timestamp: number;
}
type Signature = string;
/**
* Base class for all instruction modules using the unified InstructionBuilder.
* This replaces the old BaseInstructions class with a much simpler pattern.
*/
declare abstract class BaseModule {
protected builder: InstructionBuilder;
protected config: GhostSpeakConfig;
private _debugMode;
constructor(config: GhostSpeakConfig);
/**
* Enable debug mode for next operation
*/
debug(): this;
/**
* Execute a single instruction
*/
protected execute(instructionName: string, instructionGetter: () => Promise<IInstruction> | IInstruction, signers: TransactionSigner[]): Promise<string>;
/**
* Execute a single instruction with detailed result
*/
protected executeWithDetails(instructionName: string, instructionGetter: () => Promise<IInstruction> | IInstruction, signers: TransactionSigner[]): Promise<TransactionResult>;
/**
* Execute multiple instructions in a batch
*/
protected executeBatch(batchName: string, instructionGetters: (() => Promise<IInstruction> | IInstruction)[], signers: TransactionSigner[]): Promise<Signature>;
/**
* Simulate an instruction
*/
protected simulate(instructionName: string, instructionGetter: () => Promise<IInstruction> | IInstruction, signers: TransactionSigner[]): Promise<unknown>;
/**
* Simulate an instruction (public accessor)
*/
simulateInstruction(instructionName: string, instructionGetter: () => Promise<IInstruction> | IInstruction, signers: TransactionSigner[]): Promise<unknown>;
/**
* Estimate transaction cost
*/
protected estimateCost(instructionGetters: (() => Promise<IInstruction> | IInstruction)[]): Promise<bigint>;
/**
* Get cost estimation for an instruction
*/
getCost(instructionName: string, instructionGetter: () => Promise<IInstruction> | IInstruction): Promise<bigint>;
/**
* Get human-readable explanation
*/
explain(instructionName: string, instructionGetter: () => Promise<IInstruction> | IInstruction): Promise<string>;
/**
* Debug analyze without executing
*/
analyze(instructionName: string, instructionGetter: () => Promise<IInstruction> | IInstruction): Promise<unknown>;
/**
* Get decoded account
*/
protected getAccount<T>(address: Address$1, decoderImportName: string): Promise<T | null>;
/**
* Get multiple decoded accounts
*/
protected getAccounts<T>(addresses: Address$1[], decoderImportName: string): Promise<(T | null)[]>;
/**
* Get program accounts
*/
protected getProgramAccounts<T>(decoderImportName: string, filters?: ({
dataSize: bigint;
} | {
memcmp: {
offset: bigint;
bytes: string;
encoding?: 'base58' | 'base64';
};
})[]): Promise<{
address: Address$1;
data: T;
}[]>;
/**
* Get program ID
*/
protected get programId(): Address$1;
/**
* Get program ID (public accessor)
*/
getProgramId(): Address$1;
/**
* Get commitment level
*/
protected get commitment(): Commitment;
/**
* Get commitment level (public accessor)
*/
getCommitment(): Commitment;
}
/**
* Marketplace management module
*
* Provides high-level access to marketplace operations including:
* - Service listings and purchases
* - Job postings and applications
* - Service auctions and bidding
* - Marketplace queries and filtering
*/
declare class MarketplaceModule extends BaseModule {
/**
* Get create service listing instruction
*/
getCreateServiceListingInstruction(params: {
agent: Address$1;
creator: TransactionSigner;
title: string;
description: string;
price: bigint;
tokenMint: Address$1;
serviceType: string;
paymentToken: Address$1;
estimatedDelivery: number;
tags: string[];
listingId: string;
}): Promise<CreateServiceListingInstruction<Address$1<"GssMyhkQPePL