@ghostspeak/sdk 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +295 -30
  2. package/dist/GhostSpeakClient-bnXwUPHI.d.ts +1011 -0
  3. package/dist/StakingModule-DunDShLq.d.ts +2446 -0
  4. package/dist/{agent-M74TCRON.js → agent-S42FIMR7.js} +4 -4
  5. package/dist/{agent-M74TCRON.js.map → agent-S42FIMR7.js.map} +1 -1
  6. package/dist/batch-operations-45CQFEID.js +4 -0
  7. package/dist/batch-operations-45CQFEID.js.map +1 -0
  8. package/dist/browser-CI5_6Gzk.d.ts +234 -0
  9. package/dist/browser.d.ts +6 -576
  10. package/dist/browser.js +15 -842
  11. package/dist/browser.js.map +1 -1
  12. package/dist/chunk-46QWY3MG.js +156 -0
  13. package/dist/chunk-46QWY3MG.js.map +1 -0
  14. package/dist/{chunk-F3DZMBUA.js → chunk-5QBSC4T4.js} +327 -493
  15. package/dist/chunk-5QBSC4T4.js.map +1 -0
  16. package/dist/chunk-5QZVFUXB.js +4176 -0
  17. package/dist/chunk-5QZVFUXB.js.map +1 -0
  18. package/dist/chunk-6XCCMJ6M.js +1865 -0
  19. package/dist/chunk-6XCCMJ6M.js.map +1 -0
  20. package/dist/chunk-A7ALCVUI.js +98 -0
  21. package/dist/chunk-A7ALCVUI.js.map +1 -0
  22. package/dist/chunk-AWMGX3OX.js +814 -0
  23. package/dist/chunk-AWMGX3OX.js.map +1 -0
  24. package/dist/chunk-BF3IQ35I.js +284 -0
  25. package/dist/chunk-BF3IQ35I.js.map +1 -0
  26. package/dist/chunk-BQDGRTVP.js +168 -0
  27. package/dist/chunk-BQDGRTVP.js.map +1 -0
  28. package/dist/chunk-IQM5RASO.js +8502 -0
  29. package/dist/chunk-IQM5RASO.js.map +1 -0
  30. package/dist/chunk-JYXSOXCP.js +3850 -0
  31. package/dist/chunk-JYXSOXCP.js.map +1 -0
  32. package/dist/chunk-OXA7MECJ.js +7787 -0
  33. package/dist/chunk-OXA7MECJ.js.map +1 -0
  34. package/dist/chunk-QLRWUHN2.js +231 -0
  35. package/dist/chunk-QLRWUHN2.js.map +1 -0
  36. package/dist/chunk-SKMJJ3Q6.js +125 -0
  37. package/dist/chunk-SKMJJ3Q6.js.map +1 -0
  38. package/dist/chunk-TTB4OS2D.js +69 -0
  39. package/dist/chunk-TTB4OS2D.js.map +1 -0
  40. package/dist/chunk-UP2VWCW5.js +33 -0
  41. package/dist/{chunk-NSBPE2FW.js.map → chunk-UP2VWCW5.js.map} +1 -1
  42. package/dist/{chunk-UJUGGLMT.js → chunk-VQZQCHUT.js} +5 -5
  43. package/dist/{chunk-UJUGGLMT.js.map → chunk-VQZQCHUT.js.map} +1 -1
  44. package/dist/client.d.ts +4 -4
  45. package/dist/client.js +11 -10
  46. package/dist/createAgentAuthorization-KGZNXZBT.js +5 -0
  47. package/dist/createAgentAuthorization-KGZNXZBT.js.map +1 -0
  48. package/dist/credentials.js +1 -1
  49. package/dist/crypto.js +2 -2
  50. package/dist/errors.js +1 -1
  51. package/dist/feature-flags-B1g0DCPe.d.ts +1181 -0
  52. package/dist/generated-QJREJQ2C.js +9 -0
  53. package/dist/{generated-VNLHMR6Y.js.map → generated-QJREJQ2C.js.map} +1 -1
  54. package/dist/{ghostspeak_wasm-SB2RPJ3D.js → ghostspeak_wasm-F227HOSM.js} +3 -3
  55. package/dist/{ghostspeak_wasm-SB2RPJ3D.js.map → ghostspeak_wasm-F227HOSM.js.map} +1 -1
  56. package/dist/index.d.ts +1179 -1498
  57. package/dist/index.js +356 -3578
  58. package/dist/index.js.map +1 -1
  59. package/dist/metafile-esm.json +1 -1
  60. package/dist/minimal/core-minimal.d.ts +2446 -1245
  61. package/dist/minimal/core-minimal.js +9 -9
  62. package/dist/minimal/core-minimal.js.map +1 -1
  63. package/dist/nacl-fast-W5BJ3KZ2.js +2229 -0
  64. package/dist/nacl-fast-W5BJ3KZ2.js.map +1 -0
  65. package/dist/pda-4KP7CURF.js +4 -0
  66. package/dist/pda-4KP7CURF.js.map +1 -0
  67. package/dist/pda-Ce7VYg4T.d.ts +25 -0
  68. package/dist/reputation-types-Yebf0Rm_.d.ts +1071 -0
  69. package/dist/revokeAuthorization-2ZRO6GUZ.js +5 -0
  70. package/dist/revokeAuthorization-2ZRO6GUZ.js.map +1 -0
  71. package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
  72. package/dist/types.js +1 -1
  73. package/dist/updateReputationWithAuth-PCEUOCFV.js +5 -0
  74. package/dist/updateReputationWithAuth-PCEUOCFV.js.map +1 -0
  75. package/dist/utils.d.ts +69 -203
  76. package/dist/utils.js +15 -153
  77. package/dist/utils.js.map +1 -1
  78. package/package.json +27 -34
  79. package/dist/.tsbuildinfo +0 -1
  80. package/dist/GhostSpeakClient-D_66Uzsf.d.ts +0 -707
  81. package/dist/GovernanceModule-DQYYys-H.d.ts +0 -1766
  82. package/dist/chunk-APCKGD23.js +0 -1328
  83. package/dist/chunk-APCKGD23.js.map +0 -1
  84. package/dist/chunk-ASQXX4IT.js +0 -572
  85. package/dist/chunk-ASQXX4IT.js.map +0 -1
  86. package/dist/chunk-COGZFWOT.js +0 -19657
  87. package/dist/chunk-COGZFWOT.js.map +0 -1
  88. package/dist/chunk-F3DZMBUA.js.map +0 -1
  89. package/dist/chunk-GMHIUK2R.js +0 -7526
  90. package/dist/chunk-GMHIUK2R.js.map +0 -1
  91. package/dist/chunk-IAWBZYPE.js +0 -356
  92. package/dist/chunk-IAWBZYPE.js.map +0 -1
  93. package/dist/chunk-NSBPE2FW.js +0 -15
  94. package/dist/chunk-OWYHJG6H.js +0 -13311
  95. package/dist/chunk-OWYHJG6H.js.map +0 -1
  96. package/dist/chunk-RDDPOFR5.js +0 -3
  97. package/dist/chunk-RDDPOFR5.js.map +0 -1
  98. package/dist/chunk-RERCHKZP.js +0 -35
  99. package/dist/chunk-RERCHKZP.js.map +0 -1
  100. package/dist/chunk-TVVGXYCI.js +0 -2887
  101. package/dist/chunk-TVVGXYCI.js.map +0 -1
  102. package/dist/chunk-ZGP5552B.js +0 -377
  103. package/dist/chunk-ZGP5552B.js.map +0 -1
  104. package/dist/chunk-ZWOYNHVK.js +0 -196
  105. package/dist/chunk-ZWOYNHVK.js.map +0 -1
  106. package/dist/dist/.tsbuildinfo +0 -1
  107. package/dist/elgamal-VZLWB3XK.js +0 -5
  108. package/dist/elgamal-VZLWB3XK.js.map +0 -1
  109. package/dist/feature-flags-V722ZuXO.d.ts +0 -3512
  110. package/dist/generated-VNLHMR6Y.js +0 -5
  111. package/dist/ipfs-types-BOt9ZNg4.d.ts +0 -592
  112. package/dist/multisigConfig-BzEhy6jy.d.ts +0 -58
  113. package/dist/pda-B_nS8SbD.d.ts +0 -114
  114. package/dist/pda-S4BFJVGE.js +0 -4
  115. package/dist/pda-S4BFJVGE.js.map +0 -1
  116. package/dist/system-addresses-BFNLEbFx.d.ts +0 -857
  117. package/dist/token-2022-rpc-RALH4RK7.js +0 -593
  118. package/dist/token-2022-rpc-RALH4RK7.js.map +0 -1
package/dist/browser.d.ts CHANGED
@@ -1,577 +1,7 @@
1
- import { D as DisputeStatus } from './system-addresses-BFNLEbFx.js';
2
- export { c as ASSOCIATED_TOKEN_PROGRAM_ADDRESS, A as AgentModule, f as Channel, C as ChannelModule, g as ChannelType, l as Deliverable, d as Escrow, E as EscrowModule, e as EscrowStatus, G as GHOSTSPEAK_PROGRAM_ID, M as Message, h as MessageType, a as NATIVE_MINT_ADDRESS, N as NETWORK_CONFIG, b as TOKEN_2022_PROGRAM_ADDRESS, T as TOKEN_PROGRAM_ADDRESS, j as WorkDelivery, i as WorkOrder, W as WorkOrderModule, k as WorkOrderStatus } from './system-addresses-BFNLEbFx.js';
3
- import { B as BaseModule, G as GhostSpeakConfig, A as AuctionMarketplace } from './GovernanceModule-DQYYys-H.js';
4
- export { d as Agent, f as AuctionBid, a as GovernanceModule, e as JobApplication, J as JobPosting, M as MarketplaceModule, S as ServiceListing, T as Token2022Module } from './GovernanceModule-DQYYys-H.js';
5
- import { Address as Address$1 } from '@solana/addresses';
6
- import { Address, ReadonlyUint8Array, Option, TransactionSigner } from '@solana/kit';
7
- export { d as deriveAgentPda, b as deriveAgentPdaOriginal, e as deriveChannelPda, c as deriveEscrowPda, h as deriveJobPostingPda, g as deriveMessagePda, a as deriveServiceListingPda, i as deriveUserRegistryPda } from './pda-B_nS8SbD.js';
8
- export { G as GovernanceProposal } from './ipfs-types-BOt9ZNg4.js';
1
+ export { av as Agent, A as AgentModule, k as CredentialsModule, a as GhostModule, G as GhostSpeakConfig, b as GovernanceModule, M as MultisigModule, a1 as ReputationData, R as ReputationModule, S as StakingModule } from './StakingModule-DunDShLq.js';
2
+ export { h as ASSOCIATED_TOKEN_PROGRAM_ADDRESS, f as GHOSTSPEAK_PROGRAM_ID, N as NATIVE_MINT_ADDRESS, i as NETWORK_CONFIG, S as SASAttestationHelper, g as TOKEN_2022_PROGRAM_ADDRESS, T as TOKEN_PROGRAM_ADDRESS } from './browser-CI5_6Gzk.js';
3
+ export { d as deriveAgentPda, a as deriveUserRegistryPda } from './pda-Ce7VYg4T.js';
4
+ export { B as BadgeType, o as CategoryReputation, G as GovernanceProposal, J as JobPerformance, s as REPUTATION_CONSTANTS, a as ReputationCalculationResult, p as ReputationTier } from './reputation-types-Yebf0Rm_.js';
5
+ import '@solana/addresses';
6
+ import '@solana/kit';
9
7
  import './types.js';
10
-
11
- /**
12
- * This code was AUTOGENERATED using the Codama library.
13
- * Please DO NOT EDIT THIS FILE, instead use visitors
14
- * to add features, then rerun Codama to update it.
15
- *
16
- * @see https://github.com/codama-idl/codama
17
- */
18
-
19
- type DisputeEvidence = {
20
- submitter: Address;
21
- evidenceType: string;
22
- evidenceData: string;
23
- timestamp: bigint;
24
- isVerified: boolean;
25
- };
26
-
27
- /**
28
- * This code was AUTOGENERATED using the Codama library.
29
- * Please DO NOT EDIT THIS FILE, instead use visitors
30
- * to add features, then rerun Codama to update it.
31
- *
32
- * @see https://github.com/codama-idl/codama
33
- */
34
-
35
- type DisputeCase = {
36
- discriminator: ReadonlyUint8Array;
37
- transaction: Address;
38
- complainant: Address;
39
- respondent: Address;
40
- moderator: Option<Address>;
41
- reason: string;
42
- status: DisputeStatus;
43
- evidence: Array<DisputeEvidence>;
44
- resolution: Option<string>;
45
- aiScore: number;
46
- humanReview: boolean;
47
- createdAt: bigint;
48
- resolvedAt: Option<bigint>;
49
- bump: number;
50
- };
51
-
52
- /**
53
- * This code was AUTOGENERATED using the Codama library.
54
- * Please DO NOT EDIT THIS FILE, instead use visitors
55
- * to add features, then rerun Codama to update it.
56
- *
57
- * @see https://github.com/codama-idl/codama
58
- */
59
-
60
- type StakingAccount = {
61
- discriminator: ReadonlyUint8Array;
62
- /** Owner of this staking account */
63
- owner: Address;
64
- /** Token mint being staked (GHOST token) */
65
- tokenMint: Address;
66
- /** Amount of tokens currently staked */
67
- stakedAmount: bigint;
68
- /** Timestamp when tokens were staked */
69
- stakedAt: bigint;
70
- /** Lockup end timestamp (0 if no lockup) */
71
- lockupEndsAt: bigint;
72
- /** Lockup tier (0=none, 1=1month, 2=3months, 3=6months, 4=1year, 5=2years) */
73
- lockupTier: number;
74
- /** Total rewards claimed */
75
- rewardsClaimed: bigint;
76
- /** Last reward claim timestamp */
77
- lastClaimAt: bigint;
78
- /** Pending rewards (not yet claimed) */
79
- pendingRewards: bigint;
80
- /** Whether auto-compound is enabled */
81
- autoCompound: boolean;
82
- /** Account creation timestamp */
83
- createdAt: bigint;
84
- /** Last update timestamp */
85
- updatedAt: bigint;
86
- /** PDA bump */
87
- bump: number;
88
- };
89
-
90
- /**
91
- * This code was AUTOGENERATED using the Codama library.
92
- * Please DO NOT EDIT THIS FILE, instead use visitors
93
- * to add features, then rerun Codama to update it.
94
- *
95
- * @see https://github.com/codama-idl/codama
96
- */
97
-
98
- type StakingConfig = {
99
- discriminator: ReadonlyUint8Array;
100
- /** Authority that can update config */
101
- authority: Address;
102
- /** GHOST token mint address */
103
- ghostTokenMint: Address;
104
- /** Treasury account for reward distribution */
105
- rewardsTreasury: Address;
106
- /** Base APY in basis points (e.g., 500 = 5%) */
107
- baseApy: number;
108
- /** Bonus APY per lockup tier (basis points) */
109
- tierBonusApy: Array<number>;
110
- /** Minimum stake amount */
111
- minStakeAmount: bigint;
112
- /** Maximum stake amount per account (0 = no limit) */
113
- maxStakeAmount: bigint;
114
- /** Total tokens staked across all accounts */
115
- totalStaked: bigint;
116
- /** Total rewards distributed */
117
- totalRewardsDistributed: bigint;
118
- /** Whether staking is currently enabled */
119
- isEnabled: boolean;
120
- /** Emergency pause flag */
121
- isPaused: boolean;
122
- /** Creation timestamp */
123
- createdAt: bigint;
124
- /** Last update timestamp */
125
- updatedAt: bigint;
126
- /** PDA bump */
127
- bump: number;
128
- };
129
-
130
- /**
131
- * Reputation tier levels
132
- */
133
- declare enum ReputationTier {
134
- None = "None",
135
- Bronze = "Bronze",
136
- Silver = "Silver",
137
- Gold = "Gold",
138
- Platinum = "Platinum"
139
- }
140
- /**
141
- * Badge types for reputation achievements
142
- */
143
- declare enum BadgeType {
144
- FirstJob = "FirstJob",
145
- TenJobs = "TenJobs",
146
- HundredJobs = "HundredJobs",
147
- ThousandJobs = "ThousandJobs",
148
- PerfectRating = "PerfectRating",
149
- QuickResponder = "QuickResponder",
150
- HighEarner = "HighEarner",
151
- DisputeResolver = "DisputeResolver",
152
- CategoryExpert = "CategoryExpert",
153
- CrossCategoryMaster = "CrossCategoryMaster"
154
- }
155
- /**
156
- * Category-specific reputation data
157
- */
158
- interface CategoryReputation {
159
- /** Category identifier (e.g., "defi", "nft", "gaming") */
160
- category: string;
161
- /** Current reputation score in this category (basis points) */
162
- score: number;
163
- /** Total completed jobs in this category */
164
- completedJobs: number;
165
- /** Average completion time in seconds */
166
- avgCompletionTime: number;
167
- /** Quality ratings sum */
168
- qualitySum: number;
169
- /** Number of quality ratings */
170
- qualityCount: number;
171
- /** Last activity timestamp */
172
- lastActivity: number;
173
- /** Total earnings in this category */
174
- totalEarnings: number;
175
- }
176
- /**
177
- * Job performance data for reputation calculation
178
- */
179
- interface JobPerformance {
180
- /** Whether job was completed successfully */
181
- completed: boolean;
182
- /** Quality rating (0-100) */
183
- qualityRating: number;
184
- /** Expected duration in seconds */
185
- expectedDuration: number;
186
- /** Actual duration in seconds */
187
- actualDuration: number;
188
- /** Client satisfaction (0-100) */
189
- clientSatisfaction: number;
190
- /** Whether there was a dispute */
191
- hadDispute: boolean;
192
- /** Whether dispute was resolved favorably for agent */
193
- disputeResolvedFavorably: boolean;
194
- /** Job category */
195
- category: string;
196
- /** Payment amount */
197
- paymentAmount: number;
198
- }
199
- /**
200
- * Reputation calculation result
201
- */
202
- interface ReputationCalculationResult {
203
- /** New overall score */
204
- overallScore: number;
205
- /** Score for this specific job */
206
- jobScore: number;
207
- /** Category-specific score */
208
- categoryScore: number;
209
- /** New reputation tier */
210
- tier: ReputationTier;
211
- /** Badges earned from this update */
212
- newBadges: BadgeType[];
213
- /** Whether fraud was detected */
214
- fraudDetected: boolean;
215
- /** Fraud risk score (0-100) */
216
- fraudRiskScore: number;
217
- }
218
- /**
219
- * Constants for reputation calculations
220
- */
221
- declare const REPUTATION_CONSTANTS: {
222
- /** Maximum reputation score (basis points) */
223
- MAX_REPUTATION_SCORE: number;
224
- /** Minimum reputation score for slashing */
225
- MIN_REPUTATION_FOR_SLASH: number;
226
- /** Reputation decay rate per day (basis points) */
227
- REPUTATION_DECAY_RATE_BPS: number;
228
- /** Tier thresholds (basis points) */
229
- BRONZE_TIER_THRESHOLD: number;
230
- SILVER_TIER_THRESHOLD: number;
231
- GOLD_TIER_THRESHOLD: number;
232
- PLATINUM_TIER_THRESHOLD: number;
233
- /** Maximum categories per agent */
234
- MAX_REPUTATION_CATEGORIES: number;
235
- /** Maximum performance history entries */
236
- MAX_PERFORMANCE_HISTORY: number;
237
- /** Maximum badges per agent */
238
- MAX_BADGES: number;
239
- };
240
-
241
- /**
242
- * Staking Module
243
- *
244
- * Manages GHOST token staking operations including:
245
- * - Creating staking accounts
246
- * - Staking tokens with lockup tiers
247
- * - Claiming rewards
248
- * - Auto-compounding
249
- */
250
-
251
- /**
252
- * Lockup tier enum for staking
253
- */
254
- declare enum LockupTier {
255
- None = 0,
256
- OneMonth = 1,
257
- ThreeMonths = 2,
258
- SixMonths = 3,
259
- OneYear = 4,
260
- TwoYears = 5
261
- }
262
- /**
263
- * Staking module for GHOST token staking operations
264
- */
265
- declare class StakingModule extends BaseModule {
266
- /**
267
- * Derive staking account PDA for a user
268
- * Seeds: ["staking", owner]
269
- */
270
- deriveStakingAccountPda(owner: Address$1): Promise<Address$1>;
271
- /**
272
- * Derive staking config PDA
273
- * Seeds: ["staking_config"]
274
- */
275
- deriveStakingConfigPda(): Promise<Address$1>;
276
- /**
277
- * Initialize staking configuration (admin only)
278
- */
279
- initializeConfig(params: {
280
- signer: TransactionSigner;
281
- ghostTokenMint: Address$1;
282
- rewardsTreasury: Address$1;
283
- baseApy: number;
284
- minStakeAmount: bigint;
285
- maxStakeAmount: bigint;
286
- }): Promise<string>;
287
- /**
288
- * Create a staking account for a user
289
- */
290
- createStakingAccount(params: {
291
- signer: TransactionSigner;
292
- }): Promise<string>;
293
- /**
294
- * Claim staking rewards
295
- */
296
- claimRewards(params: {
297
- signer: TransactionSigner;
298
- ghostMint: Address$1;
299
- userTokenAccount: Address$1;
300
- rewardsTreasury: Address$1;
301
- }): Promise<string>;
302
- /**
303
- * Get staking account for a user
304
- */
305
- getStakingAccount(owner: Address$1): Promise<StakingAccount | null>;
306
- /**
307
- * Get staking account by address
308
- */
309
- getStakingAccountByAddress(address: Address$1): Promise<StakingAccount | null>;
310
- /**
311
- * Get all staking accounts
312
- */
313
- getAllStakingAccounts(): Promise<{
314
- address: Address$1;
315
- data: StakingAccount;
316
- }[]>;
317
- /**
318
- * Get staking config
319
- */
320
- getStakingConfig(): Promise<StakingConfig | null>;
321
- /**
322
- * Calculate pending rewards for a staking account
323
- */
324
- calculatePendingRewards(stakingAccount: StakingAccount, config: StakingConfig): bigint;
325
- /**
326
- * Get tier bonus APY in basis points
327
- */
328
- getTierBonusApy(tier: number, config: StakingConfig): number;
329
- /**
330
- * Get lockup duration in seconds for a tier
331
- */
332
- getLockupDuration(tier: LockupTier): number;
333
- /**
334
- * Check if a staking account is locked
335
- */
336
- isLocked(stakingAccount: StakingAccount): boolean;
337
- /**
338
- * Get time remaining on lockup in seconds
339
- */
340
- getLockupTimeRemaining(stakingAccount: StakingAccount): number;
341
- }
342
-
343
- /**
344
- * Dispute Module
345
- *
346
- * Manages dispute resolution for escrow transactions.
347
- * Provides read access to dispute data.
348
- */
349
-
350
- /**
351
- * Dispute resolution outcome
352
- */
353
- declare enum DisputeResolution {
354
- FavorComplainant = 0,
355
- FavorRespondent = 1,
356
- Split = 2,
357
- Dismissed = 3
358
- }
359
- /**
360
- * Evidence type for disputes
361
- */
362
- interface EvidenceSubmission {
363
- evidenceType: 'document' | 'screenshot' | 'message' | 'other';
364
- description: string;
365
- contentHash: string;
366
- uri?: string;
367
- }
368
- /**
369
- * Dispute module for handling escrow disputes
370
- */
371
- declare class DisputeModule extends BaseModule {
372
- /**
373
- * Derive dispute case PDA
374
- * Seeds: ["dispute", transaction_address, complainant, reason]
375
- */
376
- deriveDisputePda(transactionAddress: Address$1, complainant: Address$1, reason: string): Promise<Address$1>;
377
- /**
378
- * Get dispute case by address
379
- */
380
- getDisputeCase(address: Address$1): Promise<DisputeCase | null>;
381
- /**
382
- * Get all disputes
383
- */
384
- getAllDisputes(): Promise<{
385
- address: Address$1;
386
- data: DisputeCase;
387
- }[]>;
388
- /**
389
- * Get disputes by complainant
390
- */
391
- getDisputesByComplainant(complainant: Address$1): Promise<{
392
- address: Address$1;
393
- data: DisputeCase;
394
- }[]>;
395
- /**
396
- * Get disputes by respondent
397
- */
398
- getDisputesByRespondent(respondent: Address$1): Promise<{
399
- address: Address$1;
400
- data: DisputeCase;
401
- }[]>;
402
- /**
403
- * Get pending disputes (awaiting resolution)
404
- */
405
- getPendingDisputes(): Promise<{
406
- address: Address$1;
407
- data: DisputeCase;
408
- }[]>;
409
- /**
410
- * Check if a dispute is resolved
411
- */
412
- isResolved(dispute: DisputeCase): boolean;
413
- /**
414
- * Get evidence count for a dispute
415
- */
416
- getEvidenceCount(dispute: DisputeCase): number;
417
- /**
418
- * Get AI confidence score (0-100)
419
- */
420
- getAiConfidence(dispute: DisputeCase): number;
421
- /**
422
- * Check if dispute requires human review
423
- */
424
- requiresHumanReview(dispute: DisputeCase): boolean;
425
- }
426
-
427
- /**
428
- * Simplified reputation data for module use
429
- */
430
- interface ReputationData {
431
- agent: Address$1;
432
- overallScore: number;
433
- totalJobsCompleted: number;
434
- totalJobsFailed: number;
435
- avgResponseTime: number;
436
- disputesAgainst: number;
437
- disputesResolved: number;
438
- lastUpdated: number;
439
- categoryReputations: CategoryReputation[];
440
- badges: Array<{
441
- badgeType: BadgeType;
442
- earnedAt: number;
443
- }>;
444
- performanceHistory: Array<{
445
- timestamp: number;
446
- score: number;
447
- jobsCompleted: number;
448
- avgQuality: number;
449
- }>;
450
- factors: {
451
- completionWeight: number;
452
- qualityWeight: number;
453
- timelinessWeight: number;
454
- satisfactionWeight: number;
455
- disputeWeight: number;
456
- };
457
- }
458
- /**
459
- * Reputation module for managing reputation calculations
460
- */
461
- declare class ReputationModule extends BaseModule {
462
- private calculator;
463
- constructor(config: GhostSpeakConfig);
464
- /**
465
- * Calculate reputation change for a job
466
- */
467
- calculateReputationChange(currentData: ReputationData, jobPerformance: JobPerformance): ReputationCalculationResult;
468
- /**
469
- * Get tier name from tier enum
470
- */
471
- getTierName(tier: ReputationTier): string;
472
- /**
473
- * Get tier from score
474
- */
475
- getTierFromScore(score: number): ReputationTier;
476
- /**
477
- * Get badge display name
478
- */
479
- getBadgeName(badge: BadgeType): string;
480
- /**
481
- * Calculate estimated APY boost from reputation
482
- */
483
- calculateApyBoost(score: number): number;
484
- /**
485
- * Get reputation tier color for UI
486
- */
487
- getTierColor(tier: ReputationTier): string;
488
- /**
489
- * Create default reputation data for new agents
490
- */
491
- createDefaultReputationData(agentAddress: Address$1): ReputationData;
492
- /**
493
- * Check if agent qualifies for a specific tier
494
- */
495
- qualifiesForTier(score: number, tier: ReputationTier): boolean;
496
- /**
497
- * Calculate points needed for next tier
498
- */
499
- pointsToNextTier(score: number): {
500
- nextTier: ReputationTier;
501
- pointsNeeded: number;
502
- } | null;
503
- }
504
-
505
- /**
506
- * Auction Module
507
- *
508
- * Manages service auctions for AI agent capabilities.
509
- * Provides read access to auction data.
510
- */
511
-
512
- /**
513
- * Auction type enum
514
- */
515
- declare enum AuctionType {
516
- English = 0,// Standard ascending auction
517
- Dutch = 1,// Descending price auction
518
- SealedBid = 2
519
- }
520
- /**
521
- * Auction module for service auctions
522
- */
523
- declare class AuctionModule extends BaseModule {
524
- /**
525
- * Derive auction PDA
526
- * Seeds: ["auction", creator, auction_id]
527
- */
528
- deriveAuctionPda(creator: Address$1, auctionId: string): Promise<Address$1>;
529
- /**
530
- * Get auction marketplace account
531
- */
532
- getAuctionMarketplace(address: Address$1): Promise<AuctionMarketplace | null>;
533
- /**
534
- * Get all auction marketplaces
535
- */
536
- getAllAuctions(): Promise<{
537
- address: Address$1;
538
- data: AuctionMarketplace;
539
- }[]>;
540
- /**
541
- * Get auction by creator and ID
542
- */
543
- getAuctionByCreatorAndId(creator: Address$1, auctionId: string): Promise<AuctionMarketplace | null>;
544
- /**
545
- * Calculate time remaining in auction
546
- */
547
- getTimeRemaining(auction: AuctionMarketplace): number;
548
- /**
549
- * Check if auction has ended
550
- */
551
- hasEnded(auction: AuctionMarketplace): boolean;
552
- /**
553
- * Get total bid count for an auction
554
- */
555
- getTotalBids(auction: AuctionMarketplace): number;
556
- /**
557
- * Get auction metadata URI
558
- */
559
- getMetadataUri(auction: AuctionMarketplace): string;
560
- /**
561
- * Check if reserve price was met
562
- */
563
- isReserveMet(auction: AuctionMarketplace): boolean;
564
- /**
565
- * Get current winning price
566
- */
567
- getCurrentPrice(auction: AuctionMarketplace): bigint;
568
- /**
569
- * Get auctions by creator
570
- */
571
- getAuctionsByCreator(creator: Address$1): Promise<{
572
- address: Address$1;
573
- data: AuctionMarketplace;
574
- }[]>;
575
- }
576
-
577
- export { AuctionMarketplace, AuctionModule, AuctionType, BadgeType, type CategoryReputation, type DisputeCase, type DisputeEvidence, DisputeModule, DisputeResolution, DisputeStatus, type EvidenceSubmission, GhostSpeakConfig, type JobPerformance, LockupTier, REPUTATION_CONSTANTS, type ReputationCalculationResult, type ReputationData, ReputationModule, ReputationTier, type StakingAccount, type StakingConfig, StakingModule };