@reflectmoney/stable.ts 1.1.3 → 1.1.5
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 +84 -0
- package/dist/classes/ApiClient.js +24 -2
- 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/ReflectKeeper.js +4 -3
- package/dist/classes/ReflectTokenisedBond.d.ts +75 -0
- package/dist/classes/Stablecoin.d.ts +219 -0
- package/dist/classes/index.d.ts +5 -0
- package/dist/classes/index.js +1 -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/lookupTables.js +1 -1
- 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/DriftJlpController.js +1 -1
- package/dist/generated/reflect_main/accounts/DriftLstController.d.ts +108 -0
- package/dist/generated/reflect_main/accounts/DriftLstController.js +1 -1
- package/dist/generated/reflect_main/accounts/DriftUsdcController.d.ts +107 -0
- package/dist/generated/reflect_main/accounts/DriftUsdcController.js +8 -60
- package/dist/generated/reflect_main/accounts/Main.d.ts +110 -0
- package/dist/generated/reflect_main/accounts/Main.js +1 -1
- package/dist/generated/reflect_main/accounts/PerpMarket.d.ts +226 -0
- package/dist/generated/reflect_main/accounts/PerpMarket.js +1 -1
- package/dist/generated/reflect_main/accounts/PrelaunchOracle.d.ts +130 -0
- package/dist/generated/reflect_main/accounts/PrelaunchOracle.js +1 -1
- package/dist/generated/reflect_main/accounts/PythLazerOracle.d.ts +124 -0
- package/dist/generated/reflect_main/accounts/PythLazerOracle.js +1 -1
- package/dist/generated/reflect_main/accounts/RebalanceLst.d.ts +111 -0
- package/dist/generated/reflect_main/accounts/RebalanceLst.js +1 -1
- package/dist/generated/reflect_main/accounts/SpotMarket.d.ts +377 -0
- package/dist/generated/reflect_main/accounts/SpotMarket.js +1 -1
- package/dist/generated/reflect_main/accounts/User.d.ts +221 -0
- package/dist/generated/reflect_main/accounts/User.js +1 -1
- package/dist/generated/reflect_main/accounts/UserPermissions.d.ts +106 -0
- package/dist/generated/reflect_main/accounts/UserPermissions.js +1 -1
- package/dist/generated/reflect_main/accounts/UserStats.d.ts +211 -0
- package/dist/generated/reflect_main/accounts/UserStats.js +1 -1
- 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/errors/index.js +133 -133
- package/dist/generated/reflect_main/index.d.ts +19 -0
- package/dist/generated/reflect_main/index.js +1 -1
- package/dist/generated/reflect_main/instructions/addLstDrift.d.ts +49 -0
- package/dist/generated/reflect_main/instructions/addLstDrift.js +1 -1
- package/dist/generated/reflect_main/instructions/addSubAccount.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/addSubAccount.js +1 -1
- package/dist/generated/reflect_main/instructions/captureSpreadDrift.d.ts +66 -0
- package/dist/generated/reflect_main/instructions/captureSpreadDrift.js +3 -3
- package/dist/generated/reflect_main/instructions/captureSpreadDriftS1.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/createAdminAccount.d.ts +52 -0
- package/dist/generated/reflect_main/instructions/createAdminAccount.js +2 -1
- package/dist/generated/reflect_main/instructions/createUserStatsAccount.d.ts +52 -0
- package/dist/generated/reflect_main/instructions/createUserStatsAccount.js +1 -1
- package/dist/generated/reflect_main/instructions/depositDrift.d.ts +73 -0
- package/dist/generated/reflect_main/instructions/depositDrift.js +1 -1
- package/dist/generated/reflect_main/instructions/freezeProgram.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/freezeProgram.js +1 -1
- package/dist/generated/reflect_main/instructions/freezeProtocolAction.d.ts +55 -0
- package/dist/generated/reflect_main/instructions/freezeProtocolAction.js +1 -1
- package/dist/generated/reflect_main/instructions/freezeStrategyAction.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/freezeStrategyAction.js +1 -1
- package/dist/generated/reflect_main/instructions/increaseAdminSize.d.ts +51 -0
- package/dist/generated/reflect_main/instructions/increaseAdminSize.js +89 -0
- package/dist/generated/reflect_main/instructions/index.d.ts +34 -0
- package/dist/generated/reflect_main/instructions/index.js +1 -1
- package/dist/generated/reflect_main/instructions/initDriftAccountsS1.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/initDriftAccountsS1.js +1 -1
- package/dist/generated/reflect_main/instructions/initDriftControllerS1.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/initDriftControllerS1.js +1 -1
- package/dist/generated/reflect_main/instructions/initDriftControllerS3.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/initDriftControllerS3.js +1 -1
- package/dist/generated/reflect_main/instructions/initMain.d.ts +43 -0
- package/dist/generated/reflect_main/instructions/initMain.js +1 -1
- package/dist/generated/reflect_main/instructions/mintDriftS1.d.ts +86 -0
- package/dist/generated/reflect_main/instructions/mintDriftS1.js +1 -1
- package/dist/generated/reflect_main/instructions/mintDriftS3.d.ts +86 -0
- package/dist/generated/reflect_main/instructions/mintDriftS3.js +1 -1
- package/dist/generated/reflect_main/instructions/processSwapDeposit.d.ts +69 -0
- package/dist/generated/reflect_main/instructions/processSwapDeposit.js +1 -1
- package/dist/generated/reflect_main/instructions/processSwapWithdraw.d.ts +69 -0
- package/dist/generated/reflect_main/instructions/processSwapWithdraw.js +1 -1
- package/dist/generated/reflect_main/instructions/redeemDriftS1.d.ts +87 -0
- package/dist/generated/reflect_main/instructions/redeemDriftS1.js +1 -1
- package/dist/generated/reflect_main/instructions/redeemDriftS3.d.ts +87 -0
- package/dist/generated/reflect_main/instructions/redeemDriftS3.js +1 -1
- package/dist/generated/reflect_main/instructions/settlePnl.d.ts +50 -0
- package/dist/generated/reflect_main/instructions/settlePnl.js +1 -10
- package/dist/generated/reflect_main/instructions/settlePnlMulti.d.ts +60 -0
- package/dist/generated/reflect_main/instructions/settlePnlMulti.js +1 -10
- package/dist/generated/reflect_main/instructions/suspendSplProtocol.d.ts +54 -0
- package/dist/generated/reflect_main/instructions/suspendSplProtocol.js +1 -1
- package/dist/generated/reflect_main/instructions/suspendSplStrategy.d.ts +56 -0
- package/dist/generated/reflect_main/instructions/suspendSplStrategy.js +1 -1
- package/dist/generated/reflect_main/instructions/swapOrca.d.ts +81 -0
- package/dist/generated/reflect_main/instructions/swapOrca.js +1 -1
- package/dist/generated/reflect_main/instructions/swapOrcaTwoHop.d.ts +101 -0
- package/dist/generated/reflect_main/instructions/swapOrcaTwoHop.js +1 -1
- package/dist/generated/reflect_main/instructions/updateActionRoleProtocol.d.ts +58 -0
- package/dist/generated/reflect_main/instructions/updateActionRoleProtocol.js +1 -1
- package/dist/generated/reflect_main/instructions/updateActionRoleStrategy.d.ts +60 -0
- package/dist/generated/reflect_main/instructions/updateActionRoleStrategy.js +1 -1
- package/dist/generated/reflect_main/instructions/updateAttenuation.d.ts +57 -0
- package/dist/generated/reflect_main/instructions/updateAttenuation.js +1 -1
- package/dist/generated/reflect_main/instructions/updateCap.d.ts +55 -0
- package/dist/generated/reflect_main/instructions/updateCap.js +1 -1
- package/dist/generated/reflect_main/instructions/updateRebalanceSlippage.d.ts +55 -0
- package/dist/generated/reflect_main/instructions/updateRebalanceSlippage.js +1 -1
- package/dist/generated/reflect_main/instructions/updateRecipients.d.ts +56 -0
- package/dist/generated/reflect_main/instructions/updateRecipients.js +1 -1
- package/dist/generated/reflect_main/instructions/updateRoleHolderProtocol.d.ts +60 -0
- package/dist/generated/reflect_main/instructions/updateRoleHolderProtocol.js +1 -1
- package/dist/generated/reflect_main/instructions/updateRoleHolderStrategy.d.ts +60 -0
- package/dist/generated/reflect_main/instructions/updateRoleHolderStrategy.js +1 -1
- 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/AutoCompound.d.ts +18 -0
- package/dist/generated/reflect_main/types/AutoCompound.js +43 -0
- package/dist/generated/reflect_main/types/BalanceType.d.ts +20 -0
- package/dist/generated/reflect_main/types/Capture.d.ts +19 -0
- package/dist/generated/reflect_main/types/Capture.js +2 -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/OrderParams.js +1 -1
- 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 +34 -0
- package/dist/generated/reflect_main/types/Strategy.js +2 -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/YieldDistribution.d.ts +20 -0
- package/dist/generated/reflect_main/types/YieldDistribution.js +47 -0
- package/dist/generated/reflect_main/types/index.d.ts +82 -0
- package/dist/generated/reflect_main/types/index.js +2 -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 +10 -0
- package/dist/index.js +1 -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/tsconfig.tsbuildinfo +1 -0
- package/dist/types/api.d.ts +1384 -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 +2 -2
|
@@ -37,6 +37,7 @@ const AccessControl_1 = require("./AccessControl");
|
|
|
37
37
|
const FlowControl_1 = require("./FlowControl");
|
|
38
38
|
const Spls_1 = require("./Spls");
|
|
39
39
|
const Recipients_1 = require("./Recipients");
|
|
40
|
+
const Capture_1 = require("./Capture");
|
|
40
41
|
const StrategyPadding_1 = require("./StrategyPadding");
|
|
41
42
|
/**
|
|
42
43
|
* @category userTypes
|
|
@@ -52,6 +53,7 @@ exports.strategyBeet = new beet.BeetArgsStruct([
|
|
|
52
53
|
['flow', FlowControl_1.flowControlBeet],
|
|
53
54
|
['spls', Spls_1.splsBeet],
|
|
54
55
|
['recipients', Recipients_1.recipientsBeet],
|
|
56
|
+
['capture', Capture_1.captureBeet],
|
|
55
57
|
['rebalanceSlipagge', beet.u32],
|
|
56
58
|
['reserved', StrategyPadding_1.strategyPaddingBeet],
|
|
57
59
|
], 'Strategy');
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export type StrategyPadding = {
|
|
9
|
+
reserved: number[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @category userTypes
|
|
13
|
+
* @category generated
|
|
14
|
+
*/
|
|
15
|
+
export declare const strategyPaddingBeet: beet.BeetArgsStruct<StrategyPadding>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { LevelRoles } from './LevelRoles';
|
|
9
|
+
export type StrategyRoleEntry = {
|
|
10
|
+
strategyId: number;
|
|
11
|
+
roles: LevelRoles;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @category userTypes
|
|
15
|
+
* @category generated
|
|
16
|
+
*/
|
|
17
|
+
export declare const strategyRoleEntryBeet: beet.FixableBeetArgsStruct<StrategyRoleEntry>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export type SubAccount = {
|
|
9
|
+
subAccountIdx: number;
|
|
10
|
+
lstsLoaded: number;
|
|
11
|
+
driftTokenLoaded: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @category userTypes
|
|
15
|
+
* @category generated
|
|
16
|
+
*/
|
|
17
|
+
export declare const subAccountBeet: beet.BeetArgsStruct<SubAccount>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* @category enums
|
|
10
|
+
* @category generated
|
|
11
|
+
*/
|
|
12
|
+
export declare enum Update {
|
|
13
|
+
Add = 0,
|
|
14
|
+
Remove = 1
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @category userTypes
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export declare const updateBeet: beet.FixedSizeBeet<Update, Update>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
export type UserFees = {
|
|
9
|
+
totalFeePaid: beet.bignum;
|
|
10
|
+
totalFeeRebate: beet.bignum;
|
|
11
|
+
totalTokenDiscount: beet.bignum;
|
|
12
|
+
totalRefereeDiscount: beet.bignum;
|
|
13
|
+
totalReferrerReward: beet.bignum;
|
|
14
|
+
currentEpochReferrerReward: beet.bignum;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @category userTypes
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export declare const userFeesBeet: beet.BeetArgsStruct<UserFees>;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export type ValidityGuardRails = {
|
|
9
|
+
slotsBeforeStaleForAmm: beet.bignum;
|
|
10
|
+
slotsBeforeStaleForMargin: beet.bignum;
|
|
11
|
+
confidenceIntervalMaxSize: beet.bignum;
|
|
12
|
+
tooVolatileRatio: beet.bignum;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @category userTypes
|
|
16
|
+
* @category generated
|
|
17
|
+
*/
|
|
18
|
+
export declare const validityGuardRailsBeet: beet.BeetArgsStruct<ValidityGuardRails>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* @category enums
|
|
10
|
+
* @category generated
|
|
11
|
+
*/
|
|
12
|
+
export declare enum YieldDistribution {
|
|
13
|
+
NORMAL = 0,
|
|
14
|
+
AUTOCOMPOUND = 1
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @category userTypes
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export declare const yieldDistributionBeet: beet.FixedSizeBeet<YieldDistribution, YieldDistribution>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was GENERATED using the solita package.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
5
|
+
*
|
|
6
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.yieldDistributionBeet = exports.YieldDistribution = void 0;
|
|
33
|
+
const beet = __importStar(require("@metaplex-foundation/beet"));
|
|
34
|
+
/**
|
|
35
|
+
* @category enums
|
|
36
|
+
* @category generated
|
|
37
|
+
*/
|
|
38
|
+
var YieldDistribution;
|
|
39
|
+
(function (YieldDistribution) {
|
|
40
|
+
YieldDistribution[YieldDistribution["NORMAL"] = 0] = "NORMAL";
|
|
41
|
+
YieldDistribution[YieldDistribution["AUTOCOMPOUND"] = 1] = "AUTOCOMPOUND";
|
|
42
|
+
})(YieldDistribution || (exports.YieldDistribution = YieldDistribution = {}));
|
|
43
|
+
/**
|
|
44
|
+
* @category userTypes
|
|
45
|
+
* @category generated
|
|
46
|
+
*/
|
|
47
|
+
exports.yieldDistributionBeet = beet.fixedScalarEnum(YieldDistribution);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export * from './AMM';
|
|
2
|
+
export * from './AccKey';
|
|
3
|
+
export * from './AccessControl';
|
|
4
|
+
export * from './AccessMap';
|
|
5
|
+
export * from './Action';
|
|
6
|
+
export * from './ActionMapping';
|
|
7
|
+
export * from './AssetTier';
|
|
8
|
+
export * from './Attenuation';
|
|
9
|
+
export * from './AutoCompound';
|
|
10
|
+
export * from './BalanceType';
|
|
11
|
+
export * from './Capture';
|
|
12
|
+
export * from './ContractTier';
|
|
13
|
+
export * from './ContractType';
|
|
14
|
+
export * from './CorpAction';
|
|
15
|
+
export * from './CustodyInfo';
|
|
16
|
+
export * from './DirectionCollateral';
|
|
17
|
+
export * from './DirectionPosition';
|
|
18
|
+
export * from './DriftControllerBase';
|
|
19
|
+
export * from './DriftJlpControllerFixedAccounts';
|
|
20
|
+
export * from './DriftLstData';
|
|
21
|
+
export * from './Ema';
|
|
22
|
+
export * from './Externals';
|
|
23
|
+
export * from './FlowControl';
|
|
24
|
+
export * from './HistoricalIndexData';
|
|
25
|
+
export * from './HistoricalOracleData';
|
|
26
|
+
export * from './Holding';
|
|
27
|
+
export * from './Holdings';
|
|
28
|
+
export * from './InsuranceClaim';
|
|
29
|
+
export * from './InsuranceFund';
|
|
30
|
+
export * from './JlpRebalanceSettings';
|
|
31
|
+
export * from './KillSwitch';
|
|
32
|
+
export * from './LevelRoles';
|
|
33
|
+
export * from './MarketStatus';
|
|
34
|
+
export * from './MarketType';
|
|
35
|
+
export * from './ModifyOrderParams';
|
|
36
|
+
export * from './ModifyOrderPolicy';
|
|
37
|
+
export * from './Movements';
|
|
38
|
+
export * from './OracleGuardRails';
|
|
39
|
+
export * from './OracleSource';
|
|
40
|
+
export * from './OracleValidity';
|
|
41
|
+
export * from './Order';
|
|
42
|
+
export * from './OrderDirection';
|
|
43
|
+
export * from './OrderParams';
|
|
44
|
+
export * from './OrderStatus';
|
|
45
|
+
export * from './OrderTriggerCondition';
|
|
46
|
+
export * from './OrderType';
|
|
47
|
+
export * from './PermissionLevel';
|
|
48
|
+
export * from './PerpHedge';
|
|
49
|
+
export * from './PerpPosition';
|
|
50
|
+
export * from './PoolBalance';
|
|
51
|
+
export * from './Position';
|
|
52
|
+
export * from './PositionDirection';
|
|
53
|
+
export * from './PositionDrift';
|
|
54
|
+
export * from './PostOnlyParam';
|
|
55
|
+
export * from './Price';
|
|
56
|
+
export * from './PriceComp';
|
|
57
|
+
export * from './PriceDivergenceGuardRails';
|
|
58
|
+
export * from './PriceInfo';
|
|
59
|
+
export * from './PriceStatus';
|
|
60
|
+
export * from './PriceType';
|
|
61
|
+
export * from './Program';
|
|
62
|
+
export * from './ProgramStatus';
|
|
63
|
+
export * from './Recipient';
|
|
64
|
+
export * from './Recipients';
|
|
65
|
+
export * from './Role';
|
|
66
|
+
export * from './ShiftCollateral';
|
|
67
|
+
export * from './ShiftPosition';
|
|
68
|
+
export * from './ShortHolding';
|
|
69
|
+
export * from './SplBase';
|
|
70
|
+
export * from './SplMain';
|
|
71
|
+
export * from './Spls';
|
|
72
|
+
export * from './SpotBalanceType';
|
|
73
|
+
export * from './SpotPosition';
|
|
74
|
+
export * from './Status';
|
|
75
|
+
export * from './Strategy';
|
|
76
|
+
export * from './StrategyPadding';
|
|
77
|
+
export * from './StrategyRoleEntry';
|
|
78
|
+
export * from './SubAccount';
|
|
79
|
+
export * from './Update';
|
|
80
|
+
export * from './UserFees';
|
|
81
|
+
export * from './ValidityGuardRails';
|
|
82
|
+
export * from './YieldDistribution';
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./Action"), exports);
|
|
|
22
22
|
__exportStar(require("./ActionMapping"), exports);
|
|
23
23
|
__exportStar(require("./AssetTier"), exports);
|
|
24
24
|
__exportStar(require("./Attenuation"), exports);
|
|
25
|
+
__exportStar(require("./AutoCompound"), exports);
|
|
25
26
|
__exportStar(require("./BalanceType"), exports);
|
|
26
27
|
__exportStar(require("./Capture"), exports);
|
|
27
28
|
__exportStar(require("./ContractTier"), exports);
|
|
@@ -94,3 +95,4 @@ __exportStar(require("./SubAccount"), exports);
|
|
|
94
95
|
__exportStar(require("./Update"), exports);
|
|
95
96
|
__exportStar(require("./UserFees"), exports);
|
|
96
97
|
__exportStar(require("./ValidityGuardRails"), exports);
|
|
98
|
+
__exportStar(require("./YieldDistribution"), exports);
|
|
@@ -0,0 +1,99 @@
|
|
|
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 beetSolana from '@metaplex-foundation/beet-solana';
|
|
9
|
+
import * as beet from '@metaplex-foundation/beet';
|
|
10
|
+
import { Permissions } from '../types/Permissions';
|
|
11
|
+
/**
|
|
12
|
+
* Arguments used to create {@link Admin}
|
|
13
|
+
* @category Accounts
|
|
14
|
+
* @category generated
|
|
15
|
+
*/
|
|
16
|
+
export type AdminArgs = {
|
|
17
|
+
pubkey: web3.PublicKey;
|
|
18
|
+
permissions: Permissions[];
|
|
19
|
+
};
|
|
20
|
+
export declare const adminDiscriminator: number[];
|
|
21
|
+
/**
|
|
22
|
+
* Holds the data for the {@link Admin} Account and provides de/serialization
|
|
23
|
+
* functionality for that data
|
|
24
|
+
*
|
|
25
|
+
* @category Accounts
|
|
26
|
+
* @category generated
|
|
27
|
+
*/
|
|
28
|
+
export declare class Admin implements AdminArgs {
|
|
29
|
+
readonly pubkey: web3.PublicKey;
|
|
30
|
+
readonly permissions: Permissions[];
|
|
31
|
+
private constructor();
|
|
32
|
+
/**
|
|
33
|
+
* Creates a {@link Admin} instance from the provided args.
|
|
34
|
+
*/
|
|
35
|
+
static fromArgs(args: AdminArgs): Admin;
|
|
36
|
+
/**
|
|
37
|
+
* Deserializes the {@link Admin} from the data of the provided {@link web3.AccountInfo}.
|
|
38
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
39
|
+
*/
|
|
40
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Admin, number];
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves the account info from the provided address and deserializes
|
|
43
|
+
* the {@link Admin} from its data.
|
|
44
|
+
*
|
|
45
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
46
|
+
*/
|
|
47
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Admin>;
|
|
48
|
+
/**
|
|
49
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
50
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
51
|
+
*
|
|
52
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
53
|
+
*/
|
|
54
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<AdminArgs & {
|
|
55
|
+
accountDiscriminator: number[];
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Deserializes the {@link Admin} from the provided data Buffer.
|
|
59
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
60
|
+
*/
|
|
61
|
+
static deserialize(buf: Buffer, offset?: number): [Admin, number];
|
|
62
|
+
/**
|
|
63
|
+
* Serializes the {@link Admin} into a Buffer.
|
|
64
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
65
|
+
*/
|
|
66
|
+
serialize(): [Buffer, number];
|
|
67
|
+
/**
|
|
68
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
69
|
+
* {@link Admin} for the provided args.
|
|
70
|
+
*
|
|
71
|
+
* @param args need to be provided since the byte size for this account
|
|
72
|
+
* depends on them
|
|
73
|
+
*/
|
|
74
|
+
static byteSize(args: AdminArgs): number;
|
|
75
|
+
/**
|
|
76
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
77
|
+
* {@link Admin} data from rent
|
|
78
|
+
*
|
|
79
|
+
* @param args need to be provided since the byte size for this account
|
|
80
|
+
* depends on them
|
|
81
|
+
* @param connection used to retrieve the rent exemption information
|
|
82
|
+
*/
|
|
83
|
+
static getMinimumBalanceForRentExemption(args: AdminArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns a readable version of {@link Admin} properties
|
|
86
|
+
* and can be used to convert to JSON and/or logging
|
|
87
|
+
*/
|
|
88
|
+
pretty(): {
|
|
89
|
+
pubkey: string;
|
|
90
|
+
permissions: Permissions[];
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @category Accounts
|
|
95
|
+
* @category generated
|
|
96
|
+
*/
|
|
97
|
+
export declare const adminBeet: beet.FixableBeetStruct<Admin, AdminArgs & {
|
|
98
|
+
accountDiscriminator: number[];
|
|
99
|
+
}>;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* Arguments used to create {@link Config}
|
|
12
|
+
* @category Accounts
|
|
13
|
+
* @category generated
|
|
14
|
+
*/
|
|
15
|
+
export type ConfigArgs = {
|
|
16
|
+
bump: number;
|
|
17
|
+
vaults: beet.bignum;
|
|
18
|
+
frozen: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const configDiscriminator: number[];
|
|
21
|
+
/**
|
|
22
|
+
* Holds the data for the {@link Config} Account and provides de/serialization
|
|
23
|
+
* functionality for that data
|
|
24
|
+
*
|
|
25
|
+
* @category Accounts
|
|
26
|
+
* @category generated
|
|
27
|
+
*/
|
|
28
|
+
export declare class Config implements ConfigArgs {
|
|
29
|
+
readonly bump: number;
|
|
30
|
+
readonly vaults: beet.bignum;
|
|
31
|
+
readonly frozen: boolean;
|
|
32
|
+
private constructor();
|
|
33
|
+
/**
|
|
34
|
+
* Creates a {@link Config} instance from the provided args.
|
|
35
|
+
*/
|
|
36
|
+
static fromArgs(args: ConfigArgs): Config;
|
|
37
|
+
/**
|
|
38
|
+
* Deserializes the {@link Config} from the data of the provided {@link web3.AccountInfo}.
|
|
39
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
40
|
+
*/
|
|
41
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Config, number];
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves the account info from the provided address and deserializes
|
|
44
|
+
* the {@link Config} from its data.
|
|
45
|
+
*
|
|
46
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
47
|
+
*/
|
|
48
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Config>;
|
|
49
|
+
/**
|
|
50
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
51
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
52
|
+
*
|
|
53
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
54
|
+
*/
|
|
55
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
|
|
56
|
+
frozen: any;
|
|
57
|
+
bump: any;
|
|
58
|
+
accountDiscriminator: any;
|
|
59
|
+
vaults: any;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Deserializes the {@link Config} from the provided data Buffer.
|
|
63
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
64
|
+
*/
|
|
65
|
+
static deserialize(buf: Buffer, offset?: number): [Config, number];
|
|
66
|
+
/**
|
|
67
|
+
* Serializes the {@link Config} into a Buffer.
|
|
68
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
69
|
+
*/
|
|
70
|
+
serialize(): [Buffer, number];
|
|
71
|
+
/**
|
|
72
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
73
|
+
* {@link Config}
|
|
74
|
+
*/
|
|
75
|
+
static get byteSize(): number;
|
|
76
|
+
/**
|
|
77
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
78
|
+
* {@link Config} data from rent
|
|
79
|
+
*
|
|
80
|
+
* @param connection used to retrieve the rent exemption information
|
|
81
|
+
*/
|
|
82
|
+
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
83
|
+
/**
|
|
84
|
+
* Determines if the provided {@link Buffer} has the correct byte size to
|
|
85
|
+
* hold {@link Config} data.
|
|
86
|
+
*/
|
|
87
|
+
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Returns a readable version of {@link Config} properties
|
|
90
|
+
* and can be used to convert to JSON and/or logging
|
|
91
|
+
*/
|
|
92
|
+
pretty(): {
|
|
93
|
+
bump: number;
|
|
94
|
+
vaults: number | {
|
|
95
|
+
toNumber: () => number;
|
|
96
|
+
};
|
|
97
|
+
frozen: boolean;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* @category Accounts
|
|
102
|
+
* @category generated
|
|
103
|
+
*/
|
|
104
|
+
export declare const configBeet: beet.BeetStruct<Config, ConfigArgs & {
|
|
105
|
+
accountDiscriminator: number[];
|
|
106
|
+
}>;
|
|
@@ -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 beet from '@metaplex-foundation/beet';
|
|
8
|
+
import * as web3 from '@solana/web3.js';
|
|
9
|
+
import * as beetSolana from '@metaplex-foundation/beet-solana';
|
|
10
|
+
/**
|
|
11
|
+
* Arguments used to create {@link Vault}
|
|
12
|
+
* @category Accounts
|
|
13
|
+
* @category generated
|
|
14
|
+
*/
|
|
15
|
+
export type VaultArgs = {
|
|
16
|
+
bump: number;
|
|
17
|
+
index: beet.bignum;
|
|
18
|
+
creator: web3.PublicKey;
|
|
19
|
+
depositTokenMint: web3.PublicKey;
|
|
20
|
+
receiptTokenMint: web3.PublicKey;
|
|
21
|
+
};
|
|
22
|
+
export declare const vaultDiscriminator: number[];
|
|
23
|
+
/**
|
|
24
|
+
* Holds the data for the {@link Vault} Account and provides de/serialization
|
|
25
|
+
* functionality for that data
|
|
26
|
+
*
|
|
27
|
+
* @category Accounts
|
|
28
|
+
* @category generated
|
|
29
|
+
*/
|
|
30
|
+
export declare class Vault implements VaultArgs {
|
|
31
|
+
readonly bump: number;
|
|
32
|
+
readonly index: beet.bignum;
|
|
33
|
+
readonly creator: web3.PublicKey;
|
|
34
|
+
readonly depositTokenMint: web3.PublicKey;
|
|
35
|
+
readonly receiptTokenMint: web3.PublicKey;
|
|
36
|
+
private constructor();
|
|
37
|
+
/**
|
|
38
|
+
* Creates a {@link Vault} instance from the provided args.
|
|
39
|
+
*/
|
|
40
|
+
static fromArgs(args: VaultArgs): Vault;
|
|
41
|
+
/**
|
|
42
|
+
* Deserializes the {@link Vault} from the data of the provided {@link web3.AccountInfo}.
|
|
43
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
44
|
+
*/
|
|
45
|
+
static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Vault, number];
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves the account info from the provided address and deserializes
|
|
48
|
+
* the {@link Vault} from its data.
|
|
49
|
+
*
|
|
50
|
+
* @throws Error if no account info is found at the address or if deserialization fails
|
|
51
|
+
*/
|
|
52
|
+
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Vault>;
|
|
53
|
+
/**
|
|
54
|
+
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
|
|
55
|
+
* to fetch accounts matching filters that can be specified via that builder.
|
|
56
|
+
*
|
|
57
|
+
* @param programId - the program that owns the accounts we are filtering
|
|
58
|
+
*/
|
|
59
|
+
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
|
|
60
|
+
index: any;
|
|
61
|
+
bump: any;
|
|
62
|
+
accountDiscriminator: any;
|
|
63
|
+
creator: any;
|
|
64
|
+
depositTokenMint: any;
|
|
65
|
+
receiptTokenMint: any;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Deserializes the {@link Vault} from the provided data Buffer.
|
|
69
|
+
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
|
|
70
|
+
*/
|
|
71
|
+
static deserialize(buf: Buffer, offset?: number): [Vault, number];
|
|
72
|
+
/**
|
|
73
|
+
* Serializes the {@link Vault} into a Buffer.
|
|
74
|
+
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
|
|
75
|
+
*/
|
|
76
|
+
serialize(): [Buffer, number];
|
|
77
|
+
/**
|
|
78
|
+
* Returns the byteSize of a {@link Buffer} holding the serialized data of
|
|
79
|
+
* {@link Vault}
|
|
80
|
+
*/
|
|
81
|
+
static get byteSize(): number;
|
|
82
|
+
/**
|
|
83
|
+
* Fetches the minimum balance needed to exempt an account holding
|
|
84
|
+
* {@link Vault} data from rent
|
|
85
|
+
*
|
|
86
|
+
* @param connection used to retrieve the rent exemption information
|
|
87
|
+
*/
|
|
88
|
+
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
|
|
89
|
+
/**
|
|
90
|
+
* Determines if the provided {@link Buffer} has the correct byte size to
|
|
91
|
+
* hold {@link Vault} data.
|
|
92
|
+
*/
|
|
93
|
+
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Returns a readable version of {@link Vault} properties
|
|
96
|
+
* and can be used to convert to JSON and/or logging
|
|
97
|
+
*/
|
|
98
|
+
pretty(): {
|
|
99
|
+
bump: number;
|
|
100
|
+
index: number | {
|
|
101
|
+
toNumber: () => number;
|
|
102
|
+
};
|
|
103
|
+
creator: string;
|
|
104
|
+
depositTokenMint: string;
|
|
105
|
+
receiptTokenMint: string;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @category Accounts
|
|
110
|
+
* @category generated
|
|
111
|
+
*/
|
|
112
|
+
export declare const vaultBeet: beet.BeetStruct<Vault, VaultArgs & {
|
|
113
|
+
accountDiscriminator: number[];
|
|
114
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './Admin';
|
|
2
|
+
export * from './Config';
|
|
3
|
+
export * from './Vault';
|
|
4
|
+
import { Admin } from './Admin';
|
|
5
|
+
import { Config } from './Config';
|
|
6
|
+
import { Vault } from './Vault';
|
|
7
|
+
export declare const accountProviders: {
|
|
8
|
+
Admin: typeof Admin;
|
|
9
|
+
Config: typeof Config;
|
|
10
|
+
Vault: typeof Vault;
|
|
11
|
+
};
|