@omnipair/dusk-sdk 2.0.2 → 2.16.0-next.20261102

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 (187) hide show
  1. package/README.md +1011 -16
  2. package/dist/amounts.d.ts +9 -0
  3. package/dist/amounts.d.ts.map +1 -0
  4. package/dist/amounts.js +10 -0
  5. package/dist/amounts.js.map +1 -0
  6. package/dist/constants.d.ts +71 -14
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +155 -28
  9. package/dist/constants.js.map +1 -1
  10. package/dist/delegate.d.ts +94 -0
  11. package/dist/delegate.d.ts.map +1 -0
  12. package/dist/delegate.js +131 -0
  13. package/dist/delegate.js.map +1 -0
  14. package/dist/dusk.d.ts +14 -0
  15. package/dist/dusk.d.ts.map +1 -1
  16. package/dist/dusk.js +22 -0
  17. package/dist/dusk.js.map +1 -1
  18. package/dist/get.d.ts +3253 -378
  19. package/dist/get.d.ts.map +1 -1
  20. package/dist/get.js +130 -70
  21. package/dist/get.js.map +1 -1
  22. package/dist/governance-client.d.ts +169 -0
  23. package/dist/governance-client.d.ts.map +1 -0
  24. package/dist/governance-client.js +146 -0
  25. package/dist/governance-client.js.map +1 -0
  26. package/dist/governance.d.ts +313 -0
  27. package/dist/governance.d.ts.map +1 -0
  28. package/dist/governance.js +902 -0
  29. package/dist/governance.js.map +1 -0
  30. package/dist/hash.d.ts +9 -0
  31. package/dist/hash.d.ts.map +1 -0
  32. package/dist/hash.js +16 -0
  33. package/dist/hash.js.map +1 -0
  34. package/dist/hlp-liquidation-client.d.ts +106 -0
  35. package/dist/hlp-liquidation-client.d.ts.map +1 -0
  36. package/dist/hlp-liquidation-client.js +150 -0
  37. package/dist/hlp-liquidation-client.js.map +1 -0
  38. package/dist/idl_delegate.d.ts +3 -0
  39. package/dist/idl_delegate.d.ts.map +1 -0
  40. package/dist/idl_delegate.js +3 -0
  41. package/dist/idl_delegate.js.map +1 -0
  42. package/dist/idl_delegate.json +6119 -0
  43. package/dist/idl_v2.json +17175 -5862
  44. package/dist/index.d.ts +23 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +23 -0
  47. package/dist/index.js.map +1 -1
  48. package/dist/interest-accounting.d.ts +49 -0
  49. package/dist/interest-accounting.d.ts.map +1 -0
  50. package/dist/interest-accounting.js +72 -0
  51. package/dist/interest-accounting.js.map +1 -0
  52. package/dist/leverage-actions.d.ts +122 -0
  53. package/dist/leverage-actions.d.ts.map +1 -0
  54. package/dist/leverage-actions.js +228 -0
  55. package/dist/leverage-actions.js.map +1 -0
  56. package/dist/leverage-margins.d.ts +12 -0
  57. package/dist/leverage-margins.d.ts.map +1 -0
  58. package/dist/leverage-margins.js +45 -0
  59. package/dist/leverage-margins.js.map +1 -0
  60. package/dist/leverage-preview.d.ts +587 -0
  61. package/dist/leverage-preview.d.ts.map +1 -0
  62. package/dist/leverage-preview.js +89 -0
  63. package/dist/leverage-preview.js.map +1 -0
  64. package/dist/liquidation-client.d.ts +230 -0
  65. package/dist/liquidation-client.d.ts.map +1 -0
  66. package/dist/liquidation-client.js +239 -0
  67. package/dist/liquidation-client.js.map +1 -0
  68. package/dist/liquidation.d.ts +78 -0
  69. package/dist/liquidation.d.ts.map +1 -0
  70. package/dist/liquidation.js +122 -0
  71. package/dist/liquidation.js.map +1 -0
  72. package/dist/lp-naming.d.ts +43 -0
  73. package/dist/lp-naming.d.ts.map +1 -0
  74. package/dist/lp-naming.js +81 -0
  75. package/dist/lp-naming.js.map +1 -0
  76. package/dist/lp-vanity.d.ts +33 -0
  77. package/dist/lp-vanity.d.ts.map +1 -0
  78. package/dist/lp-vanity.js +94 -0
  79. package/dist/lp-vanity.js.map +1 -0
  80. package/dist/market-bootstrap.d.ts +109 -0
  81. package/dist/market-bootstrap.d.ts.map +1 -0
  82. package/dist/market-bootstrap.js +158 -0
  83. package/dist/market-bootstrap.js.map +1 -0
  84. package/dist/market-launch.d.ts +45 -0
  85. package/dist/market-launch.d.ts.map +1 -0
  86. package/dist/market-launch.js +76 -0
  87. package/dist/market-launch.js.map +1 -0
  88. package/dist/oracle.d.ts +46 -0
  89. package/dist/oracle.d.ts.map +1 -0
  90. package/dist/oracle.js +103 -0
  91. package/dist/oracle.js.map +1 -0
  92. package/dist/preview.d.ts +39 -1
  93. package/dist/preview.d.ts.map +1 -1
  94. package/dist/preview.js +12 -0
  95. package/dist/preview.js.map +1 -1
  96. package/dist/protection.d.ts +48 -0
  97. package/dist/protection.d.ts.map +1 -0
  98. package/dist/protection.js +88 -0
  99. package/dist/protection.js.map +1 -0
  100. package/dist/risk-pricing.d.ts +14 -0
  101. package/dist/risk-pricing.d.ts.map +1 -0
  102. package/dist/risk-pricing.js +25 -0
  103. package/dist/risk-pricing.js.map +1 -0
  104. package/dist/simulation.d.ts +45 -0
  105. package/dist/simulation.d.ts.map +1 -0
  106. package/dist/simulation.js +106 -0
  107. package/dist/simulation.js.map +1 -0
  108. package/dist/tranche-client.d.ts +121 -0
  109. package/dist/tranche-client.d.ts.map +1 -0
  110. package/dist/tranche-client.js +185 -0
  111. package/dist/tranche-client.js.map +1 -0
  112. package/dist/transfer-fees.d.ts +46 -0
  113. package/dist/transfer-fees.d.ts.map +1 -0
  114. package/dist/transfer-fees.js +76 -0
  115. package/dist/transfer-fees.js.map +1 -0
  116. package/dist/type-aliases.d.ts +271 -31
  117. package/dist/type-aliases.d.ts.map +1 -1
  118. package/dist/types_delegate.d.ts +6126 -0
  119. package/dist/types_delegate.d.ts.map +1 -0
  120. package/dist/types_delegate.js +2 -0
  121. package/dist/types_delegate.js.map +1 -0
  122. package/dist/types_v2.d.ts +17235 -5922
  123. package/dist/types_v2.d.ts.map +1 -1
  124. package/dist/virtual-book/index.d.ts +4 -0
  125. package/dist/virtual-book/index.d.ts.map +1 -0
  126. package/dist/virtual-book/index.js +4 -0
  127. package/dist/virtual-book/index.js.map +1 -0
  128. package/dist/virtual-book/market.d.ts +608 -0
  129. package/dist/virtual-book/market.d.ts.map +1 -0
  130. package/dist/virtual-book/market.js +59 -0
  131. package/dist/virtual-book/market.js.map +1 -0
  132. package/dist/virtual-book/projection.d.ts +44 -0
  133. package/dist/virtual-book/projection.d.ts.map +1 -0
  134. package/dist/virtual-book/projection.js +229 -0
  135. package/dist/virtual-book/projection.js.map +1 -0
  136. package/dist/virtual-book/quotes.d.ts +1241 -0
  137. package/dist/virtual-book/quotes.d.ts.map +1 -0
  138. package/dist/virtual-book/quotes.js +233 -0
  139. package/dist/virtual-book/quotes.js.map +1 -0
  140. package/dist/write.d.ts +517 -1
  141. package/dist/write.d.ts.map +1 -1
  142. package/dist/write.js +1172 -23
  143. package/dist/write.js.map +1 -1
  144. package/dist/yield-client.d.ts +51 -0
  145. package/dist/yield-client.d.ts.map +1 -0
  146. package/dist/yield-client.js +98 -0
  147. package/dist/yield-client.js.map +1 -0
  148. package/package.json +9 -2
  149. package/src/amounts.ts +13 -0
  150. package/src/constants.ts +236 -26
  151. package/src/delegate.ts +238 -0
  152. package/src/dusk.ts +28 -0
  153. package/src/get.ts +247 -82
  154. package/src/governance-client.ts +234 -0
  155. package/src/governance.ts +1422 -0
  156. package/src/hash.ts +15 -0
  157. package/src/hlp-liquidation-client.ts +195 -0
  158. package/src/idl_delegate.json +6119 -0
  159. package/src/idl_delegate.ts +3 -0
  160. package/src/idl_v2.json +17175 -5862
  161. package/src/index.ts +31 -0
  162. package/src/interest-accounting.ts +85 -0
  163. package/src/leverage-actions.ts +216 -0
  164. package/src/leverage-margins.ts +48 -0
  165. package/src/leverage-preview.ts +86 -0
  166. package/src/liquidation-client.ts +297 -0
  167. package/src/liquidation.ts +137 -0
  168. package/src/lp-naming.ts +127 -0
  169. package/src/lp-vanity.ts +135 -0
  170. package/src/market-bootstrap.ts +273 -0
  171. package/src/market-launch.ts +103 -0
  172. package/src/oracle.ts +120 -0
  173. package/src/preview.ts +53 -1
  174. package/src/protection.ts +112 -0
  175. package/src/risk-pricing.ts +28 -0
  176. package/src/simulation.ts +169 -0
  177. package/src/tranche-client.ts +187 -0
  178. package/src/transfer-fees.ts +99 -0
  179. package/src/type-aliases.ts +280 -31
  180. package/src/types_delegate.ts +6125 -0
  181. package/src/types_v2.ts +17174 -5861
  182. package/src/virtual-book/index.ts +3 -0
  183. package/src/virtual-book/market.ts +76 -0
  184. package/src/virtual-book/projection.ts +265 -0
  185. package/src/virtual-book/quotes.ts +308 -0
  186. package/src/write.ts +2073 -34
  187. package/src/yield-client.ts +117 -0
package/dist/write.d.ts CHANGED
@@ -1,13 +1,19 @@
1
+ import { type OraclePolicyInput } from "./oracle.js";
1
2
  import type { Program } from "@coral-xyz/anchor";
2
- import { Transaction, type AccountMeta, type TransactionInstruction } from "@solana/web3.js";
3
+ import { Transaction, type AccountMeta, type PublicKey, type TransactionInstruction } from "@solana/web3.js";
3
4
  import { type AddressLike } from "./address.js";
5
+ import { type MarketLaunchConfig } from "./market-bootstrap.js";
6
+ import type { Market } from "./type-aliases.js";
4
7
  import { deriveReferralPartnerAddress, type YieldTokenKind } from "./constants.js";
8
+ import { type GovernanceIntegerLike, type ParameterUpdate, type ProposalMetadataV1 } from "./governance.js";
5
9
  import { type TransferHookTransfer } from "./referral.js";
6
10
  import type { Dusk } from "./types_v2.js";
7
11
  export type DuskInstructionName = Dusk["instructions"][number]["name"];
8
12
  export type DuskInstructionArgs = unknown[] | unknown | undefined;
9
13
  export type DuskAccounts = Record<string, unknown>;
10
14
  export interface DuskBuildOptions {
15
+ /** Explicit source policy for offline builders; async builders resolve it from the market. */
16
+ oraclePolicy?: OraclePolicyInput;
11
17
  accounts?: DuskAccounts;
12
18
  remainingAccounts?: AccountMeta[];
13
19
  }
@@ -15,6 +21,18 @@ export interface SwapBuildOptions extends DuskBuildOptions {
15
21
  accounts: DuskAccounts;
16
22
  market: AddressLike;
17
23
  }
24
+ export interface FortifyMarketParams {
25
+ donor: AddressLike;
26
+ market: AddressLike;
27
+ asset: "base" | "quote";
28
+ assetMint: AddressLike;
29
+ /** Gross donation in raw token atoms; transfer fees reduce insurance credit. */
30
+ amount: GovernanceIntegerLike;
31
+ /** Defaults to the donor's ATA for the asset's token program. */
32
+ donorAssetAccount?: AddressLike;
33
+ /** Supply the mint owner to avoid an RPC read when building the instruction. */
34
+ assetTokenProgram?: AddressLike;
35
+ }
18
36
  export type ReferredActionName = "borrow" | "openLeverage";
19
37
  export interface ReferredActionOptions extends DuskBuildOptions {
20
38
  accounts: DuskAccounts;
@@ -47,9 +65,70 @@ export interface HlpLiquidityBuild {
47
65
  actionInstruction: TransactionInstruction;
48
66
  transaction: Transaction;
49
67
  }
68
+ export interface GovernanceMarketAccountOverrides {
69
+ ylpMint?: AddressLike;
70
+ baseHlpYlpVault?: AddressLike;
71
+ quoteHlpYlpVault?: AddressLike;
72
+ }
73
+ export interface GovernanceHolderAccountOverrides extends GovernanceMarketAccountOverrides {
74
+ holderYlpAccount?: AddressLike;
75
+ baseYieldAccount?: AddressLike;
76
+ quoteYieldAccount?: AddressLike;
77
+ }
78
+ export interface CreateParameterProposalParams extends GovernanceHolderAccountOverrides {
79
+ proposer: AddressLike;
80
+ market: AddressLike;
81
+ nonce: GovernanceIntegerLike;
82
+ /**
83
+ * One to seven updates, at most one per family. They are sent in ascending
84
+ * family order and execute together under one sponsorship and one vote.
85
+ */
86
+ updates: readonly ParameterUpdate[];
87
+ metadata: ProposalMetadataV1;
88
+ initialSupport: GovernanceIntegerLike;
89
+ }
90
+ export interface SupportParameterProposalParams extends GovernanceHolderAccountOverrides {
91
+ supporter: AddressLike;
92
+ market: AddressLike;
93
+ proposal: AddressLike;
94
+ amount: GovernanceIntegerLike;
95
+ /**
96
+ * Digest of the proposal the supporter reviewed. The program rejects the
97
+ * support if the account at `proposal` holds a different proposal.
98
+ */
99
+ digest: Uint8Array | readonly number[];
100
+ }
101
+ export interface QueueParameterProposalParams extends GovernanceMarketAccountOverrides {
102
+ market: AddressLike;
103
+ proposal: AddressLike;
104
+ }
105
+ export interface ExecuteParameterProposalParams {
106
+ market: AddressLike;
107
+ proposal: AddressLike;
108
+ }
109
+ export interface WithdrawParameterSupportParams {
110
+ /** Omit to withdraw all support; otherwise release this many yLP atoms. */
111
+ amount?: GovernanceIntegerLike;
112
+ supporter: AddressLike;
113
+ market: AddressLike;
114
+ proposal: AddressLike;
115
+ /** The proposal's creator; receives its rent when the last supporter withdraws. */
116
+ proposer: AddressLike;
117
+ ylpMint?: AddressLike;
118
+ supporterYlpAccount?: AddressLike;
119
+ baseYieldAccount?: AddressLike;
120
+ quoteYieldAccount?: AddressLike;
121
+ }
122
+ export interface ParameterGovernanceBuild {
123
+ proposal: PublicKey;
124
+ proposalSupport?: PublicKey;
125
+ instruction: TransactionInstruction;
126
+ transaction: Transaction;
127
+ }
50
128
  type AnchorMethodBuilder = {
51
129
  accounts(accounts: DuskAccounts): AnchorMethodBuilder;
52
130
  remainingAccounts(accounts: AccountMeta[]): AnchorMethodBuilder;
131
+ preInstructions(instructions: TransactionInstruction[]): AnchorMethodBuilder;
53
132
  instruction(): Promise<TransactionInstruction>;
54
133
  transaction(): Promise<Transaction>;
55
134
  rpc(): Promise<string>;
@@ -57,15 +136,73 @@ type AnchorMethodBuilder = {
57
136
  export declare class DuskWrite {
58
137
  readonly program: Program<Dusk>;
59
138
  constructor(program: Program<Dusk>);
139
+ private fetchMarketAccount;
60
140
  method(name: DuskInstructionName, args?: DuskInstructionArgs): AnchorMethodBuilder;
61
141
  builder(name: DuskInstructionName, args?: DuskInstructionArgs, options?: DuskBuildOptions): AnchorMethodBuilder;
62
142
  instruction(name: DuskInstructionName, args?: DuskInstructionArgs, options?: DuskBuildOptions): Promise<TransactionInstruction>;
63
143
  transaction(name: DuskInstructionName, args?: DuskInstructionArgs, options?: DuskBuildOptions): Promise<Transaction>;
64
144
  rpc(name: DuskInstructionName, args?: DuskInstructionArgs, options?: DuskBuildOptions): Promise<string>;
145
+ private withOraclePolicy;
146
+ /**
147
+ * The hLP accounts an instruction must carry when hedged liquidity is live.
148
+ *
149
+ * Swap and openLeverage both require them, and their order is
150
+ * consensus-visible, so both take them from here rather than each assembling
151
+ * its own list.
152
+ */
153
+ /**
154
+ * The hLP settlement prefix an instruction must carry when the market has
155
+ * active hLP.
156
+ *
157
+ * Required by every leverage instruction that settles the market —
158
+ * open, close, increase and decrease — not only by open. Omitting it fails
159
+ * with `NotEnoughAccounts` at the point the program tries to read the
160
+ * prefix, which names neither leverage nor hLP and reads as a malformed
161
+ * call.
162
+ */
163
+ hlpRemainingAccounts(marketAddress: AddressLike, marketSnapshot?: Market): Promise<AccountMeta[]>;
65
164
  swapBuilder(args: Record<string, unknown>, options: SwapBuildOptions): Promise<AnchorMethodBuilder>;
66
165
  swapInstruction(args: Record<string, unknown>, options: SwapBuildOptions): Promise<TransactionInstruction>;
67
166
  swapTransaction(args: Record<string, unknown>, options: SwapBuildOptions): Promise<Transaction>;
68
167
  swapRpc(args: Record<string, unknown>, options: SwapBuildOptions): Promise<string>;
168
+ /**
169
+ * Swap, with accounts resolved from the market and the two mints.
170
+ *
171
+ * `swapInstruction` takes a prepared account map, which makes callers
172
+ * responsible for reconstructing the program's account set. This resolves it
173
+ * instead: reserve vaults derive from the market and mint, trader accounts
174
+ * default to the associated token account for the correct token program, and
175
+ * the hLP remaining-account prefix is still assembled by `swapBuilder`,
176
+ * whose ordering is consensus-visible.
177
+ */
178
+ buildSwapInstruction(params: SwapParams): Promise<TransactionInstruction>;
179
+ buildSwapTransaction(params: SwapParams): Promise<Transaction>;
180
+ /**
181
+ * Borrow against a position, with accounts resolved from the market and the
182
+ * two mints.
183
+ *
184
+ * The referral accounts are optional on chain and are omitted here: a borrow
185
+ * with no referrer should not have to name accounts it does not use. Use
186
+ * `referredBorrow` when a referrer is present.
187
+ */
188
+ buildBorrowInstruction(params: BorrowParams): Promise<TransactionInstruction>;
189
+ buildBorrowTransaction(params: BorrowParams): Promise<Transaction>;
190
+ /**
191
+ * Open a leverage position, with accounts resolved from the market, the
192
+ * position id and the two mints.
193
+ *
194
+ * Referral accounts are optional on chain and omitted here; use
195
+ * `referredOpenLeverage` when a referrer is present.
196
+ */
197
+ buildOpenLeverageInstruction(params: OpenLeverageParams): Promise<TransactionInstruction>;
198
+ buildOpenLeverageTransaction(params: OpenLeverageParams): Promise<Transaction>;
199
+ /**
200
+ * Delegate a leverage position to a program that may act on it, which is how
201
+ * conditional orders (take-profit, stop-loss) are authorised.
202
+ */
203
+ buildCreateLeverageDelegationInstruction(params: CreateLeverageDelegationParams): Promise<TransactionInstruction>;
204
+ buildCreateLeverageDelegationTransaction(params: CreateLeverageDelegationParams): Promise<Transaction>;
205
+ private buildSwapBuilder;
69
206
  initializeYieldAccountsInstruction(params: {
70
207
  payer: AddressLike;
71
208
  owner: AddressLike;
@@ -74,17 +211,111 @@ export declare class DuskWrite {
74
211
  baseMint: AddressLike;
75
212
  quoteMint: AddressLike;
76
213
  tokenKind: YieldTokenKind;
214
+ /** Supply the retired mint's cohort when initializing claims after rotation. */
215
+ retired?: boolean;
77
216
  }): Promise<TransactionInstruction>;
78
217
  initializeYieldAccountsTransaction(params: Parameters<DuskWrite["initializeYieldAccountsInstruction"]>[0]): Promise<Transaction>;
79
218
  initializeLpTransferHookInstruction(params: {
80
219
  payer: AddressLike;
81
220
  market: AddressLike;
82
221
  lpMint: AddressLike;
222
+ /** Pass this when composing market creation and hook setup in one transaction. */
223
+ tokenKind?: YieldTokenKind;
83
224
  }): Promise<TransactionInstruction>;
84
225
  initializeLpTransferHookTransaction(params: Parameters<DuskWrite["initializeLpTransferHookInstruction"]>[0]): Promise<Transaction>;
226
+ /**
227
+ * Bring a market into existence.
228
+ *
229
+ * The three LP mints must already exist and carry the Dusk transfer hook —
230
+ * see `createHookedLpMintInstructions`. Every PDA is derived here rather
231
+ * than left to Anchor, because the market address depends on `paramsHash`,
232
+ * which is an argument rather than an account, and the vaults hang off the
233
+ * market in turn.
234
+ *
235
+ * `teamTreasury` and its wrapped-SOL account come from the futarchy
236
+ * authority, which must already be initialized on the deployment.
237
+ */
238
+ initializeMarketInstruction(params: {
239
+ payer: AddressLike;
240
+ baseMint: AddressLike;
241
+ quoteMint: AddressLike;
242
+ ylpMint: AddressLike;
243
+ baseHlpMint: AddressLike;
244
+ quoteHlpMint: AddressLike;
245
+ teamTreasury: AddressLike;
246
+ teamTreasuryWsolAccount: AddressLike;
247
+ paramsHash: Uint8Array | Buffer | number[];
248
+ config: MarketLaunchConfig;
249
+ /** Installed atomically at creation. Omit or pass null for native pricing.
250
+ * Guided first liquidity derives its ratio from the validated current feed. */
251
+ oracle?: OraclePolicyInput | null;
252
+ /** Native launch-adapter price in NAD. Guided creation requires zero. */
253
+ bootstrapPriceNad?: GovernanceIntegerLike;
254
+ launchFeeProgressOffset?: number;
255
+ lpMetadata: {
256
+ ylp: {
257
+ name: string;
258
+ symbol: string;
259
+ uri: string;
260
+ };
261
+ baseHlp: {
262
+ name: string;
263
+ symbol: string;
264
+ uri: string;
265
+ };
266
+ quoteHlp: {
267
+ name: string;
268
+ symbol: string;
269
+ uri: string;
270
+ };
271
+ };
272
+ }): Promise<TransactionInstruction>;
273
+ initializeMarketTransaction(params: Parameters<DuskWrite["initializeMarketInstruction"]>[0]): Promise<Transaction>;
274
+ /**
275
+ * Donate to a market's insurance vault without receiving an LP claim.
276
+ * Does not fetch the market, so it can follow initialization in the same
277
+ * transaction. The program validates the selected side, mint and donor account.
278
+ */
279
+ fortifyMarketInstruction(params: FortifyMarketParams): Promise<TransactionInstruction>;
280
+ fortifyMarketTransaction(params: FortifyMarketParams): Promise<Transaction>;
281
+ /** Burn-lock initial direct-yLP support and create one immutable proposal over one or more families. */
282
+ createParameterProposal(params: CreateParameterProposalParams): Promise<ParameterGovernanceBuild>;
283
+ /** Add burn-locked direct-yLP support; crossing strict majority queues atomically. */
284
+ supportParameterProposal(params: SupportParameterProposalParams): Promise<ParameterGovernanceBuild>;
285
+ /** Permissionlessly queue after the denominator falls below already-locked support. */
286
+ queueParameterProposal(params: QueueParameterProposalParams): Promise<ParameterGovernanceBuild>;
287
+ /** Execute inside the 7-day window. Standalone oracle policies can restore
288
+ * pricing during distress; other updates retain utilization/health guards. */
289
+ executeParameterProposal(params: ExecuteParameterProposalParams): Promise<ParameterGovernanceBuild>;
290
+ /** Release all or part of direct support and credit earned yield to its owner. */
291
+ withdrawParameterSupport(params: WithdrawParameterSupportParams): Promise<ParameterGovernanceBuild>;
292
+ private governanceMarketState;
85
293
  hlpLiquidityAction(name: "depositSingleSided" | "withdrawSingleSided", args: Record<string, unknown>, options: HlpLiquidityBuildOptions): Promise<HlpLiquidityBuild>;
86
294
  depositSingleSided(args: Record<string, unknown>, options: HlpLiquidityBuildOptions): Promise<HlpLiquidityBuild>;
87
295
  withdrawSingleSided(args: Record<string, unknown>, options: HlpLiquidityBuildOptions): Promise<HlpLiquidityBuild>;
296
+ /** Begin a fresh hLP receipt cohort after the current vault has terminally closed. */
297
+ rotateHlpCohortInstruction(params: {
298
+ payer: AddressLike;
299
+ market: AddressLike;
300
+ oldHlpMint: AddressLike;
301
+ newHlpMint: AddressLike;
302
+ targetAsset: "base" | "quote";
303
+ metadata: {
304
+ name: string;
305
+ symbol: string;
306
+ uri: string;
307
+ };
308
+ }): Promise<TransactionInstruction>;
309
+ /** Burn old hLP receipts after terminal closure while preserving earned yield. */
310
+ burnRetiredHlpReceiptInstruction(params: {
311
+ market: AddressLike;
312
+ owner: AddressLike;
313
+ retiredMint: AddressLike;
314
+ baseMint: AddressLike;
315
+ quoteMint: AddressLike;
316
+ amount: GovernanceIntegerLike;
317
+ ownerHlpAccount?: AddressLike;
318
+ }): Promise<TransactionInstruction>;
88
319
  configureReferralPartnerInstruction(params: {
89
320
  authoritySigner: AddressLike;
90
321
  referrer: AddressLike;
@@ -120,6 +351,291 @@ export declare class DuskWrite {
120
351
  remainingAccounts?: AccountMeta[];
121
352
  }): Promise<TransactionInstruction>;
122
353
  claimReferralInterestTransaction(params: Parameters<DuskWrite["claimReferralInterestInstruction"]>[0]): Promise<Transaction>;
354
+ /**
355
+ * Deposit collateral into a borrow position, creating it when `positionId` is
356
+ * new. Callers pass amounts in raw base units.
357
+ */
358
+ depositCollateralInstruction(params: DepositCollateralParams): Promise<TransactionInstruction>;
359
+ /** Donate to an existing borrow position. `owner` is the token payer. */
360
+ donateCollateralInstruction(params: DepositCollateralParams): Promise<TransactionInstruction>;
361
+ /** Sweep both collateral balances and close a debt-free borrow position. */
362
+ withdrawAllCollateralInstruction(params: WithdrawAllCollateralParams): Promise<TransactionInstruction>;
363
+ /** Return all collateral after a complete leverage repayment and close the position. */
364
+ withdrawRepaidLeverageInstruction(params: WithdrawRepaidLeverageParams): Promise<TransactionInstruction>;
365
+ depositCollateralTransaction(params: DepositCollateralParams): Promise<Transaction>;
366
+ /**
367
+ * Withdraw collateral. `minAssetAmountOut` and `minLiquidationCfBps` are the
368
+ * caller's slippage and health floors; the program rejects the withdrawal
369
+ * rather than silently returning less.
370
+ */
371
+ withdrawCollateralInstruction(params: WithdrawCollateralParams): Promise<TransactionInstruction>;
372
+ withdrawCollateralTransaction(params: WithdrawCollateralParams): Promise<Transaction>;
373
+ /**
374
+ * Repay anyone’s borrowed debt using `owner`’s tokens, without collateral rights.
375
+ * Pass the wallet balance as `repayAmount` to clear a
376
+ * position; the program repays at most the outstanding debt.
377
+ */
378
+ repayInstruction(params: RepayParams): Promise<TransactionInstruction>;
379
+ repayTransaction(params: RepayParams): Promise<Transaction>;
380
+ /**
381
+ * Add balanced yLP liquidity. `minYlpAmount` is the caller's slippage floor;
382
+ * the program rejects the deposit rather than minting fewer shares.
383
+ */
384
+ addLiquidityInstruction(params: AddLiquidityParams): Promise<TransactionInstruction>;
385
+ addLiquidityTransaction(params: AddLiquidityParams): Promise<Transaction>;
386
+ /**
387
+ * Burn yLP for the underlying pair. Both minimums are enforced by the
388
+ * program, so a partially-filled withdrawal fails instead of silently
389
+ * returning less of one side.
390
+ */
391
+ removeLiquidityInstruction(params: RemoveLiquidityParams): Promise<TransactionInstruction>;
392
+ removeLiquidityTransaction(params: RemoveLiquidityParams): Promise<Transaction>;
393
+ /**
394
+ * Accounts shared by both balanced yLP instructions. Reserve vaults and yLP
395
+ * yield accounts derive from the market; token programs resolve per mint so
396
+ * a Token-2022 side needs no caller branching.
397
+ */
398
+ /** Borrow more against an open position and receive collateral. */
399
+ increaseLeverageInstruction(params: IncreaseLeverageParams): Promise<TransactionInstruction>;
400
+ /** Add debt-token equity and optional borrowing to the same position. */
401
+ addToLeverageInstruction(params: AddToLeverageParams): Promise<TransactionInstruction>;
402
+ addToLeverageTransaction(params: AddToLeverageParams): Promise<Transaction>;
403
+ private fundLeverageInstruction;
404
+ increaseLeverageTransaction(params: IncreaseLeverageParams): Promise<Transaction>;
405
+ /** Sell collateral to repay debt without closing the position. */
406
+ decreaseLeverageInstruction(params: DecreaseLeverageParams): Promise<TransactionInstruction>;
407
+ decreaseLeverageTransaction(params: DecreaseLeverageParams): Promise<Transaction>;
408
+ /** Repay anyone’s leverage debt from `owner`’s tokens; collateral stays with the position owner. */
409
+ addLeverageMarginInstruction(params: LeverageMarginParams): Promise<TransactionInstruction>;
410
+ /** Permissionless repayment without an unnecessary collateral-sale quote. */
411
+ repayLeverageInstruction(params: LeverageMarginParams): Promise<TransactionInstruction>;
412
+ private leverageRepaymentInstruction;
413
+ repayLeverageTransaction(params: LeverageMarginParams): Promise<Transaction>;
414
+ addLeverageMarginTransaction(params: LeverageMarginParams): Promise<Transaction>;
415
+ /**
416
+ * Owner-signed proportional partial/full close. Delegated closes use the delegate client.
417
+ */
418
+ closeLeverageInstruction(params: CloseLeverageParams, marketSnapshot?: Market): Promise<TransactionInstruction>;
419
+ closeLeverageTransaction(params: CloseLeverageParams): Promise<Transaction>;
420
+ /**
421
+ * Accounts shared across the leverage lifecycle. Individual builders pass
422
+ * through only the subset their instruction declares.
423
+ */
424
+ private resolveLeverageAccounts;
425
+ private resolveYlpAccounts;
426
+ }
427
+ /** Raw base-unit amount. Accepts bigint to keep callers off floating point. */
428
+ export type RawAmount = bigint | number | string;
429
+ interface LendingPositionAccounts {
430
+ market: AddressLike;
431
+ owner: AddressLike;
432
+ /** Beneficiary when a different wallet pays for this position. */
433
+ positionOwner?: AddressLike;
434
+ /** Position discriminator; the borrow position PDA derives from it. */
435
+ positionId: AddressLike;
436
+ borrowPosition?: AddressLike;
437
+ remainingAccounts?: AccountMeta[];
438
+ }
439
+ export interface DepositCollateralParams extends LendingPositionAccounts {
440
+ assetMint: AddressLike;
441
+ ownerAssetAccount: AddressLike;
442
+ depositAmount: RawAmount;
443
+ collateralVault?: AddressLike;
444
+ }
445
+ export interface WithdrawCollateralParams extends LendingPositionAccounts {
446
+ assetMint: AddressLike;
447
+ ownerAssetAccount: AddressLike;
448
+ withdrawAmount: RawAmount;
449
+ minAssetAmountOut: RawAmount;
450
+ /** Health floor enforced by the program, in basis points. */
451
+ minLiquidationCfBps: number;
452
+ collateralVault?: AddressLike;
453
+ }
454
+ export interface RepayParams extends LendingPositionAccounts {
455
+ debtAssetMint: AddressLike;
456
+ collateralAssetMint: AddressLike;
457
+ ownerDebtAccount: AddressLike;
458
+ repayAmount: RawAmount;
459
+ /** Omit when the position has no referrer. */
460
+ referralPartner?: AddressLike | null;
461
+ reserveVault?: AddressLike;
462
+ interestVault?: AddressLike;
463
+ }
464
+ /** Which side of the pair carries the debt. */
465
+ export type MarketAssetSide = "base" | "quote";
466
+ interface LeverageAccounts {
467
+ market: AddressLike;
468
+ positionOwner: AddressLike;
469
+ /** Position discriminator; the leverage position PDA derives from it. */
470
+ positionId: AddressLike;
471
+ debtMint: AddressLike;
472
+ collateralMint: AddressLike;
473
+ debtAsset: MarketAssetSide;
474
+ /** Signer when it differs from the position owner. */
475
+ owner?: AddressLike;
476
+ /** Signer that originally funded the position, if different from its owner. */
477
+ namespaceAuthority?: AddressLike;
478
+ leveragePosition?: AddressLike;
479
+ debtReserveVault?: AddressLike;
480
+ collateralReserveVault?: AddressLike;
481
+ debtInterestVault?: AddressLike;
482
+ leverageCollateralVault?: AddressLike;
483
+ referralPartner?: AddressLike | null;
484
+ remainingAccounts?: AccountMeta[];
485
+ }
486
+ export interface IncreaseLeverageParams extends LeverageAccounts {
487
+ debtAmount: RawAmount;
488
+ minCollateralOut: RawAmount;
489
+ }
490
+ export interface AddToLeverageParams extends IncreaseLeverageParams {
491
+ /** Gross wallet funding in the borrowed token. */
492
+ marginAmount: RawAmount;
493
+ ownerDebtAccount: AddressLike;
494
+ }
495
+ export interface DecreaseLeverageParams extends LeverageAccounts {
496
+ collateralAmount: RawAmount;
497
+ minRepayOut: RawAmount;
498
+ /** Owner-owned debt-token account for unused repayment output. */
499
+ ownerDebtAccount: AddressLike;
500
+ /** Gross surplus limit; defaults to zero. Use a bounded value for 1x rounding. */
501
+ maxSurplusOut?: RawAmount;
502
+ }
503
+ export interface LeverageMarginParams extends LeverageAccounts {
504
+ amount: RawAmount;
505
+ ownerDebtAccount: AddressLike;
506
+ }
507
+ export interface CloseLeverageParams extends LeverageAccounts {
508
+ /** Minimum net wallet payout after all transfer fees. */
509
+ minAmountOut: RawAmount;
510
+ /** Percentage of the entire position to remove. Default 10000 closes all. */
511
+ closeBps?: number;
512
+ /** Payout account owned by the position owner. */
513
+ ownerDebtAccount: AddressLike;
514
+ /** Required for delegated closes; the two accounts receive bounded fees. */
515
+ delegateFeeRecipient?: AddressLike | null;
516
+ delegateExecutorAccount?: AddressLike | null;
517
+ /** Delegated settlement; omit these for an owner-signed close. */
518
+ leverageDelegation?: AddressLike | null;
519
+ delegatedProgram?: AddressLike | null;
520
+ authority?: AddressLike;
521
+ }
522
+ interface YlpLiquidityAccounts {
523
+ market: AddressLike;
524
+ owner: AddressLike;
525
+ baseMint: AddressLike;
526
+ quoteMint: AddressLike;
527
+ ylpMint: AddressLike;
528
+ ownerBaseAccount: AddressLike;
529
+ ownerQuoteAccount: AddressLike;
530
+ ownerYlpAccount: AddressLike;
531
+ baseReserveVault?: AddressLike;
532
+ quoteReserveVault?: AddressLike;
533
+ baseYieldAccount?: AddressLike;
534
+ quoteYieldAccount?: AddressLike;
535
+ remainingAccounts?: AccountMeta[];
536
+ }
537
+ /** Which side of the market a leverage position borrows. */
538
+ export type LeverageDebtAsset = "base" | "quote";
539
+ /** Opening leverage funded in the debt asset; margin plus borrowing buys collateral. */
540
+ export interface OpenLeverageParams {
541
+ market: AddressLike;
542
+ owner: AddressLike;
543
+ positionId: AddressLike;
544
+ debtAsset: LeverageDebtAsset;
545
+ debtMint: AddressLike;
546
+ collateralMint: AddressLike;
547
+ marginAmount: RawAmount;
548
+ /** Leverage multiplier in basis points; 20000 is two times. */
549
+ multiplierBps: RawAmount;
550
+ minCollateralOut: RawAmount;
551
+ /** Zero means no limit price. */
552
+ limitPriceNad?: RawAmount;
553
+ payer?: AddressLike;
554
+ ownerDebtAccount?: AddressLike;
555
+ leveragePosition?: AddressLike;
556
+ debtReserveVault?: AddressLike;
557
+ collateralReserveVault?: AddressLike;
558
+ leverageCollateralVault?: AddressLike;
559
+ remainingAccounts?: AccountMeta[];
560
+ }
561
+ /** Authorising a program to act on a leverage position. */
562
+ export interface CreateLeverageDelegationParams {
563
+ market: AddressLike;
564
+ owner: AddressLike;
565
+ namespaceAuthority?: AddressLike;
566
+ positionId: AddressLike;
567
+ debtAsset: LeverageDebtAsset;
568
+ delegatedProgram: AddressLike;
569
+ /** Bit flags for the actions the delegate may perform. */
570
+ approvedActions: number;
571
+ leveragePosition?: AddressLike;
572
+ leverageDelegation?: AddressLike;
573
+ remainingAccounts?: AccountMeta[];
574
+ }
575
+ /** A borrow described by its market, position and mints. */
576
+ export interface BorrowParams {
577
+ market: AddressLike;
578
+ owner: AddressLike;
579
+ /** Position discriminator; the borrow position PDA derives from it. */
580
+ positionId: AddressLike;
581
+ debtAssetMint: AddressLike;
582
+ collateralAssetMint: AddressLike;
583
+ borrowAmount: RawAmount;
584
+ /** Slippage floor on the debt actually opened. */
585
+ minDebtAmountOut: RawAmount;
586
+ minLiquidationCfBps?: number;
587
+ ownerDebtAccount?: AddressLike;
588
+ reserveVault?: AddressLike;
589
+ borrowPosition?: AddressLike;
590
+ remainingAccounts?: AccountMeta[];
591
+ }
592
+ /** A swap described by its market and mints rather than by an account map. */
593
+ export interface SwapParams {
594
+ market: AddressLike;
595
+ trader: AddressLike;
596
+ assetInMint: AddressLike;
597
+ assetOutMint: AddressLike;
598
+ exactAssetIn: RawAmount;
599
+ /** Slippage floor; the program rejects a fill below it. */
600
+ minAssetOut: RawAmount;
601
+ traderAssetInAccount?: AddressLike;
602
+ traderAssetOutAccount?: AddressLike;
603
+ reserveInVault?: AddressLike;
604
+ reserveOutVault?: AddressLike;
605
+ remainingAccounts?: AccountMeta[];
606
+ }
607
+ export interface AddLiquidityParams extends YlpLiquidityAccounts {
608
+ /** Maximum gross spend. Guided first deposits pair at the current validated
609
+ * oracle price; unused amounts remain with the owner. Native seeding uses
610
+ * both amounts to establish the initial ratio. */
611
+ baseDepositAmount: RawAmount;
612
+ quoteDepositAmount: RawAmount;
613
+ /** Slippage floor on minted yLP shares. */
614
+ minYlpAmount: RawAmount;
615
+ }
616
+ export interface RemoveLiquidityParams extends YlpLiquidityAccounts {
617
+ ylpAmount: RawAmount;
618
+ minBaseAmountOut: RawAmount;
619
+ minQuoteAmountOut: RawAmount;
620
+ }
621
+ export interface WithdrawAllCollateralParams extends LendingPositionAccounts {
622
+ baseMint: AddressLike;
623
+ quoteMint: AddressLike;
624
+ ownerBaseAccount: AddressLike;
625
+ ownerQuoteAccount: AddressLike;
626
+ minBaseOut: RawAmount;
627
+ minQuoteOut: RawAmount;
628
+ }
629
+ export interface WithdrawRepaidLeverageParams {
630
+ market: AddressLike;
631
+ owner: AddressLike;
632
+ namespaceAuthority?: AddressLike;
633
+ positionId: AddressLike;
634
+ leveragePosition?: AddressLike;
635
+ collateralMint: AddressLike;
636
+ ownerCollateralAccount: AddressLike;
637
+ minCollateralOut: RawAmount;
638
+ remainingAccounts?: AccountMeta[];
123
639
  }
124
640
  export {};
125
641
  //# sourceMappingURL=write.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"write.d.ts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