@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.
- package/README.md +152 -30
- package/dist/GhostSpeakClient-CWmGaM9Q.d.ts +1007 -0
- package/dist/StakingModule-C5rzuOWb.d.ts +2526 -0
- package/dist/{agent-M74TCRON.js → agent-5YLZ7DAC.js} +4 -4
- package/dist/{agent-M74TCRON.js.map → agent-5YLZ7DAC.js.map} +1 -1
- package/dist/batch-operations-45CQFEID.js +4 -0
- package/dist/batch-operations-45CQFEID.js.map +1 -0
- package/dist/browser.d.ts +45 -554
- package/dist/browser.js +15 -842
- package/dist/browser.js.map +1 -1
- package/dist/chunk-AL3HQN73.js +754 -0
- package/dist/chunk-AL3HQN73.js.map +1 -0
- package/dist/chunk-BF3IQ35I.js +284 -0
- package/dist/chunk-BF3IQ35I.js.map +1 -0
- package/dist/chunk-BQDGRTVP.js +168 -0
- package/dist/chunk-BQDGRTVP.js.map +1 -0
- package/dist/chunk-C5CDA3WX.js +7314 -0
- package/dist/chunk-C5CDA3WX.js.map +1 -0
- package/dist/chunk-E3FD2CNY.js +1869 -0
- package/dist/chunk-E3FD2CNY.js.map +1 -0
- package/dist/{chunk-V3SOFUAZ.js → chunk-G7S6B6WB.js} +327 -493
- package/dist/chunk-G7S6B6WB.js.map +1 -0
- package/dist/chunk-IHVDQ4YI.js +4231 -0
- package/dist/chunk-IHVDQ4YI.js.map +1 -0
- package/dist/chunk-JV2SWONF.js +98 -0
- package/dist/chunk-JV2SWONF.js.map +1 -0
- package/dist/chunk-KB6CKIUK.js +231 -0
- package/dist/chunk-KB6CKIUK.js.map +1 -0
- package/dist/chunk-RIZZPLLB.js +343 -0
- package/dist/chunk-RIZZPLLB.js.map +1 -0
- package/dist/chunk-S74EH3KD.js +7890 -0
- package/dist/chunk-S74EH3KD.js.map +1 -0
- package/dist/chunk-SFTSZ3LC.js +156 -0
- package/dist/chunk-SFTSZ3LC.js.map +1 -0
- package/dist/chunk-SKMJJ3Q6.js +125 -0
- package/dist/chunk-SKMJJ3Q6.js.map +1 -0
- package/dist/chunk-SZGFSCNU.js +3682 -0
- package/dist/chunk-SZGFSCNU.js.map +1 -0
- package/dist/chunk-TTB4OS2D.js +69 -0
- package/dist/chunk-TTB4OS2D.js.map +1 -0
- package/dist/chunk-UP2VWCW5.js +33 -0
- package/dist/{chunk-NSBPE2FW.js.map → chunk-UP2VWCW5.js.map} +1 -1
- package/dist/{chunk-UJUGGLMT.js → chunk-VQZQCHUT.js} +5 -5
- package/dist/{chunk-UJUGGLMT.js.map → chunk-VQZQCHUT.js.map} +1 -1
- package/dist/client.d.ts +6 -4
- package/dist/client.js +12 -10
- package/dist/createAgentAuthorization-ULG47ZJI.js +5 -0
- package/dist/createAgentAuthorization-ULG47ZJI.js.map +1 -0
- package/dist/credentials.d.ts +155 -0
- package/dist/credentials.js +4 -0
- package/dist/credentials.js.map +1 -0
- package/dist/crypto.js +2 -2
- package/dist/errors.js +1 -1
- package/dist/feature-flags-B1g0DCPe.d.ts +1181 -0
- package/dist/generated-EG5USUFG.js +9 -0
- package/dist/{generated-VNLHMR6Y.js.map → generated-EG5USUFG.js.map} +1 -1
- package/dist/{ghostspeak_wasm-SB2RPJ3D.js → ghostspeak_wasm-F227HOSM.js} +3 -3
- package/dist/{ghostspeak_wasm-SB2RPJ3D.js.map → ghostspeak_wasm-F227HOSM.js.map} +1 -1
- package/dist/index.d.ts +1210 -1506
- package/dist/index.js +601 -3532
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/minimal/core-minimal.d.ts +2383 -1264
- package/dist/minimal/core-minimal.js +9 -9
- package/dist/minimal/core-minimal.js.map +1 -1
- package/dist/nacl-fast-W5BJ3KZ2.js +2229 -0
- package/dist/nacl-fast-W5BJ3KZ2.js.map +1 -0
- package/dist/pda-4KP7CURF.js +4 -0
- package/dist/pda-4KP7CURF.js.map +1 -0
- package/dist/pda-Ce7VYg4T.d.ts +25 -0
- package/dist/reputation-types-Yebf0Rm_.d.ts +1071 -0
- package/dist/revokeAuthorization-OK7E7OK3.js +5 -0
- package/dist/revokeAuthorization-OK7E7OK3.js.map +1 -0
- package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
- package/dist/types.js +1 -1
- package/dist/updateReputationWithAuth-Y4ONEVSP.js +5 -0
- package/dist/updateReputationWithAuth-Y4ONEVSP.js.map +1 -0
- package/dist/utils.d.ts +69 -203
- package/dist/utils.js +15 -153
- package/dist/utils.js.map +1 -1
- package/package.json +28 -31
- package/dist/.tsbuildinfo +0 -1
- package/dist/GhostSpeakClient-hsGuGg__.d.ts +0 -860
- package/dist/GovernanceModule-DQYYys-H.d.ts +0 -1766
- package/dist/chunk-ASQXX4IT.js +0 -572
- package/dist/chunk-ASQXX4IT.js.map +0 -1
- package/dist/chunk-COGZFWOT.js +0 -19657
- package/dist/chunk-COGZFWOT.js.map +0 -1
- package/dist/chunk-FKRN4PW5.js +0 -1667
- package/dist/chunk-FKRN4PW5.js.map +0 -1
- package/dist/chunk-GMHIUK2R.js +0 -7526
- package/dist/chunk-GMHIUK2R.js.map +0 -1
- package/dist/chunk-IAWBZYPE.js +0 -356
- package/dist/chunk-IAWBZYPE.js.map +0 -1
- package/dist/chunk-NSBPE2FW.js +0 -15
- package/dist/chunk-OWYHJG6H.js +0 -13311
- package/dist/chunk-OWYHJG6H.js.map +0 -1
- package/dist/chunk-RDDPOFR5.js +0 -3
- package/dist/chunk-RDDPOFR5.js.map +0 -1
- package/dist/chunk-RERCHKZP.js +0 -35
- package/dist/chunk-RERCHKZP.js.map +0 -1
- package/dist/chunk-TVVGXYCI.js +0 -2887
- package/dist/chunk-TVVGXYCI.js.map +0 -1
- package/dist/chunk-V3SOFUAZ.js.map +0 -1
- package/dist/chunk-ZGP5552B.js +0 -377
- package/dist/chunk-ZGP5552B.js.map +0 -1
- package/dist/chunk-ZWOYNHVK.js +0 -196
- package/dist/chunk-ZWOYNHVK.js.map +0 -1
- package/dist/dist/.tsbuildinfo +0 -1
- package/dist/elgamal-VZLWB3XK.js +0 -5
- package/dist/elgamal-VZLWB3XK.js.map +0 -1
- package/dist/feature-flags-V722ZuXO.d.ts +0 -3512
- package/dist/generated-VNLHMR6Y.js +0 -5
- package/dist/ipfs-types-BOt9ZNg4.d.ts +0 -592
- package/dist/multisigConfig-BzEhy6jy.d.ts +0 -58
- package/dist/pda-B_nS8SbD.d.ts +0 -114
- package/dist/pda-S4BFJVGE.js +0 -4
- package/dist/pda-S4BFJVGE.js.map +0 -1
- package/dist/system-addresses-BFNLEbFx.d.ts +0 -857
- package/dist/token-2022-rpc-RALH4RK7.js +0 -593
- 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 @@
|
|
|
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-
|
|
2
|
-
import './chunk-
|
|
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-
|
|
3
|
+
import './chunk-UP2VWCW5.js';
|
|
4
4
|
//# sourceMappingURL=errors.js.map
|
|
5
5
|
//# sourceMappingURL=errors.js.map
|