@suilend/springsui-cli 1.0.0 → 1.0.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 (31) hide show
  1. package/cli/src/index.js +45 -5
  2. package/package.json +1 -1
  3. package/sdk/src/_generated/_dependencies/source/0x1/ascii/structs.d.ts +3 -3
  4. package/sdk/src/_generated/_dependencies/source/0x1/ascii/structs.js +4 -4
  5. package/sdk/src/_generated/_dependencies/source/0x1/index.d.ts +1 -1
  6. package/sdk/src/_generated/_dependencies/source/0x1/index.js +2 -2
  7. package/sdk/src/_generated/_dependencies/source/0x1/option/structs.d.ts +2 -2
  8. package/sdk/src/_generated/_dependencies/source/0x1/option/structs.js +2 -2
  9. package/sdk/src/_generated/_dependencies/source/0x1/string/structs.d.ts +2 -2
  10. package/sdk/src/_generated/_dependencies/source/0x1/string/structs.js +2 -2
  11. package/sdk/src/_generated/_dependencies/source/0x1/type-name/structs.d.ts +2 -2
  12. package/sdk/src/_generated/_dependencies/source/0x1/type-name/structs.js +2 -2
  13. package/sdk/src/_generated/_dependencies/source/0x3/index.d.ts +1 -1
  14. package/sdk/src/_generated/_dependencies/source/0x3/index.js +2 -2
  15. package/sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.d.ts +7 -7
  16. package/sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.js +12 -12
  17. package/sdk/src/_generated/liquid_staking/cell/structs.d.ts +2 -2
  18. package/sdk/src/_generated/liquid_staking/fees/structs.d.ts +6 -6
  19. package/sdk/src/_generated/liquid_staking/index.d.ts +2 -2
  20. package/sdk/src/_generated/liquid_staking/index.js +3 -3
  21. package/sdk/src/_generated/liquid_staking/liquid-staking/functions.d.ts +1 -1
  22. package/sdk/src/_generated/liquid_staking/liquid-staking/functions.js +1 -1
  23. package/sdk/src/_generated/liquid_staking/liquid-staking/structs.d.ts +28 -28
  24. package/sdk/src/_generated/liquid_staking/storage/structs.d.ts +6 -6
  25. package/sdk/src/_generated/liquid_staking/version/structs.d.ts +3 -3
  26. package/sdk/src/_generated/liquid_staking/weight/functions.d.ts +20 -0
  27. package/sdk/src/_generated/liquid_staking/weight/functions.js +41 -0
  28. package/sdk/src/_generated/liquid_staking/weight/structs.d.ts +46 -4
  29. package/sdk/src/_generated/liquid_staking/weight/structs.js +127 -1
  30. package/sdk/src/index.d.ts +8 -7
  31. package/sdk/src/index.js +37 -14
package/cli/src/index.js CHANGED
@@ -41,12 +41,15 @@ const sdk = __importStar(require("../../sdk/src"));
41
41
  const src_1 = require("../../sdk/src");
42
42
  const liquid_staking_1 = require("../../sdk/src/_generated/liquid_staking");
43
43
  const LIQUID_STAKING_INFO = {
44
- id: "0xdae271405d47f04ab6c824d3b362b7375844ec987a2627845af715fdcd835795",
45
- type: "0xba2a31b3b21776d859c9fdfe797f52b069fe8fe0961605ab093ca4eb437d2632::ripleys::RIPLEYS",
46
- weightHookId: "0xf244912738939d351aa762dd98c075f873fd95f2928db5fd9e74fbb01c9a686c",
44
+ id: "0x15eda7330c8f99c30e430b4d82fd7ab2af3ead4ae17046fcb224aa9bad394f6b",
45
+ type: "0x83556891f4a0f233ce7b05cfe7f957d4020492a34f5405b2cb9377d060bef4bf::spring_sui::SPRING_SUI",
46
+ weightHookId: "0xbbafcb2d7399c0846f8185da3f273ad5b26b3b35993050affa44cfa890f1f144",
47
47
  };
48
48
  const RPC_URL = "https://fullnode.mainnet.sui.io";
49
49
  const keypair = ed25519_1.Ed25519Keypair.fromSecretKey((0, utils_1.fromBase64)(process.env.SUI_SECRET_KEY));
50
+ // const keypair = Ed25519Keypair.fromSecretKey(
51
+ // fromHex(fs.readFileSync(process.env.SUI_SECRET_KEY_PATH!).toString()),
52
+ // );
50
53
  function mint(options) {
51
54
  return __awaiter(this, void 0, void 0, function* () {
52
55
  const client = new client_1.SuiClient({ url: RPC_URL });
@@ -196,9 +199,9 @@ function setValidatorAddressesAndWeights(options) {
196
199
  if (options.validators.length != options.weights.length) {
197
200
  throw new Error("Validators and weights arrays must be of the same length");
198
201
  }
199
- const validatorAddressesAndWeights = new Map();
202
+ const validatorAddressesAndWeights = {};
200
203
  for (let i = 0; i < options.validators.length; i++) {
201
- validatorAddressesAndWeights.set(options.validators[i], options.weights[i]);
204
+ validatorAddressesAndWeights[options.validators[i]] = options.weights[i];
202
205
  }
203
206
  console.log(validatorAddressesAndWeights);
204
207
  const weightHookAdminCapId = yield lstClient.getWeightHookAdminCapId(keypair.toSuiAddress());
@@ -236,6 +239,38 @@ function rebalance(options) {
236
239
  console.log(txResponse);
237
240
  });
238
241
  }
242
+ function createNewLst(options) {
243
+ return __awaiter(this, void 0, void 0, function* () {
244
+ var _a;
245
+ const client = new client_1.SuiClient({ url: RPC_URL });
246
+ const treasuryCap = yield client.getObject({
247
+ id: options.treasuryCap,
248
+ options: {
249
+ showContent: true,
250
+ },
251
+ });
252
+ console.log(treasuryCap);
253
+ // '0x2::coin::TreasuryCap<0xdc0c8026236f1be172ba03d7d689bfd663497cc5a730bf367bfb2e2c72ec6df8::ripleys::RIPLEYS>'
254
+ const type = ((_a = treasuryCap.data) === null || _a === void 0 ? void 0 : _a.content).type;
255
+ if (!type)
256
+ return;
257
+ const coinType = type.substring(type.indexOf("<") + 1, type.lastIndexOf(">"));
258
+ console.log(coinType);
259
+ const tx = new transactions_1.Transaction();
260
+ const weightHookAdminCap = src_1.LstClient.createNewLst(tx, options.treasuryCap, coinType);
261
+ tx.transferObjects([tx.object(weightHookAdminCap)], keypair.toSuiAddress());
262
+ const txResponse = yield client.signAndExecuteTransaction({
263
+ transaction: tx,
264
+ signer: keypair,
265
+ options: {
266
+ showEvents: true,
267
+ showEffects: true,
268
+ showObjectChanges: true,
269
+ },
270
+ });
271
+ console.log(txResponse);
272
+ });
273
+ }
239
274
  commander_1.program.version("1.0.0").description("Spring Sui CLI");
240
275
  commander_1.program
241
276
  .command("mint")
@@ -301,4 +336,9 @@ commander_1.program
301
336
  .command("rebalance")
302
337
  .description("rebalance the validator set")
303
338
  .action(rebalance);
339
+ commander_1.program
340
+ .command("create-new-lst")
341
+ .description("create a new liquid staking pool")
342
+ .option("--treasury-cap <TREASURY_CAP>", "Treasury cap")
343
+ .action(createNewLst);
304
344
  commander_1.program.parse(process.argv);
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@suilend/springsui-cli","version":"1.0.0","private":false,"description":"A CLI for interacting with the SpringSui program","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./cli/src":"./cli/src/index.js","./sdk/src":"./sdk/src/index.js","./sdk/src/_generated/_framework/reified":"./sdk/src/_generated/_framework/reified.js","./sdk/src/_generated/_framework/util":"./sdk/src/_generated/_framework/util.js","./sdk/src/_generated/_framework/vector":"./sdk/src/_generated/_framework/vector.js","./sdk/src/_generated/liquid_staking":"./sdk/src/_generated/liquid_staking/index.js","./sdk/src/_generated/liquid_staking/cell/structs":"./sdk/src/_generated/liquid_staking/cell/structs.js","./sdk/src/_generated/liquid_staking/fees/functions":"./sdk/src/_generated/liquid_staking/fees/functions.js","./sdk/src/_generated/liquid_staking/fees/structs":"./sdk/src/_generated/liquid_staking/fees/structs.js","./sdk/src/_generated/liquid_staking/liquid-staking/functions":"./sdk/src/_generated/liquid_staking/liquid-staking/functions.js","./sdk/src/_generated/liquid_staking/liquid-staking/structs":"./sdk/src/_generated/liquid_staking/liquid-staking/structs.js","./sdk/src/_generated/liquid_staking/storage/structs":"./sdk/src/_generated/liquid_staking/storage/structs.js","./sdk/src/_generated/liquid_staking/version/structs":"./sdk/src/_generated/liquid_staking/version/structs.js","./sdk/src/_generated/liquid_staking/weight/functions":"./sdk/src/_generated/liquid_staking/weight/functions.js","./sdk/src/_generated/liquid_staking/weight/structs":"./sdk/src/_generated/liquid_staking/weight/structs.js","./sdk/src/_generated/_dependencies/source/0x1":"./sdk/src/_generated/_dependencies/source/0x1/index.js","./sdk/src/_generated/_dependencies/source/0x2":"./sdk/src/_generated/_dependencies/source/0x2/index.js","./sdk/src/_generated/_dependencies/source/0x3":"./sdk/src/_generated/_dependencies/source/0x3/index.js","./sdk/src/_generated/_dependencies/source/0x1/ascii/structs":"./sdk/src/_generated/_dependencies/source/0x1/ascii/structs.js","./sdk/src/_generated/_dependencies/source/0x1/option/structs":"./sdk/src/_generated/_dependencies/source/0x1/option/structs.js","./sdk/src/_generated/_dependencies/source/0x1/string/structs":"./sdk/src/_generated/_dependencies/source/0x1/string/structs.js","./sdk/src/_generated/_dependencies/source/0x1/type-name/structs":"./sdk/src/_generated/_dependencies/source/0x1/type-name/structs.js","./sdk/src/_generated/_dependencies/source/0x2/bag/structs":"./sdk/src/_generated/_dependencies/source/0x2/bag/structs.js","./sdk/src/_generated/_dependencies/source/0x2/balance/structs":"./sdk/src/_generated/_dependencies/source/0x2/balance/structs.js","./sdk/src/_generated/_dependencies/source/0x2/coin/structs":"./sdk/src/_generated/_dependencies/source/0x2/coin/structs.js","./sdk/src/_generated/_dependencies/source/0x2/object/structs":"./sdk/src/_generated/_dependencies/source/0x2/object/structs.js","./sdk/src/_generated/_dependencies/source/0x2/sui/structs":"./sdk/src/_generated/_dependencies/source/0x2/sui/structs.js","./sdk/src/_generated/_dependencies/source/0x2/table/structs":"./sdk/src/_generated/_dependencies/source/0x2/table/structs.js","./sdk/src/_generated/_dependencies/source/0x2/url/structs":"./sdk/src/_generated/_dependencies/source/0x2/url/structs.js","./sdk/src/_generated/_dependencies/source/0x2/vec-map/structs":"./sdk/src/_generated/_dependencies/source/0x2/vec-map/structs.js","./sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs":"./sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.js"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix \"./src/**/*.ts\"","prettier":"prettier --write \"./src/**/*\"","lint":"bun eslint && bun prettier && bun tsc","release":"bun run build && bun ts-node ./prepublish.ts && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/solendprotocol/liquid-staking.git"},"bugs":{"url":"https://github.com/solendprotocol/liquid-staking/issues"},"dependencies":{"@mysten/bcs":"1.1.0","@mysten/sui":"1.12.0","commander":"^12.1.0","uuid":"^9.0.1"},"devDependencies":{"@types/node":"^20.12.7","ts-node":"^10.9.2","typescript":"^5.3.3"}}
1
+ {"name":"@suilend/springsui-cli","version":"1.0.1","private":false,"description":"A CLI for interacting with the SpringSui program","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./cli/src":"./cli/src/index.js","./sdk/src":"./sdk/src/index.js","./sdk/src/_generated/_framework/reified":"./sdk/src/_generated/_framework/reified.js","./sdk/src/_generated/_framework/util":"./sdk/src/_generated/_framework/util.js","./sdk/src/_generated/_framework/vector":"./sdk/src/_generated/_framework/vector.js","./sdk/src/_generated/liquid_staking":"./sdk/src/_generated/liquid_staking/index.js","./sdk/src/_generated/liquid_staking/cell/structs":"./sdk/src/_generated/liquid_staking/cell/structs.js","./sdk/src/_generated/liquid_staking/fees/functions":"./sdk/src/_generated/liquid_staking/fees/functions.js","./sdk/src/_generated/liquid_staking/fees/structs":"./sdk/src/_generated/liquid_staking/fees/structs.js","./sdk/src/_generated/liquid_staking/liquid-staking/functions":"./sdk/src/_generated/liquid_staking/liquid-staking/functions.js","./sdk/src/_generated/liquid_staking/liquid-staking/structs":"./sdk/src/_generated/liquid_staking/liquid-staking/structs.js","./sdk/src/_generated/liquid_staking/storage/structs":"./sdk/src/_generated/liquid_staking/storage/structs.js","./sdk/src/_generated/liquid_staking/version/structs":"./sdk/src/_generated/liquid_staking/version/structs.js","./sdk/src/_generated/liquid_staking/weight/functions":"./sdk/src/_generated/liquid_staking/weight/functions.js","./sdk/src/_generated/liquid_staking/weight/structs":"./sdk/src/_generated/liquid_staking/weight/structs.js","./sdk/src/_generated/_dependencies/source/0x1":"./sdk/src/_generated/_dependencies/source/0x1/index.js","./sdk/src/_generated/_dependencies/source/0x2":"./sdk/src/_generated/_dependencies/source/0x2/index.js","./sdk/src/_generated/_dependencies/source/0x3":"./sdk/src/_generated/_dependencies/source/0x3/index.js","./sdk/src/_generated/_dependencies/source/0x1/ascii/structs":"./sdk/src/_generated/_dependencies/source/0x1/ascii/structs.js","./sdk/src/_generated/_dependencies/source/0x1/option/structs":"./sdk/src/_generated/_dependencies/source/0x1/option/structs.js","./sdk/src/_generated/_dependencies/source/0x1/string/structs":"./sdk/src/_generated/_dependencies/source/0x1/string/structs.js","./sdk/src/_generated/_dependencies/source/0x1/type-name/structs":"./sdk/src/_generated/_dependencies/source/0x1/type-name/structs.js","./sdk/src/_generated/_dependencies/source/0x2/bag/structs":"./sdk/src/_generated/_dependencies/source/0x2/bag/structs.js","./sdk/src/_generated/_dependencies/source/0x2/balance/structs":"./sdk/src/_generated/_dependencies/source/0x2/balance/structs.js","./sdk/src/_generated/_dependencies/source/0x2/coin/structs":"./sdk/src/_generated/_dependencies/source/0x2/coin/structs.js","./sdk/src/_generated/_dependencies/source/0x2/object/structs":"./sdk/src/_generated/_dependencies/source/0x2/object/structs.js","./sdk/src/_generated/_dependencies/source/0x2/sui/structs":"./sdk/src/_generated/_dependencies/source/0x2/sui/structs.js","./sdk/src/_generated/_dependencies/source/0x2/table/structs":"./sdk/src/_generated/_dependencies/source/0x2/table/structs.js","./sdk/src/_generated/_dependencies/source/0x2/url/structs":"./sdk/src/_generated/_dependencies/source/0x2/url/structs.js","./sdk/src/_generated/_dependencies/source/0x2/vec-map/structs":"./sdk/src/_generated/_dependencies/source/0x2/vec-map/structs.js","./sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs":"./sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.js"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix \"./src/**/*.ts\"","prettier":"prettier --write \"./src/**/*\"","lint":"bun eslint && bun prettier && bun tsc","release":"bun run build && bun ts-node ./prepublish.ts && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/solendprotocol/liquid-staking.git"},"bugs":{"url":"https://github.com/solendprotocol/liquid-staking/issues"},"dependencies":{"@mysten/bcs":"1.1.0","@mysten/sui":"1.14.1","commander":"^12.1.0","uuid":"^9.0.1"},"devDependencies":{"@types/node":"^20.12.7","ts-node":"^10.9.2","typescript":"^5.3.3"}}
@@ -2,7 +2,7 @@ import * as reified from "../../../../_framework/reified";
2
2
  import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
3
3
  import { FieldsWithTypes } from "../../../../_framework/util";
4
4
  import { Vector } from "../../../../_framework/vector";
5
- import { PKG_V10 } from "../index";
5
+ import { PKG_V11 } from "../index";
6
6
  import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
7
7
  export declare function isChar(type: string): boolean;
8
8
  export interface CharFields {
@@ -15,7 +15,7 @@ export declare class Char implements StructClass {
15
15
  static readonly $numTypeParams = 0;
16
16
  static readonly $isPhantom: readonly [];
17
17
  readonly $typeName = "0x1::ascii::Char";
18
- readonly $fullTypeName: `${typeof PKG_V10}::ascii::Char`;
18
+ readonly $fullTypeName: `${typeof PKG_V11}::ascii::Char`;
19
19
  readonly $typeArgs: [];
20
20
  readonly $isPhantom: readonly [];
21
21
  readonly byte: ToField<"u8">;
@@ -57,7 +57,7 @@ export declare class String implements StructClass {
57
57
  static readonly $numTypeParams = 0;
58
58
  static readonly $isPhantom: readonly [];
59
59
  readonly $typeName = "0x1::ascii::String";
60
- readonly $fullTypeName: `${typeof PKG_V10}::ascii::String`;
60
+ readonly $fullTypeName: `${typeof PKG_V11}::ascii::String`;
61
61
  readonly $typeArgs: [];
62
62
  readonly $isPhantom: readonly [];
63
63
  readonly bytes: ToField<Vector<"u8">>;
@@ -44,7 +44,7 @@ const utils_1 = require("@mysten/sui/utils");
44
44
  /* ============================== Char =============================== */
45
45
  function isChar(type) {
46
46
  type = (0, util_1.compressSuiType)(type);
47
- return type === `${index_1.PKG_V10}::ascii::Char`;
47
+ return type === `${index_1.PKG_V11}::ascii::Char`;
48
48
  }
49
49
  class Char {
50
50
  constructor(typeArgs, fields) {
@@ -159,13 +159,13 @@ class Char {
159
159
  }
160
160
  }
161
161
  exports.Char = Char;
162
- Char.$typeName = `${index_1.PKG_V10}::ascii::Char`;
162
+ Char.$typeName = `${index_1.PKG_V11}::ascii::Char`;
163
163
  Char.$numTypeParams = 0;
164
164
  Char.$isPhantom = [];
165
165
  /* ============================== String =============================== */
166
166
  function isString(type) {
167
167
  type = (0, util_1.compressSuiType)(type);
168
- return type === `${index_1.PKG_V10}::ascii::String`;
168
+ return type === `${index_1.PKG_V11}::ascii::String`;
169
169
  }
170
170
  class String {
171
171
  constructor(typeArgs, fields) {
@@ -284,6 +284,6 @@ class String {
284
284
  }
285
285
  }
286
286
  exports.String = String;
287
- String.$typeName = `${index_1.PKG_V10}::ascii::String`;
287
+ String.$typeName = `${index_1.PKG_V11}::ascii::String`;
288
288
  String.$numTypeParams = 0;
289
289
  String.$isPhantom = [];
@@ -1,3 +1,3 @@
1
1
  export declare const PACKAGE_ID = "0x1";
2
2
  export declare const PUBLISHED_AT = "0x1";
3
- export declare const PKG_V10 = "0x1";
3
+ export declare const PKG_V11 = "0x1";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PKG_V10 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
3
+ exports.PKG_V11 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
4
4
  exports.PACKAGE_ID = "0x1";
5
5
  exports.PUBLISHED_AT = "0x1";
6
- exports.PKG_V10 = "0x1";
6
+ exports.PKG_V11 = "0x1";
@@ -2,7 +2,7 @@ import * as reified from "../../../../_framework/reified";
2
2
  import { PhantomReified, Reified, StructClass, ToField, ToTypeArgument, ToTypeStr, TypeArgument } from "../../../../_framework/reified";
3
3
  import { FieldsWithTypes } from "../../../../_framework/util";
4
4
  import { Vector } from "../../../../_framework/vector";
5
- import { PKG_V10 } from "../index";
5
+ import { PKG_V11 } from "../index";
6
6
  import { BcsType } from "@mysten/sui/bcs";
7
7
  import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
8
8
  export declare function isOption(type: string): boolean;
@@ -17,7 +17,7 @@ export declare class Option<Element extends TypeArgument> implements StructClass
17
17
  static readonly $isPhantom: readonly [false];
18
18
  __inner: Element;
19
19
  readonly $typeName = "0x1::option::Option";
20
- readonly $fullTypeName: `${typeof PKG_V10}::option::Option<${ToTypeStr<Element>}>`;
20
+ readonly $fullTypeName: `${typeof PKG_V11}::option::Option<${ToTypeStr<Element>}>`;
21
21
  readonly $typeArgs: [ToTypeStr<Element>];
22
22
  readonly $isPhantom: readonly [false];
23
23
  readonly vec: ToField<Vector<Element>>;
@@ -43,7 +43,7 @@ const utils_1 = require("@mysten/sui/utils");
43
43
  /* ============================== Option =============================== */
44
44
  function isOption(type) {
45
45
  type = (0, util_1.compressSuiType)(type);
46
- return type.startsWith(`${index_1.PKG_V10}::option::Option` + "<");
46
+ return type.startsWith(`${index_1.PKG_V11}::option::Option` + "<");
47
47
  }
48
48
  class Option {
49
49
  constructor(typeArgs, fields) {
@@ -175,6 +175,6 @@ class Option {
175
175
  }
176
176
  }
177
177
  exports.Option = Option;
178
- Option.$typeName = `${index_1.PKG_V10}::option::Option`;
178
+ Option.$typeName = `${index_1.PKG_V11}::option::Option`;
179
179
  Option.$numTypeParams = 1;
180
180
  Option.$isPhantom = [false];
@@ -2,7 +2,7 @@ import * as reified from "../../../../_framework/reified";
2
2
  import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
3
3
  import { FieldsWithTypes } from "../../../../_framework/util";
4
4
  import { Vector } from "../../../../_framework/vector";
5
- import { PKG_V10 } from "../index";
5
+ import { PKG_V11 } from "../index";
6
6
  import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
7
7
  export declare function isString(type: string): boolean;
8
8
  export interface StringFields {
@@ -15,7 +15,7 @@ export declare class String implements StructClass {
15
15
  static readonly $numTypeParams = 0;
16
16
  static readonly $isPhantom: readonly [];
17
17
  readonly $typeName = "0x1::string::String";
18
- readonly $fullTypeName: `${typeof PKG_V10}::string::String`;
18
+ readonly $fullTypeName: `${typeof PKG_V11}::string::String`;
19
19
  readonly $typeArgs: [];
20
20
  readonly $isPhantom: readonly [];
21
21
  readonly bytes: ToField<Vector<"u8">>;
@@ -43,7 +43,7 @@ const utils_1 = require("@mysten/sui/utils");
43
43
  /* ============================== String =============================== */
44
44
  function isString(type) {
45
45
  type = (0, util_1.compressSuiType)(type);
46
- return type === `${index_1.PKG_V10}::string::String`;
46
+ return type === `${index_1.PKG_V11}::string::String`;
47
47
  }
48
48
  class String {
49
49
  constructor(typeArgs, fields) {
@@ -162,6 +162,6 @@ class String {
162
162
  }
163
163
  }
164
164
  exports.String = String;
165
- String.$typeName = `${index_1.PKG_V10}::string::String`;
165
+ String.$typeName = `${index_1.PKG_V11}::string::String`;
166
166
  String.$numTypeParams = 0;
167
167
  String.$isPhantom = [];
@@ -1,7 +1,7 @@
1
1
  import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
2
2
  import { FieldsWithTypes } from "../../../../_framework/util";
3
3
  import { String } from "../ascii/structs";
4
- import { PKG_V10 } from "../index";
4
+ import { PKG_V11 } from "../index";
5
5
  import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
6
6
  export declare function isTypeName(type: string): boolean;
7
7
  export interface TypeNameFields {
@@ -14,7 +14,7 @@ export declare class TypeName implements StructClass {
14
14
  static readonly $numTypeParams = 0;
15
15
  static readonly $isPhantom: readonly [];
16
16
  readonly $typeName = "0x1::type_name::TypeName";
17
- readonly $fullTypeName: `${typeof PKG_V10}::type_name::TypeName`;
17
+ readonly $fullTypeName: `${typeof PKG_V11}::type_name::TypeName`;
18
18
  readonly $typeArgs: [];
19
19
  readonly $isPhantom: readonly [];
20
20
  readonly name: ToField<String>;
@@ -20,7 +20,7 @@ const utils_1 = require("@mysten/sui/utils");
20
20
  /* ============================== TypeName =============================== */
21
21
  function isTypeName(type) {
22
22
  type = (0, util_1.compressSuiType)(type);
23
- return type === `${index_1.PKG_V10}::type_name::TypeName`;
23
+ return type === `${index_1.PKG_V11}::type_name::TypeName`;
24
24
  }
25
25
  class TypeName {
26
26
  constructor(typeArgs, fields) {
@@ -139,6 +139,6 @@ class TypeName {
139
139
  }
140
140
  }
141
141
  exports.TypeName = TypeName;
142
- TypeName.$typeName = `${index_1.PKG_V10}::type_name::TypeName`;
142
+ TypeName.$typeName = `${index_1.PKG_V11}::type_name::TypeName`;
143
143
  TypeName.$numTypeParams = 0;
144
144
  TypeName.$isPhantom = [];
@@ -1,3 +1,3 @@
1
1
  export declare const PACKAGE_ID = "0x3";
2
2
  export declare const PUBLISHED_AT = "0x3";
3
- export declare const PKG_V16 = "0x3";
3
+ export declare const PKG_V17 = "0x3";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PKG_V16 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
3
+ exports.PKG_V17 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
4
4
  exports.PACKAGE_ID = "0x3";
5
5
  exports.PUBLISHED_AT = "0x3";
6
- exports.PKG_V16 = "0x3";
6
+ exports.PKG_V17 = "0x3";
@@ -7,7 +7,7 @@ import { Balance } from "../../0x2/balance/structs";
7
7
  import { ID, UID } from "../../0x2/object/structs";
8
8
  import { SUI } from "../../0x2/sui/structs";
9
9
  import { Table } from "../../0x2/table/structs";
10
- import { PKG_V16 } from "../index";
10
+ import { PKG_V17 } from "../index";
11
11
  import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
12
12
  export declare function isFungibleStakedSui(type: string): boolean;
13
13
  export interface FungibleStakedSuiFields {
@@ -22,7 +22,7 @@ export declare class FungibleStakedSui implements StructClass {
22
22
  static readonly $numTypeParams = 0;
23
23
  static readonly $isPhantom: readonly [];
24
24
  readonly $typeName = "0x3::staking_pool::FungibleStakedSui";
25
- readonly $fullTypeName: `${typeof PKG_V16}::staking_pool::FungibleStakedSui`;
25
+ readonly $fullTypeName: `${typeof PKG_V17}::staking_pool::FungibleStakedSui`;
26
26
  readonly $typeArgs: [];
27
27
  readonly $isPhantom: readonly [];
28
28
  readonly id: ToField<UID>;
@@ -88,7 +88,7 @@ export declare class FungibleStakedSuiData implements StructClass {
88
88
  static readonly $numTypeParams = 0;
89
89
  static readonly $isPhantom: readonly [];
90
90
  readonly $typeName = "0x3::staking_pool::FungibleStakedSuiData";
91
- readonly $fullTypeName: `${typeof PKG_V16}::staking_pool::FungibleStakedSuiData`;
91
+ readonly $fullTypeName: `${typeof PKG_V17}::staking_pool::FungibleStakedSuiData`;
92
92
  readonly $typeArgs: [];
93
93
  readonly $isPhantom: readonly [];
94
94
  readonly id: ToField<UID>;
@@ -156,7 +156,7 @@ export declare class FungibleStakedSuiDataKey implements StructClass {
156
156
  static readonly $numTypeParams = 0;
157
157
  static readonly $isPhantom: readonly [];
158
158
  readonly $typeName = "0x3::staking_pool::FungibleStakedSuiDataKey";
159
- readonly $fullTypeName: `${typeof PKG_V16}::staking_pool::FungibleStakedSuiDataKey`;
159
+ readonly $fullTypeName: `${typeof PKG_V17}::staking_pool::FungibleStakedSuiDataKey`;
160
160
  readonly $typeArgs: [];
161
161
  readonly $isPhantom: readonly [];
162
162
  readonly dummyField: ToField<"bool">;
@@ -199,7 +199,7 @@ export declare class PoolTokenExchangeRate implements StructClass {
199
199
  static readonly $numTypeParams = 0;
200
200
  static readonly $isPhantom: readonly [];
201
201
  readonly $typeName = "0x3::staking_pool::PoolTokenExchangeRate";
202
- readonly $fullTypeName: `${typeof PKG_V16}::staking_pool::PoolTokenExchangeRate`;
202
+ readonly $fullTypeName: `${typeof PKG_V17}::staking_pool::PoolTokenExchangeRate`;
203
203
  readonly $typeArgs: [];
204
204
  readonly $isPhantom: readonly [];
205
205
  readonly suiAmount: ToField<"u64">;
@@ -249,7 +249,7 @@ export declare class StakedSui implements StructClass {
249
249
  static readonly $numTypeParams = 0;
250
250
  static readonly $isPhantom: readonly [];
251
251
  readonly $typeName = "0x3::staking_pool::StakedSui";
252
- readonly $fullTypeName: `${typeof PKG_V16}::staking_pool::StakedSui`;
252
+ readonly $fullTypeName: `${typeof PKG_V17}::staking_pool::StakedSui`;
253
253
  readonly $typeArgs: [];
254
254
  readonly $isPhantom: readonly [];
255
255
  readonly id: ToField<UID>;
@@ -336,7 +336,7 @@ export declare class StakingPool implements StructClass {
336
336
  static readonly $numTypeParams = 0;
337
337
  static readonly $isPhantom: readonly [];
338
338
  readonly $typeName = "0x3::staking_pool::StakingPool";
339
- readonly $fullTypeName: `${typeof PKG_V16}::staking_pool::StakingPool`;
339
+ readonly $fullTypeName: `${typeof PKG_V17}::staking_pool::StakingPool`;
340
340
  readonly $typeArgs: [];
341
341
  readonly $isPhantom: readonly [];
342
342
  readonly id: ToField<UID>;
@@ -54,7 +54,7 @@ const utils_1 = require("@mysten/sui/utils");
54
54
  /* ============================== FungibleStakedSui =============================== */
55
55
  function isFungibleStakedSui(type) {
56
56
  type = (0, util_1.compressSuiType)(type);
57
- return type === `${index_1.PKG_V16}::staking_pool::FungibleStakedSui`;
57
+ return type === `${index_1.PKG_V17}::staking_pool::FungibleStakedSui`;
58
58
  }
59
59
  class FungibleStakedSui {
60
60
  constructor(typeArgs, fields) {
@@ -186,13 +186,13 @@ class FungibleStakedSui {
186
186
  }
187
187
  }
188
188
  exports.FungibleStakedSui = FungibleStakedSui;
189
- FungibleStakedSui.$typeName = `${index_1.PKG_V16}::staking_pool::FungibleStakedSui`;
189
+ FungibleStakedSui.$typeName = `${index_1.PKG_V17}::staking_pool::FungibleStakedSui`;
190
190
  FungibleStakedSui.$numTypeParams = 0;
191
191
  FungibleStakedSui.$isPhantom = [];
192
192
  /* ============================== FungibleStakedSuiData =============================== */
193
193
  function isFungibleStakedSuiData(type) {
194
194
  type = (0, util_1.compressSuiType)(type);
195
- return type === `${index_1.PKG_V16}::staking_pool::FungibleStakedSuiData`;
195
+ return type === `${index_1.PKG_V17}::staking_pool::FungibleStakedSuiData`;
196
196
  }
197
197
  class FungibleStakedSuiData {
198
198
  constructor(typeArgs, fields) {
@@ -324,13 +324,13 @@ class FungibleStakedSuiData {
324
324
  }
325
325
  }
326
326
  exports.FungibleStakedSuiData = FungibleStakedSuiData;
327
- FungibleStakedSuiData.$typeName = `${index_1.PKG_V16}::staking_pool::FungibleStakedSuiData`;
327
+ FungibleStakedSuiData.$typeName = `${index_1.PKG_V17}::staking_pool::FungibleStakedSuiData`;
328
328
  FungibleStakedSuiData.$numTypeParams = 0;
329
329
  FungibleStakedSuiData.$isPhantom = [];
330
330
  /* ============================== FungibleStakedSuiDataKey =============================== */
331
331
  function isFungibleStakedSuiDataKey(type) {
332
332
  type = (0, util_1.compressSuiType)(type);
333
- return type === `${index_1.PKG_V16}::staking_pool::FungibleStakedSuiDataKey`;
333
+ return type === `${index_1.PKG_V17}::staking_pool::FungibleStakedSuiDataKey`;
334
334
  }
335
335
  class FungibleStakedSuiDataKey {
336
336
  constructor(typeArgs, fields) {
@@ -450,13 +450,13 @@ class FungibleStakedSuiDataKey {
450
450
  }
451
451
  }
452
452
  exports.FungibleStakedSuiDataKey = FungibleStakedSuiDataKey;
453
- FungibleStakedSuiDataKey.$typeName = `${index_1.PKG_V16}::staking_pool::FungibleStakedSuiDataKey`;
453
+ FungibleStakedSuiDataKey.$typeName = `${index_1.PKG_V17}::staking_pool::FungibleStakedSuiDataKey`;
454
454
  FungibleStakedSuiDataKey.$numTypeParams = 0;
455
455
  FungibleStakedSuiDataKey.$isPhantom = [];
456
456
  /* ============================== PoolTokenExchangeRate =============================== */
457
457
  function isPoolTokenExchangeRate(type) {
458
458
  type = (0, util_1.compressSuiType)(type);
459
- return type === `${index_1.PKG_V16}::staking_pool::PoolTokenExchangeRate`;
459
+ return type === `${index_1.PKG_V17}::staking_pool::PoolTokenExchangeRate`;
460
460
  }
461
461
  class PoolTokenExchangeRate {
462
462
  constructor(typeArgs, fields) {
@@ -582,13 +582,13 @@ class PoolTokenExchangeRate {
582
582
  }
583
583
  }
584
584
  exports.PoolTokenExchangeRate = PoolTokenExchangeRate;
585
- PoolTokenExchangeRate.$typeName = `${index_1.PKG_V16}::staking_pool::PoolTokenExchangeRate`;
585
+ PoolTokenExchangeRate.$typeName = `${index_1.PKG_V17}::staking_pool::PoolTokenExchangeRate`;
586
586
  PoolTokenExchangeRate.$numTypeParams = 0;
587
587
  PoolTokenExchangeRate.$isPhantom = [];
588
588
  /* ============================== StakedSui =============================== */
589
589
  function isStakedSui(type) {
590
590
  type = (0, util_1.compressSuiType)(type);
591
- return type === `${index_1.PKG_V16}::staking_pool::StakedSui`;
591
+ return type === `${index_1.PKG_V17}::staking_pool::StakedSui`;
592
592
  }
593
593
  class StakedSui {
594
594
  constructor(typeArgs, fields) {
@@ -725,13 +725,13 @@ class StakedSui {
725
725
  }
726
726
  }
727
727
  exports.StakedSui = StakedSui;
728
- StakedSui.$typeName = `${index_1.PKG_V16}::staking_pool::StakedSui`;
728
+ StakedSui.$typeName = `${index_1.PKG_V17}::staking_pool::StakedSui`;
729
729
  StakedSui.$numTypeParams = 0;
730
730
  StakedSui.$isPhantom = [];
731
731
  /* ============================== StakingPool =============================== */
732
732
  function isStakingPool(type) {
733
733
  type = (0, util_1.compressSuiType)(type);
734
- return type === `${index_1.PKG_V16}::staking_pool::StakingPool`;
734
+ return type === `${index_1.PKG_V17}::staking_pool::StakingPool`;
735
735
  }
736
736
  class StakingPool {
737
737
  constructor(typeArgs, fields) {
@@ -910,6 +910,6 @@ class StakingPool {
910
910
  }
911
911
  }
912
912
  exports.StakingPool = StakingPool;
913
- StakingPool.$typeName = `${index_1.PKG_V16}::staking_pool::StakingPool`;
913
+ StakingPool.$typeName = `${index_1.PKG_V17}::staking_pool::StakingPool`;
914
914
  StakingPool.$numTypeParams = 0;
915
915
  StakingPool.$isPhantom = [];
@@ -11,10 +11,10 @@ export interface CellFields<Element extends TypeArgument> {
11
11
  export type CellReified<Element extends TypeArgument> = Reified<Cell<Element>, CellFields<Element>>;
12
12
  export declare class Cell<Element extends TypeArgument> implements StructClass {
13
13
  __StructClass: true;
14
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::cell::Cell";
14
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::cell::Cell";
15
15
  static readonly $numTypeParams = 1;
16
16
  static readonly $isPhantom: readonly [false];
17
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::cell::Cell";
17
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::cell::Cell";
18
18
  readonly $fullTypeName: `${typeof PKG_V1}::cell::Cell<${ToTypeStr<Element>}>`;
19
19
  readonly $typeArgs: [ToTypeStr<Element>];
20
20
  readonly $isPhantom: readonly [false];
@@ -16,10 +16,10 @@ export interface FeeConfigFields {
16
16
  export type FeeConfigReified = Reified<FeeConfig, FeeConfigFields>;
17
17
  export declare class FeeConfig implements StructClass {
18
18
  __StructClass: true;
19
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::fees::FeeConfig";
19
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfig";
20
20
  static readonly $numTypeParams = 0;
21
21
  static readonly $isPhantom: readonly [];
22
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::fees::FeeConfig";
22
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfig";
23
23
  readonly $fullTypeName: `${typeof PKG_V1}::fees::FeeConfig`;
24
24
  readonly $typeArgs: [];
25
25
  readonly $isPhantom: readonly [];
@@ -34,7 +34,7 @@ export declare class FeeConfig implements StructClass {
34
34
  static reified(): FeeConfigReified;
35
35
  static get r(): import("../../_framework/reified").StructClassReified<FeeConfig, FeeConfigFields>;
36
36
  static phantom(): PhantomReified<ToTypeStr<FeeConfig>>;
37
- static get p(): PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::fees::FeeConfig">;
37
+ static get p(): PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfig">;
38
38
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
39
39
  sui_mint_fee_bps: string;
40
40
  staked_sui_mint_fee_bps: string;
@@ -108,10 +108,10 @@ export interface FeeConfigBuilderFields {
108
108
  export type FeeConfigBuilderReified = Reified<FeeConfigBuilder, FeeConfigBuilderFields>;
109
109
  export declare class FeeConfigBuilder implements StructClass {
110
110
  __StructClass: true;
111
- static readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::fees::FeeConfigBuilder";
111
+ static readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfigBuilder";
112
112
  static readonly $numTypeParams = 0;
113
113
  static readonly $isPhantom: readonly [];
114
- readonly $typeName = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::fees::FeeConfigBuilder";
114
+ readonly $typeName = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfigBuilder";
115
115
  readonly $fullTypeName: `${typeof PKG_V1}::fees::FeeConfigBuilder`;
116
116
  readonly $typeArgs: [];
117
117
  readonly $isPhantom: readonly [];
@@ -120,7 +120,7 @@ export declare class FeeConfigBuilder implements StructClass {
120
120
  static reified(): FeeConfigBuilderReified;
121
121
  static get r(): import("../../_framework/reified").StructClassReified<FeeConfigBuilder, FeeConfigBuilderFields>;
122
122
  static phantom(): PhantomReified<ToTypeStr<FeeConfigBuilder>>;
123
- static get p(): PhantomReified<"0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e::fees::FeeConfigBuilder">;
123
+ static get p(): PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfigBuilder">;
124
124
  static get bcs(): import("@mysten/sui/bcs").BcsType<{
125
125
  fields: {
126
126
  id: {
@@ -1,4 +1,4 @@
1
- export declare const PACKAGE_ID = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e";
1
+ export declare const PACKAGE_ID = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7";
2
2
  export declare var PUBLISHED_AT: string;
3
3
  export declare function setPublishedAt(publishedAt: string): void;
4
- export declare const PKG_V1 = "0xcfbcad8e0444ca85ad7ee28054585d12a7487bdbd83569ded988ca13441bf16e";
4
+ export declare const PKG_V1 = "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7";
@@ -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
  }