@karn_lat/protocol-sdk 0.1.0-alpha.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.
Files changed (157) hide show
  1. package/README.md +68 -0
  2. package/dist/__tests__/setup.d.ts +14 -0
  3. package/dist/__tests__/setup.d.ts.map +1 -0
  4. package/dist/__tests__/setup.js +44 -0
  5. package/dist/__tests__/setup.js.map +1 -0
  6. package/dist/clients/GovernorClient.d.ts +9 -0
  7. package/dist/clients/GovernorClient.d.ts.map +1 -0
  8. package/dist/clients/GovernorClient.js +18 -0
  9. package/dist/clients/GovernorClient.js.map +1 -0
  10. package/dist/clients/TreasuryClient.d.ts +9 -0
  11. package/dist/clients/TreasuryClient.d.ts.map +1 -0
  12. package/dist/clients/TreasuryClient.js +18 -0
  13. package/dist/clients/TreasuryClient.js.map +1 -0
  14. package/dist/clients/ValocracyClient.d.ts +13 -0
  15. package/dist/clients/ValocracyClient.d.ts.map +1 -0
  16. package/dist/clients/ValocracyClient.js +32 -0
  17. package/dist/clients/ValocracyClient.js.map +1 -0
  18. package/dist/clients/index.d.ts +4 -0
  19. package/dist/clients/index.d.ts.map +1 -0
  20. package/dist/clients/index.js +4 -0
  21. package/dist/clients/index.js.map +1 -0
  22. package/dist/generated/governor/src/index.d.ts +400 -0
  23. package/dist/generated/governor/src/index.d.ts.map +1 -0
  24. package/dist/generated/governor/src/index.js +63 -0
  25. package/dist/generated/governor/src/index.js.map +1 -0
  26. package/dist/generated/treasury/src/index.d.ts +474 -0
  27. package/dist/generated/treasury/src/index.d.ts.map +1 -0
  28. package/dist/generated/treasury/src/index.js +54 -0
  29. package/dist/generated/treasury/src/index.js.map +1 -0
  30. package/dist/generated/valocracy/src/index.d.ts +807 -0
  31. package/dist/generated/valocracy/src/index.d.ts.map +1 -0
  32. package/dist/generated/valocracy/src/index.js +114 -0
  33. package/dist/generated/valocracy/src/index.js.map +1 -0
  34. package/dist/index.d.ts +5 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +5 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/react/hooks/useGovernor.d.ts +24 -0
  39. package/dist/react/hooks/useGovernor.d.ts.map +1 -0
  40. package/dist/react/hooks/useGovernor.js +45 -0
  41. package/dist/react/hooks/useGovernor.js.map +1 -0
  42. package/dist/react/hooks/useMultiWallet.d.ts +35 -0
  43. package/dist/react/hooks/useMultiWallet.d.ts.map +1 -0
  44. package/dist/react/hooks/useMultiWallet.js +87 -0
  45. package/dist/react/hooks/useMultiWallet.js.map +1 -0
  46. package/dist/react/hooks/useTreasury.d.ts +14 -0
  47. package/dist/react/hooks/useTreasury.d.ts.map +1 -0
  48. package/dist/react/hooks/useTreasury.js +45 -0
  49. package/dist/react/hooks/useTreasury.js.map +1 -0
  50. package/dist/react/hooks/useValocracy.d.ts +16 -0
  51. package/dist/react/hooks/useValocracy.d.ts.map +1 -0
  52. package/dist/react/hooks/useValocracy.js +54 -0
  53. package/dist/react/hooks/useValocracy.js.map +1 -0
  54. package/dist/react/hooks/useWallet.d.ts +13 -0
  55. package/dist/react/hooks/useWallet.d.ts.map +1 -0
  56. package/dist/react/hooks/useWallet.js +51 -0
  57. package/dist/react/hooks/useWallet.js.map +1 -0
  58. package/dist/react/index.d.ts +7 -0
  59. package/dist/react/index.d.ts.map +1 -0
  60. package/dist/react/index.js +7 -0
  61. package/dist/react/index.js.map +1 -0
  62. package/dist/react/providers/KarnProvider.d.ts +25 -0
  63. package/dist/react/providers/KarnProvider.d.ts.map +1 -0
  64. package/dist/react/providers/KarnProvider.js +25 -0
  65. package/dist/react/providers/KarnProvider.js.map +1 -0
  66. package/dist/utils/decay.d.ts +19 -0
  67. package/dist/utils/decay.d.ts.map +1 -0
  68. package/dist/utils/decay.js +33 -0
  69. package/dist/utils/decay.js.map +1 -0
  70. package/dist/utils/index.d.ts +4 -0
  71. package/dist/utils/index.d.ts.map +1 -0
  72. package/dist/utils/index.js +4 -0
  73. package/dist/utils/index.js.map +1 -0
  74. package/dist/utils/polling.d.ts +75 -0
  75. package/dist/utils/polling.d.ts.map +1 -0
  76. package/dist/utils/polling.js +104 -0
  77. package/dist/utils/polling.js.map +1 -0
  78. package/dist/utils/simulation.d.ts +67 -0
  79. package/dist/utils/simulation.d.ts.map +1 -0
  80. package/dist/utils/simulation.js +88 -0
  81. package/dist/utils/simulation.js.map +1 -0
  82. package/dist/wallet/WalletManager.d.ts +77 -0
  83. package/dist/wallet/WalletManager.d.ts.map +1 -0
  84. package/dist/wallet/WalletManager.js +268 -0
  85. package/dist/wallet/WalletManager.js.map +1 -0
  86. package/dist/wallet/adapters/AlbedoAdapter.d.ts +47 -0
  87. package/dist/wallet/adapters/AlbedoAdapter.d.ts.map +1 -0
  88. package/dist/wallet/adapters/AlbedoAdapter.js +84 -0
  89. package/dist/wallet/adapters/AlbedoAdapter.js.map +1 -0
  90. package/dist/wallet/adapters/FreighterAdapter.d.ts +42 -0
  91. package/dist/wallet/adapters/FreighterAdapter.d.ts.map +1 -0
  92. package/dist/wallet/adapters/FreighterAdapter.js +107 -0
  93. package/dist/wallet/adapters/FreighterAdapter.js.map +1 -0
  94. package/dist/wallet/adapters/LobstrAdapter.d.ts +34 -0
  95. package/dist/wallet/adapters/LobstrAdapter.d.ts.map +1 -0
  96. package/dist/wallet/adapters/LobstrAdapter.js +89 -0
  97. package/dist/wallet/adapters/LobstrAdapter.js.map +1 -0
  98. package/dist/wallet/adapters/RabetAdapter.d.ts +39 -0
  99. package/dist/wallet/adapters/RabetAdapter.d.ts.map +1 -0
  100. package/dist/wallet/adapters/RabetAdapter.js +104 -0
  101. package/dist/wallet/adapters/RabetAdapter.js.map +1 -0
  102. package/dist/wallet/adapters/xBullAdapter.d.ts +41 -0
  103. package/dist/wallet/adapters/xBullAdapter.d.ts.map +1 -0
  104. package/dist/wallet/adapters/xBullAdapter.js +72 -0
  105. package/dist/wallet/adapters/xBullAdapter.js.map +1 -0
  106. package/dist/wallet/index.d.ts +20 -0
  107. package/dist/wallet/index.d.ts.map +1 -0
  108. package/dist/wallet/index.js +23 -0
  109. package/dist/wallet/index.js.map +1 -0
  110. package/dist/wallet/types.d.ts +165 -0
  111. package/dist/wallet/types.d.ts.map +1 -0
  112. package/dist/wallet/types.js +50 -0
  113. package/dist/wallet/types.js.map +1 -0
  114. package/examples/basic-usage.ts +28 -0
  115. package/jest.config.js +37 -0
  116. package/package.json +58 -0
  117. package/src/__tests__/README.md +364 -0
  118. package/src/__tests__/setup.ts +57 -0
  119. package/src/__tests__/utils/decay.test.ts +331 -0
  120. package/src/__tests__/wallet/WalletManager.test.ts +410 -0
  121. package/src/clients/GovernorClient.ts +23 -0
  122. package/src/clients/TreasuryClient.ts +23 -0
  123. package/src/clients/ValocracyClient.ts +48 -0
  124. package/src/clients/index.ts +3 -0
  125. package/src/generated/governor/README.md +54 -0
  126. package/src/generated/governor/package.json +17 -0
  127. package/src/generated/governor/src/index.ts +428 -0
  128. package/src/generated/governor/tsconfig.json +98 -0
  129. package/src/generated/treasury/README.md +54 -0
  130. package/src/generated/treasury/package.json +17 -0
  131. package/src/generated/treasury/src/index.ts +495 -0
  132. package/src/generated/treasury/tsconfig.json +98 -0
  133. package/src/generated/valocracy/README.md +54 -0
  134. package/src/generated/valocracy/package.json +17 -0
  135. package/src/generated/valocracy/src/index.ts +831 -0
  136. package/src/generated/valocracy/tsconfig.json +98 -0
  137. package/src/index.ts +4 -0
  138. package/src/react/hooks/useGovernor.ts +69 -0
  139. package/src/react/hooks/useMultiWallet.ts +169 -0
  140. package/src/react/hooks/useTreasury.ts +57 -0
  141. package/src/react/hooks/useValocracy.ts +66 -0
  142. package/src/react/hooks/useWallet.ts +60 -0
  143. package/src/react/index.ts +6 -0
  144. package/src/react/providers/KarnProvider.tsx +63 -0
  145. package/src/utils/decay.ts +44 -0
  146. package/src/utils/index.ts +3 -0
  147. package/src/utils/polling.ts +193 -0
  148. package/src/utils/simulation.ts +136 -0
  149. package/src/wallet/WalletManager.ts +360 -0
  150. package/src/wallet/adapters/AlbedoAdapter.ts +140 -0
  151. package/src/wallet/adapters/FreighterAdapter.ts +179 -0
  152. package/src/wallet/adapters/LobstrAdapter.ts +142 -0
  153. package/src/wallet/adapters/RabetAdapter.ts +162 -0
  154. package/src/wallet/adapters/xBullAdapter.ts +123 -0
  155. package/src/wallet/index.ts +37 -0
  156. package/src/wallet/types.ts +204 -0
  157. package/tsconfig.json +40 -0
@@ -0,0 +1,474 @@
1
+ import { Buffer } from "buffer";
2
+ import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, MethodOptions, Result } from '@stellar/stellar-sdk/contract';
3
+ import type { u32, i128, Option } from '@stellar/stellar-sdk/contract';
4
+ export * from '@stellar/stellar-sdk';
5
+ export * as contract from '@stellar/stellar-sdk/contract';
6
+ export * as rpc from '@stellar/stellar-sdk/rpc';
7
+ export declare const TreasuryError: {
8
+ 1: {
9
+ message: string;
10
+ };
11
+ 2: {
12
+ message: string;
13
+ };
14
+ 3: {
15
+ message: string;
16
+ };
17
+ 4: {
18
+ message: string;
19
+ };
20
+ 5: {
21
+ message: string;
22
+ };
23
+ 6: {
24
+ message: string;
25
+ };
26
+ 7: {
27
+ message: string;
28
+ };
29
+ 8: {
30
+ message: string;
31
+ };
32
+ 9: {
33
+ message: string;
34
+ };
35
+ 10: {
36
+ message: string;
37
+ };
38
+ 11: {
39
+ message: string;
40
+ };
41
+ };
42
+ /**
43
+ * Lab Funding Struct
44
+ */
45
+ export interface Lab {
46
+ funder: string;
47
+ id: u32;
48
+ scholarship_per_member: i128;
49
+ status: LabStatus;
50
+ total_amount: i128;
51
+ }
52
+ /**
53
+ * Storage keys for the Treasury contract
54
+ */
55
+ export type DataKey = {
56
+ tag: "Valocracy";
57
+ values: void;
58
+ } | {
59
+ tag: "Governor";
60
+ values: void;
61
+ } | {
62
+ tag: "AssetToken";
63
+ values: void;
64
+ } | {
65
+ tag: "TotalShares";
66
+ values: void;
67
+ } | {
68
+ tag: "UserShares";
69
+ values: readonly [string];
70
+ } | {
71
+ tag: "ReentrancyLock";
72
+ values: void;
73
+ } | {
74
+ tag: "LabCounter";
75
+ values: void;
76
+ } | {
77
+ tag: "Lab";
78
+ values: readonly [u32];
79
+ } | {
80
+ tag: "ClaimableBalance";
81
+ values: readonly [string];
82
+ };
83
+ /**
84
+ * Status of a Lab
85
+ */
86
+ export type LabStatus = {
87
+ tag: "Active";
88
+ values: void;
89
+ } | {
90
+ tag: "Cancelled";
91
+ values: void;
92
+ } | {
93
+ tag: "Completed";
94
+ values: void;
95
+ };
96
+ export interface Client {
97
+ /**
98
+ * Construct and simulate a asset transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
99
+ * Get the underlying asset token address
100
+ */
101
+ asset: (options?: {
102
+ /**
103
+ * The fee to pay for the transaction. Default: BASE_FEE
104
+ */
105
+ fee?: number;
106
+ /**
107
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
108
+ */
109
+ timeoutInSeconds?: number;
110
+ /**
111
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
112
+ */
113
+ simulate?: boolean;
114
+ }) => Promise<AssembledTransaction<Option<string>>>;
115
+ /**
116
+ * Construct and simulate a spend transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
117
+ * Spend treasury assets — only callable by the Governor contract
118
+ *
119
+ * This is invoked as part of executing an approved governance proposal.
120
+ */
121
+ spend: ({ receiver, amount }: {
122
+ receiver: string;
123
+ amount: i128;
124
+ }, options?: {
125
+ /**
126
+ * The fee to pay for the transaction. Default: BASE_FEE
127
+ */
128
+ fee?: number;
129
+ /**
130
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
131
+ */
132
+ timeoutInSeconds?: number;
133
+ /**
134
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
135
+ */
136
+ simulate?: boolean;
137
+ }) => Promise<AssembledTransaction<Result<void>>>;
138
+ /**
139
+ * Construct and simulate a deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
140
+ * Deposit shares to a user account
141
+ *
142
+ * This is called by the Valocracy contract when minting NFTs.
143
+ * Shares represent the user's claim on treasury assets.
144
+ */
145
+ deposit: ({ receiver, shares }: {
146
+ receiver: string;
147
+ shares: i128;
148
+ }, options?: {
149
+ /**
150
+ * The fee to pay for the transaction. Default: BASE_FEE
151
+ */
152
+ fee?: number;
153
+ /**
154
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
155
+ */
156
+ timeoutInSeconds?: number;
157
+ /**
158
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
159
+ */
160
+ simulate?: boolean;
161
+ }) => Promise<AssembledTransaction<Result<void>>>;
162
+ /**
163
+ * Construct and simulate a upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
164
+ * Upgrade the contract to a new WASM hash.
165
+ * Only callable by the governor (requires governance proposal).
166
+ */
167
+ upgrade: ({ new_wasm_hash }: {
168
+ new_wasm_hash: Buffer;
169
+ }, options?: {
170
+ /**
171
+ * The fee to pay for the transaction. Default: BASE_FEE
172
+ */
173
+ fee?: number;
174
+ /**
175
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
176
+ */
177
+ timeoutInSeconds?: number;
178
+ /**
179
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
180
+ */
181
+ simulate?: boolean;
182
+ }) => Promise<AssembledTransaction<Result<void>>>;
183
+ /**
184
+ * Construct and simulate a fund_lab transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
185
+ * Fund a new Lab (Scholarship)
186
+ *
187
+ * Only callable by the funder.
188
+ */
189
+ fund_lab: ({ funder, total_amount, scholarship_per_member }: {
190
+ funder: string;
191
+ total_amount: i128;
192
+ scholarship_per_member: i128;
193
+ }, options?: {
194
+ /**
195
+ * The fee to pay for the transaction. Default: BASE_FEE
196
+ */
197
+ fee?: number;
198
+ /**
199
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
200
+ */
201
+ timeoutInSeconds?: number;
202
+ /**
203
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
204
+ */
205
+ simulate?: boolean;
206
+ }) => Promise<AssembledTransaction<Result<u32>>>;
207
+ /**
208
+ * Construct and simulate a governor transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
209
+ * Get governor contract address
210
+ */
211
+ governor: (options?: {
212
+ /**
213
+ * The fee to pay for the transaction. Default: BASE_FEE
214
+ */
215
+ fee?: number;
216
+ /**
217
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
218
+ */
219
+ timeoutInSeconds?: number;
220
+ /**
221
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
222
+ */
223
+ simulate?: boolean;
224
+ }) => Promise<AssembledTransaction<Option<string>>>;
225
+ /**
226
+ * Construct and simulate a withdraw transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
227
+ * Withdraw assets by burning shares
228
+ *
229
+ * Converts shares to underlying assets based on current ratio.
230
+ */
231
+ withdraw: ({ caller, receiver, shares }: {
232
+ caller: string;
233
+ receiver: string;
234
+ shares: i128;
235
+ }, options?: {
236
+ /**
237
+ * The fee to pay for the transaction. Default: BASE_FEE
238
+ */
239
+ fee?: number;
240
+ /**
241
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
242
+ */
243
+ timeoutInSeconds?: number;
244
+ /**
245
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
246
+ */
247
+ simulate?: boolean;
248
+ }) => Promise<AssembledTransaction<Result<i128>>>;
249
+ /**
250
+ * Construct and simulate a shares_of transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
251
+ * Get shares for a specific user
252
+ */
253
+ shares_of: ({ account }: {
254
+ account: string;
255
+ }, options?: {
256
+ /**
257
+ * The fee to pay for the transaction. Default: BASE_FEE
258
+ */
259
+ fee?: number;
260
+ /**
261
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
262
+ */
263
+ timeoutInSeconds?: number;
264
+ /**
265
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
266
+ */
267
+ simulate?: boolean;
268
+ }) => Promise<AssembledTransaction<i128>>;
269
+ /**
270
+ * Construct and simulate a valocracy transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
271
+ * Get valocracy contract address
272
+ */
273
+ valocracy: (options?: {
274
+ /**
275
+ * The fee to pay for the transaction. Default: BASE_FEE
276
+ */
277
+ fee?: number;
278
+ /**
279
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
280
+ */
281
+ timeoutInSeconds?: number;
282
+ /**
283
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
284
+ */
285
+ simulate?: boolean;
286
+ }) => Promise<AssembledTransaction<Option<string>>>;
287
+ /**
288
+ * Construct and simulate a initialize transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
289
+ * Initialize the Treasury contract.
290
+ *
291
+ * No admin: stores valocracy, governor, and asset token addresses.
292
+ * All privileged operations go through the governor (governance).
293
+ */
294
+ initialize: ({ valocracy, governor, asset_token }: {
295
+ valocracy: string;
296
+ governor: string;
297
+ asset_token: string;
298
+ }, options?: {
299
+ /**
300
+ * The fee to pay for the transaction. Default: BASE_FEE
301
+ */
302
+ fee?: number;
303
+ /**
304
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
305
+ */
306
+ timeoutInSeconds?: number;
307
+ /**
308
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
309
+ */
310
+ simulate?: boolean;
311
+ }) => Promise<AssembledTransaction<Result<void>>>;
312
+ /**
313
+ * Construct and simulate a total_assets transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
314
+ * Get total assets in the treasury by querying the actual token balance
315
+ */
316
+ total_assets: (options?: {
317
+ /**
318
+ * The fee to pay for the transaction. Default: BASE_FEE
319
+ */
320
+ fee?: number;
321
+ /**
322
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
323
+ */
324
+ timeoutInSeconds?: number;
325
+ /**
326
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
327
+ */
328
+ simulate?: boolean;
329
+ }) => Promise<AssembledTransaction<i128>>;
330
+ /**
331
+ * Construct and simulate a total_shares transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
332
+ * Get total shares outstanding
333
+ */
334
+ total_shares: (options?: {
335
+ /**
336
+ * The fee to pay for the transaction. Default: BASE_FEE
337
+ */
338
+ fee?: number;
339
+ /**
340
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
341
+ */
342
+ timeoutInSeconds?: number;
343
+ /**
344
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
345
+ */
346
+ simulate?: boolean;
347
+ }) => Promise<AssembledTransaction<i128>>;
348
+ /**
349
+ * Construct and simulate a update_governor transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
350
+ * Update the governor contract address (migration path).
351
+ * Only callable by the current governor.
352
+ */
353
+ update_governor: ({ new_governor }: {
354
+ new_governor: string;
355
+ }, options?: {
356
+ /**
357
+ * The fee to pay for the transaction. Default: BASE_FEE
358
+ */
359
+ fee?: number;
360
+ /**
361
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
362
+ */
363
+ timeoutInSeconds?: number;
364
+ /**
365
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
366
+ */
367
+ simulate?: boolean;
368
+ }) => Promise<AssembledTransaction<Result<void>>>;
369
+ /**
370
+ * Construct and simulate a preview_withdraw transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
371
+ * Preview how many assets a share amount would yield
372
+ */
373
+ preview_withdraw: ({ shares }: {
374
+ shares: i128;
375
+ }, options?: {
376
+ /**
377
+ * The fee to pay for the transaction. Default: BASE_FEE
378
+ */
379
+ fee?: number;
380
+ /**
381
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
382
+ */
383
+ timeoutInSeconds?: number;
384
+ /**
385
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
386
+ */
387
+ simulate?: boolean;
388
+ }) => Promise<AssembledTransaction<Result<i128>>>;
389
+ /**
390
+ * Construct and simulate a approve_scholarship transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
391
+ * Approve scholarship for a member
392
+ *
393
+ * Releases scholarship funds to a member's claimable balance.
394
+ * Only callable by governor (governance/admin/mentor approval).
395
+ */
396
+ approve_scholarship: ({ lab_id, member }: {
397
+ lab_id: u32;
398
+ member: string;
399
+ }, options?: {
400
+ /**
401
+ * The fee to pay for the transaction. Default: BASE_FEE
402
+ */
403
+ fee?: number;
404
+ /**
405
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
406
+ */
407
+ timeoutInSeconds?: number;
408
+ /**
409
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
410
+ */
411
+ simulate?: boolean;
412
+ }) => Promise<AssembledTransaction<Result<void>>>;
413
+ /**
414
+ * Construct and simulate a withdraw_scholarship transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
415
+ * Withdraw scholarship funds
416
+ *
417
+ * Allows members to withdraw their approved scholarship funds.
418
+ * Updated to check claimable balance instead of shares.
419
+ */
420
+ withdraw_scholarship: ({ member, amount }: {
421
+ member: string;
422
+ amount: i128;
423
+ }, options?: {
424
+ /**
425
+ * The fee to pay for the transaction. Default: BASE_FEE
426
+ */
427
+ fee?: number;
428
+ /**
429
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
430
+ */
431
+ timeoutInSeconds?: number;
432
+ /**
433
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
434
+ */
435
+ simulate?: boolean;
436
+ }) => Promise<AssembledTransaction<Result<void>>>;
437
+ /**
438
+ * Construct and simulate a get_claimable_balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
439
+ * Get claimable balance for a member
440
+ *
441
+ * Returns the amount of scholarship funds available for withdrawal.
442
+ */
443
+ get_claimable_balance: ({ member }: {
444
+ member: string;
445
+ }, options?: {
446
+ /**
447
+ * The fee to pay for the transaction. Default: BASE_FEE
448
+ */
449
+ fee?: number;
450
+ /**
451
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
452
+ */
453
+ timeoutInSeconds?: number;
454
+ /**
455
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
456
+ */
457
+ simulate?: boolean;
458
+ }) => Promise<AssembledTransaction<i128>>;
459
+ }
460
+ export declare class Client extends ContractClient {
461
+ readonly options: ContractClientOptions;
462
+ static deploy<T = Client>(
463
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
464
+ options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
465
+ /** The hash of the Wasm blob, which must already be installed on-chain. */
466
+ wasmHash: Buffer | string;
467
+ /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
468
+ salt?: Buffer | Uint8Array;
469
+ /** The format used to decode `wasmHash`, if it's provided as a string. */
470
+ format?: "hex" | "base64";
471
+ }): Promise<AssembledTransaction<T>>;
472
+ constructor(options: ContractClientOptions);
473
+ }
474
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/treasury/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,oBAAoB,EACpB,MAAM,IAAI,cAAc,EACxB,aAAa,IAAI,qBAAqB,EACtC,aAAa,EACb,MAAM,EAEP,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,GAAG,EAKH,IAAI,EAGJ,MAAM,EAGP,MAAM,+BAA+B,CAAC;AACvC,cAAc,sBAAsB,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AACzD,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAA;AAU/C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAA;AAGD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,GAAG,CAAC;IACR,sBAAsB,EAAE,IAAI,CAAC;IAC7B,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IAAC,GAAG,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,IAAI,CAAA;CAAC,GAAG;IAAC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AC,oBAAoB,CAAC,CAAC,CAAC,CAAC;gBAGP,OAAO,EAAE,qBAAqB;CA2B3D"}
@@ -0,0 +1,54 @@
1
+ import { Buffer } from "buffer";
2
+ import { Client as ContractClient, Spec as ContractSpec, } from '@stellar/stellar-sdk/contract';
3
+ export * from '@stellar/stellar-sdk';
4
+ export * as contract from '@stellar/stellar-sdk/contract';
5
+ export * as rpc from '@stellar/stellar-sdk/rpc';
6
+ if (typeof window !== 'undefined') {
7
+ //@ts-ignore Buffer exists
8
+ window.Buffer = window.Buffer || Buffer;
9
+ }
10
+ export const TreasuryError = {
11
+ 1: { message: "AlreadyInitialized" },
12
+ 2: { message: "NotInitialized" },
13
+ 3: { message: "NotAuthorized" },
14
+ 4: { message: "InsufficientShares" },
15
+ 5: { message: "InsufficientAssets" },
16
+ 6: { message: "ZeroAmount" },
17
+ 7: { message: "ReentrancyDetected" },
18
+ 8: { message: "MathOverflow" },
19
+ 9: { message: "LabNotFound" },
20
+ 10: { message: "LabNotActive" },
21
+ 11: { message: "InsufficientClaimable" }
22
+ };
23
+ export class Client extends ContractClient {
24
+ static async deploy(
25
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
26
+ options) {
27
+ return ContractClient.deploy(null, options);
28
+ }
29
+ constructor(options) {
30
+ super(new ContractSpec(["AAAAAAAAACZHZXQgdGhlIHVuZGVybHlpbmcgYXNzZXQgdG9rZW4gYWRkcmVzcwAAAAAABWFzc2V0AAAAAAAAAAAAAAEAAAPoAAAAEw==",
31
+ "AAAAAAAAAIdTcGVuZCB0cmVhc3VyeSBhc3NldHMg4oCUIG9ubHkgY2FsbGFibGUgYnkgdGhlIEdvdmVybm9yIGNvbnRyYWN0CgpUaGlzIGlzIGludm9rZWQgYXMgcGFydCBvZiBleGVjdXRpbmcgYW4gYXBwcm92ZWQgZ292ZXJuYW5jZSBwcm9wb3NhbC4AAAAABXNwZW5kAAAAAAAAAgAAAAAAAAAIcmVjZWl2ZXIAAAATAAAAAAAAAAZhbW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AAlDb21wbGV0ZWQAAAA="]), options);
51
+ this.options = options;
52
+ }
53
+ }
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/treasury/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAEL,MAAM,IAAI,cAAc,EAIxB,IAAI,IAAI,YAAY,GACrB,MAAM,+BAA+B,CAAC;AAcvC,cAAc,sBAAsB,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AACzD,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAA;AAE/C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,0BAA0B;IAC1B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;AAC1C,CAAC;AAKD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,CAAC,EAAE,EAAC,OAAO,EAAC,oBAAoB,EAAC;IACjC,CAAC,EAAE,EAAC,OAAO,EAAC,gBAAgB,EAAC;IAC7B,CAAC,EAAE,EAAC,OAAO,EAAC,eAAe,EAAC;IAC5B,CAAC,EAAE,EAAC,OAAO,EAAC,oBAAoB,EAAC;IACjC,CAAC,EAAE,EAAC,OAAO,EAAC,oBAAoB,EAAC;IACjC,CAAC,EAAE,EAAC,OAAO,EAAC,YAAY,EAAC;IACzB,CAAC,EAAE,EAAC,OAAO,EAAC,oBAAoB,EAAC;IACjC,CAAC,EAAE,EAAC,OAAO,EAAC,cAAc,EAAC;IAC3B,CAAC,EAAE,EAAC,OAAO,EAAC,aAAa,EAAC;IAC1B,EAAE,EAAE,EAAC,OAAO,EAAC,cAAc,EAAC;IAC5B,EAAE,EAAE,EAAC,OAAO,EAAC,uBAAuB,EAAC;CACtC,CAAA;AAqZD,MAAM,OAAO,MAAO,SAAQ,cAAc;IACxC,MAAM,CAAC,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