@ghostspeak/sdk 2.0.8 → 2.0.10

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 (33) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/{GhostSpeakClient-bnXwUPHI.d.ts → GhostSpeakClient-qdLGyuDp.d.ts} +2 -2
  3. package/dist/{StakingModule-DunDShLq.d.ts → StakingModule-CPhp_ZY0.d.ts} +1 -1
  4. package/dist/{browser-CI5_6Gzk.d.ts → browser-D1TpjbjZ.d.ts} +3 -3
  5. package/dist/browser.d.ts +3 -2
  6. package/dist/browser.js +3 -3
  7. package/dist/{chunk-6XCCMJ6M.js → chunk-5SS3OL4B.js} +5 -5
  8. package/dist/{chunk-6XCCMJ6M.js.map → chunk-5SS3OL4B.js.map} +1 -1
  9. package/dist/{chunk-JYXSOXCP.js → chunk-63A7F2YP.js} +42 -32
  10. package/dist/chunk-63A7F2YP.js.map +1 -0
  11. package/dist/{chunk-5QBSC4T4.js → chunk-EU6PHSM5.js} +3 -3
  12. package/dist/{chunk-5QBSC4T4.js.map → chunk-EU6PHSM5.js.map} +1 -1
  13. package/dist/{chunk-OXA7MECJ.js → chunk-HIDBANFS.js} +56 -4
  14. package/dist/chunk-HIDBANFS.js.map +1 -0
  15. package/dist/{chunk-BQDGRTVP.js → chunk-QWQTPTZ4.js} +39 -51
  16. package/dist/chunk-QWQTPTZ4.js.map +1 -0
  17. package/dist/client.d.ts +3 -3
  18. package/dist/client.js +4 -4
  19. package/dist/index.d.ts +142 -11
  20. package/dist/index.js +149 -24
  21. package/dist/index.js.map +1 -1
  22. package/dist/metafile-esm.json +1 -1
  23. package/dist/minimal/core-minimal.d.ts +0 -5
  24. package/dist/minimal/core-minimal.js +6 -6
  25. package/dist/minimal/core-minimal.js.map +1 -1
  26. package/dist/{signature-verification-DGxR4aYQ.d.ts → signature-verification-BDzoR1MG.d.ts} +0 -5
  27. package/dist/utils.d.ts +143 -2
  28. package/dist/utils.js +4 -4
  29. package/dist/utils.js.map +1 -1
  30. package/package.json +5 -3
  31. package/dist/chunk-BQDGRTVP.js.map +0 -1
  32. package/dist/chunk-JYXSOXCP.js.map +0 -1
  33. package/dist/chunk-OXA7MECJ.js.map +0 -1
@@ -49,22 +49,22 @@ async function signAuthorizationMessage(message, agentKeypair) {
49
49
  const signature = nacl.sign.detached(messageBuffer, agentKeypair.secretKey);
50
50
  return signature;
51
51
  }
52
- async function verifyAuthorizationSignature(authorization2) {
52
+ async function verifyAuthorizationSignature(authorization) {
53
53
  try {
54
54
  const message = {
55
- agentAddress: authorization2.agentAddress,
56
- authorizedSource: authorization2.authorizedSource,
57
- indexLimit: authorization2.indexLimit,
58
- expiresAt: authorization2.expiresAt,
59
- network: authorization2.network,
60
- nonce: authorization2.nonce
55
+ agentAddress: authorization.agentAddress,
56
+ authorizedSource: authorization.authorizedSource,
57
+ indexLimit: authorization.indexLimit,
58
+ expiresAt: authorization.expiresAt,
59
+ network: authorization.network,
60
+ nonce: authorization.nonce
61
61
  };
62
62
  const messageBuffer = createAuthorizationMessage(message);
63
63
  const nacl = await import('./nacl-fast-W5BJ3KZ2.js');
64
- const agentPubkeyBytes = bs58.decode(authorization2.agentAddress);
64
+ const agentPubkeyBytes = bs58.decode(authorization.agentAddress);
65
65
  const isValid = nacl.sign.detached.verify(
66
66
  messageBuffer,
67
- authorization2.signature,
67
+ authorization.signature,
68
68
  agentPubkeyBytes
69
69
  );
70
70
  return isValid;
@@ -89,7 +89,7 @@ async function createSignedAuthorization(params, agentKeypair) {
89
89
  nonce
90
90
  };
91
91
  const signature = await signAuthorizationMessage(message, agentKeypair);
92
- const authorization2 = {
92
+ const authorization = {
93
93
  agentAddress,
94
94
  authorizedSource: params.authorizedSource,
95
95
  indexLimit,
@@ -99,41 +99,35 @@ async function createSignedAuthorization(params, agentKeypair) {
99
99
  nonce,
100
100
  metadata: params.metadata
101
101
  };
102
- return authorization2;
102
+ return authorization;
103
103
  }
104
104
  function generateNonce() {
105
- if (globalThis.crypto) {
106
- const buffer2 = new Uint8Array(32);
107
- globalThis.crypto.getRandomValues(buffer2);
108
- return Buffer.from(buffer2).toString("hex");
109
- }
110
- const nodeCrypto = eval("require")("crypto");
111
105
  const buffer = new Uint8Array(32);
112
- nodeCrypto.webcrypto.getRandomValues(buffer);
106
+ globalThis.crypto.getRandomValues(buffer);
113
107
  return Buffer.from(buffer).toString("hex");
114
108
  }
115
- function serializeAuthorization(authorization2) {
109
+ function serializeAuthorization(authorization) {
116
110
  return {
117
- agentAddress: authorization2.agentAddress,
118
- authorizedSource: authorization2.authorizedSource,
119
- indexLimit: authorization2.indexLimit,
120
- expiresAt: authorization2.expiresAt,
121
- network: authorization2.network,
122
- signature: bs58.encode(authorization2.signature),
123
- nonce: authorization2.nonce,
124
- metadata: authorization2.metadata
111
+ agentAddress: authorization.agentAddress,
112
+ authorizedSource: authorization.authorizedSource,
113
+ indexLimit: authorization.indexLimit,
114
+ expiresAt: authorization.expiresAt,
115
+ network: authorization.network,
116
+ signature: bs58.encode(authorization.signature),
117
+ nonce: authorization.nonce,
118
+ metadata: authorization.metadata
125
119
  };
126
120
  }
127
- function deserializeAuthorization(data2) {
121
+ function deserializeAuthorization(data) {
128
122
  return {
129
- agentAddress: data2.agentAddress,
130
- authorizedSource: data2.authorizedSource,
131
- indexLimit: data2.indexLimit,
132
- expiresAt: data2.expiresAt,
133
- network: data2.network,
134
- signature: bs58.decode(data2.signature),
135
- nonce: data2.nonce,
136
- metadata: data2.metadata
123
+ agentAddress: data.agentAddress,
124
+ authorizedSource: data.authorizedSource,
125
+ indexLimit: data.indexLimit,
126
+ expiresAt: data.expiresAt,
127
+ network: data.network,
128
+ signature: bs58.decode(data.signature),
129
+ nonce: data.nonce,
130
+ metadata: data.metadata
137
131
  };
138
132
  }
139
133
  async function getAuthorizationId(authorization) {
@@ -141,28 +135,22 @@ async function getAuthorizationId(authorization) {
141
135
  const json = JSON.stringify(serialized);
142
136
  const encoder = new TextEncoder();
143
137
  const data = encoder.encode(json);
144
- let crypto;
145
- if (globalThis.crypto) {
146
- crypto = globalThis.crypto;
147
- } else {
148
- const nodeCrypto = eval("require")("crypto");
149
- crypto = nodeCrypto.webcrypto;
150
- }
138
+ const crypto = globalThis.crypto;
151
139
  const hashBuffer = await crypto.subtle.digest("SHA-256", data);
152
140
  const hashArray = new Uint8Array(hashBuffer);
153
141
  return bs58.encode(hashArray);
154
142
  }
155
- function isAuthorizationExpired(authorization2, currentTime) {
143
+ function isAuthorizationExpired(authorization, currentTime) {
156
144
  const now = currentTime || Math.floor(Date.now() / 1e3);
157
- return now >= authorization2.expiresAt;
145
+ return now >= authorization.expiresAt;
158
146
  }
159
- function isAuthorizationExhausted(authorization2, currentIndex) {
160
- return currentIndex >= authorization2.indexLimit;
147
+ function isAuthorizationExhausted(authorization, currentIndex) {
148
+ return currentIndex >= authorization.indexLimit;
161
149
  }
162
- function validateAuthorizationNetwork(authorization2, expectedNetwork) {
163
- return authorization2.network === expectedNetwork;
150
+ function validateAuthorizationNetwork(authorization, expectedNetwork) {
151
+ return authorization.network === expectedNetwork;
164
152
  }
165
153
 
166
154
  export { createAuthorizationMessage, createSignedAuthorization, deserializeAuthorization, generateNonce, getAuthorizationId, isAuthorizationExhausted, isAuthorizationExpired, serializeAuthorization, signAuthorizationMessage, signature_verification_exports, validateAuthorizationNetwork, verifyAuthorizationSignature };
167
- //# sourceMappingURL=chunk-BQDGRTVP.js.map
168
- //# sourceMappingURL=chunk-BQDGRTVP.js.map
155
+ //# sourceMappingURL=chunk-QWQTPTZ4.js.map
156
+ //# sourceMappingURL=chunk-QWQTPTZ4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/signature-verification.ts"],"names":[],"mappings":";;;;;AAAA,IAAA,8BAAA,GAAA;AAAA,QAAA,CAAA,8BAAA,EAAA;AAAA,EAAA,0BAAA,EAAA,MAAA,0BAAA;AAAA,EAAA,yBAAA,EAAA,MAAA,yBAAA;AAAA,EAA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A,EAAyD;AAChG,EAAA,MAAM,UAAA,GAAa,uBAAuB,aAAa,CAAA;AACvD,EAAA,MAAM,IAAA,GAAO,IAAA,CAAK,SAAA,CAAU,UAAU,CAAA;AACtC,EAAA,MAAM,OAAA,GAAU,IAAI,WAAA,EAAY;AAChC,EAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,MAAA,CAAO,IAAI,CAAA;AAGhC,EAAA,MAAM,SAAS,UAAA,CAAW,MAAA;AAG1B,EAAA,MAAM,aAAa,MAAM,MAAA,CAAO,MAAA,CAAO,MAAA,CAAO,WAAW,IAAI,CAAA;AAC7D,EAAA,MAAM,SAAA,GAAY,IAAI,UAAA,CAAW,UAAU,CAAA;AAE3C,EAAA,OAAO,IAAA,CAAK,OAAO,SAAS,CAAA;AAC9B;AASO,SAAS,sBAAA,CACd,eACA,WAAA,EACS;AACT,EAAA,MAAM,MAAM,WAAA,IAAe,IAAA,CAAK,MAAM,IAAA,CAAK,GAAA,KAAQ,GAAI,CAAA;AACvD,EAAA,OAAO,OAAO,aAAA,CAAc,SAAA;AAC9B;AASO,SAAS,wBAAA,CACd,eACA,YAAA,EACS;AACT,EAAA,OAAO,gBAAgB,aAAA,CAAc,UAAA;AACvC;AASO,SAAS,4BAAA,CACd,eACA,eAAA,EACS;AACT,EAAA,OAAO,cAAc,OAAA,KAAY,eAAA;AACnC","file":"chunk-QWQTPTZ4.js","sourcesContent":["/**\n * Agent Authorization Signature Verification\n *\n * Ed25519 signature creation and verification for GhostSpeak's\n * trustless agent pre-authorization system.\n *\n * Enables verifiable delegation of reputation update authority.\n */\n\nimport { address } from '@solana/addresses'\nimport type { Address } from '@solana/addresses'\nimport type {\n ReputationAuthorization,\n AuthorizationMessage,\n CreateAuthorizationParams,\n SolanaNetwork,\n} from '../types/authorization/authorization-types'\nimport bs58 from 'bs58'\n\n/**\n * Keypair interface for Ed25519 signing operations\n * Compatible with both legacy and modern Solana key formats\n */\nexport interface SigningKeypair {\n publicKey: {\n toBase58(): string\n toBytes(): Uint8Array\n }\n secretKey: Uint8Array\n}\n\n/**\n * Authorization message domain separator\n * Prevents signature reuse across different protocols\n */\nconst DOMAIN_SEPARATOR = 'GhostSpeak Reputation Authorization'\n\n/**\n * Create authorization message for signing\n *\n * Message format:\n * - Domain separator (prevents cross-protocol replay)\n * - Agent address (32 bytes)\n * - Authorized source (32 bytes)\n * - Index limit (8 bytes, u64 big-endian)\n * - Expiration timestamp (8 bytes, u64 big-endian)\n * - Network string (variable length)\n * - Nonce (optional, 32 bytes if present)\n *\n * @param message - Authorization message parameters\n * @returns Buffer ready for signing\n */\nexport function createAuthorizationMessage(message: AuthorizationMessage): Buffer {\n const components: Buffer[] = []\n\n // 1. Domain separator\n components.push(Buffer.from(DOMAIN_SEPARATOR, 'utf8'))\n\n // 2. Agent address (32 bytes)\n const agentBytes = bs58.decode(message.agentAddress)\n components.push(Buffer.from(agentBytes))\n\n // 3. Authorized source (32 bytes)\n const sourceBytes = bs58.decode(message.authorizedSource)\n components.push(Buffer.from(sourceBytes))\n\n // 4. Index limit (8 bytes, u64 big-endian)\n const indexLimitBuffer = Buffer.allocUnsafe(8)\n indexLimitBuffer.writeBigUInt64BE(BigInt(message.indexLimit))\n components.push(indexLimitBuffer)\n\n // 5. Expiration timestamp (8 bytes, u64 big-endian)\n const expiresAtBuffer = Buffer.allocUnsafe(8)\n expiresAtBuffer.writeBigUInt64BE(BigInt(message.expiresAt))\n components.push(expiresAtBuffer)\n\n // 6. Network string\n components.push(Buffer.from(message.network, 'utf8'))\n\n // 7. Nonce (optional, 32 bytes)\n if (message.nonce) {\n components.push(Buffer.from(message.nonce, 'utf8'))\n }\n\n return Buffer.concat(components)\n}\n\n/**\n * Sign authorization message with agent's private key\n *\n * @param message - Authorization message to sign\n * @param agentKeypair - Agent's keypair (must match message.agentAddress)\n * @returns Ed25519 signature (64 bytes)\n */\nexport async function signAuthorizationMessage(\n message: AuthorizationMessage,\n agentKeypair: SigningKeypair\n): Promise<Uint8Array> {\n // Verify keypair matches agent address\n const keypairAddress = agentKeypair.publicKey.toBase58()\n if (keypairAddress !== message.agentAddress) {\n throw new Error(\n `Keypair public key ${keypairAddress} does not match agent address ${message.agentAddress}`\n )\n }\n\n // Create message buffer\n const messageBuffer = createAuthorizationMessage(message)\n\n // Sign with Ed25519\n const nacl = await import('tweetnacl')\n const signature = nacl.sign.detached(messageBuffer, agentKeypair.secretKey)\n\n return signature\n}\n\n/**\n * Verify authorization signature\n *\n * @param authorization - Authorization to verify\n * @returns True if signature is valid\n */\nexport async function verifyAuthorizationSignature(\n authorization: ReputationAuthorization\n): Promise<boolean> {\n try {\n // Reconstruct message\n const message: AuthorizationMessage = {\n agentAddress: authorization.agentAddress,\n authorizedSource: authorization.authorizedSource,\n indexLimit: authorization.indexLimit,\n expiresAt: authorization.expiresAt,\n network: authorization.network,\n nonce: authorization.nonce,\n }\n\n const messageBuffer = createAuthorizationMessage(message)\n\n // Verify signature\n const nacl = await import('tweetnacl')\n const agentPubkeyBytes = bs58.decode(authorization.agentAddress)\n const isValid = nacl.sign.detached.verify(\n messageBuffer,\n authorization.signature,\n agentPubkeyBytes\n )\n\n return isValid\n } catch (error) {\n console.error('[Auth Signature] Verification failed:', error)\n return false\n }\n}\n\n/**\n * Create a complete authorization with signature\n *\n * @param params - Authorization parameters\n * @param agentKeypair - Agent's keypair for signing\n * @returns Complete signed authorization\n */\nexport async function createSignedAuthorization(\n params: CreateAuthorizationParams,\n agentKeypair: SigningKeypair\n): Promise<ReputationAuthorization> {\n // Get agent address from keypair\n const agentAddress = address(agentKeypair.publicKey.toBase58())\n\n // Calculate expiration\n const now = Math.floor(Date.now() / 1000)\n const expiresAt = params.expiresAt || now + (params.expiresIn || 30 * 24 * 60 * 60) // Default 30 days\n\n // Default index limit\n const indexLimit = params.indexLimit || 1000\n\n // Default network (would need to be passed or detected from cluster)\n const network: SolanaNetwork = params.network || 'devnet'\n\n // Use \"default\" nonce if not provided to avoid PDA seed length issues (64-char hex exceeds 32-byte limit)\n // Note: This matches Rust's unwrap_or(&String::from(\"default\")) behavior\n const nonce = params.nonce !== undefined ? params.nonce : \"default\"\n\n // Create message\n const message: AuthorizationMessage = {\n agentAddress,\n authorizedSource: params.authorizedSource,\n indexLimit,\n expiresAt,\n network,\n nonce,\n }\n\n // Sign message\n const signature = await signAuthorizationMessage(message, agentKeypair)\n\n // Return complete authorization\n const authorization: ReputationAuthorization = {\n agentAddress,\n authorizedSource: params.authorizedSource,\n indexLimit,\n expiresAt,\n network,\n signature,\n nonce,\n metadata: params.metadata,\n }\n\n return authorization\n}\n\n/**\n * Generate a random nonce for replay protection\n *\n * @returns 32-byte random nonce as hex string\n */\nexport function generateNonce(): string {\n // Node 24+ always has globalThis.crypto\n const buffer = new Uint8Array(32)\n globalThis.crypto.getRandomValues(buffer)\n return Buffer.from(buffer).toString('hex')\n}\n\n/**\n * Serialize authorization to JSON-safe format\n *\n * @param authorization - Authorization to serialize\n * @returns JSON-safe object (signature as base58)\n */\nexport function serializeAuthorization(authorization: ReputationAuthorization): {\n agentAddress: string\n authorizedSource: string\n indexLimit: number\n expiresAt: number\n network: SolanaNetwork\n signature: string\n nonce?: string\n metadata?: any\n} {\n return {\n agentAddress: authorization.agentAddress,\n authorizedSource: authorization.authorizedSource,\n indexLimit: authorization.indexLimit,\n expiresAt: authorization.expiresAt,\n network: authorization.network,\n signature: bs58.encode(authorization.signature),\n nonce: authorization.nonce,\n metadata: authorization.metadata,\n }\n}\n\n/**\n * Deserialize authorization from JSON format\n *\n * @param data - Serialized authorization data\n * @returns ReputationAuthorization with Uint8Array signature\n */\nexport function deserializeAuthorization(data: {\n agentAddress: string\n authorizedSource: string\n indexLimit: number\n expiresAt: number\n network: SolanaNetwork\n signature: string\n nonce?: string\n metadata?: any\n}): ReputationAuthorization {\n return {\n agentAddress: data.agentAddress as Address,\n authorizedSource: data.authorizedSource as Address,\n indexLimit: data.indexLimit,\n expiresAt: data.expiresAt,\n network: data.network,\n signature: bs58.decode(data.signature),\n nonce: data.nonce,\n metadata: data.metadata,\n }\n}\n\n/**\n * Get authorization ID (deterministic hash)\n *\n * @param authorization - Authorization to hash\n * @returns Base58-encoded SHA-256 hash\n */\nexport async function getAuthorizationId(authorization: ReputationAuthorization): Promise<string> {\n const serialized = serializeAuthorization(authorization)\n const json = JSON.stringify(serialized)\n const encoder = new TextEncoder()\n const data = encoder.encode(json)\n\n // Node 24+ always has globalThis.crypto\n const crypto = globalThis.crypto\n\n // SHA-256 hash\n const hashBuffer = await crypto.subtle.digest('SHA-256', data)\n const hashArray = new Uint8Array(hashBuffer)\n\n return bs58.encode(hashArray)\n}\n\n/**\n * Check if authorization is expired\n *\n * @param authorization - Authorization to check\n * @param currentTime - Current Unix timestamp (defaults to now)\n * @returns True if expired\n */\nexport function isAuthorizationExpired(\n authorization: ReputationAuthorization,\n currentTime?: number\n): boolean {\n const now = currentTime || Math.floor(Date.now() / 1000)\n return now >= authorization.expiresAt\n}\n\n/**\n * Check if authorization has exceeded index limit\n *\n * @param authorization - Authorization to check\n * @param currentIndex - Current usage count\n * @returns True if exhausted\n */\nexport function isAuthorizationExhausted(\n authorization: ReputationAuthorization,\n currentIndex: number\n): boolean {\n return currentIndex >= authorization.indexLimit\n}\n\n/**\n * Validate authorization network matches expected\n *\n * @param authorization - Authorization to check\n * @param expectedNetwork - Expected network\n * @returns True if networks match\n */\nexport function validateAuthorizationNetwork(\n authorization: ReputationAuthorization,\n expectedNetwork: SolanaNetwork\n): boolean {\n return authorization.network === expectedNetwork\n}\n"]}
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import '@solana/kit';
2
2
  import './reputation-types-Yebf0Rm_.js';
3
3
  import '@solana/addresses';
4
- import './StakingModule-DunDShLq.js';
5
- export { G as GhostSpeakClient, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-bnXwUPHI.js';
4
+ import './StakingModule-CPhp_ZY0.js';
5
+ export { G as GhostSpeakClient, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-qdLGyuDp.js';
6
6
  import './types.js';
7
7
  import './credentials.js';
8
- import './signature-verification-DGxR4aYQ.js';
8
+ import './signature-verification-BDzoR1MG.js';
package/dist/client.js CHANGED
@@ -1,7 +1,7 @@
1
- export { GhostSpeakClient, GhostSpeakClient_default as default, lamportsToSol, sol } from './chunk-6XCCMJ6M.js';
2
- import './chunk-JYXSOXCP.js';
3
- import './chunk-BQDGRTVP.js';
4
- import './chunk-OXA7MECJ.js';
1
+ export { GhostSpeakClient, GhostSpeakClient_default as default, lamportsToSol, sol } from './chunk-5SS3OL4B.js';
2
+ import './chunk-63A7F2YP.js';
3
+ import './chunk-QWQTPTZ4.js';
4
+ import './chunk-HIDBANFS.js';
5
5
  import './chunk-IQM5RASO.js';
6
6
  import './chunk-5QZVFUXB.js';
7
7
  import './chunk-46QWY3MG.js';
package/dist/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
- import { P as PrivacyMode, R as ReputationTier, S as ScoreRange, a as PrivacySettings, M as MetricVisibility, V as VisibleReputation } from './GhostSpeakClient-bnXwUPHI.js';
2
- export { j as ApplyPresetParams, A as AuthorizationModule, G as GhostSpeakClient, h as GrantAccessParams, I as InitializePrivacyParams, n as IssuedCredentialResult, e as PRIVACY_CONSTANTS, b as PrivacyModule, f as PrivacyPreset, d as PrivacyPresets, i as RevokeAccessParams, g as SetMetricVisibilityParams, m as UnifiedCredentialConfig, k as UnifiedCredentialService, U as UpdatePrivacyModeParams, c as VisibilityLevel, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-bnXwUPHI.js';
1
+ import { P as PrivacyMode, R as ReputationTier, S as ScoreRange, a as PrivacySettings, M as MetricVisibility, V as VisibleReputation } from './GhostSpeakClient-qdLGyuDp.js';
2
+ export { j as ApplyPresetParams, A as AuthorizationModule, G as GhostSpeakClient, h as GrantAccessParams, I as InitializePrivacyParams, n as IssuedCredentialResult, e as PRIVACY_CONSTANTS, b as PrivacyModule, f as PrivacyPreset, d as PrivacyPresets, i as RevokeAccessParams, g as SetMetricVisibilityParams, m as UnifiedCredentialConfig, k as UnifiedCredentialService, U as UpdatePrivacyModeParams, c as VisibilityLevel, G as default, l as lamportsToSol, s as sol } from './GhostSpeakClient-qdLGyuDp.js';
3
3
  import { Address, ReadonlyUint8Array, Option, Decoder, TransactionSigner, AccountMeta, Instruction, InstructionWithData, InstructionWithAccounts, WritableAccount, ReadonlySignerAccount, AccountSignerMeta, ReadonlyAccount, OptionOrNullable, WritableSignerAccount, Slot, Lamports, Epoch, Base58EncodedBytes, Base64EncodedBytes, TransactionError, Base64EncodedWireTransaction, Signature, TransactionMessageBytesBase64, Commitment as Commitment$1, KeyPairSigner } from '@solana/kit';
4
4
  export { TransactionSigner, address, createKeyPairSignerFromBytes, createSolanaRpc, generateKeyPairSigner } from '@solana/kit';
5
5
  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, ParticipantType, QueryResult, Rating, Reaction, Reputation, Result, SDKError, SendCommunicationMessageParams, SimulationResult, Transaction, TransferProof, UpdateParticipantStatusParams, WithAddress, isError, isSuccess, unwrap } from './types.js';
6
6
  export { AccountNotFoundError, ErrorFactory, ErrorHandler, InsufficientBalanceError, InvalidInputError, NetworkError, SimulationFailedError, TimeoutError, TransactionFailedError, ValidationError } from './errors.js';
7
- import { c as AccessTier, d as GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, P as PricingModelArgs, E as ExtendedRpcApi } from './StakingModule-DunDShLq.js';
8
- export { a5 as AgentAccount, A as AgentModule, a4 as AgentRegistrationData, a3 as AgentWithAddress, B as BaseModule, e as CacheConfig, C as CacheManager, f as ClaimGhostParams, aj as Commitment, Z as CreateDidDocumentParams, h as CreateProposalParams, n as Credential, l as CredentialKind, k as CredentialModule, m as CredentialStatus, o as CredentialTemplate, $ as DeactivateDidDocumentParams, Q as DidDocument, r as DidError, s as DidErrorClass, D as DidModule, X as DidResolutionMetadata, ai as EmergencyConfig, j as ExecutionParams, a as GhostModule, G as GhostSpeakConfig, a7 as GhostSpeakError, b as GovernanceModule, I as InstructionBuilder, M as MultisigModule, N as Network, a2 as PayAIReputationRecordInput, g as PreparedClaimResult, a6 as PricingModel, i as ProposalType, a8 as RegisterAgentParams, a1 as ReputationData, R as ReputationModule, a0 as ResolveDidDocumentParams, ak as RetryConfig, aa as RpcAccountInfo, ad as RpcAccountInfoResponse, al as RpcApi, ae as RpcMultipleAccountsResponse, ab as RpcProgramAccount, ac as RpcProgramAccountsResponse, a9 as RpcResponse, am as RpcSubscriptionApi, U as ServiceEndpoint, q as ServiceEndpointType, ag as SimulatedTransactionResponse, ah as SolanaRpcClient, an as StakingAccount, ao as StakingConfig, af as TransactionResponse, _ as UpdateDidDocumentParams, T as VerificationMethod, V as VerificationMethodType, p as VerificationRelationship, Y as W3CDidDocument, W as W3CVerifiableCredential, J as canPerformAction, y as createEd25519VerificationMethod, z as createServiceEndpoint, aq as decodeAgent, t as deriveDidDocumentPda, K as didDocumentToJson, x as exportAsW3CDidDocument, ar as fetchAgent, as as fetchMaybeAgent, u as generateDidString, ap as getAgentDecoder, O as getIdentifierFromDid, H as getMethodsForRelationship, L as getNetworkFromDid, at as getStakingAccountDecoder, au as getStakingConfigDecoder, F as isDidActive, w as parseDidString, v as validateDidString } from './StakingModule-DunDShLq.js';
7
+ import { c as AccessTier, d as GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, P as PricingModelArgs, E as ExtendedRpcApi, B as BaseModule } from './StakingModule-CPhp_ZY0.js';
8
+ export { a8 as AgentAccount, A as AgentModule, a7 as AgentRegistrationData, a6 as AgentWithAddress, e as CacheConfig, C as CacheManager, f as ClaimGhostParams, am as Commitment, a0 as CreateDidDocumentParams, j as CreateProposalParams, p as Credential, n as CredentialKind, m as CredentialModule, o as CredentialStatus, q as CredentialTemplate, a2 as DeactivateDidDocumentParams, X as DidDocument, t as DidError, u as DidErrorClass, D as DidModule, _ as DidResolutionMetadata, al as EmergencyConfig, l as ExecutionParams, a as GhostModule, G as GhostSpeakConfig, aa as GhostSpeakError, b as GovernanceModule, i as InitializeStakingConfigParams, I as InstructionBuilder, M as MultisigModule, N as Network, a5 as PayAIReputationRecordInput, g as PreparedClaimResult, a9 as PricingModel, k as ProposalType, ab as RegisterAgentParams, a4 as ReputationData, R as ReputationModule, a3 as ResolveDidDocumentParams, an as RetryConfig, ad as RpcAccountInfo, ag as RpcAccountInfoResponse, ao as RpcApi, ah as RpcMultipleAccountsResponse, ae as RpcProgramAccount, af as RpcProgramAccountsResponse, ac as RpcResponse, ap as RpcSubscriptionApi, Z as ServiceEndpoint, s as ServiceEndpointType, aj as SimulatedTransactionResponse, ak as SolanaRpcClient, h as StakeParams, aq as StakingAccount, ar as StakingConfig, S as StakingModule, ai as TransactionResponse, U as UnstakeParams, a1 as UpdateDidDocumentParams, Y as VerificationMethod, V as VerificationMethodType, r as VerificationRelationship, $ as W3CDidDocument, W as W3CVerifiableCredential, L as canPerformAction, F as createEd25519VerificationMethod, H as createServiceEndpoint, at as decodeAgent, v as deriveDidDocumentPda, O as didDocumentToJson, z as exportAsW3CDidDocument, au as fetchAgent, av as fetchMaybeAgent, w as generateDidString, as as getAgentDecoder, T as getIdentifierFromDid, K as getMethodsForRelationship, Q as getNetworkFromDid, aw as getStakingAccountDecoder, ax as getStakingConfigDecoder, J as isDidActive, y as parseDidString, x as validateDidString } from './StakingModule-CPhp_ZY0.js';
9
+ import * as gill from 'gill';
10
+ import { SolanaClient } from 'gill';
9
11
  import { Address as Address$1 } from '@solana/addresses';
10
- export { l as AuthorizationFilter, p as AuthorizationInvalidReason, q as AuthorizationMessage, n as AuthorizationMetadata, o as AuthorizationProof, u as AuthorizationRevocation, A as AuthorizationStatus, t as AuthorizationUsage, k as AuthorizationWithStatus, B as BatchAuthorizationVerification, C as CreateAuthorizationParams, R as ReputationAuthorization, m as SolanaNetwork, V as VerificationDetails, r as VerifyAuthorizationParams, c as createAuthorizationMessage, b as createSignedAuthorization, e as deserializeAuthorization, g as generateNonce, f as getAuthorizationId, h as isAuthorizationExhausted, i as isAuthorizationExpired, d as serializeAuthorization, a as signAuthorizationMessage, j as validateAuthorizationNetwork, v as verifyAuthorizationSignature } from './signature-verification-DGxR4aYQ.js';
11
- export { h as ASSOCIATED_TOKEN_PROGRAM_ADDRESS, A as ATTESTATION_SEED, d as AttestationPDAResult, C as CREDENTIAL_SEED, e as CreateAttestationConfig, f as GHOSTSPEAK_PROGRAM_ID, c as GhostOwnershipAttestationData, G as GhostSpeakCredentialConfig, N as NATIVE_MINT_ADDRESS, S as SASAttestationHelper, a as SAS_PROGRAM_ID, b as SCHEMA_SEED, g as TOKEN_2022_PROGRAM_ADDRESS, T as TOKEN_PROGRAM_ADDRESS } from './browser-CI5_6Gzk.js';
12
+ export { l as AuthorizationFilter, p as AuthorizationInvalidReason, q as AuthorizationMessage, n as AuthorizationMetadata, o as AuthorizationProof, u as AuthorizationRevocation, A as AuthorizationStatus, t as AuthorizationUsage, k as AuthorizationWithStatus, B as BatchAuthorizationVerification, C as CreateAuthorizationParams, R as ReputationAuthorization, m as SolanaNetwork, V as VerificationDetails, r as VerifyAuthorizationParams, c as createAuthorizationMessage, b as createSignedAuthorization, e as deserializeAuthorization, g as generateNonce, f as getAuthorizationId, h as isAuthorizationExhausted, i as isAuthorizationExpired, d as serializeAuthorization, a as signAuthorizationMessage, j as validateAuthorizationNetwork, v as verifyAuthorizationSignature } from './signature-verification-BDzoR1MG.js';
13
+ export { h as ASSOCIATED_TOKEN_PROGRAM_ADDRESS, A as ATTESTATION_SEED, d as AttestationPDAResult, C as CREDENTIAL_SEED, e as CreateAttestationConfig, f as GHOSTSPEAK_PROGRAM_ID, c as GhostOwnershipAttestationData, G as GhostSpeakCredentialConfig, N as NATIVE_MINT_ADDRESS, S as SASAttestationHelper, a as SAS_PROGRAM_ID, b as SCHEMA_SEED, g as TOKEN_2022_PROGRAM_ADDRESS, T as TOKEN_PROGRAM_ADDRESS } from './browser-D1TpjbjZ.js';
12
14
  import { I as IPFSClient, C as ClientEncryptionService } from './feature-flags-B1g0DCPe.js';
13
15
  export { A as AccountInspectionResult, a5 as AssociatedTokenAccount, K as BatchDiagnosticReport, af as ClientEncryptionOptions, a7 as ConfidentialTransferConfig, J as DiagnosticReport, D as DiscriminatorValidationResult, ad as EncryptedData, ai as FeatureFlagManager, aj as FeatureFlags, G as GhostSpeakSDKError, a8 as InterestBearingConfig, L as LegacyAgentData, M as MigrationPlan, x as MigrationResult, ae as PrivateMetadata, R as ReputationTagEngine, _ as TokenExtension, T as TokenProgram, a6 as TransferFeeConfig, m as createDiscriminatorErrorMessage, c as createErrorContext, o as createMigrationPlan, q as createMigrationReport, d as deriveAssociatedTokenAddress, a9 as deriveMultisigPda, aa as deriveProposalPda, S as deriveSplTokenAssociatedTokenAddress, U as deriveToken2022AssociatedTokenAddress, a as detectTokenProgram, B as diagnoseAccountFromChain, F as diagnoseBatchFromChain, e as enhanceTransactionError, H as exportDiagnosticReport, Q as extractInstructionName, u as extractLegacyData, f as formatTokenAmount, ab as generateLocalPrivacyProof, W as getAllAssociatedTokenAddresses, V as getAssociatedTokenAccount, a3 as getConfidentialTransferConfig, ag as getFeatureFlags, a4 as getInterestBearingConfig, t as getMigrationInstructions, Y as getTokenProgramAddress, Z as getTokenProgramFromAddress, g as getTokenProgramType, a2 as getTransferFeeConfig, a0 as hasConfidentialTransferExtension, a1 as hasInterestBearingExtension, $ as hasTransferFeeExtension, n as inspectAccountData, ah as isFeatureEnabled, i as isToken2022Mint, O as logEnhancedError, p as parseTokenAmount, y as runAccountDiagnostics, z as runBatchDiagnostics, s as safeDecodeAgent, r as simulateMigration, v as validateAccountDiscriminator, X as validateAssociatedTokenAddress, P as validatePreconditions, ac as verifyLocalPrivacyProof, w as withEnhancedErrors, N as withEnhancedErrorsSync } from './feature-flags-B1g0DCPe.js';
14
16
  import { Rpc, GetSignaturesForAddressApi, GetTransactionApi, GetAccountInfoApi } from '@solana/rpc';
@@ -1203,16 +1205,23 @@ interface RpcClientConfig {
1203
1205
  /**
1204
1206
  * Unified RPC client with all features consolidated from multiple implementations.
1205
1207
  * This is the single source of truth for all RPC operations.
1208
+ *
1209
+ * Now powered by Gill for simplified client management while maintaining
1210
+ * full backward compatibility with the existing API.
1206
1211
  */
1207
1212
  declare class RpcClient {
1208
- private rpc;
1209
- private rpcSubscriptions?;
1213
+ private client;
1210
1214
  private commitment;
1211
1215
  private endpoint;
1212
1216
  private maxRetries;
1213
1217
  private retryDelay;
1214
1218
  private timeout;
1215
1219
  constructor(config: RpcClientConfig);
1220
+ /**
1221
+ * Get the underlying RPC client for direct access
1222
+ * This provides access to Gill's rpc object for advanced operations
1223
+ */
1224
+ get rpc(): gill.Rpc<(gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi) | (gill.RequestAirdropApi & gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi)> | gill.RpcDevnet<(gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi) | (gill.RequestAirdropApi & gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi)> | gill.RpcTestnet<(gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi) | (gill.RequestAirdropApi & gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi)> | gill.RpcMainnet<(gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi) | (gill.RequestAirdropApi & gill.GetAccountInfoApi & gill.GetBalanceApi & gill.GetBlockApi & gill.GetBlockCommitmentApi & gill.GetBlockHeightApi & gill.GetBlockProductionApi & gill.GetBlocksApi & gill.GetBlocksWithLimitApi & gill.GetBlockTimeApi & gill.GetClusterNodesApi & gill.GetEpochInfoApi & gill.GetEpochScheduleApi & gill.GetFeeForMessageApi & gill.GetFirstAvailableBlockApi & gill.GetGenesisHashApi & gill.GetHealthApi & gill.GetHighestSnapshotSlotApi & gill.GetIdentityApi & gill.GetInflationGovernorApi & gill.GetInflationRateApi & gill.GetInflationRewardApi & gill.GetLargestAccountsApi & gill.GetLatestBlockhashApi & gill.GetLeaderScheduleApi & gill.GetMaxRetransmitSlotApi & gill.GetMaxShredInsertSlotApi & gill.GetMinimumBalanceForRentExemptionApi & gill.GetMultipleAccountsApi & gill.GetProgramAccountsApi & gill.GetRecentPerformanceSamplesApi & gill.GetRecentPrioritizationFeesApi & gill.GetSignaturesForAddressApi & gill.GetSignatureStatusesApi & gill.GetSlotApi & gill.GetSlotLeaderApi & gill.GetSlotLeadersApi & gill.GetStakeMinimumDelegationApi & gill.GetSupplyApi & gill.GetTokenAccountBalanceApi & gill.GetTokenAccountsByDelegateApi & gill.GetTokenAccountsByOwnerApi & gill.GetTokenLargestAccountsApi & gill.GetTokenSupplyApi & gill.GetTransactionApi & gill.GetTransactionCountApi & gill.GetVersionApi & gill.GetVoteAccountsApi & gill.IsBlockhashValidApi & gill.MinimumLedgerSlotApi & gill.SendTransactionApi & gill.SimulateTransactionApi)>;
1216
1225
  /**
1217
1226
  * Get account information with automatic retries
1218
1227
  */
@@ -1268,9 +1277,19 @@ declare class RpcClient {
1268
1277
  }>;
1269
1278
  /**
1270
1279
  * Subscribe to account changes (WebSocket)
1271
- * Note: This is a placeholder implementation. In production, you would use the actual subscription API
1280
+ *
1281
+ * Note: This is a polling-based implementation for backward compatibility.
1282
+ * For production use with real-time subscriptions, access the rpcSubscriptions
1283
+ * directly via client.rpcSubscriptions from Gill.
1272
1284
  */
1273
1285
  subscribeToAccount(address: Address$1, callback: (accountInfo: AccountInfo$2 | null) => void): Promise<() => void>;
1286
+ /**
1287
+ * Get the underlying Gill client for advanced operations
1288
+ * This provides direct access to Gill's SolanaClient for features like:
1289
+ * - rpcSubscriptions for WebSocket subscriptions
1290
+ * - sendAndConfirmTransaction for transaction handling
1291
+ */
1292
+ getGillClient(): SolanaClient<any>;
1274
1293
  private withRetry;
1275
1294
  private parseAccountInfo;
1276
1295
  }
@@ -1514,6 +1533,115 @@ declare class ExternalIdResolver {
1514
1533
  }>;
1515
1534
  }
1516
1535
 
1536
+ interface CreateEscrowParams {
1537
+ /** Agent providing the service */
1538
+ agent: Address$1;
1539
+ /** Client's token account for payment */
1540
+ clientTokenAccount: Address$1;
1541
+ /** Vault to hold escrowed funds */
1542
+ escrowVault: Address$1;
1543
+ /** Token mint (e.g., USDC, GHOST) */
1544
+ tokenMint: Address$1;
1545
+ /** Client who is paying */
1546
+ client: TransactionSigner;
1547
+ /** Unique escrow identifier */
1548
+ escrowId: bigint;
1549
+ /** Amount to escrow */
1550
+ amount: bigint;
1551
+ /** Description of the job/service */
1552
+ jobDescription: string;
1553
+ /** Deadline timestamp (unix seconds) */
1554
+ deadline: bigint;
1555
+ }
1556
+ interface SubmitDeliveryParams {
1557
+ /** Escrow account */
1558
+ escrow: Address$1;
1559
+ /** Agent account address */
1560
+ agent: Address$1;
1561
+ /** Agent owner signer */
1562
+ agentOwner: TransactionSigner;
1563
+ /** Proof of work (IPFS hash, URL, etc.) */
1564
+ deliveryProof: string;
1565
+ }
1566
+ interface ApproveDeliveryParams {
1567
+ /** Escrow account */
1568
+ escrow: Address$1;
1569
+ /** Vault holding escrowed funds */
1570
+ escrowVault: Address$1;
1571
+ /** Agent's token account to receive payment */
1572
+ agentTokenAccount: Address$1;
1573
+ /** Client approving the delivery */
1574
+ client: TransactionSigner;
1575
+ }
1576
+ interface FileDisputeParams {
1577
+ /** Escrow account */
1578
+ escrow: Address$1;
1579
+ /** Client filing the dispute */
1580
+ client: TransactionSigner;
1581
+ /** Reason for dispute */
1582
+ reason: string;
1583
+ }
1584
+ interface ArbitrateDisputeParams {
1585
+ /** Escrow account */
1586
+ escrow: Address$1;
1587
+ /** Vault holding escrowed funds */
1588
+ escrowVault: Address$1;
1589
+ /** Client's token account (for refund) */
1590
+ clientTokenAccount: Address$1;
1591
+ /** Agent's token account (for payment) */
1592
+ agentTokenAccount: Address$1;
1593
+ /** Agent's staking account (for potential slashing) */
1594
+ agentStaking: Address$1;
1595
+ /** Arbitrator making the decision */
1596
+ arbitrator: TransactionSigner;
1597
+ /** Decision: FavorClient, FavorAgent, Split, or Invalid */
1598
+ decision: ArbitratorDecision;
1599
+ }
1600
+ declare class EscrowModule extends BaseModule {
1601
+ /**
1602
+ * Create a new escrow for a service agreement
1603
+ *
1604
+ * @param params - Escrow creation parameters
1605
+ * @returns Transaction signature
1606
+ */
1607
+ createEscrow(params: CreateEscrowParams): Promise<string>;
1608
+ /**
1609
+ * Submit proof of delivery for an escrow
1610
+ *
1611
+ * @param params - Delivery submission parameters
1612
+ * @returns Transaction signature
1613
+ */
1614
+ submitDelivery(params: SubmitDeliveryParams): Promise<string>;
1615
+ /**
1616
+ * Approve delivery and release funds to agent
1617
+ *
1618
+ * @param params - Approval parameters
1619
+ * @returns Transaction signature
1620
+ */
1621
+ approveDelivery(params: ApproveDeliveryParams): Promise<string>;
1622
+ /**
1623
+ * File a dispute for an escrow
1624
+ *
1625
+ * @param params - Dispute filing parameters
1626
+ * @returns Transaction signature
1627
+ */
1628
+ fileDispute(params: FileDisputeParams): Promise<string>;
1629
+ /**
1630
+ * Arbitrate a disputed escrow
1631
+ *
1632
+ * @param params - Arbitration parameters
1633
+ * @returns Transaction signature
1634
+ */
1635
+ arbitrateDispute(params: ArbitrateDisputeParams): Promise<string>;
1636
+ /**
1637
+ * Get escrow account data
1638
+ *
1639
+ * @param escrowAddress - The escrow account address
1640
+ * @returns Escrow data or null if not found
1641
+ */
1642
+ getEscrow(escrowAddress: Address$1): Promise<GhostProtectEscrow | null>;
1643
+ }
1644
+
1517
1645
  /**
1518
1646
  * X402 Transaction Indexer
1519
1647
  *
@@ -1618,9 +1746,12 @@ declare class X402TransactionIndexer {
1618
1746
  * Check if transaction is an x402 payment
1619
1747
  *
1620
1748
  * x402 payments are characterized by:
1621
- * - SPL token transfer (TokenProgram or Token2022Program)
1749
+ * - SPL token transfer (TokenProgram or Token2022Program) for USDC
1750
+ * - Native SOL transfer (System Program)
1622
1751
  * - Transfer TO the facilitator address
1623
1752
  * - Optional memo instruction with payment metadata
1753
+ *
1754
+ * Supports both devnet and mainnet for all payment types
1624
1755
  */
1625
1756
  private isX402Payment;
1626
1757
  /**
@@ -2583,4 +2714,4 @@ declare function checkFeatureGate(rpc: Rpc<GetAccountInfoApi>, featureGate: Addr
2583
2714
  */
2584
2715
  declare function clearFeatureGateCache(): void;
2585
2716
 
2586
- export { type AggregatedReputation, type ApiResolverConfig, type ArbitratorDecision, BaseReputationAdapter, type BatchFetchConfig, type BatchProgressCallback, CircuitBreaker, ClientEncryptionService, ContentStorageResult, DEFAULT_IPFS_CONFIG, DEFAULT_RETRY_CONFIG, type DeliverySubmittedEvent, type DisputeFiledEvent, type DisputeResolvedEvent, type EscrowCompletedEvent, type EscrowCreatedEvent, EscrowStatus, ExtendedRpcApi, ExternalIdResolver, FEATURE_GATES, FallbackHandler, type FeatureStatus, type FundingResult, type FundingStrategyOptions, GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, type GhostProtectEscrow, type GhostSlashedEvent, type GhostStakedEvent, type GhostUnstakedEvent, INSTRUCTION_MAPPINGS, IPFSClient, IPFSConfig, IPFSContentMetadata, IPFSError, IPFSErrorHandler, IPFSOperationError, IPFSOperationResult, IPFSProvider, IPFSUploadOptions, IPFSUtils, InstructionValidationError, LocalStorageProvider, MetricVisibility, MultiSourceAggregator, type PrivacyManifest, PrivacyMode, PrivacySettings, PrivateDataQuery, type PrivateDataReference, PrivateMetadataStorage, ReputationSource, type ReputationSourceAdapter, type ReputationSourceConfig, type ReputationTagsUpdatedEvent, RetryHandler, RpcClient, ScoreRange, type SignatureInfo, SlashReason, type SourceReputationData, type SourceScoreBreakdown, type StorageProvider, type StoredPrivateData, TEST_IPFS_CONFIG, type TagDecayAppliedEvent, type TagScore, VisibleReputation, WalletFundingService, type X402IndexerConfig, type X402PaymentData, X402TransactionIndexer, batchGetAccounts, batchGetAccountsWithRetry, batchGetAndMap, batchGetExistingAccounts, calculateVisibleScore, canViewerAccess, checkFeatureGate, clearFeatureGateCache, createAccountMismatchError, createBatchFetcher, createIPFSErrorHandler, createIPFSUtils, createMetadataUri, createPrivacyManifest, createTestIPFSConfig, debugInstructionCall, defaultFundingService, determineStorageMethod, enhanceErrorMessage, ensureMinimumBalance, estimateStorageCost, filterMetricsByVisibility, fundWallet, generateAccountValidationError, getAccountRequirements, getApproveDeliveryInstruction, getArbitrateDisputeInstruction, getClaimGhostInstruction, getCreateDidDocumentInstructionAsync, getCreateEscrowInstructionAsync, getDeactivateDidDocumentInstructionAsync, getDefaultMetricVisibility, getFileDisputeInstruction, getGhostProtectEscrowDecoder, getInitializeStakingConfigInstructionAsync, getInstructionMapping, getPDAAccounts, getRangeDisplayString, getRegisterAgentInstructionAsync, getReputationTier, getRequiredSigners, getResolveDidDocumentInstructionAsync, getScoreRange, getSlashStakeInstructionAsync, getStakeGhostInstructionAsync, getSubmitDeliveryInstruction, getTierDisplayName, getUnstakeGhostInstructionAsync, getUpdateDidDocumentInstructionAsync, getUpdateReputationTagsInstructionAsync, getWritableAccounts, isIPFSError, isKnownInstruction, validateInstructionAccounts, validatePrivacySettings, withIPFSErrorHandling };
2717
+ export { type AggregatedReputation, type ApiResolverConfig, type ApproveDeliveryParams, type ArbitrateDisputeParams, type ArbitratorDecision, BaseModule, BaseReputationAdapter, type BatchFetchConfig, type BatchProgressCallback, CircuitBreaker, ClientEncryptionService, ContentStorageResult, type CreateEscrowParams, DEFAULT_IPFS_CONFIG, DEFAULT_RETRY_CONFIG, type DeliverySubmittedEvent, type DisputeFiledEvent, type DisputeResolvedEvent, type EscrowCompletedEvent, type EscrowCreatedEvent, EscrowModule, EscrowStatus, ExtendedRpcApi, ExternalIdResolver, FEATURE_GATES, FallbackHandler, type FeatureStatus, type FileDisputeParams, type FundingResult, type FundingStrategyOptions, GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, type GhostProtectEscrow, type GhostSlashedEvent, type GhostStakedEvent, type GhostUnstakedEvent, INSTRUCTION_MAPPINGS, IPFSClient, IPFSConfig, IPFSContentMetadata, IPFSError, IPFSErrorHandler, IPFSOperationError, IPFSOperationResult, IPFSProvider, IPFSUploadOptions, IPFSUtils, InstructionValidationError, LocalStorageProvider, MetricVisibility, MultiSourceAggregator, type PrivacyManifest, PrivacyMode, PrivacySettings, PrivateDataQuery, type PrivateDataReference, PrivateMetadataStorage, ReputationSource, type ReputationSourceAdapter, type ReputationSourceConfig, type ReputationTagsUpdatedEvent, RetryHandler, RpcClient, ScoreRange, type SignatureInfo, SlashReason, type SourceReputationData, type SourceScoreBreakdown, type StorageProvider, type StoredPrivateData, type SubmitDeliveryParams, TEST_IPFS_CONFIG, type TagDecayAppliedEvent, type TagScore, VisibleReputation, WalletFundingService, type X402IndexerConfig, type X402PaymentData, X402TransactionIndexer, batchGetAccounts, batchGetAccountsWithRetry, batchGetAndMap, batchGetExistingAccounts, calculateVisibleScore, canViewerAccess, checkFeatureGate, clearFeatureGateCache, createAccountMismatchError, createBatchFetcher, createIPFSErrorHandler, createIPFSUtils, createMetadataUri, createPrivacyManifest, createTestIPFSConfig, debugInstructionCall, defaultFundingService, determineStorageMethod, enhanceErrorMessage, ensureMinimumBalance, estimateStorageCost, filterMetricsByVisibility, fundWallet, generateAccountValidationError, getAccountRequirements, getApproveDeliveryInstruction, getArbitrateDisputeInstruction, getClaimGhostInstruction, getCreateDidDocumentInstructionAsync, getCreateEscrowInstructionAsync, getDeactivateDidDocumentInstructionAsync, getDefaultMetricVisibility, getFileDisputeInstruction, getGhostProtectEscrowDecoder, getInitializeStakingConfigInstructionAsync, getInstructionMapping, getPDAAccounts, getRangeDisplayString, getRegisterAgentInstructionAsync, getReputationTier, getRequiredSigners, getResolveDidDocumentInstructionAsync, getScoreRange, getSlashStakeInstructionAsync, getStakeGhostInstructionAsync, getSubmitDeliveryInstruction, getTierDisplayName, getUnstakeGhostInstructionAsync, getUpdateDidDocumentInstructionAsync, getUpdateReputationTagsInstructionAsync, getWritableAccounts, isIPFSError, isKnownInstruction, validateInstructionAccounts, validatePrivacySettings, withIPFSErrorHandling };