@reflectmoney/stable.ts 1.1.3 → 1.1.4
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/classes/ApiClient.d.ts +56 -0
- package/dist/classes/PdaClient.d.ts +131 -0
- package/dist/classes/Reflect.d.ts +7 -0
- package/dist/classes/ReflectKeeper.d.ts +105 -0
- package/dist/classes/ReflectTokenisedBond.d.ts +75 -0
- package/dist/classes/Stablecoin.d.ts +219 -0
- package/dist/classes/index.d.ts +4 -0
- package/dist/constants/drift.d.ts +6 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/jupiter.d.ts +4 -0
- package/dist/constants/lookupTables.d.ts +4 -0
- package/dist/constants/lst.d.ts +3 -0
- package/dist/constants/pyth.d.ts +1 -0
- package/dist/constants/usdc.d.ts +6 -0
- package/dist/constants/wsol.d.ts +6 -0
- package/dist/errors/ReflectError.d.ts +4 -0
- package/dist/generated/reflect_main/accounts/DriftJlpController.d.ts +114 -0
- package/dist/generated/reflect_main/accounts/DriftLstController.d.ts +108 -0
- package/dist/generated/reflect_main/accounts/DriftUsdcController.d.ts +126 -0
- package/dist/generated/reflect_main/accounts/Main.d.ts +110 -0
- package/dist/generated/reflect_main/accounts/PerpMarket.d.ts +226 -0
- package/dist/generated/reflect_main/accounts/PrelaunchOracle.d.ts +130 -0
- package/dist/generated/reflect_main/accounts/PythLazerOracle.d.ts +124 -0
- package/dist/generated/reflect_main/accounts/RebalanceLst.d.ts +111 -0
- package/dist/generated/reflect_main/accounts/SpotMarket.d.ts +377 -0
- package/dist/generated/reflect_main/accounts/User.d.ts +221 -0
- package/dist/generated/reflect_main/accounts/UserPermissions.d.ts +106 -0
- package/dist/generated/reflect_main/accounts/UserStats.d.ts +211 -0
- package/dist/generated/reflect_main/accounts/index.d.ts +38 -0
- package/dist/generated/reflect_main/errors/index.d.ts +969 -0
- package/dist/generated/reflect_main/index.d.ts +19 -0
- package/dist/generated/reflect_main/instructions/addLstDrift.d.ts +49 -0
- package/dist/generated/reflect_main/instructions/addSubAccount.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/captureSpreadDrift.d.ts +66 -0
- package/dist/generated/reflect_main/instructions/captureSpreadDriftS1.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/createAdminAccount.d.ts +51 -0
- package/dist/generated/reflect_main/instructions/createUserStatsAccount.d.ts +52 -0
- package/dist/generated/reflect_main/instructions/depositDrift.d.ts +73 -0
- package/dist/generated/reflect_main/instructions/freezeProgram.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/freezeProtocolAction.d.ts +55 -0
- package/dist/generated/reflect_main/instructions/freezeStrategyAction.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/index.d.ts +34 -0
- package/dist/generated/reflect_main/instructions/initDriftAccountsS1.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/initDriftControllerS1.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/initDriftControllerS3.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/initMain.d.ts +43 -0
- package/dist/generated/reflect_main/instructions/mintDriftS1.d.ts +86 -0
- package/dist/generated/reflect_main/instructions/mintDriftS3.d.ts +86 -0
- package/dist/generated/reflect_main/instructions/processSwapDeposit.d.ts +69 -0
- package/dist/generated/reflect_main/instructions/processSwapWithdraw.d.ts +69 -0
- package/dist/generated/reflect_main/instructions/redeemDriftS1.d.ts +87 -0
- package/dist/generated/reflect_main/instructions/redeemDriftS3.d.ts +87 -0
- package/dist/generated/reflect_main/instructions/settlePnl.d.ts +55 -0
- package/dist/generated/reflect_main/instructions/settlePnlMulti.d.ts +65 -0
- package/dist/generated/reflect_main/instructions/suspendSplProtocol.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/suspendSplStrategy.d.ts +56 -0
- package/dist/generated/reflect_main/instructions/swapOrca.d.ts +81 -0
- package/dist/generated/reflect_main/instructions/swapOrcaTwoHop.d.ts +101 -0
- package/dist/generated/reflect_main/instructions/updateActionRoleProtocol.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/updateActionRoleStrategy.d.ts +60 -0
- package/dist/generated/reflect_main/instructions/updateAttenuation.d.ts +57 -0
- package/dist/generated/reflect_main/instructions/updateCap.d.ts +55 -0
- package/dist/generated/reflect_main/instructions/updateRebalanceSlippage.d.ts +55 -0
- package/dist/generated/reflect_main/instructions/updateRecipients.d.ts +56 -0
- package/dist/generated/reflect_main/instructions/updateRoleHolderProtocol.d.ts +60 -0
- package/dist/generated/reflect_main/instructions/updateRoleHolderStrategy.d.ts +60 -0
- package/dist/generated/reflect_main/types/AMM.d.ts +102 -0
- package/dist/generated/reflect_main/types/AccKey.d.ts +15 -0
- package/dist/generated/reflect_main/types/AccessControl.d.ts +18 -0
- package/dist/generated/reflect_main/types/AccessMap.d.ts +17 -0
- package/dist/generated/reflect_main/types/Action.d.ts +35 -0
- package/dist/generated/reflect_main/types/ActionMapping.d.ts +19 -0
- package/dist/generated/reflect_main/types/AssetTier.d.ts +23 -0
- package/dist/generated/reflect_main/types/Attenuation.d.ts +16 -0
- package/dist/generated/reflect_main/types/BalanceType.d.ts +20 -0
- package/dist/generated/reflect_main/types/Capture.d.ts +17 -0
- package/dist/generated/reflect_main/types/ContractTier.d.ts +24 -0
- package/dist/generated/reflect_main/types/ContractType.d.ts +20 -0
- package/dist/generated/reflect_main/types/CorpAction.d.ts +19 -0
- package/dist/generated/reflect_main/types/CustodyInfo.d.ts +20 -0
- package/dist/generated/reflect_main/types/DirectionCollateral.d.ts +20 -0
- package/dist/generated/reflect_main/types/DirectionPosition.d.ts +20 -0
- package/dist/generated/reflect_main/types/DriftControllerBase.d.ts +15 -0
- package/dist/generated/reflect_main/types/DriftJlpControllerFixedAccounts.d.ts +18 -0
- package/dist/generated/reflect_main/types/DriftLstData.d.ts +17 -0
- package/dist/generated/reflect_main/types/Ema.d.ts +17 -0
- package/dist/generated/reflect_main/types/Externals.d.ts +16 -0
- package/dist/generated/reflect_main/types/FlowControl.d.ts +17 -0
- package/dist/generated/reflect_main/types/HistoricalIndexData.d.ts +19 -0
- package/dist/generated/reflect_main/types/HistoricalOracleData.d.ts +20 -0
- package/dist/generated/reflect_main/types/Holding.d.ts +21 -0
- package/dist/generated/reflect_main/types/Holdings.d.ts +17 -0
- package/dist/generated/reflect_main/types/InsuranceClaim.d.ts +19 -0
- package/dist/generated/reflect_main/types/InsuranceFund.d.ts +24 -0
- package/dist/generated/reflect_main/types/JlpRebalanceSettings.d.ts +15 -0
- package/dist/generated/reflect_main/types/KillSwitch.d.ts +15 -0
- package/dist/generated/reflect_main/types/LevelRoles.d.ts +16 -0
- package/dist/generated/reflect_main/types/MarketStatus.d.ts +27 -0
- package/dist/generated/reflect_main/types/MarketType.d.ts +20 -0
- package/dist/generated/reflect_main/types/ModifyOrderParams.d.ts +32 -0
- package/dist/generated/reflect_main/types/ModifyOrderPolicy.d.ts +20 -0
- package/dist/generated/reflect_main/types/Movements.d.ts +19 -0
- package/dist/generated/reflect_main/types/OracleGuardRails.d.ts +18 -0
- package/dist/generated/reflect_main/types/OracleSource.d.ts +34 -0
- package/dist/generated/reflect_main/types/OracleValidity.d.ts +25 -0
- package/dist/generated/reflect_main/types/Order.d.ts +43 -0
- package/dist/generated/reflect_main/types/OrderDirection.d.ts +20 -0
- package/dist/generated/reflect_main/types/OrderParams.d.ts +36 -0
- package/dist/generated/reflect_main/types/OrderStatus.d.ts +22 -0
- package/dist/generated/reflect_main/types/OrderTriggerCondition.d.ts +22 -0
- package/dist/generated/reflect_main/types/OrderType.d.ts +23 -0
- package/dist/generated/reflect_main/types/PermissionLevel.d.ts +45 -0
- package/dist/generated/reflect_main/types/PerpHedge.d.ts +17 -0
- package/dist/generated/reflect_main/types/PerpPosition.d.ts +29 -0
- package/dist/generated/reflect_main/types/PoolBalance.d.ts +17 -0
- package/dist/generated/reflect_main/types/Position.d.ts +20 -0
- package/dist/generated/reflect_main/types/PositionDirection.d.ts +20 -0
- package/dist/generated/reflect_main/types/PositionDrift.d.ts +18 -0
- package/dist/generated/reflect_main/types/PostOnlyParam.d.ts +22 -0
- package/dist/generated/reflect_main/types/Price.d.ts +41 -0
- package/dist/generated/reflect_main/types/PriceComp.d.ts +19 -0
- package/dist/generated/reflect_main/types/PriceDivergenceGuardRails.d.ts +16 -0
- package/dist/generated/reflect_main/types/PriceInfo.d.ts +21 -0
- package/dist/generated/reflect_main/types/PriceStatus.d.ts +22 -0
- package/dist/generated/reflect_main/types/PriceType.d.ts +20 -0
- package/dist/generated/reflect_main/types/Program.d.ts +19 -0
- package/dist/generated/reflect_main/types/ProgramStatus.d.ts +20 -0
- package/dist/generated/reflect_main/types/Recipient.d.ts +17 -0
- package/dist/generated/reflect_main/types/Recipients.d.ts +17 -0
- package/dist/generated/reflect_main/types/Role.d.ts +25 -0
- package/dist/generated/reflect_main/types/ShiftCollateral.d.ts +19 -0
- package/dist/generated/reflect_main/types/ShiftPosition.d.ts +17 -0
- package/dist/generated/reflect_main/types/ShortHolding.d.ts +17 -0
- package/dist/generated/reflect_main/types/SplBase.d.ts +17 -0
- package/dist/generated/reflect_main/types/SplMain.d.ts +22 -0
- package/dist/generated/reflect_main/types/Spls.d.ts +17 -0
- package/dist/generated/reflect_main/types/SpotBalanceType.d.ts +20 -0
- package/dist/generated/reflect_main/types/SpotPosition.d.ts +23 -0
- package/dist/generated/reflect_main/types/Status.d.ts +21 -0
- package/dist/generated/reflect_main/types/Strategy.d.ts +32 -0
- package/dist/generated/reflect_main/types/StrategyPadding.d.ts +15 -0
- package/dist/generated/reflect_main/types/StrategyRoleEntry.d.ts +17 -0
- package/dist/generated/reflect_main/types/SubAccount.d.ts +17 -0
- package/dist/generated/reflect_main/types/Update.d.ts +20 -0
- package/dist/generated/reflect_main/types/UserFees.d.ts +20 -0
- package/dist/generated/reflect_main/types/ValidityGuardRails.d.ts +18 -0
- package/dist/generated/reflect_main/types/index.d.ts +80 -0
- package/dist/generated/reflect_tokenised_bonds/accounts/Admin.d.ts +99 -0
- package/dist/generated/reflect_tokenised_bonds/accounts/Config.d.ts +106 -0
- package/dist/generated/reflect_tokenised_bonds/accounts/Vault.d.ts +114 -0
- package/dist/generated/reflect_tokenised_bonds/accounts/index.d.ts +11 -0
- package/dist/generated/reflect_tokenised_bonds/errors/index.d.ts +144 -0
- package/dist/generated/reflect_tokenised_bonds/index.d.ts +19 -0
- package/dist/generated/reflect_tokenised_bonds/instructions/createVault.d.ts +50 -0
- package/dist/generated/reflect_tokenised_bonds/instructions/deposit.d.ts +62 -0
- package/dist/generated/reflect_tokenised_bonds/instructions/index.d.ts +4 -0
- package/dist/generated/reflect_tokenised_bonds/instructions/initialize.d.ts +43 -0
- package/dist/generated/reflect_tokenised_bonds/instructions/withdraw.d.ts +62 -0
- package/dist/generated/reflect_tokenised_bonds/types/DepositArgs.d.ts +17 -0
- package/dist/generated/reflect_tokenised_bonds/types/Permissions.d.ts +21 -0
- package/dist/generated/reflect_tokenised_bonds/types/WithdrawArgs.d.ts +16 -0
- package/dist/generated/reflect_tokenised_bonds/types/index.d.ts +3 -0
- package/dist/helpers/getOrcaQuote.d.ts +3 -0
- package/dist/idl/perpetuals.d.ts +5771 -0
- package/dist/index.d.ts +9 -0
- package/dist/stablecoins/LstStablecoin.d.ts +103 -0
- package/dist/stablecoins/UsdcPlusStablecoin.d.ts +86 -0
- package/dist/stablecoins/UsdjStablecoin.d.ts +1 -0
- package/dist/stablecoins/index.d.ts +3 -0
- package/dist/types/api.d.ts +1172 -0
- package/dist/types/api.js +6 -0
- package/dist/types/index.d.ts +81 -0
- package/dist/types/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
import * as web3 from '@solana/web3.js';
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { Strategy } from '../types/Strategy';
|
|
11
|
+
import { DriftControllerBase } from '../types/DriftControllerBase';
|
|
12
|
+
import { PerpHedge } from '../types/PerpHedge';
|
|
13
|
+
import { JlpRebalanceSettings } from '../types/JlpRebalanceSettings';
|
|
14
|
+
/**
|
|
15
|
+
* Arguments used to create {@link DriftJlpController}
|
|
16
|
+
* @category Accounts
|
|
17
|
+
* @category generated
|
|
18
|
+
*/
|
|
19
|
+
export type DriftJlpControllerArgs = {
|
|
20
|
+
baseStrategy: Strategy;
|
|
21
|
+
baseDrift: DriftControllerBase;
|
|
22
|
+
jlpMarketIndex: number;
|
|
23
|
+
driftPerpMarketsHedge: PerpHedge[];
|
|
24
|
+
jlpMint: web3.PublicKey;
|
|
25
|
+
rebalanceSettings: JlpRebalanceSettings;
|
|
26
|
+
};
|
|
27
|
+
export declare const driftJlpControllerDiscriminator: number[];
|
|
28
|
+
/**
|
|
29
|
+
* Holds the data for the {@link DriftJlpController} Account and provides de/serialization
|
|
30
|
+
* functionality for that data
|
|
31
|
+
*
|
|
32
|
+
* @category Accounts
|
|
33
|
+
* @category generated
|
|
34
|
+
*/
|
|
35
|
+
export declare class DriftJlpController implements DriftJlpControllerArgs {
|
|
36
|
+
readonly baseStrategy: Strategy;
|
|
37
|
+
readonly baseDrift: DriftControllerBase;
|
|
38
|
+
readonly jlpMarketIndex: number;
|
|
39
|
+
readonly driftPerpMarketsHedge: PerpHedge[];
|
|
40
|
+
readonly jlpMint: web3.PublicKey;
|
|
41
|
+
readonly rebalanceSettings: JlpRebalanceSettings;
|
|
42
|
+
private constructor();
|
|
43
|
+
/**
|
|
44
|
+
* Creates a {@link DriftJlpController} instance from the provided args.
|
|
45
|
+
*/
|
|
46
|
+
static fromArgs(args: DriftJlpControllerArgs): DriftJlpController;
|
|
47
|
+
/**
|
|
48
|
+
* Deserializes the {@link DriftJlpController} from the data of the provided {@link web3.AccountInfo}.
|
|
49
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
50
|
+
*/
|
|
51
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [DriftJlpController, number];
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the account info from the provided address and deserializes
|
|
54
|
+
* the {@link DriftJlpController} from its data.
|
|
55
|
+
*
|
|
56
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
57
|
+
*/
|
|
58
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<DriftJlpController>;
|
|
59
|
+
/**
|
|
60
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
61
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
62
|
+
*
|
|
63
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
64
|
+
*/
|
|
65
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<DriftJlpControllerArgs & {
|
|
66
|
+
accountDiscriminator: number[];
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Deserializes the {@link DriftJlpController} from the provided data Buffer.
|
|
70
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
71
|
+
*/
|
|
72
|
+
static deserialize(buf: Buffer, offset?: number): [DriftJlpController, number];
|
|
73
|
+
/**
|
|
74
|
+
* Serializes the {@link DriftJlpController} into a Buffer.
|
|
75
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
76
|
+
*/
|
|
77
|
+
serialize(): [Buffer, number];
|
|
78
|
+
/**
|
|
79
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
80
|
+
* {@link DriftJlpController} for the provided args.
|
|
81
|
+
*
|
|
82
|
+
* @param args need to be provided since the byte size for this account
|
|
83
|
+
* depends on them
|
|
84
|
+
*/
|
|
85
|
+
static byteSize(args: DriftJlpControllerArgs): number;
|
|
86
|
+
/**
|
|
87
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
88
|
+
* {@link DriftJlpController} data from rent
|
|
89
|
+
*
|
|
90
|
+
* @param args need to be provided since the byte size for this account
|
|
91
|
+
* depends on them
|
|
92
|
+
* @param connection used to retrieve the rent exemption information
|
|
93
|
+
*/
|
|
94
|
+
static getMinimumBalanceForRentExemption(args: DriftJlpControllerArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
95
|
+
/**
|
|
96
|
+
* Returns a readable version of {@link DriftJlpController} properties
|
|
97
|
+
* and can be used to convert to JSON and/or logging
|
|
98
|
+
*/
|
|
99
|
+
pretty(): {
|
|
100
|
+
baseStrategy: Strategy;
|
|
101
|
+
baseDrift: DriftControllerBase;
|
|
102
|
+
jlpMarketIndex: number;
|
|
103
|
+
driftPerpMarketsHedge: PerpHedge[];
|
|
104
|
+
jlpMint: string;
|
|
105
|
+
rebalanceSettings: JlpRebalanceSettings;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @category Accounts
|
|
110
|
+
* @category generated
|
|
111
|
+
*/
|
|
112
|
+
export declare const driftJlpControllerBeet: beet.FixableBeetStruct<DriftJlpController, DriftJlpControllerArgs & {
|
|
113
|
+
accountDiscriminator: number[];
|
|
114
|
+
}>;
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
8
|
+
import * as web3 from '@solana/web3.js';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { Strategy } from '../types/Strategy';
|
|
11
|
+
import { DriftControllerBase } from '../types/DriftControllerBase';
|
|
12
|
+
import { DriftLstData } from '../types/DriftLstData';
|
|
13
|
+
import { SubAccount } from '../types/SubAccount';
|
|
14
|
+
/**
|
|
15
|
+
* Arguments used to create {@link DriftLstController}
|
|
16
|
+
* @category Accounts
|
|
17
|
+
* @category generated
|
|
18
|
+
*/
|
|
19
|
+
export type DriftLstControllerArgs = {
|
|
20
|
+
baseStrategy: Strategy;
|
|
21
|
+
baseDrift: DriftControllerBase;
|
|
22
|
+
lsts: DriftLstData[];
|
|
23
|
+
subAccounts: SubAccount[];
|
|
24
|
+
};
|
|
25
|
+
export declare const driftLstControllerDiscriminator: number[];
|
|
26
|
+
/**
|
|
27
|
+
* Holds the data for the {@link DriftLstController} Account and provides de/serialization
|
|
28
|
+
* functionality for that data
|
|
29
|
+
*
|
|
30
|
+
* @category Accounts
|
|
31
|
+
* @category generated
|
|
32
|
+
*/
|
|
33
|
+
export declare class DriftLstController implements DriftLstControllerArgs {
|
|
34
|
+
readonly baseStrategy: Strategy;
|
|
35
|
+
readonly baseDrift: DriftControllerBase;
|
|
36
|
+
readonly lsts: DriftLstData[];
|
|
37
|
+
readonly subAccounts: SubAccount[];
|
|
38
|
+
private constructor();
|
|
39
|
+
/**
|
|
40
|
+
* Creates a {@link DriftLstController} instance from the provided args.
|
|
41
|
+
*/
|
|
42
|
+
static fromArgs(args: DriftLstControllerArgs): DriftLstController;
|
|
43
|
+
/**
|
|
44
|
+
* Deserializes the {@link DriftLstController} from the data of the provided {@link web3.AccountInfo}.
|
|
45
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
46
|
+
*/
|
|
47
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [DriftLstController, number];
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves the account info from the provided address and deserializes
|
|
50
|
+
* the {@link DriftLstController} from its data.
|
|
51
|
+
*
|
|
52
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
53
|
+
*/
|
|
54
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<DriftLstController>;
|
|
55
|
+
/**
|
|
56
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
57
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
58
|
+
*
|
|
59
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
60
|
+
*/
|
|
61
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<DriftLstControllerArgs & {
|
|
62
|
+
accountDiscriminator: number[];
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Deserializes the {@link DriftLstController} from the provided data Buffer.
|
|
66
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
67
|
+
*/
|
|
68
|
+
static deserialize(buf: Buffer, offset?: number): [DriftLstController, number];
|
|
69
|
+
/**
|
|
70
|
+
* Serializes the {@link DriftLstController} into a Buffer.
|
|
71
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
72
|
+
*/
|
|
73
|
+
serialize(): [Buffer, number];
|
|
74
|
+
/**
|
|
75
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
76
|
+
* {@link DriftLstController} for the provided args.
|
|
77
|
+
*
|
|
78
|
+
* @param args need to be provided since the byte size for this account
|
|
79
|
+
* depends on them
|
|
80
|
+
*/
|
|
81
|
+
static byteSize(args: DriftLstControllerArgs): number;
|
|
82
|
+
/**
|
|
83
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
84
|
+
* {@link DriftLstController} data from rent
|
|
85
|
+
*
|
|
86
|
+
* @param args need to be provided since the byte size for this account
|
|
87
|
+
* depends on them
|
|
88
|
+
* @param connection used to retrieve the rent exemption information
|
|
89
|
+
*/
|
|
90
|
+
static getMinimumBalanceForRentExemption(args: DriftLstControllerArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
91
|
+
/**
|
|
92
|
+
* Returns a readable version of {@link DriftLstController} properties
|
|
93
|
+
* and can be used to convert to JSON and/or logging
|
|
94
|
+
*/
|
|
95
|
+
pretty(): {
|
|
96
|
+
baseStrategy: Strategy;
|
|
97
|
+
baseDrift: DriftControllerBase;
|
|
98
|
+
lsts: DriftLstData[];
|
|
99
|
+
subAccounts: SubAccount[];
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @category Accounts
|
|
104
|
+
* @category generated
|
|
105
|
+
*/
|
|
106
|
+
export declare const driftLstControllerBeet: beet.FixableBeetStruct<DriftLstController, DriftLstControllerArgs & {
|
|
107
|
+
accountDiscriminator: number[];
|
|
108
|
+
}>;
|
|
@@ -0,0 +1,126 @@
|
|
|
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
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
8
|
+
import * as web3 from '@solana/web3.js';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { Strategy } from '../types/Strategy';
|
|
11
|
+
import { DriftControllerBase } from '../types/DriftControllerBase';
|
|
12
|
+
/**
|
|
13
|
+
* Arguments used to create {@link DriftUsdcController}
|
|
14
|
+
* @category Accounts
|
|
15
|
+
* @category generated
|
|
16
|
+
*/
|
|
17
|
+
export type DriftUsdcControllerArgs = {
|
|
18
|
+
baseStrategy: Strategy;
|
|
19
|
+
baseDrift: DriftControllerBase;
|
|
20
|
+
netUserFlowSinceCapture: beet.bignum;
|
|
21
|
+
lastPoolValue: beet.bignum;
|
|
22
|
+
effectiveSupply: beet.bignum;
|
|
23
|
+
depositedVaultValue: beet.bignum;
|
|
24
|
+
};
|
|
25
|
+
export declare const driftUsdcControllerDiscriminator: number[];
|
|
26
|
+
/**
|
|
27
|
+
* Holds the data for the {@link DriftUsdcController} Account and provides de/serialization
|
|
28
|
+
* functionality for that data
|
|
29
|
+
*
|
|
30
|
+
* @category Accounts
|
|
31
|
+
* @category generated
|
|
32
|
+
*/
|
|
33
|
+
export declare class DriftUsdcController implements DriftUsdcControllerArgs {
|
|
34
|
+
readonly baseStrategy: Strategy;
|
|
35
|
+
readonly baseDrift: DriftControllerBase;
|
|
36
|
+
readonly netUserFlowSinceCapture: beet.bignum;
|
|
37
|
+
readonly lastPoolValue: beet.bignum;
|
|
38
|
+
readonly effectiveSupply: beet.bignum;
|
|
39
|
+
readonly depositedVaultValue: beet.bignum;
|
|
40
|
+
private constructor();
|
|
41
|
+
/**
|
|
42
|
+
* Creates a {@link DriftUsdcController} instance from the provided args.
|
|
43
|
+
*/
|
|
44
|
+
static fromArgs(args: DriftUsdcControllerArgs): DriftUsdcController;
|
|
45
|
+
/**
|
|
46
|
+
* Deserializes the {@link DriftUsdcController} 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): [DriftUsdcController, number];
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the account info from the provided address and deserializes
|
|
52
|
+
* the {@link DriftUsdcController} 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<DriftUsdcController>;
|
|
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<{
|
|
64
|
+
accountDiscriminator: any;
|
|
65
|
+
baseStrategy: any;
|
|
66
|
+
baseDrift: any;
|
|
67
|
+
netUserFlowSinceCapture: any;
|
|
68
|
+
lastPoolValue: any;
|
|
69
|
+
effectiveSupply: any;
|
|
70
|
+
depositedVaultValue: any;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Deserializes the {@link DriftUsdcController} from the provided data Buffer.
|
|
74
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
75
|
+
*/
|
|
76
|
+
static deserialize(buf: Buffer, offset?: number): [DriftUsdcController, number];
|
|
77
|
+
/**
|
|
78
|
+
* Serializes the {@link DriftUsdcController} into a Buffer.
|
|
79
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
80
|
+
*/
|
|
81
|
+
serialize(): [Buffer, number];
|
|
82
|
+
/**
|
|
83
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
84
|
+
* {@link DriftUsdcController}
|
|
85
|
+
*/
|
|
86
|
+
static get byteSize(): number;
|
|
87
|
+
/**
|
|
88
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
89
|
+
* {@link DriftUsdcController} data from rent
|
|
90
|
+
*
|
|
91
|
+
* @param connection used to retrieve the rent exemption information
|
|
92
|
+
*/
|
|
93
|
+
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
94
|
+
/**
|
|
95
|
+
* Determines if the provided {@link Buffer} has the correct byte size to
|
|
96
|
+
* hold {@link DriftUsdcController} data.
|
|
97
|
+
*/
|
|
98
|
+
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Returns a readable version of {@link DriftUsdcController} properties
|
|
101
|
+
* and can be used to convert to JSON and/or logging
|
|
102
|
+
*/
|
|
103
|
+
pretty(): {
|
|
104
|
+
baseStrategy: Strategy;
|
|
105
|
+
baseDrift: DriftControllerBase;
|
|
106
|
+
netUserFlowSinceCapture: number | {
|
|
107
|
+
toNumber: () => number;
|
|
108
|
+
};
|
|
109
|
+
lastPoolValue: number | {
|
|
110
|
+
toNumber: () => number;
|
|
111
|
+
};
|
|
112
|
+
effectiveSupply: number | {
|
|
113
|
+
toNumber: () => number;
|
|
114
|
+
};
|
|
115
|
+
depositedVaultValue: number | {
|
|
116
|
+
toNumber: () => number;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @category Accounts
|
|
122
|
+
* @category generated
|
|
123
|
+
*/
|
|
124
|
+
export declare const driftUsdcControllerBeet: beet.BeetStruct<DriftUsdcController, DriftUsdcControllerArgs & {
|
|
125
|
+
accountDiscriminator: number[];
|
|
126
|
+
}>;
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
8
|
+
import * as web3 from '@solana/web3.js';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { AccessControl } from '../types/AccessControl';
|
|
11
|
+
import { SplMain } from '../types/SplMain';
|
|
12
|
+
import { Externals } from '../types/Externals';
|
|
13
|
+
/**
|
|
14
|
+
* Arguments used to create {@link Main}
|
|
15
|
+
* @category Accounts
|
|
16
|
+
* @category generated
|
|
17
|
+
*/
|
|
18
|
+
export type MainArgs = {
|
|
19
|
+
bump: number;
|
|
20
|
+
accessControl: AccessControl;
|
|
21
|
+
lstsMain: SplMain[];
|
|
22
|
+
externals: Externals;
|
|
23
|
+
strategyCounter: number;
|
|
24
|
+
};
|
|
25
|
+
export declare const mainDiscriminator: number[];
|
|
26
|
+
/**
|
|
27
|
+
* Holds the data for the {@link Main} Account and provides de/serialization
|
|
28
|
+
* functionality for that data
|
|
29
|
+
*
|
|
30
|
+
* @category Accounts
|
|
31
|
+
* @category generated
|
|
32
|
+
*/
|
|
33
|
+
export declare class Main implements MainArgs {
|
|
34
|
+
readonly bump: number;
|
|
35
|
+
readonly accessControl: AccessControl;
|
|
36
|
+
readonly lstsMain: SplMain[];
|
|
37
|
+
readonly externals: Externals;
|
|
38
|
+
readonly strategyCounter: number;
|
|
39
|
+
private constructor();
|
|
40
|
+
/**
|
|
41
|
+
* Creates a {@link Main} instance from the provided args.
|
|
42
|
+
*/
|
|
43
|
+
static fromArgs(args: MainArgs): Main;
|
|
44
|
+
/**
|
|
45
|
+
* Deserializes the {@link Main} from the data of the provided {@link web3.AccountInfo}.
|
|
46
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
47
|
+
*/
|
|
48
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Main, number];
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves the account info from the provided address and deserializes
|
|
51
|
+
* the {@link Main} from its data.
|
|
52
|
+
*
|
|
53
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
54
|
+
*/
|
|
55
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Main>;
|
|
56
|
+
/**
|
|
57
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
58
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
59
|
+
*
|
|
60
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
61
|
+
*/
|
|
62
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<MainArgs & {
|
|
63
|
+
accountDiscriminator: number[];
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* Deserializes the {@link Main} from the provided data Buffer.
|
|
67
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
68
|
+
*/
|
|
69
|
+
static deserialize(buf: Buffer, offset?: number): [Main, number];
|
|
70
|
+
/**
|
|
71
|
+
* Serializes the {@link Main} into a Buffer.
|
|
72
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
73
|
+
*/
|
|
74
|
+
serialize(): [Buffer, number];
|
|
75
|
+
/**
|
|
76
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
77
|
+
* {@link Main} for the provided args.
|
|
78
|
+
*
|
|
79
|
+
* @param args need to be provided since the byte size for this account
|
|
80
|
+
* depends on them
|
|
81
|
+
*/
|
|
82
|
+
static byteSize(args: MainArgs): number;
|
|
83
|
+
/**
|
|
84
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
85
|
+
* {@link Main} data from rent
|
|
86
|
+
*
|
|
87
|
+
* @param args need to be provided since the byte size for this account
|
|
88
|
+
* depends on them
|
|
89
|
+
* @param connection used to retrieve the rent exemption information
|
|
90
|
+
*/
|
|
91
|
+
static getMinimumBalanceForRentExemption(args: MainArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
92
|
+
/**
|
|
93
|
+
* Returns a readable version of {@link Main} properties
|
|
94
|
+
* and can be used to convert to JSON and/or logging
|
|
95
|
+
*/
|
|
96
|
+
pretty(): {
|
|
97
|
+
bump: number;
|
|
98
|
+
accessControl: AccessControl;
|
|
99
|
+
lstsMain: SplMain[];
|
|
100
|
+
externals: Externals;
|
|
101
|
+
strategyCounter: number;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @category Accounts
|
|
106
|
+
* @category generated
|
|
107
|
+
*/
|
|
108
|
+
export declare const mainBeet: beet.FixableBeetStruct<Main, MainArgs & {
|
|
109
|
+
accountDiscriminator: number[];
|
|
110
|
+
}>;
|
|
@@ -0,0 +1,226 @@
|
|
|
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
|
+
import * as web3 from '@solana/web3.js';
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
import { AMM } from '../types/AMM';
|
|
11
|
+
import { PoolBalance } from '../types/PoolBalance';
|
|
12
|
+
import { InsuranceClaim } from '../types/InsuranceClaim';
|
|
13
|
+
import { MarketStatus } from '../types/MarketStatus';
|
|
14
|
+
import { ContractType } from '../types/ContractType';
|
|
15
|
+
import { ContractTier } from '../types/ContractTier';
|
|
16
|
+
/**
|
|
17
|
+
* Arguments used to create {@link PerpMarket}
|
|
18
|
+
* @category Accounts
|
|
19
|
+
* @category generated
|
|
20
|
+
*/
|
|
21
|
+
export type PerpMarketArgs = {
|
|
22
|
+
pubkey: web3.PublicKey;
|
|
23
|
+
amm: AMM;
|
|
24
|
+
pnlPool: PoolBalance;
|
|
25
|
+
name: number[];
|
|
26
|
+
insuranceClaim: InsuranceClaim;
|
|
27
|
+
unrealizedPnlMaxImbalance: beet.bignum;
|
|
28
|
+
expiryTs: beet.bignum;
|
|
29
|
+
expiryPrice: beet.bignum;
|
|
30
|
+
nextFillRecordId: beet.bignum;
|
|
31
|
+
nextFundingRateRecordId: beet.bignum;
|
|
32
|
+
nextCurveRecordId: beet.bignum;
|
|
33
|
+
imfFactor: number;
|
|
34
|
+
unrealizedPnlImfFactor: number;
|
|
35
|
+
liquidatorFee: number;
|
|
36
|
+
ifLiquidationFee: number;
|
|
37
|
+
marginRatioInitial: number;
|
|
38
|
+
marginRatioMaintenance: number;
|
|
39
|
+
unrealizedPnlInitialAssetWeight: number;
|
|
40
|
+
unrealizedPnlMaintenanceAssetWeight: number;
|
|
41
|
+
numberOfUsersWithBase: number;
|
|
42
|
+
numberOfUsers: number;
|
|
43
|
+
marketIndex: number;
|
|
44
|
+
status: MarketStatus;
|
|
45
|
+
contractType: ContractType;
|
|
46
|
+
contractTier: ContractTier;
|
|
47
|
+
pausedOperations: number;
|
|
48
|
+
quoteSpotMarketIndex: number;
|
|
49
|
+
feeAdjustment: number;
|
|
50
|
+
padding: number[];
|
|
51
|
+
};
|
|
52
|
+
export declare const perpMarketDiscriminator: number[];
|
|
53
|
+
/**
|
|
54
|
+
* Holds the data for the {@link PerpMarket} Account and provides de/serialization
|
|
55
|
+
* functionality for that data
|
|
56
|
+
*
|
|
57
|
+
* @category Accounts
|
|
58
|
+
* @category generated
|
|
59
|
+
*/
|
|
60
|
+
export declare class PerpMarket implements PerpMarketArgs {
|
|
61
|
+
readonly pubkey: web3.PublicKey;
|
|
62
|
+
readonly amm: AMM;
|
|
63
|
+
readonly pnlPool: PoolBalance;
|
|
64
|
+
readonly name: number[];
|
|
65
|
+
readonly insuranceClaim: InsuranceClaim;
|
|
66
|
+
readonly unrealizedPnlMaxImbalance: beet.bignum;
|
|
67
|
+
readonly expiryTs: beet.bignum;
|
|
68
|
+
readonly expiryPrice: beet.bignum;
|
|
69
|
+
readonly nextFillRecordId: beet.bignum;
|
|
70
|
+
readonly nextFundingRateRecordId: beet.bignum;
|
|
71
|
+
readonly nextCurveRecordId: beet.bignum;
|
|
72
|
+
readonly imfFactor: number;
|
|
73
|
+
readonly unrealizedPnlImfFactor: number;
|
|
74
|
+
readonly liquidatorFee: number;
|
|
75
|
+
readonly ifLiquidationFee: number;
|
|
76
|
+
readonly marginRatioInitial: number;
|
|
77
|
+
readonly marginRatioMaintenance: number;
|
|
78
|
+
readonly unrealizedPnlInitialAssetWeight: number;
|
|
79
|
+
readonly unrealizedPnlMaintenanceAssetWeight: number;
|
|
80
|
+
readonly numberOfUsersWithBase: number;
|
|
81
|
+
readonly numberOfUsers: number;
|
|
82
|
+
readonly marketIndex: number;
|
|
83
|
+
readonly status: MarketStatus;
|
|
84
|
+
readonly contractType: ContractType;
|
|
85
|
+
readonly contractTier: ContractTier;
|
|
86
|
+
readonly pausedOperations: number;
|
|
87
|
+
readonly quoteSpotMarketIndex: number;
|
|
88
|
+
readonly feeAdjustment: number;
|
|
89
|
+
readonly padding: number[];
|
|
90
|
+
private constructor();
|
|
91
|
+
/**
|
|
92
|
+
* Creates a {@link PerpMarket} instance from the provided args.
|
|
93
|
+
*/
|
|
94
|
+
static fromArgs(args: PerpMarketArgs): PerpMarket;
|
|
95
|
+
/**
|
|
96
|
+
* Deserializes the {@link PerpMarket} from the data of the provided {@link web3.AccountInfo}.
|
|
97
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
98
|
+
*/
|
|
99
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [PerpMarket, number];
|
|
100
|
+
/**
|
|
101
|
+
* Retrieves the account info from the provided address and deserializes
|
|
102
|
+
* the {@link PerpMarket} from its data.
|
|
103
|
+
*
|
|
104
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
105
|
+
*/
|
|
106
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<PerpMarket>;
|
|
107
|
+
/**
|
|
108
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
109
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
110
|
+
*
|
|
111
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
112
|
+
*/
|
|
113
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
|
|
114
|
+
status: any;
|
|
115
|
+
marketIndex: any;
|
|
116
|
+
accountDiscriminator: any;
|
|
117
|
+
padding: any;
|
|
118
|
+
pubkey: any;
|
|
119
|
+
amm: any;
|
|
120
|
+
pnlPool: any;
|
|
121
|
+
name: any;
|
|
122
|
+
insuranceClaim: any;
|
|
123
|
+
unrealizedPnlMaxImbalance: any;
|
|
124
|
+
expiryTs: any;
|
|
125
|
+
expiryPrice: any;
|
|
126
|
+
nextFillRecordId: any;
|
|
127
|
+
nextFundingRateRecordId: any;
|
|
128
|
+
nextCurveRecordId: any;
|
|
129
|
+
imfFactor: any;
|
|
130
|
+
unrealizedPnlImfFactor: any;
|
|
131
|
+
liquidatorFee: any;
|
|
132
|
+
ifLiquidationFee: any;
|
|
133
|
+
marginRatioInitial: any;
|
|
134
|
+
marginRatioMaintenance: any;
|
|
135
|
+
unrealizedPnlInitialAssetWeight: any;
|
|
136
|
+
unrealizedPnlMaintenanceAssetWeight: any;
|
|
137
|
+
numberOfUsersWithBase: any;
|
|
138
|
+
numberOfUsers: any;
|
|
139
|
+
contractType: any;
|
|
140
|
+
contractTier: any;
|
|
141
|
+
pausedOperations: any;
|
|
142
|
+
quoteSpotMarketIndex: any;
|
|
143
|
+
feeAdjustment: any;
|
|
144
|
+
}>;
|
|
145
|
+
/**
|
|
146
|
+
* Deserializes the {@link PerpMarket} from the provided data Buffer.
|
|
147
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
148
|
+
*/
|
|
149
|
+
static deserialize(buf: Buffer, offset?: number): [PerpMarket, number];
|
|
150
|
+
/**
|
|
151
|
+
* Serializes the {@link PerpMarket} into a Buffer.
|
|
152
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
153
|
+
*/
|
|
154
|
+
serialize(): [Buffer, number];
|
|
155
|
+
/**
|
|
156
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
157
|
+
* {@link PerpMarket}
|
|
158
|
+
*/
|
|
159
|
+
static get byteSize(): number;
|
|
160
|
+
/**
|
|
161
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
162
|
+
* {@link PerpMarket} data from rent
|
|
163
|
+
*
|
|
164
|
+
* @param connection used to retrieve the rent exemption information
|
|
165
|
+
*/
|
|
166
|
+
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
167
|
+
/**
|
|
168
|
+
* Determines if the provided {@link Buffer} has the correct byte size to
|
|
169
|
+
* hold {@link PerpMarket} data.
|
|
170
|
+
*/
|
|
171
|
+
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Returns a readable version of {@link PerpMarket} properties
|
|
174
|
+
* and can be used to convert to JSON and/or logging
|
|
175
|
+
*/
|
|
176
|
+
pretty(): {
|
|
177
|
+
pubkey: string;
|
|
178
|
+
amm: AMM;
|
|
179
|
+
pnlPool: PoolBalance;
|
|
180
|
+
name: number[];
|
|
181
|
+
insuranceClaim: InsuranceClaim;
|
|
182
|
+
unrealizedPnlMaxImbalance: number | {
|
|
183
|
+
toNumber: () => number;
|
|
184
|
+
};
|
|
185
|
+
expiryTs: number | {
|
|
186
|
+
toNumber: () => number;
|
|
187
|
+
};
|
|
188
|
+
expiryPrice: number | {
|
|
189
|
+
toNumber: () => number;
|
|
190
|
+
};
|
|
191
|
+
nextFillRecordId: number | {
|
|
192
|
+
toNumber: () => number;
|
|
193
|
+
};
|
|
194
|
+
nextFundingRateRecordId: number | {
|
|
195
|
+
toNumber: () => number;
|
|
196
|
+
};
|
|
197
|
+
nextCurveRecordId: number | {
|
|
198
|
+
toNumber: () => number;
|
|
199
|
+
};
|
|
200
|
+
imfFactor: number;
|
|
201
|
+
unrealizedPnlImfFactor: number;
|
|
202
|
+
liquidatorFee: number;
|
|
203
|
+
ifLiquidationFee: number;
|
|
204
|
+
marginRatioInitial: number;
|
|
205
|
+
marginRatioMaintenance: number;
|
|
206
|
+
unrealizedPnlInitialAssetWeight: number;
|
|
207
|
+
unrealizedPnlMaintenanceAssetWeight: number;
|
|
208
|
+
numberOfUsersWithBase: number;
|
|
209
|
+
numberOfUsers: number;
|
|
210
|
+
marketIndex: number;
|
|
211
|
+
status: string;
|
|
212
|
+
contractType: string;
|
|
213
|
+
contractTier: string;
|
|
214
|
+
pausedOperations: number;
|
|
215
|
+
quoteSpotMarketIndex: number;
|
|
216
|
+
feeAdjustment: number;
|
|
217
|
+
padding: number[];
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* @category Accounts
|
|
222
|
+
* @category generated
|
|
223
|
+
*/
|
|
224
|
+
export declare const perpMarketBeet: beet.BeetStruct<PerpMarket, PerpMarketArgs & {
|
|
225
|
+
accountDiscriminator: number[];
|
|
226
|
+
}>;
|