@mysten/deepbook-v3 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/contracts/deepbook/account.d.mts +1 -1
  3. package/dist/contracts/deepbook/account.mjs.map +1 -1
  4. package/dist/contracts/deepbook/deep_price.d.mts +1 -1
  5. package/dist/contracts/deepbook/deep_price.mjs.map +1 -1
  6. package/dist/contracts/deepbook/order.d.mts +1 -1
  7. package/dist/contracts/deepbook/order.mjs.map +1 -1
  8. package/dist/contracts/pyth/data_source.mjs.map +1 -1
  9. package/dist/contracts/pyth/i64.mjs.map +1 -1
  10. package/dist/contracts/pyth/price.mjs.map +1 -1
  11. package/dist/contracts/pyth/price_feed.mjs.map +1 -1
  12. package/dist/contracts/pyth/price_identifier.mjs.map +1 -1
  13. package/dist/contracts/pyth/price_info.mjs.map +1 -1
  14. package/dist/contracts/pyth/state.mjs.map +1 -1
  15. package/dist/contracts/utils/index.d.mts +4 -4
  16. package/dist/contracts/utils/index.d.mts.map +1 -1
  17. package/dist/contracts/utils/index.mjs.map +1 -1
  18. package/dist/queries/accountQueries.mjs +3 -0
  19. package/dist/queries/accountQueries.mjs.map +1 -1
  20. package/dist/queries/balanceManagerQueries.mjs +5 -0
  21. package/dist/queries/balanceManagerQueries.mjs.map +1 -1
  22. package/dist/queries/marginManagerQueries.mjs +15 -0
  23. package/dist/queries/marginManagerQueries.mjs.map +1 -1
  24. package/dist/queries/marginPoolQueries.mjs +14 -0
  25. package/dist/queries/marginPoolQueries.mjs.map +1 -1
  26. package/dist/queries/orderQueries.mjs +7 -0
  27. package/dist/queries/orderQueries.mjs.map +1 -1
  28. package/dist/queries/poolQueries.mjs +15 -0
  29. package/dist/queries/poolQueries.mjs.map +1 -1
  30. package/dist/queries/quantityQueries.mjs +9 -0
  31. package/dist/queries/quantityQueries.mjs.map +1 -1
  32. package/dist/queries/referralQueries.mjs +5 -0
  33. package/dist/queries/referralQueries.mjs.map +1 -1
  34. package/dist/queries/registryQueries.mjs +12 -0
  35. package/dist/queries/registryQueries.mjs.map +1 -1
  36. package/dist/queries/tpslQueries.mjs +3 -0
  37. package/dist/queries/tpslQueries.mjs.map +1 -1
  38. package/dist/transactions/marginAdmin.d.mts +7 -7
  39. package/dist/transactions/marginLiquidations.d.mts +3 -3
  40. package/dist/transactions/marginLiquidations.d.mts.map +1 -1
  41. package/dist/transactions/marginMaintainer.d.mts +5 -5
  42. package/dist/transactions/marginManager.d.mts +23 -23
  43. package/dist/transactions/marginRegistry.d.mts +15 -15
  44. package/package.json +4 -4
  45. package/src/contracts/deepbook/account.ts +20 -20
  46. package/src/contracts/deepbook/balance_manager.ts +3 -3
  47. package/src/contracts/deepbook/deep_price.ts +6 -6
  48. package/src/contracts/deepbook/fill.ts +34 -34
  49. package/src/contracts/deepbook/math.ts +2 -2
  50. package/src/contracts/deepbook/order.ts +24 -24
  51. package/src/contracts/deepbook/order_info.ts +46 -46
  52. package/src/contracts/deepbook/order_query.ts +5 -5
  53. package/src/contracts/deepbook/pool.ts +119 -33
  54. package/src/contracts/deepbook/registry.ts +3 -3
  55. package/src/contracts/pyth/batch_price_attestation.ts +5 -5
  56. package/src/contracts/pyth/contract_upgrade.ts +3 -3
  57. package/src/contracts/pyth/data_source.ts +4 -4
  58. package/src/contracts/pyth/deserialize.ts +8 -8
  59. package/src/contracts/pyth/governance.ts +7 -7
  60. package/src/contracts/pyth/governance_action.ts +2 -2
  61. package/src/contracts/pyth/governance_instruction.ts +6 -6
  62. package/src/contracts/pyth/hot_potato_vector.ts +5 -5
  63. package/src/contracts/pyth/i64.ts +4 -4
  64. package/src/contracts/pyth/merkle_tree.ts +3 -7
  65. package/src/contracts/pyth/migrate.ts +2 -2
  66. package/src/contracts/pyth/price.ts +7 -7
  67. package/src/contracts/pyth/price_feed.ts +7 -11
  68. package/src/contracts/pyth/price_identifier.ts +3 -3
  69. package/src/contracts/pyth/price_info.ts +9 -9
  70. package/src/contracts/pyth/price_status.ts +2 -2
  71. package/src/contracts/pyth/pyth.ts +12 -12
  72. package/src/contracts/pyth/set.ts +4 -4
  73. package/src/contracts/pyth/state.ts +5 -5
  74. package/src/contracts/utils/index.ts +7 -11
  75. package/src/queries/accountQueries.ts +3 -0
  76. package/src/queries/balanceManagerQueries.ts +5 -0
  77. package/src/queries/marginManagerQueries.ts +15 -0
  78. package/src/queries/marginPoolQueries.ts +14 -0
  79. package/src/queries/orderQueries.ts +7 -0
  80. package/src/queries/poolQueries.ts +15 -0
  81. package/src/queries/quantityQueries.ts +9 -0
  82. package/src/queries/referralQueries.ts +5 -0
  83. package/src/queries/registryQueries.ts +12 -0
  84. package/src/queries/tpslQueries.ts +3 -0
@@ -1,6 +1,6 @@
1
1
  import { PoolConfigParams } from "../types/index.mjs";
2
2
  import { DeepBookConfig } from "../utils/config.mjs";
3
- import * as _mysten_sui_transactions30 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions52 from "@mysten/sui/transactions";
4
4
  import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
5
5
 
6
6
  //#region src/transactions/marginAdmin.d.ts
@@ -17,7 +17,7 @@ declare class MarginAdminContract {
17
17
  * @description Mint a maintainer cap
18
18
  * @returns A function that takes a Transaction object
19
19
  */
20
- mintMaintainerCap: () => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
20
+ mintMaintainerCap: () => (tx: Transaction) => _mysten_sui_transactions52.TransactionResult;
21
21
  /**
22
22
  * @description Revoke a maintainer cap
23
23
  * @returns A function that takes a Transaction object
@@ -80,7 +80,7 @@ declare class MarginAdminContract {
80
80
  * @param {PoolConfigParams} poolConfigParams The parameters for the pool config
81
81
  * @returns A function that takes a Transaction object
82
82
  */
83
- newPoolConfig: (poolKey: string, poolConfigParams: PoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
83
+ newPoolConfig: (poolKey: string, poolConfigParams: PoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions52.TransactionResult;
84
84
  /**
85
85
  * @description Create a new pool config with leverage
86
86
  * @param {string} poolKey The key to identify the pool
@@ -95,7 +95,7 @@ declare class MarginAdminContract {
95
95
  * @param {number} maxEwmaDifferenceBps The maximum EWMA difference in basis points
96
96
  * @returns A function that takes a Transaction object
97
97
  */
98
- newCoinTypeData: (coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
98
+ newCoinTypeData: (coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number) => (tx: Transaction) => _mysten_sui_transactions52.TransactionResult;
99
99
  /**
100
100
  * @description Create a new Pyth config
101
101
  * @param {Array<{coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number}>} coinSetups The coins with their oracle config to be added to the Pyth config
@@ -106,12 +106,12 @@ declare class MarginAdminContract {
106
106
  coinKey: string;
107
107
  maxConfBps: number;
108
108
  maxEwmaDifferenceBps: number;
109
- }>, maxAgeSeconds: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
109
+ }>, maxAgeSeconds: number) => (tx: Transaction) => _mysten_sui_transactions52.TransactionResult;
110
110
  /**
111
111
  * @description Mint a pause cap
112
112
  * @returns A function that takes a Transaction object
113
113
  */
114
- mintPauseCap: () => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
114
+ mintPauseCap: () => (tx: Transaction) => _mysten_sui_transactions52.TransactionResult;
115
115
  /**
116
116
  * @description Revoke a pause cap
117
117
  * @param {string} pauseCapId The ID of the pause cap to revoke
@@ -131,7 +131,7 @@ declare class MarginAdminContract {
131
131
  * @param {string} coinKey The key to identify the margin pool
132
132
  * @returns A function that takes a Transaction object and returns a Coin<Asset>
133
133
  */
134
- adminWithdrawDefaultReferralFees: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
134
+ adminWithdrawDefaultReferralFees: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions52.TransactionResult;
135
135
  }
136
136
  //#endregion
137
137
  export { MarginAdminContract };
@@ -1,5 +1,5 @@
1
1
  import { DeepBookConfig } from "../utils/config.mjs";
2
- import * as _mysten_sui_transactions91 from "@mysten/sui/transactions";
2
+ import * as _mysten_sui_transactions105 from "@mysten/sui/transactions";
3
3
  import { Transaction } from "@mysten/sui/transactions";
4
4
 
5
5
  //#region src/transactions/marginLiquidations.d.ts
@@ -35,7 +35,7 @@ declare class MarginLiquidationsContract {
35
35
  * @param {number} amount The amount to withdraw
36
36
  * @returns A function that takes a Transaction object and returns the withdrawn coin
37
37
  */
38
- withdraw: (vaultId: string, liquidationAdminCap: string, coinKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
38
+ withdraw: (vaultId: string, liquidationAdminCap: string, coinKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions105.TransactionResult;
39
39
  /**
40
40
  * @description Liquidate a margin manager by repaying base debt
41
41
  * @param {string} vaultId The liquidation vault object ID
@@ -60,7 +60,7 @@ declare class MarginLiquidationsContract {
60
60
  * @param {string} coinKey The key to identify the coin type
61
61
  * @returns A function that takes a Transaction object
62
62
  */
63
- balance: (vaultId: string, coinKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
63
+ balance: (vaultId: string, coinKey: string) => (tx: Transaction) => _mysten_sui_transactions105.TransactionResult;
64
64
  }
65
65
  //#endregion
66
66
  export { MarginLiquidationsContract };
@@ -1 +1 @@
1
- {"version":3,"file":"marginLiquidations.d.mts","names":[],"sources":["../../src/transactions/marginLiquidations.ts"],"mappings":";;;;;;;;cAWa,0BAAA;EAAA;;;;cAMA,MAAA,EAAQ,cAAA;EAiDd;;;;;EAxCN,sBAAA,GAA0B,mBAAA,cAAiC,EAAA,EAAI,WAAA;EA6IC;;;;;;;;EA9HhE,OAAA,GACE,OAAA,UAAiB,mBAAA,UAA6B,OAAA,UAAiB,MAAA,cAC/D,EAAA,EAAI,WAAA;EAjBqD;;;;;;;;EAsC3D,QAAA,GACE,OAAA,UAAiB,mBAAA,UAA6B,OAAA,UAAiB,MAAA,cAC/D,EAAA,EAAI,WAAA,KAAW,0BAAA,CAAA,iBAAA;EADf;;;;;;;;EAsBF,aAAA,GACE,OAAA,UAAiB,cAAA,UAAwB,OAAA,UAAiB,WAAA,eAC1D,EAAA,EAAI,WAAA;EADa;;;;;;;;EAuCnB,cAAA,GACE,OAAA,UAAiB,cAAA,UAAwB,OAAA,UAAiB,WAAA,eAC1D,EAAA,EAAI,WAAA;EADsD;;;;;;EAuC5D,OAAA,GAAW,OAAA,UAAiB,OAAA,cAAqB,EAAA,EAAI,WAAA,KAAW,0BAAA,CAAA,iBAAA;AAAA"}
1
+ {"version":3,"file":"marginLiquidations.d.mts","names":[],"sources":["../../src/transactions/marginLiquidations.ts"],"mappings":";;;;;;;;cAWa,0BAAA;EAAA;;;;cAMA,MAAA,EAAQ,cAAA;EAiDd;;;;;EAxCN,sBAAA,GAA0B,mBAAA,cAAiC,EAAA,EAAI,WAAA;EA6IC;;;;;;;;EA9HhE,OAAA,GACE,OAAA,UAAiB,mBAAA,UAA6B,OAAA,UAAiB,MAAA,cAC/D,EAAA,EAAI,WAAA;EAjBqD;;;;;;;;EAsC3D,QAAA,GACE,OAAA,UAAiB,mBAAA,UAA6B,OAAA,UAAiB,MAAA,cAC/D,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;EADf;;;;;;;;EAsBF,aAAA,GACE,OAAA,UAAiB,cAAA,UAAwB,OAAA,UAAiB,WAAA,eAC1D,EAAA,EAAI,WAAA;EADa;;;;;;;;EAuCnB,cAAA,GACE,OAAA,UAAiB,cAAA,UAAwB,OAAA,UAAiB,WAAA,eAC1D,EAAA,EAAI,WAAA;EADsD;;;;;;EAuC5D,OAAA,GAAW,OAAA,UAAiB,OAAA,cAAqB,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA"}
@@ -1,6 +1,6 @@
1
1
  import { InterestConfigParams, MarginPoolConfigParams } from "../types/index.mjs";
2
2
  import { DeepBookConfig } from "../utils/config.mjs";
3
- import * as _mysten_sui_transactions36 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions58 from "@mysten/sui/transactions";
4
4
  import { Transaction, TransactionArgument, TransactionObjectArgument } from "@mysten/sui/transactions";
5
5
 
6
6
  //#region src/transactions/marginMaintainer.d.ts
@@ -27,27 +27,27 @@ declare class MarginMaintainerContract {
27
27
  * @param {InterestConfigParams} interestConfig The configuration for the interest
28
28
  * @returns A function that takes a Transaction object
29
29
  */
30
- newProtocolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams, interestConfig: InterestConfigParams) => (tx: Transaction) => _mysten_sui_transactions36.TransactionResult;
30
+ newProtocolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams, interestConfig: InterestConfigParams) => (tx: Transaction) => _mysten_sui_transactions58.TransactionResult;
31
31
  /**
32
32
  * @description Create a new margin pool config
33
33
  * @param {string} coinKey The key to identify the coin
34
34
  * @param {MarginPoolConfigParams} marginPoolConfig The configuration for the margin pool
35
35
  * @returns A function that takes a Transaction object
36
36
  */
37
- newMarginPoolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions36.TransactionResult;
37
+ newMarginPoolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions58.TransactionResult;
38
38
  /**
39
39
  * @description Create a new margin pool config with rate limit
40
40
  * @param {string} coinKey The key to identify the coin
41
41
  * @param {MarginPoolConfigParams} marginPoolConfig The configuration for the margin pool with rate limit
42
42
  * @returns A function that takes a Transaction object
43
43
  */
44
- newMarginPoolConfigWithRateLimit: (coinKey: string, marginPoolConfig: Required<Pick<MarginPoolConfigParams, "rateLimitCapacity" | "rateLimitRefillRatePerMs" | "rateLimitEnabled">> & MarginPoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions36.TransactionResult;
44
+ newMarginPoolConfigWithRateLimit: (coinKey: string, marginPoolConfig: Required<Pick<MarginPoolConfigParams, "rateLimitCapacity" | "rateLimitRefillRatePerMs" | "rateLimitEnabled">> & MarginPoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions58.TransactionResult;
45
45
  /**
46
46
  * @description Create a new interest config
47
47
  * @param {InterestConfigParams} interestConfig The configuration for the interest
48
48
  * @returns A function that takes a Transaction object
49
49
  */
50
- newInterestConfig: (interestConfig: InterestConfigParams) => (tx: Transaction) => _mysten_sui_transactions36.TransactionResult;
50
+ newInterestConfig: (interestConfig: InterestConfigParams) => (tx: Transaction) => _mysten_sui_transactions58.TransactionResult;
51
51
  /**
52
52
  * @description Enable a deepbook pool for loan
53
53
  * @param {string} deepbookPoolKey The key to identify the deepbook pool
@@ -1,6 +1,6 @@
1
1
  import { DepositDuringInitParams, DepositParams } from "../types/index.mjs";
2
2
  import { DeepBookConfig } from "../utils/config.mjs";
3
- import * as _mysten_sui_transactions40 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions30 from "@mysten/sui/transactions";
4
4
  import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
5
5
 
6
6
  //#region src/transactions/marginManager.d.ts
@@ -73,49 +73,49 @@ declare class MarginManagerContract {
73
73
  * @param {number} amount The amount to withdraw
74
74
  * @returns A function that takes a Transaction object
75
75
  */
76
- withdrawBase: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
76
+ withdrawBase: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
77
77
  /**
78
78
  * @description Withdraw quote from a margin manager
79
79
  * @param {string} managerKey The key to identify the manager
80
80
  * @param {number} amount The amount to withdraw
81
81
  * @returns A function that takes a Transaction object
82
82
  */
83
- withdrawQuote: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
83
+ withdrawQuote: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
84
84
  /**
85
85
  * @description Withdraw deep from a margin manager
86
86
  * @param {string} managerKey The key to identify the manager
87
87
  * @param {number} amount The amount to withdraw
88
88
  * @returns A function that takes a Transaction object
89
89
  */
90
- withdrawDeep: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
90
+ withdrawDeep: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
91
91
  /**
92
92
  * @description Borrow base from a margin manager
93
93
  * @param {string} managerKey The key to identify the manager
94
94
  * @param {number} amount The amount to borrow
95
95
  * @returns A function that takes a Transaction object
96
96
  */
97
- borrowBase: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
97
+ borrowBase: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
98
98
  /**
99
99
  * @description Borrow quote from a margin manager
100
100
  * @param {string} managerKey The key to identify the manager
101
101
  * @param {number} amount The amount to borrow
102
102
  * @returns A function that takes a Transaction object
103
103
  */
104
- borrowQuote: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
104
+ borrowQuote: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
105
105
  /**
106
106
  * @description Repay base from a margin manager
107
107
  * @param {string} managerKey The key to identify the manager
108
108
  * @param {number} amount The amount to repay
109
109
  * @returns A function that takes a Transaction object
110
110
  */
111
- repayBase: (managerKey: string, amount?: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
111
+ repayBase: (managerKey: string, amount?: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
112
112
  /**
113
113
  * @description Repay quote from a margin manager
114
114
  * @param {string} managerKey The key to identify the manager
115
115
  * @param {number} amount The amount to repay
116
116
  * @returns A function that takes a Transaction object
117
117
  */
118
- repayQuote: (managerKey: string, amount?: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
118
+ repayQuote: (managerKey: string, amount?: number) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
119
119
  /**
120
120
  * @description Liquidate a margin manager
121
121
  * @param {string} managerAddress The address of the manager to liquidate
@@ -124,7 +124,7 @@ declare class MarginManagerContract {
124
124
  * @param {TransactionArgument} repayCoin The coin to repay
125
125
  * @returns A function that takes a Transaction object
126
126
  */
127
- liquidate: (managerAddress: string, poolKey: string, debtIsBase: boolean, repayCoin: TransactionArgument) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
127
+ liquidate: (managerAddress: string, poolKey: string, debtIsBase: boolean, repayCoin: TransactionArgument) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
128
128
  /**
129
129
  * @description Set the referral for a margin manager (DeepBookPoolReferral)
130
130
  * @param {string} managerKey The key to identify the margin manager
@@ -145,63 +145,63 @@ declare class MarginManagerContract {
145
145
  * @param {string} marginManagerId The ID of the margin manager
146
146
  * @returns A function that takes a Transaction object
147
147
  */
148
- ownerByPoolKey: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
148
+ ownerByPoolKey: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
149
149
  /**
150
150
  * @description Get the DeepBook pool ID associated with a margin manager
151
151
  * @param {string} poolKey The key to identify the pool
152
152
  * @param {string} marginManagerId The ID of the margin manager
153
153
  * @returns A function that takes a Transaction object
154
154
  */
155
- deepbookPool: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
155
+ deepbookPool: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
156
156
  /**
157
157
  * @description Get the margin pool ID (if any) associated with a margin manager
158
158
  * @param {string} poolKey The key to identify the pool
159
159
  * @param {string} marginManagerId The ID of the margin manager
160
160
  * @returns A function that takes a Transaction object
161
161
  */
162
- marginPoolId: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
162
+ marginPoolId: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
163
163
  /**
164
164
  * @description Get borrowed shares for both base and quote assets
165
165
  * @param {string} poolKey The key to identify the pool
166
166
  * @param {string} marginManagerId The ID of the margin manager
167
167
  * @returns A function that takes a Transaction object
168
168
  */
169
- borrowedShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
169
+ borrowedShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
170
170
  /**
171
171
  * @description Get borrowed base shares
172
172
  * @param {string} poolKey The key to identify the pool
173
173
  * @param {string} marginManagerId The ID of the margin manager
174
174
  * @returns A function that takes a Transaction object
175
175
  */
176
- borrowedBaseShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
176
+ borrowedBaseShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
177
177
  /**
178
178
  * @description Get borrowed quote shares
179
179
  * @param {string} poolKey The key to identify the pool
180
180
  * @param {string} marginManagerId The ID of the margin manager
181
181
  * @returns A function that takes a Transaction object
182
182
  */
183
- borrowedQuoteShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
183
+ borrowedQuoteShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
184
184
  /**
185
185
  * @description Check if margin manager has base asset debt
186
186
  * @param {string} poolKey The key to identify the pool
187
187
  * @param {string} marginManagerId The ID of the margin manager
188
188
  * @returns A function that takes a Transaction object
189
189
  */
190
- hasBaseDebt: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
190
+ hasBaseDebt: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
191
191
  /**
192
192
  * @description Get the balance manager ID for a margin manager
193
193
  * @param {string} poolKey The key to identify the pool
194
194
  * @param {string} marginManagerId The ID of the margin manager
195
195
  * @returns A function that takes a Transaction object
196
196
  */
197
- balanceManager: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
197
+ balanceManager: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
198
198
  /**
199
199
  * @description Calculate assets (base and quote) for a margin manager
200
200
  * @param {string} poolKey The key to identify the pool
201
201
  * @param {string} marginManagerId The ID of the margin manager
202
202
  * @returns A function that takes a Transaction object
203
203
  */
204
- calculateAssets: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
204
+ calculateAssets: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
205
205
  /**
206
206
  * @description Calculate debts (base and quote) for a margin manager
207
207
  * @param {string} poolKey The key to identify the pool
@@ -209,7 +209,7 @@ declare class MarginManagerContract {
209
209
  * @param {string} marginManagerId The ID of the margin manager
210
210
  * @returns A function that takes a Transaction object
211
211
  */
212
- calculateDebts: (poolKey: string, coinKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
212
+ calculateDebts: (poolKey: string, coinKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
213
213
  /**
214
214
  * @description Get comprehensive state information for a margin manager
215
215
  * @param {string} poolKey The key to identify the pool
@@ -219,28 +219,28 @@ declare class MarginManagerContract {
219
219
  * base_debt, quote_debt, base_pyth_price, base_pyth_decimals,
220
220
  * quote_pyth_price, quote_pyth_decimals)
221
221
  */
222
- managerState: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
222
+ managerState: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
223
223
  /**
224
224
  * @description Get the base asset balance of a margin manager
225
225
  * @param {string} poolKey The key to identify the pool
226
226
  * @param {string} marginManagerId The ID of the margin manager
227
227
  * @returns A function that takes a Transaction object
228
228
  */
229
- baseBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
229
+ baseBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
230
230
  /**
231
231
  * @description Get the quote asset balance of a margin manager
232
232
  * @param {string} poolKey The key to identify the pool
233
233
  * @param {string} marginManagerId The ID of the margin manager
234
234
  * @returns A function that takes a Transaction object
235
235
  */
236
- quoteBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
236
+ quoteBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
237
237
  /**
238
238
  * @description Get the DEEP token balance of a margin manager
239
239
  * @param {string} poolKey The key to identify the pool
240
240
  * @param {string} marginManagerId The ID of the margin manager
241
241
  * @returns A function that takes a Transaction object
242
242
  */
243
- deepBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
243
+ deepBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions30.TransactionResult;
244
244
  }
245
245
  //#endregion
246
246
  export { MarginManagerContract };
@@ -1,5 +1,5 @@
1
1
  import { DeepBookConfig } from "../utils/config.mjs";
2
- import * as _mysten_sui_transactions93 from "@mysten/sui/transactions";
2
+ import * as _mysten_sui_transactions91 from "@mysten/sui/transactions";
3
3
  import { Transaction } from "@mysten/sui/transactions";
4
4
 
5
5
  //#region src/transactions/marginRegistry.d.ts
@@ -17,83 +17,83 @@ declare class MarginRegistryContract {
17
17
  * @param {string} poolKey The key to identify the pool
18
18
  * @returns A function that takes a Transaction object
19
19
  */
20
- poolEnabled: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
20
+ poolEnabled: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
21
21
  /**
22
22
  * @description Get the margin pool ID for a given asset
23
23
  * @param {string} coinKey The key to identify the coin
24
24
  * @returns A function that takes a Transaction object
25
25
  */
26
- getMarginPoolId: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
26
+ getMarginPoolId: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
27
27
  /**
28
28
  * @description Get the margin pool IDs (base and quote) for a deepbook pool
29
29
  * @param {string} poolKey The key to identify the pool
30
30
  * @returns A function that takes a Transaction object
31
31
  */
32
- getDeepbookPoolMarginPoolIds: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
32
+ getDeepbookPoolMarginPoolIds: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
33
33
  /**
34
34
  * @description Get the margin manager IDs for a given owner
35
35
  * @param {string} owner The owner address
36
36
  * @returns A function that takes a Transaction object
37
37
  */
38
- getMarginManagerIds: (owner: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
38
+ getMarginManagerIds: (owner: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
39
39
  /**
40
40
  * @description Get the base margin pool ID for a deepbook pool
41
41
  * @param {string} poolKey The key to identify the pool
42
42
  * @returns A function that takes a Transaction object
43
43
  */
44
- baseMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
44
+ baseMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
45
45
  /**
46
46
  * @description Get the quote margin pool ID for a deepbook pool
47
47
  * @param {string} poolKey The key to identify the pool
48
48
  * @returns A function that takes a Transaction object
49
49
  */
50
- quoteMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
50
+ quoteMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
51
51
  /**
52
52
  * @description Get the minimum withdraw risk ratio for a deepbook pool
53
53
  * @param {string} poolKey The key to identify the pool
54
54
  * @returns A function that takes a Transaction object
55
55
  */
56
- minWithdrawRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
56
+ minWithdrawRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
57
57
  /**
58
58
  * @description Get the minimum borrow risk ratio for a deepbook pool
59
59
  * @param {string} poolKey The key to identify the pool
60
60
  * @returns A function that takes a Transaction object
61
61
  */
62
- minBorrowRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
62
+ minBorrowRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
63
63
  /**
64
64
  * @description Get the liquidation risk ratio for a deepbook pool
65
65
  * @param {string} poolKey The key to identify the pool
66
66
  * @returns A function that takes a Transaction object
67
67
  */
68
- liquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
68
+ liquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
69
69
  /**
70
70
  * @description Get the target liquidation risk ratio for a deepbook pool
71
71
  * @param {string} poolKey The key to identify the pool
72
72
  * @returns A function that takes a Transaction object
73
73
  */
74
- targetLiquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
74
+ targetLiquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
75
75
  /**
76
76
  * @description Get the user liquidation reward for a deepbook pool
77
77
  * @param {string} poolKey The key to identify the pool
78
78
  * @returns A function that takes a Transaction object
79
79
  */
80
- userLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
80
+ userLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
81
81
  /**
82
82
  * @description Get the pool liquidation reward for a deepbook pool
83
83
  * @param {string} poolKey The key to identify the pool
84
84
  * @returns A function that takes a Transaction object
85
85
  */
86
- poolLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
86
+ poolLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
87
87
  /**
88
88
  * @description Get all allowed maintainer cap IDs
89
89
  * @returns A function that takes a Transaction object
90
90
  */
91
- allowedMaintainers: () => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
91
+ allowedMaintainers: () => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
92
92
  /**
93
93
  * @description Get all allowed pause cap IDs
94
94
  * @returns A function that takes a Transaction object
95
95
  */
96
- allowedPauseCaps: () => (tx: Transaction) => _mysten_sui_transactions93.TransactionResult;
96
+ allowedPauseCaps: () => (tx: Transaction) => _mysten_sui_transactions91.TransactionResult;
97
97
  }
98
98
  //#endregion
99
99
  export { MarginRegistryContract };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@mysten/deepbook-v3",
3
3
  "author": "Mysten Labs <build@mystenlabs.com>",
4
4
  "description": "Sui Deepbook SDK",
5
- "version": "1.3.0",
5
+ "version": "1.3.2",
6
6
  "license": "Apache-2.0",
7
7
  "type": "module",
8
8
  "main": "./dist/index.mjs",
@@ -46,11 +46,11 @@
46
46
  "vite": "^8.0.5",
47
47
  "vitest": "^4.0.17",
48
48
  "wait-on": "^9.0.3",
49
- "@mysten/codegen": "^0.8.5",
50
- "@mysten/sui": "^2.15.0"
49
+ "@mysten/codegen": "^0.10.0",
50
+ "@mysten/sui": "^2.16.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "@mysten/sui": "^2.15.0"
53
+ "@mysten/sui": "^2.16.0"
54
54
  },
55
55
  "scripts": {
56
56
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
@@ -4,9 +4,9 @@
4
4
 
5
5
  /** Account module manages the account data for each user. */
6
6
 
7
- import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
7
+ import { MoveStruct, normalizeMoveArguments } from '../utils/index.js';
8
8
  import { bcs } from '@mysten/sui/bcs';
9
- import { type Transaction } from '@mysten/sui/transactions';
9
+ import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
10
10
  import * as vec_set from './deps/sui/vec_set.js';
11
11
  import * as balances from './balances.js';
12
12
  const $moduleName = '@deepbook/core::account';
@@ -27,11 +27,11 @@ export const Account = new MoveStruct({
27
27
  },
28
28
  });
29
29
  export interface OpenOrdersArguments {
30
- self: RawTransactionArgument<string>;
30
+ self: TransactionArgument;
31
31
  }
32
32
  export interface OpenOrdersOptions {
33
33
  package?: string;
34
- arguments: OpenOrdersArguments | [self: RawTransactionArgument<string>];
34
+ arguments: OpenOrdersArguments | [self: TransactionArgument];
35
35
  }
36
36
  export function openOrders(options: OpenOrdersOptions) {
37
37
  const packageAddress = options.package ?? '@deepbook/core';
@@ -46,11 +46,11 @@ export function openOrders(options: OpenOrdersOptions) {
46
46
  });
47
47
  }
48
48
  export interface TakerVolumeArguments {
49
- self: RawTransactionArgument<string>;
49
+ self: TransactionArgument;
50
50
  }
51
51
  export interface TakerVolumeOptions {
52
52
  package?: string;
53
- arguments: TakerVolumeArguments | [self: RawTransactionArgument<string>];
53
+ arguments: TakerVolumeArguments | [self: TransactionArgument];
54
54
  }
55
55
  export function takerVolume(options: TakerVolumeOptions) {
56
56
  const packageAddress = options.package ?? '@deepbook/core';
@@ -65,11 +65,11 @@ export function takerVolume(options: TakerVolumeOptions) {
65
65
  });
66
66
  }
67
67
  export interface MakerVolumeArguments {
68
- self: RawTransactionArgument<string>;
68
+ self: TransactionArgument;
69
69
  }
70
70
  export interface MakerVolumeOptions {
71
71
  package?: string;
72
- arguments: MakerVolumeArguments | [self: RawTransactionArgument<string>];
72
+ arguments: MakerVolumeArguments | [self: TransactionArgument];
73
73
  }
74
74
  export function makerVolume(options: MakerVolumeOptions) {
75
75
  const packageAddress = options.package ?? '@deepbook/core';
@@ -84,11 +84,11 @@ export function makerVolume(options: MakerVolumeOptions) {
84
84
  });
85
85
  }
86
86
  export interface TotalVolumeArguments {
87
- self: RawTransactionArgument<string>;
87
+ self: TransactionArgument;
88
88
  }
89
89
  export interface TotalVolumeOptions {
90
90
  package?: string;
91
- arguments: TotalVolumeArguments | [self: RawTransactionArgument<string>];
91
+ arguments: TotalVolumeArguments | [self: TransactionArgument];
92
92
  }
93
93
  export function totalVolume(options: TotalVolumeOptions) {
94
94
  const packageAddress = options.package ?? '@deepbook/core';
@@ -103,11 +103,11 @@ export function totalVolume(options: TotalVolumeOptions) {
103
103
  });
104
104
  }
105
105
  export interface ActiveStakeArguments {
106
- self: RawTransactionArgument<string>;
106
+ self: TransactionArgument;
107
107
  }
108
108
  export interface ActiveStakeOptions {
109
109
  package?: string;
110
- arguments: ActiveStakeArguments | [self: RawTransactionArgument<string>];
110
+ arguments: ActiveStakeArguments | [self: TransactionArgument];
111
111
  }
112
112
  export function activeStake(options: ActiveStakeOptions) {
113
113
  const packageAddress = options.package ?? '@deepbook/core';
@@ -122,11 +122,11 @@ export function activeStake(options: ActiveStakeOptions) {
122
122
  });
123
123
  }
124
124
  export interface InactiveStakeArguments {
125
- self: RawTransactionArgument<string>;
125
+ self: TransactionArgument;
126
126
  }
127
127
  export interface InactiveStakeOptions {
128
128
  package?: string;
129
- arguments: InactiveStakeArguments | [self: RawTransactionArgument<string>];
129
+ arguments: InactiveStakeArguments | [self: TransactionArgument];
130
130
  }
131
131
  export function inactiveStake(options: InactiveStakeOptions) {
132
132
  const packageAddress = options.package ?? '@deepbook/core';
@@ -141,11 +141,11 @@ export function inactiveStake(options: InactiveStakeOptions) {
141
141
  });
142
142
  }
143
143
  export interface CreatedProposalArguments {
144
- self: RawTransactionArgument<string>;
144
+ self: TransactionArgument;
145
145
  }
146
146
  export interface CreatedProposalOptions {
147
147
  package?: string;
148
- arguments: CreatedProposalArguments | [self: RawTransactionArgument<string>];
148
+ arguments: CreatedProposalArguments | [self: TransactionArgument];
149
149
  }
150
150
  export function createdProposal(options: CreatedProposalOptions) {
151
151
  const packageAddress = options.package ?? '@deepbook/core';
@@ -160,11 +160,11 @@ export function createdProposal(options: CreatedProposalOptions) {
160
160
  });
161
161
  }
162
162
  export interface VotedProposalArguments {
163
- self: RawTransactionArgument<string>;
163
+ self: TransactionArgument;
164
164
  }
165
165
  export interface VotedProposalOptions {
166
166
  package?: string;
167
- arguments: VotedProposalArguments | [self: RawTransactionArgument<string>];
167
+ arguments: VotedProposalArguments | [self: TransactionArgument];
168
168
  }
169
169
  export function votedProposal(options: VotedProposalOptions) {
170
170
  const packageAddress = options.package ?? '@deepbook/core';
@@ -179,11 +179,11 @@ export function votedProposal(options: VotedProposalOptions) {
179
179
  });
180
180
  }
181
181
  export interface SettledBalancesArguments {
182
- self: RawTransactionArgument<string>;
182
+ self: TransactionArgument;
183
183
  }
184
184
  export interface SettledBalancesOptions {
185
185
  package?: string;
186
- arguments: SettledBalancesArguments | [self: RawTransactionArgument<string>];
186
+ arguments: SettledBalancesArguments | [self: TransactionArgument];
187
187
  }
188
188
  export function settledBalances(options: SettledBalancesOptions) {
189
189
  const packageAddress = options.package ?? '@deepbook/core';
@@ -19,7 +19,7 @@ import {
19
19
  type RawTransactionArgument,
20
20
  } from '../utils/index.js';
21
21
  import { bcs } from '@mysten/sui/bcs';
22
- import { type Transaction } from '@mysten/sui/transactions';
22
+ import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
23
23
  import * as bag from './deps/sui/bag.js';
24
24
  import * as vec_set from './deps/sui/vec_set.js';
25
25
  import * as type_name from './deps/std/type_name.js';
@@ -699,13 +699,13 @@ export function getBalanceManagerReferralId(options: GetBalanceManagerReferralId
699
699
  }
700
700
  export interface ValidateProofArguments {
701
701
  balanceManager: RawTransactionArgument<string>;
702
- proof: RawTransactionArgument<string>;
702
+ proof: TransactionArgument;
703
703
  }
704
704
  export interface ValidateProofOptions {
705
705
  package?: string;
706
706
  arguments:
707
707
  | ValidateProofArguments
708
- | [balanceManager: RawTransactionArgument<string>, proof: RawTransactionArgument<string>];
708
+ | [balanceManager: RawTransactionArgument<string>, proof: TransactionArgument];
709
709
  }
710
710
  export function validateProof(options: ValidateProofOptions) {
711
711
  const packageAddress = options.package ?? '@deepbook/core';