@haven-fi/solauto-sdk 1.0.52 → 1.0.54
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/clients/solautoClient.d.ts.map +1 -1
- package/dist/clients/solautoClient.js +1 -7
- package/dist/clients/solautoMarginfiClient.d.ts.map +1 -1
- package/dist/clients/solautoMarginfiClient.js +3 -1
- package/dist/generated/accounts/referralState.d.ts.map +1 -1
- package/dist/generated/accounts/referralState.js +8 -9
- package/dist/generated/accounts/solautoPosition.d.ts.map +1 -1
- package/dist/generated/accounts/solautoPosition.js +8 -9
- package/dist/generated/errors/solauto.js +3 -3
- package/dist/generated/instructions/cancelDCA.js +2 -3
- package/dist/generated/instructions/claimReferralFees.js +2 -3
- package/dist/generated/instructions/closePosition.js +2 -3
- package/dist/generated/instructions/convertReferralFees.js +2 -3
- package/dist/generated/instructions/marginfiOpenPosition.d.ts +1 -0
- package/dist/generated/instructions/marginfiOpenPosition.d.ts.map +1 -1
- package/dist/generated/instructions/marginfiOpenPosition.js +22 -18
- package/dist/generated/instructions/marginfiProtocolInteraction.js +2 -3
- package/dist/generated/instructions/marginfiRebalance.js +2 -3
- package/dist/generated/instructions/marginfiRefreshData.js +2 -3
- package/dist/generated/instructions/updatePosition.js +2 -3
- package/dist/generated/instructions/updateReferralStates.js +2 -3
- package/dist/generated/programs/solauto.d.ts.map +1 -1
- package/dist/generated/programs/solauto.js +4 -4
- package/dist/generated/shared/index.js +4 -5
- package/dist/generated/types/automationSettings.js +1 -2
- package/dist/generated/types/automationSettingsInp.js +1 -2
- package/dist/generated/types/dCASettings.js +1 -2
- package/dist/generated/types/dCASettingsInp.js +1 -2
- package/dist/generated/types/feeType.js +3 -3
- package/dist/generated/types/lendingPlatform.js +3 -3
- package/dist/generated/types/podBool.js +1 -2
- package/dist/generated/types/positionData.js +1 -2
- package/dist/generated/types/positionState.js +1 -2
- package/dist/generated/types/positionTokenUsage.js +1 -2
- package/dist/generated/types/rebalanceData.js +1 -2
- package/dist/generated/types/solautoAction.js +3 -4
- package/dist/generated/types/solautoRebalanceType.js +3 -3
- package/dist/generated/types/solautoSettingsParameters.js +1 -2
- package/dist/generated/types/solautoSettingsParametersInp.js +1 -2
- package/dist/generated/types/tokenAmount.js +1 -2
- package/dist/generated/types/tokenBalanceAmount.js +3 -4
- package/dist/generated/types/updatePositionData.js +1 -2
- package/dist/marginfi-sdk/accounts/bank.d.ts.map +1 -1
- package/dist/marginfi-sdk/accounts/bank.js +8 -9
- package/dist/marginfi-sdk/accounts/marginfiAccount.d.ts.map +1 -1
- package/dist/marginfi-sdk/accounts/marginfiAccount.js +8 -9
- package/dist/marginfi-sdk/accounts/marginfiGroup.d.ts.map +1 -1
- package/dist/marginfi-sdk/accounts/marginfiGroup.js +8 -9
- package/dist/marginfi-sdk/errors/marginfi.js +3 -3
- package/dist/marginfi-sdk/instructions/lendingAccountBorrow.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountCloseBalance.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountDeposit.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountEndFlashloan.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountLiquidate.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountRepay.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountSettleEmissions.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountStartFlashloan.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountWithdraw.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingAccountWithdrawEmissions.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolAccrueBankInterest.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolAddBank.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolAddBankWithSeed.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolCollectBankFees.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolConfigureBank.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolHandleBankruptcy.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolSetupEmissions.js +2 -3
- package/dist/marginfi-sdk/instructions/lendingPoolUpdateEmissionsParameters.js +2 -3
- package/dist/marginfi-sdk/instructions/marginfiAccountInitialize.js +2 -3
- package/dist/marginfi-sdk/instructions/marginfiGroupConfigure.js +2 -3
- package/dist/marginfi-sdk/instructions/marginfiGroupInitialize.js +2 -3
- package/dist/marginfi-sdk/instructions/setAccountFlag.js +2 -3
- package/dist/marginfi-sdk/instructions/setNewAccountAuthority.js +2 -3
- package/dist/marginfi-sdk/instructions/unsetAccountFlag.js +2 -3
- package/dist/marginfi-sdk/programs/marginfi.d.ts.map +1 -1
- package/dist/marginfi-sdk/programs/marginfi.js +4 -4
- package/dist/marginfi-sdk/shared/index.js +4 -5
- package/dist/marginfi-sdk/types/accountEventHeader.js +1 -2
- package/dist/marginfi-sdk/types/balance.js +1 -2
- package/dist/marginfi-sdk/types/balanceDecreaseType.js +3 -3
- package/dist/marginfi-sdk/types/balanceIncreaseType.js +3 -3
- package/dist/marginfi-sdk/types/balanceSide.js +3 -3
- package/dist/marginfi-sdk/types/bankConfig.js +1 -2
- package/dist/marginfi-sdk/types/bankConfigCompact.js +1 -2
- package/dist/marginfi-sdk/types/bankOperationalState.js +3 -3
- package/dist/marginfi-sdk/types/bankVaultType.js +3 -3
- package/dist/marginfi-sdk/types/groupEventHeader.js +1 -2
- package/dist/marginfi-sdk/types/interestRateConfig.js +1 -2
- package/dist/marginfi-sdk/types/interestRateConfigCompact.js +1 -2
- package/dist/marginfi-sdk/types/interestRateConfigOpt.js +1 -2
- package/dist/marginfi-sdk/types/lendingAccount.js +1 -2
- package/dist/marginfi-sdk/types/liquidationBalances.js +1 -2
- package/dist/marginfi-sdk/types/oracleConfig.js +1 -2
- package/dist/marginfi-sdk/types/oraclePriceType.js +3 -3
- package/dist/marginfi-sdk/types/oracleSetup.js +3 -3
- package/dist/marginfi-sdk/types/priceBias.js +3 -3
- package/dist/marginfi-sdk/types/requirementType.js +3 -3
- package/dist/marginfi-sdk/types/riskRequirementType.js +3 -3
- package/dist/marginfi-sdk/types/riskTier.js +3 -3
- package/dist/marginfi-sdk/types/wrappedI80F48.js +1 -2
- package/dist/transactions/transactionUtils.js +4 -5
- package/dist/transactions/transactionsManager.d.ts.map +1 -1
- package/dist/transactions/transactionsManager.js +1 -1
- package/dist/types/solauto.js +1 -1
- package/dist/utils/accountUtils.d.ts +0 -1
- package/dist/utils/accountUtils.d.ts.map +1 -1
- package/dist/utils/accountUtils.js +7 -8
- package/dist/utils/generalUtils.d.ts.map +1 -1
- package/dist/utils/generalUtils.js +8 -9
- package/dist/utils/jupiterUtils.js +1 -2
- package/dist/utils/marginfiUtils.js +5 -6
- package/dist/utils/numberUtils.js +11 -12
- package/dist/utils/solanaUtils.js +13 -14
- package/dist/utils/solauto/generalUtils.d.ts.map +1 -1
- package/dist/utils/solauto/generalUtils.js +21 -17
- package/dist/utils/solauto/rebalanceUtils.js +3 -4
- package/package.json +3 -2
- package/src/clients/solautoClient.ts +1 -10
- package/src/clients/solautoMarginfiClient.ts +2 -0
- package/src/generated/instructions/marginfiOpenPosition.ts +21 -15
- package/src/utils/generalUtils.ts +0 -1
- package/src/utils/solauto/generalUtils.ts +13 -9
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solautoClient.d.ts","sourceRoot":"","sources":["../../src/clients/solautoClient.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAEL,UAAU,EACV,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,GAAG,EAQJ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,aAAa,EAEd,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EACzB,gCAAgC,EAChC,sBAAsB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wB,EACvC,SAAS,CAAC,EAAE,gBAAgB,EAC5B,2BAA2B,CAAC,EAAE,MAAM,EACpC,WAAW,CAAC,EAAE,MAAM,GACnB,kBAAkB;IAEf,qBAAqB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAYlE"}
|
@@ -14,7 +14,6 @@ const spl_token_1 = require("@solana/spl-token");
|
|
14
14
|
const solautoConstants_1 = require("../constants/solautoConstants");
|
15
15
|
const generalUtils_1 = require("../utils/generalUtils");
|
16
16
|
const generalUtils_2 = require("../utils/solauto/generalUtils");
|
17
|
-
const utils_1 = require("../utils");
|
18
17
|
class SolautoClient {
|
19
18
|
constructor(heliusApiKey, localTest) {
|
20
19
|
this.localTest = localTest;
|
@@ -216,7 +215,6 @@ class SolautoClient {
|
|
216
215
|
});
|
217
216
|
}
|
218
217
|
openPosition(settingParams, dca) {
|
219
|
-
let tx = (0, umi_1.transactionBuilder)();
|
220
218
|
if (dca && dca.debtToAddBaseUnit > 0) {
|
221
219
|
this.livePositionUpdates.new({
|
222
220
|
type: "debtDcaIn",
|
@@ -235,11 +233,7 @@ class SolautoClient {
|
|
235
233
|
value: dca,
|
236
234
|
});
|
237
235
|
}
|
238
|
-
|
239
|
-
// Tip Solauto Manager
|
240
|
-
tx = tx.add((0, solanaUtils_1.systemTransferUmiIx)(this.signer, generalAccounts_1.SOLAUTO_MANAGER, (0, utils_1.toBaseUnit)(0.1, 9)));
|
241
|
-
}
|
242
|
-
return tx;
|
236
|
+
return (0, umi_1.transactionBuilder)();
|
243
237
|
}
|
244
238
|
updatePositionIx(args) {
|
245
239
|
let debtMint = undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solautoMarginfiClient.d.ts","sourceRoot":"","sources":["../../src/clients/solautoMarginfiClient.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,MAAM,EACN,kBAAkB,EAMnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAA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tils_1 = require("../utils/generalUtils");
|
|
12
12
|
const marginfi_sdk_1 = require("../marginfi-sdk");
|
13
13
|
const marginfiUtils_1 = require("../utils/marginfiUtils");
|
14
14
|
const numberUtils_1 = require("../utils/numberUtils");
|
15
|
+
const constants_1 = require("../constants");
|
15
16
|
class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
|
16
17
|
constructor() {
|
17
18
|
super(...arguments);
|
@@ -101,6 +102,7 @@ class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
|
|
101
102
|
return (0, generated_1.marginfiOpenPosition)(this.umi, {
|
102
103
|
signer: this.signer,
|
103
104
|
marginfiProgram: (0, umi_1.publicKey)(marginfi_sdk_1.MARGINFI_PROGRAM_ID),
|
105
|
+
solautoManager: (0, umi_1.publicKey)(constants_1.SOLAUTO_MANAGER),
|
104
106
|
solautoFeesWallet: (0, umi_1.publicKey)(this.solautoFeesWallet),
|
105
107
|
solautoFeesSupplyTa: (0, umi_1.publicKey)(this.solautoFeesSupplyTa),
|
106
108
|
signerReferralState: (0, umi_1.publicKey)(this.authorityReferralState),
|
@@ -307,7 +309,7 @@ class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
|
|
307
309
|
: this.marginfiDebtAccounts;
|
308
310
|
return (0, umi_1.transactionBuilder)()
|
309
311
|
.add((0, marginfi_sdk_1.lendingAccountStartFlashloan)(this.umi, {
|
310
|
-
endIndex: 0,
|
312
|
+
endIndex: 0, // We set this after building the transaction
|
311
313
|
ixsSysvar: (0, umi_1.publicKey)(web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY),
|
312
314
|
marginfiAccount: (0, umi_1.publicKey)(this.intermediaryMarginfiAccountPk),
|
313
315
|
signer: this.signer,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"referralState.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/referralState.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,OAAO,EACP,GAAG,EACH,SAAS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C9B,OAAO,CAAC,aAAa,EAAE,CAAC,CAS1B;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,UAAU,EAAE,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAClC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,aAAa,EAAE,CAAC,CAU1B;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,UAAU,CAAC;UAQhC,
|
1
|
+
{"version":3,"file":"referralState.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/referralState.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,OAAO,EACP,GAAG,EACH,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EAKtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAKX,MAAM,sCAAsC,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAE9D,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,SAAS,CAAC;IAC3B,YAAY,EAAE,SAAS,CAAC;IACxB,WAAW,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAEpE,wBAAgB,qCAAqC,IAAI,UAAU,CACjE,4BAA4B,EAC5B,wBAAwB,CACzB,CAaA;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,UAAU,GACrB,aAAa,CAKf;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAC1B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,aAAa,CAAC,CAOxB;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAC1B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAM/B;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,UAAU,EAAE,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAClC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,aAAa,EAAE,CAAC,CAS1B;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,UAAU,EAAE,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAClC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,aAAa,EAAE,CAAC,CAU1B;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,UAAU,CAAC;UAQhC,KAAK,CAAC,MAAM,CAAC;cACT,KAAK,CAAC,MAAM,CAAC;eACZ,SAAS;qBACH,SAAS;kBACZ,SAAS;iBACV,SAAS;aACb,KAAK,CAAC,MAAM,CAAC;GAa3B;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
|
@@ -7,7 +7,14 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getReferralStateAccountDataSerializer = getReferralStateAccountDataSerializer;
|
11
|
+
exports.deserializeReferralState = deserializeReferralState;
|
12
|
+
exports.fetchReferralState = fetchReferralState;
|
13
|
+
exports.safeFetchReferralState = safeFetchReferralState;
|
14
|
+
exports.fetchAllReferralState = fetchAllReferralState;
|
15
|
+
exports.safeFetchAllReferralState = safeFetchAllReferralState;
|
16
|
+
exports.getReferralStateGpaBuilder = getReferralStateGpaBuilder;
|
17
|
+
exports.getReferralStateSize = getReferralStateSize;
|
11
18
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
19
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
20
|
function getReferralStateAccountDataSerializer() {
|
@@ -21,22 +28,18 @@ function getReferralStateAccountDataSerializer() {
|
|
21
28
|
['padding', (0, serializers_1.array)((0, serializers_1.u8)(), { size: 96 })],
|
22
29
|
], { description: 'ReferralStateAccountData' });
|
23
30
|
}
|
24
|
-
exports.getReferralStateAccountDataSerializer = getReferralStateAccountDataSerializer;
|
25
31
|
function deserializeReferralState(rawAccount) {
|
26
32
|
return (0, umi_1.deserializeAccount)(rawAccount, getReferralStateAccountDataSerializer());
|
27
33
|
}
|
28
|
-
exports.deserializeReferralState = deserializeReferralState;
|
29
34
|
async function fetchReferralState(context, publicKey, options) {
|
30
35
|
const maybeAccount = await context.rpc.getAccount((0, umi_1.publicKey)(publicKey, false), options);
|
31
36
|
(0, umi_1.assertAccountExists)(maybeAccount, 'ReferralState');
|
32
37
|
return deserializeReferralState(maybeAccount);
|
33
38
|
}
|
34
|
-
exports.fetchReferralState = fetchReferralState;
|
35
39
|
async function safeFetchReferralState(context, publicKey, options) {
|
36
40
|
const maybeAccount = await context.rpc.getAccount((0, umi_1.publicKey)(publicKey, false), options);
|
37
41
|
return maybeAccount.exists ? deserializeReferralState(maybeAccount) : null;
|
38
42
|
}
|
39
|
-
exports.safeFetchReferralState = safeFetchReferralState;
|
40
43
|
async function fetchAllReferralState(context, publicKeys, options) {
|
41
44
|
const maybeAccounts = await context.rpc.getAccounts(publicKeys.map((key) => (0, umi_1.publicKey)(key, false)), options);
|
42
45
|
return maybeAccounts.map((maybeAccount) => {
|
@@ -44,14 +47,12 @@ async function fetchAllReferralState(context, publicKeys, options) {
|
|
44
47
|
return deserializeReferralState(maybeAccount);
|
45
48
|
});
|
46
49
|
}
|
47
|
-
exports.fetchAllReferralState = fetchAllReferralState;
|
48
50
|
async function safeFetchAllReferralState(context, publicKeys, options) {
|
49
51
|
const maybeAccounts = await context.rpc.getAccounts(publicKeys.map((key) => (0, umi_1.publicKey)(key, false)), options);
|
50
52
|
return maybeAccounts
|
51
53
|
.filter((maybeAccount) => maybeAccount.exists)
|
52
54
|
.map((maybeAccount) => deserializeReferralState(maybeAccount));
|
53
55
|
}
|
54
|
-
exports.safeFetchAllReferralState = safeFetchAllReferralState;
|
55
56
|
function getReferralStateGpaBuilder(context) {
|
56
57
|
const programId = context.programs.getPublicKey('solauto', 'AutoyKBRaHSBHy9RsmXCZMy6nNFAg5FYijrvZyQcNLV');
|
57
58
|
return (0, umi_1.gpaBuilder)(context, programId)
|
@@ -66,8 +67,6 @@ function getReferralStateGpaBuilder(context) {
|
|
66
67
|
})
|
67
68
|
.deserializeUsing((account) => deserializeReferralState(account));
|
68
69
|
}
|
69
|
-
exports.getReferralStateGpaBuilder = getReferralStateGpaBuilder;
|
70
70
|
function getReferralStateSize() {
|
71
71
|
return 232;
|
72
72
|
}
|
73
|
-
exports.getReferralStateSize = getReferralStateSize;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solautoPosition.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/solautoPosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,OAAO,EACP,GAAG,EACH,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EAKtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAMX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,OAAO,EACP,WAAW,EACX,OAAO,EACP,WAAW,EACX,Y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7,7 +7,14 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getSolautoPositionAccountDataSerializer = getSolautoPositionAccountDataSerializer;
|
11
|
+
exports.deserializeSolautoPosition = deserializeSolautoPosition;
|
12
|
+
exports.fetchSolautoPosition = fetchSolautoPosition;
|
13
|
+
exports.safeFetchSolautoPosition = safeFetchSolautoPosition;
|
14
|
+
exports.fetchAllSolautoPosition = fetchAllSolautoPosition;
|
15
|
+
exports.safeFetchAllSolautoPosition = safeFetchAllSolautoPosition;
|
16
|
+
exports.getSolautoPositionGpaBuilder = getSolautoPositionGpaBuilder;
|
17
|
+
exports.getSolautoPositionSize = getSolautoPositionSize;
|
11
18
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
19
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
20
|
const types_1 = require("../types");
|
@@ -26,22 +33,18 @@ function getSolautoPositionAccountDataSerializer() {
|
|
26
33
|
['padding', (0, serializers_1.array)((0, serializers_1.u32)(), { size: 30 })],
|
27
34
|
], { description: 'SolautoPositionAccountData' });
|
28
35
|
}
|
29
|
-
exports.getSolautoPositionAccountDataSerializer = getSolautoPositionAccountDataSerializer;
|
30
36
|
function deserializeSolautoPosition(rawAccount) {
|
31
37
|
return (0, umi_1.deserializeAccount)(rawAccount, getSolautoPositionAccountDataSerializer());
|
32
38
|
}
|
33
|
-
exports.deserializeSolautoPosition = deserializeSolautoPosition;
|
34
39
|
async function fetchSolautoPosition(context, publicKey, options) {
|
35
40
|
const maybeAccount = await context.rpc.getAccount((0, umi_1.publicKey)(publicKey, false), options);
|
36
41
|
(0, umi_1.assertAccountExists)(maybeAccount, 'SolautoPosition');
|
37
42
|
return deserializeSolautoPosition(maybeAccount);
|
38
43
|
}
|
39
|
-
exports.fetchSolautoPosition = fetchSolautoPosition;
|
40
44
|
async function safeFetchSolautoPosition(context, publicKey, options) {
|
41
45
|
const maybeAccount = await context.rpc.getAccount((0, umi_1.publicKey)(publicKey, false), options);
|
42
46
|
return maybeAccount.exists ? deserializeSolautoPosition(maybeAccount) : null;
|
43
47
|
}
|
44
|
-
exports.safeFetchSolautoPosition = safeFetchSolautoPosition;
|
45
48
|
async function fetchAllSolautoPosition(context, publicKeys, options) {
|
46
49
|
const maybeAccounts = await context.rpc.getAccounts(publicKeys.map((key) => (0, umi_1.publicKey)(key, false)), options);
|
47
50
|
return maybeAccounts.map((maybeAccount) => {
|
@@ -49,14 +52,12 @@ async function fetchAllSolautoPosition(context, publicKeys, options) {
|
|
49
52
|
return deserializeSolautoPosition(maybeAccount);
|
50
53
|
});
|
51
54
|
}
|
52
|
-
exports.fetchAllSolautoPosition = fetchAllSolautoPosition;
|
53
55
|
async function safeFetchAllSolautoPosition(context, publicKeys, options) {
|
54
56
|
const maybeAccounts = await context.rpc.getAccounts(publicKeys.map((key) => (0, umi_1.publicKey)(key, false)), options);
|
55
57
|
return maybeAccounts
|
56
58
|
.filter((maybeAccount) => maybeAccount.exists)
|
57
59
|
.map((maybeAccount) => deserializeSolautoPosition(maybeAccount));
|
58
60
|
}
|
59
|
-
exports.safeFetchAllSolautoPosition = safeFetchAllSolautoPosition;
|
60
61
|
function getSolautoPositionGpaBuilder(context) {
|
61
62
|
const programId = context.programs.getPublicKey('solauto', 'AutoyKBRaHSBHy9RsmXCZMy6nNFAg5FYijrvZyQcNLV');
|
62
63
|
return (0, umi_1.gpaBuilder)(context, programId)
|
@@ -75,8 +76,6 @@ function getSolautoPositionGpaBuilder(context) {
|
|
75
76
|
})
|
76
77
|
.deserializeUsing((account) => deserializeSolautoPosition(account));
|
77
78
|
}
|
78
|
-
exports.getSolautoPositionGpaBuilder = getSolautoPositionGpaBuilder;
|
79
79
|
function getSolautoPositionSize() {
|
80
80
|
return 832;
|
81
81
|
}
|
82
|
-
exports.getSolautoPositionSize = getSolautoPositionSize;
|
@@ -7,7 +7,9 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.IncorrectInstructionsError = exports.RebalanceAbuseError = exports.InstructionIsCPIError = exports.InvalidRebalanceConditionError = exports.ExceededValidUtilizationRateError = exports.UnableToRepositionError = exports.StaleProtocolDataError = exports.InvalidAutomationDataError = exports.InvalidDCASettingsError = exports.InvalidPositionSettingsError = exports.FailedAccountDeserializationError = exports.IncorrectAccountsError = void 0;
|
11
|
+
exports.getSolautoErrorFromCode = getSolautoErrorFromCode;
|
12
|
+
exports.getSolautoErrorFromName = getSolautoErrorFromName;
|
11
13
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
14
|
const codeToErrorMap = new Map();
|
13
15
|
const nameToErrorMap = new Map();
|
@@ -151,7 +153,6 @@ function getSolautoErrorFromCode(code, program, cause) {
|
|
151
153
|
const constructor = codeToErrorMap.get(code);
|
152
154
|
return constructor ? new constructor(program, cause) : null;
|
153
155
|
}
|
154
|
-
exports.getSolautoErrorFromCode = getSolautoErrorFromCode;
|
155
156
|
/**
|
156
157
|
* Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'.
|
157
158
|
* @category Errors
|
@@ -160,4 +161,3 @@ function getSolautoErrorFromName(name, program, cause) {
|
|
160
161
|
const constructor = nameToErrorMap.get(name);
|
161
162
|
return constructor ? new constructor(program, cause) : null;
|
162
163
|
}
|
163
|
-
exports.getSolautoErrorFromName = getSolautoErrorFromName;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getCancelDCAInstructionDataSerializer = getCancelDCAInstructionDataSerializer;
|
11
|
+
exports.cancelDCA = cancelDCA;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -16,7 +17,6 @@ function getCancelDCAInstructionDataSerializer() {
|
|
16
17
|
description: 'CancelDCAInstructionData',
|
17
18
|
}), (value) => ({ ...value, discriminator: 5 }));
|
18
19
|
}
|
19
|
-
exports.getCancelDCAInstructionDataSerializer = getCancelDCAInstructionDataSerializer;
|
20
20
|
// Instruction.
|
21
21
|
function cancelDCA(context, input) {
|
22
22
|
// Program ID.
|
@@ -89,4 +89,3 @@ function cancelDCA(context, input) {
|
|
89
89
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
90
90
|
]);
|
91
91
|
}
|
92
|
-
exports.cancelDCA = cancelDCA;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getClaimReferralFeesInstructionDataSerializer = getClaimReferralFeesInstructionDataSerializer;
|
11
|
+
exports.claimReferralFees = claimReferralFees;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -16,7 +17,6 @@ function getClaimReferralFeesInstructionDataSerializer() {
|
|
16
17
|
description: 'ClaimReferralFeesInstructionData',
|
17
18
|
}), (value) => ({ ...value, discriminator: 2 }));
|
18
19
|
}
|
19
|
-
exports.getClaimReferralFeesInstructionDataSerializer = getClaimReferralFeesInstructionDataSerializer;
|
20
20
|
// Instruction.
|
21
21
|
function claimReferralFees(context, input) {
|
22
22
|
// Program ID.
|
@@ -84,4 +84,3 @@ function claimReferralFees(context, input) {
|
|
84
84
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
85
85
|
]);
|
86
86
|
}
|
87
|
-
exports.claimReferralFees = claimReferralFees;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getClosePositionInstructionDataSerializer = getClosePositionInstructionDataSerializer;
|
11
|
+
exports.closePosition = closePosition;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -16,7 +17,6 @@ function getClosePositionInstructionDataSerializer() {
|
|
16
17
|
description: 'ClosePositionInstructionData',
|
17
18
|
}), (value) => ({ ...value, discriminator: 4 }));
|
18
19
|
}
|
19
|
-
exports.getClosePositionInstructionDataSerializer = getClosePositionInstructionDataSerializer;
|
20
20
|
// Instruction.
|
21
21
|
function closePosition(context, input) {
|
22
22
|
// Program ID.
|
@@ -99,4 +99,3 @@ function closePosition(context, input) {
|
|
99
99
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
100
100
|
]);
|
101
101
|
}
|
102
|
-
exports.closePosition = closePosition;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getConvertReferralFeesInstructionDataSerializer = getConvertReferralFeesInstructionDataSerializer;
|
11
|
+
exports.convertReferralFees = convertReferralFees;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -16,7 +17,6 @@ function getConvertReferralFeesInstructionDataSerializer() {
|
|
16
17
|
description: 'ConvertReferralFeesInstructionData',
|
17
18
|
}), (value) => ({ ...value, discriminator: 1 }));
|
18
19
|
}
|
19
|
-
exports.getConvertReferralFeesInstructionDataSerializer = getConvertReferralFeesInstructionDataSerializer;
|
20
20
|
// Instruction.
|
21
21
|
function convertReferralFees(context, input) {
|
22
22
|
// Program ID.
|
@@ -93,4 +93,3 @@ function convertReferralFees(context, input) {
|
|
93
93
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
94
94
|
]);
|
95
95
|
}
|
96
|
-
exports.convertReferralFees = convertReferralFees;
|
@@ -15,6 +15,7 @@ export type MarginfiOpenPositionInstructionAccounts = {
|
|
15
15
|
tokenProgram?: PublicKey | Pda;
|
16
16
|
ataProgram?: PublicKey | Pda;
|
17
17
|
rent?: PublicKey | Pda;
|
18
|
+
solautoManager: PublicKey | Pda;
|
18
19
|
solautoFeesWallet: PublicKey | Pda;
|
19
20
|
solautoFeesSupplyTa: PublicKey | Pda;
|
20
21
|
signerReferralState: PublicKey | Pda;
|
@@ -1 +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,E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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,CA2KpB"}
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getMarginfiOpenPositionInstructionDataSerializer = getMarginfiOpenPositionInstructionDataSerializer;
|
11
|
+
exports.marginfiOpenPosition = marginfiOpenPosition;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -19,7 +20,6 @@ function getMarginfiOpenPositionInstructionDataSerializer() {
|
|
19
20
|
['marginfiAccountSeedIdx', (0, serializers_1.option)((0, serializers_1.u64)())],
|
20
21
|
], { description: 'MarginfiOpenPositionInstructionData' }), (value) => ({ ...value, discriminator: 6 }));
|
21
22
|
}
|
22
|
-
exports.getMarginfiOpenPositionInstructionDataSerializer = getMarginfiOpenPositionInstructionDataSerializer;
|
23
23
|
// Instruction.
|
24
24
|
function marginfiOpenPosition(context, input) {
|
25
25
|
// Program ID.
|
@@ -52,78 +52,83 @@ function marginfiOpenPosition(context, input) {
|
|
52
52
|
value: input.ataProgram ?? null,
|
53
53
|
},
|
54
54
|
rent: { index: 5, isWritable: false, value: input.rent ?? null },
|
55
|
-
|
55
|
+
solautoManager: {
|
56
56
|
index: 6,
|
57
|
+
isWritable: true,
|
58
|
+
value: input.solautoManager ?? null,
|
59
|
+
},
|
60
|
+
solautoFeesWallet: {
|
61
|
+
index: 7,
|
57
62
|
isWritable: false,
|
58
63
|
value: input.solautoFeesWallet ?? null,
|
59
64
|
},
|
60
65
|
solautoFeesSupplyTa: {
|
61
|
-
index:
|
66
|
+
index: 8,
|
62
67
|
isWritable: true,
|
63
68
|
value: input.solautoFeesSupplyTa ?? null,
|
64
69
|
},
|
65
70
|
signerReferralState: {
|
66
|
-
index:
|
71
|
+
index: 9,
|
67
72
|
isWritable: false,
|
68
73
|
value: input.signerReferralState ?? null,
|
69
74
|
},
|
70
75
|
referredByState: {
|
71
|
-
index:
|
76
|
+
index: 10,
|
72
77
|
isWritable: false,
|
73
78
|
value: input.referredByState ?? null,
|
74
79
|
},
|
75
80
|
referredBySupplyTa: {
|
76
|
-
index:
|
81
|
+
index: 11,
|
77
82
|
isWritable: true,
|
78
83
|
value: input.referredBySupplyTa ?? null,
|
79
84
|
},
|
80
85
|
solautoPosition: {
|
81
|
-
index:
|
86
|
+
index: 12,
|
82
87
|
isWritable: true,
|
83
88
|
value: input.solautoPosition ?? null,
|
84
89
|
},
|
85
90
|
marginfiGroup: {
|
86
|
-
index:
|
91
|
+
index: 13,
|
87
92
|
isWritable: false,
|
88
93
|
value: input.marginfiGroup ?? null,
|
89
94
|
},
|
90
95
|
marginfiAccount: {
|
91
|
-
index:
|
96
|
+
index: 14,
|
92
97
|
isWritable: true,
|
93
98
|
value: input.marginfiAccount ?? null,
|
94
99
|
},
|
95
100
|
supplyMint: {
|
96
|
-
index:
|
101
|
+
index: 15,
|
97
102
|
isWritable: false,
|
98
103
|
value: input.supplyMint ?? null,
|
99
104
|
},
|
100
105
|
supplyBank: {
|
101
|
-
index:
|
106
|
+
index: 16,
|
102
107
|
isWritable: false,
|
103
108
|
value: input.supplyBank ?? null,
|
104
109
|
},
|
105
110
|
positionSupplyTa: {
|
106
|
-
index:
|
111
|
+
index: 17,
|
107
112
|
isWritable: true,
|
108
113
|
value: input.positionSupplyTa ?? null,
|
109
114
|
},
|
110
115
|
debtMint: {
|
111
|
-
index:
|
116
|
+
index: 18,
|
112
117
|
isWritable: false,
|
113
118
|
value: input.debtMint ?? null,
|
114
119
|
},
|
115
120
|
debtBank: {
|
116
|
-
index:
|
121
|
+
index: 19,
|
117
122
|
isWritable: false,
|
118
123
|
value: input.debtBank ?? null,
|
119
124
|
},
|
120
125
|
positionDebtTa: {
|
121
|
-
index:
|
126
|
+
index: 20,
|
122
127
|
isWritable: true,
|
123
128
|
value: input.positionDebtTa ?? null,
|
124
129
|
},
|
125
130
|
signerDebtTa: {
|
126
|
-
index:
|
131
|
+
index: 21,
|
127
132
|
isWritable: true,
|
128
133
|
value: input.signerDebtTa ?? null,
|
129
134
|
},
|
@@ -158,4 +163,3 @@ function marginfiOpenPosition(context, input) {
|
|
158
163
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
159
164
|
]);
|
160
165
|
}
|
161
|
-
exports.marginfiOpenPosition = marginfiOpenPosition;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getMarginfiProtocolInteractionInstructionDataSerializer = getMarginfiProtocolInteractionInstructionDataSerializer;
|
11
|
+
exports.marginfiProtocolInteraction = marginfiProtocolInteraction;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -18,7 +19,6 @@ function getMarginfiProtocolInteractionInstructionDataSerializer() {
|
|
18
19
|
['solautoAction', (0, types_1.getSolautoActionSerializer)()],
|
19
20
|
], { description: 'MarginfiProtocolInteractionInstructionData' }), (value) => ({ ...value, discriminator: 8 }));
|
20
21
|
}
|
21
|
-
exports.getMarginfiProtocolInteractionInstructionDataSerializer = getMarginfiProtocolInteractionInstructionDataSerializer;
|
22
22
|
// Instruction.
|
23
23
|
function marginfiProtocolInteraction(context, input) {
|
24
24
|
// Program ID.
|
@@ -147,4 +147,3 @@ function marginfiProtocolInteraction(context, input) {
|
|
147
147
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
148
148
|
]);
|
149
149
|
}
|
150
|
-
exports.marginfiProtocolInteraction = marginfiProtocolInteraction;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getMarginfiRebalanceInstructionDataSerializer = getMarginfiRebalanceInstructionDataSerializer;
|
11
|
+
exports.marginfiRebalance = marginfiRebalance;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -20,7 +21,6 @@ function getMarginfiRebalanceInstructionDataSerializer() {
|
|
20
21
|
['limitGapBps', (0, serializers_1.option)((0, serializers_1.u16)())],
|
21
22
|
], { description: 'MarginfiRebalanceInstructionData' }), (value) => ({ ...value, discriminator: 9 }));
|
22
23
|
}
|
23
|
-
exports.getMarginfiRebalanceInstructionDataSerializer = getMarginfiRebalanceInstructionDataSerializer;
|
24
24
|
// Instruction.
|
25
25
|
function marginfiRebalance(context, input) {
|
26
26
|
// Program ID.
|
@@ -171,4 +171,3 @@ function marginfiRebalance(context, input) {
|
|
171
171
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
172
172
|
]);
|
173
173
|
}
|
174
|
-
exports.marginfiRebalance = marginfiRebalance;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getMarginfiRefreshDataInstructionDataSerializer = getMarginfiRefreshDataInstructionDataSerializer;
|
11
|
+
exports.marginfiRefreshData = marginfiRefreshData;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -16,7 +17,6 @@ function getMarginfiRefreshDataInstructionDataSerializer() {
|
|
16
17
|
description: 'MarginfiRefreshDataInstructionData',
|
17
18
|
}), (value) => ({ ...value, discriminator: 7 }));
|
18
19
|
}
|
19
|
-
exports.getMarginfiRefreshDataInstructionDataSerializer = getMarginfiRefreshDataInstructionDataSerializer;
|
20
20
|
// Instruction.
|
21
21
|
function marginfiRefreshData(context, input) {
|
22
22
|
// Program ID.
|
@@ -81,4 +81,3 @@ function marginfiRefreshData(context, input) {
|
|
81
81
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
82
82
|
]);
|
83
83
|
}
|
84
|
-
exports.marginfiRefreshData = marginfiRefreshData;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getUpdatePositionInstructionDataSerializer = getUpdatePositionInstructionDataSerializer;
|
11
|
+
exports.updatePosition = updatePosition;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -18,7 +19,6 @@ function getUpdatePositionInstructionDataSerializer() {
|
|
18
19
|
['updatePositionData', (0, types_1.getUpdatePositionDataSerializer)()],
|
19
20
|
], { description: 'UpdatePositionInstructionData' }), (value) => ({ ...value, discriminator: 3 }));
|
20
21
|
}
|
21
|
-
exports.getUpdatePositionInstructionDataSerializer = getUpdatePositionInstructionDataSerializer;
|
22
22
|
// Instruction.
|
23
23
|
function updatePosition(context, input) {
|
24
24
|
// Program ID.
|
@@ -84,4 +84,3 @@ function updatePosition(context, input) {
|
|
84
84
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
85
85
|
]);
|
86
86
|
}
|
87
|
-
exports.updatePosition = updatePosition;
|
@@ -7,7 +7,8 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.getUpdateReferralStatesInstructionDataSerializer = getUpdateReferralStatesInstructionDataSerializer;
|
11
|
+
exports.updateReferralStates = updateReferralStates;
|
11
12
|
const umi_1 = require("@metaplex-foundation/umi");
|
12
13
|
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
13
14
|
const shared_1 = require("../shared");
|
@@ -18,7 +19,6 @@ function getUpdateReferralStatesInstructionDataSerializer() {
|
|
18
19
|
['addressLookupTable', (0, serializers_1.option)((0, serializers_1.publicKey)())],
|
19
20
|
], { description: 'UpdateReferralStatesInstructionData' }), (value) => ({ ...value, discriminator: 0 }));
|
20
21
|
}
|
21
|
-
exports.getUpdateReferralStatesInstructionDataSerializer = getUpdateReferralStatesInstructionDataSerializer;
|
22
22
|
// Instruction.
|
23
23
|
function updateReferralStates(context, input) {
|
24
24
|
// Program ID.
|
@@ -74,4 +74,3 @@ function updateReferralStates(context, input) {
|
|
74
74
|
{ instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
|
75
75
|
]);
|
76
76
|
}
|
77
|
-
exports.updateReferralStates = updateReferralStates;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solauto.d.ts","sourceRoot":"","sources":["../../../src/generated/programs/solauto.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,OAAO,EACP,OAAO,EACP,SAAS,EACV,MAAM,0BAA0B,CAAC;AAGlC,eAAO,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"solauto.d.ts","sourceRoot":"","sources":["../../../src/generated/programs/solauto.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,OAAO,EACP,OAAO,EACP,SAAS,EACV,MAAM,0BAA0B,CAAC;AAGlC,eAAO,MAAM,kBAAkB,EACoB,SAAS,CAAC,6CAA6C,CAAC,CAAC;AAE5G,wBAAgB,oBAAoB,IAAI,OAAO,CAc9C;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAC3D,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,aAAa,CAAC,EAAE,aAAa,GAC5B,CAAC,CAEH;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,aAAa,CAAC,EAAE,aAAa,GAC5B,SAAS,CAMX"}
|