@huma-finance/soroban-huma-config 0.0.8-beta.2

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/src/index.ts ADDED
@@ -0,0 +1,560 @@
1
+ import { ContractSpec, Address } from '@stellar/stellar-sdk'
2
+ import { Buffer } from 'buffer'
3
+ import {
4
+ AssembledTransaction,
5
+ ContractClient,
6
+ ContractClientOptions,
7
+ } from '@stellar/stellar-sdk/lib/contract_client/index.js'
8
+ import type {
9
+ u32,
10
+ i32,
11
+ u64,
12
+ i64,
13
+ u128,
14
+ i128,
15
+ u256,
16
+ i256,
17
+ Option,
18
+ Typepoint,
19
+ Duration,
20
+ } from '@stellar/stellar-sdk/lib/contract_client'
21
+ import { Result } from '@stellar/stellar-sdk/lib/rust_types/index.js'
22
+ export * from '@stellar/stellar-sdk'
23
+ export * from '@stellar/stellar-sdk/lib/contract_client/index.js'
24
+ export * from '@stellar/stellar-sdk/lib/rust_types/index.js'
25
+
26
+ if (typeof window !== 'undefined') {
27
+ //@ts-ignore Buffer exists
28
+ window.Buffer = window.Buffer || Buffer
29
+ }
30
+
31
+ export const networks = {
32
+ testnet: {
33
+ networkPassphrase: 'Test SDF Network ; September 2015',
34
+ contractId: 'CD6E7GFRHBQ627ZXK5YNMQFBBLFCXBBEU6VYXBSQ77CYOYQC5UV3HS76',
35
+ },
36
+ } as const
37
+
38
+ export const Errors = {
39
+ 1: { message: '' },
40
+ 2: { message: '' },
41
+ 3: { message: '' },
42
+ }
43
+ export type HumaConfigDataKey =
44
+ | { tag: 'HumaOwner'; values: void }
45
+ | { tag: 'HumaTreasury'; values: void }
46
+ | { tag: 'Sentinel'; values: void }
47
+ | { tag: 'ProtocolFeeInBps'; values: void }
48
+ | { tag: 'IsPaused'; values: void }
49
+ | { tag: 'Pauser'; values: readonly [string] }
50
+ | { tag: 'ValidLiquidityAsset'; values: readonly [string] }
51
+
52
+ /**
53
+ * The Huma protocol has been initialized.
54
+ * # Fields
55
+ * * `huma_owner` - The address of the Huma owner account.
56
+ * * `huma_treasury` - The address of the Huma treasury account.
57
+ * * `sentinel` - The address of the Sentinel service account.
58
+ */
59
+ export interface ProtocolInitializedEvent {
60
+ huma_owner: string
61
+ huma_treasury: string
62
+ sentinel: string
63
+ }
64
+
65
+ /**
66
+ * The Huma protocol has been paused.
67
+ * # Fields
68
+ * * `paused` - Whether the protocol is paused. The value acts as a placeholder only to get around
69
+ * the restriction that `contracttype` doesn't allow empty structs. The value is always `true`.
70
+ */
71
+ export interface ProtocolPausedEvent {
72
+ paused: boolean
73
+ }
74
+
75
+ /**
76
+ * The Huma protocol has been unpaused.
77
+ * # Fields
78
+ * * `paused` - Whether the protocol is paused. The value acts as a placeholder only to get around
79
+ * the restriction that `contractype` doesn't allow empty structs. The value is always `false`.
80
+ */
81
+ export interface ProtocolUnpausedEvent {
82
+ paused: boolean
83
+ }
84
+
85
+ /**
86
+ * The treasury address for the Huma protocol has changed.
87
+ * # Fields
88
+ * * `treasury` - The address of the new Huma treasury.
89
+ */
90
+ export interface HumaTreasuryChangedEvent {
91
+ treasury: string
92
+ }
93
+
94
+ /**
95
+ * A pauser has been added. A pauser is someone who can pause the protocol.
96
+ * # Fields
97
+ * * `pauser` - The address of the pauser being added.
98
+ */
99
+ export interface PauserAddedEvent {
100
+ pauser: string
101
+ }
102
+
103
+ /**
104
+ * A pauser has been removed.
105
+ * # Fields
106
+ * * `pauser` - The address of the pauser being removed.
107
+ */
108
+ export interface PauserRemovedEvent {
109
+ pauser: string
110
+ }
111
+
112
+ /**
113
+ * New underlying asset supported by the protocol is added.
114
+ * # Fields
115
+ * * `asset` - The address of the liquidity asset being added.
116
+ */
117
+ export interface LiquidityAssetAddedEvent {
118
+ asset: string
119
+ }
120
+
121
+ /**
122
+ * Remove the asset that is no longer supported by the protocol.
123
+ * # Fields
124
+ * * `asset` - The address of the liquidity asset being removed.
125
+ */
126
+ export interface LiquidityAssetRemovedEvent {
127
+ asset: string
128
+ }
129
+
130
+ /**
131
+ * The account for the Sentinel Service has been changed.
132
+ * # Fields
133
+ * * `account` - The address of the new Sentinel Service.
134
+ */
135
+ export interface SentinelServiceAccountChangedEvent {
136
+ account: string
137
+ }
138
+
139
+ /**
140
+ * The protocol fee has been changed.
141
+ * # Fields
142
+ * * `old_fee_bps` - The old protocol fee in bps.
143
+ * * `new_fee_bps` - The new protocol fee in bps.
144
+ */
145
+ export interface ProtocolFeeChangedEvent {
146
+ new_fee_bps: u32
147
+ old_fee_bps: u32
148
+ }
149
+
150
+ export interface Client {
151
+ /**
152
+ * 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.
153
+ */
154
+ initialize: (
155
+ {
156
+ huma_owner,
157
+ huma_treasury,
158
+ sentinel,
159
+ }: { huma_owner: string; huma_treasury: string; sentinel: string },
160
+ options?: {
161
+ /**
162
+ * The fee to pay for the transaction. Default: BASE_FEE
163
+ */
164
+ fee?: number
165
+
166
+ /**
167
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
168
+ */
169
+ timeoutInSeconds?: number
170
+
171
+ /**
172
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
173
+ */
174
+ simulate?: boolean
175
+ },
176
+ ) => Promise<AssembledTransaction<null>>
177
+
178
+ /**
179
+ * Construct and simulate a get_huma_owner 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.
180
+ */
181
+ get_huma_owner: (options?: {
182
+ /**
183
+ * The fee to pay for the transaction. Default: BASE_FEE
184
+ */
185
+ fee?: number
186
+
187
+ /**
188
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
189
+ */
190
+ timeoutInSeconds?: number
191
+
192
+ /**
193
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
194
+ */
195
+ simulate?: boolean
196
+ }) => Promise<AssembledTransaction<string>>
197
+
198
+ /**
199
+ * Construct and simulate a get_huma_treasury 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.
200
+ */
201
+ get_huma_treasury: (options?: {
202
+ /**
203
+ * The fee to pay for the transaction. Default: BASE_FEE
204
+ */
205
+ fee?: number
206
+
207
+ /**
208
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
209
+ */
210
+ timeoutInSeconds?: number
211
+
212
+ /**
213
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
214
+ */
215
+ simulate?: boolean
216
+ }) => Promise<AssembledTransaction<string>>
217
+
218
+ /**
219
+ * Construct and simulate a set_huma_treasury 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.
220
+ */
221
+ set_huma_treasury: (
222
+ { addr }: { addr: string },
223
+ options?: {
224
+ /**
225
+ * The fee to pay for the transaction. Default: BASE_FEE
226
+ */
227
+ fee?: number
228
+
229
+ /**
230
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
231
+ */
232
+ timeoutInSeconds?: number
233
+
234
+ /**
235
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
236
+ */
237
+ simulate?: boolean
238
+ },
239
+ ) => Promise<AssembledTransaction<null>>
240
+
241
+ /**
242
+ * Construct and simulate a get_sentinel 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.
243
+ */
244
+ get_sentinel: (options?: {
245
+ /**
246
+ * The fee to pay for the transaction. Default: BASE_FEE
247
+ */
248
+ fee?: number
249
+
250
+ /**
251
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
252
+ */
253
+ timeoutInSeconds?: number
254
+
255
+ /**
256
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
257
+ */
258
+ simulate?: boolean
259
+ }) => Promise<AssembledTransaction<string>>
260
+
261
+ /**
262
+ * Construct and simulate a set_sentinel 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.
263
+ */
264
+ set_sentinel: (
265
+ { addr }: { addr: string },
266
+ options?: {
267
+ /**
268
+ * The fee to pay for the transaction. Default: BASE_FEE
269
+ */
270
+ fee?: number
271
+
272
+ /**
273
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
274
+ */
275
+ timeoutInSeconds?: number
276
+
277
+ /**
278
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
279
+ */
280
+ simulate?: boolean
281
+ },
282
+ ) => Promise<AssembledTransaction<null>>
283
+
284
+ /**
285
+ * Construct and simulate a is_protocol_paused 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.
286
+ */
287
+ is_protocol_paused: (options?: {
288
+ /**
289
+ * The fee to pay for the transaction. Default: BASE_FEE
290
+ */
291
+ fee?: number
292
+
293
+ /**
294
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
295
+ */
296
+ timeoutInSeconds?: number
297
+
298
+ /**
299
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
300
+ */
301
+ simulate?: boolean
302
+ }) => Promise<AssembledTransaction<boolean>>
303
+
304
+ /**
305
+ * Construct and simulate a pause_protocol 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.
306
+ */
307
+ pause_protocol: (
308
+ { caller }: { caller: string },
309
+ options?: {
310
+ /**
311
+ * The fee to pay for the transaction. Default: BASE_FEE
312
+ */
313
+ fee?: number
314
+
315
+ /**
316
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
317
+ */
318
+ timeoutInSeconds?: number
319
+
320
+ /**
321
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
322
+ */
323
+ simulate?: boolean
324
+ },
325
+ ) => Promise<AssembledTransaction<null>>
326
+
327
+ /**
328
+ * Construct and simulate a unpause_protocol 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.
329
+ */
330
+ unpause_protocol: (options?: {
331
+ /**
332
+ * The fee to pay for the transaction. Default: BASE_FEE
333
+ */
334
+ fee?: number
335
+
336
+ /**
337
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
338
+ */
339
+ timeoutInSeconds?: number
340
+
341
+ /**
342
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
343
+ */
344
+ simulate?: boolean
345
+ }) => Promise<AssembledTransaction<null>>
346
+
347
+ /**
348
+ * Construct and simulate a is_pauser 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.
349
+ */
350
+ is_pauser: (
351
+ { addr }: { addr: string },
352
+ options?: {
353
+ /**
354
+ * The fee to pay for the transaction. Default: BASE_FEE
355
+ */
356
+ fee?: number
357
+
358
+ /**
359
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
360
+ */
361
+ timeoutInSeconds?: number
362
+
363
+ /**
364
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
365
+ */
366
+ simulate?: boolean
367
+ },
368
+ ) => Promise<AssembledTransaction<boolean>>
369
+
370
+ /**
371
+ * Construct and simulate a add_pauser 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.
372
+ */
373
+ add_pauser: (
374
+ { addr }: { addr: string },
375
+ options?: {
376
+ /**
377
+ * The fee to pay for the transaction. Default: BASE_FEE
378
+ */
379
+ fee?: number
380
+
381
+ /**
382
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
383
+ */
384
+ timeoutInSeconds?: number
385
+
386
+ /**
387
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
388
+ */
389
+ simulate?: boolean
390
+ },
391
+ ) => Promise<AssembledTransaction<null>>
392
+
393
+ /**
394
+ * Construct and simulate a remove_pauser 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.
395
+ */
396
+ remove_pauser: (
397
+ { addr }: { addr: string },
398
+ options?: {
399
+ /**
400
+ * The fee to pay for the transaction. Default: BASE_FEE
401
+ */
402
+ fee?: number
403
+
404
+ /**
405
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
406
+ */
407
+ timeoutInSeconds?: number
408
+
409
+ /**
410
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
411
+ */
412
+ simulate?: boolean
413
+ },
414
+ ) => Promise<AssembledTransaction<null>>
415
+
416
+ /**
417
+ * Construct and simulate a is_asset_valid 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.
418
+ */
419
+ is_asset_valid: (
420
+ { addr }: { addr: string },
421
+ options?: {
422
+ /**
423
+ * The fee to pay for the transaction. Default: BASE_FEE
424
+ */
425
+ fee?: number
426
+
427
+ /**
428
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
429
+ */
430
+ timeoutInSeconds?: number
431
+
432
+ /**
433
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
434
+ */
435
+ simulate?: boolean
436
+ },
437
+ ) => Promise<AssembledTransaction<boolean>>
438
+
439
+ /**
440
+ * Construct and simulate a set_liquidity_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.
441
+ */
442
+ set_liquidity_asset: (
443
+ { addr, valid }: { addr: string; valid: boolean },
444
+ options?: {
445
+ /**
446
+ * The fee to pay for the transaction. Default: BASE_FEE
447
+ */
448
+ fee?: number
449
+
450
+ /**
451
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
452
+ */
453
+ timeoutInSeconds?: number
454
+
455
+ /**
456
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
457
+ */
458
+ simulate?: boolean
459
+ },
460
+ ) => Promise<AssembledTransaction<null>>
461
+
462
+ /**
463
+ * Construct and simulate a get_protocol_fee_bps 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.
464
+ */
465
+ get_protocol_fee_bps: (options?: {
466
+ /**
467
+ * The fee to pay for the transaction. Default: BASE_FEE
468
+ */
469
+ fee?: number
470
+
471
+ /**
472
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
473
+ */
474
+ timeoutInSeconds?: number
475
+
476
+ /**
477
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
478
+ */
479
+ simulate?: boolean
480
+ }) => Promise<AssembledTransaction<u32>>
481
+
482
+ /**
483
+ * Construct and simulate a set_protocol_fee_bps 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.
484
+ */
485
+ set_protocol_fee_bps: (
486
+ { fee_bps }: { fee_bps: u32 },
487
+ options?: {
488
+ /**
489
+ * The fee to pay for the transaction. Default: BASE_FEE
490
+ */
491
+ fee?: number
492
+
493
+ /**
494
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
495
+ */
496
+ timeoutInSeconds?: number
497
+
498
+ /**
499
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
500
+ */
501
+ simulate?: boolean
502
+ },
503
+ ) => Promise<AssembledTransaction<null>>
504
+ }
505
+ export class Client extends ContractClient {
506
+ constructor(public readonly options: ContractClientOptions) {
507
+ super(
508
+ new ContractSpec([
509
+ 'AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAAAwAAAAAAAAAKaHVtYV9vd25lcgAAAAAAEwAAAAAAAAANaHVtYV90cmVhc3VyeQAAAAAAABMAAAAAAAAACHNlbnRpbmVsAAAAEwAAAAA=',
510
+ 'AAAAAAAAAAAAAAAOZ2V0X2h1bWFfb3duZXIAAAAAAAAAAAABAAAAEw==',
511
+ 'AAAAAAAAAAAAAAARZ2V0X2h1bWFfdHJlYXN1cnkAAAAAAAAAAAAAAQAAABM=',
512
+ 'AAAAAAAAAAAAAAARc2V0X2h1bWFfdHJlYXN1cnkAAAAAAAABAAAAAAAAAARhZGRyAAAAEwAAAAA=',
513
+ 'AAAAAAAAAAAAAAAMZ2V0X3NlbnRpbmVsAAAAAAAAAAEAAAAT',
514
+ 'AAAAAAAAAAAAAAAMc2V0X3NlbnRpbmVsAAAAAQAAAAAAAAAEYWRkcgAAABMAAAAA',
515
+ 'AAAAAAAAAAAAAAASaXNfcHJvdG9jb2xfcGF1c2VkAAAAAAAAAAAAAQAAAAE=',
516
+ 'AAAAAAAAAAAAAAAOcGF1c2VfcHJvdG9jb2wAAAAAAAEAAAAAAAAABmNhbGxlcgAAAAAAEwAAAAA=',
517
+ 'AAAAAAAAAAAAAAAQdW5wYXVzZV9wcm90b2NvbAAAAAAAAAAA',
518
+ 'AAAAAAAAAAAAAAAJaXNfcGF1c2VyAAAAAAAAAQAAAAAAAAAEYWRkcgAAABMAAAABAAAAAQ==',
519
+ 'AAAAAAAAAAAAAAAKYWRkX3BhdXNlcgAAAAAAAQAAAAAAAAAEYWRkcgAAABMAAAAA',
520
+ 'AAAAAAAAAAAAAAANcmVtb3ZlX3BhdXNlcgAAAAAAAAEAAAAAAAAABGFkZHIAAAATAAAAAA==',
521
+ 'AAAAAAAAAAAAAAAOaXNfYXNzZXRfdmFsaWQAAAAAAAEAAAAAAAAABGFkZHIAAAAT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wuCiMgRmllbGRzCiogYGFzc2V0YCAtIFRoZSBhZGRyZXNzIG9mIHRoZSBsaXF1aWRpdHkgYXNzZXQgYmVpbmcgcmVtb3ZlZC4AAAAAAAAAGkxpcXVpZGl0eUFzc2V0UmVtb3ZlZEV2ZW50AAAAAAABAAAAAAAAAAVhc3NldAAAAAAAABM=',
535
+ 'AAAAAQAAAHZUaGUgYWNjb3VudCBmb3IgdGhlIFNlbnRpbmVsIFNlcnZpY2UgaGFzIGJlZW4gY2hhbmdlZC4KIyBGaWVsZHMKKiBgYWNjb3VudGAgLSBUaGUgYWRkcmVzcyBvZiB0aGUgbmV3IFNlbnRpbmVsIFNlcnZpY2UuAAAAAAAAAAAAIlNlbnRpbmVsU2VydmljZUFjY291bnRDaGFuZ2VkRXZlbnQAAAAAAAEAAAAAAAAAB2FjY291bnQAAAAAEw==',
536
+ 'AAAAAQAAAIlUaGUgcHJvdG9jb2wgZmVlIGhhcyBiZWVuIGNoYW5nZWQuCiMgRmllbGRzCiogYG9sZF9mZWVfYnBzYCAtIFRoZSBvbGQgcHJvdG9jb2wgZmVlIGluIGJwcy4KKiBgbmV3X2ZlZV9icHNgIC0gVGhlIG5ldyBwcm90b2NvbCBmZWUgaW4gYnBzLgAAAAAAAAAAAAAXUHJvdG9jb2xGZWVDaGFuZ2VkRXZlbnQAAAAAAgAAAAAAAAALbmV3X2ZlZV9icHMAAAAABAAAAAAAAAALb2xkX2ZlZV9icHMAAAAABA==',
537
+ 'AAAABAAAAAAAAAAAAAAAC0NvbW1vbkVycm9yAAAAAAIAAAAAAAAAEkFscmVhZHlJbml0aWFsaXplZAAAAAAAAQAAAAAAAAAgQXV0aG9yaXplZENvbnRyYWN0Q2FsbGVyUmVxdWlyZWQAAABP',
538
+ ]),
539
+ options,
540
+ )
541
+ }
542
+ public readonly fromJSON = {
543
+ initialize: this.txFromJSON<null>,
544
+ get_huma_owner: this.txFromJSON<string>,
545
+ get_huma_treasury: this.txFromJSON<string>,
546
+ set_huma_treasury: this.txFromJSON<null>,
547
+ get_sentinel: this.txFromJSON<string>,
548
+ set_sentinel: this.txFromJSON<null>,
549
+ is_protocol_paused: this.txFromJSON<boolean>,
550
+ pause_protocol: this.txFromJSON<null>,
551
+ unpause_protocol: this.txFromJSON<null>,
552
+ is_pauser: this.txFromJSON<boolean>,
553
+ add_pauser: this.txFromJSON<null>,
554
+ remove_pauser: this.txFromJSON<null>,
555
+ is_asset_valid: this.txFromJSON<boolean>,
556
+ set_liquidity_asset: this.txFromJSON<null>,
557
+ get_protocol_fee_bps: this.txFromJSON<u32>,
558
+ set_protocol_fee_bps: this.txFromJSON<null>,
559
+ }
560
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "include": ["src/**/*"],
3
+ "compilerOptions": {
4
+ "composite": true,
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "rootDir": "./src",
8
+ "outDir": "dist",
9
+ "moduleResolution": "node",
10
+ "declaration": true,
11
+ "strictNullChecks": true,
12
+ "skipLibCheck": true
13
+ }
14
+ }