@paylobster/mcp-server 1.2.0 → 1.3.1
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/dist/server.d.ts.map +1 -1
- package/dist/server.js +284 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/treasury.d.ts +267 -0
- package/dist/tools/treasury.d.ts.map +1 -0
- package/dist/tools/treasury.js +722 -0
- package/dist/tools/treasury.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ContractClient } from '../utils/contracts';
|
|
3
|
+
export declare const treasuryCreateSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
name: string;
|
|
7
|
+
}, {
|
|
8
|
+
name: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const treasuryInfoSchema: z.ZodObject<{
|
|
11
|
+
address: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
address: string;
|
|
14
|
+
}, {
|
|
15
|
+
address: string;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const treasuryBalancesSchema: z.ZodObject<{
|
|
18
|
+
treasuryAddress: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
treasuryAddress: string;
|
|
21
|
+
}, {
|
|
22
|
+
treasuryAddress: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const treasuryDepositSchema: z.ZodObject<{
|
|
25
|
+
treasuryAddress: z.ZodString;
|
|
26
|
+
token: z.ZodString;
|
|
27
|
+
amount: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
token: string;
|
|
30
|
+
amount: string;
|
|
31
|
+
treasuryAddress: string;
|
|
32
|
+
}, {
|
|
33
|
+
token: string;
|
|
34
|
+
amount: string;
|
|
35
|
+
treasuryAddress: string;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const treasuryWithdrawSchema: z.ZodObject<{
|
|
38
|
+
treasuryAddress: z.ZodString;
|
|
39
|
+
token: z.ZodString;
|
|
40
|
+
to: z.ZodString;
|
|
41
|
+
amount: z.ZodString;
|
|
42
|
+
reason: z.ZodString;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
reason: string;
|
|
45
|
+
to: string;
|
|
46
|
+
token: string;
|
|
47
|
+
amount: string;
|
|
48
|
+
treasuryAddress: string;
|
|
49
|
+
}, {
|
|
50
|
+
reason: string;
|
|
51
|
+
to: string;
|
|
52
|
+
token: string;
|
|
53
|
+
amount: string;
|
|
54
|
+
treasuryAddress: string;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const treasuryMembersSchema: z.ZodObject<{
|
|
57
|
+
treasuryAddress: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
treasuryAddress: string;
|
|
60
|
+
}, {
|
|
61
|
+
treasuryAddress: string;
|
|
62
|
+
}>;
|
|
63
|
+
export declare const treasuryGrantRoleSchema: z.ZodObject<{
|
|
64
|
+
treasuryAddress: z.ZodString;
|
|
65
|
+
account: z.ZodString;
|
|
66
|
+
role: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
account: string;
|
|
69
|
+
treasuryAddress: string;
|
|
70
|
+
role: string | number;
|
|
71
|
+
}, {
|
|
72
|
+
account: string;
|
|
73
|
+
treasuryAddress: string;
|
|
74
|
+
role: string | number;
|
|
75
|
+
}>;
|
|
76
|
+
export declare const treasurySetBudgetSchema: z.ZodObject<{
|
|
77
|
+
treasuryAddress: z.ZodString;
|
|
78
|
+
opsBps: z.ZodNumber;
|
|
79
|
+
growthBps: z.ZodNumber;
|
|
80
|
+
reservesBps: z.ZodNumber;
|
|
81
|
+
yieldBps: z.ZodNumber;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
treasuryAddress: string;
|
|
84
|
+
opsBps: number;
|
|
85
|
+
growthBps: number;
|
|
86
|
+
reservesBps: number;
|
|
87
|
+
yieldBps: number;
|
|
88
|
+
}, {
|
|
89
|
+
treasuryAddress: string;
|
|
90
|
+
opsBps: number;
|
|
91
|
+
growthBps: number;
|
|
92
|
+
reservesBps: number;
|
|
93
|
+
yieldBps: number;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const treasurySetLimitSchema: z.ZodObject<{
|
|
96
|
+
treasuryAddress: z.ZodString;
|
|
97
|
+
operator: z.ZodString;
|
|
98
|
+
maxPerTx: z.ZodString;
|
|
99
|
+
maxPerDay: z.ZodString;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
treasuryAddress: string;
|
|
102
|
+
operator: string;
|
|
103
|
+
maxPerTx: string;
|
|
104
|
+
maxPerDay: string;
|
|
105
|
+
}, {
|
|
106
|
+
treasuryAddress: string;
|
|
107
|
+
operator: string;
|
|
108
|
+
maxPerTx: string;
|
|
109
|
+
maxPerDay: string;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const treasuryLookupSchema: z.ZodObject<{
|
|
112
|
+
ownerAddress: z.ZodString;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
ownerAddress: string;
|
|
115
|
+
}, {
|
|
116
|
+
ownerAddress: string;
|
|
117
|
+
}>;
|
|
118
|
+
export declare const treasuryRevokeRoleSchema: z.ZodObject<{
|
|
119
|
+
treasuryAddress: z.ZodString;
|
|
120
|
+
account: z.ZodString;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
account: string;
|
|
123
|
+
treasuryAddress: string;
|
|
124
|
+
}, {
|
|
125
|
+
account: string;
|
|
126
|
+
treasuryAddress: string;
|
|
127
|
+
}>;
|
|
128
|
+
export declare const treasurySetReserveSchema: z.ZodObject<{
|
|
129
|
+
treasuryAddress: z.ZodString;
|
|
130
|
+
lockBps: z.ZodNumber;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
treasuryAddress: string;
|
|
133
|
+
lockBps: number;
|
|
134
|
+
}, {
|
|
135
|
+
treasuryAddress: string;
|
|
136
|
+
lockBps: number;
|
|
137
|
+
}>;
|
|
138
|
+
export declare const treasuryApproveSpenderSchema: z.ZodObject<{
|
|
139
|
+
treasuryAddress: z.ZodString;
|
|
140
|
+
token: z.ZodString;
|
|
141
|
+
spender: z.ZodString;
|
|
142
|
+
amount: z.ZodString;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
token: string;
|
|
145
|
+
amount: string;
|
|
146
|
+
spender: string;
|
|
147
|
+
treasuryAddress: string;
|
|
148
|
+
}, {
|
|
149
|
+
token: string;
|
|
150
|
+
amount: string;
|
|
151
|
+
spender: string;
|
|
152
|
+
treasuryAddress: string;
|
|
153
|
+
}>;
|
|
154
|
+
export declare const treasurySetIntegrationSchema: z.ZodObject<{
|
|
155
|
+
treasuryAddress: z.ZodString;
|
|
156
|
+
name: z.ZodEnum<["spendingMandate", "policyRegistry", "crossRailLedger"]>;
|
|
157
|
+
address: z.ZodString;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
name: "spendingMandate" | "policyRegistry" | "crossRailLedger";
|
|
160
|
+
address: string;
|
|
161
|
+
treasuryAddress: string;
|
|
162
|
+
}, {
|
|
163
|
+
name: "spendingMandate" | "policyRegistry" | "crossRailLedger";
|
|
164
|
+
address: string;
|
|
165
|
+
treasuryAddress: string;
|
|
166
|
+
}>;
|
|
167
|
+
export declare const treasuryWithdrawEthSchema: z.ZodObject<{
|
|
168
|
+
treasuryAddress: z.ZodString;
|
|
169
|
+
to: z.ZodString;
|
|
170
|
+
amount: z.ZodString;
|
|
171
|
+
reason: z.ZodString;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
reason: string;
|
|
174
|
+
to: string;
|
|
175
|
+
amount: string;
|
|
176
|
+
treasuryAddress: string;
|
|
177
|
+
}, {
|
|
178
|
+
reason: string;
|
|
179
|
+
to: string;
|
|
180
|
+
amount: string;
|
|
181
|
+
treasuryAddress: string;
|
|
182
|
+
}>;
|
|
183
|
+
export declare const treasurySpendLimitsSchema: z.ZodObject<{
|
|
184
|
+
treasuryAddress: z.ZodString;
|
|
185
|
+
operator: z.ZodString;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
treasuryAddress: string;
|
|
188
|
+
operator: string;
|
|
189
|
+
}, {
|
|
190
|
+
treasuryAddress: string;
|
|
191
|
+
operator: string;
|
|
192
|
+
}>;
|
|
193
|
+
interface TokenBalance {
|
|
194
|
+
token: string;
|
|
195
|
+
balance: string;
|
|
196
|
+
}
|
|
197
|
+
interface TreasurySummary {
|
|
198
|
+
name: string;
|
|
199
|
+
owner: string;
|
|
200
|
+
ethBalance: string;
|
|
201
|
+
tokenCount: number;
|
|
202
|
+
memberCount: number;
|
|
203
|
+
totalDeposited: string;
|
|
204
|
+
totalWithdrawn: string;
|
|
205
|
+
reserveLockBps: number;
|
|
206
|
+
createdAt: number;
|
|
207
|
+
}
|
|
208
|
+
interface TreasuryMember {
|
|
209
|
+
address: string;
|
|
210
|
+
role: string;
|
|
211
|
+
}
|
|
212
|
+
export declare function treasuryCreate(params: z.infer<typeof treasuryCreateSchema>, client: ContractClient): Promise<{
|
|
213
|
+
treasuryAddress: string;
|
|
214
|
+
transaction: any;
|
|
215
|
+
}>;
|
|
216
|
+
export declare function treasuryInfo(params: z.infer<typeof treasuryInfoSchema>, client: ContractClient): Promise<TreasurySummary & {
|
|
217
|
+
balances: TokenBalance[];
|
|
218
|
+
}>;
|
|
219
|
+
export declare function treasuryBalances(params: z.infer<typeof treasuryBalancesSchema>, client: ContractClient): Promise<{
|
|
220
|
+
balances: TokenBalance[];
|
|
221
|
+
}>;
|
|
222
|
+
export declare function treasuryDeposit(params: z.infer<typeof treasuryDepositSchema>, client: ContractClient): Promise<{
|
|
223
|
+
transaction: any;
|
|
224
|
+
}>;
|
|
225
|
+
export declare function treasuryWithdraw(params: z.infer<typeof treasuryWithdrawSchema>, client: ContractClient): Promise<{
|
|
226
|
+
transaction: any;
|
|
227
|
+
}>;
|
|
228
|
+
export declare function treasuryMembers(params: z.infer<typeof treasuryMembersSchema>, client: ContractClient): Promise<{
|
|
229
|
+
members: TreasuryMember[];
|
|
230
|
+
}>;
|
|
231
|
+
export declare function treasuryGrantRole(params: z.infer<typeof treasuryGrantRoleSchema>, client: ContractClient): Promise<{
|
|
232
|
+
transaction: any;
|
|
233
|
+
}>;
|
|
234
|
+
export declare function treasurySetBudget(params: z.infer<typeof treasurySetBudgetSchema>, client: ContractClient): Promise<{
|
|
235
|
+
transaction: any;
|
|
236
|
+
}>;
|
|
237
|
+
export declare function treasurySetLimit(params: z.infer<typeof treasurySetLimitSchema>, client: ContractClient): Promise<{
|
|
238
|
+
transaction: any;
|
|
239
|
+
}>;
|
|
240
|
+
export declare function treasuryLookup(params: z.infer<typeof treasuryLookupSchema>, client: ContractClient): Promise<{
|
|
241
|
+
treasuryAddress: string | null;
|
|
242
|
+
}>;
|
|
243
|
+
export declare function treasuryRevokeRole(params: z.infer<typeof treasuryRevokeRoleSchema>, client: ContractClient): Promise<{
|
|
244
|
+
transaction: any;
|
|
245
|
+
}>;
|
|
246
|
+
export declare function treasurySetReserve(params: z.infer<typeof treasurySetReserveSchema>, client: ContractClient): Promise<{
|
|
247
|
+
transaction: any;
|
|
248
|
+
}>;
|
|
249
|
+
export declare function treasuryApproveSpender(params: z.infer<typeof treasuryApproveSpenderSchema>, client: ContractClient): Promise<{
|
|
250
|
+
transaction: any;
|
|
251
|
+
}>;
|
|
252
|
+
export declare function treasurySetIntegration(params: z.infer<typeof treasurySetIntegrationSchema>, client: ContractClient): Promise<{
|
|
253
|
+
transaction: any;
|
|
254
|
+
}>;
|
|
255
|
+
export declare function treasuryWithdrawEth(params: z.infer<typeof treasuryWithdrawEthSchema>, client: ContractClient): Promise<{
|
|
256
|
+
transaction: any;
|
|
257
|
+
}>;
|
|
258
|
+
export declare function treasurySpendLimits(params: z.infer<typeof treasurySpendLimitsSchema>, client: ContractClient): Promise<{
|
|
259
|
+
limits: {
|
|
260
|
+
maxPerTx: string;
|
|
261
|
+
maxPerDay: string;
|
|
262
|
+
spentToday: string;
|
|
263
|
+
dayStart: number;
|
|
264
|
+
};
|
|
265
|
+
}>;
|
|
266
|
+
export {};
|
|
267
|
+
//# sourceMappingURL=treasury.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treasury.d.ts","sourceRoot":"","sources":["../../src/tools/treasury.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOpD,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAGH,eAAO,MAAM,kBAAkB;;;;;;EAE7B,CAAC;AAGH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAGH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAC;AAGH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAGH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAGH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAC;AAGH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AAGH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAGH,eAAO,MAAM,wBAAwB;;;;;;;;;EAGnC,CAAC;AAGH,eAAO,MAAM,wBAAwB;;;;;;;;;EAGnC,CAAC;AAGH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;EAKvC,CAAC;AAGH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAIvC,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;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