fbonds-core
Advanced tools
Comparing version 0.6.3-0.beta-2 to 0.6.3-0.beta-3
@@ -21,3 +21,3 @@ "use strict"; | ||
exports.createKeypairFromFile = createKeypairFromFile; | ||
const createAndSendTxn = (_a) => __awaiter(void 0, [_a], void 0, function* ({ connection, instructions, signers, }) { | ||
const createAndSendTxn = ({ connection, instructions, signers, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -39,3 +39,3 @@ const transaction = new anchor_1.web3.Transaction(); | ||
exports.wait = wait; | ||
const writeJson = (_a) => __awaiter(void 0, [_a], void 0, function* ({ input, filePath = 'output.json' }) { | ||
const writeJson = ({ input, filePath = 'output.json' }) => __awaiter(void 0, void 0, void 0, function* () { | ||
return void (yield fs_1.promises.writeFile(filePath, JSON.stringify(input, null, 2))); | ||
@@ -42,0 +42,0 @@ }); |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ export interface TokenExtensions { |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ export declare const calculateOriginalLent: (solAmount: BN, feeAmount: BN) => BN; |
@@ -0,1 +1,3 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +4,0 @@ export declare const BOND_PROOGRAM_AUTHORITY_PREFIX = "bond_program_authority"; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const helpers_1 = require("../../helpers"); | ||
const closeTokenAccountBanxSol = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const closeTokenAccountBanxSol = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type ManageSwapBanxSolVault = (params: { |
@@ -18,3 +18,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const manageSwapBanxSolVault = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const manageSwapBanxSolVault = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type SwapToBanxSol = (params: { |
@@ -17,3 +17,3 @@ "use strict"; | ||
const spl_stake_pool_1 = require("@solana/spl-stake-pool"); | ||
const swapToBanxSol = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const swapToBanxSol = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const instructions = []; | ||
@@ -20,0 +20,0 @@ // Create token account if not specified |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type SwapToSol = (params: { |
@@ -18,3 +18,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const swapToSol = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const swapToSol = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type SwapToSolAdmin = (params: { |
@@ -18,3 +18,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const swapToSolAdmin = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const swapToSolAdmin = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const instructions = []; | ||
@@ -21,0 +21,0 @@ const poolTokenAccount = yield (0, common_1.findAssociatedTokenAddress)(accounts.userPubkey, constants_1.BANX_SOL_MINT); |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type WithdrawRewardsAdmin = (params: { |
@@ -18,3 +18,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const withdrawRewardsAdmin = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const withdrawRewardsAdmin = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -17,5 +17,5 @@ "use strict"; | ||
const helpers_2 = require("./helpers"); | ||
const changeBanxAdventureRevAdmin = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, priorityFees, accounts, | ||
const changeBanxAdventureRevAdmin = ({ programId, connection, priorityFees, accounts, | ||
// optimistics, | ||
args, sendTxn, }) { | ||
args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -13,3 +13,3 @@ import { web3 } from '@coral-xyz/anchor'; | ||
export declare const banxAdventureTimestampToWeeks: (adventureTimestamp: number) => number; | ||
export declare const initializeBanxAdventure: (week: number, settings: Pick<BanxStakingSettings, "tokensPerWeek" | "tokensPerPartnerPoints">) => Promise<BanxAdventure>; | ||
export declare const initializeBanxAdventure: (week: number, settings: Pick<BanxStakingSettings, 'tokensPerWeek' | 'tokensPerPartnerPoints'>) => Promise<BanxAdventure>; | ||
export declare const initializeBanxAdventureSubscription: (adventure: web3.PublicKey, banxTokensStake: web3.PublicKey, user: web3.PublicKey) => Promise<BanxAdventureSubscription>; |
@@ -16,5 +16,5 @@ "use strict"; | ||
const anchor_2 = require("@coral-xyz/anchor"); | ||
const patchBanxTokenStakeAdmin = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, | ||
const patchBanxTokenStakeAdmin = ({ programId, connection, accounts, | ||
// optimistics, | ||
args, sendTxn, }) { | ||
args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -17,3 +17,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const subscribeBanxAdventure = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const subscribeBanxAdventure = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -20,0 +20,0 @@ const instructions = []; |
@@ -17,5 +17,5 @@ "use strict"; | ||
const helpers_2 = require("./helpers"); | ||
const subscribeBanxAdventureAdmin = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, | ||
const subscribeBanxAdventureAdmin = ({ programId, connection, accounts, | ||
// optimistics, | ||
args, sendTxn, }) { | ||
args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const claimStakingRewards = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const claimStakingRewards = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -21,3 +21,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const claimStakingRewards = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const claimStakingRewards = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -24,0 +24,0 @@ const instructions = []; |
@@ -21,4 +21,4 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const stakeBanxNft = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
var _b; | ||
const stakeBanxNft = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
var _a; | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -64,3 +64,3 @@ const instructions = []; | ||
const meta = yield mpl_token_metadata_1.Metadata.fromAccountAddress(connection, nftMetadata); | ||
const ruleSet = (_b = meta.programmableConfig) === null || _b === void 0 ? void 0 : _b.ruleSet; | ||
const ruleSet = (_a = meta.programmableConfig) === null || _a === void 0 ? void 0 : _a.ruleSet; | ||
const tokenRecordData = meta.tokenStandard === mpl_token_metadata_1.TokenStandard.ProgrammableNonFungible | ||
@@ -67,0 +67,0 @@ ? yield mpl_token_metadata_1.TokenRecord.fromAccountAddress(connection, ownerTokenRecord) |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type StakeBanxToken = (params: { |
@@ -20,3 +20,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const stakeBanxToken = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const stakeBanxToken = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -22,4 +22,4 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const unstakeBanxNft = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
var _b; | ||
const unstakeBanxNft = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
var _a; | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -79,3 +79,3 @@ const instructions = []; | ||
const meta = yield mpl_token_metadata_1.Metadata.fromAccountAddress(connection, nftMetadata); | ||
const ruleSet = (_b = meta.programmableConfig) === null || _b === void 0 ? void 0 : _b.ruleSet; | ||
const ruleSet = (_a = meta.programmableConfig) === null || _a === void 0 ? void 0 : _a.ruleSet; | ||
instructions.push(yield program.methods | ||
@@ -82,0 +82,0 @@ .unstakeBanxNft() |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type UnstakeBanxToken = (params: { |
@@ -21,3 +21,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const unstakeBanxToken = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const unstakeBanxToken = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -24,0 +24,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../../constants"); | ||
const updateBanxStakinSettings = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const updateBanxStakinSettings = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const createBorrowAndRepayInstructions = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts }) { | ||
const createBorrowAndRepayInstructions = ({ programId, connection, args, accounts }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const depositSolToFlashLoanPool = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn }) { | ||
const depositSolToFlashLoanPool = ({ programId, connection, args, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const initializeFlashLoanPool = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn }) { | ||
const initializeFlashLoanPool = ({ programId, connection, args, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const withdrawSolFromFlashLoanPool = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn }) { | ||
const withdrawSolFromFlashLoanPool = ({ programId, connection, args, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { Bonds } from '../../../idls/bonds'; | ||
@@ -2,0 +3,0 @@ import { BondTradeTransactionV3 } from '../../types'; |
@@ -62,3 +62,3 @@ "use strict"; | ||
memcmp: { | ||
offset: offset, // number of bytes | ||
offset: offset, | ||
bytes: bytes_1.bs58.encode(Buffer.from([i])), //PerpetualActive | ||
@@ -74,3 +74,3 @@ }, | ||
memcmp: { | ||
offset: offset, // number of bytes | ||
offset: offset, | ||
bytes: bytes_1.bs58.encode(new anchor_1.BN(i).toBuffer()), //PerpetualActive | ||
@@ -77,0 +77,0 @@ }, |
@@ -16,3 +16,3 @@ "use strict"; | ||
// import { anchorRawBNsAndPubkeysToNumsAndStrings, returnAnchorProgram } from '../../helpers'; | ||
const getSpecificAccountsByKeys = (_a) => __awaiter(void 0, [_a], void 0, function* ({ accountId, programId, connection, publicKeys }) { | ||
const getSpecificAccountsByKeys = ({ accountId, programId, connection, publicKeys }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = yield (0, helpers_2.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const anyAccountsRaw = yield program.account[accountId].fetchMultiple(publicKeys); |
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
import { web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ export declare function getProposalPubkey(program: { |
@@ -12,7 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getProposalPubkey = getProposalPubkey; | ||
exports.encodeProposalName = encodeProposalName; | ||
exports.decodeProposalName = decodeProposalName; | ||
exports.getProposalVariantPubkey = getProposalVariantPubkey; | ||
exports.getVotePubkey = getVotePubkey; | ||
exports.getVotePubkey = exports.getProposalVariantPubkey = exports.decodeProposalName = exports.encodeProposalName = exports.getProposalPubkey = void 0; | ||
const constants_1 = require("../../constants"); | ||
@@ -26,2 +22,3 @@ const anchor_1 = require("@coral-xyz/anchor"); | ||
} | ||
exports.getProposalPubkey = getProposalPubkey; | ||
function encodeProposalName(args) { | ||
@@ -42,2 +39,3 @@ if (!args.name) | ||
} | ||
exports.encodeProposalName = encodeProposalName; | ||
function decodeProposalName(value) { | ||
@@ -49,2 +47,3 @@ return (Buffer.from(value) | ||
} | ||
exports.decodeProposalName = decodeProposalName; | ||
// export function decode | ||
@@ -57,2 +56,3 @@ function getProposalVariantPubkey(program, args, accounts) { | ||
} | ||
exports.getProposalVariantPubkey = getProposalVariantPubkey; | ||
function getVotePubkey(program, accounts) { | ||
@@ -64,1 +64,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
exports.getVotePubkey = getVotePubkey; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const helpers_2 = require("./helpers"); | ||
const saveProposal = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn }) { | ||
const saveProposal = ({ programId, connection, args, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const saveVariant = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn }) { | ||
const saveVariant = ({ programId, connection, args, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const createVote = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
const createVote = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const previousProposalVariantPubkey = accounts.proposalVariantPubkey; | ||
@@ -22,3 +22,3 @@ return (0, exports.vote)({ programId, connection, accounts: Object.assign(Object.assign({}, accounts), { previousProposalVariantPubkey }), sendTxn }); | ||
exports.createVote = createVote; | ||
const updateVote = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
const updateVote = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
if (accounts.previousProposalVariantPubkey === accounts.proposalVariantPubkey) | ||
@@ -29,3 +29,3 @@ throw new Error('No change in variant'); | ||
exports.updateVote = updateVote; | ||
const vote = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
const vote = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -32,0 +32,0 @@ const instructions = []; |
@@ -17,3 +17,3 @@ "use strict"; | ||
const helpers_1 = require("../../helpers"); | ||
const boundHadoMarketToFraktMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
const boundHadoMarketToFraktMarket = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -20,0 +20,0 @@ const instructions = []; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const finishHadoMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
const finishHadoMarket = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../constants"); | ||
const initializeHadoMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const initializeHadoMarket = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const helpers_1 = require("../../helpers"); | ||
const updateHadoMarketFee = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const updateHadoMarketFee = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../constants"); | ||
const createBanxTokenStake = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const createBanxTokenStake = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const common_1 = require("../../../common"); | ||
const migrateBondOfferToV2 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const migrateBondOfferToV2 = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const common_1 = require("../../../common"); | ||
const migrateBondOfferToV3 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const migrateBondOfferToV3 = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -17,3 +17,3 @@ "use strict"; | ||
const constants_1 = require("../../constants"); | ||
const migrateBondTradeTransaction = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const migrateBondTradeTransaction = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -20,0 +20,0 @@ const instructions = []; |
@@ -7,5 +7,4 @@ import { web3 } from '@coral-xyz/anchor'; | ||
userPubkey: web3.PublicKey; | ||
bondOffer: web3.PublicKey; | ||
prevHado: web3.PublicKey; | ||
newHado: web3.PublicKey; | ||
fbond: web3.PublicKey; | ||
fraktmarket: web3.PublicKey; | ||
}; | ||
@@ -12,0 +11,0 @@ sendTxn: (transaction: web3.Transaction, signers: web3.Signer[]) => Promise<void>; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const migrateOfferHadoMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
const migrateOfferHadoMarket = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -24,5 +24,4 @@ const instructions = []; | ||
systemProgram: anchor_1.web3.SystemProgram.programId, | ||
bondOffer: accounts.bondOffer, | ||
hadoMarket: accounts.newHado, | ||
hadoMarketPrevious: accounts.prevHado, | ||
fbond: accounts.fbond, | ||
fraktMarket: accounts.fraktmarket | ||
}) | ||
@@ -29,0 +28,0 @@ .instruction()); |
@@ -18,3 +18,3 @@ "use strict"; | ||
const perpetual_1 = require("../perpetual"); | ||
const patchBidCapInOffer = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const patchBidCapInOffer = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const spl_token_1 = require("@solana/spl-token"); | ||
const createPerpetualListing = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const createPerpetualListing = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const amountToGet = new anchor_1.BN((0, offer_1.getFullLoanBodyFromBorrowerSendedAmount)({ | ||
@@ -23,0 +23,0 @@ borrowerSendedAmount: Number(args.amountToGetBorrower), |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ import { CnftParams } from '../../../helpers'; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const offer_1 = require("../offer"); | ||
const createPerpetualListingCnft = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const createPerpetualListingCnft = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const amountToGet = new anchor_1.BN((0, offer_1.getFullLoanBodyFromBorrowerSendedAmount)({ | ||
@@ -21,0 +21,0 @@ borrowerSendedAmount: Number(args.amountToGetBorrower), |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ import { LendingTokenType } from '../../../types'; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const offer_1 = require("../offer"); | ||
const createPerpetualListingCore = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const createPerpetualListingCore = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const amountToGet = new anchor_1.BN((0, offer_1.getFullLoanBodyFromBorrowerSendedAmount)({ | ||
@@ -21,0 +21,0 @@ borrowerSendedAmount: Number(args.amountToGetBorrower), |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ import { LendingTokenType } from '../../../types'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const offer_1 = require("../offer"); | ||
const createPerpetualListingSpl = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const createPerpetualListingSpl = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const amountToGet = new anchor_1.BN((0, offer_1.getFullLoanBodyFromBorrowerSendedAmount)({ | ||
@@ -22,0 +22,0 @@ borrowerSendedAmount: Number(args.amountToGetBorrower), |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ import { LendingTokenType } from '../../../types'; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const offer_1 = require("../offer"); | ||
const createPerpetualListingStakedBanx = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const createPerpetualListingStakedBanx = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const amountToGet = new anchor_1.BN((0, offer_1.getFullLoanBodyFromBorrowerSendedAmount)({ | ||
@@ -21,0 +21,0 @@ borrowerSendedAmount: Number(args.amountToGetBorrower), |
@@ -19,3 +19,3 @@ "use strict"; | ||
const offer_1 = require("../offer"); | ||
const lendToBorrowerListing = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const lendToBorrowerListing = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const removePerpetualListing = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const removePerpetualListing = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const removePerpetualListingCnft = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const removePerpetualListingCnft = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const spl_account_compression_1 = require("@solana/spl-account-compression"); | ||
const removePerpetualListingCore = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const removePerpetualListingCore = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const removePerpetualListingStakedBanx = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const removePerpetualListingStakedBanx = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { CnftParams } from './../../../../helpers'; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const common_1 = require("../../../../../common"); | ||
const borrowCnftPerpetual = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const borrowCnftPerpetual = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { CnftParams } from './../../../../helpers'; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const borrowCnftPerpetualCanopy = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const borrowCnftPerpetualCanopy = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const borrowPerpetual = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const borrowPerpetual = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
let accountCreated = { | ||
@@ -23,0 +23,0 @@ fraktBond: constants_1.EMPTY_PUBKEY, |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const borrowPerpetualCore = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const borrowPerpetualCore = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const borrowPerpetualSpl = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const borrowPerpetualSpl = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const borrowStakedBanxPerpetual = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const borrowStakedBanxPerpetual = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
let accountCreated = { | ||
@@ -23,0 +23,0 @@ fraktBond: constants_1.EMPTY_PUBKEY, |
@@ -17,3 +17,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const claimCnftPerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const claimCnftPerpetualLoan = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -20,0 +20,0 @@ const instructions = []; |
@@ -17,3 +17,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const claimCnftPerpetualLoanCanopy = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const claimCnftPerpetualLoanCanopy = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -20,0 +20,0 @@ const instructions = []; |
@@ -17,3 +17,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const claimPerpetualLoanCore = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const claimPerpetualLoanCore = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -20,0 +20,0 @@ const instructions = []; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const banxAdventure_1 = require("../../../banxStaking/banxAdventure"); | ||
const claimPerpetualLoanv2 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const claimPerpetualLoanv2 = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -100,3 +100,3 @@ const instructions = []; | ||
]; | ||
instructions.push(...(0, common_1.createAssociatedTokenAccountInstruction)(userTokenAccount, accounts.userPubkey, accounts.userPubkey, accounts.collateralTokenMint)); | ||
// instructions.push(...createAssociatedTokenAccountInstruction(userTokenAccount, accounts.userPubkey, accounts.userPubkey, accounts.collateralTokenMint)); | ||
instructions.push(yield program.methods | ||
@@ -103,0 +103,0 @@ .claimPerpetualLoanV2(null) |
@@ -18,3 +18,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const claimPerpetualLoanV2Spl = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const claimPerpetualLoanV2Spl = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const terminatePerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const terminatePerpetualLoan = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const borrowerRefinance = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const borrowerRefinance = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const borrowerRefinanceToSame = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const borrowerRefinanceToSame = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const instantRefinancePerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const instantRefinancePerpetualLoan = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { LendingTokenType } from '../../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const refinancePerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const refinancePerpetualLoan = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const common_1 = require("../../../../../common"); | ||
const repayCnftPerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const repayCnftPerpetualLoan = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -20,3 +20,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const repayCnftPerpetualLoanCanopy = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const repayCnftPerpetualLoanCanopy = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -23,0 +23,0 @@ const instructions = []; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const repayPartialPerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const repayPartialPerpetualLoan = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const repayPerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const repayPerpetualLoan = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
let accountCreated = { | ||
@@ -22,0 +22,0 @@ fraktBond: constants_1.EMPTY_PUBKEY, |
@@ -19,3 +19,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const repayPerpetualLoanCore = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const repayPerpetualLoanCore = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const repayPerpetualLoanSpl = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const repayPerpetualLoanSpl = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const repayStakedBanxPerpetualLoan = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const repayStakedBanxPerpetualLoan = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
let accountCreated = { | ||
@@ -22,0 +22,0 @@ fraktBond: constants_1.EMPTY_PUBKEY, |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type SetRepaymentCall = (params: { |
@@ -15,3 +15,3 @@ "use strict"; | ||
const helpers_1 = require("../../../../helpers"); | ||
const setRepaymentCall = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const setRepaymentCall = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../../constants"); | ||
const makePerpetualMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const makePerpetualMarket = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../../constants"); | ||
const makePerpetualMarketValidation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const makePerpetualMarketValidation = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const helpers_1 = require("../../../helpers"); | ||
const updateInterestPerpetualMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const updateInterestPerpetualMarket = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../../constants"); | ||
const updatePerpetualMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn }) { | ||
const updatePerpetualMarket = ({ programId, connection, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BondTradeTransactionV3, FraktBond } from '../../../../types'; | ||
@@ -18,9 +19,9 @@ import { BN, web3 } from '@coral-xyz/anchor'; | ||
declare enum ActivityEvent { | ||
Initialized = "Initialized",//? Creates new BondTradeTransactionV3 | ||
Initialized = "Initialized", | ||
RepaidFull = "RepaidFull", | ||
RepaidPartial = "RepaidPartial",//? Creates new BondTradeTransactionV3 | ||
RepaidPartial = "RepaidPartial", | ||
Terminated = "Terminated", | ||
Liquidated = "Liquidated", | ||
RefinancedByLender = "RefinancedByLender",//? Creates new BondTradeTransactionV3 | ||
RefinancedByAuction = "RefinancedByAuction",//? Creates new BondTradeTransactionV3 | ||
RefinancedByLender = "RefinancedByLender", | ||
RefinancedByAuction = "RefinancedByAuction", | ||
Reborrowed = "Reborrowed" | ||
@@ -27,0 +28,0 @@ } |
@@ -19,3 +19,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const claimPerpetualBondOfferInterest = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const claimPerpetualBondOfferInterest = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const claimPerpetualBondOfferRepayments = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const claimPerpetualBondOfferRepayments = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const claimPerpetualBondOfferStakingRewards = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const claimPerpetualBondOfferStakingRewards = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -21,0 +21,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ import { BondFeatures, BondingCurveType } from '../../../types'; |
@@ -21,3 +21,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const createPerpetualBondOfferBonding = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const createPerpetualBondOfferBonding = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -24,0 +24,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BondOfferV3, BondTradeTransactionV2, BondTradeTransactionV2State, BondTradeTransactionV3, BondingCurveType, FraktBond, LendingTokenType, PairState, RedeemResult, RepayDestination } from '../../../types'; | ||
@@ -2,0 +3,0 @@ import { BN, web3 } from '@coral-xyz/anchor'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const removePerpetualOffer = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const removePerpetualOffer = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ import { LendingTokenType } from '../../../types'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const token_1 = require("@coral-xyz/anchor/dist/cjs/utils/token"); | ||
const updatePerpetualOfferBonding = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const updatePerpetualOfferBonding = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -22,0 +22,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { web3, BN } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type TransferToSponsorVault = (params: { |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../../constants"); | ||
const transferToSponsorVault = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const transferToSponsorVault = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="bn.js" /> | ||
import { web3, BN } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ type WithdrawFromSponsorVault = (params: { |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../../constants"); | ||
const withdrawFromSponsorVault = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn }) { | ||
const withdrawFromSponsorVault = ({ programId, connection, accounts, args, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const fixBrokenBanxStake = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const fixBrokenBanxStake = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const mapBanxToPoints = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, args, sendTxn, }) { | ||
const mapBanxToPoints = ({ programId, connection, accounts, args, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
import { Bonds } from '../idls/bonds'; | ||
@@ -27,3 +28,3 @@ import { Sanctum } from './../idls/s_controller'; | ||
export declare const createDecodeEnum: <T extends string, D>(enumValue: T, decodedEnumType: D) => D; | ||
export declare const enumToAnchorEnumNew: <T extends string | number, E>(enumValue: T, enumObject: E) => { [K in keyof E]?: {}; } & { [K in T]: {}; }; | ||
export declare const enumToAnchorEnumNew: <T extends string | number, E>(enumValue: T, enumObject: E) => { [K in keyof E]?: {} | undefined; } & { [K_1 in T]: {}; }; | ||
export declare const nowInSeconds: () => number; | ||
@@ -81,3 +82,3 @@ export declare const enumToAnchorEnum: (anyEnum: any) => { | ||
export declare const calculatePriorityFees: (connection: anchor.web3.Connection) => Promise<number>; | ||
export declare const sortCompareBN: (a: BN, b: BN, order?: "desc" | "asc") => 0 | 1 | -1; | ||
export declare const sortCompareBN: (a: BN, b: BN, order?: 'desc' | 'asc') => 0 | 1 | -1; | ||
/** | ||
@@ -84,0 +85,0 @@ * @param amountOfBonds lender apr |
@@ -38,9 +38,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.calcBorrowerTokenAPR = exports.sortCompareBN = exports.calculatePriorityFees = exports.getMaxLoanValueFromBondOfferBN = exports.mapProof = exports.findRuleSetPDA = exports.findTokenRecordPda = exports.getRuleset = exports.getMetaplexMetadata = exports.calculatePricesArray = exports.getSumOfOrdersSeries = exports.calculateNextSpotPrice = exports.calculateNextSpotPriceBN = exports.enumToAnchorEnum = exports.nowInSeconds = exports.enumToAnchorEnumNew = exports.createDecodeEnum = exports.getMetaplexMetadataPda = exports.getMetaplexEditionPda = exports.anchorRawBNsAndPubkeysToNumsAndStringsWithType = exports.anchorRawBNsAndPubkeysToNumsAndStrings = exports.returnAnchorProgramSanctum = exports.returnAnchorProgram = exports.ParseType = void 0; | ||
exports.getAsset = getAsset; | ||
exports.getTreeCanopyDepth = getTreeCanopyDepth; | ||
exports.getAssetProof = getAssetProof; | ||
exports.decode64 = decode64; | ||
exports.decode = decode; | ||
exports.bufferToArray = bufferToArray; | ||
exports.calcBorrowerTokenAPR = exports.sortCompareBN = exports.calculatePriorityFees = exports.getMaxLoanValueFromBondOfferBN = exports.bufferToArray = exports.decode = exports.decode64 = exports.mapProof = exports.getAssetProof = exports.getTreeCanopyDepth = exports.getAsset = exports.findRuleSetPDA = exports.findTokenRecordPda = exports.getRuleset = exports.getMetaplexMetadata = exports.calculatePricesArray = exports.getSumOfOrdersSeries = exports.calculateNextSpotPrice = exports.calculateNextSpotPriceBN = exports.enumToAnchorEnum = exports.nowInSeconds = exports.enumToAnchorEnumNew = exports.createDecodeEnum = exports.getMetaplexMetadataPda = exports.getMetaplexEditionPda = exports.anchorRawBNsAndPubkeysToNumsAndStringsWithType = exports.anchorRawBNsAndPubkeysToNumsAndStrings = exports.returnAnchorProgramSanctum = exports.returnAnchorProgram = exports.ParseType = void 0; | ||
const common_1 = require("../common"); | ||
@@ -65,3 +59,3 @@ const bonds_json_1 = __importDefault(require("../idls/bonds.json")); | ||
ParseType["String"] = "string"; | ||
})(ParseType || (exports.ParseType = ParseType = {})); | ||
})(ParseType = exports.ParseType || (exports.ParseType = {})); | ||
const returnAnchorProgram = (connection) => { | ||
@@ -374,2 +368,3 @@ return new anchor_1.Program(bonds_json_1.default, new anchor_1.AnchorProvider(connection, (0, common_1.createFakeWallet)())); | ||
} | ||
exports.getAsset = getAsset; | ||
function getTreeCanopyDepth(treeAddress, connection) { | ||
@@ -382,2 +377,3 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
exports.getTreeCanopyDepth = getTreeCanopyDepth; | ||
function getAssetProof(assetId, rpcUrl) { | ||
@@ -404,2 +400,3 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
exports.getAssetProof = getAssetProof; | ||
const mapProof = (assetProof, canopyDepth) => { | ||
@@ -420,5 +417,7 @@ if (!assetProof.proof || assetProof.proof.length === 0) { | ||
} | ||
exports.decode64 = decode64; | ||
function decode(stuff) { | ||
return bufferToArray(bs58.decode(stuff)); | ||
} | ||
exports.decode = decode; | ||
function bufferToArray(buffer) { | ||
@@ -431,2 +430,3 @@ const nums = []; | ||
} | ||
exports.bufferToArray = bufferToArray; | ||
const getMaxLoanValueFromBondOfferBN = (bondOffer) => anchor_2.BN.min((bondOffer.buyOrdersQuantity > new anchor_2.BN(0) ? bondOffer.currentSpotPrice : new anchor_2.BN(0)).add(bondOffer.bidSettlement), bondOffer.validation.loanToValueFilter); | ||
@@ -461,3 +461,3 @@ exports.getMaxLoanValueFromBondOfferBN = getMaxLoanValueFromBondOfferBN; | ||
} | ||
catch (_a) { | ||
catch (_d) { | ||
return constants_1.BASE_PRIORITY_FEES; | ||
@@ -464,0 +464,0 @@ } |
@@ -0,1 +1,3 @@ | ||
/// <reference types="bn.js" /> | ||
/// <reference types="node" /> | ||
import { BN, web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +4,0 @@ export interface FraktBond { |
@@ -15,3 +15,3 @@ "use strict"; | ||
FraktBondState["PerpetualLiquidatedByClaim"] = "perpetualLiquidatedByClaim"; | ||
})(FraktBondState || (exports.FraktBondState = FraktBondState = {})); | ||
})(FraktBondState = exports.FraktBondState || (exports.FraktBondState = {})); | ||
var BondTradeTransactionV2State; | ||
@@ -32,3 +32,3 @@ (function (BondTradeTransactionV2State) { | ||
BondTradeTransactionV2State["PerpetualLenderListing"] = "perpetualLenderListing"; | ||
})(BondTradeTransactionV2State || (exports.BondTradeTransactionV2State = BondTradeTransactionV2State = {})); | ||
})(BondTradeTransactionV2State = exports.BondTradeTransactionV2State || (exports.BondTradeTransactionV2State = {})); | ||
var CollateralBoxType; | ||
@@ -38,3 +38,3 @@ (function (CollateralBoxType) { | ||
CollateralBoxType["Escrowless"] = "escrowless"; | ||
})(CollateralBoxType || (exports.CollateralBoxType = CollateralBoxType = {})); | ||
})(CollateralBoxType = exports.CollateralBoxType || (exports.CollateralBoxType = {})); | ||
var BondFeatures; | ||
@@ -49,3 +49,3 @@ (function (BondFeatures) { | ||
BondFeatures["AutoReceiveAndReceiveSpl"] = "autoReceiveAndReceiveSpl"; | ||
})(BondFeatures || (exports.BondFeatures = BondFeatures = {})); | ||
})(BondFeatures = exports.BondFeatures || (exports.BondFeatures = {})); | ||
var BondingCurveType; | ||
@@ -59,3 +59,3 @@ (function (BondingCurveType) { | ||
BondingCurveType["ExponentialBanxSol"] = "exponentialBanxSol"; | ||
})(BondingCurveType || (exports.BondingCurveType = BondingCurveType = {})); | ||
})(BondingCurveType = exports.BondingCurveType || (exports.BondingCurveType = {})); | ||
var PairType; | ||
@@ -66,3 +66,3 @@ (function (PairType) { | ||
PairType["LiquidityProvision"] = "liquidityProvision"; | ||
})(PairType || (exports.PairType = PairType = {})); | ||
})(PairType = exports.PairType || (exports.PairType = {})); | ||
var NftValidationWhitelistType; | ||
@@ -76,3 +76,3 @@ (function (NftValidationWhitelistType) { | ||
NftValidationWhitelistType["CoreCollection"] = "coreCollection"; | ||
})(NftValidationWhitelistType || (exports.NftValidationWhitelistType = NftValidationWhitelistType = {})); | ||
})(NftValidationWhitelistType = exports.NftValidationWhitelistType || (exports.NftValidationWhitelistType = {})); | ||
var OrderType; | ||
@@ -82,3 +82,3 @@ (function (OrderType) { | ||
OrderType["Sell"] = "sell"; | ||
})(OrderType || (exports.OrderType = OrderType = {})); | ||
})(OrderType = exports.OrderType || (exports.OrderType = {})); | ||
var MarketState; | ||
@@ -91,3 +91,3 @@ (function (MarketState) { | ||
MarketState["PrivateAvailablePerpetual"] = "privateAvailablePerpetual"; | ||
})(MarketState || (exports.MarketState = MarketState = {})); | ||
})(MarketState = exports.MarketState || (exports.MarketState = {})); | ||
var MarketTrustType; | ||
@@ -97,3 +97,3 @@ (function (MarketTrustType) { | ||
MarketTrustType["Verified"] = "verified"; | ||
})(MarketTrustType || (exports.MarketTrustType = MarketTrustType = {})); | ||
})(MarketTrustType = exports.MarketTrustType || (exports.MarketTrustType = {})); | ||
var PairValidationType; | ||
@@ -103,3 +103,3 @@ (function (PairValidationType) { | ||
PairValidationType["CustomValidation"] = "customValidation"; | ||
})(PairValidationType || (exports.PairValidationType = PairValidationType = {})); | ||
})(PairValidationType = exports.PairValidationType || (exports.PairValidationType = {})); | ||
var PairTokenType; | ||
@@ -109,3 +109,3 @@ (function (PairTokenType) { | ||
PairTokenType["Spl"] = "spl"; | ||
})(PairTokenType || (exports.PairTokenType = PairTokenType = {})); | ||
})(PairTokenType = exports.PairTokenType || (exports.PairTokenType = {})); | ||
var WhitelistType; | ||
@@ -115,3 +115,3 @@ (function (WhitelistType) { | ||
WhitelistType["Creator"] = "creator"; | ||
})(WhitelistType || (exports.WhitelistType = WhitelistType = {})); | ||
})(WhitelistType = exports.WhitelistType || (exports.WhitelistType = {})); | ||
var RepayDestination; | ||
@@ -123,3 +123,3 @@ (function (RepayDestination) { | ||
RepayDestination["Vault"] = "vault"; | ||
})(RepayDestination || (exports.RepayDestination = RepayDestination = {})); | ||
})(RepayDestination = exports.RepayDestination || (exports.RepayDestination = {})); | ||
var LendingTokenType; | ||
@@ -130,3 +130,3 @@ (function (LendingTokenType) { | ||
LendingTokenType["BanxSol"] = "banxSol"; | ||
})(LendingTokenType || (exports.LendingTokenType = LendingTokenType = {})); | ||
})(LendingTokenType = exports.LendingTokenType || (exports.LendingTokenType = {})); | ||
var RedeemResult; | ||
@@ -142,3 +142,3 @@ (function (RedeemResult) { | ||
RedeemResult["Claimed"] = "claimed"; | ||
})(RedeemResult || (exports.RedeemResult = RedeemResult = {})); | ||
})(RedeemResult = exports.RedeemResult || (exports.RedeemResult = {})); | ||
var PairState; | ||
@@ -157,3 +157,3 @@ (function (PairState) { | ||
PairState["PerpetualListing"] = "perpetualListing"; | ||
})(PairState || (exports.PairState = PairState = {})); | ||
})(PairState = exports.PairState || (exports.PairState = {})); | ||
var PairAuthorityType; | ||
@@ -163,3 +163,3 @@ (function (PairAuthorityType) { | ||
PairAuthorityType["CustomAuthority"] = "customAuthority"; | ||
})(PairAuthorityType || (exports.PairAuthorityType = PairAuthorityType = {})); | ||
})(PairAuthorityType = exports.PairAuthorityType || (exports.PairAuthorityType = {})); | ||
var AuthorityType; | ||
@@ -169,3 +169,3 @@ (function (AuthorityType) { | ||
AuthorityType["OneTime"] = "oneTime"; | ||
})(AuthorityType || (exports.AuthorityType = AuthorityType = {})); | ||
})(AuthorityType = exports.AuthorityType || (exports.AuthorityType = {})); | ||
var AuthorityState; | ||
@@ -177,3 +177,3 @@ (function (AuthorityState) { | ||
AuthorityState["Revoked"] = "revoked"; | ||
})(AuthorityState || (exports.AuthorityState = AuthorityState = {})); | ||
})(AuthorityState = exports.AuthorityState || (exports.AuthorityState = {})); | ||
var ScopeType; | ||
@@ -183,3 +183,3 @@ (function (ScopeType) { | ||
ScopeType["Pair"] = "pair"; | ||
})(ScopeType || (exports.ScopeType = ScopeType = {})); | ||
})(ScopeType = exports.ScopeType || (exports.ScopeType = {})); | ||
var NftValidationDurationType; | ||
@@ -189,3 +189,3 @@ (function (NftValidationDurationType) { | ||
NftValidationDurationType["Infinite"] = "infinite"; | ||
})(NftValidationDurationType || (exports.NftValidationDurationType = NftValidationDurationType = {})); | ||
})(NftValidationDurationType = exports.NftValidationDurationType || (exports.NftValidationDurationType = {})); | ||
var NftBoxType; | ||
@@ -195,3 +195,3 @@ (function (NftBoxType) { | ||
NftBoxType["Escrowless"] = "escrowless"; | ||
})(NftBoxType || (exports.NftBoxType = NftBoxType = {})); | ||
})(NftBoxType = exports.NftBoxType || (exports.NftBoxType = {})); | ||
var NftBoxState; | ||
@@ -201,3 +201,3 @@ (function (NftBoxState) { | ||
NftBoxState["Active"] = "active"; | ||
})(NftBoxState || (exports.NftBoxState = NftBoxState = {})); | ||
})(NftBoxState = exports.NftBoxState || (exports.NftBoxState = {})); | ||
var AutocompoundDepositState; | ||
@@ -208,3 +208,3 @@ (function (AutocompoundDepositState) { | ||
AutocompoundDepositState["Removed"] = "removed"; | ||
})(AutocompoundDepositState || (exports.AutocompoundDepositState = AutocompoundDepositState = {})); | ||
})(AutocompoundDepositState = exports.AutocompoundDepositState || (exports.AutocompoundDepositState = {})); | ||
var BondTradeTransactionV2Type; | ||
@@ -219,3 +219,3 @@ (function (BondTradeTransactionV2Type) { | ||
BondTradeTransactionV2Type["AutoReceiveAndReceiveSpl"] = "autoReceiveAndReceiveSpl"; | ||
})(BondTradeTransactionV2Type || (exports.BondTradeTransactionV2Type = BondTradeTransactionV2Type = {})); | ||
})(BondTradeTransactionV2Type = exports.BondTradeTransactionV2Type || (exports.BondTradeTransactionV2Type = {})); | ||
var AutocompoundType; | ||
@@ -226,3 +226,3 @@ (function (AutocompoundType) { | ||
AutocompoundType["AutocompoundAndReceiveNft"] = "autocompoundAndReceiveNft"; | ||
})(AutocompoundType || (exports.AutocompoundType = AutocompoundType = {})); | ||
})(AutocompoundType = exports.AutocompoundType || (exports.AutocompoundType = {})); | ||
var BondEventType; | ||
@@ -236,3 +236,3 @@ (function (BondEventType) { | ||
BondEventType["Refinance"] = "refinance"; | ||
})(BondEventType || (exports.BondEventType = BondEventType = {})); | ||
})(BondEventType = exports.BondEventType || (exports.BondEventType = {})); | ||
var BanxStakeState; | ||
@@ -243,3 +243,3 @@ (function (BanxStakeState) { | ||
BanxStakeState["Liquidated"] = "liquidated"; | ||
})(BanxStakeState || (exports.BanxStakeState = BanxStakeState = {})); | ||
})(BanxStakeState = exports.BanxStakeState || (exports.BanxStakeState = {})); | ||
var AdventureState; | ||
@@ -250,3 +250,3 @@ (function (AdventureState) { | ||
AdventureState["DistributingInitialized"] = "distributingInitialized"; | ||
})(AdventureState || (exports.AdventureState = AdventureState = {})); | ||
})(AdventureState = exports.AdventureState || (exports.AdventureState = {})); | ||
var BanxAdventureSubscriptionState; | ||
@@ -257,3 +257,3 @@ (function (BanxAdventureSubscriptionState) { | ||
BanxAdventureSubscriptionState["Claimed"] = "claimed"; | ||
})(BanxAdventureSubscriptionState || (exports.BanxAdventureSubscriptionState = BanxAdventureSubscriptionState = {})); | ||
})(BanxAdventureSubscriptionState = exports.BanxAdventureSubscriptionState || (exports.BanxAdventureSubscriptionState = {})); | ||
var BanxAdventureState; | ||
@@ -263,3 +263,3 @@ (function (BanxAdventureState) { | ||
BanxAdventureState["Active"] = "active"; | ||
})(BanxAdventureState || (exports.BanxAdventureState = BanxAdventureState = {})); | ||
})(BanxAdventureState = exports.BanxAdventureState || (exports.BanxAdventureState = {})); | ||
var BanxStakingSettingsState; | ||
@@ -269,3 +269,3 @@ (function (BanxStakingSettingsState) { | ||
BanxStakingSettingsState["Active"] = "active"; | ||
})(BanxStakingSettingsState || (exports.BanxStakingSettingsState = BanxStakingSettingsState = {})); | ||
})(BanxStakingSettingsState = exports.BanxStakingSettingsState || (exports.BanxStakingSettingsState = {})); | ||
var BanxTokenStakeState; | ||
@@ -276,3 +276,3 @@ (function (BanxTokenStakeState) { | ||
BanxTokenStakeState["Unstaked"] = "unstaked"; | ||
})(BanxTokenStakeState || (exports.BanxTokenStakeState = BanxTokenStakeState = {})); | ||
})(BanxTokenStakeState = exports.BanxTokenStakeState || (exports.BanxTokenStakeState = {})); | ||
var ProposalState; | ||
@@ -282,2 +282,2 @@ (function (ProposalState) { | ||
ProposalState["Initialized"] = "initialized"; | ||
})(ProposalState || (exports.ProposalState = ProposalState = {})); | ||
})(ProposalState = exports.ProposalState || (exports.ProposalState = {})); |
@@ -13,3 +13,3 @@ "use strict"; | ||
exports.signAndSendAllTransactions = void 0; | ||
const signAndSendAllTransactions = (_a) => __awaiter(void 0, [_a], void 0, function* ({ transactionsAndSigners, connection, wallet, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) { | ||
const signAndSendAllTransactions = ({ transactionsAndSigners, connection, wallet, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -16,0 +16,0 @@ onBeforeApprove === null || onBeforeApprove === void 0 ? void 0 : onBeforeApprove(); |
@@ -16,3 +16,3 @@ "use strict"; | ||
//? It needs when transactions from next chunk are related to transactions from previos chunk | ||
const signAndSendAllTransactionsInSequence = (_a) => __awaiter(void 0, [_a], void 0, function* ({ txnsAndSigners, connection, wallet, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) { | ||
const signAndSendAllTransactionsInSequence = ({ txnsAndSigners, connection, wallet, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -19,0 +19,0 @@ //? Filter empty arrays from two-dimensional array |
@@ -19,3 +19,3 @@ "use strict"; | ||
//? It needs when transactions from next chunk are related to transactions from previos chunk | ||
const signAndSendEnhancedTxns = (_a) => __awaiter(void 0, [_a], void 0, function* ({ fastTrackInstructionsAndSigners, connection, wallet, split, skipPreflight, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) { | ||
const signAndSendEnhancedTxns = ({ fastTrackInstructionsAndSigners, connection, wallet, split, skipPreflight, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -22,0 +22,0 @@ if (split) { |
@@ -18,3 +18,3 @@ "use strict"; | ||
//? It needs when transactions from next chunk are related to transactions from previos chunk | ||
const signAndSendV0TransactionWithLookupTables = (_a) => __awaiter(void 0, [_a], void 0, function* ({ createLookupTableTxns, extendLookupTableTxns, v0InstructionsAndSigners, fastTrackInstructionsAndSigners, connection, wallet, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) { | ||
const signAndSendV0TransactionWithLookupTables = ({ createLookupTableTxns, extendLookupTableTxns, v0InstructionsAndSigners, fastTrackInstructionsAndSigners, connection, wallet, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -21,0 +21,0 @@ const { blockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash(); |
@@ -19,3 +19,3 @@ "use strict"; | ||
//? It needs when transactions from next chunk are related to transactions from previos chunk | ||
const signAndSendV0TransactionWithLookupTablesSeparateSignatures = (_a) => __awaiter(void 0, [_a], void 0, function* ({ notBondTxns, createLookupTableTxns, extendLookupTableTxns, v0InstructionsAndSigners, fastTrackInstructionsAndSigners, connection, wallet, isLedger, split, skipTimeout, skipPreflight, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) { | ||
const signAndSendV0TransactionWithLookupTablesSeparateSignatures = ({ notBondTxns, createLookupTableTxns, extendLookupTableTxns, v0InstructionsAndSigners, fastTrackInstructionsAndSigners, connection, wallet, isLedger, split, skipTimeout, skipPreflight, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -22,0 +22,0 @@ if (isLedger || split) { |
@@ -19,3 +19,3 @@ "use strict"; | ||
//? It needs when transactions from next chunk are related to transactions from previos chunk | ||
const signAndSendV0TransactionWithLookupTablesSeparateSignaturesWithAdditionalMessages = (_a) => __awaiter(void 0, [_a], void 0, function* ({ notBondTxns, createLookupTableTxns, extendLookupTableTxns, additionalMessages, v0InstructionsAndSigners, fastTrackInstructionsAndSigners, connection, wallet, isLedger, skipTimeout, skipPreflight, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) { | ||
const signAndSendV0TransactionWithLookupTablesSeparateSignaturesWithAdditionalMessages = ({ notBondTxns, createLookupTableTxns, extendLookupTableTxns, additionalMessages, v0InstructionsAndSigners, fastTrackInstructionsAndSigners, connection, wallet, isLedger, skipTimeout, skipPreflight, commitment = 'confirmed', onBeforeApprove, onAfterSend, onSuccess, onError, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -22,0 +22,0 @@ if (isLedger) { |
@@ -0,3 +1,4 @@ | ||
/// <reference types="node" /> | ||
export declare const ORACLE_PREFIX = "oracle"; | ||
export declare const WHITELIST_ENTRY_PREFIX = "whitelist_entry"; | ||
export declare const ENCODER: import("util").TextEncoder; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const helpers_1 = require("../../helpers"); | ||
const activateFraktMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const activateFraktMarket = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(programId, connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
import { web3 } from '@coral-xyz/anchor'; | ||
@@ -2,0 +3,0 @@ import { NftValidationWhitelistType } from '../../types'; |
@@ -17,3 +17,3 @@ "use strict"; | ||
const helpers_2 = require("../../../fbond-protocol/helpers"); | ||
const addWhitelistToMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const addWhitelistToMarket = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(programId, connection); | ||
@@ -20,0 +20,0 @@ const instructions = []; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const helpers_1 = require("../../helpers"); | ||
const initializeFraktMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const initializeFraktMarket = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(programId, connection); | ||
@@ -18,0 +18,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const helpers_1 = require("../../helpers"); | ||
const removeWhitelistFromMarket = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, accounts, sendTxn, }) { | ||
const removeWhitelistFromMarket = ({ programId, connection, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(programId, connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const initializeOracle = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn }) { | ||
const initializeOracle = ({ programId, connection, args, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(programId, connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const anchor_1 = require("@coral-xyz/anchor"); | ||
const setOracleAuthority = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn }) { | ||
const setOracleAuthority = ({ programId, connection, args, accounts, sendTxn }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(programId, connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const constants_1 = require("../../constants"); | ||
const setOracleFloor = (_a) => __awaiter(void 0, [_a], void 0, function* ({ programId, connection, args, accounts, sendTxn, }) { | ||
const setOracleFloor = ({ programId, connection, args, accounts, sendTxn, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = (0, helpers_1.returnAnchorProgram)(programId, connection); | ||
@@ -19,0 +19,0 @@ const instructions = []; |
@@ -12,3 +12,3 @@ "use strict"; | ||
NftValidationWhitelistType["CoreCollection"] = "coreCollection"; | ||
})(NftValidationWhitelistType || (exports.NftValidationWhitelistType = NftValidationWhitelistType = {})); | ||
})(NftValidationWhitelistType = exports.NftValidationWhitelistType || (exports.NftValidationWhitelistType = {})); | ||
var FraktMarketState; | ||
@@ -18,2 +18,2 @@ (function (FraktMarketState) { | ||
FraktMarketState["Active"] = "active"; | ||
})(FraktMarketState || (exports.FraktMarketState = FraktMarketState = {})); | ||
})(FraktMarketState = exports.FraktMarketState || (exports.FraktMarketState = {})); |
{ | ||
"name": "fbonds-core", | ||
"version": "0.6.30.beta-2", | ||
"version": "0.6.30.beta-3", | ||
"description": "Banx protocol sdk", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
2257512
60240
2