@ghostspeak/sdk 2.0.6 → 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 (117) 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-F3DZMBUA.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-S74EH3KD.js +7890 -0
  30. package/dist/chunk-S74EH3KD.js.map +1 -0
  31. package/dist/chunk-SFTSZ3LC.js +156 -0
  32. package/dist/chunk-SFTSZ3LC.js.map +1 -0
  33. package/dist/chunk-SKMJJ3Q6.js +125 -0
  34. package/dist/chunk-SKMJJ3Q6.js.map +1 -0
  35. package/dist/chunk-SZGFSCNU.js +3682 -0
  36. package/dist/chunk-SZGFSCNU.js.map +1 -0
  37. package/dist/chunk-TTB4OS2D.js +69 -0
  38. package/dist/chunk-TTB4OS2D.js.map +1 -0
  39. package/dist/chunk-UP2VWCW5.js +33 -0
  40. package/dist/{chunk-NSBPE2FW.js.map → chunk-UP2VWCW5.js.map} +1 -1
  41. package/dist/{chunk-UJUGGLMT.js → chunk-VQZQCHUT.js} +5 -5
  42. package/dist/{chunk-UJUGGLMT.js.map → chunk-VQZQCHUT.js.map} +1 -1
  43. package/dist/client.d.ts +5 -4
  44. package/dist/client.js +11 -10
  45. package/dist/createAgentAuthorization-ULG47ZJI.js +5 -0
  46. package/dist/createAgentAuthorization-ULG47ZJI.js.map +1 -0
  47. package/dist/credentials.js +1 -1
  48. package/dist/crypto.js +2 -2
  49. package/dist/errors.js +1 -1
  50. package/dist/feature-flags-B1g0DCPe.d.ts +1181 -0
  51. package/dist/generated-EG5USUFG.js +9 -0
  52. package/dist/{generated-VNLHMR6Y.js.map → generated-EG5USUFG.js.map} +1 -1
  53. package/dist/{ghostspeak_wasm-SB2RPJ3D.js → ghostspeak_wasm-F227HOSM.js} +3 -3
  54. package/dist/{ghostspeak_wasm-SB2RPJ3D.js.map → ghostspeak_wasm-F227HOSM.js.map} +1 -1
  55. package/dist/index.d.ts +1209 -1506
  56. package/dist/index.js +600 -3532
  57. package/dist/index.js.map +1 -1
  58. package/dist/metafile-esm.json +1 -1
  59. package/dist/minimal/core-minimal.d.ts +2383 -1264
  60. package/dist/minimal/core-minimal.js +9 -9
  61. package/dist/minimal/core-minimal.js.map +1 -1
  62. package/dist/nacl-fast-W5BJ3KZ2.js +2229 -0
  63. package/dist/nacl-fast-W5BJ3KZ2.js.map +1 -0
  64. package/dist/pda-4KP7CURF.js +4 -0
  65. package/dist/pda-4KP7CURF.js.map +1 -0
  66. package/dist/pda-Ce7VYg4T.d.ts +25 -0
  67. package/dist/reputation-types-Yebf0Rm_.d.ts +1071 -0
  68. package/dist/revokeAuthorization-OK7E7OK3.js +5 -0
  69. package/dist/revokeAuthorization-OK7E7OK3.js.map +1 -0
  70. package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
  71. package/dist/types.js +1 -1
  72. package/dist/updateReputationWithAuth-Y4ONEVSP.js +5 -0
  73. package/dist/updateReputationWithAuth-Y4ONEVSP.js.map +1 -0
  74. package/dist/utils.d.ts +69 -203
  75. package/dist/utils.js +15 -153
  76. package/dist/utils.js.map +1 -1
  77. package/package.json +24 -31
  78. package/dist/.tsbuildinfo +0 -1
  79. package/dist/GhostSpeakClient-D_66Uzsf.d.ts +0 -707
  80. package/dist/GovernanceModule-DQYYys-H.d.ts +0 -1766
  81. package/dist/chunk-APCKGD23.js +0 -1328
  82. package/dist/chunk-APCKGD23.js.map +0 -1
  83. package/dist/chunk-ASQXX4IT.js +0 -572
  84. package/dist/chunk-ASQXX4IT.js.map +0 -1
  85. package/dist/chunk-COGZFWOT.js +0 -19657
  86. package/dist/chunk-COGZFWOT.js.map +0 -1
  87. package/dist/chunk-F3DZMBUA.js.map +0 -1
  88. package/dist/chunk-GMHIUK2R.js +0 -7526
  89. package/dist/chunk-GMHIUK2R.js.map +0 -1
  90. package/dist/chunk-IAWBZYPE.js +0 -356
  91. package/dist/chunk-IAWBZYPE.js.map +0 -1
  92. package/dist/chunk-NSBPE2FW.js +0 -15
  93. package/dist/chunk-OWYHJG6H.js +0 -13311
  94. package/dist/chunk-OWYHJG6H.js.map +0 -1
  95. package/dist/chunk-RDDPOFR5.js +0 -3
  96. package/dist/chunk-RDDPOFR5.js.map +0 -1
  97. package/dist/chunk-RERCHKZP.js +0 -35
  98. package/dist/chunk-RERCHKZP.js.map +0 -1
  99. package/dist/chunk-TVVGXYCI.js +0 -2887
  100. package/dist/chunk-TVVGXYCI.js.map +0 -1
  101. package/dist/chunk-ZGP5552B.js +0 -377
  102. package/dist/chunk-ZGP5552B.js.map +0 -1
  103. package/dist/chunk-ZWOYNHVK.js +0 -196
  104. package/dist/chunk-ZWOYNHVK.js.map +0 -1
  105. package/dist/dist/.tsbuildinfo +0 -1
  106. package/dist/elgamal-VZLWB3XK.js +0 -5
  107. package/dist/elgamal-VZLWB3XK.js.map +0 -1
  108. package/dist/feature-flags-V722ZuXO.d.ts +0 -3512
  109. package/dist/generated-VNLHMR6Y.js +0 -5
  110. package/dist/ipfs-types-BOt9ZNg4.d.ts +0 -592
  111. package/dist/multisigConfig-BzEhy6jy.d.ts +0 -58
  112. package/dist/pda-B_nS8SbD.d.ts +0 -114
  113. package/dist/pda-S4BFJVGE.js +0 -4
  114. package/dist/pda-S4BFJVGE.js.map +0 -1
  115. package/dist/system-addresses-BFNLEbFx.d.ts +0 -857
  116. package/dist/token-2022-rpc-RALH4RK7.js +0 -593
  117. package/dist/token-2022-rpc-RALH4RK7.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ export { REVOKE_AUTHORIZATION_DISCRIMINATOR, getRevokeAuthorizationDiscriminatorBytes, getRevokeAuthorizationInstruction, getRevokeAuthorizationInstructionDataCodec, getRevokeAuthorizationInstructionDataDecoder, getRevokeAuthorizationInstructionDataEncoder, parseRevokeAuthorizationInstruction } from './chunk-JV2SWONF.js';
2
+ import './chunk-AL3HQN73.js';
3
+ import './chunk-UP2VWCW5.js';
4
+ //# sourceMappingURL=revokeAuthorization-OK7E7OK3.js.map
5
+ //# sourceMappingURL=revokeAuthorization-OK7E7OK3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"revokeAuthorization-OK7E7OK3.js"}
@@ -0,0 +1,448 @@
1
+ import { Address } from '@solana/addresses';
2
+
3
+ /**
4
+ * Agent Authorization System Types
5
+ *
6
+ * GhostSpeak's trustless authorization mechanism for agents to
7
+ * pre-authorize reputation updates with cryptographic signatures.
8
+ *
9
+ * Built for secure, delegated reputation management across protocols.
10
+ */
11
+
12
+ /**
13
+ * Network types supported by GhostSpeak
14
+ */
15
+ type SolanaNetwork = 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet';
16
+ /**
17
+ * Configuration for on-chain authorization storage
18
+ *
19
+ * On-chain storage provides an immutable audit trail for authorizations,
20
+ * but costs ~0.002 SOL in rent. Off-chain storage (default) is free but
21
+ * requires agents to share signed authorizations with facilitators.
22
+ */
23
+ interface OnChainStorageConfig {
24
+ /** Enable on-chain storage (default: false for cost efficiency) */
25
+ enabled: boolean;
26
+ /**
27
+ * Storage fee in lamports (default: 0.002 SOL = 2000000 lamports for rent)
28
+ * This covers the account rent exemption cost on Solana
29
+ */
30
+ storageFee?: bigint;
31
+ /**
32
+ * Who pays the storage fee
33
+ * - true: Agent pays (stored authorization benefits agent's transparency)
34
+ * - false: Facilitator pays (facilitator wants on-chain proof)
35
+ * Default: true (agent pays for their own authorization storage)
36
+ */
37
+ feePayedByAgent?: boolean;
38
+ /**
39
+ * Automatically store on-chain after creation
40
+ * - true: Store immediately (requires funded wallet)
41
+ * - false: Manual storage via storeAuthorizationOnChain()
42
+ * Default: false (manual control)
43
+ */
44
+ autoStore?: boolean;
45
+ /**
46
+ * Custom fee structure for different authorization durations
47
+ * Maps duration in seconds to fee in lamports
48
+ * Example: { 2592000: 1000000n } // 30 days = 0.001 SOL
49
+ */
50
+ customFees?: Record<number, bigint>;
51
+ }
52
+ /**
53
+ * Reputation Authorization
54
+ *
55
+ * Allows an agent to pre-authorize a specific source (e.g., PayAI facilitator)
56
+ * to update their reputation a limited number of times before expiration.
57
+ */
58
+ interface ReputationAuthorization {
59
+ /** Agent's public key (the one granting authorization) */
60
+ agentAddress: Address;
61
+ /** Authorized source address (e.g., PayAI facilitator address) */
62
+ authorizedSource: Address;
63
+ /** Maximum number of reputation updates allowed */
64
+ indexLimit: number;
65
+ /** Unix timestamp when authorization expires */
66
+ expiresAt: number;
67
+ /** Solana network this authorization is valid on */
68
+ network: SolanaNetwork;
69
+ /** Ed25519 signature (64 bytes) proving agent's intent */
70
+ signature: Uint8Array;
71
+ /** Optional nonce to prevent replay attacks */
72
+ nonce?: string;
73
+ /** Optional metadata */
74
+ metadata?: AuthorizationMetadata;
75
+ }
76
+ /**
77
+ * Authorization metadata (optional fields)
78
+ */
79
+ interface AuthorizationMetadata {
80
+ /** Human-readable description */
81
+ description?: string;
82
+ /** Tags for categorization */
83
+ tags?: string[];
84
+ /** Custom data */
85
+ customData?: Record<string, unknown>;
86
+ /** Creation timestamp */
87
+ createdAt?: number;
88
+ /** Version of authorization format */
89
+ version?: string;
90
+ }
91
+ /**
92
+ * Authorization Proof
93
+ *
94
+ * Result of verifying a reputation authorization
95
+ */
96
+ interface AuthorizationProof {
97
+ /** The authorization being verified */
98
+ authorization: ReputationAuthorization;
99
+ /** Current index (number of times used) */
100
+ currentIndex: number;
101
+ /** Whether the authorization is valid */
102
+ isValid: boolean;
103
+ /** Reason if invalid */
104
+ invalidReason?: AuthorizationInvalidReason;
105
+ /** Timestamp when verification was performed */
106
+ verifiedAt: number;
107
+ /** Verification metadata */
108
+ verificationDetails?: VerificationDetails;
109
+ }
110
+ /**
111
+ * Reasons why an authorization might be invalid
112
+ */
113
+ declare enum AuthorizationInvalidReason {
114
+ EXPIRED = "expired",
115
+ INDEX_LIMIT_EXCEEDED = "index_limit_exceeded",
116
+ INVALID_SIGNATURE = "invalid_signature",
117
+ NETWORK_MISMATCH = "network_mismatch",
118
+ REVOKED = "revoked",
119
+ NOT_YET_VALID = "not_yet_valid",
120
+ MALFORMED = "malformed"
121
+ }
122
+ /**
123
+ * Verification details
124
+ */
125
+ interface VerificationDetails {
126
+ /** Whether signature was verified */
127
+ signatureVerified: boolean;
128
+ /** Whether expiration was checked */
129
+ expirationChecked: boolean;
130
+ /** Whether index limit was checked */
131
+ indexLimitChecked: boolean;
132
+ /** Whether network matched */
133
+ networkMatched: boolean;
134
+ /** Additional notes */
135
+ notes?: string[];
136
+ }
137
+ /**
138
+ * Authorization message to be signed
139
+ *
140
+ * This message is hashed and signed by the agent's private key
141
+ */
142
+ interface AuthorizationMessage {
143
+ /** Agent granting authorization */
144
+ agentAddress: Address;
145
+ /** Source being authorized */
146
+ authorizedSource: Address;
147
+ /** Maximum updates allowed */
148
+ indexLimit: number;
149
+ /** Expiration timestamp */
150
+ expiresAt: number;
151
+ /** Network */
152
+ network: SolanaNetwork;
153
+ /** Optional nonce */
154
+ nonce?: string;
155
+ }
156
+ /**
157
+ * Authorization creation parameters
158
+ */
159
+ interface CreateAuthorizationParams {
160
+ /** Authorized source (e.g., PayAI facilitator) */
161
+ authorizedSource: Address;
162
+ /** Maximum number of updates (default: 1000) */
163
+ indexLimit?: number;
164
+ /** Expiration time in seconds from now (default: 30 days) */
165
+ expiresIn?: number;
166
+ /** Specific expiration timestamp (overrides expiresIn) */
167
+ expiresAt?: number;
168
+ /** Network (defaults to current cluster) */
169
+ network?: SolanaNetwork;
170
+ /** Optional nonce for replay protection */
171
+ nonce?: string;
172
+ /** Optional metadata */
173
+ metadata?: AuthorizationMetadata;
174
+ /**
175
+ * Whether to store authorization on-chain (default: false)
176
+ * @deprecated Use onChainStorage.enabled instead
177
+ */
178
+ storeOnChain?: boolean;
179
+ /**
180
+ * On-chain storage configuration
181
+ * If not provided, defaults to off-chain (free) storage
182
+ */
183
+ onChainStorage?: OnChainStorageConfig;
184
+ }
185
+ /**
186
+ * Authorization verification parameters
187
+ */
188
+ interface VerifyAuthorizationParams {
189
+ /** Authorization to verify */
190
+ authorization: ReputationAuthorization;
191
+ /** Current index (number of times used) */
192
+ currentIndex: number;
193
+ /** Whether to check on-chain status (default: false) */
194
+ checkOnChain?: boolean;
195
+ /** Expected network (defaults to current cluster) */
196
+ expectedNetwork?: SolanaNetwork;
197
+ }
198
+ /**
199
+ * Authorization update record
200
+ *
201
+ * Tracks when an authorization was used for a reputation update
202
+ */
203
+ interface AuthorizationUsage {
204
+ /** Authorization ID */
205
+ authorizationId: string;
206
+ /** Agent address */
207
+ agentAddress: Address;
208
+ /** Authorized source */
209
+ authorizedSource: Address;
210
+ /** Index at time of use */
211
+ index: number;
212
+ /** Reputation change applied */
213
+ reputationChange: number;
214
+ /** Timestamp of usage */
215
+ usedAt: number;
216
+ /** Transaction signature (if on-chain) */
217
+ transactionSignature?: string;
218
+ /** Usage metadata */
219
+ metadata?: Record<string, unknown>;
220
+ }
221
+ /**
222
+ * Authorization status
223
+ */
224
+ declare enum AuthorizationStatus {
225
+ ACTIVE = "active",
226
+ EXPIRED = "expired",
227
+ EXHAUSTED = "exhausted",// Index limit reached
228
+ REVOKED = "revoked",
229
+ PENDING = "pending"
230
+ }
231
+ /**
232
+ * Authorization with status
233
+ */
234
+ interface AuthorizationWithStatus extends ReputationAuthorization {
235
+ /** Current status */
236
+ status: AuthorizationStatus;
237
+ /** Current usage count */
238
+ currentIndex: number;
239
+ /** Remaining uses */
240
+ remainingUses: number;
241
+ /** Whether currently valid */
242
+ isValid: boolean;
243
+ /** Last used timestamp */
244
+ lastUsedAt?: number;
245
+ /** Authorization ID (derived from signature or on-chain account) */
246
+ id: string;
247
+ }
248
+ /**
249
+ * Batch authorization verification result
250
+ */
251
+ interface BatchAuthorizationVerification {
252
+ /** Total authorizations checked */
253
+ total: number;
254
+ /** Number of valid authorizations */
255
+ valid: number;
256
+ /** Number of invalid authorizations */
257
+ invalid: number;
258
+ /** Individual results */
259
+ results: AuthorizationProof[];
260
+ /** Verification timestamp */
261
+ verifiedAt: number;
262
+ }
263
+ /**
264
+ * Authorization revocation
265
+ */
266
+ interface AuthorizationRevocation {
267
+ /** Authorization being revoked */
268
+ authorizationId: string;
269
+ /** Agent revoking (must match authorization.agentAddress) */
270
+ agentAddress: Address;
271
+ /** Reason for revocation */
272
+ reason?: string;
273
+ /** Revocation timestamp */
274
+ revokedAt: number;
275
+ /** Signature proving revocation intent */
276
+ signature: Uint8Array;
277
+ /** Transaction signature (if on-chain) */
278
+ transactionSignature?: string;
279
+ }
280
+ /**
281
+ * Authorization query filter
282
+ */
283
+ interface AuthorizationFilter {
284
+ /** Filter by agent address */
285
+ agentAddress?: Address;
286
+ /** Filter by authorized source */
287
+ authorizedSource?: Address;
288
+ /** Filter by status */
289
+ status?: AuthorizationStatus | AuthorizationStatus[];
290
+ /** Filter by network */
291
+ network?: SolanaNetwork;
292
+ /** Filter by expiration (before/after timestamp) */
293
+ expiresAfter?: number;
294
+ expiresBefore?: number;
295
+ /** Filter by creation time */
296
+ createdAfter?: number;
297
+ createdBefore?: number;
298
+ /** Pagination */
299
+ limit?: number;
300
+ offset?: number;
301
+ }
302
+
303
+ /**
304
+ * Agent Authorization Signature Verification
305
+ *
306
+ * Ed25519 signature creation and verification for GhostSpeak's
307
+ * trustless agent pre-authorization system.
308
+ *
309
+ * Enables verifiable delegation of reputation update authority.
310
+ */
311
+
312
+ /**
313
+ * Keypair interface for Ed25519 signing operations
314
+ * Compatible with both legacy and modern Solana key formats
315
+ */
316
+ interface SigningKeypair {
317
+ publicKey: {
318
+ toBase58(): string;
319
+ toBytes(): Uint8Array;
320
+ };
321
+ secretKey: Uint8Array;
322
+ }
323
+ /**
324
+ * Create authorization message for signing
325
+ *
326
+ * Message format:
327
+ * - Domain separator (prevents cross-protocol replay)
328
+ * - Agent address (32 bytes)
329
+ * - Authorized source (32 bytes)
330
+ * - Index limit (8 bytes, u64 big-endian)
331
+ * - Expiration timestamp (8 bytes, u64 big-endian)
332
+ * - Network string (variable length)
333
+ * - Nonce (optional, 32 bytes if present)
334
+ *
335
+ * @param message - Authorization message parameters
336
+ * @returns Buffer ready for signing
337
+ */
338
+ declare function createAuthorizationMessage(message: AuthorizationMessage): Buffer;
339
+ /**
340
+ * Sign authorization message with agent's private key
341
+ *
342
+ * @param message - Authorization message to sign
343
+ * @param agentKeypair - Agent's keypair (must match message.agentAddress)
344
+ * @returns Ed25519 signature (64 bytes)
345
+ */
346
+ declare function signAuthorizationMessage(message: AuthorizationMessage, agentKeypair: SigningKeypair): Promise<Uint8Array>;
347
+ /**
348
+ * Verify authorization signature
349
+ *
350
+ * @param authorization - Authorization to verify
351
+ * @returns True if signature is valid
352
+ */
353
+ declare function verifyAuthorizationSignature(authorization: ReputationAuthorization): Promise<boolean>;
354
+ /**
355
+ * Create a complete authorization with signature
356
+ *
357
+ * @param params - Authorization parameters
358
+ * @param agentKeypair - Agent's keypair for signing
359
+ * @returns Complete signed authorization
360
+ */
361
+ declare function createSignedAuthorization(params: CreateAuthorizationParams, agentKeypair: SigningKeypair): Promise<ReputationAuthorization>;
362
+ /**
363
+ * Generate a random nonce for replay protection
364
+ *
365
+ * @returns 32-byte random nonce as hex string
366
+ */
367
+ declare function generateNonce(): string;
368
+ /**
369
+ * Serialize authorization to JSON-safe format
370
+ *
371
+ * @param authorization - Authorization to serialize
372
+ * @returns JSON-safe object (signature as base58)
373
+ */
374
+ declare function serializeAuthorization(authorization: ReputationAuthorization): {
375
+ agentAddress: string;
376
+ authorizedSource: string;
377
+ indexLimit: number;
378
+ expiresAt: number;
379
+ network: SolanaNetwork;
380
+ signature: string;
381
+ nonce?: string;
382
+ metadata?: any;
383
+ };
384
+ /**
385
+ * Deserialize authorization from JSON format
386
+ *
387
+ * @param data - Serialized authorization data
388
+ * @returns ReputationAuthorization with Uint8Array signature
389
+ */
390
+ declare function deserializeAuthorization(data: {
391
+ agentAddress: string;
392
+ authorizedSource: string;
393
+ indexLimit: number;
394
+ expiresAt: number;
395
+ network: SolanaNetwork;
396
+ signature: string;
397
+ nonce?: string;
398
+ metadata?: any;
399
+ }): ReputationAuthorization;
400
+ /**
401
+ * Get authorization ID (deterministic hash)
402
+ *
403
+ * @param authorization - Authorization to hash
404
+ * @returns Base58-encoded SHA-256 hash
405
+ */
406
+ declare function getAuthorizationId(authorization: ReputationAuthorization): Promise<string>;
407
+ /**
408
+ * Check if authorization is expired
409
+ *
410
+ * @param authorization - Authorization to check
411
+ * @param currentTime - Current Unix timestamp (defaults to now)
412
+ * @returns True if expired
413
+ */
414
+ declare function isAuthorizationExpired(authorization: ReputationAuthorization, currentTime?: number): boolean;
415
+ /**
416
+ * Check if authorization has exceeded index limit
417
+ *
418
+ * @param authorization - Authorization to check
419
+ * @param currentIndex - Current usage count
420
+ * @returns True if exhausted
421
+ */
422
+ declare function isAuthorizationExhausted(authorization: ReputationAuthorization, currentIndex: number): boolean;
423
+ /**
424
+ * Validate authorization network matches expected
425
+ *
426
+ * @param authorization - Authorization to check
427
+ * @param expectedNetwork - Expected network
428
+ * @returns True if networks match
429
+ */
430
+ declare function validateAuthorizationNetwork(authorization: ReputationAuthorization, expectedNetwork: SolanaNetwork): boolean;
431
+
432
+ type signatureVerification_SigningKeypair = SigningKeypair;
433
+ declare const signatureVerification_createAuthorizationMessage: typeof createAuthorizationMessage;
434
+ declare const signatureVerification_createSignedAuthorization: typeof createSignedAuthorization;
435
+ declare const signatureVerification_deserializeAuthorization: typeof deserializeAuthorization;
436
+ declare const signatureVerification_generateNonce: typeof generateNonce;
437
+ declare const signatureVerification_getAuthorizationId: typeof getAuthorizationId;
438
+ declare const signatureVerification_isAuthorizationExhausted: typeof isAuthorizationExhausted;
439
+ declare const signatureVerification_isAuthorizationExpired: typeof isAuthorizationExpired;
440
+ declare const signatureVerification_serializeAuthorization: typeof serializeAuthorization;
441
+ declare const signatureVerification_signAuthorizationMessage: typeof signAuthorizationMessage;
442
+ declare const signatureVerification_validateAuthorizationNetwork: typeof validateAuthorizationNetwork;
443
+ declare const signatureVerification_verifyAuthorizationSignature: typeof verifyAuthorizationSignature;
444
+ declare namespace signatureVerification {
445
+ export { type signatureVerification_SigningKeypair as SigningKeypair, signatureVerification_createAuthorizationMessage as createAuthorizationMessage, signatureVerification_createSignedAuthorization as createSignedAuthorization, signatureVerification_deserializeAuthorization as deserializeAuthorization, signatureVerification_generateNonce as generateNonce, signatureVerification_getAuthorizationId as getAuthorizationId, signatureVerification_isAuthorizationExhausted as isAuthorizationExhausted, signatureVerification_isAuthorizationExpired as isAuthorizationExpired, signatureVerification_serializeAuthorization as serializeAuthorization, signatureVerification_signAuthorizationMessage as signAuthorizationMessage, signatureVerification_validateAuthorizationNetwork as validateAuthorizationNetwork, signatureVerification_verifyAuthorizationSignature as verifyAuthorizationSignature };
446
+ }
447
+
448
+ export { AuthorizationStatus as A, type BatchAuthorizationVerification as B, type CreateAuthorizationParams as C, type OnChainStorageConfig as O, type ReputationAuthorization as R, type SigningKeypair as S, type VerificationDetails as V, signAuthorizationMessage as a, createSignedAuthorization as b, createAuthorizationMessage as c, serializeAuthorization as d, deserializeAuthorization as e, getAuthorizationId as f, generateNonce as g, isAuthorizationExhausted as h, isAuthorizationExpired as i, validateAuthorizationNetwork as j, type AuthorizationWithStatus as k, type AuthorizationFilter as l, type SolanaNetwork as m, type AuthorizationMetadata as n, type AuthorizationProof as o, AuthorizationInvalidReason as p, type AuthorizationMessage as q, type VerifyAuthorizationParams as r, signatureVerification as s, type AuthorizationUsage as t, type AuthorizationRevocation as u, verifyAuthorizationSignature as v };
package/dist/types.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { AgentType, ChannelType, ErrorCode, EscrowStatus, MessageType, ParticipantType, isError, isSuccess, unwrap } from './chunk-SRS2SKFS.js';
2
- import './chunk-NSBPE2FW.js';
2
+ import './chunk-UP2VWCW5.js';
3
3
  //# sourceMappingURL=types.js.map
4
4
  //# sourceMappingURL=types.js.map
@@ -0,0 +1,5 @@
1
+ export { UPDATE_REPUTATION_WITH_AUTH_DISCRIMINATOR, getUpdateReputationWithAuthDiscriminatorBytes, getUpdateReputationWithAuthInstruction, getUpdateReputationWithAuthInstructionAsync, getUpdateReputationWithAuthInstructionDataCodec, getUpdateReputationWithAuthInstructionDataDecoder, getUpdateReputationWithAuthInstructionDataEncoder, parseUpdateReputationWithAuthInstruction } from './chunk-KB6CKIUK.js';
2
+ import './chunk-AL3HQN73.js';
3
+ import './chunk-UP2VWCW5.js';
4
+ //# sourceMappingURL=updateReputationWithAuth-Y4ONEVSP.js.map
5
+ //# sourceMappingURL=updateReputationWithAuth-Y4ONEVSP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"updateReputationWithAuth-Y4ONEVSP.js"}