@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
@@ -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-UP2VWCW5.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/crypto.js CHANGED
@@ -1,4 +1,4 @@
1
- export { decrypt, elgamal_exports as elgamal, encrypt, generateKeypair, generateTransferProof, generateWithdrawProof, isWasmAvailable, loadWasmModule, wasm_bridge_exports as wasmBridge } from './chunk-UJUGGLMT.js';
2
- import './chunk-NSBPE2FW.js';
1
+ export { decrypt, elgamal_exports as elgamal, encrypt, generateKeypair, generateTransferProof, generateWithdrawProof, isWasmAvailable, loadWasmModule, wasm_bridge_exports as wasmBridge } from './chunk-VQZQCHUT.js';
2
+ import './chunk-UP2VWCW5.js';
3
3
  //# sourceMappingURL=crypto.js.map
4
4
  //# sourceMappingURL=crypto.js.map
package/dist/errors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { AccountNotFoundError, ErrorFactory, ErrorHandler, GhostSpeakError, InsufficientBalanceError, InvalidInputError, NetworkError, SimulationFailedError, TimeoutError, TransactionFailedError, ValidationError, errors_default as default } from './chunk-5DMB3UAV.js';
2
2
  import './chunk-SRS2SKFS.js';
3
- import './chunk-NSBPE2FW.js';
3
+ import './chunk-UP2VWCW5.js';
4
4
  //# sourceMappingURL=errors.js.map
5
5
  //# sourceMappingURL=errors.js.map