@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.
- package/README.md +295 -30
- package/dist/GhostSpeakClient-bnXwUPHI.d.ts +1011 -0
- package/dist/StakingModule-DunDShLq.d.ts +2446 -0
- package/dist/{agent-M74TCRON.js → agent-S42FIMR7.js} +4 -4
- package/dist/{agent-M74TCRON.js.map → agent-S42FIMR7.js.map} +1 -1
- package/dist/batch-operations-45CQFEID.js +4 -0
- package/dist/batch-operations-45CQFEID.js.map +1 -0
- package/dist/browser-CI5_6Gzk.d.ts +234 -0
- package/dist/browser.d.ts +6 -576
- package/dist/browser.js +15 -842
- package/dist/browser.js.map +1 -1
- package/dist/chunk-46QWY3MG.js +156 -0
- package/dist/chunk-46QWY3MG.js.map +1 -0
- package/dist/{chunk-F3DZMBUA.js → chunk-5QBSC4T4.js} +327 -493
- package/dist/chunk-5QBSC4T4.js.map +1 -0
- package/dist/chunk-5QZVFUXB.js +4176 -0
- package/dist/chunk-5QZVFUXB.js.map +1 -0
- package/dist/chunk-6XCCMJ6M.js +1865 -0
- package/dist/chunk-6XCCMJ6M.js.map +1 -0
- package/dist/chunk-A7ALCVUI.js +98 -0
- package/dist/chunk-A7ALCVUI.js.map +1 -0
- package/dist/chunk-AWMGX3OX.js +814 -0
- package/dist/chunk-AWMGX3OX.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-IQM5RASO.js +8502 -0
- package/dist/chunk-IQM5RASO.js.map +1 -0
- package/dist/chunk-JYXSOXCP.js +3850 -0
- package/dist/chunk-JYXSOXCP.js.map +1 -0
- package/dist/chunk-OXA7MECJ.js +7787 -0
- package/dist/chunk-OXA7MECJ.js.map +1 -0
- package/dist/chunk-QLRWUHN2.js +231 -0
- package/dist/chunk-QLRWUHN2.js.map +1 -0
- package/dist/chunk-SKMJJ3Q6.js +125 -0
- package/dist/chunk-SKMJJ3Q6.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 +4 -4
- package/dist/client.js +11 -10
- package/dist/createAgentAuthorization-KGZNXZBT.js +5 -0
- package/dist/createAgentAuthorization-KGZNXZBT.js.map +1 -0
- package/dist/credentials.js +1 -1
- package/dist/crypto.js +2 -2
- package/dist/errors.js +1 -1
- package/dist/feature-flags-B1g0DCPe.d.ts +1181 -0
- package/dist/generated-QJREJQ2C.js +9 -0
- package/dist/{generated-VNLHMR6Y.js.map → generated-QJREJQ2C.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 +1179 -1498
- package/dist/index.js +356 -3578
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/minimal/core-minimal.d.ts +2446 -1245
- 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-2ZRO6GUZ.js +5 -0
- package/dist/revokeAuthorization-2ZRO6GUZ.js.map +1 -0
- package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
- package/dist/types.js +1 -1
- package/dist/updateReputationWithAuth-PCEUOCFV.js +5 -0
- package/dist/updateReputationWithAuth-PCEUOCFV.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 +27 -34
- package/dist/.tsbuildinfo +0 -1
- package/dist/GhostSpeakClient-D_66Uzsf.d.ts +0 -707
- package/dist/GovernanceModule-DQYYys-H.d.ts +0 -1766
- package/dist/chunk-APCKGD23.js +0 -1328
- package/dist/chunk-APCKGD23.js.map +0 -1
- 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-F3DZMBUA.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-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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AGENT_DISCRIMINATOR, decodeAgent, fetchAgent, fetchAllAgent, fetchAllMaybeAgent, fetchMaybeAgent, getAgentCodec, getAgentDecoder, getAgentDiscriminatorBytes, getAgentEncoder } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
//# sourceMappingURL=agent-
|
|
4
|
-
//# sourceMappingURL=agent-
|
|
1
|
+
export { AGENT_DISCRIMINATOR, decodeAgent, fetchAgent, fetchAllAgent, fetchAllMaybeAgent, fetchMaybeAgent, getAgentCodec, getAgentDecoder, getAgentDiscriminatorBytes, getAgentEncoder } from './chunk-5QZVFUXB.js';
|
|
2
|
+
import './chunk-UP2VWCW5.js';
|
|
3
|
+
//# sourceMappingURL=agent-S42FIMR7.js.map
|
|
4
|
+
//# sourceMappingURL=agent-S42FIMR7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-S42FIMR7.js"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { batchGetAccounts, batchGetAccountsWithRetry, batchGetAndMap, batchGetExistingAccounts, createBatchFetcher } from './chunk-SKMJJ3Q6.js';
|
|
2
|
+
import './chunk-UP2VWCW5.js';
|
|
3
|
+
//# sourceMappingURL=batch-operations-45CQFEID.js.map
|
|
4
|
+
//# sourceMappingURL=batch-operations-45CQFEID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"batch-operations-45CQFEID.js"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import './StakingModule-DunDShLq.js';
|
|
2
|
+
import * as _solana_addresses from '@solana/addresses';
|
|
3
|
+
import { Address } from '@solana/addresses';
|
|
4
|
+
import './pda-Ce7VYg4T.js';
|
|
5
|
+
import './reputation-types-Yebf0Rm_.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Solana Attestation Service (SAS) Helper
|
|
9
|
+
*
|
|
10
|
+
* Provides utilities for creating and managing SAS attestations for Ghost ownership claims.
|
|
11
|
+
*
|
|
12
|
+
* @module SASAttestationHelper
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* SAS Program ID (official Solana Foundation attestation service)
|
|
17
|
+
*/
|
|
18
|
+
declare const SAS_PROGRAM_ID: Address<"22zoJMtdu4tQc2PzL74ZUT7FrwgB1Udec8DdW4yw4BdG">;
|
|
19
|
+
/**
|
|
20
|
+
* Attestation PDA seed prefix
|
|
21
|
+
*/
|
|
22
|
+
declare const ATTESTATION_SEED = "attestation";
|
|
23
|
+
/**
|
|
24
|
+
* Credential PDA seed prefix
|
|
25
|
+
*/
|
|
26
|
+
declare const CREDENTIAL_SEED = "credential";
|
|
27
|
+
/**
|
|
28
|
+
* Schema PDA seed prefix
|
|
29
|
+
*/
|
|
30
|
+
declare const SCHEMA_SEED = "schema";
|
|
31
|
+
/**
|
|
32
|
+
* GhostSpeak ownership credential configuration
|
|
33
|
+
*/
|
|
34
|
+
interface GhostSpeakCredentialConfig {
|
|
35
|
+
/** Credential issuer (typically the GhostSpeak program or a trusted authority) */
|
|
36
|
+
issuer: Address;
|
|
37
|
+
/** Credential name */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Credential description */
|
|
40
|
+
description: string;
|
|
41
|
+
/** Schema definition URI (JSON schema for attestation data) */
|
|
42
|
+
schemaUri: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* SAS Attestation data for Ghost ownership
|
|
46
|
+
*/
|
|
47
|
+
interface GhostOwnershipAttestationData {
|
|
48
|
+
/** x402 payment address being claimed */
|
|
49
|
+
x402PaymentAddress: Address;
|
|
50
|
+
/** Network identifier (devnet, mainnet-beta, etc.) */
|
|
51
|
+
network: string;
|
|
52
|
+
/** Optional GitHub username for verification */
|
|
53
|
+
githubUsername?: string;
|
|
54
|
+
/** Optional Twitter handle for verification */
|
|
55
|
+
twitterHandle?: string;
|
|
56
|
+
/** Timestamp of attestation creation */
|
|
57
|
+
timestamp: bigint;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Result of attestation PDA derivation
|
|
61
|
+
*/
|
|
62
|
+
interface AttestationPDAResult {
|
|
63
|
+
/** Derived attestation PDA */
|
|
64
|
+
attestationPda: Address;
|
|
65
|
+
/** Bump seed for PDA */
|
|
66
|
+
bump: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Configuration for creating a Ghost ownership attestation
|
|
70
|
+
*/
|
|
71
|
+
interface CreateAttestationConfig {
|
|
72
|
+
/** SAS Credential address (issuer of attestations) */
|
|
73
|
+
credentialAddress: Address;
|
|
74
|
+
/** SAS Schema address (defines attestation structure) */
|
|
75
|
+
schemaAddress: Address;
|
|
76
|
+
/** x402 payment address to attest ownership of */
|
|
77
|
+
x402PaymentAddress: Address;
|
|
78
|
+
/** Network identifier */
|
|
79
|
+
network: string;
|
|
80
|
+
/** Optional social proof */
|
|
81
|
+
githubUsername?: string;
|
|
82
|
+
twitterHandle?: string;
|
|
83
|
+
/** Attestation expiry (Unix timestamp) - defaults to 1 year */
|
|
84
|
+
expiryTimestamp?: bigint;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* SASAttestationHelper - Utilities for creating and managing SAS attestations
|
|
88
|
+
*/
|
|
89
|
+
declare class SASAttestationHelper {
|
|
90
|
+
/**
|
|
91
|
+
* Derive attestation PDA for a given credential, schema, and nonce
|
|
92
|
+
*
|
|
93
|
+
* PDA seeds: ["attestation", credential, schema, nonce]
|
|
94
|
+
*
|
|
95
|
+
* @param credentialAddress - SAS Credential address (issuer)
|
|
96
|
+
* @param schemaAddress - SAS Schema address (defines structure)
|
|
97
|
+
* @param nonce - Unique nonce (typically the x402_payment_address)
|
|
98
|
+
* @returns Attestation PDA and bump
|
|
99
|
+
*/
|
|
100
|
+
static deriveAttestationPda(credentialAddress: Address, schemaAddress: Address, nonce: Address): Promise<AttestationPDAResult>;
|
|
101
|
+
/**
|
|
102
|
+
* Derive credential PDA for an issuer
|
|
103
|
+
*
|
|
104
|
+
* PDA seeds: ["credential", issuer]
|
|
105
|
+
*
|
|
106
|
+
* @param issuer - Issuer's public key
|
|
107
|
+
* @returns Credential PDA and bump
|
|
108
|
+
*/
|
|
109
|
+
static deriveCredentialPda(issuer: Address): Promise<AttestationPDAResult>;
|
|
110
|
+
/**
|
|
111
|
+
* Derive schema PDA for a credential
|
|
112
|
+
*
|
|
113
|
+
* PDA seeds: ["schema", credential, schema_name]
|
|
114
|
+
*
|
|
115
|
+
* @param credentialAddress - Credential address
|
|
116
|
+
* @param schemaName - Schema identifier
|
|
117
|
+
* @returns Schema PDA and bump
|
|
118
|
+
*/
|
|
119
|
+
static deriveSchemaPda(credentialAddress: Address, schemaName: string): Promise<AttestationPDAResult>;
|
|
120
|
+
/**
|
|
121
|
+
* Serialize Ghost ownership attestation data for on-chain storage
|
|
122
|
+
*
|
|
123
|
+
* Format: Borsh serialization
|
|
124
|
+
* - x402_payment_address: 32 bytes
|
|
125
|
+
* - network: String (length-prefixed)
|
|
126
|
+
* - github_username: Option<String>
|
|
127
|
+
* - twitter_handle: Option<String>
|
|
128
|
+
* - timestamp: i64 (8 bytes)
|
|
129
|
+
*
|
|
130
|
+
* @param data - Attestation data to serialize
|
|
131
|
+
* @returns Serialized buffer
|
|
132
|
+
*/
|
|
133
|
+
static serializeAttestationData(data: GhostOwnershipAttestationData): Uint8Array;
|
|
134
|
+
/**
|
|
135
|
+
* Get GhostSpeak default credential configuration
|
|
136
|
+
*
|
|
137
|
+
* This returns the official GhostSpeak credential issuer settings
|
|
138
|
+
* for production use.
|
|
139
|
+
*
|
|
140
|
+
* @param issuer - Credential issuer address (typically the GhostSpeak program authority)
|
|
141
|
+
* @returns Default credential configuration
|
|
142
|
+
*/
|
|
143
|
+
static getDefaultCredentialConfig(issuer: Address): GhostSpeakCredentialConfig;
|
|
144
|
+
/**
|
|
145
|
+
* Check if an attestation is expired
|
|
146
|
+
*
|
|
147
|
+
* @param expiryTimestamp - Expiry timestamp (Unix seconds)
|
|
148
|
+
* @param currentTimestamp - Current timestamp (defaults to now)
|
|
149
|
+
* @returns True if expired
|
|
150
|
+
*/
|
|
151
|
+
static isAttestationExpired(expiryTimestamp: bigint, currentTimestamp?: bigint): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Calculate default expiry timestamp (1 year from now)
|
|
154
|
+
*
|
|
155
|
+
* @param fromTimestamp - Starting timestamp (defaults to now)
|
|
156
|
+
* @returns Expiry timestamp
|
|
157
|
+
*/
|
|
158
|
+
static calculateDefaultExpiry(fromTimestamp?: bigint): bigint;
|
|
159
|
+
/**
|
|
160
|
+
* Create attestation instruction data
|
|
161
|
+
*
|
|
162
|
+
* NOTE: This is a helper for building the SAS create_attestation instruction.
|
|
163
|
+
* The actual instruction building should be done using the SAS SDK or program IDL.
|
|
164
|
+
*
|
|
165
|
+
* @param config - Attestation configuration
|
|
166
|
+
* @returns Prepared attestation data and PDA
|
|
167
|
+
*/
|
|
168
|
+
static prepareAttestation(config: CreateAttestationConfig): Promise<{
|
|
169
|
+
attestationData: Uint8Array;
|
|
170
|
+
attestationPda: Address;
|
|
171
|
+
bump: number;
|
|
172
|
+
expiryTimestamp: bigint;
|
|
173
|
+
}>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* GhostSpeak Protocol Constants
|
|
178
|
+
* July 2025 Implementation
|
|
179
|
+
*/
|
|
180
|
+
/**
|
|
181
|
+
* Program ID for GhostSpeak Marketplace on Solana
|
|
182
|
+
* Deployed on devnet - December 30, 2025
|
|
183
|
+
* Deployment signature: 5zdU8HdtenhgwDmeEJu2ZPrQwoG9gztHHM5Ft6URxCzTj7m4y9ZkvmVKrpvMK41skcHvh8xa7ckNuUkQwPsierJr
|
|
184
|
+
*/
|
|
185
|
+
declare const GHOSTSPEAK_PROGRAM_ID: _solana_addresses.Address<"4wHjA2a5YC4twZb4NQpwZpixo5FgxxzuJUrCG7UnF9pB">;
|
|
186
|
+
/**
|
|
187
|
+
* Network-specific configurations
|
|
188
|
+
*/
|
|
189
|
+
declare const NETWORK_CONFIG: {
|
|
190
|
+
readonly devnet: {
|
|
191
|
+
readonly programId: "4wHjA2a5YC4twZb4NQpwZpixo5FgxxzuJUrCG7UnF9pB";
|
|
192
|
+
readonly rpcUrl: "https://api.devnet.solana.com";
|
|
193
|
+
};
|
|
194
|
+
readonly testnet: {
|
|
195
|
+
readonly programId: "4wHjA2a5YC4twZb4NQpwZpixo5FgxxzuJUrCG7UnF9pB";
|
|
196
|
+
readonly rpcUrl: "https://api.testnet.solana.com";
|
|
197
|
+
};
|
|
198
|
+
readonly mainnet: {
|
|
199
|
+
readonly programId: "4wHjA2a5YC4twZb4NQpwZpixo5FgxxzuJUrCG7UnF9pB";
|
|
200
|
+
readonly rpcUrl: "https://api.mainnet-beta.solana.com";
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* System Program Addresses for Solana
|
|
206
|
+
*
|
|
207
|
+
* These are the standard system program addresses used across Solana.
|
|
208
|
+
* Using constants instead of hardcoded values improves maintainability
|
|
209
|
+
* and ensures consistency across the SDK.
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* SPL Token Program
|
|
214
|
+
* The standard SPL Token program
|
|
215
|
+
*/
|
|
216
|
+
declare const TOKEN_PROGRAM_ADDRESS: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
|
|
217
|
+
/**
|
|
218
|
+
* SPL Token 2022 Program (Token Extensions)
|
|
219
|
+
* The new token program with extended functionality
|
|
220
|
+
*/
|
|
221
|
+
declare const TOKEN_2022_PROGRAM_ADDRESS: Address<"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb">;
|
|
222
|
+
/**
|
|
223
|
+
* Associated Token Account Program
|
|
224
|
+
* Manages associated token accounts
|
|
225
|
+
*/
|
|
226
|
+
declare const ASSOCIATED_TOKEN_PROGRAM_ADDRESS: Address<"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL">;
|
|
227
|
+
/**
|
|
228
|
+
* Native SOL Mint Address (wSOL) - Token 2022 Program
|
|
229
|
+
* The mint address for wrapped SOL on Token 2022
|
|
230
|
+
* This is the one used by GhostSpeak escrow operations
|
|
231
|
+
*/
|
|
232
|
+
declare const NATIVE_MINT_ADDRESS: Address<"9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP">;
|
|
233
|
+
|
|
234
|
+
export { ATTESTATION_SEED as A, CREDENTIAL_SEED as C, type GhostSpeakCredentialConfig as G, NATIVE_MINT_ADDRESS as N, SASAttestationHelper as S, TOKEN_PROGRAM_ADDRESS as T, SAS_PROGRAM_ID as a, SCHEMA_SEED as b, type GhostOwnershipAttestationData as c, type AttestationPDAResult as d, type CreateAttestationConfig as e, GHOSTSPEAK_PROGRAM_ID as f, TOKEN_2022_PROGRAM_ADDRESS as g, ASSOCIATED_TOKEN_PROGRAM_ADDRESS as h, NETWORK_CONFIG as i };
|