@suilend/sdk 3.0.3 → 3.0.4

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.
@@ -1,25 +1,33 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
- import { MoveStruct, normalizeMoveArguments } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- import * as lending_market from './deps/suilend/lending_market.js';
7
- import * as type_name from './deps/std/type_name.js';
8
- const $moduleName = '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position';
9
- export const Position = new MoveStruct({ name: `${$moduleName}::Position<phantom P>`, fields: {
4
+ import { bcs } from "@mysten/sui/bcs";
5
+ import { MoveStruct, normalizeMoveArguments, } from "../utils/index.js";
6
+ import * as type_name from "./deps/std/type_name.js";
7
+ import * as lending_market from "./deps/suilend/lending_market.js";
8
+ const $moduleName = "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position";
9
+ export const Position = new MoveStruct({
10
+ name: `${$moduleName}::Position<phantom P>`,
11
+ fields: {
10
12
  id: bcs.Address,
11
13
  is_long: bcs.bool(),
12
14
  obligation_owner_cap: lending_market.ObligationOwnerCap,
13
15
  created_ts: bcs.u64(),
14
16
  owner: bcs.Address,
15
17
  market_id: bcs.Address,
16
- lending_market_id: bcs.Address
17
- } });
18
- export const PositionCap = new MoveStruct({ name: `${$moduleName}::PositionCap`, fields: {
18
+ lending_market_id: bcs.Address,
19
+ },
20
+ });
21
+ export const PositionCap = new MoveStruct({
22
+ name: `${$moduleName}::PositionCap`,
23
+ fields: {
19
24
  id: bcs.Address,
20
- position_id: bcs.Address
21
- } });
22
- export const OpenPositionEvent = new MoveStruct({ name: `${$moduleName}::OpenPositionEvent`, fields: {
25
+ position_id: bcs.Address,
26
+ },
27
+ });
28
+ export const OpenPositionEvent = new MoveStruct({
29
+ name: `${$moduleName}::OpenPositionEvent`,
30
+ fields: {
23
31
  position_id: bcs.Address,
24
32
  market_id: bcs.Address,
25
33
  obligation_id: bcs.Address,
@@ -27,123 +35,132 @@ export const OpenPositionEvent = new MoveStruct({ name: `${$moduleName}::OpenPos
27
35
  collateral_coin_type: type_name.TypeName,
28
36
  loan_coin_type: type_name.TypeName,
29
37
  owner: bcs.Address,
30
- timestamp: bcs.u64()
31
- } });
32
- export const ClosePositionEvent = new MoveStruct({ name: `${$moduleName}::ClosePositionEvent`, fields: {
38
+ timestamp: bcs.u64(),
39
+ },
40
+ });
41
+ export const ClosePositionEvent = new MoveStruct({
42
+ name: `${$moduleName}::ClosePositionEvent`,
43
+ fields: {
33
44
  position_id: bcs.Address,
34
45
  market_id: bcs.Address,
35
46
  owner: bcs.Address,
36
- timestamp: bcs.u64()
37
- } });
38
- export const DepositEvent = new MoveStruct({ name: `${$moduleName}::DepositEvent`, fields: {
47
+ timestamp: bcs.u64(),
48
+ },
49
+ });
50
+ export const DepositEvent = new MoveStruct({
51
+ name: `${$moduleName}::DepositEvent`,
52
+ fields: {
39
53
  position_id: bcs.Address,
40
54
  owner: bcs.Address,
41
55
  coin_type: type_name.TypeName,
42
56
  deposit_amount: bcs.u64(),
43
- timestamp: bcs.u64()
44
- } });
45
- export const WithdrawEvent = new MoveStruct({ name: `${$moduleName}::WithdrawEvent`, fields: {
57
+ timestamp: bcs.u64(),
58
+ },
59
+ });
60
+ export const WithdrawEvent = new MoveStruct({
61
+ name: `${$moduleName}::WithdrawEvent`,
62
+ fields: {
46
63
  position_id: bcs.Address,
47
64
  owner: bcs.Address,
48
65
  coin_type: type_name.TypeName,
49
66
  withdraw_amount: bcs.u64(),
50
- timestamp: bcs.u64()
51
- } });
52
- export const BorrowEvent = new MoveStruct({ name: `${$moduleName}::BorrowEvent`, fields: {
67
+ timestamp: bcs.u64(),
68
+ },
69
+ });
70
+ export const BorrowEvent = new MoveStruct({
71
+ name: `${$moduleName}::BorrowEvent`,
72
+ fields: {
53
73
  position_id: bcs.Address,
54
74
  owner: bcs.Address,
55
75
  coin_type: type_name.TypeName,
56
76
  borrow_amount: bcs.u64(),
57
- timestamp: bcs.u64()
58
- } });
59
- export const RepayEvent = new MoveStruct({ name: `${$moduleName}::RepayEvent`, fields: {
77
+ timestamp: bcs.u64(),
78
+ },
79
+ });
80
+ export const RepayEvent = new MoveStruct({
81
+ name: `${$moduleName}::RepayEvent`,
82
+ fields: {
60
83
  position_id: bcs.Address,
61
84
  owner: bcs.Address,
62
85
  repay_coin_type: type_name.TypeName,
63
86
  repay_amount: bcs.u64(),
64
- timestamp: bcs.u64()
65
- } });
66
- export const ClaimRewardEvent = new MoveStruct({ name: `${$moduleName}::ClaimRewardEvent`, fields: {
87
+ timestamp: bcs.u64(),
88
+ },
89
+ });
90
+ export const ClaimRewardEvent = new MoveStruct({
91
+ name: `${$moduleName}::ClaimRewardEvent`,
92
+ fields: {
67
93
  position_id: bcs.Address,
68
94
  owner: bcs.Address,
69
95
  reward_coin_type: type_name.TypeName,
70
96
  reward_amount: bcs.u64(),
71
- timestamp: bcs.u64()
72
- } });
97
+ timestamp: bcs.u64(),
98
+ },
99
+ });
73
100
  /** Get position owner */
74
101
  export function owner(options) {
75
102
  var _a;
76
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
77
- const argumentsTypes = [
78
- null
79
- ];
103
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
104
+ const argumentsTypes = [null];
80
105
  const parameterNames = ["position"];
81
106
  return (tx) => tx.moveCall({
82
107
  package: packageAddress,
83
- module: 'position',
84
- function: 'owner',
108
+ module: "position",
109
+ function: "owner",
85
110
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
86
- typeArguments: options.typeArguments
111
+ typeArguments: options.typeArguments,
87
112
  });
88
113
  }
89
114
  /** Check if it's a long position */
90
115
  export function isLong(options) {
91
116
  var _a;
92
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
93
- const argumentsTypes = [
94
- null
95
- ];
117
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
118
+ const argumentsTypes = [null];
96
119
  const parameterNames = ["position"];
97
120
  return (tx) => tx.moveCall({
98
121
  package: packageAddress,
99
- module: 'position',
100
- function: 'is_long',
122
+ module: "position",
123
+ function: "is_long",
101
124
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
102
- typeArguments: options.typeArguments
125
+ typeArguments: options.typeArguments,
103
126
  });
104
127
  }
105
128
  export function obligationId(options) {
106
129
  var _a;
107
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
108
- const argumentsTypes = [
109
- null
110
- ];
130
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
131
+ const argumentsTypes = [null];
111
132
  const parameterNames = ["position"];
112
133
  return (tx) => tx.moveCall({
113
134
  package: packageAddress,
114
- module: 'position',
115
- function: 'obligation_id',
135
+ module: "position",
136
+ function: "obligation_id",
116
137
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
117
- typeArguments: options.typeArguments
138
+ typeArguments: options.typeArguments,
118
139
  });
119
140
  }
120
141
  export function lendingMarketId(options) {
121
142
  var _a;
122
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
123
- const argumentsTypes = [
124
- null
125
- ];
143
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
144
+ const argumentsTypes = [null];
126
145
  const parameterNames = ["position"];
127
146
  return (tx) => tx.moveCall({
128
147
  package: packageAddress,
129
- module: 'position',
130
- function: 'lending_market_id',
148
+ module: "position",
149
+ function: "lending_market_id",
131
150
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
132
- typeArguments: options.typeArguments
151
+ typeArguments: options.typeArguments,
133
152
  });
134
153
  }
135
154
  export function marketId(options) {
136
155
  var _a;
137
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
138
- const argumentsTypes = [
139
- null
140
- ];
156
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
157
+ const argumentsTypes = [null];
141
158
  const parameterNames = ["position"];
142
159
  return (tx) => tx.moveCall({
143
160
  package: packageAddress,
144
- module: 'position',
145
- function: 'market_id',
161
+ module: "position",
162
+ function: "market_id",
146
163
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
147
- typeArguments: options.typeArguments
164
+ typeArguments: options.typeArguments,
148
165
  });
149
166
  }
@@ -1,8 +1,5 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveStruct, type RawTransactionArgument } from '../utils/index.js';
5
- import { type Transaction } from '@mysten/sui/transactions';
1
+ import { type Transaction } from "@mysten/sui/transactions";
2
+ import { MoveStruct, type RawTransactionArgument } from "../utils/index.js";
6
3
  export declare const FeeCollectedEvent: MoveStruct<{
7
4
  market_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
8
5
  is_open: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
@@ -24,11 +21,7 @@ export interface OpenPositionOptions {
24
21
  lendingMarket: RawTransactionArgument<string>,
25
22
  isLong: RawTransactionArgument<boolean>
26
23
  ];
27
- typeArguments: [
28
- string,
29
- string,
30
- string
31
- ];
24
+ typeArguments: [string, string, string];
32
25
  }
33
26
  export declare function openPosition(options: OpenPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
34
27
  export interface ClosePositionArguments {
@@ -45,11 +38,7 @@ export interface ClosePositionOptions {
45
38
  positionCap: RawTransactionArgument<string>,
46
39
  position: RawTransactionArgument<string>
47
40
  ];
48
- typeArguments: [
49
- string,
50
- string,
51
- string
52
- ];
41
+ typeArguments: [string, string, string];
53
42
  }
54
43
  /** Close position */
55
44
  export declare function closePosition(options: ClosePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
@@ -69,12 +58,7 @@ export interface BorrowOptions {
69
58
  position: RawTransactionArgument<string>,
70
59
  amount: RawTransactionArgument<number | bigint>
71
60
  ];
72
- typeArguments: [
73
- string,
74
- string,
75
- string,
76
- string
77
- ];
61
+ typeArguments: [string, string, string, string];
78
62
  }
79
63
  export declare function borrow(options: BorrowOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
80
64
  export interface RepayArguments {
@@ -93,12 +77,7 @@ export interface RepayOptions {
93
77
  position: RawTransactionArgument<string>,
94
78
  repayCoin: RawTransactionArgument<string>
95
79
  ];
96
- typeArguments: [
97
- string,
98
- string,
99
- string,
100
- string
101
- ];
80
+ typeArguments: [string, string, string, string];
102
81
  }
103
82
  export declare function repay(options: RepayOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
104
83
  export interface WithdrawArguments {
@@ -119,12 +98,7 @@ export interface WithdrawOptions {
119
98
  rateLimiterExemption: RawTransactionArgument<string | null>,
120
99
  amount: RawTransactionArgument<number | bigint>
121
100
  ];
122
- typeArguments: [
123
- string,
124
- string,
125
- string,
126
- string
127
- ];
101
+ typeArguments: [string, string, string, string];
128
102
  }
129
103
  export declare function withdraw(options: WithdrawOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
130
104
  export interface DepositArguments {
@@ -143,12 +117,7 @@ export interface DepositOptions {
143
117
  position: RawTransactionArgument<string>,
144
118
  depositCoin: RawTransactionArgument<string>
145
119
  ];
146
- typeArguments: [
147
- string,
148
- string,
149
- string,
150
- string
151
- ];
120
+ typeArguments: [string, string, string, string];
152
121
  }
153
122
  export declare function deposit(options: DepositOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
154
123
  export interface ClaimRewardsArguments {
@@ -171,12 +140,7 @@ export interface ClaimRewardsOptions {
171
140
  rewardIndex: RawTransactionArgument<number | bigint>,
172
141
  isDepositReward: RawTransactionArgument<boolean>
173
142
  ];
174
- typeArguments: [
175
- string,
176
- string,
177
- string,
178
- string
179
- ];
143
+ typeArguments: [string, string, string, string];
180
144
  }
181
145
  export declare function claimRewards(options: ClaimRewardsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
182
146
  export interface CompoundDebtArguments {
@@ -195,10 +159,6 @@ export interface CompoundDebtOptions {
195
159
  position: RawTransactionArgument<string>,
196
160
  borrowIndex: RawTransactionArgument<number | bigint>
197
161
  ];
198
- typeArguments: [
199
- string,
200
- string,
201
- string
202
- ];
162
+ typeArguments: [string, string, string];
203
163
  }
204
164
  export declare function compoundDebt(options: CompoundDebtOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
@@ -1,176 +1,207 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
- import { MoveStruct, normalizeMoveArguments } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- import * as type_name from './deps/std/type_name.js';
7
- const $moduleName = '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::router';
8
- export const FeeCollectedEvent = new MoveStruct({ name: `${$moduleName}::FeeCollectedEvent`, fields: {
4
+ import { bcs } from "@mysten/sui/bcs";
5
+ import { MoveStruct, normalizeMoveArguments, } from "../utils/index.js";
6
+ import * as type_name from "./deps/std/type_name.js";
7
+ const $moduleName = "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::router";
8
+ export const FeeCollectedEvent = new MoveStruct({
9
+ name: `${$moduleName}::FeeCollectedEvent`,
10
+ fields: {
9
11
  market_id: bcs.Address,
10
12
  is_open: bcs.bool(),
11
13
  fee_amount: bcs.u64(),
12
14
  fee_coin_type: type_name.TypeName,
13
- recipient: bcs.Address
14
- } });
15
+ recipient: bcs.Address,
16
+ },
17
+ });
15
18
  export function openPosition(options) {
16
19
  var _a;
17
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
18
- const argumentsTypes = [
19
- null,
20
- null,
21
- 'bool',
22
- '0x2::clock::Clock'
23
- ];
20
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
21
+ const argumentsTypes = [null, null, "bool", "0x2::clock::Clock"];
24
22
  const parameterNames = ["market", "lendingMarket", "isLong"];
25
23
  return (tx) => tx.moveCall({
26
24
  package: packageAddress,
27
- module: 'router',
28
- function: 'open_position',
25
+ module: "router",
26
+ function: "open_position",
29
27
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
30
- typeArguments: options.typeArguments
28
+ typeArguments: options.typeArguments,
31
29
  });
32
30
  }
33
31
  /** Close position */
34
32
  export function closePosition(options) {
35
33
  var _a;
36
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
34
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
37
35
  const argumentsTypes = [
38
36
  null,
39
37
  null,
40
38
  null,
41
39
  null,
42
- '0x2::clock::Clock'
40
+ "0x2::clock::Clock",
43
41
  ];
44
42
  const parameterNames = ["lendingMarket", "market", "positionCap", "position"];
45
43
  return (tx) => tx.moveCall({
46
44
  package: packageAddress,
47
- module: 'router',
48
- function: 'close_position',
45
+ module: "router",
46
+ function: "close_position",
49
47
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
50
- typeArguments: options.typeArguments
48
+ typeArguments: options.typeArguments,
51
49
  });
52
50
  }
53
51
  export function borrow(options) {
54
52
  var _a;
55
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
53
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
56
54
  const argumentsTypes = [
57
55
  null,
58
56
  null,
59
57
  null,
60
58
  null,
61
- 'u64',
62
- '0x3::sui_system::SuiSystemState',
63
- '0x2::clock::Clock'
59
+ "u64",
60
+ "0x3::sui_system::SuiSystemState",
61
+ "0x2::clock::Clock",
62
+ ];
63
+ const parameterNames = [
64
+ "lendingMarket",
65
+ "market",
66
+ "positionCap",
67
+ "position",
68
+ "amount",
64
69
  ];
65
- const parameterNames = ["lendingMarket", "market", "positionCap", "position", "amount"];
66
70
  return (tx) => tx.moveCall({
67
71
  package: packageAddress,
68
- module: 'router',
69
- function: 'borrow',
72
+ module: "router",
73
+ function: "borrow",
70
74
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
71
- typeArguments: options.typeArguments
75
+ typeArguments: options.typeArguments,
72
76
  });
73
77
  }
74
78
  export function repay(options) {
75
79
  var _a;
76
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
80
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
77
81
  const argumentsTypes = [
78
82
  null,
79
83
  null,
80
84
  null,
81
85
  null,
82
86
  null,
83
- '0x2::clock::Clock'
87
+ "0x2::clock::Clock",
88
+ ];
89
+ const parameterNames = [
90
+ "lendingMarket",
91
+ "market",
92
+ "positionCap",
93
+ "position",
94
+ "repayCoin",
84
95
  ];
85
- const parameterNames = ["lendingMarket", "market", "positionCap", "position", "repayCoin"];
86
96
  return (tx) => tx.moveCall({
87
97
  package: packageAddress,
88
- module: 'router',
89
- function: 'repay',
98
+ module: "router",
99
+ function: "repay",
90
100
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
91
- typeArguments: options.typeArguments
101
+ typeArguments: options.typeArguments,
92
102
  });
93
103
  }
94
104
  export function withdraw(options) {
95
105
  var _a;
96
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
106
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
97
107
  const argumentsTypes = [
98
108
  null,
99
109
  null,
100
110
  null,
101
111
  null,
102
- '0x1::option::Option<null>',
103
- 'u64',
104
- '0x3::sui_system::SuiSystemState',
105
- '0x2::clock::Clock'
112
+ "0x1::option::Option<null>",
113
+ "u64",
114
+ "0x3::sui_system::SuiSystemState",
115
+ "0x2::clock::Clock",
116
+ ];
117
+ const parameterNames = [
118
+ "lendingMarket",
119
+ "market",
120
+ "positionCap",
121
+ "position",
122
+ "rateLimiterExemption",
123
+ "amount",
106
124
  ];
107
- const parameterNames = ["lendingMarket", "market", "positionCap", "position", "rateLimiterExemption", "amount"];
108
125
  return (tx) => tx.moveCall({
109
126
  package: packageAddress,
110
- module: 'router',
111
- function: 'withdraw',
127
+ module: "router",
128
+ function: "withdraw",
112
129
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
113
- typeArguments: options.typeArguments
130
+ typeArguments: options.typeArguments,
114
131
  });
115
132
  }
116
133
  export function deposit(options) {
117
134
  var _a;
118
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
135
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
119
136
  const argumentsTypes = [
120
137
  null,
121
138
  null,
122
139
  null,
123
140
  null,
124
141
  null,
125
- '0x2::clock::Clock'
142
+ "0x2::clock::Clock",
143
+ ];
144
+ const parameterNames = [
145
+ "lendingMarket",
146
+ "market",
147
+ "positionCap",
148
+ "position",
149
+ "depositCoin",
126
150
  ];
127
- const parameterNames = ["lendingMarket", "market", "positionCap", "position", "depositCoin"];
128
151
  return (tx) => tx.moveCall({
129
152
  package: packageAddress,
130
- module: 'router',
131
- function: 'deposit',
153
+ module: "router",
154
+ function: "deposit",
132
155
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
133
- typeArguments: options.typeArguments
156
+ typeArguments: options.typeArguments,
134
157
  });
135
158
  }
136
159
  export function claimRewards(options) {
137
160
  var _a;
138
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
161
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
139
162
  const argumentsTypes = [
140
163
  null,
141
164
  null,
142
165
  null,
143
166
  null,
144
- 'u64',
145
- 'u64',
146
- 'bool',
147
- '0x2::clock::Clock'
167
+ "u64",
168
+ "u64",
169
+ "bool",
170
+ "0x2::clock::Clock",
171
+ ];
172
+ const parameterNames = [
173
+ "lendingMarket",
174
+ "market",
175
+ "positionCap",
176
+ "position",
177
+ "reserveId",
178
+ "rewardIndex",
179
+ "isDepositReward",
148
180
  ];
149
- const parameterNames = ["lendingMarket", "market", "positionCap", "position", "reserveId", "rewardIndex", "isDepositReward"];
150
181
  return (tx) => tx.moveCall({
151
182
  package: packageAddress,
152
- module: 'router',
153
- function: 'claim_rewards',
183
+ module: "router",
184
+ function: "claim_rewards",
154
185
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
155
- typeArguments: options.typeArguments
186
+ typeArguments: options.typeArguments,
156
187
  });
157
188
  }
158
189
  export function compoundDebt(options) {
159
190
  var _a;
160
- const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53';
161
- const argumentsTypes = [
162
- null,
163
- null,
164
- null,
165
- null,
166
- 'u64'
191
+ const packageAddress = (_a = options.package) !== null && _a !== void 0 ? _a : "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53";
192
+ const argumentsTypes = [null, null, null, null, "u64"];
193
+ const parameterNames = [
194
+ "lendingMarket",
195
+ "market",
196
+ "positionCap",
197
+ "position",
198
+ "borrowIndex",
167
199
  ];
168
- const parameterNames = ["lendingMarket", "market", "positionCap", "position", "borrowIndex"];
169
200
  return (tx) => tx.moveCall({
170
201
  package: packageAddress,
171
- module: 'router',
172
- function: 'compound_debt',
202
+ module: "router",
203
+ function: "compound_debt",
173
204
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
174
- typeArguments: options.typeArguments
205
+ typeArguments: options.typeArguments,
175
206
  });
176
207
  }
@@ -1,5 +1,2 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveTuple } from '../utils/index.js';
1
+ import { MoveTuple } from "../utils/index.js";
5
2
  export declare const Version: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<number, number, "u16">], "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::version::Version">;
@@ -1,7 +1,10 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
- import { MoveTuple } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- const $moduleName = '0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::version';
7
- export const Version = new MoveTuple({ name: `${$moduleName}::Version`, fields: [bcs.u16()] });
4
+ import { bcs } from "@mysten/sui/bcs";
5
+ import { MoveTuple } from "../utils/index.js";
6
+ const $moduleName = "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::version";
7
+ export const Version = new MoveTuple({
8
+ name: `${$moduleName}::Version`,
9
+ fields: [bcs.u16()],
10
+ });