UNPKG

@rainfi/sdk

Version:

This package is used to interact with Rain.fi protocol on Solana

225 lines 10.6 kB
"use strict"; /** * This code was GENERATED using the solita package. * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. * * See: https://github.com/metaplex-foundation/solita */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.swapBeet = exports.isSwapClone = exports.isSwapStakeDexPrefundWithdrawStakeAndDepositStake = exports.isSwapRaydiumClmmV2 = exports.isSwapOpenBookV2 = exports.isSwapMeteoraDlmm = exports.isSwapPerpsRemoveLiquidity = exports.isSwapPerpsAddLiquidity = exports.isSwapPerps = exports.isSwapGooseFXV2 = exports.isSwapStakeDexSwapViaStake = exports.isSwapStakeDexStakeWrappedSol = exports.isSwapHeliumTreasuryManagementRedeemV0 = exports.isSwapTokenSwapV2 = exports.isSwapSymmetry = exports.isSwapPhoenix = exports.isSwapOpenbook = exports.isSwapRaydiumClmm = exports.isSwapLifinityV2 = exports.isSwapDradex = exports.isSwapMarcoPolo = exports.isSwapBalansol = exports.isSwapDeltaFi = exports.isSwapGooseFX = exports.isSwapMeteora = exports.isSwapInvariant = exports.isSwapWhirlpool = exports.isSwapAldrinV2 = exports.isSwapAldrin = exports.isSwapMarinadeUnstake = exports.isSwapMarinadeDeposit = exports.isSwapSerum = exports.isSwapCykura = exports.isSwapMercurial = exports.isSwapLifinity = exports.isSwapCrema = exports.isSwapRaydium = exports.isSwapCropper = exports.isSwapStep = exports.isSwapSencha = exports.isSwapTokenSwap = exports.isSwapSaberAddDecimalsWithdraw = exports.isSwapSaberAddDecimalsDeposit = exports.isSwapSaber = void 0; const beet = __importStar(require("@metaplex-foundation/beet")); const Side_1 = require("./Side"); const isSwapSaber = (x) => x.__kind === 'Saber'; exports.isSwapSaber = isSwapSaber; const isSwapSaberAddDecimalsDeposit = (x) => x.__kind === 'SaberAddDecimalsDeposit'; exports.isSwapSaberAddDecimalsDeposit = isSwapSaberAddDecimalsDeposit; const isSwapSaberAddDecimalsWithdraw = (x) => x.__kind === 'SaberAddDecimalsWithdraw'; exports.isSwapSaberAddDecimalsWithdraw = isSwapSaberAddDecimalsWithdraw; const isSwapTokenSwap = (x) => x.__kind === 'TokenSwap'; exports.isSwapTokenSwap = isSwapTokenSwap; const isSwapSencha = (x) => x.__kind === 'Sencha'; exports.isSwapSencha = isSwapSencha; const isSwapStep = (x) => x.__kind === 'Step'; exports.isSwapStep = isSwapStep; const isSwapCropper = (x) => x.__kind === 'Cropper'; exports.isSwapCropper = isSwapCropper; const isSwapRaydium = (x) => x.__kind === 'Raydium'; exports.isSwapRaydium = isSwapRaydium; const isSwapCrema = (x) => x.__kind === 'Crema'; exports.isSwapCrema = isSwapCrema; const isSwapLifinity = (x) => x.__kind === 'Lifinity'; exports.isSwapLifinity = isSwapLifinity; const isSwapMercurial = (x) => x.__kind === 'Mercurial'; exports.isSwapMercurial = isSwapMercurial; const isSwapCykura = (x) => x.__kind === 'Cykura'; exports.isSwapCykura = isSwapCykura; const isSwapSerum = (x) => x.__kind === 'Serum'; exports.isSwapSerum = isSwapSerum; const isSwapMarinadeDeposit = (x) => x.__kind === 'MarinadeDeposit'; exports.isSwapMarinadeDeposit = isSwapMarinadeDeposit; const isSwapMarinadeUnstake = (x) => x.__kind === 'MarinadeUnstake'; exports.isSwapMarinadeUnstake = isSwapMarinadeUnstake; const isSwapAldrin = (x) => x.__kind === 'Aldrin'; exports.isSwapAldrin = isSwapAldrin; const isSwapAldrinV2 = (x) => x.__kind === 'AldrinV2'; exports.isSwapAldrinV2 = isSwapAldrinV2; const isSwapWhirlpool = (x) => x.__kind === 'Whirlpool'; exports.isSwapWhirlpool = isSwapWhirlpool; const isSwapInvariant = (x) => x.__kind === 'Invariant'; exports.isSwapInvariant = isSwapInvariant; const isSwapMeteora = (x) => x.__kind === 'Meteora'; exports.isSwapMeteora = isSwapMeteora; const isSwapGooseFX = (x) => x.__kind === 'GooseFX'; exports.isSwapGooseFX = isSwapGooseFX; const isSwapDeltaFi = (x) => x.__kind === 'DeltaFi'; exports.isSwapDeltaFi = isSwapDeltaFi; const isSwapBalansol = (x) => x.__kind === 'Balansol'; exports.isSwapBalansol = isSwapBalansol; const isSwapMarcoPolo = (x) => x.__kind === 'MarcoPolo'; exports.isSwapMarcoPolo = isSwapMarcoPolo; const isSwapDradex = (x) => x.__kind === 'Dradex'; exports.isSwapDradex = isSwapDradex; const isSwapLifinityV2 = (x) => x.__kind === 'LifinityV2'; exports.isSwapLifinityV2 = isSwapLifinityV2; const isSwapRaydiumClmm = (x) => x.__kind === 'RaydiumClmm'; exports.isSwapRaydiumClmm = isSwapRaydiumClmm; const isSwapOpenbook = (x) => x.__kind === 'Openbook'; exports.isSwapOpenbook = isSwapOpenbook; const isSwapPhoenix = (x) => x.__kind === 'Phoenix'; exports.isSwapPhoenix = isSwapPhoenix; const isSwapSymmetry = (x) => x.__kind === 'Symmetry'; exports.isSwapSymmetry = isSwapSymmetry; const isSwapTokenSwapV2 = (x) => x.__kind === 'TokenSwapV2'; exports.isSwapTokenSwapV2 = isSwapTokenSwapV2; const isSwapHeliumTreasuryManagementRedeemV0 = (x) => x.__kind === 'HeliumTreasuryManagementRedeemV0'; exports.isSwapHeliumTreasuryManagementRedeemV0 = isSwapHeliumTreasuryManagementRedeemV0; const isSwapStakeDexStakeWrappedSol = (x) => x.__kind === 'StakeDexStakeWrappedSol'; exports.isSwapStakeDexStakeWrappedSol = isSwapStakeDexStakeWrappedSol; const isSwapStakeDexSwapViaStake = (x) => x.__kind === 'StakeDexSwapViaStake'; exports.isSwapStakeDexSwapViaStake = isSwapStakeDexSwapViaStake; const isSwapGooseFXV2 = (x) => x.__kind === 'GooseFXV2'; exports.isSwapGooseFXV2 = isSwapGooseFXV2; const isSwapPerps = (x) => x.__kind === 'Perps'; exports.isSwapPerps = isSwapPerps; const isSwapPerpsAddLiquidity = (x) => x.__kind === 'PerpsAddLiquidity'; exports.isSwapPerpsAddLiquidity = isSwapPerpsAddLiquidity; const isSwapPerpsRemoveLiquidity = (x) => x.__kind === 'PerpsRemoveLiquidity'; exports.isSwapPerpsRemoveLiquidity = isSwapPerpsRemoveLiquidity; const isSwapMeteoraDlmm = (x) => x.__kind === 'MeteoraDlmm'; exports.isSwapMeteoraDlmm = isSwapMeteoraDlmm; const isSwapOpenBookV2 = (x) => x.__kind === 'OpenBookV2'; exports.isSwapOpenBookV2 = isSwapOpenBookV2; const isSwapRaydiumClmmV2 = (x) => x.__kind === 'RaydiumClmmV2'; exports.isSwapRaydiumClmmV2 = isSwapRaydiumClmmV2; const isSwapStakeDexPrefundWithdrawStakeAndDepositStake = (x) => x.__kind === 'StakeDexPrefundWithdrawStakeAndDepositStake'; exports.isSwapStakeDexPrefundWithdrawStakeAndDepositStake = isSwapStakeDexPrefundWithdrawStakeAndDepositStake; const isSwapClone = (x) => x.__kind === 'Clone'; exports.isSwapClone = isSwapClone; /** * @category userTypes * @category generated */ exports.swapBeet = beet.dataEnum([ ['Saber', beet.unit], ['SaberAddDecimalsDeposit', beet.unit], ['SaberAddDecimalsWithdraw', beet.unit], ['TokenSwap', beet.unit], ['Sencha', beet.unit], ['Step', beet.unit], ['Cropper', beet.unit], ['Raydium', beet.unit], [ 'Crema', new beet.BeetArgsStruct([['aToB', beet.bool]], 'SwapRecord["Crema"]'), ], ['Lifinity', beet.unit], ['Mercurial', beet.unit], ['Cykura', beet.unit], [ 'Serum', new beet.BeetArgsStruct([['side', Side_1.sideBeet]], 'SwapRecord["Serum"]'), ], ['MarinadeDeposit', beet.unit], ['MarinadeUnstake', beet.unit], [ 'Aldrin', new beet.BeetArgsStruct([['side', Side_1.sideBeet]], 'SwapRecord["Aldrin"]'), ], [ 'AldrinV2', new beet.BeetArgsStruct([['side', Side_1.sideBeet]], 'SwapRecord["AldrinV2"]'), ], [ 'Whirlpool', new beet.BeetArgsStruct([['aToB', beet.bool]], 'SwapRecord["Whirlpool"]'), ], [ 'Invariant', new beet.BeetArgsStruct([['xToY', beet.bool]], 'SwapRecord["Invariant"]'), ], ['Meteora', beet.unit], ['GooseFX', beet.unit], [ 'DeltaFi', new beet.BeetArgsStruct([['stable', beet.bool]], 'SwapRecord["DeltaFi"]'), ], ['Balansol', beet.unit], [ 'MarcoPolo', new beet.BeetArgsStruct([['xToY', beet.bool]], 'SwapRecord["MarcoPolo"]'), ], [ 'Dradex', new beet.BeetArgsStruct([['side', Side_1.sideBeet]], 'SwapRecord["Dradex"]'), ], ['LifinityV2', beet.unit], ['RaydiumClmm', beet.unit], [ 'Openbook', new beet.BeetArgsStruct([['side', Side_1.sideBeet]], 'SwapRecord["Openbook"]'), ], [ 'Phoenix', new beet.BeetArgsStruct([['side', Side_1.sideBeet]], 'SwapRecord["Phoenix"]'), ], [ 'Symmetry', new beet.BeetArgsStruct([ ['fromTokenId', beet.u64], ['toTokenId', beet.u64], ], 'SwapRecord["Symmetry"]'), ], ['TokenSwapV2', beet.unit], ['HeliumTreasuryManagementRedeemV0', beet.unit], ['StakeDexStakeWrappedSol', beet.unit], [ 'StakeDexSwapViaStake', new beet.BeetArgsStruct([['bridgeStakeSeed', beet.u32]], 'SwapRecord["StakeDexSwapViaStake"]'), ], ['GooseFXV2', beet.unit], ['Perps', beet.unit], ['PerpsAddLiquidity', beet.unit], ['PerpsRemoveLiquidity', beet.unit], ['MeteoraDlmm', beet.unit], [ 'OpenBookV2', new beet.BeetArgsStruct([['side', Side_1.sideBeet]], 'SwapRecord["OpenBookV2"]'), ], ['RaydiumClmmV2', beet.unit], [ 'StakeDexPrefundWithdrawStakeAndDepositStake', new beet.BeetArgsStruct([['bridgeStakeSeed', beet.u32]], 'SwapRecord["StakeDexPrefundWithdrawStakeAndDepositStake"]'), ], [ 'Clone', new beet.BeetArgsStruct([ ['poolIndex', beet.u8], ['quantityIsInput', beet.bool], ['quantityIsCollateral', beet.bool], ], 'SwapRecord["Clone"]'), ], ]); //# sourceMappingURL=Swap.js.map