@ghostspeak/sdk 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -30
- package/dist/GhostSpeakClient-CWmGaM9Q.d.ts +1007 -0
- package/dist/StakingModule-C5rzuOWb.d.ts +2526 -0
- package/dist/{agent-M74TCRON.js → agent-5YLZ7DAC.js} +4 -4
- package/dist/{agent-M74TCRON.js.map → agent-5YLZ7DAC.js.map} +1 -1
- package/dist/batch-operations-45CQFEID.js +4 -0
- package/dist/batch-operations-45CQFEID.js.map +1 -0
- package/dist/browser.d.ts +45 -554
- package/dist/browser.js +15 -842
- package/dist/browser.js.map +1 -1
- package/dist/chunk-AL3HQN73.js +754 -0
- package/dist/chunk-AL3HQN73.js.map +1 -0
- package/dist/chunk-BF3IQ35I.js +284 -0
- package/dist/chunk-BF3IQ35I.js.map +1 -0
- package/dist/chunk-BQDGRTVP.js +168 -0
- package/dist/chunk-BQDGRTVP.js.map +1 -0
- package/dist/chunk-C5CDA3WX.js +7314 -0
- package/dist/chunk-C5CDA3WX.js.map +1 -0
- package/dist/chunk-E3FD2CNY.js +1869 -0
- package/dist/chunk-E3FD2CNY.js.map +1 -0
- package/dist/{chunk-V3SOFUAZ.js → chunk-G7S6B6WB.js} +327 -493
- package/dist/chunk-G7S6B6WB.js.map +1 -0
- package/dist/chunk-IHVDQ4YI.js +4231 -0
- package/dist/chunk-IHVDQ4YI.js.map +1 -0
- package/dist/chunk-JV2SWONF.js +98 -0
- package/dist/chunk-JV2SWONF.js.map +1 -0
- package/dist/chunk-KB6CKIUK.js +231 -0
- package/dist/chunk-KB6CKIUK.js.map +1 -0
- package/dist/chunk-RIZZPLLB.js +343 -0
- package/dist/chunk-RIZZPLLB.js.map +1 -0
- package/dist/chunk-S74EH3KD.js +7890 -0
- package/dist/chunk-S74EH3KD.js.map +1 -0
- package/dist/chunk-SFTSZ3LC.js +156 -0
- package/dist/chunk-SFTSZ3LC.js.map +1 -0
- package/dist/chunk-SKMJJ3Q6.js +125 -0
- package/dist/chunk-SKMJJ3Q6.js.map +1 -0
- package/dist/chunk-SZGFSCNU.js +3682 -0
- package/dist/chunk-SZGFSCNU.js.map +1 -0
- package/dist/chunk-TTB4OS2D.js +69 -0
- package/dist/chunk-TTB4OS2D.js.map +1 -0
- package/dist/chunk-UP2VWCW5.js +33 -0
- package/dist/{chunk-NSBPE2FW.js.map → chunk-UP2VWCW5.js.map} +1 -1
- package/dist/{chunk-UJUGGLMT.js → chunk-VQZQCHUT.js} +5 -5
- package/dist/{chunk-UJUGGLMT.js.map → chunk-VQZQCHUT.js.map} +1 -1
- package/dist/client.d.ts +6 -4
- package/dist/client.js +12 -10
- package/dist/createAgentAuthorization-ULG47ZJI.js +5 -0
- package/dist/createAgentAuthorization-ULG47ZJI.js.map +1 -0
- package/dist/credentials.d.ts +155 -0
- package/dist/credentials.js +4 -0
- package/dist/credentials.js.map +1 -0
- package/dist/crypto.js +2 -2
- package/dist/errors.js +1 -1
- package/dist/feature-flags-B1g0DCPe.d.ts +1181 -0
- package/dist/generated-EG5USUFG.js +9 -0
- package/dist/{generated-VNLHMR6Y.js.map → generated-EG5USUFG.js.map} +1 -1
- package/dist/{ghostspeak_wasm-SB2RPJ3D.js → ghostspeak_wasm-F227HOSM.js} +3 -3
- package/dist/{ghostspeak_wasm-SB2RPJ3D.js.map → ghostspeak_wasm-F227HOSM.js.map} +1 -1
- package/dist/index.d.ts +1210 -1506
- package/dist/index.js +601 -3532
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/minimal/core-minimal.d.ts +2383 -1264
- package/dist/minimal/core-minimal.js +9 -9
- package/dist/minimal/core-minimal.js.map +1 -1
- package/dist/nacl-fast-W5BJ3KZ2.js +2229 -0
- package/dist/nacl-fast-W5BJ3KZ2.js.map +1 -0
- package/dist/pda-4KP7CURF.js +4 -0
- package/dist/pda-4KP7CURF.js.map +1 -0
- package/dist/pda-Ce7VYg4T.d.ts +25 -0
- package/dist/reputation-types-Yebf0Rm_.d.ts +1071 -0
- package/dist/revokeAuthorization-OK7E7OK3.js +5 -0
- package/dist/revokeAuthorization-OK7E7OK3.js.map +1 -0
- package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
- package/dist/types.js +1 -1
- package/dist/updateReputationWithAuth-Y4ONEVSP.js +5 -0
- package/dist/updateReputationWithAuth-Y4ONEVSP.js.map +1 -0
- package/dist/utils.d.ts +69 -203
- package/dist/utils.js +15 -153
- package/dist/utils.js.map +1 -1
- package/package.json +28 -31
- package/dist/.tsbuildinfo +0 -1
- package/dist/GhostSpeakClient-hsGuGg__.d.ts +0 -860
- package/dist/GovernanceModule-DQYYys-H.d.ts +0 -1766
- package/dist/chunk-ASQXX4IT.js +0 -572
- package/dist/chunk-ASQXX4IT.js.map +0 -1
- package/dist/chunk-COGZFWOT.js +0 -19657
- package/dist/chunk-COGZFWOT.js.map +0 -1
- package/dist/chunk-FKRN4PW5.js +0 -1667
- package/dist/chunk-FKRN4PW5.js.map +0 -1
- package/dist/chunk-GMHIUK2R.js +0 -7526
- package/dist/chunk-GMHIUK2R.js.map +0 -1
- package/dist/chunk-IAWBZYPE.js +0 -356
- package/dist/chunk-IAWBZYPE.js.map +0 -1
- package/dist/chunk-NSBPE2FW.js +0 -15
- package/dist/chunk-OWYHJG6H.js +0 -13311
- package/dist/chunk-OWYHJG6H.js.map +0 -1
- package/dist/chunk-RDDPOFR5.js +0 -3
- package/dist/chunk-RDDPOFR5.js.map +0 -1
- package/dist/chunk-RERCHKZP.js +0 -35
- package/dist/chunk-RERCHKZP.js.map +0 -1
- package/dist/chunk-TVVGXYCI.js +0 -2887
- package/dist/chunk-TVVGXYCI.js.map +0 -1
- package/dist/chunk-V3SOFUAZ.js.map +0 -1
- package/dist/chunk-ZGP5552B.js +0 -377
- package/dist/chunk-ZGP5552B.js.map +0 -1
- package/dist/chunk-ZWOYNHVK.js +0 -196
- package/dist/chunk-ZWOYNHVK.js.map +0 -1
- package/dist/dist/.tsbuildinfo +0 -1
- package/dist/elgamal-VZLWB3XK.js +0 -5
- package/dist/elgamal-VZLWB3XK.js.map +0 -1
- package/dist/feature-flags-V722ZuXO.d.ts +0 -3512
- package/dist/generated-VNLHMR6Y.js +0 -5
- package/dist/ipfs-types-BOt9ZNg4.d.ts +0 -592
- package/dist/multisigConfig-BzEhy6jy.d.ts +0 -58
- package/dist/pda-B_nS8SbD.d.ts +0 -114
- package/dist/pda-S4BFJVGE.js +0 -4
- package/dist/pda-S4BFJVGE.js.map +0 -1
- package/dist/system-addresses-BFNLEbFx.d.ts +0 -857
- package/dist/token-2022-rpc-RALH4RK7.js +0 -593
- package/dist/token-2022-rpc-RALH4RK7.js.map +0 -1
|
@@ -1,592 +0,0 @@
|
|
|
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
|
-
export { type ContentStorageResult as C, type ExecutionParamsArgs as E, type FlexibleContent as F, type GovernanceProposal as G, type IPFSConfig as I, type ProposalTypeArgs as P, type QuorumRequirements as Q, VoteChoice as V, type IPFSUploadOptions as a, type IPFSContentMetadata as b, type IPFSOperationResult as c, type IPFSError as d, ProposalStatus as e, type IPFSProviderConfig as f, type IPFSUploadResult as g, type IPFSRetrievalOptions as h, type IPFSRetrievalResult as i, type IPFSPinResult as j, type ExecutionCondition as k, ConditionType as l, type VotingResults as m };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Option } 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 transactions that can be executed */
|
|
12
|
-
declare enum TransactionType {
|
|
13
|
-
Transfer = 0,
|
|
14
|
-
Withdrawal = 1,
|
|
15
|
-
EscrowRelease = 2,
|
|
16
|
-
ProposalCreation = 3,
|
|
17
|
-
VoteExecution = 4,
|
|
18
|
-
ParameterUpdate = 5,
|
|
19
|
-
SignerAddition = 6,
|
|
20
|
-
SignerRemoval = 7,
|
|
21
|
-
ThresholdUpdate = 8,
|
|
22
|
-
ConfigUpdate = 9,
|
|
23
|
-
EmergencyFreeze = 10,
|
|
24
|
-
EmergencyUnfreeze = 11,
|
|
25
|
-
SecurityPolicyUpdate = 12,
|
|
26
|
-
ProtocolUpgrade = 13,
|
|
27
|
-
FeatureToggle = 14,
|
|
28
|
-
RiskParameterUpdate = 15,
|
|
29
|
-
CustomInstruction = 16
|
|
30
|
-
}
|
|
31
|
-
type TransactionTypeArgs = TransactionType;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* This code was AUTOGENERATED by scripts/generate-missing-types.ts
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
type MultisigConfig = {
|
|
38
|
-
max_signers: number;
|
|
39
|
-
default_timeout: bigint;
|
|
40
|
-
allow_emergency_override: boolean;
|
|
41
|
-
emergency_threshold: Option<number>;
|
|
42
|
-
auto_execute: boolean;
|
|
43
|
-
signer_change_threshold: number;
|
|
44
|
-
allowed_transaction_types: Array<TransactionType>;
|
|
45
|
-
daily_limits: Array<readonly [string, bigint]>;
|
|
46
|
-
};
|
|
47
|
-
type MultisigConfigArgs = {
|
|
48
|
-
max_signers: number;
|
|
49
|
-
default_timeout: number | bigint;
|
|
50
|
-
allow_emergency_override: boolean;
|
|
51
|
-
emergency_threshold: Option<number>;
|
|
52
|
-
auto_execute: boolean;
|
|
53
|
-
signer_change_threshold: number;
|
|
54
|
-
allowed_transaction_types: Array<TransactionTypeArgs>;
|
|
55
|
-
daily_limits: Array<readonly [string, number | bigint]>;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { type MultisigConfigArgs as M, TransactionType as T, type MultisigConfig as a };
|