@mrgnlabs/marginfi-client-v2
Advanced tools
Comparing version 2.8.1 to 2.8.2
@@ -23,2 +23,4 @@ /// <reference types="node" /> | ||
makeDisableFlashLoanForAccountIx(program: MarginfiProgram, marginfiAccountAddress: PublicKey): Promise<InstructionsWrapper>; | ||
makeEnableAccountTransferForAccountIx(program: MarginfiProgram, marginfiAccountAddress: PublicKey): Promise<InstructionsWrapper>; | ||
makeDisableAccountTransferForAccountIx(program: MarginfiProgram, marginfiAccountAddress: PublicKey): Promise<InstructionsWrapper>; | ||
makePoolConfigureBankIxb(program: MarginfiProgram, bank: PublicKey, args: BankConfigOptRaw): Promise<InstructionsWrapper>; | ||
@@ -25,0 +27,0 @@ } |
@@ -67,2 +67,24 @@ "use strict"; | ||
} | ||
async makeEnableAccountTransferForAccountIx(program, marginfiAccountAddress) { | ||
const ix = await instructions_1.default.makeSetAccountFlagIx(program, { | ||
marginfiGroup: this.address, | ||
marginfiAccount: marginfiAccountAddress, | ||
admin: this.admin, | ||
}, { flag: new bn_js_1.default(constants_1.TRANSFER_ACCOUNT_AUTHORITY_FLAG) }); | ||
return { | ||
instructions: [ix], | ||
keys: [], | ||
}; | ||
} | ||
async makeDisableAccountTransferForAccountIx(program, marginfiAccountAddress) { | ||
const ix = await instructions_1.default.makeUnsetAccountFlagIx(program, { | ||
marginfiGroup: this.address, | ||
marginfiAccount: marginfiAccountAddress, | ||
admin: this.admin, | ||
}, { flag: new bn_js_1.default(constants_1.TRANSFER_ACCOUNT_AUTHORITY_FLAG) }); | ||
return { | ||
instructions: [ix], | ||
keys: [], | ||
}; | ||
} | ||
async makePoolConfigureBankIxb(program, bank, args) { | ||
@@ -69,0 +91,0 @@ const ix = await instructions_1.default.makePoolConfigureBankIx(program, { |
{ | ||
"name": "@mrgnlabs/marginfi-client-v2", | ||
"version": "2.8.1", | ||
"version": "2.8.2", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -8,3 +8,3 @@ import { BorshCoder } from "@coral-xyz/anchor"; | ||
import instructions from "../instructions"; | ||
import { FLASHLOAN_ENABLED_FLAG } from "../constants"; | ||
import { FLASHLOAN_ENABLED_FLAG, TRANSFER_ACCOUNT_AUTHORITY_FLAG } from "../constants"; | ||
import { BankConfigOptRaw } from "./bank"; | ||
@@ -107,2 +107,42 @@ | ||
public async makeEnableAccountTransferForAccountIx( | ||
program: MarginfiProgram, | ||
marginfiAccountAddress: PublicKey | ||
): Promise<InstructionsWrapper> { | ||
const ix = await instructions.makeSetAccountFlagIx( | ||
program, | ||
{ | ||
marginfiGroup: this.address, | ||
marginfiAccount: marginfiAccountAddress, | ||
admin: this.admin, | ||
}, | ||
{ flag: new BN(TRANSFER_ACCOUNT_AUTHORITY_FLAG) } | ||
); | ||
return { | ||
instructions: [ix], | ||
keys: [], | ||
}; | ||
} | ||
public async makeDisableAccountTransferForAccountIx( | ||
program: MarginfiProgram, | ||
marginfiAccountAddress: PublicKey | ||
): Promise<InstructionsWrapper> { | ||
const ix = await instructions.makeUnsetAccountFlagIx( | ||
program, | ||
{ | ||
marginfiGroup: this.address, | ||
marginfiAccount: marginfiAccountAddress, | ||
admin: this.admin, | ||
}, | ||
{ flag: new BN(TRANSFER_ACCOUNT_AUTHORITY_FLAG) } | ||
); | ||
return { | ||
instructions: [ix], | ||
keys: [], | ||
}; | ||
} | ||
public async makePoolConfigureBankIxb( | ||
@@ -109,0 +149,0 @@ program: MarginfiProgram, |
Sorry, the diff of this file is not supported yet
1664547
44053