@stablechain/sdk 0.1.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { Account, Transport, WalletClient, Address, BaseError } from 'viem';
2
2
 
3
+ interface EarnConfig {
4
+ /** MetaMorpho V2 vault address */
5
+ vault: string;
6
+ }
3
7
  interface StableConfig {
4
8
  /** Target network — defaults to Network.Mainnet */
5
9
  network?: Network;
@@ -11,6 +15,8 @@ interface StableConfig {
11
15
  transport?: Transport;
12
16
  /** Pre-configured viem WalletClient — takes precedence over account/transport. */
13
17
  walletClient?: WalletClient;
18
+ /** Earn (Morpho V2 vault) configuration — required to use stable.earn.* methods. */
19
+ earn?: EarnConfig;
14
20
  }
15
21
  /**
16
22
  * Unified result for transfer, bridge, and swap.
@@ -98,6 +104,181 @@ interface BridgeParams {
98
104
  /** Pre-fetched quote from quoteBridge() — skips the quote fetch when passed to bridge() */
99
105
  quote?: BridgeQuote;
100
106
  }
107
+ interface EarnDepositParams {
108
+ /** Amount of underlying assets to deposit (human-readable) */
109
+ amount: number;
110
+ /** Vault address — overrides the vault set in StableConfig. Required when using bulkDeposit across multiple vaults. */
111
+ vault?: string;
112
+ /** Underlying asset decimals — fetched on-chain if omitted */
113
+ tokenDecimals?: number;
114
+ /**
115
+ * Slippage tolerance as a decimal (e.g. 0.003 = 0.3%).
116
+ * Defaults to Morpho's built-in default (0.03%).
117
+ */
118
+ slippageTolerance?: number;
119
+ /** Deduplication key: if an operation with this key is already in flight, the same Promise is returned. */
120
+ idempotencyKey?: string;
121
+ /**
122
+ * Maximum fraction of the vault's idle liquidity that this deposit may consume (e.g. 0.8 = 80%).
123
+ * The SDK throws StableValidationError before sending the transaction if the amount exceeds the cap.
124
+ * Must be > 0 and ≤ 1. Omit to disable the check.
125
+ */
126
+ depositBuffer?: number;
127
+ }
128
+ interface EarnWithdrawParams {
129
+ /** Amount of underlying assets to withdraw (human-readable) */
130
+ amount: number;
131
+ /** Underlying asset decimals — fetched on-chain if omitted */
132
+ tokenDecimals?: number;
133
+ /** Deduplication key */
134
+ idempotencyKey?: string;
135
+ }
136
+ interface EarnRedeemParams {
137
+ /** Number of vault shares to redeem (human-readable, uses vault's share decimals) */
138
+ shares: number;
139
+ /** Vault share decimals — fetched on-chain if omitted */
140
+ shareDecimals?: number;
141
+ /** Deduplication key */
142
+ idempotencyKey?: string;
143
+ }
144
+ interface EarnResult {
145
+ txHash: string;
146
+ idempotencyKey?: string;
147
+ }
148
+ type BulkEarnResultItem = {
149
+ status: "fulfilled";
150
+ txHash: string;
151
+ vault?: string;
152
+ idempotencyKey?: string;
153
+ } | {
154
+ status: "rejected";
155
+ error: string;
156
+ vault?: string;
157
+ idempotencyKey?: string;
158
+ };
159
+ interface BulkEarnResult {
160
+ results: BulkEarnResultItem[];
161
+ /** Number of deposits that succeeded */
162
+ succeeded: number;
163
+ /** Number of deposits that failed */
164
+ failed: number;
165
+ idempotencyKey?: string;
166
+ }
167
+ interface BulkDepositOptions {
168
+ /** Batch-level deduplication key — if this batch is already in flight, the same Promise is returned. */
169
+ idempotencyKey?: string;
170
+ /**
171
+ * When true, the batch halts on the first failure and rejects.
172
+ * When false (default), all deposits are attempted and partial results are returned.
173
+ */
174
+ stopOnError?: boolean;
175
+ }
176
+ interface BulkWithdrawOptions {
177
+ /** Batch-level deduplication key — if this batch is already in flight, the same Promise is returned. */
178
+ idempotencyKey?: string;
179
+ /**
180
+ * When true, the batch halts on the first failure and rejects.
181
+ * When false (default), all withdrawals are attempted and partial results are returned.
182
+ */
183
+ stopOnError?: boolean;
184
+ }
185
+ /**
186
+ * A single adapter position to forcibly deallocate before a force withdraw/redeem.
187
+ * `amount` is in underlying asset units (human-readable).
188
+ * `marketParams` is required only for Morpho Blue market adapters; omit for vault adapters.
189
+ */
190
+ interface ForceDeallocation {
191
+ adapter: string;
192
+ amount: number;
193
+ marketParams?: {
194
+ loanToken: string;
195
+ collateralToken: string;
196
+ oracle: string;
197
+ irm: string;
198
+ /** LLTV scaled by WAD (1e18) */
199
+ lltv: bigint;
200
+ };
201
+ }
202
+ interface ForceWithdrawParams {
203
+ /** Amount of underlying assets to withdraw (human-readable) */
204
+ amount: number;
205
+ /** Underlying asset decimals — fetched on-chain if omitted */
206
+ tokenDecimals?: number;
207
+ /** Adapter positions to deallocate before the withdrawal */
208
+ deallocations: ForceDeallocation[];
209
+ /** Deduplication key */
210
+ idempotencyKey?: string;
211
+ }
212
+ interface ForceRedeemParams {
213
+ /** Number of vault shares to redeem (human-readable) */
214
+ shares: number;
215
+ /** Vault share decimals — fetched on-chain if omitted */
216
+ shareDecimals?: number;
217
+ /** Underlying asset decimals for deallocation amounts — fetched on-chain if omitted */
218
+ tokenDecimals?: number;
219
+ /** Adapter positions to deallocate before the redemption */
220
+ deallocations: ForceDeallocation[];
221
+ /** Deduplication key */
222
+ idempotencyKey?: string;
223
+ }
224
+ interface VaultYieldReward {
225
+ /** Reward token symbol (e.g. "MORPHO") */
226
+ symbol: string;
227
+ /** Reward token contract address */
228
+ address: string;
229
+ /** APR contribution from this reward token as a decimal (e.g. 0.02 = 2%) */
230
+ apr: number;
231
+ }
232
+ interface VaultYield {
233
+ /** Total net APY after all fees, including rewards, as a decimal (e.g. 0.05 = 5%) */
234
+ apy: number;
235
+ /** Native yield component — underlying market rates after fees, excluding reward boosts */
236
+ native: number;
237
+ /** Per-token reward boosts */
238
+ rewards: VaultYieldReward[];
239
+ /** Performance fee as a decimal (e.g. 0.1 = 10%) */
240
+ performanceFee: number;
241
+ /** Management fee as a decimal */
242
+ managementFee: number;
243
+ }
244
+ interface VaultPosition {
245
+ /** Raw vault share balance */
246
+ shares: bigint;
247
+ /** Human-readable share balance (shares formatted by shareDecimals) */
248
+ sharesFormatted: number;
249
+ /** Vault share token decimals */
250
+ shareDecimals: number;
251
+ /** Asset value of shares (human-readable) */
252
+ assets: number;
253
+ /** Underlying asset decimals */
254
+ tokenDecimals: number;
255
+ /** Underlying asset contract address */
256
+ assetAddress: string;
257
+ }
258
+ interface YieldPreview {
259
+ /** Expected yield over the period, in asset units (human-readable) */
260
+ projectedYield: number;
261
+ /** Annual percentage yield as a decimal (e.g. 0.05 = 5%) */
262
+ apy: number;
263
+ horizonDays: number;
264
+ }
265
+ interface WithdrawStatus {
266
+ /** True when the full amount can be withdrawn from idle vault liquidity immediately */
267
+ isInstant: boolean;
268
+ /** Instantly available liquidity in asset units (human-readable) */
269
+ availableLiquidity: number;
270
+ tokenDecimals: number;
271
+ }
272
+ interface StableReaderConfig {
273
+ /** Target network — defaults to Network.Mainnet */
274
+ network?: Network;
275
+ /** Optional RPC override */
276
+ rpc?: string;
277
+ /** Earn configuration — required for reader.earn.* methods */
278
+ earn?: EarnConfig;
279
+ /** Address of the user whose position to read */
280
+ address: string;
281
+ }
101
282
 
102
283
  interface StableClient {
103
284
  transfer(params: TransferParams): Promise<OperationResult>;
@@ -105,8 +286,36 @@ interface StableClient {
105
286
  bridge(params: BridgeParams): Promise<OperationResult>;
106
287
  quoteSwap(params: SwapParams): Promise<SwapQuote>;
107
288
  swap(params: SwapParams): Promise<OperationResult>;
289
+ earn: {
290
+ deposit(params: EarnDepositParams): Promise<EarnResult>;
291
+ bulkDeposit(items: EarnDepositParams[], options?: BulkDepositOptions): Promise<BulkEarnResult>;
292
+ withdraw(params: EarnWithdrawParams): Promise<EarnResult>;
293
+ bulkWithdraw(items: EarnWithdrawParams[], options?: BulkWithdrawOptions): Promise<BulkEarnResult>;
294
+ redeem(params: EarnRedeemParams): Promise<EarnResult>;
295
+ forceWithdraw(params: ForceWithdrawParams): Promise<EarnResult>;
296
+ forceRedeem(params: ForceRedeemParams): Promise<EarnResult>;
297
+ };
298
+ }
299
+ interface StableReader {
300
+ earn: {
301
+ /** Current net APY for the configured vault. */
302
+ getYield(): Promise<VaultYield>;
303
+ /** Current vault position (shares + asset value) for the configured user address. */
304
+ position(): Promise<VaultPosition>;
305
+ /** Projected yield over a given horizon, using Morpho's live net APY. */
306
+ preview(params: {
307
+ amount: number;
308
+ horizonDays: number;
309
+ }): Promise<YieldPreview>;
310
+ /** Whether a given withdrawal amount can be fulfilled instantly from idle liquidity. */
311
+ withdrawability(params: {
312
+ amount: number;
313
+ tokenDecimals?: number;
314
+ }): Promise<WithdrawStatus>;
315
+ };
108
316
  }
109
- declare function createStable({ network, rpc: rpcOverride, account, transport, walletClient, }: StableConfig): StableClient;
317
+ declare function createStable({ network, rpc: rpcOverride, account, transport, walletClient, earn: earnConfig, }: StableConfig): StableClient;
318
+ declare function createStableReader(config: StableReaderConfig): StableReader;
110
319
 
111
320
  interface ChainConfig {
112
321
  id: number;
@@ -117,6 +326,9 @@ interface ChainConfig {
117
326
  }
118
327
  declare const CHAIN_CONFIGS: Partial<Record<Chain, ChainConfig>>;
119
328
 
329
+ declare const STABLE_USDT_ADDRESS: Address;
330
+ declare const STABLE_VAULT_ADDRESS: Address;
331
+
120
332
  declare class StableError extends BaseError {
121
333
  }
122
334
  declare class StableValidationError extends StableError {
@@ -162,5 +374,16 @@ declare class StableNetworkError extends StableError {
162
374
  cause?: Error;
163
375
  });
164
376
  }
377
+ declare class StableBulkError extends StableError {
378
+ results: BulkEarnResultItem[];
379
+ succeeded: number;
380
+ failed: number;
381
+ constructor(args: {
382
+ shortMessage: string;
383
+ results: BulkEarnResultItem[];
384
+ succeeded: number;
385
+ failed: number;
386
+ });
387
+ }
165
388
 
166
- export { type BridgeParams, type BridgeQuote, CHAIN_CONFIGS, Chain, type ChainConfig, Network, type OperationResult, type StableClient, type StableConfig, StableError, StableNetworkError, StableQuoteError, StableTransactionError, StableValidationError, type SwapParams, type SwapQuote, type TransferParams, createStable };
389
+ export { type BridgeParams, type BridgeQuote, type BulkDepositOptions, type BulkEarnResult, type BulkEarnResultItem, type BulkWithdrawOptions, CHAIN_CONFIGS, Chain, type ChainConfig, type EarnConfig, type EarnDepositParams, type EarnRedeemParams, type EarnResult, type EarnWithdrawParams, type ForceDeallocation, type ForceRedeemParams, type ForceWithdrawParams, Network, type OperationResult, STABLE_USDT_ADDRESS, STABLE_VAULT_ADDRESS, StableBulkError, type StableClient, type StableConfig, StableError, StableNetworkError, StableQuoteError, type StableReader, type StableReaderConfig, StableTransactionError, StableValidationError, type SwapParams, type SwapQuote, type TransferParams, type VaultPosition, type VaultYield, type VaultYieldReward, type WithdrawStatus, type YieldPreview, createStable, createStableReader };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { Account, Transport, WalletClient, Address, BaseError } from 'viem';
2
2
 
3
+ interface EarnConfig {
4
+ /** MetaMorpho V2 vault address */
5
+ vault: string;
6
+ }
3
7
  interface StableConfig {
4
8
  /** Target network — defaults to Network.Mainnet */
5
9
  network?: Network;
@@ -11,6 +15,8 @@ interface StableConfig {
11
15
  transport?: Transport;
12
16
  /** Pre-configured viem WalletClient — takes precedence over account/transport. */
13
17
  walletClient?: WalletClient;
18
+ /** Earn (Morpho V2 vault) configuration — required to use stable.earn.* methods. */
19
+ earn?: EarnConfig;
14
20
  }
15
21
  /**
16
22
  * Unified result for transfer, bridge, and swap.
@@ -98,6 +104,181 @@ interface BridgeParams {
98
104
  /** Pre-fetched quote from quoteBridge() — skips the quote fetch when passed to bridge() */
99
105
  quote?: BridgeQuote;
100
106
  }
107
+ interface EarnDepositParams {
108
+ /** Amount of underlying assets to deposit (human-readable) */
109
+ amount: number;
110
+ /** Vault address — overrides the vault set in StableConfig. Required when using bulkDeposit across multiple vaults. */
111
+ vault?: string;
112
+ /** Underlying asset decimals — fetched on-chain if omitted */
113
+ tokenDecimals?: number;
114
+ /**
115
+ * Slippage tolerance as a decimal (e.g. 0.003 = 0.3%).
116
+ * Defaults to Morpho's built-in default (0.03%).
117
+ */
118
+ slippageTolerance?: number;
119
+ /** Deduplication key: if an operation with this key is already in flight, the same Promise is returned. */
120
+ idempotencyKey?: string;
121
+ /**
122
+ * Maximum fraction of the vault's idle liquidity that this deposit may consume (e.g. 0.8 = 80%).
123
+ * The SDK throws StableValidationError before sending the transaction if the amount exceeds the cap.
124
+ * Must be > 0 and ≤ 1. Omit to disable the check.
125
+ */
126
+ depositBuffer?: number;
127
+ }
128
+ interface EarnWithdrawParams {
129
+ /** Amount of underlying assets to withdraw (human-readable) */
130
+ amount: number;
131
+ /** Underlying asset decimals — fetched on-chain if omitted */
132
+ tokenDecimals?: number;
133
+ /** Deduplication key */
134
+ idempotencyKey?: string;
135
+ }
136
+ interface EarnRedeemParams {
137
+ /** Number of vault shares to redeem (human-readable, uses vault's share decimals) */
138
+ shares: number;
139
+ /** Vault share decimals — fetched on-chain if omitted */
140
+ shareDecimals?: number;
141
+ /** Deduplication key */
142
+ idempotencyKey?: string;
143
+ }
144
+ interface EarnResult {
145
+ txHash: string;
146
+ idempotencyKey?: string;
147
+ }
148
+ type BulkEarnResultItem = {
149
+ status: "fulfilled";
150
+ txHash: string;
151
+ vault?: string;
152
+ idempotencyKey?: string;
153
+ } | {
154
+ status: "rejected";
155
+ error: string;
156
+ vault?: string;
157
+ idempotencyKey?: string;
158
+ };
159
+ interface BulkEarnResult {
160
+ results: BulkEarnResultItem[];
161
+ /** Number of deposits that succeeded */
162
+ succeeded: number;
163
+ /** Number of deposits that failed */
164
+ failed: number;
165
+ idempotencyKey?: string;
166
+ }
167
+ interface BulkDepositOptions {
168
+ /** Batch-level deduplication key — if this batch is already in flight, the same Promise is returned. */
169
+ idempotencyKey?: string;
170
+ /**
171
+ * When true, the batch halts on the first failure and rejects.
172
+ * When false (default), all deposits are attempted and partial results are returned.
173
+ */
174
+ stopOnError?: boolean;
175
+ }
176
+ interface BulkWithdrawOptions {
177
+ /** Batch-level deduplication key — if this batch is already in flight, the same Promise is returned. */
178
+ idempotencyKey?: string;
179
+ /**
180
+ * When true, the batch halts on the first failure and rejects.
181
+ * When false (default), all withdrawals are attempted and partial results are returned.
182
+ */
183
+ stopOnError?: boolean;
184
+ }
185
+ /**
186
+ * A single adapter position to forcibly deallocate before a force withdraw/redeem.
187
+ * `amount` is in underlying asset units (human-readable).
188
+ * `marketParams` is required only for Morpho Blue market adapters; omit for vault adapters.
189
+ */
190
+ interface ForceDeallocation {
191
+ adapter: string;
192
+ amount: number;
193
+ marketParams?: {
194
+ loanToken: string;
195
+ collateralToken: string;
196
+ oracle: string;
197
+ irm: string;
198
+ /** LLTV scaled by WAD (1e18) */
199
+ lltv: bigint;
200
+ };
201
+ }
202
+ interface ForceWithdrawParams {
203
+ /** Amount of underlying assets to withdraw (human-readable) */
204
+ amount: number;
205
+ /** Underlying asset decimals — fetched on-chain if omitted */
206
+ tokenDecimals?: number;
207
+ /** Adapter positions to deallocate before the withdrawal */
208
+ deallocations: ForceDeallocation[];
209
+ /** Deduplication key */
210
+ idempotencyKey?: string;
211
+ }
212
+ interface ForceRedeemParams {
213
+ /** Number of vault shares to redeem (human-readable) */
214
+ shares: number;
215
+ /** Vault share decimals — fetched on-chain if omitted */
216
+ shareDecimals?: number;
217
+ /** Underlying asset decimals for deallocation amounts — fetched on-chain if omitted */
218
+ tokenDecimals?: number;
219
+ /** Adapter positions to deallocate before the redemption */
220
+ deallocations: ForceDeallocation[];
221
+ /** Deduplication key */
222
+ idempotencyKey?: string;
223
+ }
224
+ interface VaultYieldReward {
225
+ /** Reward token symbol (e.g. "MORPHO") */
226
+ symbol: string;
227
+ /** Reward token contract address */
228
+ address: string;
229
+ /** APR contribution from this reward token as a decimal (e.g. 0.02 = 2%) */
230
+ apr: number;
231
+ }
232
+ interface VaultYield {
233
+ /** Total net APY after all fees, including rewards, as a decimal (e.g. 0.05 = 5%) */
234
+ apy: number;
235
+ /** Native yield component — underlying market rates after fees, excluding reward boosts */
236
+ native: number;
237
+ /** Per-token reward boosts */
238
+ rewards: VaultYieldReward[];
239
+ /** Performance fee as a decimal (e.g. 0.1 = 10%) */
240
+ performanceFee: number;
241
+ /** Management fee as a decimal */
242
+ managementFee: number;
243
+ }
244
+ interface VaultPosition {
245
+ /** Raw vault share balance */
246
+ shares: bigint;
247
+ /** Human-readable share balance (shares formatted by shareDecimals) */
248
+ sharesFormatted: number;
249
+ /** Vault share token decimals */
250
+ shareDecimals: number;
251
+ /** Asset value of shares (human-readable) */
252
+ assets: number;
253
+ /** Underlying asset decimals */
254
+ tokenDecimals: number;
255
+ /** Underlying asset contract address */
256
+ assetAddress: string;
257
+ }
258
+ interface YieldPreview {
259
+ /** Expected yield over the period, in asset units (human-readable) */
260
+ projectedYield: number;
261
+ /** Annual percentage yield as a decimal (e.g. 0.05 = 5%) */
262
+ apy: number;
263
+ horizonDays: number;
264
+ }
265
+ interface WithdrawStatus {
266
+ /** True when the full amount can be withdrawn from idle vault liquidity immediately */
267
+ isInstant: boolean;
268
+ /** Instantly available liquidity in asset units (human-readable) */
269
+ availableLiquidity: number;
270
+ tokenDecimals: number;
271
+ }
272
+ interface StableReaderConfig {
273
+ /** Target network — defaults to Network.Mainnet */
274
+ network?: Network;
275
+ /** Optional RPC override */
276
+ rpc?: string;
277
+ /** Earn configuration — required for reader.earn.* methods */
278
+ earn?: EarnConfig;
279
+ /** Address of the user whose position to read */
280
+ address: string;
281
+ }
101
282
 
102
283
  interface StableClient {
103
284
  transfer(params: TransferParams): Promise<OperationResult>;
@@ -105,8 +286,36 @@ interface StableClient {
105
286
  bridge(params: BridgeParams): Promise<OperationResult>;
106
287
  quoteSwap(params: SwapParams): Promise<SwapQuote>;
107
288
  swap(params: SwapParams): Promise<OperationResult>;
289
+ earn: {
290
+ deposit(params: EarnDepositParams): Promise<EarnResult>;
291
+ bulkDeposit(items: EarnDepositParams[], options?: BulkDepositOptions): Promise<BulkEarnResult>;
292
+ withdraw(params: EarnWithdrawParams): Promise<EarnResult>;
293
+ bulkWithdraw(items: EarnWithdrawParams[], options?: BulkWithdrawOptions): Promise<BulkEarnResult>;
294
+ redeem(params: EarnRedeemParams): Promise<EarnResult>;
295
+ forceWithdraw(params: ForceWithdrawParams): Promise<EarnResult>;
296
+ forceRedeem(params: ForceRedeemParams): Promise<EarnResult>;
297
+ };
298
+ }
299
+ interface StableReader {
300
+ earn: {
301
+ /** Current net APY for the configured vault. */
302
+ getYield(): Promise<VaultYield>;
303
+ /** Current vault position (shares + asset value) for the configured user address. */
304
+ position(): Promise<VaultPosition>;
305
+ /** Projected yield over a given horizon, using Morpho's live net APY. */
306
+ preview(params: {
307
+ amount: number;
308
+ horizonDays: number;
309
+ }): Promise<YieldPreview>;
310
+ /** Whether a given withdrawal amount can be fulfilled instantly from idle liquidity. */
311
+ withdrawability(params: {
312
+ amount: number;
313
+ tokenDecimals?: number;
314
+ }): Promise<WithdrawStatus>;
315
+ };
108
316
  }
109
- declare function createStable({ network, rpc: rpcOverride, account, transport, walletClient, }: StableConfig): StableClient;
317
+ declare function createStable({ network, rpc: rpcOverride, account, transport, walletClient, earn: earnConfig, }: StableConfig): StableClient;
318
+ declare function createStableReader(config: StableReaderConfig): StableReader;
110
319
 
111
320
  interface ChainConfig {
112
321
  id: number;
@@ -117,6 +326,9 @@ interface ChainConfig {
117
326
  }
118
327
  declare const CHAIN_CONFIGS: Partial<Record<Chain, ChainConfig>>;
119
328
 
329
+ declare const STABLE_USDT_ADDRESS: Address;
330
+ declare const STABLE_VAULT_ADDRESS: Address;
331
+
120
332
  declare class StableError extends BaseError {
121
333
  }
122
334
  declare class StableValidationError extends StableError {
@@ -162,5 +374,16 @@ declare class StableNetworkError extends StableError {
162
374
  cause?: Error;
163
375
  });
164
376
  }
377
+ declare class StableBulkError extends StableError {
378
+ results: BulkEarnResultItem[];
379
+ succeeded: number;
380
+ failed: number;
381
+ constructor(args: {
382
+ shortMessage: string;
383
+ results: BulkEarnResultItem[];
384
+ succeeded: number;
385
+ failed: number;
386
+ });
387
+ }
165
388
 
166
- export { type BridgeParams, type BridgeQuote, CHAIN_CONFIGS, Chain, type ChainConfig, Network, type OperationResult, type StableClient, type StableConfig, StableError, StableNetworkError, StableQuoteError, StableTransactionError, StableValidationError, type SwapParams, type SwapQuote, type TransferParams, createStable };
389
+ export { type BridgeParams, type BridgeQuote, type BulkDepositOptions, type BulkEarnResult, type BulkEarnResultItem, type BulkWithdrawOptions, CHAIN_CONFIGS, Chain, type ChainConfig, type EarnConfig, type EarnDepositParams, type EarnRedeemParams, type EarnResult, type EarnWithdrawParams, type ForceDeallocation, type ForceRedeemParams, type ForceWithdrawParams, Network, type OperationResult, STABLE_USDT_ADDRESS, STABLE_VAULT_ADDRESS, StableBulkError, type StableClient, type StableConfig, StableError, StableNetworkError, StableQuoteError, type StableReader, type StableReaderConfig, StableTransactionError, StableValidationError, type SwapParams, type SwapQuote, type TransferParams, type VaultPosition, type VaultYield, type VaultYieldReward, type WithdrawStatus, type YieldPreview, createStable, createStableReader };