@suilend/springsui-cli 1.0.0 → 1.0.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.
Files changed (32) hide show
  1. package/README.md +7 -0
  2. package/cli/src/index.js +57 -17
  3. package/package.json +1 -1
  4. package/sdk/src/_generated/_dependencies/source/0x1/ascii/structs.d.ts +3 -3
  5. package/sdk/src/_generated/_dependencies/source/0x1/ascii/structs.js +4 -4
  6. package/sdk/src/_generated/_dependencies/source/0x1/index.d.ts +1 -1
  7. package/sdk/src/_generated/_dependencies/source/0x1/index.js +2 -2
  8. package/sdk/src/_generated/_dependencies/source/0x1/option/structs.d.ts +2 -2
  9. package/sdk/src/_generated/_dependencies/source/0x1/option/structs.js +2 -2
  10. package/sdk/src/_generated/_dependencies/source/0x1/string/structs.d.ts +2 -2
  11. package/sdk/src/_generated/_dependencies/source/0x1/string/structs.js +2 -2
  12. package/sdk/src/_generated/_dependencies/source/0x1/type-name/structs.d.ts +2 -2
  13. package/sdk/src/_generated/_dependencies/source/0x1/type-name/structs.js +2 -2
  14. package/sdk/src/_generated/_dependencies/source/0x3/index.d.ts +1 -1
  15. package/sdk/src/_generated/_dependencies/source/0x3/index.js +2 -2
  16. package/sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.d.ts +7 -7
  17. package/sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.js +12 -12
  18. package/sdk/src/_generated/liquid_staking/cell/structs.d.ts +2 -2
  19. package/sdk/src/_generated/liquid_staking/fees/structs.d.ts +6 -6
  20. package/sdk/src/_generated/liquid_staking/index.d.ts +2 -2
  21. package/sdk/src/_generated/liquid_staking/index.js +3 -3
  22. package/sdk/src/_generated/liquid_staking/liquid-staking/functions.d.ts +1 -1
  23. package/sdk/src/_generated/liquid_staking/liquid-staking/functions.js +1 -1
  24. package/sdk/src/_generated/liquid_staking/liquid-staking/structs.d.ts +28 -28
  25. package/sdk/src/_generated/liquid_staking/storage/structs.d.ts +6 -6
  26. package/sdk/src/_generated/liquid_staking/version/structs.d.ts +3 -3
  27. package/sdk/src/_generated/liquid_staking/weight/functions.d.ts +20 -0
  28. package/sdk/src/_generated/liquid_staking/weight/functions.js +41 -0
  29. package/sdk/src/_generated/liquid_staking/weight/structs.d.ts +46 -4
  30. package/sdk/src/_generated/liquid_staking/weight/structs.js +127 -1
  31. package/sdk/src/index.d.ts +12 -8
  32. package/sdk/src/index.js +71 -22
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PKG_V1 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
4
4
  exports.setPublishedAt = setPublishedAt;
5
- exports.PACKAGE_ID = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e";
6
- exports.PUBLISHED_AT = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e";
5
+ exports.PACKAGE_ID = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7";
6
+ exports.PUBLISHED_AT = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7";
7
7
  function setPublishedAt(publishedAt) {
8
8
  exports.PUBLISHED_AT = publishedAt;
9
9
  }
10
- exports.PKG_V1 = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e";
10
+ exports.PKG_V1 = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7";
@@ -51,7 +51,7 @@ export interface DecreaseValidatorStakeArgs {
51
51
  adminCap: TransactionObjectInput;
52
52
  systemState: TransactionObjectInput;
53
53
  validatorAddress: string | TransactionArgument;
54
- maxSuiAmount: bigint | TransactionArgument;
54
+ targetUnstakeSuiAmount: bigint | TransactionArgument;
55
55
  }
56
56
  export declare function decreaseValidatorStake(tx: Transaction, typeArg: string, args: DecreaseValidatorStakeArgs): import("@mysten/sui/transactions").TransactionResult;
57
57
  export interface IncreaseValidatorStakeArgs {
@@ -131,7 +131,7 @@ function decreaseValidatorStake(tx, typeArg, args) {
131
131
  (0, util_1.obj)(tx, args.adminCap),
132
132
  (0, util_1.obj)(tx, args.systemState),
133
133
  (0, util_1.pure)(tx, args.validatorAddress, `address`),
134
- (0, util_1.pure)(tx, args.maxSuiAmount, `u64`),
134
+ (0, util_1.pure)(tx, args.targetUnstakeSuiAmount, `u64`),
135
135
  ],
136
136
  });
137
137
  }
@@ -20,10 +20,10 @@ export interface AdminCapFields<P extends PhantomTypeArgument> {
20
20
  export type AdminCapReified<P extends PhantomTypeArgument> = Reified<AdminCap<P>, AdminCapFields<P>>;
21
21
  export declare class AdminCap<P extends PhantomTypeArgument> implements StructClass {
22
22
  __StructClass: true;
23
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::AdminCap";
23
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::AdminCap";
24
24
  static readonly $numTypeParams = 1;
25
25
  static readonly $isPhantom: readonly [true];
26
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::AdminCap";
26
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::AdminCap";
27
27
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::AdminCap<${PhantomToTypeStr<P>}>`;
28
28
  readonly $typeArgs: [PhantomToTypeStr<P>];
29
29
  readonly $isPhantom: readonly [true];
@@ -71,10 +71,10 @@ export interface CollectFeesEventFields {
71
71
  export type CollectFeesEventReified = Reified<CollectFeesEvent, CollectFeesEventFields>;
72
72
  export declare class CollectFeesEvent implements StructClass {
73
73
  __StructClass: true;
74
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::CollectFeesEvent";
74
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CollectFeesEvent";
75
75
  static readonly $numTypeParams = 0;
76
76
  static readonly $isPhantom: readonly [];
77
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::CollectFeesEvent";
77
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CollectFeesEvent";
78
78
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::CollectFeesEvent`;
79
79
  readonly $typeArgs: [];
80
80
  readonly $isPhantom: readonly [];
@@ -84,7 +84,7 @@ export declare class CollectFeesEvent implements StructClass {
84
84
  static reified(): CollectFeesEventReified;
85
85
  static get r(): reified.StructClassReified<CollectFeesEvent, CollectFeesEventFields>;
86
86
  static phantom(): PhantomReified<ToTypeStr<CollectFeesEvent>>;
87
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::CollectFeesEvent">;
87
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CollectFeesEvent">;
88
88
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
89
89
  typename: {
90
90
  name: {
@@ -133,10 +133,10 @@ export interface CreateEventFields {
133
133
  export type CreateEventReified = Reified<CreateEvent, CreateEventFields>;
134
134
  export declare class CreateEvent implements StructClass {
135
135
  __StructClass: true;
136
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::CreateEvent";
136
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CreateEvent";
137
137
  static readonly $numTypeParams = 0;
138
138
  static readonly $isPhantom: readonly [];
139
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::CreateEvent";
139
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CreateEvent";
140
140
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::CreateEvent`;
141
141
  readonly $typeArgs: [];
142
142
  readonly $isPhantom: readonly [];
@@ -146,7 +146,7 @@ export declare class CreateEvent implements StructClass {
146
146
  static reified(): CreateEventReified;
147
147
  static get r(): reified.StructClassReified<CreateEvent, CreateEventFields>;
148
148
  static phantom(): PhantomReified<ToTypeStr<CreateEvent>>;
149
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::CreateEvent">;
149
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CreateEvent">;
150
150
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
151
151
  typename: {
152
152
  name: {
@@ -200,10 +200,10 @@ export interface DecreaseValidatorStakeEventFields {
200
200
  export type DecreaseValidatorStakeEventReified = Reified<DecreaseValidatorStakeEvent, DecreaseValidatorStakeEventFields>;
201
201
  export declare class DecreaseValidatorStakeEvent implements StructClass {
202
202
  __StructClass: true;
203
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::DecreaseValidatorStakeEvent";
203
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::DecreaseValidatorStakeEvent";
204
204
  static readonly $numTypeParams = 0;
205
205
  static readonly $isPhantom: readonly [];
206
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::DecreaseValidatorStakeEvent";
206
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::DecreaseValidatorStakeEvent";
207
207
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::DecreaseValidatorStakeEvent`;
208
208
  readonly $typeArgs: [];
209
209
  readonly $isPhantom: readonly [];
@@ -214,7 +214,7 @@ export declare class DecreaseValidatorStakeEvent implements StructClass {
214
214
  static reified(): DecreaseValidatorStakeEventReified;
215
215
  static get r(): reified.StructClassReified<DecreaseValidatorStakeEvent, DecreaseValidatorStakeEventFields>;
216
216
  static phantom(): PhantomReified<ToTypeStr<DecreaseValidatorStakeEvent>>;
217
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::DecreaseValidatorStakeEvent">;
217
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::DecreaseValidatorStakeEvent">;
218
218
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
219
219
  typename: {
220
220
  name: {
@@ -274,10 +274,10 @@ export interface EpochChangedEventFields {
274
274
  export type EpochChangedEventReified = Reified<EpochChangedEvent, EpochChangedEventFields>;
275
275
  export declare class EpochChangedEvent implements StructClass {
276
276
  __StructClass: true;
277
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::EpochChangedEvent";
277
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::EpochChangedEvent";
278
278
  static readonly $numTypeParams = 0;
279
279
  static readonly $isPhantom: readonly [];
280
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::EpochChangedEvent";
280
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::EpochChangedEvent";
281
281
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::EpochChangedEvent`;
282
282
  readonly $typeArgs: [];
283
283
  readonly $isPhantom: readonly [];
@@ -290,7 +290,7 @@ export declare class EpochChangedEvent implements StructClass {
290
290
  static reified(): EpochChangedEventReified;
291
291
  static get r(): reified.StructClassReified<EpochChangedEvent, EpochChangedEventFields>;
292
292
  static phantom(): PhantomReified<ToTypeStr<EpochChangedEvent>>;
293
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::EpochChangedEvent">;
293
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::EpochChangedEvent">;
294
294
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
295
295
  typename: {
296
296
  name: {
@@ -352,10 +352,10 @@ export interface IncreaseValidatorStakeEventFields {
352
352
  export type IncreaseValidatorStakeEventReified = Reified<IncreaseValidatorStakeEvent, IncreaseValidatorStakeEventFields>;
353
353
  export declare class IncreaseValidatorStakeEvent implements StructClass {
354
354
  __StructClass: true;
355
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::IncreaseValidatorStakeEvent";
355
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::IncreaseValidatorStakeEvent";
356
356
  static readonly $numTypeParams = 0;
357
357
  static readonly $isPhantom: readonly [];
358
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::IncreaseValidatorStakeEvent";
358
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::IncreaseValidatorStakeEvent";
359
359
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::IncreaseValidatorStakeEvent`;
360
360
  readonly $typeArgs: [];
361
361
  readonly $isPhantom: readonly [];
@@ -366,7 +366,7 @@ export declare class IncreaseValidatorStakeEvent implements StructClass {
366
366
  static reified(): IncreaseValidatorStakeEventReified;
367
367
  static get r(): reified.StructClassReified<IncreaseValidatorStakeEvent, IncreaseValidatorStakeEventFields>;
368
368
  static phantom(): PhantomReified<ToTypeStr<IncreaseValidatorStakeEvent>>;
369
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::IncreaseValidatorStakeEvent">;
369
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::IncreaseValidatorStakeEvent">;
370
370
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
371
371
  typename: {
372
372
  name: {
@@ -422,10 +422,10 @@ export interface LIQUID_STAKINGFields {
422
422
  export type LIQUID_STAKINGReified = Reified<LIQUID_STAKING, LIQUID_STAKINGFields>;
423
423
  export declare class LIQUID_STAKING implements StructClass {
424
424
  __StructClass: true;
425
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::LIQUID_STAKING";
425
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::LIQUID_STAKING";
426
426
  static readonly $numTypeParams = 0;
427
427
  static readonly $isPhantom: readonly [];
428
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::LIQUID_STAKING";
428
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::LIQUID_STAKING";
429
429
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::LIQUID_STAKING`;
430
430
  readonly $typeArgs: [];
431
431
  readonly $isPhantom: readonly [];
@@ -434,7 +434,7 @@ export declare class LIQUID_STAKING implements StructClass {
434
434
  static reified(): LIQUID_STAKINGReified;
435
435
  static get r(): reified.StructClassReified<LIQUID_STAKING, LIQUID_STAKINGFields>;
436
436
  static phantom(): PhantomReified<ToTypeStr<LIQUID_STAKING>>;
437
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::LIQUID_STAKING">;
437
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::LIQUID_STAKING">;
438
438
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
439
439
  dummy_field: boolean;
440
440
  }, {
@@ -471,10 +471,10 @@ export interface LiquidStakingInfoFields<P extends PhantomTypeArgument> {
471
471
  export type LiquidStakingInfoReified<P extends PhantomTypeArgument> = Reified<LiquidStakingInfo<P>, LiquidStakingInfoFields<P>>;
472
472
  export declare class LiquidStakingInfo<P extends PhantomTypeArgument> implements StructClass {
473
473
  __StructClass: true;
474
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::LiquidStakingInfo";
474
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::LiquidStakingInfo";
475
475
  static readonly $numTypeParams = 1;
476
476
  static readonly $isPhantom: readonly [true];
477
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::LiquidStakingInfo";
477
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::LiquidStakingInfo";
478
478
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::LiquidStakingInfo<${PhantomToTypeStr<P>}>`;
479
479
  readonly $typeArgs: [PhantomToTypeStr<P>];
480
480
  readonly $isPhantom: readonly [true];
@@ -815,10 +815,10 @@ export interface MintEventFields {
815
815
  export type MintEventReified = Reified<MintEvent, MintEventFields>;
816
816
  export declare class MintEvent implements StructClass {
817
817
  __StructClass: true;
818
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::MintEvent";
818
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::MintEvent";
819
819
  static readonly $numTypeParams = 0;
820
820
  static readonly $isPhantom: readonly [];
821
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::MintEvent";
821
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::MintEvent";
822
822
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::MintEvent`;
823
823
  readonly $typeArgs: [];
824
824
  readonly $isPhantom: readonly [];
@@ -830,7 +830,7 @@ export declare class MintEvent implements StructClass {
830
830
  static reified(): MintEventReified;
831
831
  static get r(): reified.StructClassReified<MintEvent, MintEventFields>;
832
832
  static phantom(): PhantomReified<ToTypeStr<MintEvent>>;
833
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::MintEvent">;
833
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::MintEvent">;
834
834
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
835
835
  typename: {
836
836
  name: {
@@ -889,10 +889,10 @@ export interface RedeemEventFields {
889
889
  export type RedeemEventReified = Reified<RedeemEvent, RedeemEventFields>;
890
890
  export declare class RedeemEvent implements StructClass {
891
891
  __StructClass: true;
892
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::RedeemEvent";
892
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::RedeemEvent";
893
893
  static readonly $numTypeParams = 0;
894
894
  static readonly $isPhantom: readonly [];
895
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::RedeemEvent";
895
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::RedeemEvent";
896
896
  readonly $fullTypeName: `${typeof PKG_V1}::liquid_staking::RedeemEvent`;
897
897
  readonly $typeArgs: [];
898
898
  readonly $isPhantom: readonly [];
@@ -904,7 +904,7 @@ export declare class RedeemEvent implements StructClass {
904
904
  static reified(): RedeemEventReified;
905
905
  static get r(): reified.StructClassReified<RedeemEvent, RedeemEventFields>;
906
906
  static phantom(): PhantomReified<ToTypeStr<RedeemEvent>>;
907
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::liquid_staking::RedeemEvent">;
907
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::RedeemEvent">;
908
908
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
909
909
  typename: {
910
910
  name: {
@@ -21,10 +21,10 @@ export interface StorageFields {
21
21
  export type StorageReified = Reified<Storage, StorageFields>;
22
22
  export declare class Storage implements StructClass {
23
23
  __StructClass: true;
24
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::storage::Storage";
24
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::storage::Storage";
25
25
  static readonly $numTypeParams = 0;
26
26
  static readonly $isPhantom: readonly [];
27
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::storage::Storage";
27
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::storage::Storage";
28
28
  readonly $fullTypeName: `${typeof PKG_V1}::storage::Storage`;
29
29
  readonly $typeArgs: [];
30
30
  readonly $isPhantom: readonly [];
@@ -37,7 +37,7 @@ export declare class Storage implements StructClass {
37
37
  static reified(): StorageReified;
38
38
  static get r(): reified.StructClassReified<Storage, StorageFields>;
39
39
  static phantom(): PhantomReified<ToTypeStr<Storage>>;
40
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::storage::Storage">;
40
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::storage::Storage">;
41
41
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
42
42
  sui_pool: {
43
43
  value: string;
@@ -221,10 +221,10 @@ export interface ValidatorInfoFields {
221
221
  export type ValidatorInfoReified = Reified<ValidatorInfo, ValidatorInfoFields>;
222
222
  export declare class ValidatorInfo implements StructClass {
223
223
  __StructClass: true;
224
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::storage::ValidatorInfo";
224
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::storage::ValidatorInfo";
225
225
  static readonly $numTypeParams = 0;
226
226
  static readonly $isPhantom: readonly [];
227
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::storage::ValidatorInfo";
227
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::storage::ValidatorInfo";
228
228
  readonly $fullTypeName: `${typeof PKG_V1}::storage::ValidatorInfo`;
229
229
  readonly $typeArgs: [];
230
230
  readonly $isPhantom: readonly [];
@@ -239,7 +239,7 @@ export declare class ValidatorInfo implements StructClass {
239
239
  static reified(): ValidatorInfoReified;
240
240
  static get r(): reified.StructClassReified<ValidatorInfo, ValidatorInfoFields>;
241
241
  static phantom(): PhantomReified<ToTypeStr<ValidatorInfo>>;
242
- static get p(): reified.PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::storage::ValidatorInfo">;
242
+ static get p(): reified.PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::storage::ValidatorInfo">;
243
243
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
244
244
  staking_pool_id: {
245
245
  bytes: string;
@@ -9,10 +9,10 @@ export interface VersionFields {
9
9
  export type VersionReified = Reified<Version, VersionFields>;
10
10
  export declare class Version implements StructClass {
11
11
  __StructClass: true;
12
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::version::Version";
12
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::version::Version";
13
13
  static readonly $numTypeParams = 0;
14
14
  static readonly $isPhantom: readonly [];
15
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::version::Version";
15
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::version::Version";
16
16
  readonly $fullTypeName: `${typeof PKG_V1}::version::Version`;
17
17
  readonly $typeArgs: [];
18
18
  readonly $isPhantom: readonly [];
@@ -21,7 +21,7 @@ export declare class Version implements StructClass {
21
21
  static reified(): VersionReified;
22
22
  static get r(): import("../../_framework/reified").StructClassReified<Version, VersionFields>;
23
23
  static phantom(): PhantomReified<ToTypeStr<Version>>;
24
- static get p(): PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::version::Version">;
24
+ static get p(): PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::version::Version">;
25
25
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
26
26
  pos0: number;
27
27
  }, {
@@ -1,5 +1,25 @@
1
1
  import { Transaction, TransactionObjectInput } from "@mysten/sui/transactions";
2
2
  export declare function new_(tx: Transaction, typeArg: string, adminCap: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
3
+ export interface CollectFeesArgs {
4
+ self: TransactionObjectInput;
5
+ weightHookAdminCap: TransactionObjectInput;
6
+ liquidStakingInfo: TransactionObjectInput;
7
+ systemState: TransactionObjectInput;
8
+ }
9
+ export declare function collectFees(tx: Transaction, typeArg: string, args: CollectFeesArgs): import("@mysten/sui/transactions").TransactionResult;
10
+ export declare function init(tx: Transaction, otw: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
11
+ export interface UpdateFeesArgs {
12
+ self: TransactionObjectInput;
13
+ weightHookAdminCap: TransactionObjectInput;
14
+ liquidStakingInfo: TransactionObjectInput;
15
+ feeConfig: TransactionObjectInput;
16
+ }
17
+ export declare function updateFees(tx: Transaction, typeArg: string, args: UpdateFeesArgs): import("@mysten/sui/transactions").TransactionResult;
18
+ export interface AdminCapArgs {
19
+ self: TransactionObjectInput;
20
+ weightHookAdminCap: TransactionObjectInput;
21
+ }
22
+ export declare function adminCap(tx: Transaction, typeArg: string, args: AdminCapArgs): import("@mysten/sui/transactions").TransactionResult;
3
23
  export interface EjectArgs {
4
24
  self: TransactionObjectInput;
5
25
  adminCap: TransactionObjectInput;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.new_ = new_;
4
+ exports.collectFees = collectFees;
5
+ exports.init = init;
6
+ exports.updateFees = updateFees;
7
+ exports.adminCap = adminCap;
4
8
  exports.eject = eject;
5
9
  exports.rebalance = rebalance;
6
10
  exports.setValidatorAddressesAndWeights = setValidatorAddressesAndWeights;
@@ -13,6 +17,43 @@ function new_(tx, typeArg, adminCap) {
13
17
  arguments: [(0, util_1.obj)(tx, adminCap)],
14
18
  });
15
19
  }
20
+ function collectFees(tx, typeArg, args) {
21
+ return tx.moveCall({
22
+ target: `${__1.PUBLISHED_AT}::weight::collect_fees`,
23
+ typeArguments: [typeArg],
24
+ arguments: [
25
+ (0, util_1.obj)(tx, args.self),
26
+ (0, util_1.obj)(tx, args.weightHookAdminCap),
27
+ (0, util_1.obj)(tx, args.liquidStakingInfo),
28
+ (0, util_1.obj)(tx, args.systemState),
29
+ ],
30
+ });
31
+ }
32
+ function init(tx, otw) {
33
+ return tx.moveCall({
34
+ target: `${__1.PUBLISHED_AT}::weight::init`,
35
+ arguments: [(0, util_1.obj)(tx, otw)],
36
+ });
37
+ }
38
+ function updateFees(tx, typeArg, args) {
39
+ return tx.moveCall({
40
+ target: `${__1.PUBLISHED_AT}::weight::update_fees`,
41
+ typeArguments: [typeArg],
42
+ arguments: [
43
+ (0, util_1.obj)(tx, args.self),
44
+ (0, util_1.obj)(tx, args.weightHookAdminCap),
45
+ (0, util_1.obj)(tx, args.liquidStakingInfo),
46
+ (0, util_1.obj)(tx, args.feeConfig),
47
+ ],
48
+ });
49
+ }
50
+ function adminCap(tx, typeArg, args) {
51
+ return tx.moveCall({
52
+ target: `${__1.PUBLISHED_AT}::weight::admin_cap`,
53
+ typeArguments: [typeArg],
54
+ arguments: [(0, util_1.obj)(tx, args.self), (0, util_1.obj)(tx, args.weightHookAdminCap)],
55
+ });
56
+ }
16
57
  function eject(tx, typeArg, args) {
17
58
  return tx.moveCall({
18
59
  target: `${__1.PUBLISHED_AT}::weight::eject`,
@@ -7,6 +7,48 @@ import { PKG_V1 } from "../index";
7
7
  import { AdminCap } from "../liquid-staking/structs";
8
8
  import { Version } from "../version/structs";
9
9
  import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
10
+ export declare function isWEIGHT(type: string): boolean;
11
+ export interface WEIGHTFields {
12
+ dummyField: ToField<"bool">;
13
+ }
14
+ export type WEIGHTReified = Reified<WEIGHT, WEIGHTFields>;
15
+ export declare class WEIGHT implements StructClass {
16
+ __StructClass: true;
17
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::weight::WEIGHT";
18
+ static readonly $numTypeParams = 0;
19
+ static readonly $isPhantom: readonly [];
20
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::weight::WEIGHT";
21
+ readonly $fullTypeName: `${typeof PKG_V1}::weight::WEIGHT`;
22
+ readonly $typeArgs: [];
23
+ readonly $isPhantom: readonly [];
24
+ readonly dummyField: ToField<"bool">;
25
+ private constructor();
26
+ static reified(): WEIGHTReified;
27
+ static get r(): import("../../_framework/reified").StructClassReified<WEIGHT, WEIGHTFields>;
28
+ static phantom(): PhantomReified<ToTypeStr<WEIGHT>>;
29
+ static get p(): PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::weight::WEIGHT">;
30
+ static get bcs(): import("@mysten/sui/bcs").BcsType<{
31
+ dummy_field: boolean;
32
+ }, {
33
+ dummy_field: boolean;
34
+ }>;
35
+ static fromFields(fields: Record<string, any>): WEIGHT;
36
+ static fromFieldsWithTypes(item: FieldsWithTypes): WEIGHT;
37
+ static fromBcs(data: Uint8Array): WEIGHT;
38
+ toJSONField(): {
39
+ dummyField: boolean;
40
+ };
41
+ toJSON(): {
42
+ dummyField: boolean;
43
+ $typeName: string;
44
+ $typeArgs: [];
45
+ };
46
+ static fromJSONField(field: any): WEIGHT;
47
+ static fromJSON(json: Record<string, any>): WEIGHT;
48
+ static fromSuiParsedData(content: SuiParsedData): WEIGHT;
49
+ static fromSuiObjectData(data: SuiObjectData): WEIGHT;
50
+ static fetch(client: SuiClient, id: string): Promise<WEIGHT>;
51
+ }
10
52
  export declare function isWeightHook(type: string): boolean;
11
53
  export interface WeightHookFields<P extends PhantomTypeArgument> {
12
54
  id: ToField<UID>;
@@ -19,10 +61,10 @@ export interface WeightHookFields<P extends PhantomTypeArgument> {
19
61
  export type WeightHookReified<P extends PhantomTypeArgument> = Reified<WeightHook<P>, WeightHookFields<P>>;
20
62
  export declare class WeightHook<P extends PhantomTypeArgument> implements StructClass {
21
63
  __StructClass: true;
22
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::weight::WeightHook";
64
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::weight::WeightHook";
23
65
  static readonly $numTypeParams = 1;
24
66
  static readonly $isPhantom: readonly [true];
25
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::weight::WeightHook";
67
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::weight::WeightHook";
26
68
  readonly $fullTypeName: `${typeof PKG_V1}::weight::WeightHook<${PhantomToTypeStr<P>}>`;
27
69
  readonly $typeArgs: [PhantomToTypeStr<P>];
28
70
  readonly $isPhantom: readonly [true];
@@ -160,10 +202,10 @@ export interface WeightHookAdminCapFields<P extends PhantomTypeArgument> {
160
202
  export type WeightHookAdminCapReified<P extends PhantomTypeArgument> = Reified<WeightHookAdminCap<P>, WeightHookAdminCapFields<P>>;
161
203
  export declare class WeightHookAdminCap<P extends PhantomTypeArgument> implements StructClass {
162
204
  __StructClass: true;
163
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::weight::WeightHookAdminCap";
205
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::weight::WeightHookAdminCap";
164
206
  static readonly $numTypeParams = 1;
165
207
  static readonly $isPhantom: readonly [true];
166
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::weight::WeightHookAdminCap";
208
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::weight::WeightHookAdminCap";
167
209
  readonly $fullTypeName: `${typeof PKG_V1}::weight::WeightHookAdminCap<${PhantomToTypeStr<P>}>`;
168
210
  readonly $typeArgs: [PhantomToTypeStr<P>];
169
211
  readonly $isPhantom: readonly [true];
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.WeightHookAdminCap = exports.WeightHook = void 0;
12
+ exports.WeightHookAdminCap = exports.WeightHook = exports.WEIGHT = void 0;
13
+ exports.isWEIGHT = isWEIGHT;
13
14
  exports.isWeightHook = isWeightHook;
14
15
  exports.isWeightHookAdminCap = isWeightHookAdminCap;
15
16
  const structs_1 = require("../../_dependencies/source/0x2/bag/structs");
@@ -22,6 +23,131 @@ const structs_4 = require("../liquid-staking/structs");
22
23
  const structs_5 = require("../version/structs");
23
24
  const bcs_1 = require("@mysten/sui/bcs");
24
25
  const utils_1 = require("@mysten/sui/utils");
26
+ /* ============================== WEIGHT =============================== */
27
+ function isWEIGHT(type) {
28
+ type = (0, util_1.compressSuiType)(type);
29
+ return type === `${index_1.PKG_V1}::weight::WEIGHT`;
30
+ }
31
+ class WEIGHT {
32
+ constructor(typeArgs, fields) {
33
+ this.__StructClass = true;
34
+ this.$typeName = WEIGHT.$typeName;
35
+ this.$isPhantom = WEIGHT.$isPhantom;
36
+ this.$fullTypeName = (0, util_1.composeSuiType)(WEIGHT.$typeName, ...typeArgs);
37
+ this.$typeArgs = typeArgs;
38
+ this.dummyField = fields.dummyField;
39
+ }
40
+ static reified() {
41
+ return {
42
+ typeName: WEIGHT.$typeName,
43
+ fullTypeName: (0, util_1.composeSuiType)(WEIGHT.$typeName, ...[]),
44
+ typeArgs: [],
45
+ isPhantom: WEIGHT.$isPhantom,
46
+ reifiedTypeArgs: [],
47
+ fromFields: (fields) => WEIGHT.fromFields(fields),
48
+ fromFieldsWithTypes: (item) => WEIGHT.fromFieldsWithTypes(item),
49
+ fromBcs: (data) => WEIGHT.fromBcs(data),
50
+ bcs: WEIGHT.bcs,
51
+ fromJSONField: (field) => WEIGHT.fromJSONField(field),
52
+ fromJSON: (json) => WEIGHT.fromJSON(json),
53
+ fromSuiParsedData: (content) => WEIGHT.fromSuiParsedData(content),
54
+ fromSuiObjectData: (content) => WEIGHT.fromSuiObjectData(content),
55
+ fetch: (client, id) => __awaiter(this, void 0, void 0, function* () { return WEIGHT.fetch(client, id); }),
56
+ new: (fields) => {
57
+ return new WEIGHT([], fields);
58
+ },
59
+ kind: "StructClassReified",
60
+ };
61
+ }
62
+ static get r() {
63
+ return WEIGHT.reified();
64
+ }
65
+ static phantom() {
66
+ return (0, reified_1.phantom)(WEIGHT.reified());
67
+ }
68
+ static get p() {
69
+ return WEIGHT.phantom();
70
+ }
71
+ static get bcs() {
72
+ return bcs_1.bcs.struct("WEIGHT", {
73
+ dummy_field: bcs_1.bcs.bool(),
74
+ });
75
+ }
76
+ static fromFields(fields) {
77
+ return WEIGHT.reified().new({
78
+ dummyField: (0, reified_1.decodeFromFields)("bool", fields.dummy_field),
79
+ });
80
+ }
81
+ static fromFieldsWithTypes(item) {
82
+ if (!isWEIGHT(item.type)) {
83
+ throw new Error("not a WEIGHT type");
84
+ }
85
+ return WEIGHT.reified().new({
86
+ dummyField: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.dummy_field),
87
+ });
88
+ }
89
+ static fromBcs(data) {
90
+ return WEIGHT.fromFields(WEIGHT.bcs.parse(data));
91
+ }
92
+ toJSONField() {
93
+ return {
94
+ dummyField: this.dummyField,
95
+ };
96
+ }
97
+ toJSON() {
98
+ return Object.assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
99
+ }
100
+ static fromJSONField(field) {
101
+ return WEIGHT.reified().new({
102
+ dummyField: (0, reified_1.decodeFromJSONField)("bool", field.dummyField),
103
+ });
104
+ }
105
+ static fromJSON(json) {
106
+ if (json.$typeName !== WEIGHT.$typeName) {
107
+ throw new Error("not a WithTwoGenerics json object");
108
+ }
109
+ return WEIGHT.fromJSONField(json);
110
+ }
111
+ static fromSuiParsedData(content) {
112
+ if (content.dataType !== "moveObject") {
113
+ throw new Error("not an object");
114
+ }
115
+ if (!isWEIGHT(content.type)) {
116
+ throw new Error(`object at ${content.fields.id} is not a WEIGHT object`);
117
+ }
118
+ return WEIGHT.fromFieldsWithTypes(content);
119
+ }
120
+ static fromSuiObjectData(data) {
121
+ if (data.bcs) {
122
+ if (data.bcs.dataType !== "moveObject" || !isWEIGHT(data.bcs.type)) {
123
+ throw new Error(`object at is not a WEIGHT object`);
124
+ }
125
+ return WEIGHT.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
126
+ }
127
+ if (data.content) {
128
+ return WEIGHT.fromSuiParsedData(data.content);
129
+ }
130
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
131
+ }
132
+ static fetch(client, id) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ var _a, _b;
135
+ const res = yield client.getObject({ id, options: { showBcs: true } });
136
+ if (res.error) {
137
+ throw new Error(`error fetching WEIGHT object at id ${id}: ${res.error.code}`);
138
+ }
139
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" ||
140
+ !isWEIGHT(res.data.bcs.type)) {
141
+ throw new Error(`object at id ${id} is not a WEIGHT object`);
142
+ }
143
+ return WEIGHT.fromSuiObjectData(res.data);
144
+ });
145
+ }
146
+ }
147
+ exports.WEIGHT = WEIGHT;
148
+ WEIGHT.$typeName = `${index_1.PKG_V1}::weight::WEIGHT`;
149
+ WEIGHT.$numTypeParams = 0;
150
+ WEIGHT.$isPhantom = [];
25
151
  /* ============================== WeightHook =============================== */
26
152
  function isWeightHook(type) {
27
153
  type = (0, util_1.compressSuiType)(type);