@reflectmoney/stable.ts 1.1.1 → 1.1.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.
- package/package.json +1 -1
- package/dist/classes/PdaClient.d.ts +0 -131
- package/dist/classes/Reflect.d.ts +0 -7
- package/dist/classes/ReflectAdmin.d.ts +0 -104
- package/dist/classes/ReflectAdmin.js +0 -219
- package/dist/classes/ReflectKeeper.d.ts +0 -107
- package/dist/classes/ReflectTokenisedBond.d.ts +0 -75
- package/dist/classes/Stablecoin.d.ts +0 -187
- package/dist/classes/index.d.ts +0 -4
- package/dist/constants/drift.d.ts +0 -6
- package/dist/constants/index.d.ts +0 -7
- package/dist/constants/jupiter.d.ts +0 -4
- package/dist/constants/lookupTables.d.ts +0 -4
- package/dist/constants/lst.d.ts +0 -3
- package/dist/constants/pyth.d.ts +0 -1
- package/dist/constants/usdc.d.ts +0 -6
- package/dist/constants/wsol.d.ts +0 -6
- package/dist/errors/ReflectError.d.ts +0 -4
- package/dist/generated/reflect_main/accounts/DriftJlpController.d.ts +0 -116
- package/dist/generated/reflect_main/accounts/DriftLstController.d.ts +0 -110
- package/dist/generated/reflect_main/accounts/DriftUsdcController.d.ts +0 -136
- package/dist/generated/reflect_main/accounts/Main.d.ts +0 -112
- package/dist/generated/reflect_main/accounts/PerpMarket.d.ts +0 -228
- package/dist/generated/reflect_main/accounts/PrelaunchOracle.d.ts +0 -132
- package/dist/generated/reflect_main/accounts/PythLazerOracle.d.ts +0 -126
- package/dist/generated/reflect_main/accounts/RebalanceLst.d.ts +0 -113
- package/dist/generated/reflect_main/accounts/SpotMarket.d.ts +0 -379
- package/dist/generated/reflect_main/accounts/User.d.ts +0 -223
- package/dist/generated/reflect_main/accounts/UserPermissions.d.ts +0 -108
- package/dist/generated/reflect_main/accounts/UserStats.d.ts +0 -213
- package/dist/generated/reflect_main/accounts/index.d.ts +0 -38
- package/dist/generated/reflect_main/errors/index.d.ts +0 -969
- package/dist/generated/reflect_main/index.d.ts +0 -19
- package/dist/generated/reflect_main/instructions/addLstDrift.d.ts +0 -49
- package/dist/generated/reflect_main/instructions/addSubAccount.d.ts +0 -54
- package/dist/generated/reflect_main/instructions/captureSpreadDrift.d.ts +0 -66
- package/dist/generated/reflect_main/instructions/captureSpreadDriftS1.d.ts +0 -58
- package/dist/generated/reflect_main/instructions/createAdminAccount.d.ts +0 -51
- package/dist/generated/reflect_main/instructions/createUserStatsAccount.d.ts +0 -52
- package/dist/generated/reflect_main/instructions/depositDrift.d.ts +0 -73
- package/dist/generated/reflect_main/instructions/freezeProgram.d.ts +0 -54
- package/dist/generated/reflect_main/instructions/freezeProtocolAction.d.ts +0 -55
- package/dist/generated/reflect_main/instructions/freezeStrategyAction.d.ts +0 -58
- package/dist/generated/reflect_main/instructions/index.d.ts +0 -34
- package/dist/generated/reflect_main/instructions/initDriftAccountsS1.d.ts +0 -54
- package/dist/generated/reflect_main/instructions/initDriftControllerS1.d.ts +0 -60
- package/dist/generated/reflect_main/instructions/initDriftControllerS3.d.ts +0 -58
- package/dist/generated/reflect_main/instructions/initMain.d.ts +0 -43
- package/dist/generated/reflect_main/instructions/mintDriftS1.d.ts +0 -86
- package/dist/generated/reflect_main/instructions/mintDriftS3.d.ts +0 -86
- package/dist/generated/reflect_main/instructions/processSwapDeposit.d.ts +0 -69
- package/dist/generated/reflect_main/instructions/processSwapWithdraw.d.ts +0 -69
- package/dist/generated/reflect_main/instructions/redeemDriftS1.d.ts +0 -87
- package/dist/generated/reflect_main/instructions/redeemDriftS3.d.ts +0 -87
- package/dist/generated/reflect_main/instructions/settlePnl.d.ts +0 -55
- package/dist/generated/reflect_main/instructions/settlePnlMulti.d.ts +0 -65
- package/dist/generated/reflect_main/instructions/suspendSplProtocol.d.ts +0 -54
- package/dist/generated/reflect_main/instructions/suspendSplStrategy.d.ts +0 -56
- package/dist/generated/reflect_main/instructions/swapOrca.d.ts +0 -81
- package/dist/generated/reflect_main/instructions/swapOrcaTwoHop.d.ts +0 -101
- package/dist/generated/reflect_main/instructions/updateActionRoleProtocol.d.ts +0 -58
- package/dist/generated/reflect_main/instructions/updateActionRoleStrategy.d.ts +0 -60
- package/dist/generated/reflect_main/instructions/updateAttenuation.d.ts +0 -57
- package/dist/generated/reflect_main/instructions/updateCap.d.ts +0 -55
- package/dist/generated/reflect_main/instructions/updateRebalanceSlippage.d.ts +0 -55
- package/dist/generated/reflect_main/instructions/updateRecipients.d.ts +0 -56
- package/dist/generated/reflect_main/instructions/updateRoleHolderProtocol.d.ts +0 -60
- package/dist/generated/reflect_main/instructions/updateRoleHolderStrategy.d.ts +0 -60
- package/dist/generated/reflect_main/types/AMM.d.ts +0 -102
- package/dist/generated/reflect_main/types/AccKey.d.ts +0 -15
- package/dist/generated/reflect_main/types/AccessControl.d.ts +0 -18
- package/dist/generated/reflect_main/types/AccessMap.d.ts +0 -17
- package/dist/generated/reflect_main/types/Action.d.ts +0 -35
- package/dist/generated/reflect_main/types/ActionMapping.d.ts +0 -19
- package/dist/generated/reflect_main/types/AssetTier.d.ts +0 -23
- package/dist/generated/reflect_main/types/Attenuation.d.ts +0 -16
- package/dist/generated/reflect_main/types/BalanceType.d.ts +0 -20
- package/dist/generated/reflect_main/types/Capture.d.ts +0 -17
- package/dist/generated/reflect_main/types/ContractTier.d.ts +0 -24
- package/dist/generated/reflect_main/types/ContractType.d.ts +0 -20
- package/dist/generated/reflect_main/types/CorpAction.d.ts +0 -19
- package/dist/generated/reflect_main/types/CustodyInfo.d.ts +0 -20
- package/dist/generated/reflect_main/types/DirectionCollateral.d.ts +0 -20
- package/dist/generated/reflect_main/types/DirectionPosition.d.ts +0 -20
- package/dist/generated/reflect_main/types/DriftControllerBase.d.ts +0 -15
- package/dist/generated/reflect_main/types/DriftJlpControllerFixedAccounts.d.ts +0 -18
- package/dist/generated/reflect_main/types/DriftLstData.d.ts +0 -17
- package/dist/generated/reflect_main/types/Ema.d.ts +0 -17
- package/dist/generated/reflect_main/types/Externals.d.ts +0 -16
- package/dist/generated/reflect_main/types/FlowControl.d.ts +0 -17
- package/dist/generated/reflect_main/types/HistoricalIndexData.d.ts +0 -19
- package/dist/generated/reflect_main/types/HistoricalOracleData.d.ts +0 -20
- package/dist/generated/reflect_main/types/Holding.d.ts +0 -21
- package/dist/generated/reflect_main/types/Holdings.d.ts +0 -17
- package/dist/generated/reflect_main/types/InsuranceClaim.d.ts +0 -19
- package/dist/generated/reflect_main/types/InsuranceFund.d.ts +0 -24
- package/dist/generated/reflect_main/types/JlpRebalanceSettings.d.ts +0 -15
- package/dist/generated/reflect_main/types/KillSwitch.d.ts +0 -15
- package/dist/generated/reflect_main/types/LevelRoles.d.ts +0 -16
- package/dist/generated/reflect_main/types/MarketStatus.d.ts +0 -27
- package/dist/generated/reflect_main/types/MarketType.d.ts +0 -20
- package/dist/generated/reflect_main/types/ModifyOrderParams.d.ts +0 -32
- package/dist/generated/reflect_main/types/ModifyOrderPolicy.d.ts +0 -20
- package/dist/generated/reflect_main/types/Movements.d.ts +0 -19
- package/dist/generated/reflect_main/types/OracleGuardRails.d.ts +0 -18
- package/dist/generated/reflect_main/types/OracleSource.d.ts +0 -34
- package/dist/generated/reflect_main/types/OracleValidity.d.ts +0 -25
- package/dist/generated/reflect_main/types/Order.d.ts +0 -43
- package/dist/generated/reflect_main/types/OrderDirection.d.ts +0 -20
- package/dist/generated/reflect_main/types/OrderParams.d.ts +0 -36
- package/dist/generated/reflect_main/types/OrderStatus.d.ts +0 -22
- package/dist/generated/reflect_main/types/OrderTriggerCondition.d.ts +0 -22
- package/dist/generated/reflect_main/types/OrderType.d.ts +0 -23
- package/dist/generated/reflect_main/types/PermissionLevel.d.ts +0 -51
- package/dist/generated/reflect_main/types/PerpHedge.d.ts +0 -17
- package/dist/generated/reflect_main/types/PerpPosition.d.ts +0 -29
- package/dist/generated/reflect_main/types/PoolBalance.d.ts +0 -17
- package/dist/generated/reflect_main/types/Position.d.ts +0 -20
- package/dist/generated/reflect_main/types/PositionDirection.d.ts +0 -20
- package/dist/generated/reflect_main/types/PositionDrift.d.ts +0 -18
- package/dist/generated/reflect_main/types/PostOnlyParam.d.ts +0 -22
- package/dist/generated/reflect_main/types/Price.d.ts +0 -41
- package/dist/generated/reflect_main/types/PriceComp.d.ts +0 -19
- package/dist/generated/reflect_main/types/PriceDivergenceGuardRails.d.ts +0 -16
- package/dist/generated/reflect_main/types/PriceInfo.d.ts +0 -21
- package/dist/generated/reflect_main/types/PriceStatus.d.ts +0 -22
- package/dist/generated/reflect_main/types/PriceType.d.ts +0 -20
- package/dist/generated/reflect_main/types/Program.d.ts +0 -19
- package/dist/generated/reflect_main/types/ProgramStatus.d.ts +0 -20
- package/dist/generated/reflect_main/types/Recipient.d.ts +0 -17
- package/dist/generated/reflect_main/types/Recipients.d.ts +0 -17
- package/dist/generated/reflect_main/types/Role.d.ts +0 -25
- package/dist/generated/reflect_main/types/ShiftCollateral.d.ts +0 -19
- package/dist/generated/reflect_main/types/ShiftPosition.d.ts +0 -17
- package/dist/generated/reflect_main/types/ShortHolding.d.ts +0 -17
- package/dist/generated/reflect_main/types/SplBase.d.ts +0 -17
- package/dist/generated/reflect_main/types/SplMain.d.ts +0 -22
- package/dist/generated/reflect_main/types/Spls.d.ts +0 -17
- package/dist/generated/reflect_main/types/SpotBalanceType.d.ts +0 -20
- package/dist/generated/reflect_main/types/SpotPosition.d.ts +0 -23
- package/dist/generated/reflect_main/types/Status.d.ts +0 -21
- package/dist/generated/reflect_main/types/Strategy.d.ts +0 -32
- package/dist/generated/reflect_main/types/StrategyPadding.d.ts +0 -15
- package/dist/generated/reflect_main/types/StrategyRoleEntry.d.ts +0 -17
- package/dist/generated/reflect_main/types/SubAccount.d.ts +0 -17
- package/dist/generated/reflect_main/types/Update.d.ts +0 -20
- package/dist/generated/reflect_main/types/UserFees.d.ts +0 -20
- package/dist/generated/reflect_main/types/ValidityGuardRails.d.ts +0 -18
- package/dist/generated/reflect_main/types/index.d.ts +0 -80
- package/dist/generated/reflect_tokenised_bonds/accounts/Admin.d.ts +0 -101
- package/dist/generated/reflect_tokenised_bonds/accounts/Config.d.ts +0 -108
- package/dist/generated/reflect_tokenised_bonds/accounts/Vault.d.ts +0 -116
- package/dist/generated/reflect_tokenised_bonds/accounts/index.d.ts +0 -11
- package/dist/generated/reflect_tokenised_bonds/errors/index.d.ts +0 -144
- package/dist/generated/reflect_tokenised_bonds/index.d.ts +0 -19
- package/dist/generated/reflect_tokenised_bonds/instructions/createVault.d.ts +0 -50
- package/dist/generated/reflect_tokenised_bonds/instructions/deposit.d.ts +0 -62
- package/dist/generated/reflect_tokenised_bonds/instructions/index.d.ts +0 -4
- package/dist/generated/reflect_tokenised_bonds/instructions/initialize.d.ts +0 -43
- package/dist/generated/reflect_tokenised_bonds/instructions/withdraw.d.ts +0 -62
- package/dist/generated/reflect_tokenised_bonds/types/DepositArgs.d.ts +0 -17
- package/dist/generated/reflect_tokenised_bonds/types/Permissions.d.ts +0 -21
- package/dist/generated/reflect_tokenised_bonds/types/WithdrawArgs.d.ts +0 -16
- package/dist/generated/reflect_tokenised_bonds/types/index.d.ts +0 -3
- package/dist/helpers/getOrcaQuote.d.ts +0 -3
- package/dist/idl/perpetuals.d.ts +0 -5771
- package/dist/index.d.ts +0 -8
- package/dist/stablecoins/JlpStablecoin.d.ts +0 -1
- package/dist/stablecoins/JlpStablecoin.js +0 -44
- package/dist/stablecoins/LstStablecoin.d.ts +0 -65
- package/dist/stablecoins/UsdcPlusStablecoin.d.ts +0 -68
- package/dist/stablecoins/UsdcStablecoin.d.ts +0 -64
- package/dist/stablecoins/UsdcStablecoin.js +0 -145
- package/dist/stablecoins/UsdjStablecoin.d.ts +0 -1
- package/dist/stablecoins/index.d.ts +0 -3
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { AccountMeta, Connection, Keypair, PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
2
|
-
import BN from "bn.js";
|
|
3
|
-
import { DriftClient } from "@drift-labs/sdk";
|
|
4
|
-
import { Action, Strategy } from "../generated/reflect_main";
|
|
5
|
-
import { StablecoinMetadata, Collateral, Controller } from "../types";
|
|
6
|
-
/**
|
|
7
|
-
* Abstract base class for all stablecoin implementations in the Reflect protocol.
|
|
8
|
-
* Provides common functionality for managing stablecoins including initialization,
|
|
9
|
-
* minting, redemption, rebalancing, and administrative operations.
|
|
10
|
-
*
|
|
11
|
-
* This class serves as the foundation for different stablecoins:
|
|
12
|
-
* - USDC+ (Index 0): Stablecoin backed by USDC deployed in money markets
|
|
13
|
-
* - JLP Hedged (Index 1): JLP token hedged with perpetual positions
|
|
14
|
-
* - LST Delta-Neutral (Index 2): Stablecoin backed by LSTs and delta-neutral strategies
|
|
15
|
-
*/
|
|
16
|
-
export declare abstract class Stablecoin<T extends Controller> {
|
|
17
|
-
/** Unique index identifier for the stablecoin */
|
|
18
|
-
index: number;
|
|
19
|
-
/** Human-readable name of the stablecoin */
|
|
20
|
-
name: string;
|
|
21
|
-
/** Solana connection instance for communication */
|
|
22
|
-
connection: Connection;
|
|
23
|
-
/** Public key of the controller account for this stablecoin */
|
|
24
|
-
controllerKey: PublicKey;
|
|
25
|
-
/** Public key of the controller account for this stablecoin */
|
|
26
|
-
controller: T;
|
|
27
|
-
/** Public key of the controller account for this stablecoin */
|
|
28
|
-
strategy: Strategy;
|
|
29
|
-
/** Array of collateral assets backing this stablecoin */
|
|
30
|
-
collaterals: Collateral[];
|
|
31
|
-
/** Public key of the stablecoin mint */
|
|
32
|
-
stablecoinMint: PublicKey;
|
|
33
|
-
/** Optional Drift client instance for DeFi operations */
|
|
34
|
-
driftClient?: DriftClient;
|
|
35
|
-
/** Lookup table with stablecoin-specific accounts. */
|
|
36
|
-
lookupTable: PublicKey;
|
|
37
|
-
/**
|
|
38
|
-
* Loads the controller account for this stablecoin.
|
|
39
|
-
*
|
|
40
|
-
* @returns Promise resolving to void, sets the controller and strategy fields
|
|
41
|
-
*/
|
|
42
|
-
load(schema: {
|
|
43
|
-
fromAccountAddress: (connection: Connection, key: PublicKey) => Promise<T>;
|
|
44
|
-
}): Promise<void>;
|
|
45
|
-
buildLookupTables<T>(signer: PublicKey): Promise<{
|
|
46
|
-
instructions: TransactionInstruction[];
|
|
47
|
-
lookupTable: PublicKey;
|
|
48
|
-
}>;
|
|
49
|
-
setLookupTable(address: PublicKey): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new Stablecoin instance.
|
|
52
|
-
*
|
|
53
|
-
* @param index - Unique strategy index (0: USDC+, 1: JLP, 2: LST)
|
|
54
|
-
* @param name - Human-readable name for the stablecoin
|
|
55
|
-
* @param connection - Solana connection instance
|
|
56
|
-
*/
|
|
57
|
-
constructor(index: number, name: string, connection: Connection, lookupTable: PublicKey);
|
|
58
|
-
/**
|
|
59
|
-
* Initializes token accounts for the specified owner and mints.
|
|
60
|
-
* Creates associated token accounts if they don't exist.
|
|
61
|
-
*
|
|
62
|
-
* @param owner - Public key of the token account owner
|
|
63
|
-
* @param mints - Array of mint public keys to create accounts for
|
|
64
|
-
* @param signer - Public key of the transaction signer
|
|
65
|
-
* @returns Promise resolving to an array of TransactionInstruction objects
|
|
66
|
-
*/
|
|
67
|
-
initializeTokenAccounts(owner: PublicKey, mints: PublicKey[], signer: PublicKey): Promise<TransactionInstruction[]>;
|
|
68
|
-
/**
|
|
69
|
-
* Updates the supply cap for this stablecoin strategy.
|
|
70
|
-
*
|
|
71
|
-
* @param signer - Public key of the admin signer
|
|
72
|
-
* @param newCap - New maximum supply cap as BN or number
|
|
73
|
-
* @returns Promise resolving to a TransactionInstruction
|
|
74
|
-
*/
|
|
75
|
-
updateCap(signer: PublicKey, newCap: BN | number): Promise<TransactionInstruction>;
|
|
76
|
-
/**
|
|
77
|
-
* Updates the recipient addresses and their fee cuts for this stablecoin.
|
|
78
|
-
*
|
|
79
|
-
* @param signer - Public key of the admin signer
|
|
80
|
-
* @param recipients - Map of recipient public keys to their fee (in basepoints)
|
|
81
|
-
* @returns Promise resolving to a TransactionInstruction
|
|
82
|
-
*/
|
|
83
|
-
updateRecipients(signer: PublicKey, recipients: Map<PublicKey, number>): Promise<TransactionInstruction>;
|
|
84
|
-
/**
|
|
85
|
-
* Initializes a Drift sub-account for this stablecoin controller.
|
|
86
|
-
*
|
|
87
|
-
* @param signer - Public key of the admin signer
|
|
88
|
-
* @param subAccountId - Sub-account identifier (default: 0)
|
|
89
|
-
* @returns Promise resolving to a TransactionInstruction
|
|
90
|
-
*/
|
|
91
|
-
initializeStablecoinDriftAccount(signer: PublicKey, subAccountId?: number): Promise<TransactionInstruction>;
|
|
92
|
-
/**
|
|
93
|
-
* Initializes the Drift user stats account for this stablecoin controller.
|
|
94
|
-
*
|
|
95
|
-
* @param signer - Public key of the admin signer
|
|
96
|
-
* @returns Promise resolving to a TransactionInstruction
|
|
97
|
-
*/
|
|
98
|
-
initializeStablecoinDriftStatsAccount(signer: PublicKey): Promise<TransactionInstruction>;
|
|
99
|
-
/**
|
|
100
|
-
* Freezes or unfreezes a specific action for this stablecoin strategy.
|
|
101
|
-
*
|
|
102
|
-
* @param signer - Public key of the admin signer
|
|
103
|
-
* @param freeze - Whether to freeze (true) or unfreeze (false) the action
|
|
104
|
-
* @param action - The action to freeze/unfreeze
|
|
105
|
-
* @returns Promise resolving to a TransactionInstruction
|
|
106
|
-
*/
|
|
107
|
-
freeze(signer: PublicKey, freeze: boolean, action: Action): Promise<TransactionInstruction>;
|
|
108
|
-
/**
|
|
109
|
-
* Initializes the stablecoin mint with optional metadata.
|
|
110
|
-
*
|
|
111
|
-
* @param signer - Public key of the admin signer
|
|
112
|
-
* @param tokenKeypair - Keypair for the new mint account
|
|
113
|
-
* @param metadata - Optional metadata for the stablecoin
|
|
114
|
-
* @returns Promise resolving to an array of TransactionInstruction objects
|
|
115
|
-
*/
|
|
116
|
-
initializeStablecoin(signer: PublicKey, tokenKeypair: Keypair, metadata?: StablecoinMetadata): Promise<TransactionInstruction[]>;
|
|
117
|
-
/**
|
|
118
|
-
* Updates the rebalance slippage tolerance for this stablecoin strategy.
|
|
119
|
-
*
|
|
120
|
-
* @param signer - Public key of the admin signer
|
|
121
|
-
* @param slippage - New slippage tolerance value
|
|
122
|
-
* @returns Promise resolving to a TransactionInstruction
|
|
123
|
-
*/
|
|
124
|
-
updateRebalanceSlippage(signer: PublicKey, slippage: number): Promise<TransactionInstruction>;
|
|
125
|
-
/**
|
|
126
|
-
* Fetches the current price of a collateral asset from Pyth oracle.
|
|
127
|
-
*
|
|
128
|
-
* @param mint - Public key of the collateral mint
|
|
129
|
-
* @returns Promise resolving to the collateral price data
|
|
130
|
-
*/
|
|
131
|
-
getCollateralPrice(mint: PublicKey): Promise<import("axios").AxiosResponse<any, any>>;
|
|
132
|
-
/**
|
|
133
|
-
* Abstract method to construct required accounts for transactions.
|
|
134
|
-
* Must be implemented by concrete stablecoin classes.
|
|
135
|
-
*
|
|
136
|
-
* @param signer - Public key of the transaction signer
|
|
137
|
-
* @param args - Additional arguments specific to the stablecoin implementation
|
|
138
|
-
* @returns Promise resolving to the constructed accounts object of type T
|
|
139
|
-
*/
|
|
140
|
-
abstract constructAccounts<T>(signer: PublicKey, ...args: any[]): Promise<T>;
|
|
141
|
-
/**
|
|
142
|
-
* Abstract method to construct remaining accounts for transactions.
|
|
143
|
-
* Must be implemented by concrete stablecoin classes.
|
|
144
|
-
*
|
|
145
|
-
* @returns Promise resolving to an array of AccountMeta objects
|
|
146
|
-
*/
|
|
147
|
-
abstract constructRemainingAccounts(): Promise<AccountMeta[]>;
|
|
148
|
-
/**
|
|
149
|
-
* Abstract method to initialize the stablecoin strategy.
|
|
150
|
-
* Must be implemented by concrete stablecoin classes.
|
|
151
|
-
*
|
|
152
|
-
* @param signer - Public key of the admin signer
|
|
153
|
-
* @param args - Additional arguments specific to the stablecoin implementation
|
|
154
|
-
* @returns Promise resolving to an array of TransactionInstruction objects
|
|
155
|
-
*/
|
|
156
|
-
abstract initialize(signer: PublicKey, ...args: any[]): Promise<TransactionInstruction[]>;
|
|
157
|
-
/**
|
|
158
|
-
* Abstract method to create mint instructions for the stablecoin.
|
|
159
|
-
* Must be implemented by concrete stablecoin classes.
|
|
160
|
-
*
|
|
161
|
-
* @param signer - Public key of the user minting stablecoins
|
|
162
|
-
* @param amount - Amount of stablecoins to mint
|
|
163
|
-
* @param minimumReceived - Minimum amount of stablecoins to receive (slippage protection)
|
|
164
|
-
* @param args - Additional arguments specific to the stablecoin implementation
|
|
165
|
-
* @returns Promise resolving to an array of TransactionInstruction objects
|
|
166
|
-
*/
|
|
167
|
-
abstract mint(signer: PublicKey, amount: BN | number, minimumReceived: BN | number, ...args: any[]): Promise<TransactionInstruction[]>;
|
|
168
|
-
/**
|
|
169
|
-
* Abstract method to create redeem instructions for the stablecoin.
|
|
170
|
-
* Must be implemented by concrete stablecoin classes.
|
|
171
|
-
*
|
|
172
|
-
* @param signer - Public key of the user redeeming stablecoins
|
|
173
|
-
* @param amount - Amount of stablecoins to redeem
|
|
174
|
-
* @param minimumReceived - Minimum amount of collateral to receive (slippage protection)
|
|
175
|
-
* @param args - Additional arguments specific to the stablecoin implementation
|
|
176
|
-
* @returns Promise resolving to an array of TransactionInstruction objects
|
|
177
|
-
*/
|
|
178
|
-
abstract redeem(signer: PublicKey, amount: BN | number, minimumReceived: BN | number, ...args: any[]): Promise<TransactionInstruction[]>;
|
|
179
|
-
/**
|
|
180
|
-
* Abstract method to create rebalance instructions for the stablecoin.
|
|
181
|
-
* Must be implemented by concrete stablecoin classes.
|
|
182
|
-
*
|
|
183
|
-
* @param signer - Public key of the admin signer
|
|
184
|
-
* @returns Promise resolving to an array of TransactionInstruction objects
|
|
185
|
-
*/
|
|
186
|
-
abstract rebalance(signer: PublicKey): Promise<TransactionInstruction[]>;
|
|
187
|
-
}
|
package/dist/classes/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PublicKey } from "@solana/web3.js";
|
|
2
|
-
declare const DRIFT_VAULT: PublicKey;
|
|
3
|
-
declare const DRIFT_PROGRAM_ID: PublicKey;
|
|
4
|
-
declare const REFERRAL_USER: PublicKey;
|
|
5
|
-
declare const REFERRAL_USER_STATS: PublicKey;
|
|
6
|
-
export { DRIFT_VAULT, REFERRAL_USER, REFERRAL_USER_STATS, DRIFT_PROGRAM_ID };
|
package/dist/constants/lst.d.ts
DELETED
package/dist/constants/pyth.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const PYTH_API_URL = "https://hermes.pyth.network/api/latest_price_feeds?ids[]=";
|
package/dist/constants/usdc.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PublicKey } from "@solana/web3.js";
|
|
2
|
-
export declare const USDC_MINT: PublicKey;
|
|
3
|
-
export declare const USDC_PUSH_ORACLE: PublicKey;
|
|
4
|
-
export declare const USDC_PULL_ORACLE: PublicKey;
|
|
5
|
-
export declare const USDC_SPOT_MARKET: PublicKey;
|
|
6
|
-
export declare const USDC_DRIFT_VAULT: PublicKey;
|
package/dist/constants/wsol.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PublicKey } from "@solana/web3.js";
|
|
2
|
-
export declare const WSOL_PUSH_ORACLE: PublicKey;
|
|
3
|
-
export declare const WSOL_PULL_ORACLE: PublicKey;
|
|
4
|
-
export declare const WSOL_SPOT_MARKET: PublicKey;
|
|
5
|
-
export declare const WSOL_PERP_MARKET: PublicKey;
|
|
6
|
-
export declare const WSOL_MINT: PublicKey;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was GENERATED using the solita package.
|
|
3
|
-
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
-
*
|
|
5
|
-
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
-
*/
|
|
7
|
-
/// <reference types="node" />
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
import * as web3 from '@solana/web3.js';
|
|
10
|
-
import * as beet from '@metaplex-foundation/beet';
|
|
11
|
-
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
12
|
-
import { Strategy } from '../types/Strategy';
|
|
13
|
-
import { DriftControllerBase } from '../types/DriftControllerBase';
|
|
14
|
-
import { PerpHedge } from '../types/PerpHedge';
|
|
15
|
-
import { JlpRebalanceSettings } from '../types/JlpRebalanceSettings';
|
|
16
|
-
/**
|
|
17
|
-
* Arguments used to create {@link DriftJlpController}
|
|
18
|
-
* @category Accounts
|
|
19
|
-
* @category generated
|
|
20
|
-
*/
|
|
21
|
-
export type DriftJlpControllerArgs = {
|
|
22
|
-
baseStrategy: Strategy;
|
|
23
|
-
baseDrift: DriftControllerBase;
|
|
24
|
-
jlpMarketIndex: number;
|
|
25
|
-
driftPerpMarketsHedge: PerpHedge[];
|
|
26
|
-
jlpMint: web3.PublicKey;
|
|
27
|
-
rebalanceSettings: JlpRebalanceSettings;
|
|
28
|
-
};
|
|
29
|
-
export declare const driftJlpControllerDiscriminator: number[];
|
|
30
|
-
/**
|
|
31
|
-
* Holds the data for the {@link DriftJlpController} Account and provides de/serialization
|
|
32
|
-
* functionality for that data
|
|
33
|
-
*
|
|
34
|
-
* @category Accounts
|
|
35
|
-
* @category generated
|
|
36
|
-
*/
|
|
37
|
-
export declare class DriftJlpController implements DriftJlpControllerArgs {
|
|
38
|
-
readonly baseStrategy: Strategy;
|
|
39
|
-
readonly baseDrift: DriftControllerBase;
|
|
40
|
-
readonly jlpMarketIndex: number;
|
|
41
|
-
readonly driftPerpMarketsHedge: PerpHedge[];
|
|
42
|
-
readonly jlpMint: web3.PublicKey;
|
|
43
|
-
readonly rebalanceSettings: JlpRebalanceSettings;
|
|
44
|
-
private constructor();
|
|
45
|
-
/**
|
|
46
|
-
* Creates a {@link DriftJlpController} instance from the provided args.
|
|
47
|
-
*/
|
|
48
|
-
static fromArgs(args: DriftJlpControllerArgs): DriftJlpController;
|
|
49
|
-
/**
|
|
50
|
-
* Deserializes the {@link DriftJlpController} from the data of the provided {@link web3.AccountInfo}.
|
|
51
|
-
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
52
|
-
*/
|
|
53
|
-
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [DriftJlpController, number];
|
|
54
|
-
/**
|
|
55
|
-
* Retrieves the account info from the provided address and deserializes
|
|
56
|
-
* the {@link DriftJlpController} from its data.
|
|
57
|
-
*
|
|
58
|
-
* @throws Error if no account info is found at the address or if deserialization fails
|
|
59
|
-
*/
|
|
60
|
-
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<DriftJlpController>;
|
|
61
|
-
/**
|
|
62
|
-
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
63
|
-
* to fetch accounts matching filters that can be specified via that builder.
|
|
64
|
-
*
|
|
65
|
-
* @param programId - the program that owns the accounts we are filtering
|
|
66
|
-
*/
|
|
67
|
-
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<DriftJlpControllerArgs & {
|
|
68
|
-
accountDiscriminator: number[];
|
|
69
|
-
}>;
|
|
70
|
-
/**
|
|
71
|
-
* Deserializes the {@link DriftJlpController} from the provided data Buffer.
|
|
72
|
-
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
73
|
-
*/
|
|
74
|
-
static deserialize(buf: Buffer, offset?: number): [DriftJlpController, number];
|
|
75
|
-
/**
|
|
76
|
-
* Serializes the {@link DriftJlpController} into a Buffer.
|
|
77
|
-
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
78
|
-
*/
|
|
79
|
-
serialize(): [Buffer, number];
|
|
80
|
-
/**
|
|
81
|
-
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
82
|
-
* {@link DriftJlpController} for the provided args.
|
|
83
|
-
*
|
|
84
|
-
* @param args need to be provided since the byte size for this account
|
|
85
|
-
* depends on them
|
|
86
|
-
*/
|
|
87
|
-
static byteSize(args: DriftJlpControllerArgs): number;
|
|
88
|
-
/**
|
|
89
|
-
* Fetches the minimum balance needed to exempt an account holding
|
|
90
|
-
* {@link DriftJlpController} data from rent
|
|
91
|
-
*
|
|
92
|
-
* @param args need to be provided since the byte size for this account
|
|
93
|
-
* depends on them
|
|
94
|
-
* @param connection used to retrieve the rent exemption information
|
|
95
|
-
*/
|
|
96
|
-
static getMinimumBalanceForRentExemption(args: DriftJlpControllerArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
97
|
-
/**
|
|
98
|
-
* Returns a readable version of {@link DriftJlpController} properties
|
|
99
|
-
* and can be used to convert to JSON and/or logging
|
|
100
|
-
*/
|
|
101
|
-
pretty(): {
|
|
102
|
-
baseStrategy: Strategy;
|
|
103
|
-
baseDrift: DriftControllerBase;
|
|
104
|
-
jlpMarketIndex: number;
|
|
105
|
-
driftPerpMarketsHedge: PerpHedge[];
|
|
106
|
-
jlpMint: string;
|
|
107
|
-
rebalanceSettings: JlpRebalanceSettings;
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @category Accounts
|
|
112
|
-
* @category generated
|
|
113
|
-
*/
|
|
114
|
-
export declare const driftJlpControllerBeet: beet.FixableBeetStruct<DriftJlpController, DriftJlpControllerArgs & {
|
|
115
|
-
accountDiscriminator: number[];
|
|
116
|
-
}>;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was GENERATED using the solita package.
|
|
3
|
-
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
-
*
|
|
5
|
-
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
-
*/
|
|
7
|
-
/// <reference types="node" />
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
import * as beet from '@metaplex-foundation/beet';
|
|
10
|
-
import * as web3 from '@solana/web3.js';
|
|
11
|
-
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
12
|
-
import { Strategy } from '../types/Strategy';
|
|
13
|
-
import { DriftControllerBase } from '../types/DriftControllerBase';
|
|
14
|
-
import { DriftLstData } from '../types/DriftLstData';
|
|
15
|
-
import { SubAccount } from '../types/SubAccount';
|
|
16
|
-
/**
|
|
17
|
-
* Arguments used to create {@link DriftLstController}
|
|
18
|
-
* @category Accounts
|
|
19
|
-
* @category generated
|
|
20
|
-
*/
|
|
21
|
-
export type DriftLstControllerArgs = {
|
|
22
|
-
baseStrategy: Strategy;
|
|
23
|
-
baseDrift: DriftControllerBase;
|
|
24
|
-
lsts: DriftLstData[];
|
|
25
|
-
subAccounts: SubAccount[];
|
|
26
|
-
};
|
|
27
|
-
export declare const driftLstControllerDiscriminator: number[];
|
|
28
|
-
/**
|
|
29
|
-
* Holds the data for the {@link DriftLstController} Account and provides de/serialization
|
|
30
|
-
* functionality for that data
|
|
31
|
-
*
|
|
32
|
-
* @category Accounts
|
|
33
|
-
* @category generated
|
|
34
|
-
*/
|
|
35
|
-
export declare class DriftLstController implements DriftLstControllerArgs {
|
|
36
|
-
readonly baseStrategy: Strategy;
|
|
37
|
-
readonly baseDrift: DriftControllerBase;
|
|
38
|
-
readonly lsts: DriftLstData[];
|
|
39
|
-
readonly subAccounts: SubAccount[];
|
|
40
|
-
private constructor();
|
|
41
|
-
/**
|
|
42
|
-
* Creates a {@link DriftLstController} instance from the provided args.
|
|
43
|
-
*/
|
|
44
|
-
static fromArgs(args: DriftLstControllerArgs): DriftLstController;
|
|
45
|
-
/**
|
|
46
|
-
* Deserializes the {@link DriftLstController} from the data of the provided {@link web3.AccountInfo}.
|
|
47
|
-
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
48
|
-
*/
|
|
49
|
-
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [DriftLstController, number];
|
|
50
|
-
/**
|
|
51
|
-
* Retrieves the account info from the provided address and deserializes
|
|
52
|
-
* the {@link DriftLstController} from its data.
|
|
53
|
-
*
|
|
54
|
-
* @throws Error if no account info is found at the address or if deserialization fails
|
|
55
|
-
*/
|
|
56
|
-
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<DriftLstController>;
|
|
57
|
-
/**
|
|
58
|
-
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
59
|
-
* to fetch accounts matching filters that can be specified via that builder.
|
|
60
|
-
*
|
|
61
|
-
* @param programId - the program that owns the accounts we are filtering
|
|
62
|
-
*/
|
|
63
|
-
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<DriftLstControllerArgs & {
|
|
64
|
-
accountDiscriminator: number[];
|
|
65
|
-
}>;
|
|
66
|
-
/**
|
|
67
|
-
* Deserializes the {@link DriftLstController} from the provided data Buffer.
|
|
68
|
-
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
69
|
-
*/
|
|
70
|
-
static deserialize(buf: Buffer, offset?: number): [DriftLstController, number];
|
|
71
|
-
/**
|
|
72
|
-
* Serializes the {@link DriftLstController} into a Buffer.
|
|
73
|
-
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
74
|
-
*/
|
|
75
|
-
serialize(): [Buffer, number];
|
|
76
|
-
/**
|
|
77
|
-
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
78
|
-
* {@link DriftLstController} for the provided args.
|
|
79
|
-
*
|
|
80
|
-
* @param args need to be provided since the byte size for this account
|
|
81
|
-
* depends on them
|
|
82
|
-
*/
|
|
83
|
-
static byteSize(args: DriftLstControllerArgs): number;
|
|
84
|
-
/**
|
|
85
|
-
* Fetches the minimum balance needed to exempt an account holding
|
|
86
|
-
* {@link DriftLstController} data from rent
|
|
87
|
-
*
|
|
88
|
-
* @param args need to be provided since the byte size for this account
|
|
89
|
-
* depends on them
|
|
90
|
-
* @param connection used to retrieve the rent exemption information
|
|
91
|
-
*/
|
|
92
|
-
static getMinimumBalanceForRentExemption(args: DriftLstControllerArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
93
|
-
/**
|
|
94
|
-
* Returns a readable version of {@link DriftLstController} properties
|
|
95
|
-
* and can be used to convert to JSON and/or logging
|
|
96
|
-
*/
|
|
97
|
-
pretty(): {
|
|
98
|
-
baseStrategy: Strategy;
|
|
99
|
-
baseDrift: DriftControllerBase;
|
|
100
|
-
lsts: DriftLstData[];
|
|
101
|
-
subAccounts: SubAccount[];
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @category Accounts
|
|
106
|
-
* @category generated
|
|
107
|
-
*/
|
|
108
|
-
export declare const driftLstControllerBeet: beet.FixableBeetStruct<DriftLstController, DriftLstControllerArgs & {
|
|
109
|
-
accountDiscriminator: number[];
|
|
110
|
-
}>;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was GENERATED using the solita package.
|
|
3
|
-
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
-
*
|
|
5
|
-
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
-
*/
|
|
7
|
-
/// <reference types="node" />
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
import * as web3 from '@solana/web3.js';
|
|
10
|
-
import * as beet from '@metaplex-foundation/beet';
|
|
11
|
-
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
12
|
-
import { Strategy } from '../types/Strategy';
|
|
13
|
-
import { DriftControllerBase } from '../types/DriftControllerBase';
|
|
14
|
-
/**
|
|
15
|
-
* Arguments used to create {@link DriftUsdcController}
|
|
16
|
-
* @category Accounts
|
|
17
|
-
* @category generated
|
|
18
|
-
*/
|
|
19
|
-
export type DriftUsdcControllerArgs = {
|
|
20
|
-
baseStrategy: Strategy;
|
|
21
|
-
baseDrift: DriftControllerBase;
|
|
22
|
-
usdcReceiptMint: web3.PublicKey;
|
|
23
|
-
vault: web3.PublicKey;
|
|
24
|
-
netUserFlowSinceCapture: beet.bignum;
|
|
25
|
-
lastPoolValue: beet.bignum;
|
|
26
|
-
effectiveSupply: beet.bignum;
|
|
27
|
-
depositedVaultValue: beet.bignum;
|
|
28
|
-
};
|
|
29
|
-
export declare const driftUsdcControllerDiscriminator: number[];
|
|
30
|
-
/**
|
|
31
|
-
* Holds the data for the {@link DriftUsdcController} Account and provides de/serialization
|
|
32
|
-
* functionality for that data
|
|
33
|
-
*
|
|
34
|
-
* @category Accounts
|
|
35
|
-
* @category generated
|
|
36
|
-
*/
|
|
37
|
-
export declare class DriftUsdcController implements DriftUsdcControllerArgs {
|
|
38
|
-
readonly baseStrategy: Strategy;
|
|
39
|
-
readonly baseDrift: DriftControllerBase;
|
|
40
|
-
readonly usdcReceiptMint: web3.PublicKey;
|
|
41
|
-
readonly vault: web3.PublicKey;
|
|
42
|
-
readonly netUserFlowSinceCapture: beet.bignum;
|
|
43
|
-
readonly lastPoolValue: beet.bignum;
|
|
44
|
-
readonly effectiveSupply: beet.bignum;
|
|
45
|
-
readonly depositedVaultValue: beet.bignum;
|
|
46
|
-
private constructor();
|
|
47
|
-
/**
|
|
48
|
-
* Creates a {@link DriftUsdcController} instance from the provided args.
|
|
49
|
-
*/
|
|
50
|
-
static fromArgs(args: DriftUsdcControllerArgs): DriftUsdcController;
|
|
51
|
-
/**
|
|
52
|
-
* Deserializes the {@link DriftUsdcController} from the data of the provided {@link web3.AccountInfo}.
|
|
53
|
-
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
54
|
-
*/
|
|
55
|
-
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [DriftUsdcController, number];
|
|
56
|
-
/**
|
|
57
|
-
* Retrieves the account info from the provided address and deserializes
|
|
58
|
-
* the {@link DriftUsdcController} from its data.
|
|
59
|
-
*
|
|
60
|
-
* @throws Error if no account info is found at the address or if deserialization fails
|
|
61
|
-
*/
|
|
62
|
-
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<DriftUsdcController>;
|
|
63
|
-
/**
|
|
64
|
-
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
65
|
-
* to fetch accounts matching filters that can be specified via that builder.
|
|
66
|
-
*
|
|
67
|
-
* @param programId - the program that owns the accounts we are filtering
|
|
68
|
-
*/
|
|
69
|
-
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
|
|
70
|
-
baseStrategy: any;
|
|
71
|
-
baseDrift: any;
|
|
72
|
-
accountDiscriminator: any;
|
|
73
|
-
usdcReceiptMint: any;
|
|
74
|
-
vault: any;
|
|
75
|
-
netUserFlowSinceCapture: any;
|
|
76
|
-
lastPoolValue: any;
|
|
77
|
-
effectiveSupply: any;
|
|
78
|
-
depositedVaultValue: any;
|
|
79
|
-
}>;
|
|
80
|
-
/**
|
|
81
|
-
* Deserializes the {@link DriftUsdcController} from the provided data Buffer.
|
|
82
|
-
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
83
|
-
*/
|
|
84
|
-
static deserialize(buf: Buffer, offset?: number): [DriftUsdcController, number];
|
|
85
|
-
/**
|
|
86
|
-
* Serializes the {@link DriftUsdcController} into a Buffer.
|
|
87
|
-
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
88
|
-
*/
|
|
89
|
-
serialize(): [Buffer, number];
|
|
90
|
-
/**
|
|
91
|
-
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
92
|
-
* {@link DriftUsdcController}
|
|
93
|
-
*/
|
|
94
|
-
static get byteSize(): number;
|
|
95
|
-
/**
|
|
96
|
-
* Fetches the minimum balance needed to exempt an account holding
|
|
97
|
-
* {@link DriftUsdcController} data from rent
|
|
98
|
-
*
|
|
99
|
-
* @param connection used to retrieve the rent exemption information
|
|
100
|
-
*/
|
|
101
|
-
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
102
|
-
/**
|
|
103
|
-
* Determines if the provided {@link Buffer} has the correct byte size to
|
|
104
|
-
* hold {@link DriftUsdcController} data.
|
|
105
|
-
*/
|
|
106
|
-
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Returns a readable version of {@link DriftUsdcController} properties
|
|
109
|
-
* and can be used to convert to JSON and/or logging
|
|
110
|
-
*/
|
|
111
|
-
pretty(): {
|
|
112
|
-
baseStrategy: Strategy;
|
|
113
|
-
baseDrift: DriftControllerBase;
|
|
114
|
-
usdcReceiptMint: string;
|
|
115
|
-
vault: string;
|
|
116
|
-
netUserFlowSinceCapture: number | {
|
|
117
|
-
toNumber: () => number;
|
|
118
|
-
};
|
|
119
|
-
lastPoolValue: number | {
|
|
120
|
-
toNumber: () => number;
|
|
121
|
-
};
|
|
122
|
-
effectiveSupply: number | {
|
|
123
|
-
toNumber: () => number;
|
|
124
|
-
};
|
|
125
|
-
depositedVaultValue: number | {
|
|
126
|
-
toNumber: () => number;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* @category Accounts
|
|
132
|
-
* @category generated
|
|
133
|
-
*/
|
|
134
|
-
export declare const driftUsdcControllerBeet: beet.BeetStruct<DriftUsdcController, DriftUsdcControllerArgs & {
|
|
135
|
-
accountDiscriminator: number[];
|
|
136
|
-
}>;
|