@reflectmoney/stable.ts 1.0.1 → 1.0.3
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/README.md +108 -84
- package/dist/classes/ReflectKeeper.d.ts +104 -0
- package/dist/classes/ReflectKeeper.js +219 -0
- package/dist/classes/Stablecoin.d.ts +3 -1
- package/dist/classes/Stablecoin.js +2 -1
- package/dist/classes/index.d.ts +1 -1
- package/dist/classes/index.js +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/lookupTables.d.ts +4 -0
- package/dist/constants/lookupTables.js +7 -0
- package/dist/stablecoins/LstStablecoin.js +1 -1
- package/dist/stablecoins/UsdcPlusStablecoin.d.ts +66 -0
- package/dist/stablecoins/UsdcPlusStablecoin.js +197 -0
- package/dist/stablecoins/UsdjStablecoin.d.ts +1 -0
- package/dist/stablecoins/UsdjStablecoin.js +44 -0
- package/dist/stablecoins/index.d.ts +2 -2
- package/dist/stablecoins/index.js +2 -2
- package/package.json +1 -1
- package/dist/classes/Strategy.d.ts +0 -30
- package/dist/classes/Strategy.js +0 -196
- package/dist/generated/accounts/DriftJlpController.d.ts +0 -114
- package/dist/generated/accounts/DriftJlpController.js +0 -169
- package/dist/generated/accounts/DriftLstController.d.ts +0 -108
- package/dist/generated/accounts/DriftLstController.js +0 -165
- package/dist/generated/accounts/DriftUsdcController.d.ts +0 -102
- package/dist/generated/accounts/DriftUsdcController.js +0 -158
- package/dist/generated/accounts/Main.d.ts +0 -110
- package/dist/generated/accounts/Main.js +0 -165
- package/dist/generated/accounts/PerpMarket.d.ts +0 -226
- package/dist/generated/accounts/PerpMarket.js +0 -307
- package/dist/generated/accounts/PrelaunchOracle.d.ts +0 -130
- package/dist/generated/accounts/PrelaunchOracle.js +0 -224
- package/dist/generated/accounts/PythLazerOracle.d.ts +0 -124
- package/dist/generated/accounts/PythLazerOracle.js +0 -210
- package/dist/generated/accounts/RebalanceLst.d.ts +0 -111
- package/dist/generated/accounts/RebalanceLst.js +0 -175
- package/dist/generated/accounts/SpotMarket.d.ts +0 -377
- package/dist/generated/accounts/SpotMarket.js +0 -601
- package/dist/generated/accounts/User.d.ts +0 -221
- package/dist/generated/accounts/User.js +0 -331
- package/dist/generated/accounts/UserPermissions.d.ts +0 -106
- package/dist/generated/accounts/UserPermissions.js +0 -161
- package/dist/generated/accounts/UserStats.d.ts +0 -211
- package/dist/generated/accounts/UserStats.js +0 -323
- package/dist/generated/accounts/index.d.ts +0 -38
- package/dist/generated/accounts/index.js +0 -55
- package/dist/generated/errors/index.d.ts +0 -1024
- package/dist/generated/errors/index.js +0 -1761
- package/dist/generated/index.d.ts +0 -19
- package/dist/generated/index.js +0 -36
- package/dist/generated/instructions/addLstDrift.d.ts +0 -49
- package/dist/generated/instructions/addLstDrift.js +0 -106
- package/dist/generated/instructions/addSubAccount.d.ts +0 -54
- package/dist/generated/instructions/addSubAccount.js +0 -121
- package/dist/generated/instructions/adjustHedgeS2.d.ts +0 -69
- package/dist/generated/instructions/adjustHedgeS2.js +0 -157
- package/dist/generated/instructions/captureSpreadDrift.d.ts +0 -56
- package/dist/generated/instructions/captureSpreadDrift.js +0 -120
- package/dist/generated/instructions/createAdminAccount.d.ts +0 -53
- package/dist/generated/instructions/createAdminAccount.js +0 -95
- package/dist/generated/instructions/createUserStatsAccount.d.ts +0 -54
- package/dist/generated/instructions/createUserStatsAccount.js +0 -121
- package/dist/generated/instructions/depositDrift.d.ts +0 -73
- package/dist/generated/instructions/depositDrift.js +0 -142
- package/dist/generated/instructions/freezeProgram.d.ts +0 -54
- package/dist/generated/instructions/freezeProgram.js +0 -95
- package/dist/generated/instructions/freezeProtocolAction.d.ts +0 -55
- package/dist/generated/instructions/freezeProtocolAction.js +0 -96
- package/dist/generated/instructions/freezeStrategyAction.d.ts +0 -58
- package/dist/generated/instructions/freezeStrategyAction.js +0 -102
- package/dist/generated/instructions/index.d.ts +0 -41
- package/dist/generated/instructions/index.js +0 -57
- package/dist/generated/instructions/initDriftAccountsS1.d.ts +0 -56
- package/dist/generated/instructions/initDriftAccountsS1.js +0 -126
- package/dist/generated/instructions/initDriftControllerS1.d.ts +0 -60
- package/dist/generated/instructions/initDriftControllerS1.js +0 -108
- package/dist/generated/instructions/initDriftControllerS2.d.ts +0 -66
- package/dist/generated/instructions/initDriftControllerS2.js +0 -125
- package/dist/generated/instructions/initDriftControllerS3.d.ts +0 -58
- package/dist/generated/instructions/initDriftControllerS3.js +0 -103
- package/dist/generated/instructions/initMain.d.ts +0 -43
- package/dist/generated/instructions/initMain.js +0 -91
- package/dist/generated/instructions/mintDriftS1.d.ts +0 -90
- package/dist/generated/instructions/mintDriftS1.js +0 -184
- package/dist/generated/instructions/mintDriftS2.d.ts +0 -80
- package/dist/generated/instructions/mintDriftS2.js +0 -161
- package/dist/generated/instructions/mintDriftS3.d.ts +0 -86
- package/dist/generated/instructions/mintDriftS3.js +0 -174
- package/dist/generated/instructions/processSwapDeposit.d.ts +0 -79
- package/dist/generated/instructions/processSwapDeposit.js +0 -161
- package/dist/generated/instructions/processSwapDepositIntrospection.d.ts +0 -79
- package/dist/generated/instructions/processSwapDepositIntrospection.js +0 -161
- package/dist/generated/instructions/processSwapWithdraw.d.ts +0 -68
- package/dist/generated/instructions/processSwapWithdraw.js +0 -157
- package/dist/generated/instructions/processSwapWithdrawIntrospection.d.ts +0 -68
- package/dist/generated/instructions/processSwapWithdrawIntrospection.js +0 -157
- package/dist/generated/instructions/rebalanceJlp.d.ts +0 -81
- package/dist/generated/instructions/rebalanceJlp.js +0 -187
- package/dist/generated/instructions/redeem2DriftS2.d.ts +0 -80
- package/dist/generated/instructions/redeem2DriftS2.js +0 -161
- package/dist/generated/instructions/redeemDriftS1.d.ts +0 -91
- package/dist/generated/instructions/redeemDriftS1.js +0 -185
- package/dist/generated/instructions/redeemDriftS2.d.ts +0 -80
- package/dist/generated/instructions/redeemDriftS2.js +0 -161
- package/dist/generated/instructions/redeemDriftS3.d.ts +0 -87
- package/dist/generated/instructions/redeemDriftS3.js +0 -175
- package/dist/generated/instructions/settlePnl.d.ts +0 -55
- package/dist/generated/instructions/settlePnl.js +0 -114
- package/dist/generated/instructions/settlePnlMulti.d.ts +0 -65
- package/dist/generated/instructions/settlePnlMulti.js +0 -117
- package/dist/generated/instructions/suspendLstProtocol.d.ts +0 -54
- package/dist/generated/instructions/suspendLstProtocol.js +0 -96
- package/dist/generated/instructions/suspendLstStrategy.d.ts +0 -56
- package/dist/generated/instructions/suspendLstStrategy.js +0 -101
- package/dist/generated/instructions/swapOrca.d.ts +0 -78
- package/dist/generated/instructions/swapOrca.js +0 -153
- package/dist/generated/instructions/swapOrcaTwoHop.d.ts +0 -98
- package/dist/generated/instructions/swapOrcaTwoHop.js +0 -200
- package/dist/generated/instructions/updateActionRoleProtocol.d.ts +0 -58
- package/dist/generated/instructions/updateActionRoleProtocol.js +0 -99
- package/dist/generated/instructions/updateActionRoleStrategy.d.ts +0 -61
- package/dist/generated/instructions/updateActionRoleStrategy.js +0 -105
- package/dist/generated/instructions/updateAttenuation.d.ts +0 -56
- package/dist/generated/instructions/updateAttenuation.js +0 -100
- package/dist/generated/instructions/updateCap.d.ts +0 -55
- package/dist/generated/instructions/updateCap.js +0 -99
- package/dist/generated/instructions/updateRebalanceSlippage.d.ts +0 -55
- package/dist/generated/instructions/updateRebalanceSlippage.js +0 -99
- package/dist/generated/instructions/updateRecipients.d.ts +0 -56
- package/dist/generated/instructions/updateRecipients.js +0 -101
- package/dist/generated/instructions/updateRoleHolderProtocol.d.ts +0 -61
- package/dist/generated/instructions/updateRoleHolderProtocol.js +0 -109
- package/dist/generated/instructions/updateRoleHolderStrategy.d.ts +0 -62
- package/dist/generated/instructions/updateRoleHolderStrategy.js +0 -110
- package/dist/generated/types/AMM.d.ts +0 -102
- package/dist/generated/types/AMM.js +0 -127
- package/dist/generated/types/AccKey.d.ts +0 -15
- package/dist/generated/types/AccKey.js +0 -38
- package/dist/generated/types/AccessControl.d.ts +0 -18
- package/dist/generated/types/AccessControl.js +0 -43
- package/dist/generated/types/AccessMap.d.ts +0 -17
- package/dist/generated/types/AccessMap.js +0 -42
- package/dist/generated/types/Action.d.ts +0 -36
- package/dist/generated/types/Action.js +0 -63
- package/dist/generated/types/ActionMapping.d.ts +0 -19
- package/dist/generated/types/ActionMapping.js +0 -44
- package/dist/generated/types/AssetTier.d.ts +0 -23
- package/dist/generated/types/AssetTier.js +0 -50
- package/dist/generated/types/Attenuation.d.ts +0 -16
- package/dist/generated/types/Attenuation.js +0 -41
- package/dist/generated/types/BalanceType.d.ts +0 -20
- package/dist/generated/types/BalanceType.js +0 -47
- package/dist/generated/types/ContractTier.d.ts +0 -24
- package/dist/generated/types/ContractTier.js +0 -51
- package/dist/generated/types/ContractType.d.ts +0 -20
- package/dist/generated/types/ContractType.js +0 -47
- package/dist/generated/types/CorpAction.d.ts +0 -19
- package/dist/generated/types/CorpAction.js +0 -46
- package/dist/generated/types/CustodyInfo.d.ts +0 -20
- package/dist/generated/types/CustodyInfo.js +0 -45
- package/dist/generated/types/DirectionCollateral.d.ts +0 -20
- package/dist/generated/types/DirectionCollateral.js +0 -47
- package/dist/generated/types/DirectionPosition.d.ts +0 -20
- package/dist/generated/types/DirectionPosition.js +0 -47
- package/dist/generated/types/DriftControllerBase.d.ts +0 -15
- package/dist/generated/types/DriftControllerBase.js +0 -38
- package/dist/generated/types/DriftJlpControllerFixedAccounts.d.ts +0 -18
- package/dist/generated/types/DriftJlpControllerFixedAccounts.js +0 -43
- package/dist/generated/types/DriftLstData.d.ts +0 -17
- package/dist/generated/types/DriftLstData.js +0 -42
- package/dist/generated/types/Ema.d.ts +0 -17
- package/dist/generated/types/Ema.js +0 -42
- package/dist/generated/types/Externals.d.ts +0 -16
- package/dist/generated/types/Externals.js +0 -39
- package/dist/generated/types/HistoricalIndexData.d.ts +0 -19
- package/dist/generated/types/HistoricalIndexData.js +0 -44
- package/dist/generated/types/HistoricalOracleData.d.ts +0 -20
- package/dist/generated/types/HistoricalOracleData.js +0 -45
- package/dist/generated/types/Holding.d.ts +0 -21
- package/dist/generated/types/Holding.js +0 -46
- package/dist/generated/types/Holdings.d.ts +0 -17
- package/dist/generated/types/Holdings.js +0 -42
- package/dist/generated/types/InitControllerS2Args.d.ts +0 -23
- package/dist/generated/types/InitControllerS2Args.js +0 -48
- package/dist/generated/types/InsuranceClaim.d.ts +0 -19
- package/dist/generated/types/InsuranceClaim.js +0 -44
- package/dist/generated/types/InsuranceFund.d.ts +0 -24
- package/dist/generated/types/InsuranceFund.js +0 -49
- package/dist/generated/types/JlpRebalanceSettings.d.ts +0 -15
- package/dist/generated/types/JlpRebalanceSettings.js +0 -38
- package/dist/generated/types/KillSwitch.d.ts +0 -15
- package/dist/generated/types/KillSwitch.js +0 -38
- package/dist/generated/types/LevelRoles.d.ts +0 -16
- package/dist/generated/types/LevelRoles.js +0 -39
- package/dist/generated/types/MarketStatus.d.ts +0 -27
- package/dist/generated/types/MarketStatus.js +0 -54
- package/dist/generated/types/MarketType.d.ts +0 -20
- package/dist/generated/types/MarketType.js +0 -47
- package/dist/generated/types/MintJlpArgs.d.ts +0 -15
- package/dist/generated/types/MintJlpArgs.js +0 -38
- package/dist/generated/types/ModifyOrderParams.d.ts +0 -32
- package/dist/generated/types/ModifyOrderParams.js +0 -57
- package/dist/generated/types/ModifyOrderPolicy.d.ts +0 -20
- package/dist/generated/types/ModifyOrderPolicy.js +0 -47
- package/dist/generated/types/Movements.d.ts +0 -19
- package/dist/generated/types/Movements.js +0 -44
- package/dist/generated/types/OracleGuardRails.d.ts +0 -18
- package/dist/generated/types/OracleGuardRails.js +0 -43
- package/dist/generated/types/OracleSource.d.ts +0 -34
- package/dist/generated/types/OracleSource.js +0 -61
- package/dist/generated/types/OracleValidity.d.ts +0 -25
- package/dist/generated/types/OracleValidity.js +0 -52
- package/dist/generated/types/Order.d.ts +0 -43
- package/dist/generated/types/Order.js +0 -68
- package/dist/generated/types/OrderDirection.d.ts +0 -20
- package/dist/generated/types/OrderDirection.js +0 -47
- package/dist/generated/types/OrderParams.d.ts +0 -36
- package/dist/generated/types/OrderParams.js +0 -61
- package/dist/generated/types/OrderStatus.d.ts +0 -22
- package/dist/generated/types/OrderStatus.js +0 -49
- package/dist/generated/types/OrderTriggerCondition.d.ts +0 -22
- package/dist/generated/types/OrderTriggerCondition.js +0 -49
- package/dist/generated/types/OrderType.d.ts +0 -23
- package/dist/generated/types/OrderType.js +0 -50
- package/dist/generated/types/PermissionLevel.d.ts +0 -45
- package/dist/generated/types/PermissionLevel.js +0 -48
- package/dist/generated/types/PerpHedge.d.ts +0 -17
- package/dist/generated/types/PerpHedge.js +0 -42
- package/dist/generated/types/PerpPosition.d.ts +0 -29
- package/dist/generated/types/PerpPosition.js +0 -54
- package/dist/generated/types/PoolBalance.d.ts +0 -17
- package/dist/generated/types/PoolBalance.js +0 -42
- package/dist/generated/types/Position.d.ts +0 -20
- package/dist/generated/types/Position.js +0 -45
- package/dist/generated/types/PositionDirection.d.ts +0 -20
- package/dist/generated/types/PositionDirection.js +0 -47
- package/dist/generated/types/PositionDrift.d.ts +0 -18
- package/dist/generated/types/PositionDrift.js +0 -43
- package/dist/generated/types/PostOnlyParam.d.ts +0 -22
- package/dist/generated/types/PostOnlyParam.js +0 -49
- package/dist/generated/types/Price.d.ts +0 -41
- package/dist/generated/types/Price.js +0 -66
- package/dist/generated/types/PriceComp.d.ts +0 -19
- package/dist/generated/types/PriceComp.js +0 -44
- package/dist/generated/types/PriceDivergenceGuardRails.d.ts +0 -16
- package/dist/generated/types/PriceDivergenceGuardRails.js +0 -41
- package/dist/generated/types/PriceInfo.d.ts +0 -21
- package/dist/generated/types/PriceInfo.js +0 -46
- package/dist/generated/types/PriceStatus.d.ts +0 -22
- package/dist/generated/types/PriceStatus.js +0 -49
- package/dist/generated/types/PriceType.d.ts +0 -20
- package/dist/generated/types/PriceType.js +0 -47
- package/dist/generated/types/ProcessSwapDepositArgs.d.ts +0 -15
- package/dist/generated/types/ProcessSwapDepositArgs.js +0 -38
- package/dist/generated/types/ProcessSwapDepositIntrospectionArgs.d.ts +0 -15
- package/dist/generated/types/ProcessSwapDepositIntrospectionArgs.js +0 -38
- package/dist/generated/types/Program.d.ts +0 -19
- package/dist/generated/types/Program.js +0 -44
- package/dist/generated/types/ProgramStatus.d.ts +0 -20
- package/dist/generated/types/ProgramStatus.js +0 -47
- package/dist/generated/types/RebalanceConfig.d.ts +0 -15
- package/dist/generated/types/RebalanceConfig.js +0 -38
- package/dist/generated/types/Recipient.d.ts +0 -17
- package/dist/generated/types/Recipient.js +0 -42
- package/dist/generated/types/Recipients.d.ts +0 -17
- package/dist/generated/types/Recipients.js +0 -42
- package/dist/generated/types/RedeemJlpArgs.d.ts +0 -15
- package/dist/generated/types/RedeemJlpArgs.js +0 -38
- package/dist/generated/types/Role.d.ts +0 -25
- package/dist/generated/types/Role.js +0 -52
- package/dist/generated/types/ShiftCollateral.d.ts +0 -19
- package/dist/generated/types/ShiftCollateral.js +0 -44
- package/dist/generated/types/ShiftPosition.d.ts +0 -17
- package/dist/generated/types/ShiftPosition.js +0 -42
- package/dist/generated/types/ShortHolding.d.ts +0 -17
- package/dist/generated/types/ShortHolding.js +0 -42
- package/dist/generated/types/SplBase.d.ts +0 -17
- package/dist/generated/types/SplBase.js +0 -42
- package/dist/generated/types/SplMain.d.ts +0 -22
- package/dist/generated/types/SplMain.js +0 -47
- package/dist/generated/types/Spls.d.ts +0 -17
- package/dist/generated/types/Spls.js +0 -42
- package/dist/generated/types/SpotBalanceType.d.ts +0 -20
- package/dist/generated/types/SpotBalanceType.js +0 -47
- package/dist/generated/types/SpotPosition.d.ts +0 -23
- package/dist/generated/types/SpotPosition.js +0 -48
- package/dist/generated/types/Status.d.ts +0 -20
- package/dist/generated/types/Status.js +0 -47
- package/dist/generated/types/Strategy.d.ts +0 -31
- package/dist/generated/types/Strategy.js +0 -56
- package/dist/generated/types/StrategyRoleEntry.d.ts +0 -17
- package/dist/generated/types/StrategyRoleEntry.js +0 -42
- package/dist/generated/types/SubAccount.d.ts +0 -17
- package/dist/generated/types/SubAccount.js +0 -42
- package/dist/generated/types/Update.d.ts +0 -20
- package/dist/generated/types/Update.js +0 -47
- package/dist/generated/types/UserFees.d.ts +0 -20
- package/dist/generated/types/UserFees.js +0 -45
- package/dist/generated/types/ValidityGuardRails.d.ts +0 -18
- package/dist/generated/types/ValidityGuardRails.js +0 -43
- package/dist/generated/types/index.d.ts +0 -83
- package/dist/generated/types/index.js +0 -99
- package/dist/strategies/JlpStrategy.d.ts +0 -17
- package/dist/strategies/JlpStrategy.js +0 -337
- package/dist/strategies/LstStrategy.d.ts +0 -19
- package/dist/strategies/LstStrategy.js +0 -169
- package/dist/strategies/UsdcStrategy.d.ts +0 -12
- package/dist/strategies/UsdcStrategy.js +0 -89
- package/dist/strategies/index.d.ts +0 -3
- package/dist/strategies/index.js +0 -19
|
@@ -1,174 +0,0 @@
|
|
|
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.mintDriftS3InstructionDiscriminator = exports.mintDriftS3Struct = void 0;
|
|
33
|
-
exports.createMintDriftS3Instruction = createMintDriftS3Instruction;
|
|
34
|
-
const splToken = __importStar(require("@solana/spl-token"));
|
|
35
|
-
const beet = __importStar(require("@metaplex-foundation/beet"));
|
|
36
|
-
const web3 = __importStar(require("@solana/web3.js"));
|
|
37
|
-
/**
|
|
38
|
-
* @category Instructions
|
|
39
|
-
* @category MintDriftS3
|
|
40
|
-
* @category generated
|
|
41
|
-
*/
|
|
42
|
-
exports.mintDriftS3Struct = new beet.BeetArgsStruct([
|
|
43
|
-
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
44
|
-
['lstAmount', beet.u64],
|
|
45
|
-
['minUsdrAmount', beet.u64],
|
|
46
|
-
], 'MintDriftS3InstructionArgs');
|
|
47
|
-
exports.mintDriftS3InstructionDiscriminator = [
|
|
48
|
-
40, 19, 126, 130, 5, 177, 77, 114,
|
|
49
|
-
];
|
|
50
|
-
/**
|
|
51
|
-
* Creates a _MintDriftS3_ instruction.
|
|
52
|
-
*
|
|
53
|
-
* Optional accounts that are not provided default to the program ID since
|
|
54
|
-
* this was indicated in the IDL from which this instruction was generated.
|
|
55
|
-
*
|
|
56
|
-
* @param accounts that will be accessed while the instruction is processed
|
|
57
|
-
* @param args to provide as instruction data to the program
|
|
58
|
-
*
|
|
59
|
-
* @category Instructions
|
|
60
|
-
* @category MintDriftS3
|
|
61
|
-
* @category generated
|
|
62
|
-
*/
|
|
63
|
-
function createMintDriftS3Instruction(accounts, args, programId = new web3.PublicKey('9CtYQNCz3LaQ9DnqXa83q6gdHGwMeN6aQ7KqqotBmeke')) {
|
|
64
|
-
var _a, _b, _c;
|
|
65
|
-
const [data] = exports.mintDriftS3Struct.serialize(Object.assign({ instructionDiscriminator: exports.mintDriftS3InstructionDiscriminator }, args));
|
|
66
|
-
const keys = [
|
|
67
|
-
{
|
|
68
|
-
pubkey: accounts.user,
|
|
69
|
-
isWritable: true,
|
|
70
|
-
isSigner: true,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
pubkey: accounts.main,
|
|
74
|
-
isWritable: true,
|
|
75
|
-
isSigner: false,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
pubkey: accounts.lstController,
|
|
79
|
-
isWritable: true,
|
|
80
|
-
isSigner: false,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
pubkey: (_a = accounts.adminPermissions) !== null && _a !== void 0 ? _a : programId,
|
|
84
|
-
isWritable: false,
|
|
85
|
-
isSigner: false,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
pubkey: accounts.userLstAta,
|
|
89
|
-
isWritable: true,
|
|
90
|
-
isSigner: false,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
pubkey: accounts.controllerLstAta,
|
|
94
|
-
isWritable: true,
|
|
95
|
-
isSigner: false,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
pubkey: accounts.userReflectAta,
|
|
99
|
-
isWritable: true,
|
|
100
|
-
isSigner: false,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
pubkey: accounts.stableMint,
|
|
104
|
-
isWritable: true,
|
|
105
|
-
isSigner: false,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
pubkey: accounts.drift,
|
|
109
|
-
isWritable: false,
|
|
110
|
-
isSigner: false,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
pubkey: accounts.state,
|
|
114
|
-
isWritable: true,
|
|
115
|
-
isSigner: false,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
pubkey: accounts.userStats,
|
|
119
|
-
isWritable: true,
|
|
120
|
-
isSigner: false,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
pubkey: accounts.referrerUserStats,
|
|
124
|
-
isWritable: true,
|
|
125
|
-
isSigner: false,
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
pubkey: accounts.referrerUser,
|
|
129
|
-
isWritable: true,
|
|
130
|
-
isSigner: false,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
pubkey: accounts.userAccount,
|
|
134
|
-
isWritable: true,
|
|
135
|
-
isSigner: false,
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
pubkey: accounts.spotMarketVault,
|
|
139
|
-
isWritable: true,
|
|
140
|
-
isSigner: false,
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
pubkey: accounts.driftVault,
|
|
144
|
-
isWritable: true,
|
|
145
|
-
isSigner: false,
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
pubkey: (_b = accounts.tokenProgram) !== null && _b !== void 0 ? _b : splToken.TOKEN_PROGRAM_ID,
|
|
149
|
-
isWritable: false,
|
|
150
|
-
isSigner: false,
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
pubkey: (_c = accounts.systemProgram) !== null && _c !== void 0 ? _c : web3.SystemProgram.programId,
|
|
154
|
-
isWritable: false,
|
|
155
|
-
isSigner: false,
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
pubkey: accounts.clock,
|
|
159
|
-
isWritable: false,
|
|
160
|
-
isSigner: false,
|
|
161
|
-
},
|
|
162
|
-
];
|
|
163
|
-
if (accounts.anchorRemainingAccounts != null) {
|
|
164
|
-
for (const acc of accounts.anchorRemainingAccounts) {
|
|
165
|
-
keys.push(acc);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
const ix = new web3.TransactionInstruction({
|
|
169
|
-
programId,
|
|
170
|
-
keys,
|
|
171
|
-
data,
|
|
172
|
-
});
|
|
173
|
-
return ix;
|
|
174
|
-
}
|
|
@@ -1,79 +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
|
-
import * as beet from '@metaplex-foundation/beet';
|
|
8
|
-
import * as web3 from '@solana/web3.js';
|
|
9
|
-
import { ProcessSwapDepositArgs } from '../types/ProcessSwapDepositArgs';
|
|
10
|
-
/**
|
|
11
|
-
* @category Instructions
|
|
12
|
-
* @category ProcessSwapDeposit
|
|
13
|
-
* @category generated
|
|
14
|
-
*/
|
|
15
|
-
export type ProcessSwapDepositInstructionArgs = {
|
|
16
|
-
args: ProcessSwapDepositArgs;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @category Instructions
|
|
20
|
-
* @category ProcessSwapDeposit
|
|
21
|
-
* @category generated
|
|
22
|
-
*/
|
|
23
|
-
export declare const processSwapDepositStruct: beet.BeetArgsStruct<ProcessSwapDepositInstructionArgs & {
|
|
24
|
-
instructionDiscriminator: number[];
|
|
25
|
-
}>;
|
|
26
|
-
/**
|
|
27
|
-
* Accounts required by the _processSwapDeposit_ instruction
|
|
28
|
-
*
|
|
29
|
-
* @property [_writable_, **signer**] admin
|
|
30
|
-
* @property [_writable_] main
|
|
31
|
-
* @property [_writable_] usdcMarketVault
|
|
32
|
-
* @property [_writable_] lstController
|
|
33
|
-
* @property [] adminPermissions
|
|
34
|
-
* @property [_writable_] spotMarketVault
|
|
35
|
-
* @property [_writable_] reflectTokenAccount
|
|
36
|
-
* @property [_writable_] adminTokenAccount
|
|
37
|
-
* @property [_writable_] rebalanceDetails
|
|
38
|
-
* @property [_writable_] state
|
|
39
|
-
* @property [] drift
|
|
40
|
-
* @property [_writable_] userStats
|
|
41
|
-
* @property [_writable_] userAccount
|
|
42
|
-
* @property [] instructionsSysvar
|
|
43
|
-
* @property [_writable_] driftVault
|
|
44
|
-
* @category Instructions
|
|
45
|
-
* @category ProcessSwapDeposit
|
|
46
|
-
* @category generated
|
|
47
|
-
*/
|
|
48
|
-
export type ProcessSwapDepositInstructionAccounts = {
|
|
49
|
-
admin: web3.PublicKey;
|
|
50
|
-
main: web3.PublicKey;
|
|
51
|
-
usdcMarketVault: web3.PublicKey;
|
|
52
|
-
lstController: web3.PublicKey;
|
|
53
|
-
adminPermissions: web3.PublicKey;
|
|
54
|
-
spotMarketVault: web3.PublicKey;
|
|
55
|
-
reflectTokenAccount: web3.PublicKey;
|
|
56
|
-
adminTokenAccount: web3.PublicKey;
|
|
57
|
-
rebalanceDetails: web3.PublicKey;
|
|
58
|
-
state: web3.PublicKey;
|
|
59
|
-
drift: web3.PublicKey;
|
|
60
|
-
userStats: web3.PublicKey;
|
|
61
|
-
userAccount: web3.PublicKey;
|
|
62
|
-
systemProgram?: web3.PublicKey;
|
|
63
|
-
tokenProgram?: web3.PublicKey;
|
|
64
|
-
instructionsSysvar: web3.PublicKey;
|
|
65
|
-
driftVault: web3.PublicKey;
|
|
66
|
-
anchorRemainingAccounts?: web3.AccountMeta[];
|
|
67
|
-
};
|
|
68
|
-
export declare const processSwapDepositInstructionDiscriminator: number[];
|
|
69
|
-
/**
|
|
70
|
-
* Creates a _ProcessSwapDeposit_ instruction.
|
|
71
|
-
*
|
|
72
|
-
* @param accounts that will be accessed while the instruction is processed
|
|
73
|
-
* @param args to provide as instruction data to the program
|
|
74
|
-
*
|
|
75
|
-
* @category Instructions
|
|
76
|
-
* @category ProcessSwapDeposit
|
|
77
|
-
* @category generated
|
|
78
|
-
*/
|
|
79
|
-
export declare function createProcessSwapDepositInstruction(accounts: ProcessSwapDepositInstructionAccounts, args: ProcessSwapDepositInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction;
|
|
@@ -1,161 +0,0 @@
|
|
|
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.processSwapDepositInstructionDiscriminator = exports.processSwapDepositStruct = void 0;
|
|
33
|
-
exports.createProcessSwapDepositInstruction = createProcessSwapDepositInstruction;
|
|
34
|
-
const splToken = __importStar(require("@solana/spl-token"));
|
|
35
|
-
const beet = __importStar(require("@metaplex-foundation/beet"));
|
|
36
|
-
const web3 = __importStar(require("@solana/web3.js"));
|
|
37
|
-
const ProcessSwapDepositArgs_1 = require("../types/ProcessSwapDepositArgs");
|
|
38
|
-
/**
|
|
39
|
-
* @category Instructions
|
|
40
|
-
* @category ProcessSwapDeposit
|
|
41
|
-
* @category generated
|
|
42
|
-
*/
|
|
43
|
-
exports.processSwapDepositStruct = new beet.BeetArgsStruct([
|
|
44
|
-
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
45
|
-
['args', ProcessSwapDepositArgs_1.processSwapDepositArgsBeet],
|
|
46
|
-
], 'ProcessSwapDepositInstructionArgs');
|
|
47
|
-
exports.processSwapDepositInstructionDiscriminator = [
|
|
48
|
-
120, 229, 230, 61, 62, 119, 7, 246,
|
|
49
|
-
];
|
|
50
|
-
/**
|
|
51
|
-
* Creates a _ProcessSwapDeposit_ instruction.
|
|
52
|
-
*
|
|
53
|
-
* @param accounts that will be accessed while the instruction is processed
|
|
54
|
-
* @param args to provide as instruction data to the program
|
|
55
|
-
*
|
|
56
|
-
* @category Instructions
|
|
57
|
-
* @category ProcessSwapDeposit
|
|
58
|
-
* @category generated
|
|
59
|
-
*/
|
|
60
|
-
function createProcessSwapDepositInstruction(accounts, args, programId = new web3.PublicKey('9CtYQNCz3LaQ9DnqXa83q6gdHGwMeN6aQ7KqqotBmeke')) {
|
|
61
|
-
var _a, _b;
|
|
62
|
-
const [data] = exports.processSwapDepositStruct.serialize(Object.assign({ instructionDiscriminator: exports.processSwapDepositInstructionDiscriminator }, args));
|
|
63
|
-
const keys = [
|
|
64
|
-
{
|
|
65
|
-
pubkey: accounts.admin,
|
|
66
|
-
isWritable: true,
|
|
67
|
-
isSigner: true,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
pubkey: accounts.main,
|
|
71
|
-
isWritable: true,
|
|
72
|
-
isSigner: false,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
pubkey: accounts.usdcMarketVault,
|
|
76
|
-
isWritable: true,
|
|
77
|
-
isSigner: false,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
pubkey: accounts.lstController,
|
|
81
|
-
isWritable: true,
|
|
82
|
-
isSigner: false,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
pubkey: accounts.adminPermissions,
|
|
86
|
-
isWritable: false,
|
|
87
|
-
isSigner: false,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
pubkey: accounts.spotMarketVault,
|
|
91
|
-
isWritable: true,
|
|
92
|
-
isSigner: false,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
pubkey: accounts.reflectTokenAccount,
|
|
96
|
-
isWritable: true,
|
|
97
|
-
isSigner: false,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
pubkey: accounts.adminTokenAccount,
|
|
101
|
-
isWritable: true,
|
|
102
|
-
isSigner: false,
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
pubkey: accounts.rebalanceDetails,
|
|
106
|
-
isWritable: true,
|
|
107
|
-
isSigner: false,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
pubkey: accounts.state,
|
|
111
|
-
isWritable: true,
|
|
112
|
-
isSigner: false,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
pubkey: accounts.drift,
|
|
116
|
-
isWritable: false,
|
|
117
|
-
isSigner: false,
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
pubkey: accounts.userStats,
|
|
121
|
-
isWritable: true,
|
|
122
|
-
isSigner: false,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
pubkey: accounts.userAccount,
|
|
126
|
-
isWritable: true,
|
|
127
|
-
isSigner: false,
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId,
|
|
131
|
-
isWritable: false,
|
|
132
|
-
isSigner: false,
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
pubkey: (_b = accounts.tokenProgram) !== null && _b !== void 0 ? _b : splToken.TOKEN_PROGRAM_ID,
|
|
136
|
-
isWritable: false,
|
|
137
|
-
isSigner: false,
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
pubkey: accounts.instructionsSysvar,
|
|
141
|
-
isWritable: false,
|
|
142
|
-
isSigner: false,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
pubkey: accounts.driftVault,
|
|
146
|
-
isWritable: true,
|
|
147
|
-
isSigner: false,
|
|
148
|
-
},
|
|
149
|
-
];
|
|
150
|
-
if (accounts.anchorRemainingAccounts != null) {
|
|
151
|
-
for (const acc of accounts.anchorRemainingAccounts) {
|
|
152
|
-
keys.push(acc);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
const ix = new web3.TransactionInstruction({
|
|
156
|
-
programId,
|
|
157
|
-
keys,
|
|
158
|
-
data,
|
|
159
|
-
});
|
|
160
|
-
return ix;
|
|
161
|
-
}
|
|
@@ -1,79 +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
|
-
import * as beet from '@metaplex-foundation/beet';
|
|
8
|
-
import * as web3 from '@solana/web3.js';
|
|
9
|
-
import { ProcessSwapDepositIntrospectionArgs } from '../types/ProcessSwapDepositIntrospectionArgs';
|
|
10
|
-
/**
|
|
11
|
-
* @category Instructions
|
|
12
|
-
* @category ProcessSwapDepositIntrospection
|
|
13
|
-
* @category generated
|
|
14
|
-
*/
|
|
15
|
-
export type ProcessSwapDepositIntrospectionInstructionArgs = {
|
|
16
|
-
args: ProcessSwapDepositIntrospectionArgs;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @category Instructions
|
|
20
|
-
* @category ProcessSwapDepositIntrospection
|
|
21
|
-
* @category generated
|
|
22
|
-
*/
|
|
23
|
-
export declare const processSwapDepositIntrospectionStruct: beet.BeetArgsStruct<ProcessSwapDepositIntrospectionInstructionArgs & {
|
|
24
|
-
instructionDiscriminator: number[];
|
|
25
|
-
}>;
|
|
26
|
-
/**
|
|
27
|
-
* Accounts required by the _processSwapDepositIntrospection_ instruction
|
|
28
|
-
*
|
|
29
|
-
* @property [_writable_, **signer**] admin
|
|
30
|
-
* @property [_writable_] main
|
|
31
|
-
* @property [_writable_] usdcMarketVault
|
|
32
|
-
* @property [_writable_] lstController
|
|
33
|
-
* @property [] adminPermissions
|
|
34
|
-
* @property [_writable_] spotMarketVault
|
|
35
|
-
* @property [_writable_] reflectTokenAccount
|
|
36
|
-
* @property [_writable_] adminTokenAccount
|
|
37
|
-
* @property [_writable_] rebalanceDetails
|
|
38
|
-
* @property [_writable_] state
|
|
39
|
-
* @property [] drift
|
|
40
|
-
* @property [_writable_] userStats
|
|
41
|
-
* @property [_writable_] userAccount
|
|
42
|
-
* @property [] instructionsSysvar
|
|
43
|
-
* @property [_writable_] driftVault
|
|
44
|
-
* @category Instructions
|
|
45
|
-
* @category ProcessSwapDepositIntrospection
|
|
46
|
-
* @category generated
|
|
47
|
-
*/
|
|
48
|
-
export type ProcessSwapDepositIntrospectionInstructionAccounts = {
|
|
49
|
-
admin: web3.PublicKey;
|
|
50
|
-
main: web3.PublicKey;
|
|
51
|
-
usdcMarketVault: web3.PublicKey;
|
|
52
|
-
lstController: web3.PublicKey;
|
|
53
|
-
adminPermissions: web3.PublicKey;
|
|
54
|
-
spotMarketVault: web3.PublicKey;
|
|
55
|
-
reflectTokenAccount: web3.PublicKey;
|
|
56
|
-
adminTokenAccount: web3.PublicKey;
|
|
57
|
-
rebalanceDetails: web3.PublicKey;
|
|
58
|
-
state: web3.PublicKey;
|
|
59
|
-
drift: web3.PublicKey;
|
|
60
|
-
userStats: web3.PublicKey;
|
|
61
|
-
userAccount: web3.PublicKey;
|
|
62
|
-
systemProgram?: web3.PublicKey;
|
|
63
|
-
tokenProgram?: web3.PublicKey;
|
|
64
|
-
instructionsSysvar: web3.PublicKey;
|
|
65
|
-
driftVault: web3.PublicKey;
|
|
66
|
-
anchorRemainingAccounts?: web3.AccountMeta[];
|
|
67
|
-
};
|
|
68
|
-
export declare const processSwapDepositIntrospectionInstructionDiscriminator: number[];
|
|
69
|
-
/**
|
|
70
|
-
* Creates a _ProcessSwapDepositIntrospection_ instruction.
|
|
71
|
-
*
|
|
72
|
-
* @param accounts that will be accessed while the instruction is processed
|
|
73
|
-
* @param args to provide as instruction data to the program
|
|
74
|
-
*
|
|
75
|
-
* @category Instructions
|
|
76
|
-
* @category ProcessSwapDepositIntrospection
|
|
77
|
-
* @category generated
|
|
78
|
-
*/
|
|
79
|
-
export declare function createProcessSwapDepositIntrospectionInstruction(accounts: ProcessSwapDepositIntrospectionInstructionAccounts, args: ProcessSwapDepositIntrospectionInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction;
|
|
@@ -1,161 +0,0 @@
|
|
|
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.processSwapDepositIntrospectionInstructionDiscriminator = exports.processSwapDepositIntrospectionStruct = void 0;
|
|
33
|
-
exports.createProcessSwapDepositIntrospectionInstruction = createProcessSwapDepositIntrospectionInstruction;
|
|
34
|
-
const splToken = __importStar(require("@solana/spl-token"));
|
|
35
|
-
const beet = __importStar(require("@metaplex-foundation/beet"));
|
|
36
|
-
const web3 = __importStar(require("@solana/web3.js"));
|
|
37
|
-
const ProcessSwapDepositIntrospectionArgs_1 = require("../types/ProcessSwapDepositIntrospectionArgs");
|
|
38
|
-
/**
|
|
39
|
-
* @category Instructions
|
|
40
|
-
* @category ProcessSwapDepositIntrospection
|
|
41
|
-
* @category generated
|
|
42
|
-
*/
|
|
43
|
-
exports.processSwapDepositIntrospectionStruct = new beet.BeetArgsStruct([
|
|
44
|
-
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
45
|
-
['args', ProcessSwapDepositIntrospectionArgs_1.processSwapDepositIntrospectionArgsBeet],
|
|
46
|
-
], 'ProcessSwapDepositIntrospectionInstructionArgs');
|
|
47
|
-
exports.processSwapDepositIntrospectionInstructionDiscriminator = [
|
|
48
|
-
242, 202, 29, 83, 204, 206, 232, 100,
|
|
49
|
-
];
|
|
50
|
-
/**
|
|
51
|
-
* Creates a _ProcessSwapDepositIntrospection_ instruction.
|
|
52
|
-
*
|
|
53
|
-
* @param accounts that will be accessed while the instruction is processed
|
|
54
|
-
* @param args to provide as instruction data to the program
|
|
55
|
-
*
|
|
56
|
-
* @category Instructions
|
|
57
|
-
* @category ProcessSwapDepositIntrospection
|
|
58
|
-
* @category generated
|
|
59
|
-
*/
|
|
60
|
-
function createProcessSwapDepositIntrospectionInstruction(accounts, args, programId = new web3.PublicKey('9CtYQNCz3LaQ9DnqXa83q6gdHGwMeN6aQ7KqqotBmeke')) {
|
|
61
|
-
var _a, _b;
|
|
62
|
-
const [data] = exports.processSwapDepositIntrospectionStruct.serialize(Object.assign({ instructionDiscriminator: exports.processSwapDepositIntrospectionInstructionDiscriminator }, args));
|
|
63
|
-
const keys = [
|
|
64
|
-
{
|
|
65
|
-
pubkey: accounts.admin,
|
|
66
|
-
isWritable: true,
|
|
67
|
-
isSigner: true,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
pubkey: accounts.main,
|
|
71
|
-
isWritable: true,
|
|
72
|
-
isSigner: false,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
pubkey: accounts.usdcMarketVault,
|
|
76
|
-
isWritable: true,
|
|
77
|
-
isSigner: false,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
pubkey: accounts.lstController,
|
|
81
|
-
isWritable: true,
|
|
82
|
-
isSigner: false,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
pubkey: accounts.adminPermissions,
|
|
86
|
-
isWritable: false,
|
|
87
|
-
isSigner: false,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
pubkey: accounts.spotMarketVault,
|
|
91
|
-
isWritable: true,
|
|
92
|
-
isSigner: false,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
pubkey: accounts.reflectTokenAccount,
|
|
96
|
-
isWritable: true,
|
|
97
|
-
isSigner: false,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
pubkey: accounts.adminTokenAccount,
|
|
101
|
-
isWritable: true,
|
|
102
|
-
isSigner: false,
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
pubkey: accounts.rebalanceDetails,
|
|
106
|
-
isWritable: true,
|
|
107
|
-
isSigner: false,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
pubkey: accounts.state,
|
|
111
|
-
isWritable: true,
|
|
112
|
-
isSigner: false,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
pubkey: accounts.drift,
|
|
116
|
-
isWritable: false,
|
|
117
|
-
isSigner: false,
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
pubkey: accounts.userStats,
|
|
121
|
-
isWritable: true,
|
|
122
|
-
isSigner: false,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
pubkey: accounts.userAccount,
|
|
126
|
-
isWritable: true,
|
|
127
|
-
isSigner: false,
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId,
|
|
131
|
-
isWritable: false,
|
|
132
|
-
isSigner: false,
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
pubkey: (_b = accounts.tokenProgram) !== null && _b !== void 0 ? _b : splToken.TOKEN_PROGRAM_ID,
|
|
136
|
-
isWritable: false,
|
|
137
|
-
isSigner: false,
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
pubkey: accounts.instructionsSysvar,
|
|
141
|
-
isWritable: false,
|
|
142
|
-
isSigner: false,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
pubkey: accounts.driftVault,
|
|
146
|
-
isWritable: true,
|
|
147
|
-
isSigner: false,
|
|
148
|
-
},
|
|
149
|
-
];
|
|
150
|
-
if (accounts.anchorRemainingAccounts != null) {
|
|
151
|
-
for (const acc of accounts.anchorRemainingAccounts) {
|
|
152
|
-
keys.push(acc);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
const ix = new web3.TransactionInstruction({
|
|
156
|
-
programId,
|
|
157
|
-
keys,
|
|
158
|
-
data,
|
|
159
|
-
});
|
|
160
|
-
return ix;
|
|
161
|
-
}
|