@naviprotocol/lending 1.4.6 → 2.0.0-beta.0
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/README.md +1 -2
- package/dist/account.d.ts +8 -8
- package/dist/account.d.ts.map +1 -1
- package/dist/bcs.d.ts +130 -137
- package/dist/bcs.d.ts.map +1 -1
- package/dist/emode.d.ts +1 -1
- package/dist/emode.d.ts.map +1 -1
- package/dist/flashloan.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1221 -1008
- package/dist/index.esm.js.map +1 -1
- package/dist/liquidate.d.ts +1 -1
- package/dist/pool.d.ts +3 -3
- package/dist/pool.d.ts.map +1 -1
- package/dist/pyth.d.ts +47 -0
- package/dist/pyth.d.ts.map +1 -0
- package/dist/sui.d.ts +20 -0
- package/dist/sui.d.ts.map +1 -0
- package/dist/types.d.ts +8 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/ua.d.ts.map +1 -1
- package/dist/utils.d.ts +4 -4
- package/dist/utils.d.ts.map +1 -1
- package/package.json +11 -9
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ npm install @naviprotocol/lending
|
|
|
43
43
|
|
|
44
44
|
The last `options` parameter of the interface is usually an optional object used to customize interface behavior. Common optional parameters include but are not limited to:
|
|
45
45
|
|
|
46
|
-
- `client`: Sui
|
|
46
|
+
- `client`: Sui SDK v2 client instance, such as `SuiJsonRpcClient` from `@mysten/sui/jsonRpc`, used for customizing network requests in multi-network or custom RPC environments.
|
|
47
47
|
- `env`: Specify environment (such as `'prod'`、`'dev'`), affecting data sources and on-chain contract addresses, ensuring data isolation and compatibility in different deployment environments.
|
|
48
48
|
- `cacheTime`: Custom cache time in milliseconds. By setting cache time, you can reduce duplicate requests and improve performance. For example, `cacheTime: 60000` means cache for 60 seconds.
|
|
49
49
|
- `disableCache`: Whether to disable cache
|
|
@@ -63,4 +63,3 @@ The last `options` parameter of the interface is usually an optional object used
|
|
|
63
63
|
## Support
|
|
64
64
|
|
|
65
65
|
- Issues: [GitHub Issues](https://github.com/naviprotocol/naviprotocol-monorepo/issues)
|
|
66
|
-
|
package/dist/account.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserLendingInfo, SuiClientOption, EnvOption, Pool, Transaction as NAVITransaction, AssetIdentifier, TransactionResult, CacheOption, AccountCap, MarketOption, LendingPosition, MarketsOption, EModePool } from './types';
|
|
2
2
|
import { Transaction } from '@mysten/sui/transactions';
|
|
3
|
-
import { CoinStruct } from '@mysten/sui/
|
|
3
|
+
import { CoinStruct } from '@mysten/sui/jsonRpc';
|
|
4
4
|
import { PoolOperator } from './pool';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -24,16 +24,16 @@ export declare function mergeCoinsPTB(tx: Transaction, coins: ({
|
|
|
24
24
|
} & CoinStruct)[], options?: {
|
|
25
25
|
balance?: number;
|
|
26
26
|
useGasCoin?: boolean;
|
|
27
|
-
}): string |
|
|
28
|
-
$kind: "
|
|
27
|
+
}): string | {
|
|
28
|
+
$kind: "GasCoin";
|
|
29
|
+
GasCoin: true;
|
|
30
|
+
} | ({
|
|
29
31
|
Result: number;
|
|
32
|
+
$kind: "Result";
|
|
30
33
|
} & [{
|
|
31
|
-
$kind: "NestedResult";
|
|
32
34
|
NestedResult: [number, number];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
GasCoin: true;
|
|
36
|
-
};
|
|
35
|
+
$kind: "NestedResult";
|
|
36
|
+
}]);
|
|
37
37
|
/**
|
|
38
38
|
* Calculates dynamic health factor for a user after potential operations
|
|
39
39
|
*
|
package/dist/account.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,E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C,IAAI,EAAE,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM;IAqC7C,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM;IAqCnD,OAAO,CAAC,eAAe;IAUvB,oBAAoB,CAAC,SAAS,EAAE,eAAe,EAAE;;;;;;;;;;;;;CAmIlD;AAED,wBAAsB,qBAAqB,CACzC,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,iBAAiB,EAChD,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,iBAkB5C"}
|
package/dist/bcs.d.ts
CHANGED
|
@@ -9,62 +9,62 @@
|
|
|
9
9
|
* BCS schema for Sui addresses with hex transformation
|
|
10
10
|
* Converts between hex string representation and byte arrays
|
|
11
11
|
*/
|
|
12
|
-
export declare const Address: import('@mysten/bcs').BcsType<string, string>;
|
|
12
|
+
export declare const Address: import('@mysten/sui/bcs').BcsType<string, string, "bytes[32]">;
|
|
13
13
|
/**
|
|
14
14
|
* BCS schema for incentive APY information
|
|
15
15
|
* Contains asset ID, APY value, and supported coin types
|
|
16
16
|
*/
|
|
17
|
-
export declare const IncentiveAPYInfo: import('@mysten/bcs').
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
coin_types: Iterable<string> & {
|
|
17
|
+
export declare const IncentiveAPYInfo: import('@mysten/sui/bcs').BcsStruct<{
|
|
18
|
+
/** Asset identifier */
|
|
19
|
+
asset_id: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
20
|
+
/** Annual Percentage Yield as a 256-bit integer */
|
|
21
|
+
apy: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
22
|
+
/** List of supported coin types for this incentive */
|
|
23
|
+
coin_types: import('@mysten/sui/bcs').BcsType<string[], Iterable<string> & {
|
|
25
24
|
length: number;
|
|
26
|
-
}
|
|
27
|
-
}>;
|
|
25
|
+
}, string>;
|
|
26
|
+
}, string>;
|
|
28
27
|
/**
|
|
29
28
|
* BCS schema for incentive pool information
|
|
30
29
|
* Contains comprehensive details about a lending incentive pool
|
|
31
30
|
*/
|
|
32
|
-
export declare const IncentivePoolInfo: import('@mysten/bcs').
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}>;
|
|
31
|
+
export declare const IncentivePoolInfo: import('@mysten/sui/bcs').BcsStruct<{
|
|
32
|
+
/** Unique pool identifier */
|
|
33
|
+
pool_id: import('@mysten/sui/bcs').BcsType<string, string, "bytes[32]">;
|
|
34
|
+
/** Address holding the incentive funds */
|
|
35
|
+
funds: import('@mysten/sui/bcs').BcsType<string, string, "bytes[32]">;
|
|
36
|
+
/** Current phase of the incentive program */
|
|
37
|
+
phase: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
38
|
+
/** Timestamp when the incentive started */
|
|
39
|
+
start_at: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
40
|
+
/** Timestamp when the incentive ends */
|
|
41
|
+
end_at: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
42
|
+
/** Timestamp when the incentive was closed */
|
|
43
|
+
closed_at: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
44
|
+
/** Total supply of incentive tokens */
|
|
45
|
+
total_supply: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
46
|
+
/** Asset identifier for the incentive */
|
|
47
|
+
asset_id: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
48
|
+
/** Option type for the incentive */
|
|
49
|
+
option: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
50
|
+
/** Factor used in incentive calculations */
|
|
51
|
+
factor: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
52
|
+
/** Amount of incentives already distributed */
|
|
53
|
+
distributed: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
54
|
+
/** Amount of incentives currently available */
|
|
55
|
+
available: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
56
|
+
/** Total amount of incentives */
|
|
57
|
+
total: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
58
|
+
}, string>;
|
|
61
59
|
/**
|
|
62
60
|
* BCS schema for incentive pool information grouped by phase
|
|
63
61
|
* Contains phase number and list of pools in that phase
|
|
64
62
|
*/
|
|
65
|
-
export declare const IncentivePoolInfoByPhase: import('@mysten/bcs').
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
export declare const IncentivePoolInfoByPhase: import('@mysten/sui/bcs').BcsStruct<{
|
|
64
|
+
/** Phase number */
|
|
65
|
+
phase: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
66
|
+
/** List of incentive pools in this phase */
|
|
67
|
+
pools: import('@mysten/sui/bcs').BcsType<{
|
|
68
68
|
pool_id: string;
|
|
69
69
|
funds: string;
|
|
70
70
|
phase: string;
|
|
@@ -78,10 +78,7 @@ export declare const IncentivePoolInfoByPhase: import('@mysten/bcs').BcsType<{
|
|
|
78
78
|
distributed: string;
|
|
79
79
|
available: string;
|
|
80
80
|
total: string;
|
|
81
|
-
}[]
|
|
82
|
-
}, {
|
|
83
|
-
phase: string | number | bigint;
|
|
84
|
-
pools: Iterable<{
|
|
81
|
+
}[], Iterable<{
|
|
85
82
|
pool_id: string;
|
|
86
83
|
funds: string;
|
|
87
84
|
phase: string | number | bigint;
|
|
@@ -97,110 +94,106 @@ export declare const IncentivePoolInfoByPhase: import('@mysten/bcs').BcsType<{
|
|
|
97
94
|
total: string | number | bigint;
|
|
98
95
|
}> & {
|
|
99
96
|
length: number;
|
|
100
|
-
}
|
|
101
|
-
}>;
|
|
97
|
+
}, string>;
|
|
98
|
+
}, string>;
|
|
102
99
|
/**
|
|
103
100
|
* BCS schema for oracle price information
|
|
104
101
|
* Contains price data from external price feeds
|
|
105
102
|
*/
|
|
106
|
-
export declare const OracleInfo: import('@mysten/bcs').
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}>;
|
|
103
|
+
export declare const OracleInfo: import('@mysten/sui/bcs').BcsStruct<{
|
|
104
|
+
/** Oracle identifier */
|
|
105
|
+
oracle_id: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
106
|
+
/** Current price as a 256-bit integer */
|
|
107
|
+
price: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
108
|
+
/** Number of decimal places for the price */
|
|
109
|
+
decimals: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
110
|
+
/** Whether the oracle data is valid */
|
|
111
|
+
valid: import('@mysten/sui/bcs').BcsType<boolean, boolean, "bool">;
|
|
112
|
+
}, string>;
|
|
117
113
|
/**
|
|
118
114
|
* BCS schema for flash loan asset configuration
|
|
119
115
|
* Contains parameters for flash loan functionality
|
|
120
116
|
*/
|
|
121
|
-
export declare const FlashLoanAssetConfig: import('@mysten/bcs').
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}>;
|
|
117
|
+
export declare const FlashLoanAssetConfig: import('@mysten/sui/bcs').BcsStruct<{
|
|
118
|
+
/** Unique identifier for the flash loan asset */
|
|
119
|
+
id: import('@mysten/sui/bcs').BcsType<string, string, "string">;
|
|
120
|
+
/** Asset identifier */
|
|
121
|
+
asset_id: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
122
|
+
/** Coin type for the asset */
|
|
123
|
+
coin_type: import('@mysten/sui/bcs').BcsType<string, string, "string">;
|
|
124
|
+
/** Pool identifier for the flash loan */
|
|
125
|
+
pool_id: import('@mysten/sui/bcs').BcsType<string, string, "string">;
|
|
126
|
+
/** Rate paid to suppliers for flash loans */
|
|
127
|
+
rate_to_supplier: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
128
|
+
/** Rate paid to treasury for flash loans */
|
|
129
|
+
rate_to_treasury: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
130
|
+
/** Maximum flash loan amount */
|
|
131
|
+
max: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
132
|
+
/** Minimum flash loan amount */
|
|
133
|
+
min: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
134
|
+
}, string>;
|
|
140
135
|
/**
|
|
141
136
|
* BCS schema for reserve data information
|
|
142
137
|
* Contains comprehensive details about a lending reserve
|
|
143
138
|
*/
|
|
144
|
-
export declare const ReserveDataInfo: import('@mysten/bcs').
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}>;
|
|
139
|
+
export declare const ReserveDataInfo: import('@mysten/sui/bcs').BcsStruct<{
|
|
140
|
+
/** Reserve identifier */
|
|
141
|
+
id: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
142
|
+
/** Oracle identifier for price feeds */
|
|
143
|
+
oracle_id: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
144
|
+
/** Coin type for the reserve */
|
|
145
|
+
coin_type: import('@mysten/sui/bcs').BcsType<string, string, "string">;
|
|
146
|
+
/** Maximum supply capacity */
|
|
147
|
+
supply_cap: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
148
|
+
/** Maximum borrow capacity */
|
|
149
|
+
borrow_cap: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
150
|
+
/** Current supply interest rate */
|
|
151
|
+
supply_rate: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
152
|
+
/** Current borrow interest rate */
|
|
153
|
+
borrow_rate: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
154
|
+
/** Current supply index for interest calculation */
|
|
155
|
+
supply_index: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
156
|
+
/** Current borrow index for interest calculation */
|
|
157
|
+
borrow_index: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
158
|
+
/** Total amount supplied to the reserve */
|
|
159
|
+
total_supply: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
160
|
+
/** Total amount borrowed from the reserve */
|
|
161
|
+
total_borrow: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
162
|
+
/** Timestamp of last update */
|
|
163
|
+
last_update_at: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u64">;
|
|
164
|
+
/** Loan-to-Value ratio for collateral */
|
|
165
|
+
ltv: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
166
|
+
/** Treasury factor for fee calculations */
|
|
167
|
+
treasury_factor: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
168
|
+
/** Current treasury balance */
|
|
169
|
+
treasury_balance: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
170
|
+
/** Base interest rate */
|
|
171
|
+
base_rate: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
172
|
+
/** Interest rate multiplier */
|
|
173
|
+
multiplier: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
174
|
+
/** Jump rate multiplier for high utilization */
|
|
175
|
+
jump_rate_multiplier: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
176
|
+
/** Reserve factor for protocol fees */
|
|
177
|
+
reserve_factor: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
178
|
+
/** Optimal utilization rate */
|
|
179
|
+
optimal_utilization: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
180
|
+
/** Liquidation ratio threshold */
|
|
181
|
+
liquidation_ratio: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
182
|
+
/** Liquidation bonus for liquidators */
|
|
183
|
+
liquidation_bonus: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
184
|
+
/** Liquidation threshold */
|
|
185
|
+
liquidation_threshold: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
186
|
+
}, string>;
|
|
193
187
|
/**
|
|
194
188
|
* BCS schema for user state information
|
|
195
189
|
* Contains user's borrowing and supplying balances for an asset
|
|
196
190
|
*/
|
|
197
|
-
export declare const UserStateInfo: import('@mysten/bcs').
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}>;
|
|
191
|
+
export declare const UserStateInfo: import('@mysten/sui/bcs').BcsStruct<{
|
|
192
|
+
/** Asset identifier */
|
|
193
|
+
asset_id: import('@mysten/sui/bcs').BcsType<number, number, "u8">;
|
|
194
|
+
/** User's current borrow balance */
|
|
195
|
+
borrow_balance: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
196
|
+
/** User's current supply balance */
|
|
197
|
+
supply_balance: import('@mysten/sui/bcs').BcsType<string, string | number | bigint, "u256">;
|
|
198
|
+
}, string>;
|
|
206
199
|
//# sourceMappingURL=bcs.d.ts.map
|
package/dist/bcs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bcs.d.ts","sourceRoot":"","sources":["../src/bcs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"bcs.d.ts","sourceRoot":"","sources":["../src/bcs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;;GAGG;AACH,eAAO,MAAM,OAAO,gEAIlB,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,uBAAuB;;IAEvB,mDAAmD;;IAEnD,sDAAsD;;;;UAEtD,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B,6BAA6B;;IAE7B,0CAA0C;;IAE1C,6CAA6C;;IAE7C,2CAA2C;;IAE3C,wCAAwC;;IAExC,8CAA8C;;IAE9C,uCAAuC;;IAEvC,yCAAyC;;IAEzC,oCAAoC;;IAEpC,4CAA4C;;IAE5C,+CAA+C;;IAE/C,+CAA+C;;IAE/C,iCAAiC;;UAEjC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;IACnC,mBAAmB;;IAEnB,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAE5C,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU;IACrB,wBAAwB;;IAExB,yCAAyC;;IAEzC,6CAA6C;;IAE7C,uCAAuC;;UAEvC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;IAC/B,iDAAiD;;IAEjD,uBAAuB;;IAEvB,8BAA8B;;IAE9B,yCAAyC;;IAEzC,6CAA6C;;IAE7C,4CAA4C;;IAE5C,gCAAgC;;IAEhC,gCAAgC;;UAEhC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,yBAAyB;;IAEzB,wCAAwC;;IAExC,gCAAgC;;IAEhC,8BAA8B;;IAE9B,8BAA8B;;IAE9B,mCAAmC;;IAEnC,mCAAmC;;IAEnC,oDAAoD;;IAEpD,oDAAoD;;IAEpD,2CAA2C;;IAE3C,6CAA6C;;IAE7C,+BAA+B;;IAE/B,yCAAyC;;IAEzC,2CAA2C;;IAE3C,+BAA+B;;IAE/B,yBAAyB;;IAEzB,+BAA+B;;IAE/B,gDAAgD;;IAEhD,uCAAuC;;IAEvC,+BAA+B;;IAE/B,kCAAkC;;IAElC,wCAAwC;;IAExC,4BAA4B;;UAE5B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa;IACxB,uBAAuB;;IAEvB,oCAAoC;;IAEpC,oCAAoC;;UAEpC,CAAA"}
|
package/dist/emode.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Transaction } from '@mysten/sui/transactions';
|
|
|
3
3
|
|
|
4
4
|
export declare function enterEModePTB(tx: Transaction, emodeId: number | TransactionResult, options?: Partial<EnvOption & AccountCapOption & MarketOption>): Promise<Transaction>;
|
|
5
5
|
export declare function exitEModePTB(tx: Transaction, options?: Partial<EnvOption & AccountCapOption & MarketOption>): Promise<Transaction>;
|
|
6
|
-
export declare function createEModeCapPTB(tx: Transaction, emodeId: number | TransactionResult, options?: Partial<EnvOption & MarketOption>): Promise<import('@mysten/sui/
|
|
6
|
+
export declare function createEModeCapPTB(tx: Transaction, emodeId: number | TransactionResult, options?: Partial<EnvOption & MarketOption>): Promise<import('@mysten/sui/transactions').TransactionResult>;
|
|
7
7
|
export declare const getUserEModeCaps: (address: string, options?: Partial<SuiClientOption & EnvOption & CacheOption>) => Promise<EModeCap[]>;
|
|
8
8
|
export declare function emodeIdentityId(identifier: EModeIdentity): string;
|
|
9
9
|
//# sourceMappingURL=emode.d.ts.map
|
package/dist/emode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emode.d.ts","sourceRoot":"","sources":["../src/emode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,aAAa,EACd,MAAM,SAAS,CAAA;AAIhB,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAItD,wBAAsB,aAAa,CACjC,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,MAAM,GAAG,iBAAiB,EACnC,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,gBAAgB,GAAG,YAAY,CAAC,GAC7D,OAAO,CAAC,WAAW,CAAC,CAsBtB;AAED,wBAAsB,YAAY,CAChC,EAAE,EAAE,WAAW,EACf,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,gBAAgB,GAAG,YAAY,CAAC,GAC7D,OAAO,CAAC,WAAW,CAAC,CAiBtB;AAED,wBAAsB,iBAAiB,CACrC,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,MAAM,GAAG,iBAAiB,EACnC,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"emode.d.ts","sourceRoot":"","sources":["../src/emode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,aAAa,EACd,MAAM,SAAS,CAAA;AAIhB,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAItD,wBAAsB,aAAa,CACjC,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,MAAM,GAAG,iBAAiB,EACnC,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,gBAAgB,GAAG,YAAY,CAAC,GAC7D,OAAO,CAAC,WAAW,CAAC,CAsBtB;AAED,wBAAsB,YAAY,CAChC,EAAE,EAAE,WAAW,EACf,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,gBAAgB,GAAG,YAAY,CAAC,GAC7D,OAAO,CAAC,WAAW,CAAC,CAiBtB;AAED,wBAAsB,iBAAiB,CACrC,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,MAAM,GAAG,iBAAiB,EACnC,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,iEAuB5C;AAED,eAAO,MAAM,gBAAgB,YAGd,MAAM,YACL,OAAO,CAAC,eAAe,GAAG,SAAS,GAAG,WAAW,CAAC,KAC3D,OAAO,CAAC,QAAQ,EAAE,CA+BxB,CAAA;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,aAAa,UAGxD"}
|
package/dist/flashloan.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare function getFlashLoanAsset(identifier: AssetIdentifier, options?:
|
|
|
31
31
|
* @throws Error if the pool does not support flash loans
|
|
32
32
|
*/
|
|
33
33
|
export declare function flashloanPTB(tx: Transaction, identifier: AssetIdentifier, amount: number | TransactionResult, options?: Partial<EnvOption & MarketOption>): Promise<{
|
|
34
|
-
$kind: "NestedResult";
|
|
35
34
|
NestedResult: [number, number];
|
|
35
|
+
$kind: "NestedResult";
|
|
36
36
|
}[]>;
|
|
37
37
|
/**
|
|
38
38
|
* Repay a flash loan transaction in the PTB
|
|
@@ -49,7 +49,7 @@ export declare function flashloanPTB(tx: Transaction, identifier: AssetIdentifie
|
|
|
49
49
|
* @throws Error if the pool does not support flash loans
|
|
50
50
|
*/
|
|
51
51
|
export declare function repayFlashLoanPTB(tx: Transaction, identifier: AssetIdentifier, receipt: TransactionResult | string, coinObject: CoinObject, options?: Partial<EnvOption & MarketOption>): Promise<{
|
|
52
|
-
$kind: "NestedResult";
|
|
53
52
|
NestedResult: [number, number];
|
|
53
|
+
$kind: "NestedResult";
|
|
54
54
|
}[]>;
|
|
55
55
|
//# sourceMappingURL=flashloan.d.ts.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,WAAW,CAAA;AAGzB,cAAc,OAAO,CAAA;AAGrB,cAAc,UAAU,CAAA;AAGxB,cAAc,UAAU,CAAA;AAGxB,cAAc,aAAa,CAAA;AAG3B,cAAc,aAAa,CAAA;AAG3B,cAAc,QAAQ,CAAA;AAGtB,cAAc,UAAU,CAAA;AAGxB,cAAc,SAAS,CAAA;AAGvB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGjG,cAAc,eAAe,CAAA;AAE7B,cAAc,SAAS,CAAA;AAEvB,cAAc,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,WAAW,CAAA;AAGzB,cAAc,OAAO,CAAA;AAGrB,cAAc,UAAU,CAAA;AAGxB,cAAc,UAAU,CAAA;AAGxB,cAAc,aAAa,CAAA;AAG3B,cAAc,aAAa,CAAA;AAG3B,cAAc,QAAQ,CAAA;AAGtB,cAAc,UAAU,CAAA;AAGxB,cAAc,SAAS,CAAA;AAGvB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGjG,cAAc,eAAe,CAAA;AAE7B,cAAc,SAAS,CAAA;AAEvB,cAAc,UAAU,CAAA;AAExB,cAAc,OAAO,CAAA;AAErB,cAAc,QAAQ,CAAA"}
|