@reflectmoney/stable.ts 1.1.0 → 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.
Files changed (178) hide show
  1. package/dist/classes/ReflectTokenisedBond.js +7 -0
  2. package/dist/stablecoins/LstStablecoin.js +14 -1
  3. package/dist/stablecoins/UsdcPlusStablecoin.js +6 -1
  4. package/package.json +1 -1
  5. package/dist/classes/PdaClient.d.ts +0 -131
  6. package/dist/classes/Reflect.d.ts +0 -7
  7. package/dist/classes/ReflectAdmin.d.ts +0 -104
  8. package/dist/classes/ReflectAdmin.js +0 -219
  9. package/dist/classes/ReflectKeeper.d.ts +0 -107
  10. package/dist/classes/ReflectTokenisedBond.d.ts +0 -75
  11. package/dist/classes/Stablecoin.d.ts +0 -187
  12. package/dist/classes/index.d.ts +0 -4
  13. package/dist/constants/drift.d.ts +0 -6
  14. package/dist/constants/index.d.ts +0 -7
  15. package/dist/constants/jupiter.d.ts +0 -4
  16. package/dist/constants/lookupTables.d.ts +0 -4
  17. package/dist/constants/lst.d.ts +0 -3
  18. package/dist/constants/pyth.d.ts +0 -1
  19. package/dist/constants/usdc.d.ts +0 -6
  20. package/dist/constants/wsol.d.ts +0 -6
  21. package/dist/errors/ReflectError.d.ts +0 -4
  22. package/dist/generated/reflect_main/accounts/DriftJlpController.d.ts +0 -116
  23. package/dist/generated/reflect_main/accounts/DriftLstController.d.ts +0 -110
  24. package/dist/generated/reflect_main/accounts/DriftUsdcController.d.ts +0 -136
  25. package/dist/generated/reflect_main/accounts/Main.d.ts +0 -112
  26. package/dist/generated/reflect_main/accounts/PerpMarket.d.ts +0 -228
  27. package/dist/generated/reflect_main/accounts/PrelaunchOracle.d.ts +0 -132
  28. package/dist/generated/reflect_main/accounts/PythLazerOracle.d.ts +0 -126
  29. package/dist/generated/reflect_main/accounts/RebalanceLst.d.ts +0 -113
  30. package/dist/generated/reflect_main/accounts/SpotMarket.d.ts +0 -379
  31. package/dist/generated/reflect_main/accounts/User.d.ts +0 -223
  32. package/dist/generated/reflect_main/accounts/UserPermissions.d.ts +0 -108
  33. package/dist/generated/reflect_main/accounts/UserStats.d.ts +0 -213
  34. package/dist/generated/reflect_main/accounts/index.d.ts +0 -38
  35. package/dist/generated/reflect_main/errors/index.d.ts +0 -969
  36. package/dist/generated/reflect_main/index.d.ts +0 -19
  37. package/dist/generated/reflect_main/instructions/addLstDrift.d.ts +0 -49
  38. package/dist/generated/reflect_main/instructions/addSubAccount.d.ts +0 -54
  39. package/dist/generated/reflect_main/instructions/captureSpreadDrift.d.ts +0 -66
  40. package/dist/generated/reflect_main/instructions/captureSpreadDriftS1.d.ts +0 -58
  41. package/dist/generated/reflect_main/instructions/createAdminAccount.d.ts +0 -51
  42. package/dist/generated/reflect_main/instructions/createUserStatsAccount.d.ts +0 -52
  43. package/dist/generated/reflect_main/instructions/depositDrift.d.ts +0 -73
  44. package/dist/generated/reflect_main/instructions/freezeProgram.d.ts +0 -54
  45. package/dist/generated/reflect_main/instructions/freezeProtocolAction.d.ts +0 -55
  46. package/dist/generated/reflect_main/instructions/freezeStrategyAction.d.ts +0 -58
  47. package/dist/generated/reflect_main/instructions/index.d.ts +0 -34
  48. package/dist/generated/reflect_main/instructions/initDriftAccountsS1.d.ts +0 -54
  49. package/dist/generated/reflect_main/instructions/initDriftControllerS1.d.ts +0 -60
  50. package/dist/generated/reflect_main/instructions/initDriftControllerS3.d.ts +0 -58
  51. package/dist/generated/reflect_main/instructions/initMain.d.ts +0 -43
  52. package/dist/generated/reflect_main/instructions/mintDriftS1.d.ts +0 -86
  53. package/dist/generated/reflect_main/instructions/mintDriftS3.d.ts +0 -86
  54. package/dist/generated/reflect_main/instructions/processSwapDeposit.d.ts +0 -69
  55. package/dist/generated/reflect_main/instructions/processSwapWithdraw.d.ts +0 -69
  56. package/dist/generated/reflect_main/instructions/redeemDriftS1.d.ts +0 -87
  57. package/dist/generated/reflect_main/instructions/redeemDriftS3.d.ts +0 -87
  58. package/dist/generated/reflect_main/instructions/settlePnl.d.ts +0 -55
  59. package/dist/generated/reflect_main/instructions/settlePnlMulti.d.ts +0 -65
  60. package/dist/generated/reflect_main/instructions/suspendSplProtocol.d.ts +0 -54
  61. package/dist/generated/reflect_main/instructions/suspendSplStrategy.d.ts +0 -56
  62. package/dist/generated/reflect_main/instructions/swapOrca.d.ts +0 -81
  63. package/dist/generated/reflect_main/instructions/swapOrcaTwoHop.d.ts +0 -101
  64. package/dist/generated/reflect_main/instructions/updateActionRoleProtocol.d.ts +0 -58
  65. package/dist/generated/reflect_main/instructions/updateActionRoleStrategy.d.ts +0 -60
  66. package/dist/generated/reflect_main/instructions/updateAttenuation.d.ts +0 -57
  67. package/dist/generated/reflect_main/instructions/updateCap.d.ts +0 -55
  68. package/dist/generated/reflect_main/instructions/updateRebalanceSlippage.d.ts +0 -55
  69. package/dist/generated/reflect_main/instructions/updateRecipients.d.ts +0 -56
  70. package/dist/generated/reflect_main/instructions/updateRoleHolderProtocol.d.ts +0 -60
  71. package/dist/generated/reflect_main/instructions/updateRoleHolderStrategy.d.ts +0 -60
  72. package/dist/generated/reflect_main/types/AMM.d.ts +0 -102
  73. package/dist/generated/reflect_main/types/AccKey.d.ts +0 -15
  74. package/dist/generated/reflect_main/types/AccessControl.d.ts +0 -18
  75. package/dist/generated/reflect_main/types/AccessMap.d.ts +0 -17
  76. package/dist/generated/reflect_main/types/Action.d.ts +0 -35
  77. package/dist/generated/reflect_main/types/ActionMapping.d.ts +0 -19
  78. package/dist/generated/reflect_main/types/AssetTier.d.ts +0 -23
  79. package/dist/generated/reflect_main/types/Attenuation.d.ts +0 -16
  80. package/dist/generated/reflect_main/types/BalanceType.d.ts +0 -20
  81. package/dist/generated/reflect_main/types/Capture.d.ts +0 -17
  82. package/dist/generated/reflect_main/types/ContractTier.d.ts +0 -24
  83. package/dist/generated/reflect_main/types/ContractType.d.ts +0 -20
  84. package/dist/generated/reflect_main/types/CorpAction.d.ts +0 -19
  85. package/dist/generated/reflect_main/types/CustodyInfo.d.ts +0 -20
  86. package/dist/generated/reflect_main/types/DirectionCollateral.d.ts +0 -20
  87. package/dist/generated/reflect_main/types/DirectionPosition.d.ts +0 -20
  88. package/dist/generated/reflect_main/types/DriftControllerBase.d.ts +0 -15
  89. package/dist/generated/reflect_main/types/DriftJlpControllerFixedAccounts.d.ts +0 -18
  90. package/dist/generated/reflect_main/types/DriftLstData.d.ts +0 -17
  91. package/dist/generated/reflect_main/types/Ema.d.ts +0 -17
  92. package/dist/generated/reflect_main/types/Externals.d.ts +0 -16
  93. package/dist/generated/reflect_main/types/FlowControl.d.ts +0 -17
  94. package/dist/generated/reflect_main/types/HistoricalIndexData.d.ts +0 -19
  95. package/dist/generated/reflect_main/types/HistoricalOracleData.d.ts +0 -20
  96. package/dist/generated/reflect_main/types/Holding.d.ts +0 -21
  97. package/dist/generated/reflect_main/types/Holdings.d.ts +0 -17
  98. package/dist/generated/reflect_main/types/InsuranceClaim.d.ts +0 -19
  99. package/dist/generated/reflect_main/types/InsuranceFund.d.ts +0 -24
  100. package/dist/generated/reflect_main/types/JlpRebalanceSettings.d.ts +0 -15
  101. package/dist/generated/reflect_main/types/KillSwitch.d.ts +0 -15
  102. package/dist/generated/reflect_main/types/LevelRoles.d.ts +0 -16
  103. package/dist/generated/reflect_main/types/MarketStatus.d.ts +0 -27
  104. package/dist/generated/reflect_main/types/MarketType.d.ts +0 -20
  105. package/dist/generated/reflect_main/types/ModifyOrderParams.d.ts +0 -32
  106. package/dist/generated/reflect_main/types/ModifyOrderPolicy.d.ts +0 -20
  107. package/dist/generated/reflect_main/types/Movements.d.ts +0 -19
  108. package/dist/generated/reflect_main/types/OracleGuardRails.d.ts +0 -18
  109. package/dist/generated/reflect_main/types/OracleSource.d.ts +0 -34
  110. package/dist/generated/reflect_main/types/OracleValidity.d.ts +0 -25
  111. package/dist/generated/reflect_main/types/Order.d.ts +0 -43
  112. package/dist/generated/reflect_main/types/OrderDirection.d.ts +0 -20
  113. package/dist/generated/reflect_main/types/OrderParams.d.ts +0 -36
  114. package/dist/generated/reflect_main/types/OrderStatus.d.ts +0 -22
  115. package/dist/generated/reflect_main/types/OrderTriggerCondition.d.ts +0 -22
  116. package/dist/generated/reflect_main/types/OrderType.d.ts +0 -23
  117. package/dist/generated/reflect_main/types/PermissionLevel.d.ts +0 -51
  118. package/dist/generated/reflect_main/types/PerpHedge.d.ts +0 -17
  119. package/dist/generated/reflect_main/types/PerpPosition.d.ts +0 -29
  120. package/dist/generated/reflect_main/types/PoolBalance.d.ts +0 -17
  121. package/dist/generated/reflect_main/types/Position.d.ts +0 -20
  122. package/dist/generated/reflect_main/types/PositionDirection.d.ts +0 -20
  123. package/dist/generated/reflect_main/types/PositionDrift.d.ts +0 -18
  124. package/dist/generated/reflect_main/types/PostOnlyParam.d.ts +0 -22
  125. package/dist/generated/reflect_main/types/Price.d.ts +0 -41
  126. package/dist/generated/reflect_main/types/PriceComp.d.ts +0 -19
  127. package/dist/generated/reflect_main/types/PriceDivergenceGuardRails.d.ts +0 -16
  128. package/dist/generated/reflect_main/types/PriceInfo.d.ts +0 -21
  129. package/dist/generated/reflect_main/types/PriceStatus.d.ts +0 -22
  130. package/dist/generated/reflect_main/types/PriceType.d.ts +0 -20
  131. package/dist/generated/reflect_main/types/Program.d.ts +0 -19
  132. package/dist/generated/reflect_main/types/ProgramStatus.d.ts +0 -20
  133. package/dist/generated/reflect_main/types/Recipient.d.ts +0 -17
  134. package/dist/generated/reflect_main/types/Recipients.d.ts +0 -17
  135. package/dist/generated/reflect_main/types/Role.d.ts +0 -25
  136. package/dist/generated/reflect_main/types/ShiftCollateral.d.ts +0 -19
  137. package/dist/generated/reflect_main/types/ShiftPosition.d.ts +0 -17
  138. package/dist/generated/reflect_main/types/ShortHolding.d.ts +0 -17
  139. package/dist/generated/reflect_main/types/SplBase.d.ts +0 -17
  140. package/dist/generated/reflect_main/types/SplMain.d.ts +0 -22
  141. package/dist/generated/reflect_main/types/Spls.d.ts +0 -17
  142. package/dist/generated/reflect_main/types/SpotBalanceType.d.ts +0 -20
  143. package/dist/generated/reflect_main/types/SpotPosition.d.ts +0 -23
  144. package/dist/generated/reflect_main/types/Status.d.ts +0 -21
  145. package/dist/generated/reflect_main/types/Strategy.d.ts +0 -32
  146. package/dist/generated/reflect_main/types/StrategyPadding.d.ts +0 -15
  147. package/dist/generated/reflect_main/types/StrategyRoleEntry.d.ts +0 -17
  148. package/dist/generated/reflect_main/types/SubAccount.d.ts +0 -17
  149. package/dist/generated/reflect_main/types/Update.d.ts +0 -20
  150. package/dist/generated/reflect_main/types/UserFees.d.ts +0 -20
  151. package/dist/generated/reflect_main/types/ValidityGuardRails.d.ts +0 -18
  152. package/dist/generated/reflect_main/types/index.d.ts +0 -80
  153. package/dist/generated/reflect_tokenised_bonds/accounts/Admin.d.ts +0 -101
  154. package/dist/generated/reflect_tokenised_bonds/accounts/Config.d.ts +0 -108
  155. package/dist/generated/reflect_tokenised_bonds/accounts/Vault.d.ts +0 -116
  156. package/dist/generated/reflect_tokenised_bonds/accounts/index.d.ts +0 -11
  157. package/dist/generated/reflect_tokenised_bonds/errors/index.d.ts +0 -144
  158. package/dist/generated/reflect_tokenised_bonds/index.d.ts +0 -19
  159. package/dist/generated/reflect_tokenised_bonds/instructions/createVault.d.ts +0 -50
  160. package/dist/generated/reflect_tokenised_bonds/instructions/deposit.d.ts +0 -62
  161. package/dist/generated/reflect_tokenised_bonds/instructions/index.d.ts +0 -4
  162. package/dist/generated/reflect_tokenised_bonds/instructions/initialize.d.ts +0 -43
  163. package/dist/generated/reflect_tokenised_bonds/instructions/withdraw.d.ts +0 -62
  164. package/dist/generated/reflect_tokenised_bonds/types/DepositArgs.d.ts +0 -17
  165. package/dist/generated/reflect_tokenised_bonds/types/Permissions.d.ts +0 -21
  166. package/dist/generated/reflect_tokenised_bonds/types/WithdrawArgs.d.ts +0 -16
  167. package/dist/generated/reflect_tokenised_bonds/types/index.d.ts +0 -3
  168. package/dist/helpers/getOrcaQuote.d.ts +0 -3
  169. package/dist/idl/perpetuals.d.ts +0 -5771
  170. package/dist/index.d.ts +0 -8
  171. package/dist/stablecoins/JlpStablecoin.d.ts +0 -1
  172. package/dist/stablecoins/JlpStablecoin.js +0 -44
  173. package/dist/stablecoins/LstStablecoin.d.ts +0 -65
  174. package/dist/stablecoins/UsdcPlusStablecoin.d.ts +0 -68
  175. package/dist/stablecoins/UsdcStablecoin.d.ts +0 -64
  176. package/dist/stablecoins/UsdcStablecoin.js +0 -145
  177. package/dist/stablecoins/UsdjStablecoin.d.ts +0 -1
  178. package/dist/stablecoins/index.d.ts +0 -3
@@ -1,126 +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
- /**
13
- * Arguments used to create {@link PythLazerOracle}
14
- * @category Accounts
15
- * @category generated
16
- */
17
- export type PythLazerOracleArgs = {
18
- price: beet.bignum;
19
- publishTime: beet.bignum;
20
- postedSlot: beet.bignum;
21
- exponent: number;
22
- padding: number[];
23
- conf: beet.bignum;
24
- };
25
- export declare const pythLazerOracleDiscriminator: number[];
26
- /**
27
- * Holds the data for the {@link PythLazerOracle} Account and provides de/serialization
28
- * functionality for that data
29
- *
30
- * @category Accounts
31
- * @category generated
32
- */
33
- export declare class PythLazerOracle implements PythLazerOracleArgs {
34
- readonly price: beet.bignum;
35
- readonly publishTime: beet.bignum;
36
- readonly postedSlot: beet.bignum;
37
- readonly exponent: number;
38
- readonly padding: number[];
39
- readonly conf: beet.bignum;
40
- private constructor();
41
- /**
42
- * Creates a {@link PythLazerOracle} instance from the provided args.
43
- */
44
- static fromArgs(args: PythLazerOracleArgs): PythLazerOracle;
45
- /**
46
- * Deserializes the {@link PythLazerOracle} 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): [PythLazerOracle, number];
50
- /**
51
- * Retrieves the account info from the provided address and deserializes
52
- * the {@link PythLazerOracle} 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<PythLazerOracle>;
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
- padding: any;
66
- price: any;
67
- publishTime: any;
68
- postedSlot: any;
69
- exponent: any;
70
- conf: any;
71
- }>;
72
- /**
73
- * Deserializes the {@link PythLazerOracle} 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): [PythLazerOracle, number];
77
- /**
78
- * Serializes the {@link PythLazerOracle} 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 PythLazerOracle}
85
- */
86
- static get byteSize(): number;
87
- /**
88
- * Fetches the minimum balance needed to exempt an account holding
89
- * {@link PythLazerOracle} 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 PythLazerOracle} data.
97
- */
98
- static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
99
- /**
100
- * Returns a readable version of {@link PythLazerOracle} properties
101
- * and can be used to convert to JSON and/or logging
102
- */
103
- pretty(): {
104
- price: number | {
105
- toNumber: () => number;
106
- };
107
- publishTime: number | {
108
- toNumber: () => number;
109
- };
110
- postedSlot: number | {
111
- toNumber: () => number;
112
- };
113
- exponent: number;
114
- padding: number[];
115
- conf: number | {
116
- toNumber: () => number;
117
- };
118
- };
119
- }
120
- /**
121
- * @category Accounts
122
- * @category generated
123
- */
124
- export declare const pythLazerOracleBeet: beet.BeetStruct<PythLazerOracle, PythLazerOracleArgs & {
125
- accountDiscriminator: number[];
126
- }>;
@@ -1,113 +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 { Movements } from '../types/Movements';
13
- import { Holdings } from '../types/Holdings';
14
- /**
15
- * Arguments used to create {@link RebalanceLst}
16
- * @category Accounts
17
- * @category generated
18
- */
19
- export type RebalanceLstArgs = {
20
- bump: number;
21
- subAccount: number;
22
- movements: Movements;
23
- assets: Holdings;
24
- creationSlot: beet.bignum;
25
- };
26
- export declare const rebalanceLstDiscriminator: number[];
27
- /**
28
- * Holds the data for the {@link RebalanceLst} Account and provides de/serialization
29
- * functionality for that data
30
- *
31
- * @category Accounts
32
- * @category generated
33
- */
34
- export declare class RebalanceLst implements RebalanceLstArgs {
35
- readonly bump: number;
36
- readonly subAccount: number;
37
- readonly movements: Movements;
38
- readonly assets: Holdings;
39
- readonly creationSlot: beet.bignum;
40
- private constructor();
41
- /**
42
- * Creates a {@link RebalanceLst} instance from the provided args.
43
- */
44
- static fromArgs(args: RebalanceLstArgs): RebalanceLst;
45
- /**
46
- * Deserializes the {@link RebalanceLst} 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): [RebalanceLst, number];
50
- /**
51
- * Retrieves the account info from the provided address and deserializes
52
- * the {@link RebalanceLst} 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<RebalanceLst>;
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<RebalanceLstArgs & {
64
- accountDiscriminator: number[];
65
- }>;
66
- /**
67
- * Deserializes the {@link RebalanceLst} 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): [RebalanceLst, number];
71
- /**
72
- * Serializes the {@link RebalanceLst} 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 RebalanceLst} 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: RebalanceLstArgs): number;
84
- /**
85
- * Fetches the minimum balance needed to exempt an account holding
86
- * {@link RebalanceLst} 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: RebalanceLstArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
93
- /**
94
- * Returns a readable version of {@link RebalanceLst} properties
95
- * and can be used to convert to JSON and/or logging
96
- */
97
- pretty(): {
98
- bump: number;
99
- subAccount: number;
100
- movements: Movements;
101
- assets: Holdings;
102
- creationSlot: number | {
103
- toNumber: () => number;
104
- };
105
- };
106
- }
107
- /**
108
- * @category Accounts
109
- * @category generated
110
- */
111
- export declare const rebalanceLstBeet: beet.FixableBeetStruct<RebalanceLst, RebalanceLstArgs & {
112
- accountDiscriminator: number[];
113
- }>;
@@ -1,379 +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 { HistoricalOracleData } from '../types/HistoricalOracleData';
13
- import { HistoricalIndexData } from '../types/HistoricalIndexData';
14
- import { PoolBalance } from '../types/PoolBalance';
15
- import { InsuranceFund } from '../types/InsuranceFund';
16
- import { OracleSource } from '../types/OracleSource';
17
- import { MarketStatus } from '../types/MarketStatus';
18
- import { AssetTier } from '../types/AssetTier';
19
- /**
20
- * Arguments used to create {@link SpotMarket}
21
- * @category Accounts
22
- * @category generated
23
- */
24
- export type SpotMarketArgs = {
25
- pubkey: web3.PublicKey;
26
- oracle: web3.PublicKey;
27
- mint: web3.PublicKey;
28
- vault: web3.PublicKey;
29
- name: number[];
30
- historicalOracleData: HistoricalOracleData;
31
- historicalIndexData: HistoricalIndexData;
32
- revenuePool: PoolBalance;
33
- spotFeePool: PoolBalance;
34
- insuranceFund: InsuranceFund;
35
- totalSpotFee: beet.bignum;
36
- depositBalance: beet.bignum;
37
- borrowBalance: beet.bignum;
38
- cumulativeDepositInterest: beet.bignum;
39
- cumulativeBorrowInterest: beet.bignum;
40
- totalSocialLoss: beet.bignum;
41
- totalQuoteSocialLoss: beet.bignum;
42
- withdrawGuardThreshold: beet.bignum;
43
- maxTokenDeposits: beet.bignum;
44
- depositTokenTwap: beet.bignum;
45
- borrowTokenTwap: beet.bignum;
46
- utilizationTwap: beet.bignum;
47
- lastInterestTs: beet.bignum;
48
- lastTwapTs: beet.bignum;
49
- expiryTs: beet.bignum;
50
- orderStepSize: beet.bignum;
51
- orderTickSize: beet.bignum;
52
- minOrderSize: beet.bignum;
53
- maxPositionSize: beet.bignum;
54
- nextFillRecordId: beet.bignum;
55
- nextDepositRecordId: beet.bignum;
56
- initialAssetWeight: number;
57
- maintenanceAssetWeight: number;
58
- initialLiabilityWeight: number;
59
- maintenanceLiabilityWeight: number;
60
- imfFactor: number;
61
- liquidatorFee: number;
62
- ifLiquidationFee: number;
63
- optimalUtilization: number;
64
- optimalBorrowRate: number;
65
- maxBorrowRate: number;
66
- decimals: number;
67
- marketIndex: number;
68
- ordersEnabled: boolean;
69
- oracleSource: OracleSource;
70
- status: MarketStatus;
71
- assetTier: AssetTier;
72
- pausedOperations: number;
73
- ifPausedOperations: number;
74
- feeAdjustment: number;
75
- maxTokenBorrowsFraction: number;
76
- flashLoanAmount: beet.bignum;
77
- flashLoanInitialTokenAmount: beet.bignum;
78
- totalSwapFee: beet.bignum;
79
- scaleInitialAssetWeightStart: beet.bignum;
80
- minBorrowRate: number;
81
- padding: number[];
82
- };
83
- export declare const spotMarketDiscriminator: number[];
84
- /**
85
- * Holds the data for the {@link SpotMarket} Account and provides de/serialization
86
- * functionality for that data
87
- *
88
- * @category Accounts
89
- * @category generated
90
- */
91
- export declare class SpotMarket implements SpotMarketArgs {
92
- readonly pubkey: web3.PublicKey;
93
- readonly oracle: web3.PublicKey;
94
- readonly mint: web3.PublicKey;
95
- readonly vault: web3.PublicKey;
96
- readonly name: number[];
97
- readonly historicalOracleData: HistoricalOracleData;
98
- readonly historicalIndexData: HistoricalIndexData;
99
- readonly revenuePool: PoolBalance;
100
- readonly spotFeePool: PoolBalance;
101
- readonly insuranceFund: InsuranceFund;
102
- readonly totalSpotFee: beet.bignum;
103
- readonly depositBalance: beet.bignum;
104
- readonly borrowBalance: beet.bignum;
105
- readonly cumulativeDepositInterest: beet.bignum;
106
- readonly cumulativeBorrowInterest: beet.bignum;
107
- readonly totalSocialLoss: beet.bignum;
108
- readonly totalQuoteSocialLoss: beet.bignum;
109
- readonly withdrawGuardThreshold: beet.bignum;
110
- readonly maxTokenDeposits: beet.bignum;
111
- readonly depositTokenTwap: beet.bignum;
112
- readonly borrowTokenTwap: beet.bignum;
113
- readonly utilizationTwap: beet.bignum;
114
- readonly lastInterestTs: beet.bignum;
115
- readonly lastTwapTs: beet.bignum;
116
- readonly expiryTs: beet.bignum;
117
- readonly orderStepSize: beet.bignum;
118
- readonly orderTickSize: beet.bignum;
119
- readonly minOrderSize: beet.bignum;
120
- readonly maxPositionSize: beet.bignum;
121
- readonly nextFillRecordId: beet.bignum;
122
- readonly nextDepositRecordId: beet.bignum;
123
- readonly initialAssetWeight: number;
124
- readonly maintenanceAssetWeight: number;
125
- readonly initialLiabilityWeight: number;
126
- readonly maintenanceLiabilityWeight: number;
127
- readonly imfFactor: number;
128
- readonly liquidatorFee: number;
129
- readonly ifLiquidationFee: number;
130
- readonly optimalUtilization: number;
131
- readonly optimalBorrowRate: number;
132
- readonly maxBorrowRate: number;
133
- readonly decimals: number;
134
- readonly marketIndex: number;
135
- readonly ordersEnabled: boolean;
136
- readonly oracleSource: OracleSource;
137
- readonly status: MarketStatus;
138
- readonly assetTier: AssetTier;
139
- readonly pausedOperations: number;
140
- readonly ifPausedOperations: number;
141
- readonly feeAdjustment: number;
142
- readonly maxTokenBorrowsFraction: number;
143
- readonly flashLoanAmount: beet.bignum;
144
- readonly flashLoanInitialTokenAmount: beet.bignum;
145
- readonly totalSwapFee: beet.bignum;
146
- readonly scaleInitialAssetWeightStart: beet.bignum;
147
- readonly minBorrowRate: number;
148
- readonly padding: number[];
149
- private constructor();
150
- /**
151
- * Creates a {@link SpotMarket} instance from the provided args.
152
- */
153
- static fromArgs(args: SpotMarketArgs): SpotMarket;
154
- /**
155
- * Deserializes the {@link SpotMarket} from the data of the provided {@link web3.AccountInfo}.
156
- * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
157
- */
158
- static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [SpotMarket, number];
159
- /**
160
- * Retrieves the account info from the provided address and deserializes
161
- * the {@link SpotMarket} from its data.
162
- *
163
- * @throws Error if no account info is found at the address or if deserialization fails
164
- */
165
- static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<SpotMarket>;
166
- /**
167
- * Provides a {@link web3.Connection.getProgramAccounts} config builder,
168
- * to fetch accounts matching filters that can be specified via that builder.
169
- *
170
- * @param programId - the program that owns the accounts we are filtering
171
- */
172
- static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
173
- status: any;
174
- mint: any;
175
- marketIndex: any;
176
- accountDiscriminator: any;
177
- vault: any;
178
- oracle: any;
179
- padding: any;
180
- historicalOracleData: any;
181
- totalSocialLoss: any;
182
- orderStepSize: any;
183
- orderTickSize: any;
184
- minOrderSize: any;
185
- maxPositionSize: any;
186
- oracleSource: any;
187
- pubkey: any;
188
- name: any;
189
- expiryTs: any;
190
- nextFillRecordId: any;
191
- imfFactor: any;
192
- liquidatorFee: any;
193
- ifLiquidationFee: any;
194
- pausedOperations: any;
195
- feeAdjustment: any;
196
- historicalIndexData: any;
197
- revenuePool: any;
198
- spotFeePool: any;
199
- insuranceFund: any;
200
- totalSpotFee: any;
201
- depositBalance: any;
202
- borrowBalance: any;
203
- cumulativeDepositInterest: any;
204
- cumulativeBorrowInterest: any;
205
- totalQuoteSocialLoss: any;
206
- withdrawGuardThreshold: any;
207
- maxTokenDeposits: any;
208
- depositTokenTwap: any;
209
- borrowTokenTwap: any;
210
- utilizationTwap: any;
211
- lastInterestTs: any;
212
- lastTwapTs: any;
213
- nextDepositRecordId: any;
214
- initialAssetWeight: any;
215
- maintenanceAssetWeight: any;
216
- initialLiabilityWeight: any;
217
- maintenanceLiabilityWeight: any;
218
- optimalUtilization: any;
219
- optimalBorrowRate: any;
220
- maxBorrowRate: any;
221
- decimals: any;
222
- ordersEnabled: any;
223
- assetTier: any;
224
- ifPausedOperations: any;
225
- maxTokenBorrowsFraction: any;
226
- flashLoanAmount: any;
227
- flashLoanInitialTokenAmount: any;
228
- totalSwapFee: any;
229
- scaleInitialAssetWeightStart: any;
230
- minBorrowRate: any;
231
- }>;
232
- /**
233
- * Deserializes the {@link SpotMarket} from the provided data Buffer.
234
- * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
235
- */
236
- static deserialize(buf: Buffer, offset?: number): [SpotMarket, number];
237
- /**
238
- * Serializes the {@link SpotMarket} into a Buffer.
239
- * @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
240
- */
241
- serialize(): [Buffer, number];
242
- /**
243
- * Returns the byteSize of a {@link Buffer} holding the serialized data of
244
- * {@link SpotMarket}
245
- */
246
- static get byteSize(): number;
247
- /**
248
- * Fetches the minimum balance needed to exempt an account holding
249
- * {@link SpotMarket} data from rent
250
- *
251
- * @param connection used to retrieve the rent exemption information
252
- */
253
- static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
254
- /**
255
- * Determines if the provided {@link Buffer} has the correct byte size to
256
- * hold {@link SpotMarket} data.
257
- */
258
- static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
259
- /**
260
- * Returns a readable version of {@link SpotMarket} properties
261
- * and can be used to convert to JSON and/or logging
262
- */
263
- pretty(): {
264
- pubkey: string;
265
- oracle: string;
266
- mint: string;
267
- vault: string;
268
- name: number[];
269
- historicalOracleData: HistoricalOracleData;
270
- historicalIndexData: HistoricalIndexData;
271
- revenuePool: PoolBalance;
272
- spotFeePool: PoolBalance;
273
- insuranceFund: InsuranceFund;
274
- totalSpotFee: number | {
275
- toNumber: () => number;
276
- };
277
- depositBalance: number | {
278
- toNumber: () => number;
279
- };
280
- borrowBalance: number | {
281
- toNumber: () => number;
282
- };
283
- cumulativeDepositInterest: number | {
284
- toNumber: () => number;
285
- };
286
- cumulativeBorrowInterest: number | {
287
- toNumber: () => number;
288
- };
289
- totalSocialLoss: number | {
290
- toNumber: () => number;
291
- };
292
- totalQuoteSocialLoss: number | {
293
- toNumber: () => number;
294
- };
295
- withdrawGuardThreshold: number | {
296
- toNumber: () => number;
297
- };
298
- maxTokenDeposits: number | {
299
- toNumber: () => number;
300
- };
301
- depositTokenTwap: number | {
302
- toNumber: () => number;
303
- };
304
- borrowTokenTwap: number | {
305
- toNumber: () => number;
306
- };
307
- utilizationTwap: number | {
308
- toNumber: () => number;
309
- };
310
- lastInterestTs: number | {
311
- toNumber: () => number;
312
- };
313
- lastTwapTs: number | {
314
- toNumber: () => number;
315
- };
316
- expiryTs: number | {
317
- toNumber: () => number;
318
- };
319
- orderStepSize: number | {
320
- toNumber: () => number;
321
- };
322
- orderTickSize: number | {
323
- toNumber: () => number;
324
- };
325
- minOrderSize: number | {
326
- toNumber: () => number;
327
- };
328
- maxPositionSize: number | {
329
- toNumber: () => number;
330
- };
331
- nextFillRecordId: number | {
332
- toNumber: () => number;
333
- };
334
- nextDepositRecordId: number | {
335
- toNumber: () => number;
336
- };
337
- initialAssetWeight: number;
338
- maintenanceAssetWeight: number;
339
- initialLiabilityWeight: number;
340
- maintenanceLiabilityWeight: number;
341
- imfFactor: number;
342
- liquidatorFee: number;
343
- ifLiquidationFee: number;
344
- optimalUtilization: number;
345
- optimalBorrowRate: number;
346
- maxBorrowRate: number;
347
- decimals: number;
348
- marketIndex: number;
349
- ordersEnabled: boolean;
350
- oracleSource: string;
351
- status: string;
352
- assetTier: string;
353
- pausedOperations: number;
354
- ifPausedOperations: number;
355
- feeAdjustment: number;
356
- maxTokenBorrowsFraction: number;
357
- flashLoanAmount: number | {
358
- toNumber: () => number;
359
- };
360
- flashLoanInitialTokenAmount: number | {
361
- toNumber: () => number;
362
- };
363
- totalSwapFee: number | {
364
- toNumber: () => number;
365
- };
366
- scaleInitialAssetWeightStart: number | {
367
- toNumber: () => number;
368
- };
369
- minBorrowRate: number;
370
- padding: number[];
371
- };
372
- }
373
- /**
374
- * @category Accounts
375
- * @category generated
376
- */
377
- export declare const spotMarketBeet: beet.BeetStruct<SpotMarket, SpotMarketArgs & {
378
- accountDiscriminator: number[];
379
- }>;