@ghostspeak/sdk 2.0.5 → 2.0.6

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.
@@ -0,0 +1,343 @@
1
+ // src/modules/credentials/CrossmintVCClient.ts
2
+ var CROSSMINT_STAGING_URL = "https://staging.crossmint.com";
3
+ var CROSSMINT_PROD_URL = "https://www.crossmint.com";
4
+ var GHOSTSPEAK_CREDENTIAL_TYPES = {
5
+ AGENT_IDENTITY: "GhostSpeakAgentIdentity",
6
+ REPUTATION_SCORE: "GhostSpeakReputation",
7
+ JOB_COMPLETION: "GhostSpeakJobCompletion"
8
+ };
9
+ var CrossmintVCClient = class {
10
+ apiKey;
11
+ baseUrl;
12
+ chain;
13
+ constructor(options) {
14
+ this.apiKey = options.apiKey;
15
+ this.baseUrl = options.environment === "production" ? CROSSMINT_PROD_URL : CROSSMINT_STAGING_URL;
16
+ this.chain = options.chain || "base-sepolia";
17
+ }
18
+ // ===================================
19
+ // Types & Templates
20
+ // ===================================
21
+ /**
22
+ * Create the GhostSpeak Agent Identity credential type
23
+ */
24
+ async createAgentIdentityType() {
25
+ const typeName = GHOSTSPEAK_CREDENTIAL_TYPES.AGENT_IDENTITY;
26
+ const schema = {
27
+ $schema: "https://json-schema.org/draft/2020-12/schema",
28
+ title: "GhostSpeak Agent Identity",
29
+ description: "Verified AI agent identity on the GhostSpeak Protocol",
30
+ type: "object",
31
+ properties: {
32
+ credentialSubject: {
33
+ type: "object",
34
+ properties: {
35
+ agentId: { type: "string" },
36
+ owner: { type: "string" },
37
+ capabilities: { type: "array", items: { type: "string" } },
38
+ registeredAt: { type: "string" },
39
+ reputationScore: { type: "number" },
40
+ totalJobsCompleted: { type: "integer" },
41
+ verified: { type: "boolean" },
42
+ id: { type: "string" }
43
+ // Auto-added by Crossmint
44
+ },
45
+ required: ["agentId", "owner", "capabilities", "registeredAt", "verified"],
46
+ additionalProperties: false
47
+ }
48
+ }
49
+ };
50
+ return this.createCredentialType(typeName, schema);
51
+ }
52
+ /**
53
+ * Create the GhostSpeak Reputation credential type
54
+ */
55
+ async createReputationType() {
56
+ const typeName = GHOSTSPEAK_CREDENTIAL_TYPES.REPUTATION_SCORE;
57
+ const schema = {
58
+ $schema: "https://json-schema.org/draft/2020-12/schema",
59
+ title: "GhostSpeak Reputation",
60
+ description: "Verified reputation score for GhostSpeak users",
61
+ type: "object",
62
+ properties: {
63
+ credentialSubject: {
64
+ type: "object",
65
+ properties: {
66
+ userId: { type: "string" },
67
+ walletAddress: { type: "string" },
68
+ reputationScore: { type: "number" },
69
+ totalTransactions: { type: "integer" },
70
+ disputeRate: { type: "number" },
71
+ memberSince: { type: "string" },
72
+ id: { type: "string" }
73
+ },
74
+ required: ["userId", "walletAddress", "reputationScore", "memberSince"],
75
+ additionalProperties: false
76
+ }
77
+ }
78
+ };
79
+ return this.createCredentialType(typeName, schema);
80
+ }
81
+ /**
82
+ * Create the GhostSpeak Job Completion credential type
83
+ */
84
+ async createJobCompletionType() {
85
+ const typeName = GHOSTSPEAK_CREDENTIAL_TYPES.JOB_COMPLETION;
86
+ const schema = {
87
+ $schema: "https://json-schema.org/draft/2020-12/schema",
88
+ title: "GhostSpeak Job Completion",
89
+ description: "Certificate of successful job completion on GhostSpeak",
90
+ type: "object",
91
+ properties: {
92
+ credentialSubject: {
93
+ type: "object",
94
+ properties: {
95
+ jobId: { type: "string" },
96
+ agentId: { type: "string" },
97
+ clientAddress: { type: "string" },
98
+ completedAt: { type: "string" },
99
+ amountPaid: { type: "string" },
100
+ rating: { type: "integer" },
101
+ review: { type: "string" },
102
+ id: { type: "string" }
103
+ },
104
+ required: ["jobId", "agentId", "clientAddress", "completedAt", "amountPaid", "rating"],
105
+ additionalProperties: false
106
+ }
107
+ }
108
+ };
109
+ return this.createCredentialType(typeName, schema);
110
+ }
111
+ /**
112
+ * Initialize all GhostSpeak credential types
113
+ */
114
+ async initializeAllTypes() {
115
+ const [agentIdentity, reputation, jobCompletion] = await Promise.all([
116
+ this.createAgentIdentityType(),
117
+ this.createReputationType(),
118
+ this.createJobCompletionType()
119
+ ]);
120
+ return { agentIdentity, reputation, jobCompletion };
121
+ }
122
+ /**
123
+ * Create all GhostSpeak credential templates
124
+ */
125
+ async createAllTemplates(types) {
126
+ const [agentIdentityTemplate, reputationTemplate, jobCompletionTemplate] = await Promise.all([
127
+ this.createTemplate(types.agentIdentity.id, {
128
+ name: "GhostSpeak Agent Identity",
129
+ description: "Verified AI agent identity on the GhostSpeak Protocol",
130
+ imageUrl: "https://www.ghostspeak.io/assets/credential-agent.png"
131
+ }),
132
+ this.createTemplate(types.reputation.id, {
133
+ name: "GhostSpeak Reputation",
134
+ description: "Verified reputation score for GhostSpeak users",
135
+ imageUrl: "https://www.ghostspeak.io/assets/credential-reputation.png"
136
+ }),
137
+ this.createTemplate(types.jobCompletion.id, {
138
+ name: "GhostSpeak Job Completion Certificate",
139
+ description: "Certificate of successful job completion on GhostSpeak",
140
+ imageUrl: "https://www.ghostspeak.io/assets/credential-job.png"
141
+ })
142
+ ]);
143
+ return { agentIdentityTemplate, reputationTemplate, jobCompletionTemplate };
144
+ }
145
+ /**
146
+ * Issue an agent identity credential
147
+ */
148
+ async issueAgentCredential(templateId, recipientEmail, subject, expiresAt) {
149
+ return this.issueCredential(templateId, recipientEmail, subject, expiresAt);
150
+ }
151
+ /**
152
+ * Issue a reputation credential
153
+ */
154
+ async issueReputationCredential(templateId, recipientEmail, subject, expiresAt) {
155
+ return this.issueCredential(templateId, recipientEmail, subject, expiresAt);
156
+ }
157
+ /**
158
+ * Issue a job completion credential
159
+ */
160
+ async issueJobCompletionCredential(templateId, recipientEmail, subject, expiresAt) {
161
+ return this.issueCredential(templateId, recipientEmail, subject, expiresAt);
162
+ }
163
+ /**
164
+ * Create a credential type (JSON Schema)
165
+ */
166
+ async createCredentialType(typeName, schema) {
167
+ const response = await fetch(
168
+ `${this.baseUrl}/api/v1-alpha1/credentials/types/${typeName}`,
169
+ {
170
+ method: "PUT",
171
+ headers: {
172
+ "Content-Type": "application/json",
173
+ "X-API-KEY": this.apiKey
174
+ },
175
+ body: JSON.stringify(schema)
176
+ }
177
+ );
178
+ if (!response.ok) {
179
+ const error = await response.json().catch(() => ({ message: response.statusText }));
180
+ throw new Error(`Failed to create credential type: ${JSON.stringify(error)}`);
181
+ }
182
+ return response.json();
183
+ }
184
+ /**
185
+ * Create a credential template
186
+ */
187
+ async createTemplate(typeId, metadata) {
188
+ const response = await fetch(
189
+ `${this.baseUrl}/api/v1-alpha1/credentials/templates/`,
190
+ {
191
+ method: "POST",
192
+ headers: {
193
+ "Content-Type": "application/json",
194
+ "X-API-KEY": this.apiKey
195
+ },
196
+ body: JSON.stringify({
197
+ credentials: {
198
+ type: typeId,
199
+ encryption: "none",
200
+ storage: "crossmint"
201
+ },
202
+ metadata,
203
+ chain: this.chain
204
+ })
205
+ }
206
+ );
207
+ if (!response.ok) {
208
+ const text = await response.text();
209
+ try {
210
+ const error = JSON.parse(text);
211
+ throw new Error(`Failed to create template: ${JSON.stringify(error)}`);
212
+ } catch (e) {
213
+ throw new Error(`Failed to create template (${response.status}): ${text}`);
214
+ }
215
+ }
216
+ const action = await response.json();
217
+ const result = await this.waitForAction(action.id);
218
+ if (result.data && result.data.collection) {
219
+ return result.data.collection;
220
+ }
221
+ return result.data || result;
222
+ }
223
+ /**
224
+ * Poll an action until completion
225
+ */
226
+ async waitForAction(actionId) {
227
+ let retries = 0;
228
+ while (retries < 60) {
229
+ await new Promise((resolve) => setTimeout(resolve, 2e3));
230
+ const response = await fetch(
231
+ `${this.baseUrl}/api/2022-06-09/actions/${actionId}`,
232
+ {
233
+ headers: {
234
+ "X-API-KEY": this.apiKey
235
+ }
236
+ }
237
+ );
238
+ if (!response.ok) {
239
+ throw new Error(`Failed to poll action: ${response.statusText}`);
240
+ }
241
+ const action = await response.json();
242
+ if (action.status === "succeeded") {
243
+ return action;
244
+ }
245
+ if (action.status === "failed") {
246
+ throw new Error(`Action failed: ${JSON.stringify(action)}`);
247
+ }
248
+ retries++;
249
+ }
250
+ throw new Error("Action polling timed out");
251
+ }
252
+ // ===================================
253
+ // Issuance
254
+ // ===================================
255
+ /**
256
+ * Issue a credential using a template
257
+ */
258
+ async issueCredential(templateId, recipientEmail, subject, expiresAt) {
259
+ const response = await fetch(
260
+ `${this.baseUrl}/api/v1-alpha1/credentials/templates/${templateId}/vcs`,
261
+ {
262
+ method: "POST",
263
+ headers: {
264
+ "Content-Type": "application/json",
265
+ "X-API-KEY": this.apiKey
266
+ },
267
+ body: JSON.stringify({
268
+ recipient: `email:${recipientEmail}:${this.chain}`,
269
+ credential: {
270
+ subject,
271
+ expiresAt: expiresAt || this.getDefaultExpiry()
272
+ }
273
+ })
274
+ }
275
+ );
276
+ if (!response.ok) {
277
+ const error = await response.json().catch(() => ({ message: response.statusText }));
278
+ throw new Error(`Failed to issue credential: ${JSON.stringify(error)}`);
279
+ }
280
+ return response.json();
281
+ }
282
+ // ===================================
283
+ // Verification & Retrieval
284
+ // ===================================
285
+ async getCredential(credentialId) {
286
+ const response = await fetch(
287
+ `${this.baseUrl}/api/v1-alpha1/credentials/${credentialId}`,
288
+ {
289
+ headers: {
290
+ "X-API-KEY": this.apiKey
291
+ }
292
+ }
293
+ );
294
+ if (!response.ok) {
295
+ const error = await response.json().catch(() => ({ message: response.statusText }));
296
+ throw new Error(`Failed to get credential: ${JSON.stringify(error)}`);
297
+ }
298
+ return response.json();
299
+ }
300
+ async verifyCredential(credential) {
301
+ const response = await fetch(
302
+ `${this.baseUrl}/api/v1-alpha1/credentials/verification/verify`,
303
+ {
304
+ method: "POST",
305
+ headers: {
306
+ "Content-Type": "application/json",
307
+ "X-API-KEY": this.apiKey
308
+ },
309
+ body: JSON.stringify({ credential })
310
+ }
311
+ );
312
+ if (!response.ok) {
313
+ const error = await response.json().catch(() => ({ message: response.statusText }));
314
+ throw new Error(`Failed to verify credential: ${JSON.stringify(error)}`);
315
+ }
316
+ return response.json();
317
+ }
318
+ async revokeCredential(credentialId) {
319
+ const response = await fetch(
320
+ `${this.baseUrl}/api/v1-alpha1/credentials/${credentialId}`,
321
+ {
322
+ method: "DELETE",
323
+ headers: {
324
+ "X-API-KEY": this.apiKey
325
+ }
326
+ }
327
+ );
328
+ if (!response.ok) {
329
+ const error = await response.json().catch(() => ({ message: response.statusText }));
330
+ throw new Error(`Failed to revoke credential: ${JSON.stringify(error)}`);
331
+ }
332
+ return response.json();
333
+ }
334
+ getDefaultExpiry() {
335
+ const date = /* @__PURE__ */ new Date();
336
+ date.setFullYear(date.getFullYear() + 1);
337
+ return date.toISOString().split("T")[0];
338
+ }
339
+ };
340
+
341
+ export { CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES };
342
+ //# sourceMappingURL=chunk-RIZZPLLB.js.map
343
+ //# sourceMappingURL=chunk-RIZZPLLB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/modules/credentials/CrossmintVCClient.ts"],"names":[],"mappings":";AAQA,IAAM,qBAAA,GAAwB,+BAAA;AAC9B,IAAM,kBAAA,GAAqB,2BAAA;AAGpB,IAAM,2BAAA,GAA8B;AAAA,EACzC,cAAA,EAAgB,yBAAA;AAAA,EAChB,gBAAA,EAAkB,sBAAA;AAAA,EAClB,cAAA,EAAgB;AAClB;AA+EO,IAAM,oBAAN,MAAwB;AAAA,EACrB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EAER,YAAY,OAAA,EAAiC;AAC3C,IAAA,IAAA,CAAK,SAAS,OAAA,CAAQ,MAAA;AACtB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA,CAAQ,WAAA,KAAgB,YAAA,GACnC,kBAAA,GACA,qBAAA;AACJ,IAAA,IAAA,CAAK,KAAA,GAAQ,QAAQ,KAAA,IAAS,cAAA;AAAA,EAChC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,uBAAA,GAAmD;AACvD,IAAA,MAAM,WAAW,2BAAA,CAA4B,cAAA;AAC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AAAA,EACvB;AAAA,EAEA,MAAM,iBAAiB,YAAA,EAAqE;AAC1F,IAAA,MAAM,WAAW,MAAM,KAAA;AAAA,MACrB,CAAA,EAAG,IAAA,CAAK,OAAO,CAAA,2BAAA,EAA8B,YAAY,CAAA,CAAA;AAAA,MACzD;AAAA,QACE,MAAA,EAAQ,QAAA;AAAA,QACR,OAAA,EAAS;AAAA,UACP,aAAa,IAAA,CAAK;AAAA;AACpB;AACF,KACF;AAEA,IAAA,IAAI,CAAC,SAAS,EAAA,EAAI;AAChB,MAAA,MAAM,KAAA,GAAQ,MAAM,QAAA,CAAS,IAAA,EAAK,CAAE,KAAA,CAAM,OAAO,EAAE,OAAA,EAAS,QAAA,CAAS,UAAA,EAAW,CAAE,CAAA;AAClF,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,6BAAA,EAAgC,KAAK,SAAA,CAAU,KAAK,CAAC,CAAA,CAAE,CAAA;AAAA,IACzE;AAEA,IAAA,OAAO,SAAS,IAAA,EAAK;AAAA,EACvB;AAAA,EAEQ,gBAAA,GAA2B;AACjC,IAAA,MAAM,IAAA,uBAAW,IAAA,EAAK;AACtB,IAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,WAAA,EAAY,GAAI,CAAC,CAAA;AACvC,IAAA,OAAO,KAAK,WAAA,EAAY,CAAE,KAAA,CAAM,GAAG,EAAE,CAAC,CAAA;AAAA,EACxC;AACF","file":"chunk-RIZZPLLB.js","sourcesContent":["/**\n * Crossmint Verifiable Credentials API Client\n * \n * Integrates with Crossmint's VC system to issue and verify credentials.\n * Ported from packages/web for SDK consumption.\n */\n\n// Constants\nconst CROSSMINT_STAGING_URL = 'https://staging.crossmint.com'\nconst CROSSMINT_PROD_URL = 'https://www.crossmint.com'\n\n// GhostSpeak credential type names (registered with Crossmint)\nexport const GHOSTSPEAK_CREDENTIAL_TYPES = {\n AGENT_IDENTITY: 'GhostSpeakAgentIdentity',\n REPUTATION_SCORE: 'GhostSpeakReputation',\n JOB_COMPLETION: 'GhostSpeakJobCompletion',\n} as const\n\ninterface ActionResponse {\n id: string\n status: string\n data?: {\n collection?: CredentialTemplate\n }\n}\n\ninterface ErrorResponse {\n message?: string\n error?: unknown\n}\n\n// Type definitions\nexport interface CredentialType {\n id: string // e.g., \"crossmint:xxx:MyType\"\n typeSchema: {\n $schema: string\n $id: string\n title: string\n description: string\n type: string\n properties: Record<string, unknown>\n }\n}\n\nexport interface CredentialTemplate {\n id: string\n metadata: {\n name: string\n description: string\n imageUrl: string\n }\n fungibility: string\n onChain: {\n chain: string\n type: string\n }\n actionId: string\n}\n\nexport interface IssuedCredential {\n id: string\n credentialId: string\n onChain: {\n status: 'pending' | 'completed'\n chain: string\n contractAddress: string\n tokenId?: string\n }\n actionId: string\n}\n\nexport interface VerificationResult {\n isValid: boolean\n errors?: string[]\n}\n\nexport interface CrossmintClientOptions {\n apiKey: string\n environment?: 'staging' | 'production'\n chain?: 'base-sepolia' | 'polygon-amoy' | 'ethereum-sepolia' | 'base' | 'polygon' | 'ethereum'\n}\n\n/**\n * Crossmint Verifiable Credentials Client\n * \n * Handles the complete credential lifecycle:\n * 1. Create credential types (JSON schemas)\n * 2. Create credential templates (on-chain configuration)\n * 3. Issue credentials to recipients\n * 4. Retrieve credentials\n * 5. Verify credentials\n * 6. Revoke credentials\n * \n * NOTE: Crossmint VCs are only supported on EVM chains.\n */\nexport class CrossmintVCClient {\n private apiKey: string\n private baseUrl: string\n private chain: string\n\n constructor(options: CrossmintClientOptions) {\n this.apiKey = options.apiKey\n this.baseUrl = options.environment === 'production' \n ? CROSSMINT_PROD_URL \n : CROSSMINT_STAGING_URL\n this.chain = options.chain || 'base-sepolia'\n }\n\n // ===================================\n // Types & Templates\n // ===================================\n\n /**\n * Create the GhostSpeak Agent Identity credential type\n */\n async createAgentIdentityType(): Promise<CredentialType> {\n const typeName = GHOSTSPEAK_CREDENTIAL_TYPES.AGENT_IDENTITY\n const schema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'GhostSpeak Agent Identity',\n description: 'Verified AI agent identity on the GhostSpeak Protocol',\n type: 'object',\n properties: {\n credentialSubject: {\n type: 'object',\n properties: {\n agentId: { type: 'string' },\n owner: { type: 'string' },\n capabilities: { type: 'array', items: { type: 'string' } },\n registeredAt: { type: 'string' },\n reputationScore: { type: 'number' },\n totalJobsCompleted: { type: 'integer' },\n verified: { type: 'boolean' },\n id: { type: 'string' }, // Auto-added by Crossmint\n },\n required: ['agentId', 'owner', 'capabilities', 'registeredAt', 'verified'],\n additionalProperties: false,\n },\n },\n }\n return this.createCredentialType(typeName, schema)\n }\n\n /**\n * Create the GhostSpeak Reputation credential type\n */\n async createReputationType(): Promise<CredentialType> {\n const typeName = GHOSTSPEAK_CREDENTIAL_TYPES.REPUTATION_SCORE\n const schema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'GhostSpeak Reputation',\n description: 'Verified reputation score for GhostSpeak users',\n type: 'object',\n properties: {\n credentialSubject: {\n type: 'object',\n properties: {\n userId: { type: 'string' },\n walletAddress: { type: 'string' },\n reputationScore: { type: 'number' },\n totalTransactions: { type: 'integer' },\n disputeRate: { type: 'number' },\n memberSince: { type: 'string' },\n id: { type: 'string' },\n },\n required: ['userId', 'walletAddress', 'reputationScore', 'memberSince'],\n additionalProperties: false,\n },\n },\n }\n return this.createCredentialType(typeName, schema)\n }\n\n /**\n * Create the GhostSpeak Job Completion credential type\n */\n async createJobCompletionType(): Promise<CredentialType> {\n const typeName = GHOSTSPEAK_CREDENTIAL_TYPES.JOB_COMPLETION\n const schema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'GhostSpeak Job Completion',\n description: 'Certificate of successful job completion on GhostSpeak',\n type: 'object',\n properties: {\n credentialSubject: {\n type: 'object',\n properties: {\n jobId: { type: 'string' },\n agentId: { type: 'string' },\n clientAddress: { type: 'string' },\n completedAt: { type: 'string' },\n amountPaid: { type: 'string' },\n rating: { type: 'integer' },\n review: { type: 'string' },\n id: { type: 'string' },\n },\n required: ['jobId', 'agentId', 'clientAddress', 'completedAt', 'amountPaid', 'rating'],\n additionalProperties: false,\n },\n },\n }\n return this.createCredentialType(typeName, schema)\n }\n\n /**\n * Initialize all GhostSpeak credential types\n */\n async initializeAllTypes(): Promise<{\n agentIdentity: CredentialType\n reputation: CredentialType\n jobCompletion: CredentialType\n }> {\n const [agentIdentity, reputation, jobCompletion] = await Promise.all([\n this.createAgentIdentityType(),\n this.createReputationType(),\n this.createJobCompletionType(),\n ])\n\n return { agentIdentity, reputation, jobCompletion }\n }\n\n /**\n * Create all GhostSpeak credential templates\n */\n async createAllTemplates(types: {\n agentIdentity: CredentialType\n reputation: CredentialType\n jobCompletion: CredentialType\n }): Promise<{\n agentIdentityTemplate: CredentialTemplate\n reputationTemplate: CredentialTemplate\n jobCompletionTemplate: CredentialTemplate\n }> {\n const [agentIdentityTemplate, reputationTemplate, jobCompletionTemplate] = await Promise.all([\n this.createTemplate(types.agentIdentity.id, {\n name: 'GhostSpeak Agent Identity',\n description: 'Verified AI agent identity on the GhostSpeak Protocol',\n imageUrl: 'https://www.ghostspeak.io/assets/credential-agent.png',\n }),\n this.createTemplate(types.reputation.id, {\n name: 'GhostSpeak Reputation',\n description: 'Verified reputation score for GhostSpeak users',\n imageUrl: 'https://www.ghostspeak.io/assets/credential-reputation.png',\n }),\n this.createTemplate(types.jobCompletion.id, {\n name: 'GhostSpeak Job Completion Certificate',\n description: 'Certificate of successful job completion on GhostSpeak',\n imageUrl: 'https://www.ghostspeak.io/assets/credential-job.png',\n }),\n ])\n\n return { agentIdentityTemplate, reputationTemplate, jobCompletionTemplate }\n }\n\n /**\n * Issue an agent identity credential\n */\n async issueAgentCredential(\n templateId: string,\n recipientEmail: string,\n subject: Record<string, unknown>,\n expiresAt?: string\n ): Promise<IssuedCredential> {\n return this.issueCredential(templateId, recipientEmail, subject, expiresAt)\n }\n\n /**\n * Issue a reputation credential\n */\n async issueReputationCredential(\n templateId: string,\n recipientEmail: string,\n subject: Record<string, unknown>,\n expiresAt?: string\n ): Promise<IssuedCredential> {\n return this.issueCredential(templateId, recipientEmail, subject, expiresAt)\n }\n\n /**\n * Issue a job completion credential\n */\n async issueJobCompletionCredential(\n templateId: string,\n recipientEmail: string,\n subject: Record<string, unknown>,\n expiresAt?: string\n ): Promise<IssuedCredential> {\n return this.issueCredential(templateId, recipientEmail, subject, expiresAt)\n }\n\n\n\n /**\n * Create a credential type (JSON Schema)\n */\n async createCredentialType(typeName: string, schema: Record<string, unknown>): Promise<CredentialType> {\n const response = await fetch(\n `${this.baseUrl}/api/v1-alpha1/credentials/types/${typeName}`,\n {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-KEY': this.apiKey,\n },\n body: JSON.stringify(schema),\n }\n )\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({ message: response.statusText })) as ErrorResponse\n throw new Error(`Failed to create credential type: ${JSON.stringify(error)}`)\n }\n\n return response.json() as Promise<CredentialType>\n }\n\n /**\n * Create a credential template\n */\n async createTemplate(\n typeId: string,\n metadata: {\n name: string\n description: string\n imageUrl: string\n }\n ): Promise<CredentialTemplate> {\n // Note: Ensuring trailing slash\n const response = await fetch(\n `${this.baseUrl}/api/v1-alpha1/credentials/templates/`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-KEY': this.apiKey,\n },\n body: JSON.stringify({\n credentials: {\n type: typeId,\n encryption: 'none',\n storage: 'crossmint',\n },\n metadata,\n chain: this.chain,\n }),\n }\n )\n\n if (!response.ok) {\n const text = await response.text();\n try {\n const error = JSON.parse(text);\n throw new Error(`Failed to create template: ${JSON.stringify(error)}`);\n } catch (e) {\n throw new Error(`Failed to create template (${response.status}): ${text}`);\n }\n }\n\n const action = await response.json() as ActionResponse\n // console.log(`Template Creation Action Started: ${action.id}`)\n \n // Poll for completion\n const result = await this.waitForAction(action.id)\n \n // Return the created template\n if (result.data && result.data.collection) {\n return result.data.collection;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (result.data || result) as any\n }\n\n /**\n * Poll an action until completion\n */\n async waitForAction(actionId: string): Promise<ActionResponse> {\n let retries = 0;\n while (retries < 60) { // 2 minutes timeout\n await new Promise(resolve => setTimeout(resolve, 2000));\n \n const response = await fetch(\n `${this.baseUrl}/api/2022-06-09/actions/${actionId}`,\n {\n headers: {\n 'X-API-KEY': this.apiKey,\n },\n }\n )\n\n if (!response.ok) {\n throw new Error(`Failed to poll action: ${response.statusText}`)\n }\n\n const action = await response.json() as ActionResponse\n \n if (action.status === 'succeeded') {\n return action\n }\n \n if (action.status === 'failed') {\n throw new Error(`Action failed: ${JSON.stringify(action)}`)\n }\n \n retries++\n }\n \n throw new Error('Action polling timed out')\n }\n\n // ===================================\n // Issuance\n // ===================================\n\n /**\n * Issue a credential using a template\n */\n async issueCredential(\n templateId: string,\n recipientEmail: string,\n subject: Record<string, unknown>,\n expiresAt?: string\n ): Promise<IssuedCredential> {\n const response = await fetch(\n `${this.baseUrl}/api/v1-alpha1/credentials/templates/${templateId}/vcs`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-KEY': this.apiKey,\n },\n body: JSON.stringify({\n recipient: `email:${recipientEmail}:${this.chain}`,\n credential: {\n subject,\n expiresAt: expiresAt || this.getDefaultExpiry(),\n },\n }),\n }\n )\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({ message: response.statusText })) as ErrorResponse\n throw new Error(`Failed to issue credential: ${JSON.stringify(error)}`)\n }\n\n return response.json() as Promise<IssuedCredential>\n }\n\n // ===================================\n // Verification & Retrieval\n // ===================================\n\n async getCredential(credentialId: string): Promise<unknown> {\n const response = await fetch(\n `${this.baseUrl}/api/v1-alpha1/credentials/${credentialId}`,\n {\n headers: {\n 'X-API-KEY': this.apiKey,\n },\n }\n )\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({ message: response.statusText })) as ErrorResponse\n throw new Error(`Failed to get credential: ${JSON.stringify(error)}`)\n }\n\n return response.json() as Promise<unknown>\n }\n\n async verifyCredential(credential: unknown): Promise<VerificationResult> {\n const response = await fetch(\n `${this.baseUrl}/api/v1-alpha1/credentials/verification/verify`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-KEY': this.apiKey,\n },\n body: JSON.stringify({ credential }),\n }\n )\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({ message: response.statusText })) as ErrorResponse\n throw new Error(`Failed to verify credential: ${JSON.stringify(error)}`)\n }\n\n return response.json() as Promise<VerificationResult>\n }\n\n async revokeCredential(credentialId: string): Promise<{ actionId: string; status: string }> {\n const response = await fetch(\n `${this.baseUrl}/api/v1-alpha1/credentials/${credentialId}`,\n {\n method: 'DELETE',\n headers: {\n 'X-API-KEY': this.apiKey,\n },\n }\n )\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({ message: response.statusText })) as ErrorResponse\n throw new Error(`Failed to revoke credential: ${JSON.stringify(error)}`)\n }\n\n return response.json() as Promise<{ actionId: string; status: string }>\n }\n\n private getDefaultExpiry(): string {\n const date = new Date()\n date.setFullYear(date.getFullYear() + 1)\n return date.toISOString().split('T')[0]\n }\n}\n"]}
package/dist/client.d.ts CHANGED
@@ -2,6 +2,7 @@ import './GovernanceModule-DQYYys-H.js';
2
2
  import '@solana/kit';
3
3
  import './ipfs-types-BOt9ZNg4.js';
4
4
  import '@solana/addresses';
5
- export { G as GhostSpeakClient, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-hsGuGg__.js';
5
+ export { G as GhostSpeakClient, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-D_66Uzsf.js';
6
6
  import './types.js';
7
7
  import './multisigConfig-BzEhy6jy.js';
8
+ import './credentials.js';
package/dist/client.js CHANGED
@@ -1,13 +1,14 @@
1
- export { GhostSpeakClient, GhostSpeakClient_default as default, lamportsToSol, sol } from './chunk-FKRN4PW5.js';
1
+ export { GhostSpeakClient, GhostSpeakClient_default as default, lamportsToSol, sol } from './chunk-APCKGD23.js';
2
2
  import './chunk-TVVGXYCI.js';
3
3
  import './chunk-ZGP5552B.js';
4
4
  import './chunk-OWYHJG6H.js';
5
5
  import './chunk-COGZFWOT.js';
6
+ import './chunk-GMHIUK2R.js';
6
7
  import './chunk-ASQXX4IT.js';
7
8
  import './chunk-RERCHKZP.js';
8
9
  import './chunk-RDDPOFR5.js';
9
10
  import './chunk-SRS2SKFS.js';
10
- import './chunk-GMHIUK2R.js';
11
+ import './chunk-RIZZPLLB.js';
11
12
  import './chunk-NSBPE2FW.js';
12
13
  //# sourceMappingURL=client.js.map
13
14
  //# sourceMappingURL=client.js.map
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Crossmint Verifiable Credentials API Client
3
+ *
4
+ * Integrates with Crossmint's VC system to issue and verify credentials.
5
+ * Ported from packages/web for SDK consumption.
6
+ */
7
+ declare const GHOSTSPEAK_CREDENTIAL_TYPES: {
8
+ readonly AGENT_IDENTITY: "GhostSpeakAgentIdentity";
9
+ readonly REPUTATION_SCORE: "GhostSpeakReputation";
10
+ readonly JOB_COMPLETION: "GhostSpeakJobCompletion";
11
+ };
12
+ interface ActionResponse {
13
+ id: string;
14
+ status: string;
15
+ data?: {
16
+ collection?: CredentialTemplate;
17
+ };
18
+ }
19
+ interface CredentialType {
20
+ id: string;
21
+ typeSchema: {
22
+ $schema: string;
23
+ $id: string;
24
+ title: string;
25
+ description: string;
26
+ type: string;
27
+ properties: Record<string, unknown>;
28
+ };
29
+ }
30
+ interface CredentialTemplate {
31
+ id: string;
32
+ metadata: {
33
+ name: string;
34
+ description: string;
35
+ imageUrl: string;
36
+ };
37
+ fungibility: string;
38
+ onChain: {
39
+ chain: string;
40
+ type: string;
41
+ };
42
+ actionId: string;
43
+ }
44
+ interface IssuedCredential {
45
+ id: string;
46
+ credentialId: string;
47
+ onChain: {
48
+ status: 'pending' | 'completed';
49
+ chain: string;
50
+ contractAddress: string;
51
+ tokenId?: string;
52
+ };
53
+ actionId: string;
54
+ }
55
+ interface VerificationResult {
56
+ isValid: boolean;
57
+ errors?: string[];
58
+ }
59
+ interface CrossmintClientOptions {
60
+ apiKey: string;
61
+ environment?: 'staging' | 'production';
62
+ chain?: 'base-sepolia' | 'polygon-amoy' | 'ethereum-sepolia' | 'base' | 'polygon' | 'ethereum';
63
+ }
64
+ /**
65
+ * Crossmint Verifiable Credentials Client
66
+ *
67
+ * Handles the complete credential lifecycle:
68
+ * 1. Create credential types (JSON schemas)
69
+ * 2. Create credential templates (on-chain configuration)
70
+ * 3. Issue credentials to recipients
71
+ * 4. Retrieve credentials
72
+ * 5. Verify credentials
73
+ * 6. Revoke credentials
74
+ *
75
+ * NOTE: Crossmint VCs are only supported on EVM chains.
76
+ */
77
+ declare class CrossmintVCClient {
78
+ private apiKey;
79
+ private baseUrl;
80
+ private chain;
81
+ constructor(options: CrossmintClientOptions);
82
+ /**
83
+ * Create the GhostSpeak Agent Identity credential type
84
+ */
85
+ createAgentIdentityType(): Promise<CredentialType>;
86
+ /**
87
+ * Create the GhostSpeak Reputation credential type
88
+ */
89
+ createReputationType(): Promise<CredentialType>;
90
+ /**
91
+ * Create the GhostSpeak Job Completion credential type
92
+ */
93
+ createJobCompletionType(): Promise<CredentialType>;
94
+ /**
95
+ * Initialize all GhostSpeak credential types
96
+ */
97
+ initializeAllTypes(): Promise<{
98
+ agentIdentity: CredentialType;
99
+ reputation: CredentialType;
100
+ jobCompletion: CredentialType;
101
+ }>;
102
+ /**
103
+ * Create all GhostSpeak credential templates
104
+ */
105
+ createAllTemplates(types: {
106
+ agentIdentity: CredentialType;
107
+ reputation: CredentialType;
108
+ jobCompletion: CredentialType;
109
+ }): Promise<{
110
+ agentIdentityTemplate: CredentialTemplate;
111
+ reputationTemplate: CredentialTemplate;
112
+ jobCompletionTemplate: CredentialTemplate;
113
+ }>;
114
+ /**
115
+ * Issue an agent identity credential
116
+ */
117
+ issueAgentCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
118
+ /**
119
+ * Issue a reputation credential
120
+ */
121
+ issueReputationCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
122
+ /**
123
+ * Issue a job completion credential
124
+ */
125
+ issueJobCompletionCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
126
+ /**
127
+ * Create a credential type (JSON Schema)
128
+ */
129
+ createCredentialType(typeName: string, schema: Record<string, unknown>): Promise<CredentialType>;
130
+ /**
131
+ * Create a credential template
132
+ */
133
+ createTemplate(typeId: string, metadata: {
134
+ name: string;
135
+ description: string;
136
+ imageUrl: string;
137
+ }): Promise<CredentialTemplate>;
138
+ /**
139
+ * Poll an action until completion
140
+ */
141
+ waitForAction(actionId: string): Promise<ActionResponse>;
142
+ /**
143
+ * Issue a credential using a template
144
+ */
145
+ issueCredential(templateId: string, recipientEmail: string, subject: Record<string, unknown>, expiresAt?: string): Promise<IssuedCredential>;
146
+ getCredential(credentialId: string): Promise<unknown>;
147
+ verifyCredential(credential: unknown): Promise<VerificationResult>;
148
+ revokeCredential(credentialId: string): Promise<{
149
+ actionId: string;
150
+ status: string;
151
+ }>;
152
+ private getDefaultExpiry;
153
+ }
154
+
155
+ export { type CredentialTemplate, type CredentialType, type CrossmintClientOptions, CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES, type IssuedCredential, type VerificationResult };
@@ -0,0 +1,4 @@
1
+ export { CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES } from './chunk-RIZZPLLB.js';
2
+ import './chunk-NSBPE2FW.js';
3
+ //# sourceMappingURL=credentials.js.map
4
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"credentials.js"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { c as Credential, a as CredentialKind, C as CredentialModule, b as CredentialStatus, d as CredentialTemplate, g as CrossmintClientOptions, h as CrossmintCredentialType, i as CrossmintIssuedCredential, f as CrossmintVCClient, j as GHOSTSPEAK_CREDENTIAL_TYPES, G as GhostSpeakClient, I as IssuedCredentialResult, M as MultisigModule, e as UnifiedCredentialConfig, U as UnifiedCredentialService, W as W3CVerifiableCredential, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-hsGuGg__.js';
1
+ export { c as Credential, a as CredentialKind, C as CredentialModule, b as CredentialStatus, d as CredentialTemplate, G as GhostSpeakClient, I as IssuedCredentialResult, M as MultisigModule, e as UnifiedCredentialConfig, U as UnifiedCredentialService, W as W3CVerifiableCredential, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-D_66Uzsf.js';
2
2
  import { ReadonlyUint8Array, Address, OptionOrNullable, Option, TransactionSigner, AccountMeta, Instruction, InstructionWithData, InstructionWithAccounts, WritableAccount, ReadonlySignerAccount, AccountSignerMeta, ReadonlyAccount, WritableSignerAccount, Slot, Lamports, Epoch, Base58EncodedBytes, Base64EncodedBytes, TransactionError, Base64EncodedWireTransaction, Signature, TransactionMessageBytesBase64, Rpc, SolanaRpcApi, GetTransactionApi, Commitment as Commitment$1, KeyPairSigner } from '@solana/kit';
3
3
  export { TransactionSigner, address, createKeyPairSignerFromBytes, createSolanaRpc, generateKeyPairSigner } from '@solana/kit';
4
4
  export { AddressOf, Agent, AgentCreationParams, AgentEvent, AgentMetadata, AgentType, Attachment, Channel, ChannelCreationParams, ChannelEvent, ChannelType, CommunicationMessage, CommunicationSession, ConfidentialBalance, ConfidentialTransfer, CreateCommunicationSessionParams, DeepPartial, ErrorCode, Escrow, EscrowCreationParams, EscrowEvent, Event, FilterOptions, Message, MessageType, Milestone, PaginationOptions, ParticipantStatus, QueryResult, Rating, Reaction, Reputation, Result, SDKError, SendCommunicationMessageParams, SimulationResult, Transaction, TransferProof, UpdateParticipantStatusParams, WithAddress, isError, isSuccess, unwrap } from './types.js';
@@ -8,6 +8,7 @@ export { t as A2AMessage, s as A2ASession, n as AgentAccount, m as AgentRegistra
8
8
  import { Address as Address$1 } from '@solana/addresses';
9
9
  import { m as ChannelTypeArgs, n as MessageTypeArgs } from './system-addresses-BFNLEbFx.js';
10
10
  export { c as ASSOCIATED_TOKEN_PROGRAM_ADDRESS, A as AgentModule, C as ChannelModule, o as CreateWorkOrderParams, D as DisputeStatus, E as EscrowModule, G as GHOSTSPEAK_PROGRAM_ID, g as GeneratedChannelType, e as GeneratedEscrowStatus, h as GeneratedMessageType, k as GeneratedWorkOrderStatus, a as NATIVE_MINT_ADDRESS, R as RejectDeliveryParams, S as SubmitDeliveryParams, b as TOKEN_2022_PROGRAM_ADDRESS, T as TOKEN_PROGRAM_ADDRESS, V as VerifyDeliveryParams, W as WorkOrderModule, k as WorkOrderStatus, u as getChannelDecoder, p as getCreateWorkOrderInstruction, t as getEscrowDecoder, v as getMessageDecoder, s as getRejectWorkDeliveryInstruction, q as getSubmitWorkDeliveryInstruction, r as getVerifyWorkDeliveryInstruction, x as getWorkDeliveryDecoder, w as getWorkOrderDecoder } from './system-addresses-BFNLEbFx.js';
11
+ export { CrossmintClientOptions, CredentialType as CrossmintCredentialType, IssuedCredential as CrossmintIssuedCredential, CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES } from './credentials.js';
11
12
  import { EventEmitter } from 'node:events';
12
13
  import { I as IPFSClient, C as ClientEncryptionService } from './feature-flags-V722ZuXO.js';
13
14
  export { r as AccountInspectionResult, m as AgentDiscoveryClient, a8 as AssociatedTokenAccount, Q as BatchDiagnosticReport, aK as ClientEncryptionOptions, aa as ConfidentialTransferConfig, av as ConfidentialTransferProof, aB as CpiGuardConfig, P as DiagnosticReport, D as DiscriminatorValidationResult, aI as EncryptedData, aN as FeatureFlagManager, aO as FeatureFlags, G as GhostSpeakSDKError, aD as ImmutableOwnerConfig, ab as InterestBearingConfig, aw as InterestCalculation, L as LegacyAgentData, aA as MetadataPointerConfig, M as MigrationPlan, F as MigrationResult, aC as NonTransferableConfig, aJ as PrivateMetadata, at as TokenAccountState, a1 as TokenExtension, az as TokenMetadata, T as TokenProgram, au as TransferFeeCalculation, a9 as TransferFeeConfig, ay as TransferHookContext, ax as TransferHookInstruction, ap as basisPointsToPercentage, ai as calculateCompoundInterest, ah as calculateInterest, ad as calculateRequiredAmountForNetTransfer, ac as calculateTransferFee, an as canTransfer, n as createAgentDiscoveryClient, o as createDiscriminatorErrorMessage, c as createErrorContext, u as createMigrationPlan, x as createMigrationReport, ak as createTransferHookInstruction, d as deriveAssociatedTokenAddress, aE as deriveMultisigPda, aF as deriveProposalPda, W as deriveSplTokenAssociatedTokenAddress, X as deriveToken2022AssociatedTokenAddress, am as deserializeTokenMetadata, a as detectTokenProgram, K as diagnoseAccountFromChain, N as diagnoseBatchFromChain, e as enhanceTransactionError, ae as estimateAccumulatedFees, as as estimateComputeUnits, O as exportDiagnosticReport, V as extractInstructionName, B as extractLegacyData, ar as formatBasisPoints, f as formatTokenAmount, af as generateConfidentialTransferProof, aG as generateLocalPrivacyProof, Z as getAllAssociatedTokenAddresses, Y as getAssociatedTokenAccount, a6 as getConfidentialTransferConfig, aL as getFeatureFlags, a7 as getInterestBearingConfig, z as getMigrationInstructions, ao as getRequiredExtensions, $ as getTokenProgramAddress, a0 as getTokenProgramFromAddress, g as getTokenProgramType, a5 as getTransferFeeConfig, a3 as hasConfidentialTransferExtension, a4 as hasInterestBearingExtension, a2 as hasTransferFeeExtension, q as inspectAccountData, aM as isFeatureEnabled, i as isToken2022Mint, S as logEnhancedError, p as parseTokenAmount, aq as percentageToBasisPoints, H as runAccountDiagnostics, J as runBatchDiagnostics, s as safeDecodeAgent, al as serializeTokenMetadata, y as simulateMigration, v as validateAccountDiscriminator, _ as validateAssociatedTokenAddress, U as validatePreconditions, aj as validateTransferHookInstruction, ag as verifyConfidentialTransferProof, aH as verifyLocalPrivacyProof, w as withEnhancedErrors, R as withEnhancedErrorsSync } from './feature-flags-V722ZuXO.js';
package/dist/index.js CHANGED
@@ -1,21 +1,22 @@
1
1
  export { WorkOrderModule } from './chunk-ZWOYNHVK.js';
2
- export { CredentialKind, CredentialModule, CredentialStatus, CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES, GhostSpeakClient, MultisigModule, UnifiedCredentialService, GhostSpeakClient_default as default, lamportsToSol, sol } from './chunk-FKRN4PW5.js';
2
+ export { CredentialKind, CredentialModule, CredentialStatus, GhostSpeakClient, MultisigModule, UnifiedCredentialService, GhostSpeakClient_default as default, lamportsToSol, sol } from './chunk-APCKGD23.js';
3
3
  export { AgentModule, BaseModule, ChannelModule, DEFAULT_IPFS_CONFIG, EscrowModule, GHOSTSPEAK_PROGRAM_ID, GovernanceModule, IPFSUtils, InstructionBuilder, MarketplaceModule, RpcClient, Token2022Module, createIPFSUtils, createMetadataUri, determineStorageMethod } from './chunk-TVVGXYCI.js';
4
4
  export { AccountNotFoundError, ErrorFactory, ErrorHandler, GhostSpeakError, InsufficientBalanceError, InvalidInputError, NetworkError, SimulationFailedError, TimeoutError, TransactionFailedError, ValidationError } from './chunk-5DMB3UAV.js';
5
5
  export { decrypt, elgamal_exports as elgamal, encrypt, generateKeypair, generateTransferProof, generateWithdrawProof, isWasmAvailable, loadWasmModule, wasm_bridge_exports as wasmBridge } from './chunk-UJUGGLMT.js';
6
- import { getFeatureFlags, ClientEncryptionService } from './chunk-V3SOFUAZ.js';
7
- export { ClientEncryptionService, FeatureFlagManager, TokenAccountState, TokenExtension, TokenProgram, basisPointsToPercentage, calculateCompoundInterest, calculateInterest, calculateRequiredAmountForNetTransfer, calculateTransferFee, canTransfer, createDiscriminatorErrorMessage, createMigrationPlan, createMigrationReport, createTransferHookInstruction, deriveAssociatedTokenAddress, deriveSplTokenAssociatedTokenAddress, deriveToken2022AssociatedTokenAddress, deserializeTokenMetadata, detectTokenProgram, diagnoseAccountFromChain, diagnoseBatchFromChain, estimateAccumulatedFees, estimateComputeUnits, exportDiagnosticReport, extractLegacyData, formatBasisPoints, formatTokenAmount, generateConfidentialTransferProof, generateLocalPrivacyProof, getAllAssociatedTokenAddresses, getAssociatedTokenAccount, getConfidentialTransferConfig, getFeatureFlags, getInterestBearingConfig, getMigrationInstructions, getRequiredExtensions, getTokenProgramAddress, getTokenProgramFromAddress, getTokenProgramType, getTransferFeeConfig, hasConfidentialTransferExtension, hasInterestBearingExtension, hasTransferFeeExtension, inspectAccountData, isFeatureEnabled, isToken2022Mint, parseTokenAmount, percentageToBasisPoints, runAccountDiagnostics, runBatchDiagnostics, safeDecodeAgent, serializeTokenMetadata, simulateMigration, validateAccountDiscriminator, validateAssociatedTokenAddress, validateTransferHookInstruction, verifyConfidentialTransferProof, verifyLocalPrivacyProof } from './chunk-V3SOFUAZ.js';
6
+ import { getFeatureFlags, ClientEncryptionService } from './chunk-F3DZMBUA.js';
7
+ export { ClientEncryptionService, FeatureFlagManager, TokenAccountState, TokenExtension, TokenProgram, basisPointsToPercentage, calculateCompoundInterest, calculateInterest, calculateRequiredAmountForNetTransfer, calculateTransferFee, canTransfer, createDiscriminatorErrorMessage, createMigrationPlan, createMigrationReport, createTransferHookInstruction, deriveAssociatedTokenAddress, deriveSplTokenAssociatedTokenAddress, deriveToken2022AssociatedTokenAddress, deserializeTokenMetadata, detectTokenProgram, diagnoseAccountFromChain, diagnoseBatchFromChain, estimateAccumulatedFees, estimateComputeUnits, exportDiagnosticReport, extractLegacyData, formatBasisPoints, formatTokenAmount, generateConfidentialTransferProof, generateLocalPrivacyProof, getAllAssociatedTokenAddresses, getAssociatedTokenAccount, getConfidentialTransferConfig, getFeatureFlags, getInterestBearingConfig, getMigrationInstructions, getRequiredExtensions, getTokenProgramAddress, getTokenProgramFromAddress, getTokenProgramType, getTransferFeeConfig, hasConfidentialTransferExtension, hasInterestBearingExtension, hasTransferFeeExtension, inspectAccountData, isFeatureEnabled, isToken2022Mint, parseTokenAmount, percentageToBasisPoints, runAccountDiagnostics, runBatchDiagnostics, safeDecodeAgent, serializeTokenMetadata, simulateMigration, validateAccountDiscriminator, validateAssociatedTokenAddress, validateTransferHookInstruction, verifyConfidentialTransferProof, verifyLocalPrivacyProof } from './chunk-F3DZMBUA.js';
8
8
  import './chunk-IAWBZYPE.js';
9
9
  export { deriveMultisigPda, deriveProposalPda } from './chunk-ZGP5552B.js';
10
10
  export { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, GhostSpeakSDKError, INSTRUCTION_MAPPINGS, IPFSClient, InstructionValidationError, NATIVE_MINT_ADDRESS, TOKEN_2022_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS, createAccountMismatchError, createErrorContext, debugInstructionCall, enhanceErrorMessage, enhanceTransactionError, extractInstructionName, generateAccountValidationError, getAccountRequirements, getInstructionMapping, getPDAAccounts, getRequiredSigners, getWritableAccounts, isKnownInstruction, logEnhancedError, validateInstructionAccounts, validatePreconditions, withEnhancedErrors, withEnhancedErrorsSync } from './chunk-OWYHJG6H.js';
11
11
  import { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, getCreateA2aSessionInstructionAsync, fetchA2ASession, getSendA2aMessageInstruction, getUpdateA2aStatusInstruction, fetchMaybeA2ASession, fetchA2AMessage, fetchA2AStatus, getCreateCommunicationSessionInstructionAsync, getSendCommunicationMessageInstruction } from './chunk-COGZFWOT.js';
12
12
  export { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, getAddMessageReactionInstruction, getCancelEscrowInstruction, getChannelDecoder, getCompleteEscrowInstruction, getCreateEnhancedChannelInstructionAsync, getCreateEscrowInstructionAsync, getCreateWorkOrderInstruction, getDisputeEscrowInstruction, getEscrowDecoder, getJoinChannelInstruction, getLeaveChannelInstruction, getMessageDecoder, getProcessPartialRefundInstruction, getProcessPaymentInstruction, getRegisterAgentInstructionAsync, getRejectWorkDeliveryInstruction, getSendEnhancedMessageInstructionAsync, getSubmitWorkDeliveryInstruction, getUpdateChannelSettingsInstruction, getVerifyWorkDeliveryInstruction, getWorkDeliveryDecoder, getWorkOrderDecoder } from './chunk-COGZFWOT.js';
13
+ import { getAgentDecoder, fetchMaybeAgent, getCommunicationSessionDataDecoder } from './chunk-GMHIUK2R.js';
14
+ export { AuctionStatus, AuctionType, DisputeStatus, ParticipantType, ProposalStatus, WorkOrderStatus, getAgentDecoder } from './chunk-GMHIUK2R.js';
13
15
  export { deriveA2AMessagePda, deriveA2ASessionPda, deriveAgentPda, deriveAgentVerificationPda, deriveChannelPda, deriveEscrowPDA, deriveJobApplicationPda, deriveJobPostingPda, derivePaymentPda, deriveServiceListingPda, deriveServicePurchasePda, deriveUserRegistryPda, deriveWorkDeliveryPda, deriveWorkOrderPda, findProgramDerivedAddress } from './chunk-ASQXX4IT.js';
14
16
  import './chunk-RERCHKZP.js';
15
17
  import './chunk-RDDPOFR5.js';
16
18
  export { AgentType, ChannelType, ErrorCode, EscrowStatus, MessageType, isError, isSuccess, unwrap } from './chunk-SRS2SKFS.js';
17
- import { getAgentDecoder, fetchMaybeAgent, getCommunicationSessionDataDecoder } from './chunk-GMHIUK2R.js';
18
- export { AuctionStatus, AuctionType, DisputeStatus, ParticipantType, ProposalStatus, WorkOrderStatus, getAgentDecoder } from './chunk-GMHIUK2R.js';
19
+ export { CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES } from './chunk-RIZZPLLB.js';
19
20
  import { __export, __require } from './chunk-NSBPE2FW.js';
20
21
  import { createSolanaRpc, lamports, pipe, createTransactionMessage, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, appendTransactionMessageInstructions, signTransactionMessageWithSigners, getBase64EncodedWireTransaction, createKeyPairSignerFromBytes, generateKeyPairSigner, appendTransactionMessageInstruction, getProgramDerivedAddress, getBytesEncoder, getAddressEncoder } from '@solana/kit';
21
22
  export { address, createKeyPairSignerFromBytes, createSolanaRpc, generateKeyPairSigner } from '@solana/kit';