@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
@@ -1,707 +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
- import { CrossmintClientOptions } from './credentials.js';
7
-
8
- interface CreateMultisigParams {
9
- multisigId: bigint;
10
- threshold: number;
11
- signers: Address[];
12
- config?: Partial<MultisigConfigArgs>;
13
- owner: TransactionSigner;
14
- }
15
- interface MultisigProposalParams {
16
- multisigAddress: Address;
17
- title: string;
18
- description: string;
19
- proposalType: ProposalTypeArgs;
20
- executionParams: ExecutionParamsArgs;
21
- proposalId: bigint;
22
- proposer: TransactionSigner;
23
- }
24
- interface ApproveProposalParams {
25
- proposalAddress: Address;
26
- voter: TransactionSigner;
27
- voterTokenAccount: Address;
28
- reasoning?: string;
29
- voteChoice?: VoteChoice;
30
- }
31
- interface ExecuteProposalParams {
32
- proposalAddress: Address;
33
- executor: TransactionSigner;
34
- targetProgram: Address;
35
- }
36
- declare class MultisigModule extends BaseModule {
37
- /**
38
- * Create a new multisig account
39
- */
40
- createMultisig(params: CreateMultisigParams): Promise<string>;
41
- /**
42
- * Create a proposal (Uses Governance Protocol)
43
- *
44
- * Note: This creates a GovernanceProposal. The proposer must be a signer.
45
- */
46
- createProposal(params: MultisigProposalParams): Promise<string>;
47
- /**
48
- * Approve (Vote on) a proposal
49
- */
50
- approveProposal(params: ApproveProposalParams): Promise<string>;
51
- /**
52
- * Execute a proposal
53
- */
54
- executeProposal(params: ExecuteProposalParams): Promise<string>;
55
- }
56
-
57
- /**
58
- * GhostSpeak Credential Module
59
- *
60
- * Provides functionality for creating, signing, and exporting
61
- * W3C-compatible Verifiable Credentials.
62
- */
63
-
64
- declare enum CredentialKind {
65
- AgentIdentity = "AgentIdentity",
66
- ReputationScore = "ReputationScore",
67
- JobCompletion = "JobCompletion",
68
- DelegatedSigner = "DelegatedSigner",
69
- Custom = "Custom"
70
- }
71
- declare enum CredentialStatus {
72
- Pending = "Pending",
73
- Active = "Active",
74
- Revoked = "Revoked",
75
- Expired = "Expired"
76
- }
77
- interface CredentialType {
78
- authority: string;
79
- name: string;
80
- kind: CredentialKind;
81
- schemaUri: string;
82
- description: string;
83
- isActive: boolean;
84
- totalIssued: number;
85
- createdAt: number;
86
- }
87
- interface CredentialTemplate {
88
- credentialType: string;
89
- name: string;
90
- imageUri: string;
91
- issuer: string;
92
- isActive: boolean;
93
- totalIssued: number;
94
- createdAt: number;
95
- crossmintTemplateId?: string;
96
- }
97
- interface Credential {
98
- template: string;
99
- subject: string;
100
- issuer: string;
101
- credentialId: string;
102
- subjectDataHash: Uint8Array;
103
- subjectDataUri: string;
104
- status: CredentialStatus;
105
- signature: Uint8Array;
106
- issuedAt: number;
107
- expiresAt?: number;
108
- revokedAt?: number;
109
- crossmintCredentialId?: string;
110
- }
111
- interface W3CVerifiableCredential {
112
- '@context': string[];
113
- type: string[];
114
- id: string;
115
- issuer: {
116
- id: string;
117
- name?: string;
118
- } | string;
119
- validFrom: string;
120
- validUntil?: string;
121
- credentialSubject: {
122
- id?: string;
123
- [key: string]: unknown;
124
- };
125
- credentialSchema?: {
126
- id: string;
127
- type: 'JsonSchema';
128
- };
129
- credentialStatus?: {
130
- id: string;
131
- type: string;
132
- statusPurpose: 'revocation' | 'suspension';
133
- };
134
- relatedResource?: Array<{
135
- id: string;
136
- digestMultibase?: string;
137
- }>;
138
- proof: {
139
- type: 'DataIntegrityProof';
140
- created: string;
141
- verificationMethod: string;
142
- cryptosuite: 'eddsa-rdfc-2022';
143
- proofPurpose: 'assertionMethod';
144
- proofValue: string;
145
- };
146
- }
147
- declare class CredentialModule {
148
- private programId;
149
- constructor(programId?: Address);
150
- hashSubjectData(subjectData: Record<string, unknown>): Uint8Array;
151
- generateCredentialId(kind: CredentialKind, subject: string): string;
152
- exportAsW3CCredential(credential: Credential, template: CredentialTemplate, credentialType: CredentialType, subjectData: Record<string, unknown>, options?: {
153
- network?: 'mainnet' | 'devnet' | 'testnet';
154
- includeRelatedResource?: boolean;
155
- }): W3CVerifiableCredential;
156
- static buildAgentIdentitySubject(params: {
157
- agentId: string;
158
- owner: string;
159
- name: string;
160
- capabilities: string[];
161
- serviceEndpoint: string;
162
- frameworkOrigin: string;
163
- x402Enabled: boolean;
164
- registeredAt: number;
165
- verifiedAt: number;
166
- }): {
167
- agentId: string;
168
- owner: string;
169
- name: string;
170
- capabilities: string[];
171
- serviceEndpoint: string;
172
- frameworkOrigin: string;
173
- x402Enabled: boolean;
174
- registeredAt: number;
175
- verifiedAt: number;
176
- };
177
- }
178
-
179
- /**
180
- * Unified Credential Service
181
- *
182
- * Bridges GhostSpeak's native Solana credentials with Crossmint's EVM-based VCs.
183
- */
184
-
185
- interface UnifiedCredentialConfig {
186
- programId?: Address;
187
- crossmint?: CrossmintClientOptions;
188
- crossmintTemplates?: {
189
- agentIdentity?: string;
190
- reputation?: string;
191
- jobCompletion?: string;
192
- };
193
- }
194
- interface IssuedCredentialResult {
195
- solanaCredential: {
196
- credentialId: string;
197
- };
198
- w3cCredential: W3CVerifiableCredential;
199
- crossmintSync?: {
200
- status: 'pending' | 'synced' | 'failed';
201
- credentialId?: string;
202
- chain?: string;
203
- error?: string;
204
- };
205
- }
206
- declare class UnifiedCredentialService {
207
- private config;
208
- private credentialModule;
209
- private crossmintClient?;
210
- constructor(config: UnifiedCredentialConfig);
211
- /**
212
- * Issue an Agent Identity credential.
213
- * Note: logic simplified for SDK usage (mocking the on-chain part for now as per original implementation)
214
- */
215
- issueAgentIdentityCredential(params: {
216
- agentId: string;
217
- owner: string;
218
- name: string;
219
- capabilities: string[];
220
- serviceEndpoint: string;
221
- frameworkOrigin: string;
222
- x402Enabled: boolean;
223
- registeredAt: number;
224
- verifiedAt: number;
225
- recipientEmail?: string;
226
- syncToCrossmint?: boolean;
227
- signature: Uint8Array;
228
- }): Promise<IssuedCredentialResult>;
229
- }
230
-
231
- /**
232
- * Main GhostSpeak client with fluent API design
233
- *
234
- * Example usage:
235
- * ```typescript
236
- * const ghostspeak = new GhostSpeak()
237
- *
238
- * // Create an agent
239
- * const agent = await ghostspeak
240
- * .agent()
241
- * .create({ name: "My Agent", capabilities: ["coding"] })
242
- * .compressed()
243
- * .execute()
244
- *
245
- * // Create an escrow
246
- * const escrow = await ghostspeak
247
- * .escrow()
248
- * .between(buyer, seller)
249
- * .amount(sol(10))
250
- * .withMilestones([...])
251
- * .execute()
252
- * ```
253
- */
254
- declare class GhostSpeakClient {
255
- private config;
256
- constructor(config?: Partial<GhostSpeakConfig>);
257
- /**
258
- * Agent operations
259
- */
260
- agent(): AgentBuilder;
261
- /**
262
- * Escrow operations
263
- */
264
- escrow(): EscrowBuilder;
265
- /**
266
- * Channel operations
267
- */
268
- channel(): ChannelBuilder;
269
- /**
270
- * Marketplace operations
271
- */
272
- marketplace(): MarketplaceBuilder;
273
- /**
274
- * Governance operations
275
- */
276
- governance(): GovernanceBuilder;
277
- /**
278
- * Multisig operations
279
- */
280
- multisig(): MultisigBuilder;
281
- /**
282
- * Token-2022 operations
283
- */
284
- token2022(): Token2022Builder;
285
- /**
286
- * Unified Credential operations (Solana + Crossmint)
287
- */
288
- credentials(): UnifiedCredentialService;
289
- /**
290
- * Enable development mode features
291
- */
292
- enableDevMode(): this;
293
- /**
294
- * Configure network
295
- */
296
- useNetwork(cluster: 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet'): this;
297
- /**
298
- * Configure custom RPC
299
- */
300
- useRpc(endpoint: string, wsEndpoint?: string): this;
301
- /**
302
- * Get default RPC endpoint for cluster
303
- */
304
- private getDefaultRpcEndpoint;
305
- }
306
- /**
307
- * Agent builder for fluent API
308
- */
309
- declare class AgentBuilder {
310
- private module;
311
- private params;
312
- constructor(config: GhostSpeakConfig);
313
- create(params: {
314
- name: string;
315
- description?: string;
316
- capabilities: string[];
317
- }): this;
318
- withDescription(description: string): this;
319
- withType(agentType: number): this;
320
- withIPFS(): this;
321
- compressed(): this;
322
- debug(): this;
323
- withSigner(signer: TransactionSigner): this;
324
- private validateParams;
325
- getCost(): Promise<bigint>;
326
- simulate(): Promise<unknown>;
327
- explain(): Promise<string>;
328
- execute(): Promise<{
329
- address: Address;
330
- signature: string;
331
- }>;
332
- private deriveAgentAddress;
333
- }
334
- /**
335
- * Escrow builder for fluent API
336
- */
337
- declare class EscrowBuilder {
338
- private module;
339
- private params;
340
- constructor(config: GhostSpeakConfig);
341
- between(buyer: Address, seller: Address): this;
342
- amount(lamports: bigint): this;
343
- description(desc: string): this;
344
- withMilestones(milestones: Array<{
345
- amount: bigint;
346
- description: string;
347
- }>): this;
348
- debug(): this;
349
- withSigner(signer: TransactionSigner): this;
350
- private validateParams;
351
- getCost(): Promise<bigint>;
352
- explain(): Promise<string>;
353
- execute(): Promise<{
354
- address: Address;
355
- signature: string;
356
- }>;
357
- private deriveEscrowAddress;
358
- }
359
- /**
360
- * Channel builder for fluent API
361
- */
362
- declare class ChannelBuilder {
363
- private module;
364
- private params;
365
- constructor(config: GhostSpeakConfig);
366
- create(name: string): this;
367
- description(desc: string): this;
368
- private(): this;
369
- maxMembers(max: number): this;
370
- debug(): this;
371
- withSigner(signer: TransactionSigner): this;
372
- private validateParams;
373
- getCost(): Promise<bigint>;
374
- explain(): Promise<string>;
375
- execute(): Promise<{
376
- address: Address;
377
- signature: string;
378
- }>;
379
- private deriveChannelAddress;
380
- }
381
- /**
382
- * Marketplace builder for fluent API
383
- */
384
- declare class MarketplaceBuilder {
385
- private module;
386
- private params;
387
- constructor(config: GhostSpeakConfig);
388
- /**
389
- * Create a service listing
390
- */
391
- service(): ServiceBuilder;
392
- /**
393
- * Create a job posting
394
- */
395
- job(): JobBuilder;
396
- /**
397
- * Create an auction
398
- */
399
- auction(): AuctionBuilder;
400
- /**
401
- * Get marketplace queries
402
- */
403
- query(): MarketplaceQuery;
404
- debug(): this;
405
- withSigner(signer: TransactionSigner): this;
406
- }
407
- /**
408
- * Marketplace builder parameters interface
409
- */
410
- interface MarketplaceBuilderParams {
411
- signer?: TransactionSigner;
412
- }
413
- /**
414
- * Service builder for fluent API
415
- */
416
- declare class ServiceBuilder {
417
- private module;
418
- private builderParams;
419
- private params;
420
- constructor(module: MarketplaceModule, builderParams: MarketplaceBuilderParams);
421
- create(params: {
422
- title: string;
423
- description: string;
424
- agentAddress: Address;
425
- }): this;
426
- pricePerHour(price: bigint): this;
427
- category(cat: string): this;
428
- capabilities(caps: string[]): this;
429
- private validateParams;
430
- execute(): Promise<{
431
- address: Address;
432
- signature: string;
433
- }>;
434
- withSigner(signer: TransactionSigner): this;
435
- }
436
- /**
437
- * Job builder for fluent API
438
- */
439
- declare class JobBuilder {
440
- private module;
441
- private builderParams;
442
- private params;
443
- constructor(module: MarketplaceModule, builderParams: MarketplaceBuilderParams);
444
- create(params: {
445
- title: string;
446
- description: string;
447
- }): this;
448
- budget(amount: bigint): this;
449
- duration(hours: number): this;
450
- skills(skillList: string[]): this;
451
- category(cat: string): this;
452
- private validateParams;
453
- execute(): Promise<{
454
- address: Address;
455
- signature: string;
456
- }>;
457
- withSigner(signer: TransactionSigner): this;
458
- }
459
- /**
460
- * Auction builder for fluent API
461
- */
462
- declare class AuctionBuilder {
463
- private module;
464
- private builderParams;
465
- private params;
466
- constructor(module: MarketplaceModule, builderParams: MarketplaceBuilderParams);
467
- forService(serviceAddress: Address): this;
468
- startingPrice(price: bigint): this;
469
- reservePrice(price: bigint): this;
470
- duration(hours: number): this;
471
- english(): this;
472
- dutch(): this;
473
- private validateParams;
474
- execute(): Promise<{
475
- address: Address;
476
- signature: string;
477
- }>;
478
- withSigner(signer: TransactionSigner): this;
479
- }
480
- /**
481
- * Marketplace query helper
482
- */
483
- declare class MarketplaceQuery {
484
- private module;
485
- constructor(module: MarketplaceModule);
486
- serviceListings(): Promise<{
487
- address: Address;
488
- data: ServiceListing;
489
- }[]>;
490
- serviceListingsByCategory(_category: string): Promise<{
491
- address: Address;
492
- data: ServiceListing;
493
- }[]>;
494
- jobPostings(): Promise<{
495
- address: Address;
496
- data: JobPosting;
497
- }[]>;
498
- auctions(): Promise<{
499
- address: Address;
500
- data: AuctionMarketplace;
501
- }[]>;
502
- }
503
- /**
504
- * Governance builder for fluent API
505
- */
506
- declare class GovernanceBuilder {
507
- private module;
508
- private params;
509
- constructor(config: GhostSpeakConfig);
510
- /**
511
- * Create a governance proposal
512
- */
513
- proposal(): ProposalBuilder;
514
- /**
515
- * Get governance queries
516
- */
517
- query(): GovernanceQuery;
518
- debug(): this;
519
- withSigner(signer: TransactionSigner): this;
520
- }
521
- /**
522
- * Governance builder parameters interface
523
- */
524
- interface GovernanceBuilderParams {
525
- signer?: TransactionSigner;
526
- }
527
- /**
528
- * Proposal builder for fluent API
529
- */
530
- declare class ProposalBuilder {
531
- private module;
532
- private builderParams;
533
- private params;
534
- constructor(module: GovernanceModule, builderParams: GovernanceBuilderParams);
535
- create(params: {
536
- title: string;
537
- description: string;
538
- }): this;
539
- type(proposalType: 'parameter_change' | 'upgrade' | 'treasury'): this;
540
- votingDuration(hours: number): this;
541
- executionDelay(hours: number): this;
542
- private validateParams;
543
- execute(): Promise<{
544
- address: Address;
545
- signature: string;
546
- }>;
547
- withSigner(signer: TransactionSigner): this;
548
- }
549
- /**
550
- * Governance query helper
551
- */
552
- declare class GovernanceQuery {
553
- private module;
554
- constructor(module: GovernanceModule);
555
- activeProposals(): Promise<{
556
- address: Address;
557
- data: GovernanceProposal;
558
- }[]>;
559
- proposalsByProposer(proposer: Address): Promise<{
560
- address: Address;
561
- data: GovernanceProposal;
562
- }[]>;
563
- proposalsByStatus(status: 'draft' | 'voting' | 'succeeded' | 'defeated' | 'executed'): Promise<{
564
- address: Address;
565
- data: GovernanceProposal;
566
- }[]>;
567
- }
568
- /**
569
- * Multisig builder for fluent API
570
- */
571
- declare class MultisigBuilder {
572
- private module;
573
- private params;
574
- constructor(config: GhostSpeakConfig);
575
- create(): CreateMultisigBuilder;
576
- proposal(): MultisigProposalBuilder;
577
- approve(): MultisigApproveBuilder;
578
- executeProposal(): MultisigExecuteBuilder;
579
- withSigner(signer: TransactionSigner): this;
580
- debug(): this;
581
- }
582
- interface MultisigBuilderParams {
583
- signer?: TransactionSigner;
584
- }
585
- declare class CreateMultisigBuilder {
586
- private module;
587
- private builderParams;
588
- private params;
589
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
590
- withId(id: bigint): this;
591
- threshold(t: number): this;
592
- signers(s: Address[]): this;
593
- execute(): Promise<{
594
- signature: string;
595
- }>;
596
- withSigner(signer: TransactionSigner): this;
597
- }
598
- declare class MultisigProposalBuilder {
599
- private module;
600
- private builderParams;
601
- private params;
602
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
603
- forMultisig(address: Address): this;
604
- title(t: string): this;
605
- description(d: string): this;
606
- execute(): Promise<{
607
- signature: string;
608
- }>;
609
- withSigner(signer: TransactionSigner): this;
610
- }
611
- declare class MultisigApproveBuilder {
612
- private module;
613
- private builderParams;
614
- private params;
615
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
616
- proposal(address: Address): this;
617
- vote(choice: VoteChoice): this;
618
- reason(text: string): this;
619
- tokenAccount(account: Address): this;
620
- execute(): Promise<{
621
- signature: string;
622
- }>;
623
- withSigner(signer: TransactionSigner): this;
624
- }
625
- declare class MultisigExecuteBuilder {
626
- private module;
627
- private builderParams;
628
- private params;
629
- constructor(module: MultisigModule, builderParams: MultisigBuilderParams);
630
- proposal(address: Address): this;
631
- target(programId: Address): this;
632
- execute(): Promise<{
633
- signature: string;
634
- }>;
635
- withSigner(signer: TransactionSigner): this;
636
- }
637
- /**
638
- * Token2022 builder for fluent API
639
- */
640
- declare class Token2022Builder {
641
- private module;
642
- private params;
643
- constructor(config: GhostSpeakConfig);
644
- /**
645
- * Create a basic mint
646
- */
647
- mint(): MintBuilder;
648
- /**
649
- * Get Token2022 queries
650
- */
651
- query(): Token2022Query;
652
- debug(): this;
653
- withSigner(signer: TransactionSigner): this;
654
- }
655
- /**
656
- * Token2022 builder parameters interface
657
- */
658
- interface Token2022BuilderParams {
659
- signer?: TransactionSigner;
660
- }
661
- /**
662
- * Mint builder for fluent API
663
- */
664
- declare class MintBuilder {
665
- private module;
666
- private builderParams;
667
- private params;
668
- constructor(module: Token2022Module, builderParams: Token2022BuilderParams);
669
- forAgent(agentAddress: Address): this;
670
- decimals(dec: number): this;
671
- freezeAuthority(authority: Address): this;
672
- withTransferFees(basisPoints: number, maxFee: bigint): this;
673
- withConfidentialTransfers(autoApprove?: boolean): this;
674
- withInterestBearing(rate: number): this;
675
- defaultAccountState(state: AccountState): this;
676
- private validateParams;
677
- execute(): Promise<{
678
- address: Address;
679
- signature: string;
680
- }>;
681
- withSigner(signer: TransactionSigner): this;
682
- }
683
- /**
684
- * Token2022 query helper
685
- */
686
- declare class Token2022Query {
687
- private module;
688
- constructor(module: Token2022Module);
689
- allMints(): Promise<{
690
- address: Address;
691
- data: Token2022MintData;
692
- }[]>;
693
- mintsByAuthority(authority: Address): Promise<{
694
- address: Address;
695
- data: Token2022MintData;
696
- }[]>;
697
- }
698
- /**
699
- * Convert SOL to lamports
700
- */
701
- declare function sol(amount: number): bigint;
702
- /**
703
- * Convert lamports to SOL
704
- */
705
- declare function lamportsToSol(lamports: bigint): number;
706
-
707
- 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, lamportsToSol as l, sol as s };