@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.
- package/README.md +152 -30
- package/dist/GhostSpeakClient-CWmGaM9Q.d.ts +1007 -0
- package/dist/StakingModule-C5rzuOWb.d.ts +2526 -0
- package/dist/{agent-M74TCRON.js → agent-5YLZ7DAC.js} +4 -4
- package/dist/{agent-M74TCRON.js.map → agent-5YLZ7DAC.js.map} +1 -1
- package/dist/batch-operations-45CQFEID.js +4 -0
- package/dist/batch-operations-45CQFEID.js.map +1 -0
- package/dist/browser.d.ts +45 -554
- package/dist/browser.js +15 -842
- package/dist/browser.js.map +1 -1
- package/dist/chunk-AL3HQN73.js +754 -0
- package/dist/chunk-AL3HQN73.js.map +1 -0
- package/dist/chunk-BF3IQ35I.js +284 -0
- package/dist/chunk-BF3IQ35I.js.map +1 -0
- package/dist/chunk-BQDGRTVP.js +168 -0
- package/dist/chunk-BQDGRTVP.js.map +1 -0
- package/dist/chunk-C5CDA3WX.js +7314 -0
- package/dist/chunk-C5CDA3WX.js.map +1 -0
- package/dist/chunk-E3FD2CNY.js +1869 -0
- package/dist/chunk-E3FD2CNY.js.map +1 -0
- package/dist/{chunk-F3DZMBUA.js → chunk-G7S6B6WB.js} +327 -493
- package/dist/chunk-G7S6B6WB.js.map +1 -0
- package/dist/chunk-IHVDQ4YI.js +4231 -0
- package/dist/chunk-IHVDQ4YI.js.map +1 -0
- package/dist/chunk-JV2SWONF.js +98 -0
- package/dist/chunk-JV2SWONF.js.map +1 -0
- package/dist/chunk-KB6CKIUK.js +231 -0
- package/dist/chunk-KB6CKIUK.js.map +1 -0
- package/dist/chunk-S74EH3KD.js +7890 -0
- package/dist/chunk-S74EH3KD.js.map +1 -0
- package/dist/chunk-SFTSZ3LC.js +156 -0
- package/dist/chunk-SFTSZ3LC.js.map +1 -0
- package/dist/chunk-SKMJJ3Q6.js +125 -0
- package/dist/chunk-SKMJJ3Q6.js.map +1 -0
- package/dist/chunk-SZGFSCNU.js +3682 -0
- package/dist/chunk-SZGFSCNU.js.map +1 -0
- package/dist/chunk-TTB4OS2D.js +69 -0
- package/dist/chunk-TTB4OS2D.js.map +1 -0
- package/dist/chunk-UP2VWCW5.js +33 -0
- package/dist/{chunk-NSBPE2FW.js.map → chunk-UP2VWCW5.js.map} +1 -1
- package/dist/{chunk-UJUGGLMT.js → chunk-VQZQCHUT.js} +5 -5
- package/dist/{chunk-UJUGGLMT.js.map → chunk-VQZQCHUT.js.map} +1 -1
- package/dist/client.d.ts +5 -4
- package/dist/client.js +11 -10
- package/dist/createAgentAuthorization-ULG47ZJI.js +5 -0
- package/dist/createAgentAuthorization-ULG47ZJI.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-EG5USUFG.js +9 -0
- package/dist/{generated-VNLHMR6Y.js.map → generated-EG5USUFG.js.map} +1 -1
- package/dist/{ghostspeak_wasm-SB2RPJ3D.js → ghostspeak_wasm-F227HOSM.js} +3 -3
- package/dist/{ghostspeak_wasm-SB2RPJ3D.js.map → ghostspeak_wasm-F227HOSM.js.map} +1 -1
- package/dist/index.d.ts +1209 -1506
- package/dist/index.js +600 -3532
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/minimal/core-minimal.d.ts +2383 -1264
- package/dist/minimal/core-minimal.js +9 -9
- package/dist/minimal/core-minimal.js.map +1 -1
- package/dist/nacl-fast-W5BJ3KZ2.js +2229 -0
- package/dist/nacl-fast-W5BJ3KZ2.js.map +1 -0
- package/dist/pda-4KP7CURF.js +4 -0
- package/dist/pda-4KP7CURF.js.map +1 -0
- package/dist/pda-Ce7VYg4T.d.ts +25 -0
- package/dist/reputation-types-Yebf0Rm_.d.ts +1071 -0
- package/dist/revokeAuthorization-OK7E7OK3.js +5 -0
- package/dist/revokeAuthorization-OK7E7OK3.js.map +1 -0
- package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
- package/dist/types.js +1 -1
- package/dist/updateReputationWithAuth-Y4ONEVSP.js +5 -0
- package/dist/updateReputationWithAuth-Y4ONEVSP.js.map +1 -0
- package/dist/utils.d.ts +69 -203
- package/dist/utils.js +15 -153
- package/dist/utils.js.map +1 -1
- package/package.json +24 -31
- 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
|
@@ -0,0 +1,1071 @@
|
|
|
1
|
+
import { Address, Option, ReadonlyUint8Array } from '@solana/kit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
5
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
6
|
+
* to add features, then rerun Codama to update it.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/codama-idl/codama
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Types of execution conditions */
|
|
12
|
+
declare enum ConditionType {
|
|
13
|
+
TimeDelay = 0,
|
|
14
|
+
TokenBalance = 1,
|
|
15
|
+
PriceThreshold = 2,
|
|
16
|
+
VoteCount = 3,
|
|
17
|
+
ExternalOracle = 4,
|
|
18
|
+
CustomLogic = 5
|
|
19
|
+
}
|
|
20
|
+
type ConditionTypeArgs = ConditionType;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
24
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
25
|
+
* to add features, then rerun Codama to update it.
|
|
26
|
+
*
|
|
27
|
+
* @see https://github.com/codama-idl/codama
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/** Vote delegation information */
|
|
31
|
+
type DelegationInfo = {
|
|
32
|
+
/** Original delegator */
|
|
33
|
+
delegator: Address;
|
|
34
|
+
/** Delegation timestamp */
|
|
35
|
+
delegatedAt: bigint;
|
|
36
|
+
/** Delegation scope */
|
|
37
|
+
scope: DelegationScope;
|
|
38
|
+
/** Delegation expiry */
|
|
39
|
+
expiresAt: Option<bigint>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
44
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
45
|
+
* to add features, then rerun Codama to update it.
|
|
46
|
+
*
|
|
47
|
+
* @see https://github.com/codama-idl/codama
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/** Scope of vote delegation */
|
|
51
|
+
type DelegationScope = {
|
|
52
|
+
__kind: "All";
|
|
53
|
+
} | {
|
|
54
|
+
__kind: "ProposalType";
|
|
55
|
+
fields: readonly [ProposalType];
|
|
56
|
+
} | {
|
|
57
|
+
__kind: "SingleProposal";
|
|
58
|
+
} | {
|
|
59
|
+
__kind: "Limited";
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
64
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
65
|
+
* to add features, then rerun Codama to update it.
|
|
66
|
+
*
|
|
67
|
+
* @see https://github.com/codama-idl/codama
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/** Execution conditions for transactions */
|
|
71
|
+
type ExecutionCondition = {
|
|
72
|
+
/** Condition type */
|
|
73
|
+
conditionType: ConditionType;
|
|
74
|
+
/** Target value/threshold */
|
|
75
|
+
targetValue: bigint;
|
|
76
|
+
/** Current value */
|
|
77
|
+
currentValue: bigint;
|
|
78
|
+
/** Condition met */
|
|
79
|
+
met: boolean;
|
|
80
|
+
/** Condition description */
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
type ExecutionConditionArgs = {
|
|
84
|
+
/** Condition type */
|
|
85
|
+
conditionType: ConditionTypeArgs;
|
|
86
|
+
/** Target value/threshold */
|
|
87
|
+
targetValue: number | bigint;
|
|
88
|
+
/** Current value */
|
|
89
|
+
currentValue: number | bigint;
|
|
90
|
+
/** Condition met */
|
|
91
|
+
met: boolean;
|
|
92
|
+
/** Condition description */
|
|
93
|
+
description: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
98
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
99
|
+
* to add features, then rerun Codama to update it.
|
|
100
|
+
*
|
|
101
|
+
* @see https://github.com/codama-idl/codama
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
/** Execution parameters for proposals */
|
|
105
|
+
type ExecutionParams = {
|
|
106
|
+
/** Instructions to execute if passed */
|
|
107
|
+
instructions: Array<ProposalInstruction>;
|
|
108
|
+
/** Time delay before execution */
|
|
109
|
+
executionDelay: bigint;
|
|
110
|
+
/** Execution conditions */
|
|
111
|
+
executionConditions: Array<ExecutionCondition>;
|
|
112
|
+
/** Can be cancelled after approval */
|
|
113
|
+
cancellable: boolean;
|
|
114
|
+
/** Automatic execution enabled */
|
|
115
|
+
autoExecute: boolean;
|
|
116
|
+
/** Required execution authority */
|
|
117
|
+
executionAuthority: Address;
|
|
118
|
+
};
|
|
119
|
+
type ExecutionParamsArgs = {
|
|
120
|
+
/** Instructions to execute if passed */
|
|
121
|
+
instructions: Array<ProposalInstructionArgs>;
|
|
122
|
+
/** Time delay before execution */
|
|
123
|
+
executionDelay: number | bigint;
|
|
124
|
+
/** Execution conditions */
|
|
125
|
+
executionConditions: Array<ExecutionConditionArgs>;
|
|
126
|
+
/** Can be cancelled after approval */
|
|
127
|
+
cancellable: boolean;
|
|
128
|
+
/** Automatic execution enabled */
|
|
129
|
+
autoExecute: boolean;
|
|
130
|
+
/** Required execution authority */
|
|
131
|
+
executionAuthority: Address;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
136
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
137
|
+
* to add features, then rerun Codama to update it.
|
|
138
|
+
*
|
|
139
|
+
* @see https://github.com/codama-idl/codama
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
/** Account specification for proposal instruction */
|
|
143
|
+
type ProposalAccount = {
|
|
144
|
+
/** Account public key */
|
|
145
|
+
pubkey: Address;
|
|
146
|
+
/** Is signer required */
|
|
147
|
+
isSigner: boolean;
|
|
148
|
+
/** Is writable */
|
|
149
|
+
isWritable: boolean;
|
|
150
|
+
/** Account description */
|
|
151
|
+
description: string;
|
|
152
|
+
};
|
|
153
|
+
type ProposalAccountArgs = ProposalAccount;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
157
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
158
|
+
* to add features, then rerun Codama to update it.
|
|
159
|
+
*
|
|
160
|
+
* @see https://github.com/codama-idl/codama
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
/** Individual instruction in proposal */
|
|
164
|
+
type ProposalInstruction = {
|
|
165
|
+
/** Target program */
|
|
166
|
+
programId: Address;
|
|
167
|
+
/** Accounts required */
|
|
168
|
+
accounts: Array<ProposalAccount>;
|
|
169
|
+
/** Instruction data */
|
|
170
|
+
data: ReadonlyUint8Array;
|
|
171
|
+
/** Instruction description */
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
174
|
+
type ProposalInstructionArgs = {
|
|
175
|
+
/** Target program */
|
|
176
|
+
programId: Address;
|
|
177
|
+
/** Accounts required */
|
|
178
|
+
accounts: Array<ProposalAccountArgs>;
|
|
179
|
+
/** Instruction data */
|
|
180
|
+
data: ReadonlyUint8Array;
|
|
181
|
+
/** Instruction description */
|
|
182
|
+
description: string;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
187
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
188
|
+
* to add features, then rerun Codama to update it.
|
|
189
|
+
*
|
|
190
|
+
* @see https://github.com/codama-idl/codama
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
/** Proposal metadata */
|
|
194
|
+
type ProposalMetadata = {
|
|
195
|
+
/** IPFS hash for detailed proposal */
|
|
196
|
+
ipfsHash: Option<string>;
|
|
197
|
+
/** External references */
|
|
198
|
+
externalReferences: Array<string>;
|
|
199
|
+
/** Proposal tags */
|
|
200
|
+
tags: Array<string>;
|
|
201
|
+
/** Risk assessment */
|
|
202
|
+
riskAssessment: Option<string>;
|
|
203
|
+
/** Impact analysis */
|
|
204
|
+
impactAnalysis: Option<string>;
|
|
205
|
+
/** Implementation timeline */
|
|
206
|
+
implementationTimeline: Option<string>;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
211
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
212
|
+
* to add features, then rerun Codama to update it.
|
|
213
|
+
*
|
|
214
|
+
* @see https://github.com/codama-idl/codama
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/** Proposal execution status */
|
|
218
|
+
declare enum ProposalStatus {
|
|
219
|
+
Draft = 0,
|
|
220
|
+
Active = 1,
|
|
221
|
+
Passed = 2,
|
|
222
|
+
Failed = 3,
|
|
223
|
+
Executed = 4,
|
|
224
|
+
Cancelled = 5,
|
|
225
|
+
Expired = 6,
|
|
226
|
+
Queued = 7
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
231
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
232
|
+
* to add features, then rerun Codama to update it.
|
|
233
|
+
*
|
|
234
|
+
* @see https://github.com/codama-idl/codama
|
|
235
|
+
*/
|
|
236
|
+
|
|
237
|
+
/** Types of governance proposals */
|
|
238
|
+
declare enum ProposalType {
|
|
239
|
+
ParameterUpdate = 0,
|
|
240
|
+
ProtocolUpgrade = 1,
|
|
241
|
+
TreasuryOperation = 2,
|
|
242
|
+
FeeUpdate = 3,
|
|
243
|
+
SecurityUpdate = 4,
|
|
244
|
+
GovernanceUpdate = 5,
|
|
245
|
+
EmergencyAction = 6,
|
|
246
|
+
Custom = 7
|
|
247
|
+
}
|
|
248
|
+
type ProposalTypeArgs = ProposalType;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
252
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
253
|
+
* to add features, then rerun Codama to update it.
|
|
254
|
+
*
|
|
255
|
+
* @see https://github.com/codama-idl/codama
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
/** Methods for calculating quorum */
|
|
259
|
+
declare enum QuorumMethod {
|
|
260
|
+
Absolute = 0,
|
|
261
|
+
Relative = 1,
|
|
262
|
+
Weighted = 2,
|
|
263
|
+
Dynamic = 3
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
268
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
269
|
+
* to add features, then rerun Codama to update it.
|
|
270
|
+
*
|
|
271
|
+
* @see https://github.com/codama-idl/codama
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
/** Quorum requirements for proposals */
|
|
275
|
+
type QuorumRequirements = {
|
|
276
|
+
/** Minimum participation rate (0-100) */
|
|
277
|
+
minimumParticipation: number;
|
|
278
|
+
/** Approval threshold (0-100) */
|
|
279
|
+
approvalThreshold: number;
|
|
280
|
+
/** Super majority required */
|
|
281
|
+
superMajorityRequired: boolean;
|
|
282
|
+
/** Minimum total voting power */
|
|
283
|
+
minimumVotingPower: bigint;
|
|
284
|
+
/** Quorum calculation method */
|
|
285
|
+
quorumMethod: QuorumMethod;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
290
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
291
|
+
* to add features, then rerun Codama to update it.
|
|
292
|
+
*
|
|
293
|
+
* @see https://github.com/codama-idl/codama
|
|
294
|
+
*/
|
|
295
|
+
|
|
296
|
+
/** Individual vote record */
|
|
297
|
+
type Vote = {
|
|
298
|
+
/** Voter public key */
|
|
299
|
+
voter: Address;
|
|
300
|
+
/** Vote choice */
|
|
301
|
+
choice: VoteChoice;
|
|
302
|
+
/** Voting power used */
|
|
303
|
+
votingPower: bigint;
|
|
304
|
+
/** Vote timestamp */
|
|
305
|
+
votedAt: bigint;
|
|
306
|
+
/** Vote reasoning (optional) */
|
|
307
|
+
reasoning: Option<string>;
|
|
308
|
+
/** Delegation info (if delegated vote) */
|
|
309
|
+
delegationInfo: Option<DelegationInfo>;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
314
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
315
|
+
* to add features, then rerun Codama to update it.
|
|
316
|
+
*
|
|
317
|
+
* @see https://github.com/codama-idl/codama
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
/** Vote choices */
|
|
321
|
+
declare enum VoteChoice {
|
|
322
|
+
For = 0,
|
|
323
|
+
Against = 1,
|
|
324
|
+
Abstain = 2
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
329
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
330
|
+
* to add features, then rerun Codama to update it.
|
|
331
|
+
*
|
|
332
|
+
* @see https://github.com/codama-idl/codama
|
|
333
|
+
*/
|
|
334
|
+
|
|
335
|
+
/** Voting results for proposal */
|
|
336
|
+
type VotingResults = {
|
|
337
|
+
/** Total votes for */
|
|
338
|
+
votesFor: bigint;
|
|
339
|
+
/** Total votes against */
|
|
340
|
+
votesAgainst: bigint;
|
|
341
|
+
/** Total votes abstain */
|
|
342
|
+
votesAbstain: bigint;
|
|
343
|
+
/** Total voting power */
|
|
344
|
+
totalVotingPower: bigint;
|
|
345
|
+
/** Participation rate */
|
|
346
|
+
participationRate: number;
|
|
347
|
+
/** Individual votes */
|
|
348
|
+
individualVotes: Array<Vote>;
|
|
349
|
+
/** Weighted voting enabled */
|
|
350
|
+
weightedVoting: boolean;
|
|
351
|
+
/** Quorum reached */
|
|
352
|
+
quorumReached: boolean;
|
|
353
|
+
/** Approval threshold met */
|
|
354
|
+
approvalThresholdMet: boolean;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
359
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
360
|
+
* to add features, then rerun Codama to update it.
|
|
361
|
+
*
|
|
362
|
+
* @see https://github.com/codama-idl/codama
|
|
363
|
+
*/
|
|
364
|
+
|
|
365
|
+
type GovernanceProposal = {
|
|
366
|
+
discriminator: ReadonlyUint8Array;
|
|
367
|
+
/** Proposal ID */
|
|
368
|
+
proposalId: bigint;
|
|
369
|
+
/** Proposer */
|
|
370
|
+
proposer: Address;
|
|
371
|
+
/** Proposal title */
|
|
372
|
+
title: string;
|
|
373
|
+
/** Proposal description */
|
|
374
|
+
description: string;
|
|
375
|
+
/** Proposal type */
|
|
376
|
+
proposalType: ProposalType;
|
|
377
|
+
/** Creation timestamp */
|
|
378
|
+
createdAt: bigint;
|
|
379
|
+
/** Voting start timestamp */
|
|
380
|
+
votingStartsAt: bigint;
|
|
381
|
+
/** Voting end timestamp */
|
|
382
|
+
votingEndsAt: bigint;
|
|
383
|
+
/** Execution timestamp (if approved) */
|
|
384
|
+
executionTimestamp: Option<bigint>;
|
|
385
|
+
/** Proposal status */
|
|
386
|
+
status: ProposalStatus;
|
|
387
|
+
/** Voting results */
|
|
388
|
+
votingResults: VotingResults;
|
|
389
|
+
/** Execution parameters */
|
|
390
|
+
executionParams: ExecutionParams;
|
|
391
|
+
/** Quorum requirements */
|
|
392
|
+
quorumRequirements: QuorumRequirements;
|
|
393
|
+
/** Proposal metadata */
|
|
394
|
+
metadata: ProposalMetadata;
|
|
395
|
+
/** Reserved space */
|
|
396
|
+
reserved: ReadonlyUint8Array;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* IPFS configuration and types for GhostSpeak SDK
|
|
401
|
+
*/
|
|
402
|
+
/**
|
|
403
|
+
* IPFS provider configuration
|
|
404
|
+
*/
|
|
405
|
+
interface IPFSProviderConfig {
|
|
406
|
+
/** Provider name */
|
|
407
|
+
name: 'pinata' | 'infura' | 'ipfs-http-client' | 'web3-storage' | 'custom' | 'test';
|
|
408
|
+
/** API endpoint URL */
|
|
409
|
+
endpoint?: string;
|
|
410
|
+
/** API key for authentication */
|
|
411
|
+
apiKey?: string;
|
|
412
|
+
/** API secret for authentication */
|
|
413
|
+
apiSecret?: string;
|
|
414
|
+
/** JWT token for authentication */
|
|
415
|
+
jwt?: string;
|
|
416
|
+
/** Custom headers */
|
|
417
|
+
headers?: Record<string, string>;
|
|
418
|
+
/** Request timeout in milliseconds */
|
|
419
|
+
timeout?: number;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* IPFS client configuration
|
|
423
|
+
*/
|
|
424
|
+
interface IPFSConfig {
|
|
425
|
+
/** Primary provider */
|
|
426
|
+
provider: IPFSProviderConfig;
|
|
427
|
+
/** Fallback providers */
|
|
428
|
+
fallbackProviders?: IPFSProviderConfig[];
|
|
429
|
+
/** Default IPFS gateway for retrieving content */
|
|
430
|
+
gateway?: string;
|
|
431
|
+
/** Additional gateways for redundancy */
|
|
432
|
+
gateways?: string[];
|
|
433
|
+
/** Whether to automatically pin uploaded content */
|
|
434
|
+
autoPinning?: boolean;
|
|
435
|
+
/** Content size threshold for IPFS (bytes) - content above this will use IPFS */
|
|
436
|
+
sizeThreshold?: number;
|
|
437
|
+
/** Maximum retry attempts for failed operations */
|
|
438
|
+
maxRetries?: number;
|
|
439
|
+
/** Retry delay in milliseconds */
|
|
440
|
+
retryDelay?: number;
|
|
441
|
+
/** Enable caching of IPFS content */
|
|
442
|
+
enableCache?: boolean;
|
|
443
|
+
/** Cache TTL in milliseconds */
|
|
444
|
+
cacheTTL?: number;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* IPFS upload options
|
|
448
|
+
*/
|
|
449
|
+
interface IPFSUploadOptions {
|
|
450
|
+
/** Pin the content after upload */
|
|
451
|
+
pin?: boolean;
|
|
452
|
+
/** Custom filename for the content */
|
|
453
|
+
filename?: string;
|
|
454
|
+
/** Metadata to associate with the upload */
|
|
455
|
+
metadata?: Record<string, unknown>;
|
|
456
|
+
/** Content type/MIME type */
|
|
457
|
+
contentType?: string;
|
|
458
|
+
/** Whether to wrap in directory */
|
|
459
|
+
wrapWithDirectory?: boolean;
|
|
460
|
+
/** Progress callback for large uploads */
|
|
461
|
+
onProgress?: (uploaded: number, total: number) => void;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* IPFS upload result
|
|
465
|
+
*/
|
|
466
|
+
interface IPFSUploadResult {
|
|
467
|
+
/** IPFS hash/CID of the uploaded content */
|
|
468
|
+
hash: string;
|
|
469
|
+
/** Full IPFS URI (ipfs://<hash>) */
|
|
470
|
+
uri: string;
|
|
471
|
+
/** Size of uploaded content in bytes */
|
|
472
|
+
size: number;
|
|
473
|
+
/** Upload timestamp */
|
|
474
|
+
timestamp: number;
|
|
475
|
+
/** Whether content was pinned */
|
|
476
|
+
pinned: boolean;
|
|
477
|
+
/** Gateway URLs for accessing the content */
|
|
478
|
+
gateways: string[];
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* IPFS retrieval options
|
|
482
|
+
*/
|
|
483
|
+
interface IPFSRetrievalOptions {
|
|
484
|
+
/** Preferred gateway to use */
|
|
485
|
+
gateway?: string;
|
|
486
|
+
/** Timeout for retrieval in milliseconds */
|
|
487
|
+
timeout?: number;
|
|
488
|
+
/** Whether to cache retrieved content */
|
|
489
|
+
cache?: boolean;
|
|
490
|
+
/** Content type to expect */
|
|
491
|
+
expectedType?: string;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* IPFS retrieval result
|
|
495
|
+
*/
|
|
496
|
+
interface IPFSRetrievalResult {
|
|
497
|
+
/** Retrieved content */
|
|
498
|
+
content: string | Uint8Array;
|
|
499
|
+
/** Content type */
|
|
500
|
+
contentType?: string;
|
|
501
|
+
/** Content size in bytes */
|
|
502
|
+
size: number;
|
|
503
|
+
/** IPFS hash */
|
|
504
|
+
hash: string;
|
|
505
|
+
/** Gateway used for retrieval */
|
|
506
|
+
gateway: string;
|
|
507
|
+
/** Whether content was served from cache */
|
|
508
|
+
fromCache: boolean;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* IPFS pin operation result
|
|
512
|
+
*/
|
|
513
|
+
interface IPFSPinResult {
|
|
514
|
+
/** IPFS hash that was pinned */
|
|
515
|
+
hash: string;
|
|
516
|
+
/** Whether pin was successful */
|
|
517
|
+
success: boolean;
|
|
518
|
+
/** Pin status */
|
|
519
|
+
status: 'pinned' | 'pinning' | 'failed';
|
|
520
|
+
/** Error message if failed */
|
|
521
|
+
error?: string;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* IPFS content metadata for large content storage
|
|
525
|
+
*/
|
|
526
|
+
interface IPFSContentMetadata {
|
|
527
|
+
/** Type of content stored */
|
|
528
|
+
type: 'agent-metadata' | 'channel-message' | 'file-attachment' | 'custom';
|
|
529
|
+
/** Original content size before IPFS storage */
|
|
530
|
+
originalSize: number;
|
|
531
|
+
/** IPFS hash of the content */
|
|
532
|
+
ipfsHash: string;
|
|
533
|
+
/** Content encoding used */
|
|
534
|
+
encoding?: 'utf8' | 'base64' | 'binary';
|
|
535
|
+
/** Compression algorithm used */
|
|
536
|
+
compression?: 'gzip' | 'brotli' | 'none';
|
|
537
|
+
/** Content MIME type */
|
|
538
|
+
mimeType?: string;
|
|
539
|
+
/** Upload timestamp */
|
|
540
|
+
uploadedAt: number;
|
|
541
|
+
/** Whether content is pinned */
|
|
542
|
+
pinned: boolean;
|
|
543
|
+
/** Checksum for integrity verification */
|
|
544
|
+
checksum?: string;
|
|
545
|
+
/** Additional metadata */
|
|
546
|
+
metadata?: Record<string, unknown>;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Error types for IPFS operations
|
|
550
|
+
*/
|
|
551
|
+
type IPFSError = 'UPLOAD_FAILED' | 'RETRIEVAL_FAILED' | 'PIN_FAILED' | 'UNPIN_FAILED' | 'PROVIDER_ERROR' | 'NETWORK_ERROR' | 'TIMEOUT_ERROR' | 'INVALID_HASH' | 'INVALID_CONFIG' | 'CONTENT_TOO_LARGE' | 'QUOTA_EXCEEDED' | 'AUTHENTICATION_FAILED';
|
|
552
|
+
/**
|
|
553
|
+
* IPFS operation result with error handling
|
|
554
|
+
*/
|
|
555
|
+
interface IPFSOperationResult<T> {
|
|
556
|
+
/** Whether operation was successful */
|
|
557
|
+
success: boolean;
|
|
558
|
+
/** Result data if successful */
|
|
559
|
+
data?: T;
|
|
560
|
+
/** Error type if failed */
|
|
561
|
+
error?: IPFSError;
|
|
562
|
+
/** Human-readable error message */
|
|
563
|
+
message?: string;
|
|
564
|
+
/** Operation duration in milliseconds */
|
|
565
|
+
duration?: number;
|
|
566
|
+
/** Provider used for the operation */
|
|
567
|
+
provider?: string;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Utility type for content that can be stored on IPFS or inline
|
|
571
|
+
*/
|
|
572
|
+
interface FlexibleContent {
|
|
573
|
+
/** Content stored inline (for small content) */
|
|
574
|
+
inline?: string;
|
|
575
|
+
/** IPFS reference (for large content) */
|
|
576
|
+
ipfs?: IPFSContentMetadata;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Helper type for converting content to IPFS when size threshold is exceeded
|
|
580
|
+
*/
|
|
581
|
+
interface ContentStorageResult {
|
|
582
|
+
/** Final content URI (either data: or ipfs:) */
|
|
583
|
+
uri: string;
|
|
584
|
+
/** Whether content was stored on IPFS */
|
|
585
|
+
useIpfs: boolean;
|
|
586
|
+
/** IPFS metadata if stored on IPFS */
|
|
587
|
+
ipfsMetadata?: IPFSContentMetadata;
|
|
588
|
+
/** Content size in bytes */
|
|
589
|
+
size: number;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Reputation Tags System
|
|
594
|
+
*
|
|
595
|
+
* Granular tagging system for agent reputation with confidence scoring.
|
|
596
|
+
* Tags are automatically assigned based on metrics and evidence strength.
|
|
597
|
+
*
|
|
598
|
+
* Three tag categories:
|
|
599
|
+
* - Skill Tags: Technical capabilities and domain expertise
|
|
600
|
+
* - Behavior Tags: Service quality patterns and reliability
|
|
601
|
+
* - Compliance Tags: Regulatory and security compliance status
|
|
602
|
+
*/
|
|
603
|
+
/**
|
|
604
|
+
* Tag confidence score (basis points)
|
|
605
|
+
* 0-10000 where 10000 = 100% confidence
|
|
606
|
+
*/
|
|
607
|
+
interface TagScore {
|
|
608
|
+
/** Tag identifier (e.g., "fast-responder", "defi-expert") */
|
|
609
|
+
tagName: string;
|
|
610
|
+
/** Confidence level in basis points (0-10000) */
|
|
611
|
+
confidence: number;
|
|
612
|
+
/** Number of supporting data points */
|
|
613
|
+
evidenceCount: number;
|
|
614
|
+
/** Timestamp when tag was last updated */
|
|
615
|
+
lastUpdated: number;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Tag categories for organization
|
|
619
|
+
*/
|
|
620
|
+
declare enum TagCategory {
|
|
621
|
+
Skill = "skill",
|
|
622
|
+
Behavior = "behavior",
|
|
623
|
+
Compliance = "compliance"
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Skill-based reputation tags (20+ tags)
|
|
627
|
+
*
|
|
628
|
+
* These tags indicate technical capabilities and domain expertise
|
|
629
|
+
* based on service delivery patterns and client feedback.
|
|
630
|
+
*/
|
|
631
|
+
declare enum SkillTag {
|
|
632
|
+
CodeGeneration = "code-generation",
|
|
633
|
+
DataAnalysis = "data-analysis",
|
|
634
|
+
ContentCreation = "content-creation",
|
|
635
|
+
ImageGeneration = "image-generation",
|
|
636
|
+
AudioProcessing = "audio-processing",
|
|
637
|
+
VideoProcessing = "video-processing",
|
|
638
|
+
NaturalLanguageProcessing = "nlp-specialist",
|
|
639
|
+
ComputerVision = "computer-vision",
|
|
640
|
+
ReinforcementLearning = "reinforcement-learning",
|
|
641
|
+
DeFiExpert = "defi-expert",
|
|
642
|
+
NFTSpecialist = "nft-specialist",
|
|
643
|
+
SmartContractAudit = "smart-contract-audit",
|
|
644
|
+
BlockchainDevelopment = "blockchain-dev",
|
|
645
|
+
DAOGovernance = "dao-governance",
|
|
646
|
+
GameDevelopment = "game-dev",
|
|
647
|
+
WebDevelopment = "web-dev",
|
|
648
|
+
MobileDevelopment = "mobile-dev",
|
|
649
|
+
APIIntegration = "api-integration",
|
|
650
|
+
DatabaseManagement = "database-management",
|
|
651
|
+
DevOpsAutomation = "devops-automation",
|
|
652
|
+
FinancialAnalysis = "financial-analysis",
|
|
653
|
+
MarketResearch = "market-research",
|
|
654
|
+
LegalCompliance = "legal-compliance",
|
|
655
|
+
CustomerSupport = "customer-support",
|
|
656
|
+
TranslationServices = "translation-services",
|
|
657
|
+
SecurityAudit = "security-audit",
|
|
658
|
+
PenetrationTesting = "penetration-testing",
|
|
659
|
+
ThreatDetection = "threat-detection",
|
|
660
|
+
IncidentResponse = "incident-response",
|
|
661
|
+
DataEngineering = "data-engineering",
|
|
662
|
+
DataVisualization = "data-visualization",
|
|
663
|
+
PredictiveModeling = "predictive-modeling",
|
|
664
|
+
StatisticalAnalysis = "statistical-analysis"
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Behavior-based reputation tags (20+ tags)
|
|
668
|
+
*
|
|
669
|
+
* These tags indicate service quality patterns, reliability,
|
|
670
|
+
* and professional conduct based on performance metrics.
|
|
671
|
+
*/
|
|
672
|
+
declare enum BehaviorTag {
|
|
673
|
+
FastResponder = "fast-responder",// avg < 60s
|
|
674
|
+
QuickResponder = "quick-responder",// avg < 5min
|
|
675
|
+
SameDay = "same-day",// avg < 24h
|
|
676
|
+
ConsistentQuality = "consistent-quality",// low variance in ratings
|
|
677
|
+
HighQuality = "high-quality",// avg rating > 4.5
|
|
678
|
+
TopRated = "top-rated",// avg rating > 4.8
|
|
679
|
+
PerfectRecord = "perfect-record",// 100% success rate
|
|
680
|
+
HighVolume = "high-volume",// >1000 transactions
|
|
681
|
+
VeryHighVolume = "very-high-volume",// >10000 transactions
|
|
682
|
+
MegaVolume = "mega-volume",// >100000 transactions
|
|
683
|
+
LongTermActive = "long-term-active",// active >1 year
|
|
684
|
+
MultiYear = "multi-year",// active >3 years
|
|
685
|
+
CategorySpecialist = "category-specialist",// >80% in one category
|
|
686
|
+
MultiDomain = "multi-domain",// active in 5+ categories
|
|
687
|
+
Generalist = "generalist",// balanced across categories
|
|
688
|
+
DisputeFree = "dispute-free",// 0 disputes in 90 days
|
|
689
|
+
LowDispute = "low-dispute",// <1% dispute rate
|
|
690
|
+
HighResolution = "high-resolution",// >90% disputes resolved favorably
|
|
691
|
+
PlatinumTier = "platinum-tier",// reputation >9000
|
|
692
|
+
GoldTier = "gold-tier",// reputation >7500
|
|
693
|
+
SilverTier = "silver-tier",// reputation >5000
|
|
694
|
+
BronzeTier = "bronze-tier",// reputation >2000
|
|
695
|
+
Responsive = "responsive",// quick message replies
|
|
696
|
+
Communicative = "communicative",// frequent updates
|
|
697
|
+
Proactive = "proactive",// ahead of schedule
|
|
698
|
+
DetailOriented = "detail-oriented",// thorough documentation
|
|
699
|
+
VerifiedIdentity = "verified-identity",// KYC completed
|
|
700
|
+
LongStanding = "long-standing",// established reputation
|
|
701
|
+
CommunityTrusted = "community-trusted",// high peer ratings
|
|
702
|
+
ClientFavorite = "client-favorite"
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Compliance-based reputation tags (10+ tags)
|
|
706
|
+
*
|
|
707
|
+
* These tags indicate regulatory compliance, security certifications,
|
|
708
|
+
* and adherence to industry standards.
|
|
709
|
+
*/
|
|
710
|
+
declare enum ComplianceTag {
|
|
711
|
+
KYCVerified = "kyc-verified",// Know Your Customer verification complete
|
|
712
|
+
KYBVerified = "kyb-verified",// Know Your Business verification complete
|
|
713
|
+
AccreditedInvestor = "accredited-investor",// SEC accreditation
|
|
714
|
+
SOC2Compliant = "soc2-compliant",// SOC 2 Type II certification
|
|
715
|
+
ISO27001 = "iso-27001",// ISO 27001 certified
|
|
716
|
+
GDPR = "gdpr-compliant",// GDPR compliant processing
|
|
717
|
+
HIPAA = "hipaa-compliant",// HIPAA compliant for healthcare data
|
|
718
|
+
PCI_DSS = "pci-dss",// PCI DSS for payment card data
|
|
719
|
+
AuditedCode = "audited-code",// Smart contract audit completed
|
|
720
|
+
BugBounty = "bug-bounty",// Active bug bounty program
|
|
721
|
+
OpenSource = "open-source",// Open source codebase
|
|
722
|
+
InsuredService = "insured-service",// Service liability insurance
|
|
723
|
+
BondedAgent = "bonded-agent",// Performance bond posted
|
|
724
|
+
LicensedProfessional = "licensed-professional",// Professional license verified
|
|
725
|
+
RegulatedEntity = "regulated-entity",// Operating under regulatory framework
|
|
726
|
+
PublicAuditTrail = "public-audit-trail",// Public transaction history
|
|
727
|
+
TransparentPricing = "transparent-pricing",// Clear pricing structure
|
|
728
|
+
VerifiedMetrics = "verified-metrics"
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Tag assignment criteria
|
|
732
|
+
* Defines the rules for automatic tag assignment
|
|
733
|
+
*/
|
|
734
|
+
interface TagCriteria {
|
|
735
|
+
/** Tag to assign */
|
|
736
|
+
tag: SkillTag | BehaviorTag | ComplianceTag;
|
|
737
|
+
/** Category of the tag */
|
|
738
|
+
category: TagCategory;
|
|
739
|
+
/** Minimum confidence threshold (basis points) */
|
|
740
|
+
minConfidence: number;
|
|
741
|
+
/** Evaluation function */
|
|
742
|
+
evaluate: (metrics: ReputationMetrics) => TagEvaluation;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Result of tag evaluation
|
|
746
|
+
*/
|
|
747
|
+
interface TagEvaluation {
|
|
748
|
+
/** Whether tag should be assigned */
|
|
749
|
+
shouldAssign: boolean;
|
|
750
|
+
/** Confidence score (0-10000 basis points) */
|
|
751
|
+
confidence: number;
|
|
752
|
+
/** Evidence count supporting this tag */
|
|
753
|
+
evidenceCount: number;
|
|
754
|
+
/** Explanation of why tag was assigned */
|
|
755
|
+
reason?: string;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Reputation metrics for tag evaluation
|
|
759
|
+
*/
|
|
760
|
+
interface ReputationMetrics {
|
|
761
|
+
successfulPayments: bigint;
|
|
762
|
+
failedPayments: bigint;
|
|
763
|
+
totalResponseTime: bigint;
|
|
764
|
+
responseTimeCount: bigint;
|
|
765
|
+
totalDisputes: number;
|
|
766
|
+
disputesResolved: number;
|
|
767
|
+
totalRating: number;
|
|
768
|
+
totalRatingsCount: number;
|
|
769
|
+
createdAt: number;
|
|
770
|
+
updatedAt: number;
|
|
771
|
+
avgResponseTime: number;
|
|
772
|
+
successRate: number;
|
|
773
|
+
avgRating: number;
|
|
774
|
+
disputeResolutionRate: number;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Tag filtering options
|
|
778
|
+
*/
|
|
779
|
+
interface TagFilters {
|
|
780
|
+
/** Filter by category */
|
|
781
|
+
category?: TagCategory;
|
|
782
|
+
/** Minimum confidence threshold */
|
|
783
|
+
minConfidence?: number;
|
|
784
|
+
/** Maximum age in seconds */
|
|
785
|
+
maxAge?: number;
|
|
786
|
+
/** Include only active tags */
|
|
787
|
+
activeOnly?: boolean;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Tag update request
|
|
791
|
+
*/
|
|
792
|
+
interface TagUpdateRequest {
|
|
793
|
+
/** Tag name to update */
|
|
794
|
+
tagName: string;
|
|
795
|
+
/** New confidence score */
|
|
796
|
+
confidence: number;
|
|
797
|
+
/** Evidence count */
|
|
798
|
+
evidenceCount: number;
|
|
799
|
+
/** Timestamp */
|
|
800
|
+
timestamp?: number;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Bulk tag update request
|
|
804
|
+
*/
|
|
805
|
+
interface BulkTagUpdateRequest {
|
|
806
|
+
/** Skill tags to add */
|
|
807
|
+
skillTags?: string[];
|
|
808
|
+
/** Behavior tags to add */
|
|
809
|
+
behaviorTags?: string[];
|
|
810
|
+
/** Compliance tags to add */
|
|
811
|
+
complianceTags?: string[];
|
|
812
|
+
/** Tag scores to update */
|
|
813
|
+
tagScores?: TagUpdateRequest[];
|
|
814
|
+
/** Timestamp for updates */
|
|
815
|
+
timestamp?: number;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Tag query result
|
|
819
|
+
*/
|
|
820
|
+
interface TagQueryResult {
|
|
821
|
+
/** All tags */
|
|
822
|
+
allTags: string[];
|
|
823
|
+
/** Skill tags */
|
|
824
|
+
skillTags: string[];
|
|
825
|
+
/** Behavior tags */
|
|
826
|
+
behaviorTags: string[];
|
|
827
|
+
/** Compliance tags */
|
|
828
|
+
complianceTags: string[];
|
|
829
|
+
/** Tag scores */
|
|
830
|
+
tagScores: TagScore[];
|
|
831
|
+
/** Last updated timestamp */
|
|
832
|
+
lastUpdated: number;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* Constants for tag system
|
|
836
|
+
*/
|
|
837
|
+
declare const TAG_CONSTANTS: {
|
|
838
|
+
/** Maximum skill tags per agent */
|
|
839
|
+
readonly MAX_SKILL_TAGS: 20;
|
|
840
|
+
/** Maximum behavior tags per agent */
|
|
841
|
+
readonly MAX_BEHAVIOR_TAGS: 20;
|
|
842
|
+
/** Maximum compliance tags per agent */
|
|
843
|
+
readonly MAX_COMPLIANCE_TAGS: 10;
|
|
844
|
+
/** Maximum total tag scores */
|
|
845
|
+
readonly MAX_TAG_SCORES: 50;
|
|
846
|
+
/** Maximum tag name length */
|
|
847
|
+
readonly MAX_TAG_NAME_LENGTH: 32;
|
|
848
|
+
/** Stale tag threshold (90 days in seconds) */
|
|
849
|
+
readonly STALE_TAG_THRESHOLD: number;
|
|
850
|
+
/** Minimum confidence for tag assignment */
|
|
851
|
+
readonly MIN_TAG_CONFIDENCE: 5000;
|
|
852
|
+
/** Maximum confidence */
|
|
853
|
+
readonly MAX_TAG_CONFIDENCE: 10000;
|
|
854
|
+
/** Basis points max */
|
|
855
|
+
readonly BASIS_POINTS_MAX: 10000;
|
|
856
|
+
};
|
|
857
|
+
/**
|
|
858
|
+
* Tag decay configuration
|
|
859
|
+
*/
|
|
860
|
+
interface TagDecayConfig {
|
|
861
|
+
/** Decay rate per day (basis points) */
|
|
862
|
+
decayRatePerDay: number;
|
|
863
|
+
/** Minimum confidence before removal */
|
|
864
|
+
minConfidence: number;
|
|
865
|
+
/** Maximum age before forced decay */
|
|
866
|
+
maxAgeSeconds: number;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Default tag decay settings
|
|
870
|
+
*/
|
|
871
|
+
declare const DEFAULT_TAG_DECAY: TagDecayConfig;
|
|
872
|
+
/**
|
|
873
|
+
* Tag confidence levels
|
|
874
|
+
*/
|
|
875
|
+
declare enum TagConfidenceLevel {
|
|
876
|
+
VeryLow = 2000,// 20%
|
|
877
|
+
Low = 4000,// 40%
|
|
878
|
+
Medium = 6000,// 60%
|
|
879
|
+
High = 8000,// 80%
|
|
880
|
+
VeryHigh = 9500,// 95%
|
|
881
|
+
Absolute = 10000
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Reputation tier levels
|
|
886
|
+
*/
|
|
887
|
+
declare enum ReputationTier {
|
|
888
|
+
None = "None",
|
|
889
|
+
Bronze = "Bronze",
|
|
890
|
+
Silver = "Silver",
|
|
891
|
+
Gold = "Gold",
|
|
892
|
+
Platinum = "Platinum"
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Badge types for reputation achievements
|
|
896
|
+
*/
|
|
897
|
+
declare enum BadgeType {
|
|
898
|
+
FirstJob = "FirstJob",
|
|
899
|
+
TenJobs = "TenJobs",
|
|
900
|
+
HundredJobs = "HundredJobs",
|
|
901
|
+
ThousandJobs = "ThousandJobs",
|
|
902
|
+
PerfectRating = "PerfectRating",
|
|
903
|
+
QuickResponder = "QuickResponder",
|
|
904
|
+
HighEarner = "HighEarner",
|
|
905
|
+
DisputeResolver = "DisputeResolver",
|
|
906
|
+
CategoryExpert = "CategoryExpert",
|
|
907
|
+
CrossCategoryMaster = "CrossCategoryMaster"
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Reputation calculation factors with weights
|
|
911
|
+
*/
|
|
912
|
+
interface ReputationFactors {
|
|
913
|
+
/** Completion rate weight (0-100) */
|
|
914
|
+
completionWeight: number;
|
|
915
|
+
/** Quality score weight (0-100) */
|
|
916
|
+
qualityWeight: number;
|
|
917
|
+
/** Timeliness weight (0-100) */
|
|
918
|
+
timelinessWeight: number;
|
|
919
|
+
/** Client satisfaction weight (0-100) */
|
|
920
|
+
satisfactionWeight: number;
|
|
921
|
+
/** Dispute resolution weight (0-100) */
|
|
922
|
+
disputeWeight: number;
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Category-specific reputation data
|
|
926
|
+
*/
|
|
927
|
+
interface CategoryReputation {
|
|
928
|
+
/** Category identifier (e.g., "defi", "nft", "gaming") */
|
|
929
|
+
category: string;
|
|
930
|
+
/** Current reputation score in this category (basis points) */
|
|
931
|
+
score: number;
|
|
932
|
+
/** Total completed jobs in this category */
|
|
933
|
+
completedJobs: number;
|
|
934
|
+
/** Average completion time in seconds */
|
|
935
|
+
avgCompletionTime: number;
|
|
936
|
+
/** Quality ratings sum */
|
|
937
|
+
qualitySum: number;
|
|
938
|
+
/** Number of quality ratings */
|
|
939
|
+
qualityCount: number;
|
|
940
|
+
/** Last activity timestamp */
|
|
941
|
+
lastActivity: number;
|
|
942
|
+
/** Total earnings in this category */
|
|
943
|
+
totalEarnings: number;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Performance snapshot for historical tracking
|
|
947
|
+
*/
|
|
948
|
+
interface PerformanceSnapshot {
|
|
949
|
+
/** Timestamp of snapshot */
|
|
950
|
+
timestamp: number;
|
|
951
|
+
/** Reputation score at this time */
|
|
952
|
+
score: number;
|
|
953
|
+
/** Jobs completed in this period */
|
|
954
|
+
jobsCompleted: number;
|
|
955
|
+
/** Average quality rating */
|
|
956
|
+
avgQuality: number;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Reputation badge structure
|
|
960
|
+
*/
|
|
961
|
+
interface ReputationBadge {
|
|
962
|
+
/** Badge identifier */
|
|
963
|
+
badgeType: BadgeType;
|
|
964
|
+
/** Timestamp when earned */
|
|
965
|
+
earnedAt: number;
|
|
966
|
+
/** Associated achievement value */
|
|
967
|
+
achievementValue: number;
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* Main reputation data structure
|
|
971
|
+
*/
|
|
972
|
+
interface ReputationData {
|
|
973
|
+
/** Agent public key */
|
|
974
|
+
agent: Address;
|
|
975
|
+
/** Overall reputation score (basis points) */
|
|
976
|
+
overallScore: number;
|
|
977
|
+
/** Current reputation tier */
|
|
978
|
+
tier: ReputationTier;
|
|
979
|
+
/** Category-specific reputations */
|
|
980
|
+
categoryReputations: CategoryReputation[];
|
|
981
|
+
/** Total staked reputation tokens */
|
|
982
|
+
stakedAmount: number;
|
|
983
|
+
/** Reputation calculation factors */
|
|
984
|
+
factors: ReputationFactors;
|
|
985
|
+
/** Total completed jobs across all categories */
|
|
986
|
+
totalJobsCompleted: number;
|
|
987
|
+
/** Total failed/cancelled jobs */
|
|
988
|
+
totalJobsFailed: number;
|
|
989
|
+
/** Average response time in seconds */
|
|
990
|
+
avgResponseTime: number;
|
|
991
|
+
/** Number of disputes filed against agent */
|
|
992
|
+
disputesAgainst: number;
|
|
993
|
+
/** Number of disputes resolved favorably */
|
|
994
|
+
disputesResolved: number;
|
|
995
|
+
/** Last reputation update timestamp */
|
|
996
|
+
lastUpdated: number;
|
|
997
|
+
/** Creation timestamp */
|
|
998
|
+
createdAt: number;
|
|
999
|
+
/** Historical performance data */
|
|
1000
|
+
performanceHistory: PerformanceSnapshot[];
|
|
1001
|
+
/** Reputation badges earned */
|
|
1002
|
+
badges: ReputationBadge[];
|
|
1003
|
+
/** Cross-category reputation transfer enabled */
|
|
1004
|
+
crossCategoryEnabled: boolean;
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Job performance data for reputation calculation
|
|
1008
|
+
*/
|
|
1009
|
+
interface JobPerformance {
|
|
1010
|
+
/** Whether job was completed successfully */
|
|
1011
|
+
completed: boolean;
|
|
1012
|
+
/** Quality rating (0-100) */
|
|
1013
|
+
qualityRating: number;
|
|
1014
|
+
/** Expected duration in seconds */
|
|
1015
|
+
expectedDuration: number;
|
|
1016
|
+
/** Actual duration in seconds */
|
|
1017
|
+
actualDuration: number;
|
|
1018
|
+
/** Client satisfaction (0-100) */
|
|
1019
|
+
clientSatisfaction: number;
|
|
1020
|
+
/** Whether there was a dispute */
|
|
1021
|
+
hadDispute: boolean;
|
|
1022
|
+
/** Whether dispute was resolved favorably for agent */
|
|
1023
|
+
disputeResolvedFavorably: boolean;
|
|
1024
|
+
/** Job category */
|
|
1025
|
+
category: string;
|
|
1026
|
+
/** Payment amount */
|
|
1027
|
+
paymentAmount: number;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Reputation calculation result
|
|
1031
|
+
*/
|
|
1032
|
+
interface ReputationCalculationResult {
|
|
1033
|
+
/** New overall score */
|
|
1034
|
+
overallScore: number;
|
|
1035
|
+
/** Score for this specific job */
|
|
1036
|
+
jobScore: number;
|
|
1037
|
+
/** Category-specific score */
|
|
1038
|
+
categoryScore: number;
|
|
1039
|
+
/** New reputation tier */
|
|
1040
|
+
tier: ReputationTier;
|
|
1041
|
+
/** Badges earned from this update */
|
|
1042
|
+
newBadges: BadgeType[];
|
|
1043
|
+
/** Whether fraud was detected */
|
|
1044
|
+
fraudDetected: boolean;
|
|
1045
|
+
/** Fraud risk score (0-100) */
|
|
1046
|
+
fraudRiskScore: number;
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Constants for reputation calculations
|
|
1050
|
+
*/
|
|
1051
|
+
declare const REPUTATION_CONSTANTS: {
|
|
1052
|
+
/** Maximum reputation score (basis points) */
|
|
1053
|
+
MAX_REPUTATION_SCORE: number;
|
|
1054
|
+
/** Minimum reputation score for slashing */
|
|
1055
|
+
MIN_REPUTATION_FOR_SLASH: number;
|
|
1056
|
+
/** Reputation decay rate per day (basis points) */
|
|
1057
|
+
REPUTATION_DECAY_RATE_BPS: number;
|
|
1058
|
+
/** Tier thresholds (basis points) */
|
|
1059
|
+
BRONZE_TIER_THRESHOLD: number;
|
|
1060
|
+
SILVER_TIER_THRESHOLD: number;
|
|
1061
|
+
GOLD_TIER_THRESHOLD: number;
|
|
1062
|
+
PLATINUM_TIER_THRESHOLD: number;
|
|
1063
|
+
/** Maximum categories per agent */
|
|
1064
|
+
MAX_REPUTATION_CATEGORIES: number;
|
|
1065
|
+
/** Maximum performance history entries */
|
|
1066
|
+
MAX_PERFORMANCE_HISTORY: number;
|
|
1067
|
+
/** Maximum badges per agent */
|
|
1068
|
+
MAX_BADGES: number;
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
export { type BulkTagUpdateRequest as A, BadgeType as B, type ContentStorageResult as C, DEFAULT_TAG_DECAY as D, type ExecutionParamsArgs as E, ProposalStatus as F, type GovernanceProposal as G, type IPFSProviderConfig as H, type IPFSConfig as I, type JobPerformance as J, type FlexibleContent as K, type PerformanceSnapshot as P, type QuorumRequirements as Q, type ReputationData as R, SkillTag as S, type TagDecayConfig as T, VoteChoice as V, type ReputationCalculationResult as a, type ReputationMetrics as b, type TagScore as c, type TagFilters as d, type TagQueryResult as e, type VotingResults as f, type IPFSUploadOptions as g, type IPFSOperationResult as h, type IPFSUploadResult as i, type IPFSRetrievalOptions as j, type IPFSRetrievalResult as k, type IPFSPinResult as l, type IPFSContentMetadata as m, type ProposalTypeArgs as n, type CategoryReputation as o, ReputationTier as p, TagCategory as q, type IPFSError as r, REPUTATION_CONSTANTS as s, BehaviorTag as t, ComplianceTag as u, TAG_CONSTANTS as v, TagConfidenceLevel as w, type TagCriteria as x, type TagEvaluation as y, type TagUpdateRequest as z };
|