@ghostspeak/sdk 2.0.5 → 2.0.7

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 (121) hide show
  1. package/README.md +152 -30
  2. package/dist/GhostSpeakClient-CWmGaM9Q.d.ts +1007 -0
  3. package/dist/StakingModule-C5rzuOWb.d.ts +2526 -0
  4. package/dist/{agent-M74TCRON.js → agent-5YLZ7DAC.js} +4 -4
  5. package/dist/{agent-M74TCRON.js.map → agent-5YLZ7DAC.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.d.ts +45 -554
  9. package/dist/browser.js +15 -842
  10. package/dist/browser.js.map +1 -1
  11. package/dist/chunk-AL3HQN73.js +754 -0
  12. package/dist/chunk-AL3HQN73.js.map +1 -0
  13. package/dist/chunk-BF3IQ35I.js +284 -0
  14. package/dist/chunk-BF3IQ35I.js.map +1 -0
  15. package/dist/chunk-BQDGRTVP.js +168 -0
  16. package/dist/chunk-BQDGRTVP.js.map +1 -0
  17. package/dist/chunk-C5CDA3WX.js +7314 -0
  18. package/dist/chunk-C5CDA3WX.js.map +1 -0
  19. package/dist/chunk-E3FD2CNY.js +1869 -0
  20. package/dist/chunk-E3FD2CNY.js.map +1 -0
  21. package/dist/{chunk-V3SOFUAZ.js → chunk-G7S6B6WB.js} +327 -493
  22. package/dist/chunk-G7S6B6WB.js.map +1 -0
  23. package/dist/chunk-IHVDQ4YI.js +4231 -0
  24. package/dist/chunk-IHVDQ4YI.js.map +1 -0
  25. package/dist/chunk-JV2SWONF.js +98 -0
  26. package/dist/chunk-JV2SWONF.js.map +1 -0
  27. package/dist/chunk-KB6CKIUK.js +231 -0
  28. package/dist/chunk-KB6CKIUK.js.map +1 -0
  29. package/dist/chunk-RIZZPLLB.js +343 -0
  30. package/dist/chunk-RIZZPLLB.js.map +1 -0
  31. package/dist/chunk-S74EH3KD.js +7890 -0
  32. package/dist/chunk-S74EH3KD.js.map +1 -0
  33. package/dist/chunk-SFTSZ3LC.js +156 -0
  34. package/dist/chunk-SFTSZ3LC.js.map +1 -0
  35. package/dist/chunk-SKMJJ3Q6.js +125 -0
  36. package/dist/chunk-SKMJJ3Q6.js.map +1 -0
  37. package/dist/chunk-SZGFSCNU.js +3682 -0
  38. package/dist/chunk-SZGFSCNU.js.map +1 -0
  39. package/dist/chunk-TTB4OS2D.js +69 -0
  40. package/dist/chunk-TTB4OS2D.js.map +1 -0
  41. package/dist/chunk-UP2VWCW5.js +33 -0
  42. package/dist/{chunk-NSBPE2FW.js.map → chunk-UP2VWCW5.js.map} +1 -1
  43. package/dist/{chunk-UJUGGLMT.js → chunk-VQZQCHUT.js} +5 -5
  44. package/dist/{chunk-UJUGGLMT.js.map → chunk-VQZQCHUT.js.map} +1 -1
  45. package/dist/client.d.ts +6 -4
  46. package/dist/client.js +12 -10
  47. package/dist/createAgentAuthorization-ULG47ZJI.js +5 -0
  48. package/dist/createAgentAuthorization-ULG47ZJI.js.map +1 -0
  49. package/dist/credentials.d.ts +155 -0
  50. package/dist/credentials.js +4 -0
  51. package/dist/credentials.js.map +1 -0
  52. package/dist/crypto.js +2 -2
  53. package/dist/errors.js +1 -1
  54. package/dist/feature-flags-B1g0DCPe.d.ts +1181 -0
  55. package/dist/generated-EG5USUFG.js +9 -0
  56. package/dist/{generated-VNLHMR6Y.js.map → generated-EG5USUFG.js.map} +1 -1
  57. package/dist/{ghostspeak_wasm-SB2RPJ3D.js → ghostspeak_wasm-F227HOSM.js} +3 -3
  58. package/dist/{ghostspeak_wasm-SB2RPJ3D.js.map → ghostspeak_wasm-F227HOSM.js.map} +1 -1
  59. package/dist/index.d.ts +1210 -1506
  60. package/dist/index.js +601 -3532
  61. package/dist/index.js.map +1 -1
  62. package/dist/metafile-esm.json +1 -1
  63. package/dist/minimal/core-minimal.d.ts +2383 -1264
  64. package/dist/minimal/core-minimal.js +9 -9
  65. package/dist/minimal/core-minimal.js.map +1 -1
  66. package/dist/nacl-fast-W5BJ3KZ2.js +2229 -0
  67. package/dist/nacl-fast-W5BJ3KZ2.js.map +1 -0
  68. package/dist/pda-4KP7CURF.js +4 -0
  69. package/dist/pda-4KP7CURF.js.map +1 -0
  70. package/dist/pda-Ce7VYg4T.d.ts +25 -0
  71. package/dist/reputation-types-Yebf0Rm_.d.ts +1071 -0
  72. package/dist/revokeAuthorization-OK7E7OK3.js +5 -0
  73. package/dist/revokeAuthorization-OK7E7OK3.js.map +1 -0
  74. package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
  75. package/dist/types.js +1 -1
  76. package/dist/updateReputationWithAuth-Y4ONEVSP.js +5 -0
  77. package/dist/updateReputationWithAuth-Y4ONEVSP.js.map +1 -0
  78. package/dist/utils.d.ts +69 -203
  79. package/dist/utils.js +15 -153
  80. package/dist/utils.js.map +1 -1
  81. package/package.json +28 -31
  82. package/dist/.tsbuildinfo +0 -1
  83. package/dist/GhostSpeakClient-hsGuGg__.d.ts +0 -860
  84. package/dist/GovernanceModule-DQYYys-H.d.ts +0 -1766
  85. package/dist/chunk-ASQXX4IT.js +0 -572
  86. package/dist/chunk-ASQXX4IT.js.map +0 -1
  87. package/dist/chunk-COGZFWOT.js +0 -19657
  88. package/dist/chunk-COGZFWOT.js.map +0 -1
  89. package/dist/chunk-FKRN4PW5.js +0 -1667
  90. package/dist/chunk-FKRN4PW5.js.map +0 -1
  91. package/dist/chunk-GMHIUK2R.js +0 -7526
  92. package/dist/chunk-GMHIUK2R.js.map +0 -1
  93. package/dist/chunk-IAWBZYPE.js +0 -356
  94. package/dist/chunk-IAWBZYPE.js.map +0 -1
  95. package/dist/chunk-NSBPE2FW.js +0 -15
  96. package/dist/chunk-OWYHJG6H.js +0 -13311
  97. package/dist/chunk-OWYHJG6H.js.map +0 -1
  98. package/dist/chunk-RDDPOFR5.js +0 -3
  99. package/dist/chunk-RDDPOFR5.js.map +0 -1
  100. package/dist/chunk-RERCHKZP.js +0 -35
  101. package/dist/chunk-RERCHKZP.js.map +0 -1
  102. package/dist/chunk-TVVGXYCI.js +0 -2887
  103. package/dist/chunk-TVVGXYCI.js.map +0 -1
  104. package/dist/chunk-V3SOFUAZ.js.map +0 -1
  105. package/dist/chunk-ZGP5552B.js +0 -377
  106. package/dist/chunk-ZGP5552B.js.map +0 -1
  107. package/dist/chunk-ZWOYNHVK.js +0 -196
  108. package/dist/chunk-ZWOYNHVK.js.map +0 -1
  109. package/dist/dist/.tsbuildinfo +0 -1
  110. package/dist/elgamal-VZLWB3XK.js +0 -5
  111. package/dist/elgamal-VZLWB3XK.js.map +0 -1
  112. package/dist/feature-flags-V722ZuXO.d.ts +0 -3512
  113. package/dist/generated-VNLHMR6Y.js +0 -5
  114. package/dist/ipfs-types-BOt9ZNg4.d.ts +0 -592
  115. package/dist/multisigConfig-BzEhy6jy.d.ts +0 -58
  116. package/dist/pda-B_nS8SbD.d.ts +0 -114
  117. package/dist/pda-S4BFJVGE.js +0 -4
  118. package/dist/pda-S4BFJVGE.js.map +0 -1
  119. package/dist/system-addresses-BFNLEbFx.d.ts +0 -857
  120. package/dist/token-2022-rpc-RALH4RK7.js +0 -593
  121. package/dist/token-2022-rpc-RALH4RK7.js.map +0 -1
@@ -1,860 +0,0 @@
1
- import { B as BaseModule, G as GhostSpeakConfig, M as MarketplaceModule, S as ServiceListing, J as JobPosting, A as AuctionMarketplace, a as GovernanceModule, T as Token2022Module, b as AccountState, c as Token2022MintData } from './GovernanceModule-DQYYys-H.js';
2
- import { TransactionSigner } from '@solana/kit';
3
- import { P as ProposalTypeArgs, E as ExecutionParamsArgs, V as VoteChoice, G as GovernanceProposal } from './ipfs-types-BOt9ZNg4.js';
4
- import { Address } from '@solana/addresses';
5
- import { M as MultisigConfigArgs } from './multisigConfig-BzEhy6jy.js';
6
-
7
- interface CreateMultisigParams {
8
- multisigId: bigint;
9
- threshold: number;
10
- signers: Address[];
11
- config?: Partial<MultisigConfigArgs>;
12
- owner: TransactionSigner;
13
- }
14
- interface MultisigProposalParams {
15
- multisigAddress: Address;
16
- title: string;
17
- description: string;
18
- proposalType: ProposalTypeArgs;
19
- executionParams: ExecutionParamsArgs;
20
- proposalId: bigint;
21
- proposer: TransactionSigner;
22
- }
23
- interface ApproveProposalParams {
24
- proposalAddress: Address;
25
- voter: TransactionSigner;
26
- voterTokenAccount: Address;
27
- reasoning?: string;
28
- voteChoice?: VoteChoice;
29
- }
30
- interface ExecuteProposalParams {
31
- proposalAddress: Address;
32
- executor: TransactionSigner;
33
- targetProgram: Address;
34
- }
35
- declare class MultisigModule extends BaseModule {
36
- /**
37
- * Create a new multisig account
38
- */
39
- createMultisig(params: CreateMultisigParams): Promise<string>;
40
- /**
41
- * Create a proposal (Uses Governance Protocol)
42
- *
43
- * Note: This creates a GovernanceProposal. The proposer must be a signer.
44
- */
45
- createProposal(params: MultisigProposalParams): Promise<string>;
46
- /**
47
- * Approve (Vote on) a proposal
48
- */
49
- approveProposal(params: ApproveProposalParams): Promise<string>;
50
- /**
51
- * Execute a proposal
52
- */
53
- executeProposal(params: ExecuteProposalParams): Promise<string>;
54
- }
55
-
56
- /**
57
- * Crossmint Verifiable Credentials API Client
58
- *
59
- * Integrates with Crossmint's VC system to issue and verify credentials.
60
- * Ported from packages/web for SDK consumption.
61
- */
62
- declare const GHOSTSPEAK_CREDENTIAL_TYPES: {
63
- readonly AGENT_IDENTITY: "GhostSpeakAgentIdentity";
64
- readonly REPUTATION_SCORE: "GhostSpeakReputation";
65
- readonly JOB_COMPLETION: "GhostSpeakJobCompletion";
66
- };
67
- interface ActionResponse {
68
- id: string;
69
- status: string;
70
- data?: {
71
- collection?: CredentialTemplate$1;
72
- };
73
- }
74
- interface CredentialType$1 {
75
- id: string;
76
- typeSchema: {
77
- $schema: string;
78
- $id: string;
79
- title: string;
80
- description: string;
81
- type: string;
82
- properties: Record<string, unknown>;
83
- };
84
- }
85
- interface CredentialTemplate$1 {
86
- id: string;
87
- metadata: {
88
- name: string;
89
- description: string;
90
- imageUrl: string;
91
- };
92
- fungibility: string;
93
- onChain: {
94
- chain: string;
95
- type: string;
96
- };
97
- actionId: string;
98
- }
99
- interface IssuedCredential {
100
- id: string;
101
- credentialId: string;
102
- onChain: {
103
- status: 'pending' | 'completed';
104
- chain: string;
105
- contractAddress: string;
106
- tokenId?: string;
107
- };
108
- actionId: string;
109
- }
110
- interface VerificationResult {
111
- isValid: boolean;
112
- errors?: string[];
113
- }
114
- interface CrossmintClientOptions {
115
- apiKey: string;
116
- environment?: 'staging' | 'production';
117
- chain?: 'base-sepolia' | 'polygon-amoy' | 'ethereum-sepolia' | 'base' | 'polygon' | 'ethereum';
118
- }
119
- /**
120
- * Crossmint Verifiable Credentials Client
121
- *
122
- * Handles the complete credential lifecycle:
123
- * 1. Create credential types (JSON schemas)
124
- * 2. Create credential templates (on-chain configuration)
125
- * 3. Issue credentials to recipients
126
- * 4. Retrieve credentials
127
- * 5. Verify credentials
128
- * 6. Revoke credentials
129
- *
130
- * NOTE: Crossmint VCs are only supported on EVM chains.
131
- */
132
- declare class CrossmintVCClient {
133
- private apiKey;
134
- private baseUrl;
135
- private chain;
136
- constructor(options: CrossmintClientOptions);
137
- /**
138
- * Create the GhostSpeak Agent Identity credential type
139
- */
140
- createAgentIdentityType(): Promise<CredentialType$1>;
141
- /**
142
- * Create the GhostSpeak Reputation credential type
143
- */
144
- createReputationType(): Promise<CredentialType$1>;
145
- /**
146
- * Create the GhostSpeak Job Completion credential type
147
- */
148
- createJobCompletionType(): Promise<CredentialType$1>;
149
- /**
150
- * Initialize all GhostSpeak credential types
151
- */
152
- initializeAllTypes(): Promise<{
153
- agentIdentity: CredentialType$1;
154
- reputation: CredentialType$1;
155
- jobCompletion: CredentialType$1;
156
- }>;
157
- /**
158
- * Create all GhostSpeak credential templates
159
- */
160
- createAllTemplates(types: {
161
- agentIdentity: CredentialType$1;
162
- reputation: CredentialType$1;
163
- jobCompletion: CredentialType$1;
164
- }): Promise<{
165
- agentIdentityTemplate: CredentialTemplate$1;
166
- reputationTemplate: CredentialTemplate$1;
167
- jobCompletionTemplate: CredentialTemplate$1;
168
- }>;
169
- /**
170
- * Issue an agent identity credential
171
- */
172
- issueAgentCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
173
- /**
174
- * Issue a reputation credential
175
- */
176
- issueReputationCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
177
- /**
178
- * Issue a job completion credential
179
- */
180
- issueJobCompletionCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
181
- /**
182
- * Create a credential type (JSON Schema)
183
- */
184
- createCredentialType(typeName: string, schema: Record<string, unknown>): Promise<CredentialType$1>;
185
- /**
186
- * Create a credential template
187
- */
188
- createTemplate(typeId: string, metadata: {
189
- name: string;
190
- description: string;
191
- imageUrl: string;
192
- }): Promise<CredentialTemplate$1>;
193
- /**
194
- * Poll an action until completion
195
- */
196
- waitForAction(actionId: string): Promise<ActionResponse>;
197
- /**
198
- * Issue a credential using a template
199
- */
200
- issueCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
201
- getCredential(credentialId: string): Promise<unknown>;
202
- verifyCredential(credential: unknown): Promise<VerificationResult>;
203
- revokeCredential(credentialId: string): Promise<{
204
- actionId: string;
205
- status: string;
206
- }>;
207
- private getDefaultExpiry;
208
- }
209
-
210
- /**
211
- * GhostSpeak Credential Module
212
- *
213
- * Provides functionality for creating, signing, and exporting
214
- * W3C-compatible Verifiable Credentials.
215
- */
216
-
217
- declare enum CredentialKind {
218
- AgentIdentity = "AgentIdentity",
219
- ReputationScore = "ReputationScore",
220
- JobCompletion = "JobCompletion",
221
- DelegatedSigner = "DelegatedSigner",
222
- Custom = "Custom"
223
- }
224
- declare enum CredentialStatus {
225
- Pending = "Pending",
226
- Active = "Active",
227
- Revoked = "Revoked",
228
- Expired = "Expired"
229
- }
230
- interface CredentialType {
231
- authority: string;
232
- name: string;
233
- kind: CredentialKind;
234
- schemaUri: string;
235
- description: string;
236
- isActive: boolean;
237
- totalIssued: number;
238
- createdAt: number;
239
- }
240
- interface CredentialTemplate {
241
- credentialType: string;
242
- name: string;
243
- imageUri: string;
244
- issuer: string;
245
- isActive: boolean;
246
- totalIssued: number;
247
- createdAt: number;
248
- crossmintTemplateId?: string;
249
- }
250
- interface Credential {
251
- template: string;
252
- subject: string;
253
- issuer: string;
254
- credentialId: string;
255
- subjectDataHash: Uint8Array;
256
- subjectDataUri: string;
257
- status: CredentialStatus;
258
- signature: Uint8Array;
259
- issuedAt: number;
260
- expiresAt?: number;
261
- revokedAt?: number;
262
- crossmintCredentialId?: string;
263
- }
264
- interface W3CVerifiableCredential {
265
- '@context': string[];
266
- type: string[];
267
- id: string;
268
- issuer: {
269
- id: string;
270
- name?: string;
271
- } | string;
272
- validFrom: string;
273
- validUntil?: string;
274
- credentialSubject: {
275
- id?: string;
276
- [key: string]: unknown;
277
- };
278
- credentialSchema?: {
279
- id: string;
280
- type: 'JsonSchema';
281
- };
282
- credentialStatus?: {
283
- id: string;
284
- type: string;
285
- statusPurpose: 'revocation' | 'suspension';
286
- };
287
- relatedResource?: Array<{
288
- id: string;
289
- digestMultibase?: string;
290
- }>;
291
- proof: {
292
- type: 'DataIntegrityProof';
293
- created: string;
294
- verificationMethod: string;
295
- cryptosuite: 'eddsa-rdfc-2022';
296
- proofPurpose: 'assertionMethod';
297
- proofValue: string;
298
- };
299
- }
300
- declare class CredentialModule {
301
- private programId;
302
- constructor(programId?: Address);
303
- hashSubjectData(subjectData: Record<string, unknown>): Uint8Array;
304
- generateCredentialId(kind: CredentialKind, subject: string): string;
305
- exportAsW3CCredential(credential: Credential, template: CredentialTemplate, credentialType: CredentialType, subjectData: Record<string, unknown>, options?: {
306
- network?: 'mainnet' | 'devnet' | 'testnet';
307
- includeRelatedResource?: boolean;
308
- }): W3CVerifiableCredential;
309
- static buildAgentIdentitySubject(params: {
310
- agentId: string;
311
- owner: string;
312
- name: string;
313
- capabilities: string[];
314
- serviceEndpoint: string;
315
- frameworkOrigin: string;
316
- x402Enabled: boolean;
317
- registeredAt: number;
318
- verifiedAt: number;
319
- }): {
320
- agentId: string;
321
- owner: string;
322
- name: string;
323
- capabilities: string[];
324
- serviceEndpoint: string;
325
- frameworkOrigin: string;
326
- x402Enabled: boolean;
327
- registeredAt: number;
328
- verifiedAt: number;
329
- };
330
- }
331
-
332
- /**
333
- * Unified Credential Service
334
- *
335
- * Bridges GhostSpeak's native Solana credentials with Crossmint's EVM-based VCs.
336
- */
337
-
338
- interface UnifiedCredentialConfig {
339
- programId?: Address;
340
- crossmint?: CrossmintClientOptions;
341
- crossmintTemplates?: {
342
- agentIdentity?: string;
343
- reputation?: string;
344
- jobCompletion?: string;
345
- };
346
- }
347
- interface IssuedCredentialResult {
348
- solanaCredential: {
349
- credentialId: string;
350
- };
351
- w3cCredential: W3CVerifiableCredential;
352
- crossmintSync?: {
353
- status: 'pending' | 'synced' | 'failed';
354
- credentialId?: string;
355
- chain?: string;
356
- error?: string;
357
- };
358
- }
359
- declare class UnifiedCredentialService {
360
- private config;
361
- private credentialModule;
362
- private crossmintClient?;
363
- constructor(config: UnifiedCredentialConfig);
364
- /**
365
- * Issue an Agent Identity credential.
366
- * Note: logic simplified for SDK usage (mocking the on-chain part for now as per original implementation)
367
- */
368
- issueAgentIdentityCredential(params: {
369
- agentId: string;
370
- owner: string;
371
- name: string;
372
- capabilities: string[];
373
- serviceEndpoint: string;
374
- frameworkOrigin: string;
375
- x402Enabled: boolean;
376
- registeredAt: number;
377
- verifiedAt: number;
378
- recipientEmail?: string;
379
- syncToCrossmint?: boolean;
380
- signature: Uint8Array;
381
- }): Promise<IssuedCredentialResult>;
382
- }
383
-
384
- /**
385
- * Main GhostSpeak client with fluent API design
386
- *
387
- * Example usage:
388
- * ```typescript
389
- * const ghostspeak = new GhostSpeak()
390
- *
391
- * // Create an agent
392
- * const agent = await ghostspeak
393
- * .agent()
394
- * .create({ name: "My Agent", capabilities: ["coding"] })
395
- * .compressed()
396
- * .execute()
397
- *
398
- * // Create an escrow
399
- * const escrow = await ghostspeak
400
- * .escrow()
401
- * .between(buyer, seller)
402
- * .amount(sol(10))
403
- * .withMilestones([...])
404
- * .execute()
405
- * ```
406
- */
407
- declare class GhostSpeakClient {
408
- private config;
409
- constructor(config?: Partial<GhostSpeakConfig>);
410
- /**
411
- * Agent operations
412
- */
413
- agent(): AgentBuilder;
414
- /**
415
- * Escrow operations
416
- */
417
- escrow(): EscrowBuilder;
418
- /**
419
- * Channel operations
420
- */
421
- channel(): ChannelBuilder;
422
- /**
423
- * Marketplace operations
424
- */
425
- marketplace(): MarketplaceBuilder;
426
- /**
427
- * Governance operations
428
- */
429
- governance(): GovernanceBuilder;
430
- /**
431
- * Multisig operations
432
- */
433
- multisig(): MultisigBuilder;
434
- /**
435
- * Token-2022 operations
436
- */
437
- token2022(): Token2022Builder;
438
- /**
439
- * Unified Credential operations (Solana + Crossmint)
440
- */
441
- credentials(): UnifiedCredentialService;
442
- /**
443
- * Enable development mode features
444
- */
445
- enableDevMode(): this;
446
- /**
447
- * Configure network
448
- */
449
- useNetwork(cluster: 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet'): this;
450
- /**
451
- * Configure custom RPC
452
- */
453
- useRpc(endpoint: string, wsEndpoint?: string): this;
454
- /**
455
- * Get default RPC endpoint for cluster
456
- */
457
- private getDefaultRpcEndpoint;
458
- }
459
- /**
460
- * Agent builder for fluent API
461
- */
462
- declare class AgentBuilder {
463
- private module;
464
- private params;
465
- constructor(config: GhostSpeakConfig);
466
- create(params: {
467
- name: string;
468
- description?: string;
469
- capabilities: string[];
470
- }): this;
471
- withDescription(description: string): this;
472
- withType(agentType: number): this;
473
- withIPFS(): this;
474
- compressed(): this;
475
- debug(): this;
476
- withSigner(signer: TransactionSigner): this;
477
- private validateParams;
478
- getCost(): Promise<bigint>;
479
- simulate(): Promise<unknown>;
480
- explain(): Promise<string>;
481
- execute(): Promise<{
482
- address: Address;
483
- signature: string;
484
- }>;
485
- private deriveAgentAddress;
486
- }
487
- /**
488
- * Escrow builder for fluent API
489
- */
490
- declare class EscrowBuilder {
491
- private module;
492
- private params;
493
- constructor(config: GhostSpeakConfig);
494
- between(buyer: Address, seller: Address): this;
495
- amount(lamports: bigint): this;
496
- description(desc: string): this;
497
- withMilestones(milestones: Array<{
498
- amount: bigint;
499
- description: string;
500
- }>): this;
501
- debug(): this;
502
- withSigner(signer: TransactionSigner): this;
503
- private validateParams;
504
- getCost(): Promise<bigint>;
505
- explain(): Promise<string>;
506
- execute(): Promise<{
507
- address: Address;
508
- signature: string;
509
- }>;
510
- private deriveEscrowAddress;
511
- }
512
- /**
513
- * Channel builder for fluent API
514
- */
515
- declare class ChannelBuilder {
516
- private module;
517
- private params;
518
- constructor(config: GhostSpeakConfig);
519
- create(name: string): this;
520
- description(desc: string): this;
521
- private(): this;
522
- maxMembers(max: number): this;
523
- debug(): this;
524
- withSigner(signer: TransactionSigner): this;
525
- private validateParams;
526
- getCost(): Promise<bigint>;
527
- explain(): Promise<string>;
528
- execute(): Promise<{
529
- address: Address;
530
- signature: string;
531
- }>;
532
- private deriveChannelAddress;
533
- }
534
- /**
535
- * Marketplace builder for fluent API
536
- */
537
- declare class MarketplaceBuilder {
538
- private module;
539
- private params;
540
- constructor(config: GhostSpeakConfig);
541
- /**
542
- * Create a service listing
543
- */
544
- service(): ServiceBuilder;
545
- /**
546
- * Create a job posting
547
- */
548
- job(): JobBuilder;
549
- /**
550
- * Create an auction
551
- */
552
- auction(): AuctionBuilder;
553
- /**
554
- * Get marketplace queries
555
- */
556
- query(): MarketplaceQuery;
557
- debug(): this;
558
- withSigner(signer: TransactionSigner): this;
559
- }
560
- /**
561
- * Marketplace builder parameters interface
562
- */
563
- interface MarketplaceBuilderParams {
564
- signer?: TransactionSigner;
565
- }
566
- /**
567
- * Service builder for fluent API
568
- */
569
- declare class ServiceBuilder {
570
- private module;
571
- private builderParams;
572
- private params;
573
- constructor(module: MarketplaceModule, builderParams: MarketplaceBuilderParams);
574
- create(params: {
575
- title: string;
576
- description: string;
577
- agentAddress: Address;
578
- }): this;
579
- pricePerHour(price: bigint): this;
580
- category(cat: string): this;
581
- capabilities(caps: string[]): this;
582
- private validateParams;
583
- execute(): Promise<{
584
- address: Address;
585
- signature: string;
586
- }>;
587
- withSigner(signer: TransactionSigner): this;
588
- }
589
- /**
590
- * Job builder for fluent API
591
- */
592
- declare class JobBuilder {
593
- private module;
594
- private builderParams;
595
- private params;
596
- constructor(module: MarketplaceModule, builderParams: MarketplaceBuilderParams);
597
- create(params: {
598
- title: string;
599
- description: string;
600
- }): this;
601
- budget(amount: bigint): this;
602
- duration(hours: number): this;
603
- skills(skillList: string[]): this;
604
- category(cat: string): this;
605
- private validateParams;
606
- execute(): Promise<{
607
- address: Address;
608
- signature: string;
609
- }>;
610
- withSigner(signer: TransactionSigner): this;
611
- }
612
- /**
613
- * Auction builder for fluent API
614
- */
615
- declare class AuctionBuilder {
616
- private module;
617
- private builderParams;
618
- private params;
619
- constructor(module: MarketplaceModule, builderParams: MarketplaceBuilderParams);
620
- forService(serviceAddress: Address): this;
621
- startingPrice(price: bigint): this;
622
- reservePrice(price: bigint): this;
623
- duration(hours: number): this;
624
- english(): this;
625
- dutch(): this;
626
- private validateParams;
627
- execute(): Promise<{
628
- address: Address;
629
- signature: string;
630
- }>;
631
- withSigner(signer: TransactionSigner): this;
632
- }
633
- /**
634
- * Marketplace query helper
635
- */
636
- declare class MarketplaceQuery {
637
- private module;
638
- constructor(module: MarketplaceModule);
639
- serviceListings(): Promise<{
640
- address: Address;
641
- data: ServiceListing;
642
- }[]>;
643
- serviceListingsByCategory(_category: string): Promise<{
644
- address: Address;
645
- data: ServiceListing;
646
- }[]>;
647
- jobPostings(): Promise<{
648
- address: Address;
649
- data: JobPosting;
650
- }[]>;
651
- auctions(): Promise<{
652
- address: Address;
653
- data: AuctionMarketplace;
654
- }[]>;
655
- }
656
- /**
657
- * Governance builder for fluent API
658
- */
659
- declare class GovernanceBuilder {
660
- private module;
661
- private params;
662
- constructor(config: GhostSpeakConfig);
663
- /**
664
- * Create a governance proposal
665
- */
666
- proposal(): ProposalBuilder;
667
- /**
668
- * Get governance queries
669
- */
670
- query(): GovernanceQuery;
671
- debug(): this;
672
- withSigner(signer: TransactionSigner): this;
673
- }
674
- /**
675
- * Governance builder parameters interface
676
- */
677
- interface GovernanceBuilderParams {
678
- signer?: TransactionSigner;
679
- }
680
- /**
681
- * Proposal builder for fluent API
682
- */
683
- declare class ProposalBuilder {
684
- private module;
685
- private builderParams;
686
- private params;
687
- constructor(module: GovernanceModule, builderParams: GovernanceBuilderParams);
688
- create(params: {
689
- title: string;
690
- description: string;
691
- }): this;
692
- type(proposalType: 'parameter_change' | 'upgrade' | 'treasury'): this;
693
- votingDuration(hours: number): this;
694
- executionDelay(hours: number): this;
695
- private validateParams;
696
- execute(): Promise<{
697
- address: Address;
698
- signature: string;
699
- }>;
700
- withSigner(signer: TransactionSigner): this;
701
- }
702
- /**
703
- * Governance query helper
704
- */
705
- declare class GovernanceQuery {
706
- private module;
707
- constructor(module: GovernanceModule);
708
- activeProposals(): Promise<{
709
- address: Address;
710
- data: GovernanceProposal;
711
- }[]>;
712
- proposalsByProposer(proposer: Address): Promise<{
713
- address: Address;
714
- data: GovernanceProposal;
715
- }[]>;
716
- proposalsByStatus(status: 'draft' | 'voting' | 'succeeded' | 'defeated' | 'executed'): Promise<{
717
- address: Address;
718
- data: GovernanceProposal;
719
- }[]>;
720
- }
721
- /**
722
- * Multisig builder for fluent API
723
- */
724
- declare class MultisigBuilder {
725
- private module;
726
- private params;
727
- constructor(config: GhostSpeakConfig);
728
- create(): CreateMultisigBuilder;
729
- proposal(): MultisigProposalBuilder;
730
- approve(): MultisigApproveBuilder;
731
- executeProposal(): MultisigExecuteBuilder;
732
- withSigner(signer: TransactionSigner): this;
733
- debug(): this;
734
- }
735
- interface MultisigBuilderParams {
736
- signer?: TransactionSigner;
737
- }
738
- declare class CreateMultisigBuilder {
739
- private module;
740
- private builderParams;
741
- private params;
742
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
743
- withId(id: bigint): this;
744
- threshold(t: number): this;
745
- signers(s: Address[]): this;
746
- execute(): Promise<{
747
- signature: string;
748
- }>;
749
- withSigner(signer: TransactionSigner): this;
750
- }
751
- declare class MultisigProposalBuilder {
752
- private module;
753
- private builderParams;
754
- private params;
755
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
756
- forMultisig(address: Address): this;
757
- title(t: string): this;
758
- description(d: string): this;
759
- execute(): Promise<{
760
- signature: string;
761
- }>;
762
- withSigner(signer: TransactionSigner): this;
763
- }
764
- declare class MultisigApproveBuilder {
765
- private module;
766
- private builderParams;
767
- private params;
768
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
769
- proposal(address: Address): this;
770
- vote(choice: VoteChoice): this;
771
- reason(text: string): this;
772
- tokenAccount(account: Address): this;
773
- execute(): Promise<{
774
- signature: string;
775
- }>;
776
- withSigner(signer: TransactionSigner): this;
777
- }
778
- declare class MultisigExecuteBuilder {
779
- private module;
780
- private builderParams;
781
- private params;
782
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
783
- proposal(address: Address): this;
784
- target(programId: Address): this;
785
- execute(): Promise<{
786
- signature: string;
787
- }>;
788
- withSigner(signer: TransactionSigner): this;
789
- }
790
- /**
791
- * Token2022 builder for fluent API
792
- */
793
- declare class Token2022Builder {
794
- private module;
795
- private params;
796
- constructor(config: GhostSpeakConfig);
797
- /**
798
- * Create a basic mint
799
- */
800
- mint(): MintBuilder;
801
- /**
802
- * Get Token2022 queries
803
- */
804
- query(): Token2022Query;
805
- debug(): this;
806
- withSigner(signer: TransactionSigner): this;
807
- }
808
- /**
809
- * Token2022 builder parameters interface
810
- */
811
- interface Token2022BuilderParams {
812
- signer?: TransactionSigner;
813
- }
814
- /**
815
- * Mint builder for fluent API
816
- */
817
- declare class MintBuilder {
818
- private module;
819
- private builderParams;
820
- private params;
821
- constructor(module: Token2022Module, builderParams: Token2022BuilderParams);
822
- forAgent(agentAddress: Address): this;
823
- decimals(dec: number): this;
824
- freezeAuthority(authority: Address): this;
825
- withTransferFees(basisPoints: number, maxFee: bigint): this;
826
- withConfidentialTransfers(autoApprove?: boolean): this;
827
- withInterestBearing(rate: number): this;
828
- defaultAccountState(state: AccountState): this;
829
- private validateParams;
830
- execute(): Promise<{
831
- address: Address;
832
- signature: string;
833
- }>;
834
- withSigner(signer: TransactionSigner): this;
835
- }
836
- /**
837
- * Token2022 query helper
838
- */
839
- declare class Token2022Query {
840
- private module;
841
- constructor(module: Token2022Module);
842
- allMints(): Promise<{
843
- address: Address;
844
- data: Token2022MintData;
845
- }[]>;
846
- mintsByAuthority(authority: Address): Promise<{
847
- address: Address;
848
- data: Token2022MintData;
849
- }[]>;
850
- }
851
- /**
852
- * Convert SOL to lamports
853
- */
854
- declare function sol(amount: number): bigint;
855
- /**
856
- * Convert lamports to SOL
857
- */
858
- declare function lamportsToSol(lamports: bigint): number;
859
-
860
- export { CredentialModule as C, GhostSpeakClient as G, type IssuedCredentialResult as I, MultisigModule as M, UnifiedCredentialService as U, type W3CVerifiableCredential as W, CredentialKind as a, CredentialStatus as b, type Credential as c, type CredentialTemplate as d, type UnifiedCredentialConfig as e, CrossmintVCClient as f, type CrossmintClientOptions as g, type CredentialType$1 as h, type IssuedCredential as i, GHOSTSPEAK_CREDENTIAL_TYPES as j, lamportsToSol as l, sol as s };