@haven-fi/solauto-sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/clients/index.d.ts +2 -0
- package/dist/clients/index.d.ts.map +1 -0
- package/dist/clients/index.js +17 -0
- package/dist/clients/solautoClient.d.ts +73 -0
- package/dist/clients/solautoClient.d.ts.map +1 -0
- package/dist/clients/solautoClient.js +416 -0
- package/dist/clients/solautoMarginfiClient.d.ts +40 -0
- package/dist/clients/solautoMarginfiClient.d.ts.map +1 -0
- package/dist/clients/solautoMarginfiClient.js +313 -0
- package/dist/constants/generalAccounts.d.ts +5 -0
- package/dist/constants/generalAccounts.d.ts.map +1 -0
- package/dist/constants/generalAccounts.js +8 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +21 -0
- package/dist/constants/marginfiAccounts.d.ts +7 -0
- package/dist/constants/marginfiAccounts.d.ts.map +1 -0
- package/dist/constants/marginfiAccounts.js +23 -0
- package/dist/constants/pythConstants.d.ts +5 -0
- package/dist/constants/pythConstants.d.ts.map +1 -0
- package/dist/constants/pythConstants.js +10 -0
- package/dist/constants/solautoConstants.d.ts +19 -0
- package/dist/constants/solautoConstants.d.ts.map +1 -0
- package/dist/constants/solautoConstants.js +35 -0
- package/dist/constants/tokenConstants.d.ts +3 -0
- package/dist/constants/tokenConstants.d.ts.map +1 -0
- package/dist/constants/tokenConstants.js +10 -0
- package/dist/generated/accounts/index.d.ts +10 -0
- package/dist/generated/accounts/index.d.ts.map +1 -0
- package/dist/generated/accounts/index.js +25 -0
- package/dist/generated/accounts/referralState.d.ts +37 -0
- package/dist/generated/accounts/referralState.d.ts.map +1 -0
- package/dist/generated/accounts/referralState.js +73 -0
- package/dist/generated/accounts/solautoPosition.d.ts +58 -0
- package/dist/generated/accounts/solautoPosition.d.ts.map +1 -0
- package/dist/generated/accounts/solautoPosition.js +82 -0
- package/dist/generated/errors/index.d.ts +9 -0
- package/dist/generated/errors/index.d.ts.map +1 -0
- package/dist/generated/errors/index.js +24 -0
- package/dist/generated/errors/solauto.d.ts +91 -0
- package/dist/generated/errors/solauto.d.ts.map +1 -0
- package/dist/generated/errors/solauto.js +163 -0
- package/dist/generated/index.d.ts +14 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +29 -0
- package/dist/generated/instructions/cancelDCA.d.ts +26 -0
- package/dist/generated/instructions/cancelDCA.d.ts.map +1 -0
- package/dist/generated/instructions/cancelDCA.js +92 -0
- package/dist/generated/instructions/claimReferralFees.d.ts +26 -0
- package/dist/generated/instructions/claimReferralFees.d.ts.map +1 -0
- package/dist/generated/instructions/claimReferralFees.js +87 -0
- package/dist/generated/instructions/closePosition.d.ts +28 -0
- package/dist/generated/instructions/closePosition.d.ts.map +1 -0
- package/dist/generated/instructions/closePosition.js +102 -0
- package/dist/generated/instructions/convertReferralFees.d.ts +27 -0
- package/dist/generated/instructions/convertReferralFees.d.ts.map +1 -0
- package/dist/generated/instructions/convertReferralFees.js +96 -0
- package/dist/generated/instructions/index.d.ts +18 -0
- package/dist/generated/instructions/index.d.ts.map +1 -0
- package/dist/generated/instructions/index.js +33 -0
- package/dist/generated/instructions/marginfiOpenPosition.d.ts +46 -0
- package/dist/generated/instructions/marginfiOpenPosition.d.ts.map +1 -0
- package/dist/generated/instructions/marginfiOpenPosition.js +161 -0
- package/dist/generated/instructions/marginfiProtocolInteraction.d.ts +42 -0
- package/dist/generated/instructions/marginfiProtocolInteraction.d.ts.map +1 -0
- package/dist/generated/instructions/marginfiProtocolInteraction.js +150 -0
- package/dist/generated/instructions/marginfiRebalance.d.ts +49 -0
- package/dist/generated/instructions/marginfiRebalance.d.ts.map +1 -0
- package/dist/generated/instructions/marginfiRebalance.js +164 -0
- package/dist/generated/instructions/marginfiRefreshData.d.ts +27 -0
- package/dist/generated/instructions/marginfiRefreshData.d.ts.map +1 -0
- package/dist/generated/instructions/marginfiRefreshData.js +84 -0
- package/dist/generated/instructions/updatePosition.d.ts +30 -0
- package/dist/generated/instructions/updatePosition.d.ts.map +1 -0
- package/dist/generated/instructions/updatePosition.js +87 -0
- package/dist/generated/instructions/updateReferralStates.d.ts +30 -0
- package/dist/generated/instructions/updateReferralStates.d.ts.map +1 -0
- package/dist/generated/instructions/updateReferralStates.js +77 -0
- package/dist/generated/programs/index.d.ts +9 -0
- package/dist/generated/programs/index.d.ts.map +1 -0
- package/dist/generated/programs/index.js +24 -0
- package/dist/generated/programs/solauto.d.ts +13 -0
- package/dist/generated/programs/solauto.d.ts.map +1 -0
- package/dist/generated/programs/solauto.js +36 -0
- package/dist/generated/shared/index.d.ts +54 -0
- package/dist/generated/shared/index.d.ts.map +1 -0
- package/dist/generated/shared/index.js +70 -0
- package/dist/generated/types/automationSettings.d.ts +26 -0
- package/dist/generated/types/automationSettings.d.ts.map +1 -0
- package/dist/generated/types/automationSettings.js +22 -0
- package/dist/generated/types/automationSettingsInp.d.ts +22 -0
- package/dist/generated/types/automationSettingsInp.d.ts.map +1 -0
- package/dist/generated/types/automationSettingsInp.js +20 -0
- package/dist/generated/types/dCASettings.d.ts +21 -0
- package/dist/generated/types/dCASettings.d.ts.map +1 -0
- package/dist/generated/types/dCASettings.js +20 -0
- package/dist/generated/types/dCASettingsInp.d.ts +19 -0
- package/dist/generated/types/dCASettingsInp.d.ts.map +1 -0
- package/dist/generated/types/dCASettingsInp.js +19 -0
- package/dist/generated/types/feeType.d.ts +15 -0
- package/dist/generated/types/feeType.d.ts.map +1 -0
- package/dist/generated/types/feeType.js +20 -0
- package/dist/generated/types/index.d.ts +26 -0
- package/dist/generated/types/index.d.ts.map +1 -0
- package/dist/generated/types/index.js +41 -0
- package/dist/generated/types/lendingPlatform.d.ts +16 -0
- package/dist/generated/types/lendingPlatform.d.ts.map +1 -0
- package/dist/generated/types/lendingPlatform.js +23 -0
- package/dist/generated/types/podBool.d.ts +14 -0
- package/dist/generated/types/podBool.d.ts.map +1 -0
- package/dist/generated/types/podBool.js +17 -0
- package/dist/generated/types/positionData.d.ts +32 -0
- package/dist/generated/types/positionData.d.ts.map +1 -0
- package/dist/generated/types/positionData.js +25 -0
- package/dist/generated/types/positionState.d.ts +35 -0
- package/dist/generated/types/positionState.d.ts.map +1 -0
- package/dist/generated/types/positionState.js +27 -0
- package/dist/generated/types/positionTokenUsage.d.ts +36 -0
- package/dist/generated/types/positionTokenUsage.d.ts.map +1 -0
- package/dist/generated/types/positionTokenUsage.js +27 -0
- package/dist/generated/types/rebalanceData.d.ts +29 -0
- package/dist/generated/types/rebalanceData.d.ts.map +1 -0
- package/dist/generated/types/rebalanceData.js +24 -0
- package/dist/generated/types/solautoAction.d.ts +44 -0
- package/dist/generated/types/solautoAction.d.ts.map +1 -0
- package/dist/generated/types/solautoAction.js +51 -0
- package/dist/generated/types/solautoRebalanceType.d.ts +17 -0
- package/dist/generated/types/solautoRebalanceType.d.ts.map +1 -0
- package/dist/generated/types/solautoRebalanceType.js +24 -0
- package/dist/generated/types/solautoSettingsParameters.d.ts +31 -0
- package/dist/generated/types/solautoSettingsParameters.d.ts.map +1 -0
- package/dist/generated/types/solautoSettingsParameters.js +25 -0
- package/dist/generated/types/solautoSettingsParametersInp.d.ts +28 -0
- package/dist/generated/types/solautoSettingsParametersInp.d.ts.map +1 -0
- package/dist/generated/types/solautoSettingsParametersInp.js +23 -0
- package/dist/generated/types/tokenAmount.d.ts +18 -0
- package/dist/generated/types/tokenAmount.d.ts.map +1 -0
- package/dist/generated/types/tokenAmount.js +18 -0
- package/dist/generated/types/tokenBalanceAmount.d.ts +27 -0
- package/dist/generated/types/tokenBalanceAmount.d.ts.map +1 -0
- package/dist/generated/types/tokenBalanceAmount.js +33 -0
- package/dist/generated/types/updatePositionData.d.ts +22 -0
- package/dist/generated/types/updatePositionData.d.ts.map +1 -0
- package/dist/generated/types/updatePositionData.js +20 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/marginfi-sdk/accounts/bank.d.ts +136 -0
- package/dist/marginfi-sdk/accounts/bank.d.ts.map +1 -0
- package/dist/marginfi-sdk/accounts/bank.js +124 -0
- package/dist/marginfi-sdk/accounts/index.d.ts +11 -0
- package/dist/marginfi-sdk/accounts/index.d.ts.map +1 -0
- package/dist/marginfi-sdk/accounts/index.js +26 -0
- package/dist/marginfi-sdk/accounts/marginfiAccount.d.ts +58 -0
- package/dist/marginfi-sdk/accounts/marginfiAccount.d.ts.map +1 -0
- package/dist/marginfi-sdk/accounts/marginfiAccount.js +76 -0
- package/dist/marginfi-sdk/accounts/marginfiGroup.d.ts +35 -0
- package/dist/marginfi-sdk/accounts/marginfiGroup.d.ts.map +1 -0
- package/dist/marginfi-sdk/accounts/marginfiGroup.js +71 -0
- package/dist/marginfi-sdk/errors/index.d.ts +9 -0
- package/dist/marginfi-sdk/errors/index.d.ts.map +1 -0
- package/dist/marginfi-sdk/errors/index.js +24 -0
- package/dist/marginfi-sdk/errors/marginfi.d.ts +283 -0
- package/dist/marginfi-sdk/errors/marginfi.d.ts.map +1 -0
- package/dist/marginfi-sdk/errors/marginfi.js +515 -0
- package/dist/marginfi-sdk/index.d.ts +14 -0
- package/dist/marginfi-sdk/index.d.ts.map +1 -0
- package/dist/marginfi-sdk/index.js +29 -0
- package/dist/marginfi-sdk/instructions/index.d.ts +32 -0
- package/dist/marginfi-sdk/instructions/index.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/index.js +47 -0
- package/dist/marginfi-sdk/instructions/lendingAccountBorrow.d.ts +30 -0
- package/dist/marginfi-sdk/instructions/lendingAccountBorrow.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountBorrow.js +83 -0
- package/dist/marginfi-sdk/instructions/lendingAccountCloseBalance.d.ts +22 -0
- package/dist/marginfi-sdk/instructions/lendingAccountCloseBalance.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountCloseBalance.js +53 -0
- package/dist/marginfi-sdk/instructions/lendingAccountDeposit.d.ts +29 -0
- package/dist/marginfi-sdk/instructions/lendingAccountDeposit.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountDeposit.js +81 -0
- package/dist/marginfi-sdk/instructions/lendingAccountEndFlashloan.d.ts +20 -0
- package/dist/marginfi-sdk/instructions/lendingAccountEndFlashloan.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountEndFlashloan.js +50 -0
- package/dist/marginfi-sdk/instructions/lendingAccountLiquidate.d.ts +32 -0
- package/dist/marginfi-sdk/instructions/lendingAccountLiquidate.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountLiquidate.js +100 -0
- package/dist/marginfi-sdk/instructions/lendingAccountRepay.d.ts +31 -0
- package/dist/marginfi-sdk/instructions/lendingAccountRepay.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountRepay.js +82 -0
- package/dist/marginfi-sdk/instructions/lendingAccountSettleEmissions.d.ts +20 -0
- package/dist/marginfi-sdk/instructions/lendingAccountSettleEmissions.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountSettleEmissions.js +46 -0
- package/dist/marginfi-sdk/instructions/lendingAccountStartFlashloan.d.ts +25 -0
- package/dist/marginfi-sdk/instructions/lendingAccountStartFlashloan.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountStartFlashloan.js +62 -0
- package/dist/marginfi-sdk/instructions/lendingAccountWithdraw.d.ts +32 -0
- package/dist/marginfi-sdk/instructions/lendingAccountWithdraw.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountWithdraw.js +87 -0
- package/dist/marginfi-sdk/instructions/lendingAccountWithdrawEmissions.d.ts +27 -0
- package/dist/marginfi-sdk/instructions/lendingAccountWithdrawEmissions.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingAccountWithdrawEmissions.js +86 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAccrueBankInterest.d.ts +20 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAccrueBankInterest.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAccrueBankInterest.js +46 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAddBank.d.ts +37 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAddBank.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAddBank.js +127 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAddBankWithSeed.d.ts +39 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAddBankWithSeed.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolAddBankWithSeed.js +128 -0
- package/dist/marginfi-sdk/instructions/lendingPoolCollectBankFees.d.ts +25 -0
- package/dist/marginfi-sdk/instructions/lendingPoolCollectBankFees.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolCollectBankFees.js +76 -0
- package/dist/marginfi-sdk/instructions/lendingPoolConfigureBank.d.ts +46 -0
- package/dist/marginfi-sdk/instructions/lendingPoolConfigureBank.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolConfigureBank.js +67 -0
- package/dist/marginfi-sdk/instructions/lendingPoolHandleBankruptcy.d.ts +26 -0
- package/dist/marginfi-sdk/instructions/lendingPoolHandleBankruptcy.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolHandleBankruptcy.js +81 -0
- package/dist/marginfi-sdk/instructions/lendingPoolSetupEmissions.d.ts +35 -0
- package/dist/marginfi-sdk/instructions/lendingPoolSetupEmissions.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolSetupEmissions.js +97 -0
- package/dist/marginfi-sdk/instructions/lendingPoolUpdateEmissionsParameters.d.ts +33 -0
- package/dist/marginfi-sdk/instructions/lendingPoolUpdateEmissionsParameters.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/lendingPoolUpdateEmissionsParameters.js +85 -0
- package/dist/marginfi-sdk/instructions/marginfiAccountInitialize.d.ts +23 -0
- package/dist/marginfi-sdk/instructions/marginfiAccountInitialize.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/marginfiAccountInitialize.js +76 -0
- package/dist/marginfi-sdk/instructions/marginfiGroupConfigure.d.ts +24 -0
- package/dist/marginfi-sdk/instructions/marginfiGroupConfigure.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/marginfiGroupConfigure.js +52 -0
- package/dist/marginfi-sdk/instructions/marginfiGroupInitialize.d.ts +21 -0
- package/dist/marginfi-sdk/instructions/marginfiGroupInitialize.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/marginfiGroupInitialize.js +57 -0
- package/dist/marginfi-sdk/instructions/setAccountFlag.d.ts +26 -0
- package/dist/marginfi-sdk/instructions/setAccountFlag.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/setAccountFlag.js +60 -0
- package/dist/marginfi-sdk/instructions/setNewAccountAuthority.d.ts +23 -0
- package/dist/marginfi-sdk/instructions/setNewAccountAuthority.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/setNewAccountAuthority.js +69 -0
- package/dist/marginfi-sdk/instructions/unsetAccountFlag.d.ts +26 -0
- package/dist/marginfi-sdk/instructions/unsetAccountFlag.d.ts.map +1 -0
- package/dist/marginfi-sdk/instructions/unsetAccountFlag.js +57 -0
- package/dist/marginfi-sdk/programs/index.d.ts +9 -0
- package/dist/marginfi-sdk/programs/index.d.ts.map +1 -0
- package/dist/marginfi-sdk/programs/index.js +24 -0
- package/dist/marginfi-sdk/programs/marginfi.d.ts +13 -0
- package/dist/marginfi-sdk/programs/marginfi.d.ts.map +1 -0
- package/dist/marginfi-sdk/programs/marginfi.js +36 -0
- package/dist/marginfi-sdk/shared/index.d.ts +54 -0
- package/dist/marginfi-sdk/shared/index.d.ts.map +1 -0
- package/dist/marginfi-sdk/shared/index.js +70 -0
- package/dist/marginfi-sdk/types/accountEventHeader.d.ts +23 -0
- package/dist/marginfi-sdk/types/accountEventHeader.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/accountEventHeader.js +20 -0
- package/dist/marginfi-sdk/types/balance.d.ts +32 -0
- package/dist/marginfi-sdk/types/balance.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/balance.js +25 -0
- package/dist/marginfi-sdk/types/balanceDecreaseType.d.ts +17 -0
- package/dist/marginfi-sdk/types/balanceDecreaseType.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/balanceDecreaseType.js +24 -0
- package/dist/marginfi-sdk/types/balanceIncreaseType.d.ts +17 -0
- package/dist/marginfi-sdk/types/balanceIncreaseType.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/balanceIncreaseType.js +24 -0
- package/dist/marginfi-sdk/types/balanceSide.d.ts +15 -0
- package/dist/marginfi-sdk/types/balanceSide.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/balanceSide.js +22 -0
- package/dist/marginfi-sdk/types/bankConfig.d.ts +67 -0
- package/dist/marginfi-sdk/types/bankConfig.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/bankConfig.js +32 -0
- package/dist/marginfi-sdk/types/bankConfigCompact.d.ts +65 -0
- package/dist/marginfi-sdk/types/bankConfigCompact.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/bankConfigCompact.js +31 -0
- package/dist/marginfi-sdk/types/bankOperationalState.d.ts +16 -0
- package/dist/marginfi-sdk/types/bankOperationalState.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/bankOperationalState.js +23 -0
- package/dist/marginfi-sdk/types/bankVaultType.d.ts +16 -0
- package/dist/marginfi-sdk/types/bankVaultType.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/bankVaultType.js +23 -0
- package/dist/marginfi-sdk/types/groupEventHeader.d.ts +19 -0
- package/dist/marginfi-sdk/types/groupEventHeader.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/groupEventHeader.js +18 -0
- package/dist/marginfi-sdk/types/index.d.ts +31 -0
- package/dist/marginfi-sdk/types/index.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/index.js +46 -0
- package/dist/marginfi-sdk/types/interestRateConfig.d.ts +31 -0
- package/dist/marginfi-sdk/types/interestRateConfig.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/interestRateConfig.js +25 -0
- package/dist/marginfi-sdk/types/interestRateConfigCompact.d.ts +29 -0
- package/dist/marginfi-sdk/types/interestRateConfigCompact.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/interestRateConfigCompact.js +24 -0
- package/dist/marginfi-sdk/types/interestRateConfigOpt.d.ts +30 -0
- package/dist/marginfi-sdk/types/interestRateConfigOpt.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/interestRateConfigOpt.js +24 -0
- package/dist/marginfi-sdk/types/lendingAccount.d.ts +19 -0
- package/dist/marginfi-sdk/types/lendingAccount.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/lendingAccount.js +19 -0
- package/dist/marginfi-sdk/types/liquidationBalances.d.ts +17 -0
- package/dist/marginfi-sdk/types/liquidationBalances.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/liquidationBalances.js +20 -0
- package/dist/marginfi-sdk/types/oracleConfig.d.ts +20 -0
- package/dist/marginfi-sdk/types/oracleConfig.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/oracleConfig.js +19 -0
- package/dist/marginfi-sdk/types/oraclePriceType.d.ts +15 -0
- package/dist/marginfi-sdk/types/oraclePriceType.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/oraclePriceType.js +22 -0
- package/dist/marginfi-sdk/types/oracleSetup.d.ts +17 -0
- package/dist/marginfi-sdk/types/oracleSetup.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/oracleSetup.js +24 -0
- package/dist/marginfi-sdk/types/priceBias.d.ts +15 -0
- package/dist/marginfi-sdk/types/priceBias.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/priceBias.js +22 -0
- package/dist/marginfi-sdk/types/requirementType.d.ts +16 -0
- package/dist/marginfi-sdk/types/requirementType.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/requirementType.js +23 -0
- package/dist/marginfi-sdk/types/riskRequirementType.d.ts +16 -0
- package/dist/marginfi-sdk/types/riskRequirementType.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/riskRequirementType.js +23 -0
- package/dist/marginfi-sdk/types/riskTier.d.ts +15 -0
- package/dist/marginfi-sdk/types/riskTier.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/riskTier.js +22 -0
- package/dist/marginfi-sdk/types/wrappedI80F48.d.ts +16 -0
- package/dist/marginfi-sdk/types/wrappedI80F48.d.ts.map +1 -0
- package/dist/marginfi-sdk/types/wrappedI80F48.js +17 -0
- package/dist/transactions/index.d.ts +3 -0
- package/dist/transactions/index.d.ts.map +1 -0
- package/dist/transactions/index.js +18 -0
- package/dist/transactions/transactionUtils.d.ts +12 -0
- package/dist/transactions/transactionUtils.d.ts.map +1 -0
- package/dist/transactions/transactionUtils.js +262 -0
- package/dist/transactions/transactionsManager.d.ts +42 -0
- package/dist/transactions/transactionsManager.d.ts.map +1 -0
- package/dist/transactions/transactionsManager.js +246 -0
- package/dist/types/accounts.d.ts +8 -0
- package/dist/types/accounts.d.ts.map +1 -0
- package/dist/types/accounts.js +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +17 -0
- package/dist/utils/accountUtils.d.ts +11 -0
- package/dist/utils/accountUtils.d.ts.map +1 -0
- package/dist/utils/accountUtils.js +60 -0
- package/dist/utils/deleteme.d.ts +2 -0
- package/dist/utils/deleteme.d.ts.map +1 -0
- package/dist/utils/deleteme.js +21 -0
- package/dist/utils/generalUtils.d.ts +11 -0
- package/dist/utils/generalUtils.d.ts.map +1 -0
- package/dist/utils/generalUtils.js +107 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/jitoUtils.d.ts +15 -0
- package/dist/utils/jitoUtils.d.ts.map +1 -0
- package/dist/utils/jitoUtils.js +108 -0
- package/dist/utils/jupiterUtils.d.ts +21 -0
- package/dist/utils/jupiterUtils.d.ts.map +1 -0
- package/dist/utils/jupiterUtils.js +61 -0
- package/dist/utils/local/shared.d.ts +3 -0
- package/dist/utils/local/shared.d.ts.map +1 -0
- package/dist/utils/local/shared.js +63 -0
- package/dist/utils/local/updateMarginfiLUT.d.ts +2 -0
- package/dist/utils/local/updateMarginfiLUT.d.ts.map +1 -0
- package/dist/utils/local/updateMarginfiLUT.js +22 -0
- package/dist/utils/local/updateSolautoLUT.d.ts +2 -0
- package/dist/utils/local/updateSolautoLUT.d.ts.map +1 -0
- package/dist/utils/local/updateSolautoLUT.js +13 -0
- package/dist/utils/marginfiUtils.d.ts +14 -0
- package/dist/utils/marginfiUtils.d.ts.map +1 -0
- package/dist/utils/marginfiUtils.js +201 -0
- package/dist/utils/numberUtils.d.ts +9 -0
- package/dist/utils/numberUtils.d.ts.map +1 -0
- package/dist/utils/numberUtils.js +62 -0
- package/dist/utils/solanaUtils.d.ts +18 -0
- package/dist/utils/solanaUtils.d.ts.map +1 -0
- package/dist/utils/solanaUtils.js +183 -0
- package/dist/utils/solauto/generalUtils.d.ts +51 -0
- package/dist/utils/solauto/generalUtils.d.ts.map +1 -0
- package/dist/utils/solauto/generalUtils.js +271 -0
- package/dist/utils/solauto/index.d.ts +3 -0
- package/dist/utils/solauto/index.d.ts.map +1 -0
- package/dist/utils/solauto/index.js +18 -0
- package/dist/utils/solauto/rebalanceUtils.d.ts +17 -0
- package/dist/utils/solauto/rebalanceUtils.d.ts.map +1 -0
- package/dist/utils/solauto/rebalanceUtils.js +199 -0
- package/package.json +37 -0
- package/src/clients/index.ts +1 -0
- package/src/clients/solautoClient.ts +684 -0
- package/src/clients/solautoMarginfiClient.ts +496 -0
- package/src/constants/README.md +9 -0
- package/src/constants/generalAccounts.ts +8 -0
- package/src/constants/index.ts +5 -0
- package/src/constants/marginfiAccounts.ts +24 -0
- package/src/constants/pythConstants.ts +10 -0
- package/src/constants/solautoConstants.ts +54 -0
- package/src/constants/tokenConstants.ts +9 -0
- package/src/generated/accounts/index.ts +10 -0
- package/src/generated/accounts/referralState.ts +159 -0
- package/src/generated/accounts/solautoPosition.ts +205 -0
- package/src/generated/errors/index.ts +9 -0
- package/src/generated/errors/solauto.ts +228 -0
- package/src/generated/index.ts +14 -0
- package/src/generated/instructions/cancelDCA.ts +161 -0
- package/src/generated/instructions/claimReferralFees.ts +159 -0
- package/src/generated/instructions/closePosition.ts +176 -0
- package/src/generated/instructions/convertReferralFees.ts +172 -0
- package/src/generated/instructions/index.ts +18 -0
- package/src/generated/instructions/marginfiOpenPosition.ts +275 -0
- package/src/generated/instructions/marginfiProtocolInteraction.ts +257 -0
- package/src/generated/instructions/marginfiRebalance.ts +274 -0
- package/src/generated/instructions/marginfiRefreshData.ts +147 -0
- package/src/generated/instructions/updatePosition.ts +173 -0
- package/src/generated/instructions/updateReferralStates.ts +166 -0
- package/src/generated/programs/index.ts +9 -0
- package/src/generated/programs/solauto.ts +52 -0
- package/src/generated/shared/index.ts +117 -0
- package/src/generated/types/automationSettings.ts +52 -0
- package/src/generated/types/automationSettingsInp.ts +43 -0
- package/src/generated/types/dCASettings.ts +45 -0
- package/src/generated/types/dCASettingsInp.ts +37 -0
- package/src/generated/types/feeType.ts +23 -0
- package/src/generated/types/index.ts +26 -0
- package/src/generated/types/lendingPlatform.ts +26 -0
- package/src/generated/types/podBool.ts +19 -0
- package/src/generated/types/positionData.ts +69 -0
- package/src/generated/types/positionState.ts +72 -0
- package/src/generated/types/positionTokenUsage.ts +67 -0
- package/src/generated/types/rebalanceData.ts +60 -0
- package/src/generated/types/solautoAction.ts +101 -0
- package/src/generated/types/solautoRebalanceType.ts +27 -0
- package/src/generated/types/solautoSettingsParameters.ts +62 -0
- package/src/generated/types/solautoSettingsParametersInp.ts +58 -0
- package/src/generated/types/tokenAmount.ts +29 -0
- package/src/generated/types/tokenBalanceAmount.ts +67 -0
- package/src/generated/types/updatePositionData.ts +49 -0
- package/src/index.ts +6 -0
- package/src/marginfi-sdk/accounts/bank.ts +311 -0
- package/src/marginfi-sdk/accounts/index.ts +11 -0
- package/src/marginfi-sdk/accounts/marginfiAccount.ts +195 -0
- package/src/marginfi-sdk/accounts/marginfiGroup.ts +164 -0
- package/src/marginfi-sdk/errors/index.ts +9 -0
- package/src/marginfi-sdk/errors/marginfi.ts +650 -0
- package/src/marginfi-sdk/index.ts +14 -0
- package/src/marginfi-sdk/instructions/index.ts +32 -0
- package/src/marginfi-sdk/instructions/lendingAccountBorrow.ts +167 -0
- package/src/marginfi-sdk/instructions/lendingAccountCloseBalance.ts +118 -0
- package/src/marginfi-sdk/instructions/lendingAccountDeposit.ts +164 -0
- package/src/marginfi-sdk/instructions/lendingAccountEndFlashloan.ts +113 -0
- package/src/marginfi-sdk/instructions/lendingAccountLiquidate.ts +186 -0
- package/src/marginfi-sdk/instructions/lendingAccountRepay.ts +171 -0
- package/src/marginfi-sdk/instructions/lendingAccountSettleEmissions.ts +108 -0
- package/src/marginfi-sdk/instructions/lendingAccountStartFlashloan.ts +138 -0
- package/src/marginfi-sdk/instructions/lendingAccountWithdraw.ts +177 -0
- package/src/marginfi-sdk/instructions/lendingAccountWithdrawEmissions.ts +160 -0
- package/src/marginfi-sdk/instructions/lendingPoolAccrueBankInterest.ts +108 -0
- package/src/marginfi-sdk/instructions/lendingPoolAddBank.ts +226 -0
- package/src/marginfi-sdk/instructions/lendingPoolAddBankWithSeed.ts +231 -0
- package/src/marginfi-sdk/instructions/lendingPoolCollectBankFees.ts +147 -0
- package/src/marginfi-sdk/instructions/lendingPoolConfigureBank.ts +181 -0
- package/src/marginfi-sdk/instructions/lendingPoolHandleBankruptcy.ts +154 -0
- package/src/marginfi-sdk/instructions/lendingPoolSetupEmissions.ts +190 -0
- package/src/marginfi-sdk/instructions/lendingPoolUpdateEmissionsParameters.ts +176 -0
- package/src/marginfi-sdk/instructions/marginfiAccountInitialize.ts +146 -0
- package/src/marginfi-sdk/instructions/marginfiGroupConfigure.ts +129 -0
- package/src/marginfi-sdk/instructions/marginfiGroupInitialize.ts +126 -0
- package/src/marginfi-sdk/instructions/setAccountFlag.ts +132 -0
- package/src/marginfi-sdk/instructions/setNewAccountAuthority.ts +137 -0
- package/src/marginfi-sdk/instructions/unsetAccountFlag.ts +130 -0
- package/src/marginfi-sdk/programs/index.ts +9 -0
- package/src/marginfi-sdk/programs/marginfi.ts +52 -0
- package/src/marginfi-sdk/shared/index.ts +117 -0
- package/src/marginfi-sdk/types/accountEventHeader.ts +44 -0
- package/src/marginfi-sdk/types/balance.ts +61 -0
- package/src/marginfi-sdk/types/balanceDecreaseType.ts +27 -0
- package/src/marginfi-sdk/types/balanceIncreaseType.ts +27 -0
- package/src/marginfi-sdk/types/balanceSide.ts +25 -0
- package/src/marginfi-sdk/types/bankConfig.ts +117 -0
- package/src/marginfi-sdk/types/bankConfigCompact.ts +114 -0
- package/src/marginfi-sdk/types/bankOperationalState.ts +26 -0
- package/src/marginfi-sdk/types/bankVaultType.ts +26 -0
- package/src/marginfi-sdk/types/groupEventHeader.ts +38 -0
- package/src/marginfi-sdk/types/index.ts +31 -0
- package/src/marginfi-sdk/types/interestRateConfig.ts +60 -0
- package/src/marginfi-sdk/types/interestRateConfigCompact.ts +52 -0
- package/src/marginfi-sdk/types/interestRateConfigOpt.ts +57 -0
- package/src/marginfi-sdk/types/lendingAccount.ts +38 -0
- package/src/marginfi-sdk/types/liquidationBalances.ts +33 -0
- package/src/marginfi-sdk/types/oracleConfig.ts +36 -0
- package/src/marginfi-sdk/types/oraclePriceType.ts +25 -0
- package/src/marginfi-sdk/types/oracleSetup.ts +27 -0
- package/src/marginfi-sdk/types/priceBias.ts +22 -0
- package/src/marginfi-sdk/types/requirementType.ts +26 -0
- package/src/marginfi-sdk/types/riskRequirementType.ts +26 -0
- package/src/marginfi-sdk/types/riskTier.ts +22 -0
- package/src/marginfi-sdk/types/wrappedI80F48.ts +22 -0
- package/src/transactions/index.ts +2 -0
- package/src/transactions/transactionUtils.ts +518 -0
- package/src/transactions/transactionsManager.ts +344 -0
- package/src/types/accounts.ts +7 -0
- package/src/types/index.ts +1 -0
- package/src/utils/accountUtils.ts +92 -0
- package/src/utils/deleteme.ts +40 -0
- package/src/utils/generalUtils.ts +123 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/jitoUtils.ts +192 -0
- package/src/utils/jupiterUtils.ts +114 -0
- package/src/utils/local/shared.ts +85 -0
- package/src/utils/local/updateMarginfiLUT.ts +33 -0
- package/src/utils/local/updateSolautoLUT.ts +15 -0
- package/src/utils/marginfiUtils.ts +383 -0
- package/src/utils/numberUtils.ts +77 -0
- package/src/utils/solanaUtils.ts +333 -0
- package/src/utils/solauto/generalUtils.ts +371 -0
- package/src/utils/solauto/index.ts +2 -0
- package/src/utils/solauto/rebalanceUtils.ts +359 -0
- package/tests/shared.ts +15 -0
- package/tests/transactions/solautoMarginfi.ts +144 -0
- package/tests/unit/lookupTables.ts +40 -0
- package/tests/unit/rebalanceCalculations.ts +432 -0
- package/tsconfig.json +22 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.cancelDCA = exports.getCancelDCAInstructionDataSerializer = void 0;
|
11
|
+
const umi_1 = require("@metaplex-foundation/umi");
|
12
|
+
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
|
+
const shared_1 = require("../shared");
|
14
|
+
function getCancelDCAInstructionDataSerializer() {
|
15
|
+
return (0, serializers_1.mapSerializer)((0, serializers_1.struct)([['discriminator', (0, serializers_1.u8)()]], {
|
16
|
+
description: 'CancelDCAInstructionData',
|
17
|
+
}), (value) => ({ ...value, discriminator: 5 }));
|
18
|
+
}
|
19
|
+
exports.getCancelDCAInstructionDataSerializer = getCancelDCAInstructionDataSerializer;
|
20
|
+
// Instruction.
|
21
|
+
function cancelDCA(context, input) {
|
22
|
+
// Program ID.
|
23
|
+
const programId = context.programs.getPublicKey('solauto', 'AutoyKBRaHSBHy9RsmXCZMy6nNFAg5FYijrvZyQcNLV');
|
24
|
+
// Accounts.
|
25
|
+
const resolvedAccounts = {
|
26
|
+
signer: {
|
27
|
+
index: 0,
|
28
|
+
isWritable: false,
|
29
|
+
value: input.signer ?? null,
|
30
|
+
},
|
31
|
+
systemProgram: {
|
32
|
+
index: 1,
|
33
|
+
isWritable: false,
|
34
|
+
value: input.systemProgram ?? null,
|
35
|
+
},
|
36
|
+
tokenProgram: {
|
37
|
+
index: 2,
|
38
|
+
isWritable: false,
|
39
|
+
value: input.tokenProgram ?? null,
|
40
|
+
},
|
41
|
+
ataProgram: {
|
42
|
+
index: 3,
|
43
|
+
isWritable: false,
|
44
|
+
value: input.ataProgram ?? null,
|
45
|
+
},
|
46
|
+
solautoPosition: {
|
47
|
+
index: 4,
|
48
|
+
isWritable: true,
|
49
|
+
value: input.solautoPosition ?? null,
|
50
|
+
},
|
51
|
+
debtMint: {
|
52
|
+
index: 5,
|
53
|
+
isWritable: false,
|
54
|
+
value: input.debtMint ?? null,
|
55
|
+
},
|
56
|
+
positionDebtTa: {
|
57
|
+
index: 6,
|
58
|
+
isWritable: true,
|
59
|
+
value: input.positionDebtTa ?? null,
|
60
|
+
},
|
61
|
+
signerDebtTa: {
|
62
|
+
index: 7,
|
63
|
+
isWritable: true,
|
64
|
+
value: input.signerDebtTa ?? null,
|
65
|
+
},
|
66
|
+
};
|
67
|
+
// Default values.
|
68
|
+
if (!resolvedAccounts.systemProgram.value) {
|
69
|
+
resolvedAccounts.systemProgram.value = context.programs.getPublicKey('splSystem', '11111111111111111111111111111111');
|
70
|
+
resolvedAccounts.systemProgram.isWritable = false;
|
71
|
+
}
|
72
|
+
if (!resolvedAccounts.tokenProgram.value) {
|
73
|
+
resolvedAccounts.tokenProgram.value = context.programs.getPublicKey('splToken', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
|
74
|
+
resolvedAccounts.tokenProgram.isWritable = false;
|
75
|
+
}
|
76
|
+
if (!resolvedAccounts.ataProgram.value) {
|
77
|
+
resolvedAccounts.ataProgram.value = context.programs.getPublicKey('splAssociatedToken', 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');
|
78
|
+
resolvedAccounts.ataProgram.isWritable = false;
|
79
|
+
}
|
80
|
+
// Accounts in order.
|
81
|
+
const orderedAccounts = Object.values(resolvedAccounts).sort((a, b) => a.index - b.index);
|
82
|
+
// Keys and Signers.
|
83
|
+
const [keys, signers] = (0, shared_1.getAccountMetasAndSigners)(orderedAccounts, 'programId', programId);
|
84
|
+
// Data.
|
85
|
+
const data = getCancelDCAInstructionDataSerializer().serialize({});
|
86
|
+
// Bytes Created On Chain.
|
87
|
+
const bytesCreatedOnChain = 0;
|
88
|
+
return (0, umi_1.transactionBuilder)([
|
89
|
+
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
90
|
+
]);
|
91
|
+
}
|
92
|
+
exports.cancelDCA = cancelDCA;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
import { Context, Pda, PublicKey, Signer, TransactionBuilder } from '@metaplex-foundation/umi';
|
9
|
+
import { Serializer } from '@metaplex-foundation/umi/serializers';
|
10
|
+
export type ClaimReferralFeesInstructionAccounts = {
|
11
|
+
signer: Signer;
|
12
|
+
systemProgram?: PublicKey | Pda;
|
13
|
+
tokenProgram?: PublicKey | Pda;
|
14
|
+
rent?: PublicKey | Pda;
|
15
|
+
referralState: PublicKey | Pda;
|
16
|
+
referralFeesDestTa: PublicKey | Pda;
|
17
|
+
referralFeesDestMint: PublicKey | Pda;
|
18
|
+
feesDestinationTa?: PublicKey | Pda;
|
19
|
+
};
|
20
|
+
export type ClaimReferralFeesInstructionData = {
|
21
|
+
discriminator: number;
|
22
|
+
};
|
23
|
+
export type ClaimReferralFeesInstructionDataArgs = {};
|
24
|
+
export declare function getClaimReferralFeesInstructionDataSerializer(): Serializer<ClaimReferralFeesInstructionDataArgs, ClaimReferralFeesInstructionData>;
|
25
|
+
export declare function claimReferralFees(context: Pick<Context, 'programs'>, input: ClaimReferralFeesInstructionAccounts): TransactionBuilder;
|
26
|
+
//# sourceMappingURL=claimReferralFees.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claimReferralFees.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/claimReferralFees.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAGnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,MAAM,oCAAoC,GAAG;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IACvB,aAAa,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,kBAAkB,EAAE,SAAS,GAAG,GAAG,CAAC;IACpC,oBAAoB,EAAE,SAAS,GAAG,GAAG,CAAC;IACtC,iBAAiB,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;CACrC,CAAC;AAGF,MAAM,MAAM,gCAAgC,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,MAAM,MAAM,oCAAoC,GAAG,EAAE,CAAC;AAEtD,wBAAgB,6CAA6C,IAAI,UAAU,CACzE,oCAAoC,EACpC,gCAAgC,CACjC,CAcA;AAGD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,oCAAoC,GAC1C,kBAAkB,CAyFpB"}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.claimReferralFees = exports.getClaimReferralFeesInstructionDataSerializer = void 0;
|
11
|
+
const umi_1 = require("@metaplex-foundation/umi");
|
12
|
+
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
|
+
const shared_1 = require("../shared");
|
14
|
+
function getClaimReferralFeesInstructionDataSerializer() {
|
15
|
+
return (0, serializers_1.mapSerializer)((0, serializers_1.struct)([['discriminator', (0, serializers_1.u8)()]], {
|
16
|
+
description: 'ClaimReferralFeesInstructionData',
|
17
|
+
}), (value) => ({ ...value, discriminator: 2 }));
|
18
|
+
}
|
19
|
+
exports.getClaimReferralFeesInstructionDataSerializer = getClaimReferralFeesInstructionDataSerializer;
|
20
|
+
// Instruction.
|
21
|
+
function claimReferralFees(context, input) {
|
22
|
+
// Program ID.
|
23
|
+
const programId = context.programs.getPublicKey('solauto', 'AutoyKBRaHSBHy9RsmXCZMy6nNFAg5FYijrvZyQcNLV');
|
24
|
+
// Accounts.
|
25
|
+
const resolvedAccounts = {
|
26
|
+
signer: {
|
27
|
+
index: 0,
|
28
|
+
isWritable: false,
|
29
|
+
value: input.signer ?? null,
|
30
|
+
},
|
31
|
+
systemProgram: {
|
32
|
+
index: 1,
|
33
|
+
isWritable: false,
|
34
|
+
value: input.systemProgram ?? null,
|
35
|
+
},
|
36
|
+
tokenProgram: {
|
37
|
+
index: 2,
|
38
|
+
isWritable: false,
|
39
|
+
value: input.tokenProgram ?? null,
|
40
|
+
},
|
41
|
+
rent: { index: 3, isWritable: false, value: input.rent ?? null },
|
42
|
+
referralState: {
|
43
|
+
index: 4,
|
44
|
+
isWritable: false,
|
45
|
+
value: input.referralState ?? null,
|
46
|
+
},
|
47
|
+
referralFeesDestTa: {
|
48
|
+
index: 5,
|
49
|
+
isWritable: true,
|
50
|
+
value: input.referralFeesDestTa ?? null,
|
51
|
+
},
|
52
|
+
referralFeesDestMint: {
|
53
|
+
index: 6,
|
54
|
+
isWritable: false,
|
55
|
+
value: input.referralFeesDestMint ?? null,
|
56
|
+
},
|
57
|
+
feesDestinationTa: {
|
58
|
+
index: 7,
|
59
|
+
isWritable: true,
|
60
|
+
value: input.feesDestinationTa ?? null,
|
61
|
+
},
|
62
|
+
};
|
63
|
+
// Default values.
|
64
|
+
if (!resolvedAccounts.systemProgram.value) {
|
65
|
+
resolvedAccounts.systemProgram.value = context.programs.getPublicKey('splSystem', '11111111111111111111111111111111');
|
66
|
+
resolvedAccounts.systemProgram.isWritable = false;
|
67
|
+
}
|
68
|
+
if (!resolvedAccounts.tokenProgram.value) {
|
69
|
+
resolvedAccounts.tokenProgram.value = context.programs.getPublicKey('splToken', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
|
70
|
+
resolvedAccounts.tokenProgram.isWritable = false;
|
71
|
+
}
|
72
|
+
if (!resolvedAccounts.rent.value) {
|
73
|
+
resolvedAccounts.rent.value = (0, umi_1.publicKey)('SysvarRent111111111111111111111111111111111');
|
74
|
+
}
|
75
|
+
// Accounts in order.
|
76
|
+
const orderedAccounts = Object.values(resolvedAccounts).sort((a, b) => a.index - b.index);
|
77
|
+
// Keys and Signers.
|
78
|
+
const [keys, signers] = (0, shared_1.getAccountMetasAndSigners)(orderedAccounts, 'programId', programId);
|
79
|
+
// Data.
|
80
|
+
const data = getClaimReferralFeesInstructionDataSerializer().serialize({});
|
81
|
+
// Bytes Created On Chain.
|
82
|
+
const bytesCreatedOnChain = 0;
|
83
|
+
return (0, umi_1.transactionBuilder)([
|
84
|
+
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
85
|
+
]);
|
86
|
+
}
|
87
|
+
exports.claimReferralFees = claimReferralFees;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
import { Context, Pda, PublicKey, Signer, TransactionBuilder } from '@metaplex-foundation/umi';
|
9
|
+
import { Serializer } from '@metaplex-foundation/umi/serializers';
|
10
|
+
export type ClosePositionInstructionAccounts = {
|
11
|
+
signer: Signer;
|
12
|
+
systemProgram?: PublicKey | Pda;
|
13
|
+
tokenProgram?: PublicKey | Pda;
|
14
|
+
ataProgram?: PublicKey | Pda;
|
15
|
+
solautoPosition: PublicKey | Pda;
|
16
|
+
signerSupplyLiquidityTa: PublicKey | Pda;
|
17
|
+
positionSupplyLiquidityTa: PublicKey | Pda;
|
18
|
+
positionSupplyCollateralTa?: PublicKey | Pda;
|
19
|
+
positionDebtLiquidityTa: PublicKey | Pda;
|
20
|
+
signerDebtLiquidityTa: PublicKey | Pda;
|
21
|
+
};
|
22
|
+
export type ClosePositionInstructionData = {
|
23
|
+
discriminator: number;
|
24
|
+
};
|
25
|
+
export type ClosePositionInstructionDataArgs = {};
|
26
|
+
export declare function getClosePositionInstructionDataSerializer(): Serializer<ClosePositionInstructionDataArgs, ClosePositionInstructionData>;
|
27
|
+
export declare function closePosition(context: Pick<Context, 'programs'>, input: ClosePositionInstructionAccounts): TransactionBuilder;
|
28
|
+
//# sourceMappingURL=closePosition.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"closePosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/closePosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC7B,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,uBAAuB,EAAE,SAAS,GAAG,GAAG,CAAC;IACzC,yBAAyB,EAAE,SAAS,GAAG,GAAG,CAAC;IAC3C,0BAA0B,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC7C,uBAAuB,EAAE,SAAS,GAAG,GAAG,CAAC;IACzC,qBAAqB,EAAE,SAAS,GAAG,GAAG,CAAC;CACxC,CAAC;AAGF,MAAM,MAAM,4BAA4B,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,MAAM,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAElD,wBAAgB,yCAAyC,IAAI,UAAU,CACrE,gCAAgC,EAChC,4BAA4B,CAC7B,CAcA;AAGD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,gCAAgC,GACtC,kBAAkB,CAyGpB"}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.closePosition = exports.getClosePositionInstructionDataSerializer = void 0;
|
11
|
+
const umi_1 = require("@metaplex-foundation/umi");
|
12
|
+
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
|
+
const shared_1 = require("../shared");
|
14
|
+
function getClosePositionInstructionDataSerializer() {
|
15
|
+
return (0, serializers_1.mapSerializer)((0, serializers_1.struct)([['discriminator', (0, serializers_1.u8)()]], {
|
16
|
+
description: 'ClosePositionInstructionData',
|
17
|
+
}), (value) => ({ ...value, discriminator: 4 }));
|
18
|
+
}
|
19
|
+
exports.getClosePositionInstructionDataSerializer = getClosePositionInstructionDataSerializer;
|
20
|
+
// Instruction.
|
21
|
+
function closePosition(context, input) {
|
22
|
+
// Program ID.
|
23
|
+
const programId = context.programs.getPublicKey('solauto', 'AutoyKBRaHSBHy9RsmXCZMy6nNFAg5FYijrvZyQcNLV');
|
24
|
+
// Accounts.
|
25
|
+
const resolvedAccounts = {
|
26
|
+
signer: {
|
27
|
+
index: 0,
|
28
|
+
isWritable: false,
|
29
|
+
value: input.signer ?? null,
|
30
|
+
},
|
31
|
+
systemProgram: {
|
32
|
+
index: 1,
|
33
|
+
isWritable: false,
|
34
|
+
value: input.systemProgram ?? null,
|
35
|
+
},
|
36
|
+
tokenProgram: {
|
37
|
+
index: 2,
|
38
|
+
isWritable: false,
|
39
|
+
value: input.tokenProgram ?? null,
|
40
|
+
},
|
41
|
+
ataProgram: {
|
42
|
+
index: 3,
|
43
|
+
isWritable: false,
|
44
|
+
value: input.ataProgram ?? null,
|
45
|
+
},
|
46
|
+
solautoPosition: {
|
47
|
+
index: 4,
|
48
|
+
isWritable: true,
|
49
|
+
value: input.solautoPosition ?? null,
|
50
|
+
},
|
51
|
+
signerSupplyLiquidityTa: {
|
52
|
+
index: 5,
|
53
|
+
isWritable: true,
|
54
|
+
value: input.signerSupplyLiquidityTa ?? null,
|
55
|
+
},
|
56
|
+
positionSupplyLiquidityTa: {
|
57
|
+
index: 6,
|
58
|
+
isWritable: true,
|
59
|
+
value: input.positionSupplyLiquidityTa ?? null,
|
60
|
+
},
|
61
|
+
positionSupplyCollateralTa: {
|
62
|
+
index: 7,
|
63
|
+
isWritable: true,
|
64
|
+
value: input.positionSupplyCollateralTa ?? null,
|
65
|
+
},
|
66
|
+
positionDebtLiquidityTa: {
|
67
|
+
index: 8,
|
68
|
+
isWritable: true,
|
69
|
+
value: input.positionDebtLiquidityTa ?? null,
|
70
|
+
},
|
71
|
+
signerDebtLiquidityTa: {
|
72
|
+
index: 9,
|
73
|
+
isWritable: true,
|
74
|
+
value: input.signerDebtLiquidityTa ?? null,
|
75
|
+
},
|
76
|
+
};
|
77
|
+
// Default values.
|
78
|
+
if (!resolvedAccounts.systemProgram.value) {
|
79
|
+
resolvedAccounts.systemProgram.value = context.programs.getPublicKey('splSystem', '11111111111111111111111111111111');
|
80
|
+
resolvedAccounts.systemProgram.isWritable = false;
|
81
|
+
}
|
82
|
+
if (!resolvedAccounts.tokenProgram.value) {
|
83
|
+
resolvedAccounts.tokenProgram.value = context.programs.getPublicKey('splToken', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
|
84
|
+
resolvedAccounts.tokenProgram.isWritable = false;
|
85
|
+
}
|
86
|
+
if (!resolvedAccounts.ataProgram.value) {
|
87
|
+
resolvedAccounts.ataProgram.value = context.programs.getPublicKey('splAssociatedToken', 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');
|
88
|
+
resolvedAccounts.ataProgram.isWritable = false;
|
89
|
+
}
|
90
|
+
// Accounts in order.
|
91
|
+
const orderedAccounts = Object.values(resolvedAccounts).sort((a, b) => a.index - b.index);
|
92
|
+
// Keys and Signers.
|
93
|
+
const [keys, signers] = (0, shared_1.getAccountMetasAndSigners)(orderedAccounts, 'programId', programId);
|
94
|
+
// Data.
|
95
|
+
const data = getClosePositionInstructionDataSerializer().serialize({});
|
96
|
+
// Bytes Created On Chain.
|
97
|
+
const bytesCreatedOnChain = 0;
|
98
|
+
return (0, umi_1.transactionBuilder)([
|
99
|
+
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
100
|
+
]);
|
101
|
+
}
|
102
|
+
exports.closePosition = closePosition;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
import { Context, Pda, PublicKey, Signer, TransactionBuilder } from '@metaplex-foundation/umi';
|
9
|
+
import { Serializer } from '@metaplex-foundation/umi/serializers';
|
10
|
+
export type ConvertReferralFeesInstructionAccounts = {
|
11
|
+
signer: Signer;
|
12
|
+
systemProgram?: PublicKey | Pda;
|
13
|
+
tokenProgram?: PublicKey | Pda;
|
14
|
+
ataProgram?: PublicKey | Pda;
|
15
|
+
rent?: PublicKey | Pda;
|
16
|
+
ixsSysvar: PublicKey | Pda;
|
17
|
+
referralState: PublicKey | Pda;
|
18
|
+
referralFeesTa: PublicKey | Pda;
|
19
|
+
intermediaryTa: PublicKey | Pda;
|
20
|
+
};
|
21
|
+
export type ConvertReferralFeesInstructionData = {
|
22
|
+
discriminator: number;
|
23
|
+
};
|
24
|
+
export type ConvertReferralFeesInstructionDataArgs = {};
|
25
|
+
export declare function getConvertReferralFeesInstructionDataSerializer(): Serializer<ConvertReferralFeesInstructionDataArgs, ConvertReferralFeesInstructionData>;
|
26
|
+
export declare function convertReferralFees(context: Pick<Context, 'programs'>, input: ConvertReferralFeesInstructionAccounts): TransactionBuilder;
|
27
|
+
//# sourceMappingURL=convertReferralFees.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"convertReferralFees.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/convertReferralFees.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAGnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,MAAM,sCAAsC,GAAG;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IACvB,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;IAC3B,aAAa,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,cAAc,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,cAAc,EAAE,SAAS,GAAG,GAAG,CAAC;CACjC,CAAC;AAGF,MAAM,MAAM,kCAAkC,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E,MAAM,MAAM,sCAAsC,GAAG,EAAE,CAAC;AAExD,wBAAgB,+CAA+C,IAAI,UAAU,CAC3E,sCAAsC,EACtC,kCAAkC,CACnC,CAcA;AAGD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,sCAAsC,GAC5C,kBAAkB,CAqGpB"}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.convertReferralFees = exports.getConvertReferralFeesInstructionDataSerializer = void 0;
|
11
|
+
const umi_1 = require("@metaplex-foundation/umi");
|
12
|
+
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
|
+
const shared_1 = require("../shared");
|
14
|
+
function getConvertReferralFeesInstructionDataSerializer() {
|
15
|
+
return (0, serializers_1.mapSerializer)((0, serializers_1.struct)([['discriminator', (0, serializers_1.u8)()]], {
|
16
|
+
description: 'ConvertReferralFeesInstructionData',
|
17
|
+
}), (value) => ({ ...value, discriminator: 1 }));
|
18
|
+
}
|
19
|
+
exports.getConvertReferralFeesInstructionDataSerializer = getConvertReferralFeesInstructionDataSerializer;
|
20
|
+
// Instruction.
|
21
|
+
function convertReferralFees(context, input) {
|
22
|
+
// Program ID.
|
23
|
+
const programId = context.programs.getPublicKey('solauto', 'AutoyKBRaHSBHy9RsmXCZMy6nNFAg5FYijrvZyQcNLV');
|
24
|
+
// Accounts.
|
25
|
+
const resolvedAccounts = {
|
26
|
+
signer: {
|
27
|
+
index: 0,
|
28
|
+
isWritable: false,
|
29
|
+
value: input.signer ?? null,
|
30
|
+
},
|
31
|
+
systemProgram: {
|
32
|
+
index: 1,
|
33
|
+
isWritable: false,
|
34
|
+
value: input.systemProgram ?? null,
|
35
|
+
},
|
36
|
+
tokenProgram: {
|
37
|
+
index: 2,
|
38
|
+
isWritable: false,
|
39
|
+
value: input.tokenProgram ?? null,
|
40
|
+
},
|
41
|
+
ataProgram: {
|
42
|
+
index: 3,
|
43
|
+
isWritable: false,
|
44
|
+
value: input.ataProgram ?? null,
|
45
|
+
},
|
46
|
+
rent: { index: 4, isWritable: false, value: input.rent ?? null },
|
47
|
+
ixsSysvar: {
|
48
|
+
index: 5,
|
49
|
+
isWritable: false,
|
50
|
+
value: input.ixsSysvar ?? null,
|
51
|
+
},
|
52
|
+
referralState: {
|
53
|
+
index: 6,
|
54
|
+
isWritable: false,
|
55
|
+
value: input.referralState ?? null,
|
56
|
+
},
|
57
|
+
referralFeesTa: {
|
58
|
+
index: 7,
|
59
|
+
isWritable: true,
|
60
|
+
value: input.referralFeesTa ?? null,
|
61
|
+
},
|
62
|
+
intermediaryTa: {
|
63
|
+
index: 8,
|
64
|
+
isWritable: true,
|
65
|
+
value: input.intermediaryTa ?? null,
|
66
|
+
},
|
67
|
+
};
|
68
|
+
// Default values.
|
69
|
+
if (!resolvedAccounts.systemProgram.value) {
|
70
|
+
resolvedAccounts.systemProgram.value = context.programs.getPublicKey('splSystem', '11111111111111111111111111111111');
|
71
|
+
resolvedAccounts.systemProgram.isWritable = false;
|
72
|
+
}
|
73
|
+
if (!resolvedAccounts.tokenProgram.value) {
|
74
|
+
resolvedAccounts.tokenProgram.value = context.programs.getPublicKey('splToken', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
|
75
|
+
resolvedAccounts.tokenProgram.isWritable = false;
|
76
|
+
}
|
77
|
+
if (!resolvedAccounts.ataProgram.value) {
|
78
|
+
resolvedAccounts.ataProgram.value = context.programs.getPublicKey('splAssociatedToken', 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');
|
79
|
+
resolvedAccounts.ataProgram.isWritable = false;
|
80
|
+
}
|
81
|
+
if (!resolvedAccounts.rent.value) {
|
82
|
+
resolvedAccounts.rent.value = (0, umi_1.publicKey)('SysvarRent111111111111111111111111111111111');
|
83
|
+
}
|
84
|
+
// Accounts in order.
|
85
|
+
const orderedAccounts = Object.values(resolvedAccounts).sort((a, b) => a.index - b.index);
|
86
|
+
// Keys and Signers.
|
87
|
+
const [keys, signers] = (0, shared_1.getAccountMetasAndSigners)(orderedAccounts, 'programId', programId);
|
88
|
+
// Data.
|
89
|
+
const data = getConvertReferralFeesInstructionDataSerializer().serialize({});
|
90
|
+
// Bytes Created On Chain.
|
91
|
+
const bytesCreatedOnChain = 0;
|
92
|
+
return (0, umi_1.transactionBuilder)([
|
93
|
+
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
94
|
+
]);
|
95
|
+
}
|
96
|
+
exports.convertReferralFees = convertReferralFees;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
export * from './cancelDCA';
|
9
|
+
export * from './claimReferralFees';
|
10
|
+
export * from './closePosition';
|
11
|
+
export * from './convertReferralFees';
|
12
|
+
export * from './marginfiOpenPosition';
|
13
|
+
export * from './marginfiProtocolInteraction';
|
14
|
+
export * from './marginfiRebalance';
|
15
|
+
export * from './marginfiRefreshData';
|
16
|
+
export * from './updatePosition';
|
17
|
+
export * from './updateReferralStates';
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
14
|
+
}
|
15
|
+
Object.defineProperty(o, k2, desc);
|
16
|
+
}) : (function(o, m, k, k2) {
|
17
|
+
if (k2 === undefined) k2 = k;
|
18
|
+
o[k2] = m[k];
|
19
|
+
}));
|
20
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
21
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
22
|
+
};
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
24
|
+
__exportStar(require("./cancelDCA"), exports);
|
25
|
+
__exportStar(require("./claimReferralFees"), exports);
|
26
|
+
__exportStar(require("./closePosition"), exports);
|
27
|
+
__exportStar(require("./convertReferralFees"), exports);
|
28
|
+
__exportStar(require("./marginfiOpenPosition"), exports);
|
29
|
+
__exportStar(require("./marginfiProtocolInteraction"), exports);
|
30
|
+
__exportStar(require("./marginfiRebalance"), exports);
|
31
|
+
__exportStar(require("./marginfiRefreshData"), exports);
|
32
|
+
__exportStar(require("./updatePosition"), exports);
|
33
|
+
__exportStar(require("./updateReferralStates"), exports);
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
import { Context, Option, OptionOrNullable, Pda, PublicKey, Signer, TransactionBuilder } from '@metaplex-foundation/umi';
|
9
|
+
import { Serializer } from '@metaplex-foundation/umi/serializers';
|
10
|
+
import { UpdatePositionData, UpdatePositionDataArgs } from '../types';
|
11
|
+
export type MarginfiOpenPositionInstructionAccounts = {
|
12
|
+
signer: Signer;
|
13
|
+
marginfiProgram: PublicKey | Pda;
|
14
|
+
systemProgram?: PublicKey | Pda;
|
15
|
+
tokenProgram?: PublicKey | Pda;
|
16
|
+
ataProgram?: PublicKey | Pda;
|
17
|
+
rent?: PublicKey | Pda;
|
18
|
+
solautoFeesWallet: PublicKey | Pda;
|
19
|
+
solautoFeesSupplyTa: PublicKey | Pda;
|
20
|
+
signerReferralState: PublicKey | Pda;
|
21
|
+
referredByState?: PublicKey | Pda;
|
22
|
+
referredBySupplyTa?: PublicKey | Pda;
|
23
|
+
solautoPosition: PublicKey | Pda;
|
24
|
+
marginfiGroup: PublicKey | Pda;
|
25
|
+
marginfiAccount: PublicKey | Pda | Signer;
|
26
|
+
supplyMint: PublicKey | Pda;
|
27
|
+
supplyBank: PublicKey | Pda;
|
28
|
+
positionSupplyTa: PublicKey | Pda;
|
29
|
+
debtMint: PublicKey | Pda;
|
30
|
+
debtBank: PublicKey | Pda;
|
31
|
+
positionDebtTa: PublicKey | Pda;
|
32
|
+
signerDebtTa?: PublicKey | Pda;
|
33
|
+
};
|
34
|
+
export type MarginfiOpenPositionInstructionData = {
|
35
|
+
discriminator: number;
|
36
|
+
positionData: UpdatePositionData;
|
37
|
+
marginfiAccountSeedIdx: Option<bigint>;
|
38
|
+
};
|
39
|
+
export type MarginfiOpenPositionInstructionDataArgs = {
|
40
|
+
positionData: UpdatePositionDataArgs;
|
41
|
+
marginfiAccountSeedIdx: OptionOrNullable<number | bigint>;
|
42
|
+
};
|
43
|
+
export declare function getMarginfiOpenPositionInstructionDataSerializer(): Serializer<MarginfiOpenPositionInstructionDataArgs, MarginfiOpenPositionInstructionData>;
|
44
|
+
export type MarginfiOpenPositionInstructionArgs = MarginfiOpenPositionInstructionDataArgs;
|
45
|
+
export declare function marginfiOpenPosition(context: Pick<Context, 'programs'>, input: MarginfiOpenPositionInstructionAccounts & MarginfiOpenPositionInstructionArgs): TransactionBuilder;
|
46
|
+
//# sourceMappingURL=marginfiOpenPosition.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"marginfiOpenPosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/marginfiOpenPosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAGnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAMX,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EAEvB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,uCAAuC,GAAG;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IACvB,iBAAiB,EAAE,SAAS,GAAG,GAAG,CAAC;IACnC,mBAAmB,EAAE,SAAS,GAAG,GAAG,CAAC;IACrC,mBAAmB,EAAE,SAAS,GAAG,GAAG,CAAC;IACrC,eAAe,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAClC,kBAAkB,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IACrC,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,aAAa,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,eAAe,EAAE,SAAS,GAAG,GAAG,GAAG,MAAM,CAAC;IAC1C,UAAU,EAAE,SAAS,GAAG,GAAG,CAAC;IAC5B,UAAU,EAAE,SAAS,GAAG,GAAG,CAAC;IAC5B,gBAAgB,EAAE,SAAS,GAAG,GAAG,CAAC;IAClC,QAAQ,EAAE,SAAS,GAAG,GAAG,CAAC;IAC1B,QAAQ,EAAE,SAAS,GAAG,GAAG,CAAC;IAC1B,cAAc,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;CAChC,CAAC;AAGF,MAAM,MAAM,mCAAmC,GAAG;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,kBAAkB,CAAC;IACjC,sBAAsB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,uCAAuC,GAAG;IACpD,YAAY,EAAE,sBAAsB,CAAC;IACrC,sBAAsB,EAAE,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CAC3D,CAAC;AAEF,wBAAgB,gDAAgD,IAAI,UAAU,CAC5E,uCAAuC,EACvC,mCAAmC,CACpC,CAmBA;AAGD,MAAM,MAAM,mCAAmC,GAC7C,uCAAuC,CAAC;AAG1C,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,uCAAuC,GAC5C,mCAAmC,GACpC,kBAAkB,CAsKpB"}
|