@suilend/springsui-cli 1.0.14 → 2.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.
- package/cli/src/bytecode.js +23 -25
- package/cli/src/index.js +80 -134
- package/package.json +1 -1
- package/sdk/src/_generated/_dependencies/source/0x1/ascii/structs.d.ts +7 -7
- package/sdk/src/_generated/_dependencies/source/0x1/ascii/structs.js +4 -4
- package/sdk/src/_generated/_dependencies/source/0x1/option/structs.d.ts +8 -3
- package/sdk/src/_generated/_dependencies/source/0x1/option/structs.js +3 -3
- package/sdk/src/_generated/_dependencies/source/0x1/string/structs.d.ts +4 -4
- package/sdk/src/_generated/_dependencies/source/0x1/string/structs.js +3 -3
- package/sdk/src/_generated/_dependencies/source/0x1/type-name/structs.d.ts +5 -5
- package/sdk/src/_generated/_dependencies/source/0x1/type-name/structs.js +3 -3
- package/sdk/src/_generated/_dependencies/source/0x2/bag/structs.d.ts +7 -7
- package/sdk/src/_generated/_dependencies/source/0x2/bag/structs.js +3 -3
- package/sdk/src/_generated/_dependencies/source/0x2/balance/structs.d.ts +7 -7
- package/sdk/src/_generated/_dependencies/source/0x2/balance/structs.js +4 -4
- package/sdk/src/_generated/_dependencies/source/0x2/coin/structs.d.ts +65 -51
- package/sdk/src/_generated/_dependencies/source/0x2/coin/structs.js +9 -9
- package/sdk/src/_generated/_dependencies/source/0x2/object/structs.d.ts +8 -8
- package/sdk/src/_generated/_dependencies/source/0x2/object/structs.js +6 -6
- package/sdk/src/_generated/_dependencies/source/0x2/sui/structs.d.ts +4 -4
- package/sdk/src/_generated/_dependencies/source/0x2/sui/structs.js +3 -3
- package/sdk/src/_generated/_dependencies/source/0x2/table/structs.d.ts +7 -7
- package/sdk/src/_generated/_dependencies/source/0x2/table/structs.js +3 -3
- package/sdk/src/_generated/_dependencies/source/0x2/url/structs.d.ts +5 -5
- package/sdk/src/_generated/_dependencies/source/0x2/url/structs.js +3 -3
- package/sdk/src/_generated/_dependencies/source/0x2/vec-map/structs.d.ts +6 -6
- package/sdk/src/_generated/_dependencies/source/0x2/vec-map/structs.js +4 -4
- package/sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.d.ts +66 -58
- package/sdk/src/_generated/_dependencies/source/0x3/staking-pool/structs.js +8 -8
- package/sdk/src/_generated/_framework/reified.d.ts +3 -3
- package/sdk/src/_generated/_framework/reified.js +4 -4
- package/sdk/src/_generated/_framework/util.d.ts +4 -4
- package/sdk/src/_generated/_framework/util.js +1 -1
- package/sdk/src/_generated/_framework/vector.d.ts +12 -1
- package/sdk/src/_generated/_framework/vector.js +1 -1
- package/sdk/src/_generated/liquid_staking/cell/structs.d.ts +10 -3
- package/sdk/src/_generated/liquid_staking/cell/structs.js +3 -3
- package/sdk/src/_generated/liquid_staking/fees/functions.d.ts +19 -19
- package/sdk/src/_generated/liquid_staking/fees/structs.d.ts +21 -21
- package/sdk/src/_generated/liquid_staking/fees/structs.js +4 -4
- package/sdk/src/_generated/liquid_staking/liquid-staking/functions.d.ts +20 -20
- package/sdk/src/_generated/liquid_staking/liquid-staking/structs.d.ts +194 -100
- package/sdk/src/_generated/liquid_staking/liquid-staking/structs.js +12 -12
- package/sdk/src/_generated/liquid_staking/storage/structs.d.ts +145 -33
- package/sdk/src/_generated/liquid_staking/storage/structs.js +6 -6
- package/sdk/src/_generated/liquid_staking/version/structs.d.ts +4 -4
- package/sdk/src/_generated/liquid_staking/version/structs.js +3 -3
- package/sdk/src/_generated/liquid_staking/weight/functions.d.ts +11 -11
- package/sdk/src/_generated/liquid_staking/weight/structs.d.ts +41 -41
- package/sdk/src/_generated/liquid_staking/weight/structs.js +9 -9
- package/sdk/src/client.d.ts +35 -25
- package/sdk/src/client.js +52 -59
- package/sdk/src/index.d.ts +0 -1
- package/sdk/src/index.js +0 -1
- package/sdk/src/lib/transactions.d.ts +4 -1
- package/sdk/src/grpcAdapter.d.ts +0 -50
- package/sdk/src/grpcAdapter.js +0 -75
|
@@ -15,7 +15,18 @@ export declare class Vector<T extends TypeArgument> implements VectorClass {
|
|
|
15
15
|
constructor(typeArgs: [ToTypeStr<T>], elements: VectorElements<T>);
|
|
16
16
|
static reified<T extends Reified<TypeArgument, any>>(T: T): VectorReified<ToTypeArgument<T>>;
|
|
17
17
|
static get r(): typeof Vector.reified;
|
|
18
|
-
static get bcs():
|
|
18
|
+
static get bcs(): {
|
|
19
|
+
<T extends import("@mysten/bcs").BcsType<any>, Name extends string = `vector<${T["name"]}>`>(type: T, options?: import("@mysten/bcs").BcsTypeOptions<import("@mysten/bcs").InferBcsType<T>[], Iterable<import("@mysten/bcs").InferBcsInput<T>> & {
|
|
20
|
+
length: number;
|
|
21
|
+
}, Name>): import("@mysten/bcs").BcsType<import("@mysten/bcs").InferBcsType<T>[], Iterable<import("@mysten/bcs").InferBcsInput<T>> & {
|
|
22
|
+
length: number;
|
|
23
|
+
}, Name>;
|
|
24
|
+
<T, Input, Name extends string = string>(type: import("@mysten/bcs").BcsType<T, Input, Name>, options?: import("@mysten/bcs").BcsTypeOptions<T[], Iterable<Input> & {
|
|
25
|
+
length: number;
|
|
26
|
+
}, `vector<${Name}>`>): import("@mysten/bcs").BcsType<T[], Iterable<Input> & {
|
|
27
|
+
length: number;
|
|
28
|
+
}, `vector<${Name}>`>;
|
|
29
|
+
};
|
|
19
30
|
static fromFields<T extends Reified<TypeArgument, any>>(typeArg: T, elements: any[]): Vector<ToTypeArgument<T>>;
|
|
20
31
|
static fromFieldsWithTypes<T extends Reified<TypeArgument, any>>(typeArg: T, item: FieldsWithTypes): Vector<ToTypeArgument<T>>;
|
|
21
32
|
static fromBcs<T extends Reified<TypeArgument, any>>(typeArg: T, data: Uint8Array): Vector<ToTypeArgument<T>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bcs } from "@mysten/sui
|
|
1
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
2
2
|
import { decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, extractType, toBcs, fieldToJSON, } from "./reified";
|
|
3
3
|
import { composeSuiType } from "./util";
|
|
4
4
|
export class Vector {
|
|
@@ -2,7 +2,8 @@ import { Option } from "../../_dependencies/source/0x1/option/structs";
|
|
|
2
2
|
import { PhantomReified, Reified, StructClass, ToField, ToTypeArgument, ToTypeStr, TypeArgument } from "../../_framework/reified";
|
|
3
3
|
import { FieldsWithTypes } from "../../_framework/util";
|
|
4
4
|
import { PKG_V1 } from "../index";
|
|
5
|
-
import {
|
|
5
|
+
import { BcsType } from "@mysten/sui/bcs";
|
|
6
|
+
import { SuiJsonRpcClient, SuiObjectData, SuiParsedData } from "@mysten/sui/jsonRpc";
|
|
6
7
|
export declare function isCell(type: string): boolean;
|
|
7
8
|
export interface CellFields<Element extends TypeArgument> {
|
|
8
9
|
element: ToField<Option<Element>>;
|
|
@@ -23,7 +24,13 @@ export declare class Cell<Element extends TypeArgument> implements StructClass {
|
|
|
23
24
|
static get r(): typeof Cell.reified;
|
|
24
25
|
static phantom<Element extends Reified<TypeArgument, any>>(Element: Element): PhantomReified<ToTypeStr<Cell<ToTypeArgument<Element>>>>;
|
|
25
26
|
static get p(): typeof Cell.phantom;
|
|
26
|
-
static get bcs(): any
|
|
27
|
+
static get bcs(): <Element extends BcsType<any>>(Element: Element) => import("@mysten/bcs").BcsStruct<{
|
|
28
|
+
element: import("@mysten/bcs").BcsStruct<{
|
|
29
|
+
vec: BcsType<import("@mysten/bcs").InferBcsType<Element>[], Iterable<import("@mysten/bcs").InferBcsInput<Element>> & {
|
|
30
|
+
length: number;
|
|
31
|
+
}, string>;
|
|
32
|
+
}, string>;
|
|
33
|
+
}, string>;
|
|
27
34
|
static fromFields<Element extends Reified<TypeArgument, any>>(typeArg: Element, fields: Record<string, any>): Cell<ToTypeArgument<Element>>;
|
|
28
35
|
static fromFieldsWithTypes<Element extends Reified<TypeArgument, any>>(typeArg: Element, item: FieldsWithTypes): Cell<ToTypeArgument<Element>>;
|
|
29
36
|
static fromBcs<Element extends Reified<TypeArgument, any>>(typeArg: Element, data: Uint8Array): Cell<ToTypeArgument<Element>>;
|
|
@@ -39,5 +46,5 @@ export declare class Cell<Element extends TypeArgument> implements StructClass {
|
|
|
39
46
|
static fromJSON<Element extends Reified<TypeArgument, any>>(typeArg: Element, json: Record<string, any>): Cell<ToTypeArgument<Element>>;
|
|
40
47
|
static fromSuiParsedData<Element extends Reified<TypeArgument, any>>(typeArg: Element, content: SuiParsedData): Cell<ToTypeArgument<Element>>;
|
|
41
48
|
static fromSuiObjectData<Element extends Reified<TypeArgument, any>>(typeArg: Element, data: SuiObjectData): Cell<ToTypeArgument<Element>>;
|
|
42
|
-
static fetch<Element extends Reified<TypeArgument, any>>(client:
|
|
49
|
+
static fetch<Element extends Reified<TypeArgument, any>>(client: SuiJsonRpcClient, typeArg: Element, id: string): Promise<Cell<ToTypeArgument<Element>>>;
|
|
43
50
|
}
|
|
@@ -11,8 +11,8 @@ import { Option } from "../../_dependencies/source/0x1/option/structs";
|
|
|
11
11
|
import { assertFieldsWithTypesArgsMatch, assertReifiedTypeArgsMatch, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, extractType, fieldToJSON, phantom, toBcs, } from "../../_framework/reified";
|
|
12
12
|
import { composeSuiType, compressSuiType, parseTypeName, } from "../../_framework/util";
|
|
13
13
|
import { PKG_V1 } from "../index";
|
|
14
|
-
import { bcs } from "@mysten/sui
|
|
15
|
-
import {
|
|
14
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
15
|
+
import { fromBase64 } from "@mysten/sui/utils";
|
|
16
16
|
/* ============================== Cell =============================== */
|
|
17
17
|
export function isCell(type) {
|
|
18
18
|
type = compressSuiType(type);
|
|
@@ -124,7 +124,7 @@ export class Cell {
|
|
|
124
124
|
if (gotTypeArg !== compressSuiType(extractType(typeArg))) {
|
|
125
125
|
throw new Error(`type argument mismatch: expected '${expectedTypeArg}' but got '${gotTypeArg}'`);
|
|
126
126
|
}
|
|
127
|
-
return Cell.fromBcs(typeArg,
|
|
127
|
+
return Cell.fromBcs(typeArg, fromBase64(data.bcs.bcsBytes));
|
|
128
128
|
}
|
|
129
129
|
if (data.content) {
|
|
130
130
|
return Cell.fromSuiParsedData(typeArg, data.content);
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui
|
|
2
|
-
export declare function destroy(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
1
|
+
import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions";
|
|
2
|
+
export declare function destroy(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
3
3
|
export interface CalculateMintFeeArgs {
|
|
4
4
|
self: TransactionObjectInput;
|
|
5
5
|
suiAmount: bigint | TransactionArgument;
|
|
6
6
|
}
|
|
7
|
-
export declare function calculateMintFee(tx: Transaction, args: CalculateMintFeeArgs): import("@mysten/sui
|
|
7
|
+
export declare function calculateMintFee(tx: Transaction, args: CalculateMintFeeArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
8
8
|
export interface CalculateRedeemFeeArgs {
|
|
9
9
|
self: TransactionObjectInput;
|
|
10
10
|
suiAmount: bigint | TransactionArgument;
|
|
11
11
|
}
|
|
12
|
-
export declare function calculateRedeemFee(tx: Transaction, args: CalculateRedeemFeeArgs): import("@mysten/sui
|
|
13
|
-
export declare function customRedeemFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
14
|
-
export declare function newBuilder(tx: Transaction): import("@mysten/sui
|
|
15
|
-
export declare function redeemFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
12
|
+
export declare function calculateRedeemFee(tx: Transaction, args: CalculateRedeemFeeArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
13
|
+
export declare function customRedeemFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
14
|
+
export declare function newBuilder(tx: Transaction): import("@mysten/sui/transactions").TransactionResult;
|
|
15
|
+
export declare function redeemFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
16
16
|
export interface SetCustomRedeemFeeBpsArgs {
|
|
17
17
|
self: TransactionObjectInput;
|
|
18
18
|
fee: bigint | TransactionArgument;
|
|
19
19
|
}
|
|
20
|
-
export declare function setCustomRedeemFeeBps(tx: Transaction, args: SetCustomRedeemFeeBpsArgs): import("@mysten/sui
|
|
20
|
+
export declare function setCustomRedeemFeeBps(tx: Transaction, args: SetCustomRedeemFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
21
21
|
export interface SetRedeemFeeBpsArgs {
|
|
22
22
|
self: TransactionObjectInput;
|
|
23
23
|
fee: bigint | TransactionArgument;
|
|
24
24
|
}
|
|
25
|
-
export declare function setRedeemFeeBps(tx: Transaction, args: SetRedeemFeeBpsArgs): import("@mysten/sui
|
|
25
|
+
export declare function setRedeemFeeBps(tx: Transaction, args: SetRedeemFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
26
26
|
export interface SetSpreadFeeBpsArgs {
|
|
27
27
|
self: TransactionObjectInput;
|
|
28
28
|
fee: bigint | TransactionArgument;
|
|
29
29
|
}
|
|
30
|
-
export declare function setSpreadFeeBps(tx: Transaction, args: SetSpreadFeeBpsArgs): import("@mysten/sui
|
|
30
|
+
export declare function setSpreadFeeBps(tx: Transaction, args: SetSpreadFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
31
31
|
export interface SetStakedSuiMintFeeBpsArgs {
|
|
32
32
|
self: TransactionObjectInput;
|
|
33
33
|
fee: bigint | TransactionArgument;
|
|
34
34
|
}
|
|
35
|
-
export declare function setStakedSuiMintFeeBps(tx: Transaction, args: SetStakedSuiMintFeeBpsArgs): import("@mysten/sui
|
|
35
|
+
export declare function setStakedSuiMintFeeBps(tx: Transaction, args: SetStakedSuiMintFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
36
36
|
export interface SetStakedSuiRedeemFeeBpsArgs {
|
|
37
37
|
self: TransactionObjectInput;
|
|
38
38
|
fee: bigint | TransactionArgument;
|
|
39
39
|
}
|
|
40
|
-
export declare function setStakedSuiRedeemFeeBps(tx: Transaction, args: SetStakedSuiRedeemFeeBpsArgs): import("@mysten/sui
|
|
40
|
+
export declare function setStakedSuiRedeemFeeBps(tx: Transaction, args: SetStakedSuiRedeemFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
41
41
|
export interface SetSuiMintFeeBpsArgs {
|
|
42
42
|
self: TransactionObjectInput;
|
|
43
43
|
fee: bigint | TransactionArgument;
|
|
44
44
|
}
|
|
45
|
-
export declare function setSuiMintFeeBps(tx: Transaction, args: SetSuiMintFeeBpsArgs): import("@mysten/sui
|
|
46
|
-
export declare function spreadFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
47
|
-
export declare function stakedSuiMintFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
48
|
-
export declare function stakedSuiRedeemFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
49
|
-
export declare function suiMintFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
50
|
-
export declare function toFeeConfig(tx: Transaction, builder: TransactionObjectInput): import("@mysten/sui
|
|
51
|
-
export declare function validateFees(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui
|
|
45
|
+
export declare function setSuiMintFeeBps(tx: Transaction, args: SetSuiMintFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
46
|
+
export declare function spreadFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
47
|
+
export declare function stakedSuiMintFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
48
|
+
export declare function stakedSuiRedeemFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
49
|
+
export declare function suiMintFeeBps(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
50
|
+
export declare function toFeeConfig(tx: Transaction, builder: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
51
|
+
export declare function validateFees(tx: Transaction, fees: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -2,7 +2,7 @@ import { Bag } from "../../_dependencies/source/0x2/bag/structs";
|
|
|
2
2
|
import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../_framework/reified";
|
|
3
3
|
import { FieldsWithTypes } from "../../_framework/util";
|
|
4
4
|
import { PKG_V1 } from "../index";
|
|
5
|
-
import {
|
|
5
|
+
import { SuiJsonRpcClient, SuiObjectData, SuiParsedData } from "@mysten/sui/jsonRpc";
|
|
6
6
|
export declare function isFeeConfig(type: string): boolean;
|
|
7
7
|
export interface FeeConfigFields {
|
|
8
8
|
suiMintFeeBps: ToField<"u64">;
|
|
@@ -35,20 +35,20 @@ export declare class FeeConfig implements StructClass {
|
|
|
35
35
|
static get r(): import("../../_framework/reified").StructClassReified<FeeConfig, FeeConfigFields>;
|
|
36
36
|
static phantom(): PhantomReified<ToTypeStr<FeeConfig>>;
|
|
37
37
|
static get p(): PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfig">;
|
|
38
|
-
static get bcs(): import("@mysten/
|
|
39
|
-
sui_mint_fee_bps: import("@mysten/
|
|
40
|
-
staked_sui_mint_fee_bps: import("@mysten/
|
|
41
|
-
redeem_fee_bps: import("@mysten/
|
|
42
|
-
staked_sui_redeem_fee_bps: import("@mysten/
|
|
43
|
-
spread_fee_bps: import("@mysten/
|
|
44
|
-
custom_redeem_fee_bps: import("@mysten/
|
|
45
|
-
extra_fields: import("@mysten/
|
|
46
|
-
id: import("@mysten/
|
|
47
|
-
id: import("@mysten/
|
|
48
|
-
bytes: import("@mysten/
|
|
38
|
+
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
39
|
+
sui_mint_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
40
|
+
staked_sui_mint_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
41
|
+
redeem_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
42
|
+
staked_sui_redeem_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
43
|
+
spread_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
44
|
+
custom_redeem_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
45
|
+
extra_fields: import("@mysten/bcs").BcsStruct<{
|
|
46
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
47
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
48
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
49
49
|
}, string>;
|
|
50
50
|
}, string>;
|
|
51
|
-
size: import("@mysten/
|
|
51
|
+
size: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
52
52
|
}, string>;
|
|
53
53
|
}, string>;
|
|
54
54
|
static fromFields(fields: Record<string, any>): FeeConfig;
|
|
@@ -84,7 +84,7 @@ export declare class FeeConfig implements StructClass {
|
|
|
84
84
|
static fromJSON(json: Record<string, any>): FeeConfig;
|
|
85
85
|
static fromSuiParsedData(content: SuiParsedData): FeeConfig;
|
|
86
86
|
static fromSuiObjectData(data: SuiObjectData): FeeConfig;
|
|
87
|
-
static fetch(client:
|
|
87
|
+
static fetch(client: SuiJsonRpcClient, id: string): Promise<FeeConfig>;
|
|
88
88
|
}
|
|
89
89
|
export declare function isFeeConfigBuilder(type: string): boolean;
|
|
90
90
|
export interface FeeConfigBuilderFields {
|
|
@@ -106,14 +106,14 @@ export declare class FeeConfigBuilder implements StructClass {
|
|
|
106
106
|
static get r(): import("../../_framework/reified").StructClassReified<FeeConfigBuilder, FeeConfigBuilderFields>;
|
|
107
107
|
static phantom(): PhantomReified<ToTypeStr<FeeConfigBuilder>>;
|
|
108
108
|
static get p(): PhantomReified<"0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::fees::FeeConfigBuilder">;
|
|
109
|
-
static get bcs(): import("@mysten/
|
|
110
|
-
fields: import("@mysten/
|
|
111
|
-
id: import("@mysten/
|
|
112
|
-
id: import("@mysten/
|
|
113
|
-
bytes: import("@mysten/
|
|
109
|
+
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
110
|
+
fields: import("@mysten/bcs").BcsStruct<{
|
|
111
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
112
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
113
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
114
114
|
}, string>;
|
|
115
115
|
}, string>;
|
|
116
|
-
size: import("@mysten/
|
|
116
|
+
size: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
117
117
|
}, string>;
|
|
118
118
|
}, string>;
|
|
119
119
|
static fromFields(fields: Record<string, any>): FeeConfigBuilder;
|
|
@@ -137,5 +137,5 @@ export declare class FeeConfigBuilder implements StructClass {
|
|
|
137
137
|
static fromJSON(json: Record<string, any>): FeeConfigBuilder;
|
|
138
138
|
static fromSuiParsedData(content: SuiParsedData): FeeConfigBuilder;
|
|
139
139
|
static fromSuiObjectData(data: SuiObjectData): FeeConfigBuilder;
|
|
140
|
-
static fetch(client:
|
|
140
|
+
static fetch(client: SuiJsonRpcClient, id: string): Promise<FeeConfigBuilder>;
|
|
141
141
|
}
|
|
@@ -11,8 +11,8 @@ import { Bag } from "../../_dependencies/source/0x2/bag/structs";
|
|
|
11
11
|
import { decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, phantom, } from "../../_framework/reified";
|
|
12
12
|
import { composeSuiType, compressSuiType, } from "../../_framework/util";
|
|
13
13
|
import { PKG_V1 } from "../index";
|
|
14
|
-
import { bcs } from "@mysten/sui
|
|
15
|
-
import {
|
|
14
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
15
|
+
import { fromBase64 } from "@mysten/sui/utils";
|
|
16
16
|
/* ============================== FeeConfig =============================== */
|
|
17
17
|
export function isFeeConfig(type) {
|
|
18
18
|
type = compressSuiType(type);
|
|
@@ -148,7 +148,7 @@ export class FeeConfig {
|
|
|
148
148
|
if (data.bcs.dataType !== "moveObject" || !isFeeConfig(data.bcs.type)) {
|
|
149
149
|
throw new Error(`object at is not a FeeConfig object`);
|
|
150
150
|
}
|
|
151
|
-
return FeeConfig.fromBcs(
|
|
151
|
+
return FeeConfig.fromBcs(fromBase64(data.bcs.bcsBytes));
|
|
152
152
|
}
|
|
153
153
|
if (data.content) {
|
|
154
154
|
return FeeConfig.fromSuiParsedData(data.content);
|
|
@@ -273,7 +273,7 @@ export class FeeConfigBuilder {
|
|
|
273
273
|
!isFeeConfigBuilder(data.bcs.type)) {
|
|
274
274
|
throw new Error(`object at is not a FeeConfigBuilder object`);
|
|
275
275
|
}
|
|
276
|
-
return FeeConfigBuilder.fromBcs(
|
|
276
|
+
return FeeConfigBuilder.fromBcs(fromBase64(data.bcs.bcsBytes));
|
|
277
277
|
}
|
|
278
278
|
if (data.content) {
|
|
279
279
|
return FeeConfigBuilder.fromSuiParsedData(data.content);
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui
|
|
1
|
+
import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions";
|
|
2
2
|
export interface MintArgs {
|
|
3
3
|
self: TransactionObjectInput;
|
|
4
4
|
systemState: TransactionObjectInput;
|
|
5
5
|
sui: TransactionObjectInput;
|
|
6
6
|
}
|
|
7
|
-
export declare function mint(tx: Transaction, typeArg: string, args: MintArgs): import("@mysten/sui
|
|
8
|
-
export declare function storage(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui
|
|
9
|
-
export declare function fees(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui
|
|
7
|
+
export declare function mint(tx: Transaction, typeArg: string, args: MintArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
8
|
+
export declare function storage(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
9
|
+
export declare function fees(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
10
10
|
export interface ChangeValidatorPriorityArgs {
|
|
11
11
|
self: TransactionObjectInput;
|
|
12
12
|
adminCap: TransactionObjectInput;
|
|
13
13
|
validatorIndex: bigint | TransactionArgument;
|
|
14
14
|
newValidatorIndex: bigint | TransactionArgument;
|
|
15
15
|
}
|
|
16
|
-
export declare function changeValidatorPriority(tx: Transaction, typeArg: string, args: ChangeValidatorPriorityArgs): import("@mysten/sui
|
|
16
|
+
export declare function changeValidatorPriority(tx: Transaction, typeArg: string, args: ChangeValidatorPriorityArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
17
17
|
export interface RefreshArgs {
|
|
18
18
|
self: TransactionObjectInput;
|
|
19
19
|
systemState: TransactionObjectInput;
|
|
20
20
|
}
|
|
21
|
-
export declare function refresh(tx: Transaction, typeArg: string, args: RefreshArgs): import("@mysten/sui
|
|
22
|
-
export declare function totalSuiSupply(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui
|
|
21
|
+
export declare function refresh(tx: Transaction, typeArg: string, args: RefreshArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
22
|
+
export declare function totalSuiSupply(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
23
23
|
export interface CollectFeesArgs {
|
|
24
24
|
self: TransactionObjectInput;
|
|
25
25
|
systemState: TransactionObjectInput;
|
|
26
26
|
adminCap: TransactionObjectInput;
|
|
27
27
|
}
|
|
28
|
-
export declare function collectFees(tx: Transaction, typeArg: string, args: CollectFeesArgs): import("@mysten/sui
|
|
28
|
+
export declare function collectFees(tx: Transaction, typeArg: string, args: CollectFeesArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
29
29
|
export interface CreateLstArgs {
|
|
30
30
|
feeConfig: TransactionObjectInput;
|
|
31
31
|
lstTreasuryCap: TransactionObjectInput;
|
|
32
32
|
}
|
|
33
|
-
export declare function createLst(tx: Transaction, typeArg: string, args: CreateLstArgs): import("@mysten/sui
|
|
34
|
-
export declare function feeConfig(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui
|
|
33
|
+
export declare function createLst(tx: Transaction, typeArg: string, args: CreateLstArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
34
|
+
export declare function feeConfig(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
35
35
|
export interface CreateLstWithStakeArgs {
|
|
36
36
|
systemState: TransactionObjectInput;
|
|
37
37
|
feeConfig: TransactionObjectInput;
|
|
@@ -39,13 +39,13 @@ export interface CreateLstWithStakeArgs {
|
|
|
39
39
|
fungibleStakedSuis: Array<TransactionObjectInput> | TransactionArgument;
|
|
40
40
|
sui: TransactionObjectInput;
|
|
41
41
|
}
|
|
42
|
-
export declare function createLstWithStake(tx: Transaction, typeArg: string, args: CreateLstWithStakeArgs): import("@mysten/sui
|
|
42
|
+
export declare function createLstWithStake(tx: Transaction, typeArg: string, args: CreateLstWithStakeArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
43
43
|
export interface CreateLstWithStorageArgs {
|
|
44
44
|
feeConfig: TransactionObjectInput;
|
|
45
45
|
lstTreasuryCap: TransactionObjectInput;
|
|
46
46
|
storage: TransactionObjectInput;
|
|
47
47
|
}
|
|
48
|
-
export declare function createLstWithStorage(tx: Transaction, typeArg: string, args: CreateLstWithStorageArgs): import("@mysten/sui
|
|
48
|
+
export declare function createLstWithStorage(tx: Transaction, typeArg: string, args: CreateLstWithStorageArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
49
49
|
export interface DecreaseValidatorStakeArgs {
|
|
50
50
|
self: TransactionObjectInput;
|
|
51
51
|
adminCap: TransactionObjectInput;
|
|
@@ -53,7 +53,7 @@ export interface DecreaseValidatorStakeArgs {
|
|
|
53
53
|
validatorAddress: string | TransactionArgument;
|
|
54
54
|
targetUnstakeSuiAmount: bigint | TransactionArgument;
|
|
55
55
|
}
|
|
56
|
-
export declare function decreaseValidatorStake(tx: Transaction, typeArg: string, args: DecreaseValidatorStakeArgs): import("@mysten/sui
|
|
56
|
+
export declare function decreaseValidatorStake(tx: Transaction, typeArg: string, args: DecreaseValidatorStakeArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
57
57
|
export interface IncreaseValidatorStakeArgs {
|
|
58
58
|
self: TransactionObjectInput;
|
|
59
59
|
adminCap: TransactionObjectInput;
|
|
@@ -61,28 +61,28 @@ export interface IncreaseValidatorStakeArgs {
|
|
|
61
61
|
validatorAddress: string | TransactionArgument;
|
|
62
62
|
suiAmount: bigint | TransactionArgument;
|
|
63
63
|
}
|
|
64
|
-
export declare function increaseValidatorStake(tx: Transaction, typeArg: string, args: IncreaseValidatorStakeArgs): import("@mysten/sui
|
|
65
|
-
export declare function init(tx: Transaction, otw: TransactionObjectInput): import("@mysten/sui
|
|
64
|
+
export declare function increaseValidatorStake(tx: Transaction, typeArg: string, args: IncreaseValidatorStakeArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
65
|
+
export declare function init(tx: Transaction, otw: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
66
66
|
export interface LstAmountToSuiAmountArgs {
|
|
67
67
|
self: TransactionObjectInput;
|
|
68
68
|
lstAmount: bigint | TransactionArgument;
|
|
69
69
|
}
|
|
70
|
-
export declare function lstAmountToSuiAmount(tx: Transaction, typeArg: string, args: LstAmountToSuiAmountArgs): import("@mysten/sui
|
|
70
|
+
export declare function lstAmountToSuiAmount(tx: Transaction, typeArg: string, args: LstAmountToSuiAmountArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
71
71
|
export interface RedeemArgs {
|
|
72
72
|
self: TransactionObjectInput;
|
|
73
73
|
lst: TransactionObjectInput;
|
|
74
74
|
systemState: TransactionObjectInput;
|
|
75
75
|
}
|
|
76
|
-
export declare function redeem(tx: Transaction, typeArg: string, args: RedeemArgs): import("@mysten/sui
|
|
76
|
+
export declare function redeem(tx: Transaction, typeArg: string, args: RedeemArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
77
77
|
export interface SuiAmountToLstAmountArgs {
|
|
78
78
|
self: TransactionObjectInput;
|
|
79
79
|
suiAmount: bigint | TransactionArgument;
|
|
80
80
|
}
|
|
81
|
-
export declare function suiAmountToLstAmount(tx: Transaction, typeArg: string, args: SuiAmountToLstAmountArgs): import("@mysten/sui
|
|
82
|
-
export declare function totalLstSupply(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui
|
|
81
|
+
export declare function suiAmountToLstAmount(tx: Transaction, typeArg: string, args: SuiAmountToLstAmountArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
82
|
+
export declare function totalLstSupply(tx: Transaction, typeArg: string, self: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
83
83
|
export interface UpdateFeesArgs {
|
|
84
84
|
self: TransactionObjectInput;
|
|
85
85
|
adminCap: TransactionObjectInput;
|
|
86
86
|
feeConfig: TransactionObjectInput;
|
|
87
87
|
}
|
|
88
|
-
export declare function updateFees(tx: Transaction, typeArg: string, args: UpdateFeesArgs): import("@mysten/sui
|
|
88
|
+
export declare function updateFees(tx: Transaction, typeArg: string, args: UpdateFeesArgs): import("@mysten/sui/transactions").TransactionResult;
|