@kamino-finance/scope-sdk
Version:
Scope Oracle SDK
1,741 lines • 36.4 kB
JavaScript
"use strict";
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 () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ETH_EMA = exports.SOL_EMA = exports.JITOSOL_SOL = exports.KUXDUSDCORCA = exports.UXP = exports.RATIO = exports.USDR_TWAP = exports.USDR = exports.DUST = exports.HDG = exports.UXD_TWAP = exports.USH_TWAP = exports.USDH_TWAP = exports.UXD = exports.USH = exports.JSOL_SOL = exports.DAI = exports.SLND = exports.CSTSOL_STSOL = exports.CFTT_FTT = exports.CRAY_RAY = exports.CSRM_SRM = exports.CSLND_SLND = exports.CORCA_ORCA = exports.HBB = exports.MNDE = exports.ORCA = exports.USDT = exports.CUSDC_USDC = exports.USDC = exports.LDO = exports.wstETH = exports.CMSOL_SOL = exports.CBTC_BTC = exports.CETH_ETH = exports.CSOL_SOL = exports.StSOL = exports.USDH = exports.SaberMSOL_SOL = exports.DaoSOL_SOL = exports.AVAX = exports.BNB = exports.scnSOL_SOL = exports.MSOL = exports.FTT = exports.RAY = exports.SRM = exports.BTC = exports.ETH = exports.SOL = void 0;
exports.LaineSOL = exports.BSOL = exports.SAMO_TWAP = exports.SAMO = exports.BONK_TWAP = exports.BONK = exports.DUST_TWAP = exports.wstETH_TWAP = exports.DAI_EMA = exports.SLND_EMA = exports.USDT_EMA = exports.USDC_EMA = exports.STSOL_EMA = exports.AVAX_EMA = exports.BNB_EMA = exports.MSOL_EMA = exports.FTT_EMA = exports.RAY_EMA = exports.SRM_EMA = exports.BTC_EMA = void 0;
exports.fromDecoded = fromDecoded;
exports.fromJSON = fromJSON;
exports.layout = layout;
const borsh = __importStar(require("@coral-xyz/borsh"));
class SOL {
static discriminator = 0;
static kind = "SOL";
discriminator = 0;
kind = "SOL";
toJSON() {
return {
kind: "SOL",
};
}
toEncodable() {
return {
SOL: {},
};
}
}
exports.SOL = SOL;
class ETH {
static discriminator = 1;
static kind = "ETH";
discriminator = 1;
kind = "ETH";
toJSON() {
return {
kind: "ETH",
};
}
toEncodable() {
return {
ETH: {},
};
}
}
exports.ETH = ETH;
class BTC {
static discriminator = 2;
static kind = "BTC";
discriminator = 2;
kind = "BTC";
toJSON() {
return {
kind: "BTC",
};
}
toEncodable() {
return {
BTC: {},
};
}
}
exports.BTC = BTC;
class SRM {
static discriminator = 3;
static kind = "SRM";
discriminator = 3;
kind = "SRM";
toJSON() {
return {
kind: "SRM",
};
}
toEncodable() {
return {
SRM: {},
};
}
}
exports.SRM = SRM;
class RAY {
static discriminator = 4;
static kind = "RAY";
discriminator = 4;
kind = "RAY";
toJSON() {
return {
kind: "RAY",
};
}
toEncodable() {
return {
RAY: {},
};
}
}
exports.RAY = RAY;
class FTT {
static discriminator = 5;
static kind = "FTT";
discriminator = 5;
kind = "FTT";
toJSON() {
return {
kind: "FTT",
};
}
toEncodable() {
return {
FTT: {},
};
}
}
exports.FTT = FTT;
class MSOL {
static discriminator = 6;
static kind = "MSOL";
discriminator = 6;
kind = "MSOL";
toJSON() {
return {
kind: "MSOL",
};
}
toEncodable() {
return {
MSOL: {},
};
}
}
exports.MSOL = MSOL;
class scnSOL_SOL {
static discriminator = 7;
static kind = "scnSOL_SOL";
discriminator = 7;
kind = "scnSOL_SOL";
toJSON() {
return {
kind: "scnSOL_SOL",
};
}
toEncodable() {
return {
scnSOL_SOL: {},
};
}
}
exports.scnSOL_SOL = scnSOL_SOL;
class BNB {
static discriminator = 8;
static kind = "BNB";
discriminator = 8;
kind = "BNB";
toJSON() {
return {
kind: "BNB",
};
}
toEncodable() {
return {
BNB: {},
};
}
}
exports.BNB = BNB;
class AVAX {
static discriminator = 9;
static kind = "AVAX";
discriminator = 9;
kind = "AVAX";
toJSON() {
return {
kind: "AVAX",
};
}
toEncodable() {
return {
AVAX: {},
};
}
}
exports.AVAX = AVAX;
class DaoSOL_SOL {
static discriminator = 10;
static kind = "DaoSOL_SOL";
discriminator = 10;
kind = "DaoSOL_SOL";
toJSON() {
return {
kind: "DaoSOL_SOL",
};
}
toEncodable() {
return {
DaoSOL_SOL: {},
};
}
}
exports.DaoSOL_SOL = DaoSOL_SOL;
class SaberMSOL_SOL {
static discriminator = 11;
static kind = "SaberMSOL_SOL";
discriminator = 11;
kind = "SaberMSOL_SOL";
toJSON() {
return {
kind: "SaberMSOL_SOL",
};
}
toEncodable() {
return {
SaberMSOL_SOL: {},
};
}
}
exports.SaberMSOL_SOL = SaberMSOL_SOL;
class USDH {
static discriminator = 12;
static kind = "USDH";
discriminator = 12;
kind = "USDH";
toJSON() {
return {
kind: "USDH",
};
}
toEncodable() {
return {
USDH: {},
};
}
}
exports.USDH = USDH;
class StSOL {
static discriminator = 13;
static kind = "StSOL";
discriminator = 13;
kind = "StSOL";
toJSON() {
return {
kind: "StSOL",
};
}
toEncodable() {
return {
StSOL: {},
};
}
}
exports.StSOL = StSOL;
class CSOL_SOL {
static discriminator = 14;
static kind = "CSOL_SOL";
discriminator = 14;
kind = "CSOL_SOL";
toJSON() {
return {
kind: "CSOL_SOL",
};
}
toEncodable() {
return {
CSOL_SOL: {},
};
}
}
exports.CSOL_SOL = CSOL_SOL;
class CETH_ETH {
static discriminator = 15;
static kind = "CETH_ETH";
discriminator = 15;
kind = "CETH_ETH";
toJSON() {
return {
kind: "CETH_ETH",
};
}
toEncodable() {
return {
CETH_ETH: {},
};
}
}
exports.CETH_ETH = CETH_ETH;
class CBTC_BTC {
static discriminator = 16;
static kind = "CBTC_BTC";
discriminator = 16;
kind = "CBTC_BTC";
toJSON() {
return {
kind: "CBTC_BTC",
};
}
toEncodable() {
return {
CBTC_BTC: {},
};
}
}
exports.CBTC_BTC = CBTC_BTC;
class CMSOL_SOL {
static discriminator = 17;
static kind = "CMSOL_SOL";
discriminator = 17;
kind = "CMSOL_SOL";
toJSON() {
return {
kind: "CMSOL_SOL",
};
}
toEncodable() {
return {
CMSOL_SOL: {},
};
}
}
exports.CMSOL_SOL = CMSOL_SOL;
class wstETH {
static discriminator = 18;
static kind = "wstETH";
discriminator = 18;
kind = "wstETH";
toJSON() {
return {
kind: "wstETH",
};
}
toEncodable() {
return {
wstETH: {},
};
}
}
exports.wstETH = wstETH;
class LDO {
static discriminator = 19;
static kind = "LDO";
discriminator = 19;
kind = "LDO";
toJSON() {
return {
kind: "LDO",
};
}
toEncodable() {
return {
LDO: {},
};
}
}
exports.LDO = LDO;
class USDC {
static discriminator = 20;
static kind = "USDC";
discriminator = 20;
kind = "USDC";
toJSON() {
return {
kind: "USDC",
};
}
toEncodable() {
return {
USDC: {},
};
}
}
exports.USDC = USDC;
class CUSDC_USDC {
static discriminator = 21;
static kind = "CUSDC_USDC";
discriminator = 21;
kind = "CUSDC_USDC";
toJSON() {
return {
kind: "CUSDC_USDC",
};
}
toEncodable() {
return {
CUSDC_USDC: {},
};
}
}
exports.CUSDC_USDC = CUSDC_USDC;
class USDT {
static discriminator = 22;
static kind = "USDT";
discriminator = 22;
kind = "USDT";
toJSON() {
return {
kind: "USDT",
};
}
toEncodable() {
return {
USDT: {},
};
}
}
exports.USDT = USDT;
class ORCA {
static discriminator = 23;
static kind = "ORCA";
discriminator = 23;
kind = "ORCA";
toJSON() {
return {
kind: "ORCA",
};
}
toEncodable() {
return {
ORCA: {},
};
}
}
exports.ORCA = ORCA;
class MNDE {
static discriminator = 24;
static kind = "MNDE";
discriminator = 24;
kind = "MNDE";
toJSON() {
return {
kind: "MNDE",
};
}
toEncodable() {
return {
MNDE: {},
};
}
}
exports.MNDE = MNDE;
class HBB {
static discriminator = 25;
static kind = "HBB";
discriminator = 25;
kind = "HBB";
toJSON() {
return {
kind: "HBB",
};
}
toEncodable() {
return {
HBB: {},
};
}
}
exports.HBB = HBB;
class CORCA_ORCA {
static discriminator = 26;
static kind = "CORCA_ORCA";
discriminator = 26;
kind = "CORCA_ORCA";
toJSON() {
return {
kind: "CORCA_ORCA",
};
}
toEncodable() {
return {
CORCA_ORCA: {},
};
}
}
exports.CORCA_ORCA = CORCA_ORCA;
class CSLND_SLND {
static discriminator = 27;
static kind = "CSLND_SLND";
discriminator = 27;
kind = "CSLND_SLND";
toJSON() {
return {
kind: "CSLND_SLND",
};
}
toEncodable() {
return {
CSLND_SLND: {},
};
}
}
exports.CSLND_SLND = CSLND_SLND;
class CSRM_SRM {
static discriminator = 28;
static kind = "CSRM_SRM";
discriminator = 28;
kind = "CSRM_SRM";
toJSON() {
return {
kind: "CSRM_SRM",
};
}
toEncodable() {
return {
CSRM_SRM: {},
};
}
}
exports.CSRM_SRM = CSRM_SRM;
class CRAY_RAY {
static discriminator = 29;
static kind = "CRAY_RAY";
discriminator = 29;
kind = "CRAY_RAY";
toJSON() {
return {
kind: "CRAY_RAY",
};
}
toEncodable() {
return {
CRAY_RAY: {},
};
}
}
exports.CRAY_RAY = CRAY_RAY;
class CFTT_FTT {
static discriminator = 30;
static kind = "CFTT_FTT";
discriminator = 30;
kind = "CFTT_FTT";
toJSON() {
return {
kind: "CFTT_FTT",
};
}
toEncodable() {
return {
CFTT_FTT: {},
};
}
}
exports.CFTT_FTT = CFTT_FTT;
class CSTSOL_STSOL {
static discriminator = 31;
static kind = "CSTSOL_STSOL";
discriminator = 31;
kind = "CSTSOL_STSOL";
toJSON() {
return {
kind: "CSTSOL_STSOL",
};
}
toEncodable() {
return {
CSTSOL_STSOL: {},
};
}
}
exports.CSTSOL_STSOL = CSTSOL_STSOL;
class SLND {
static discriminator = 32;
static kind = "SLND";
discriminator = 32;
kind = "SLND";
toJSON() {
return {
kind: "SLND",
};
}
toEncodable() {
return {
SLND: {},
};
}
}
exports.SLND = SLND;
class DAI {
static discriminator = 33;
static kind = "DAI";
discriminator = 33;
kind = "DAI";
toJSON() {
return {
kind: "DAI",
};
}
toEncodable() {
return {
DAI: {},
};
}
}
exports.DAI = DAI;
class JSOL_SOL {
static discriminator = 34;
static kind = "JSOL_SOL";
discriminator = 34;
kind = "JSOL_SOL";
toJSON() {
return {
kind: "JSOL_SOL",
};
}
toEncodable() {
return {
JSOL_SOL: {},
};
}
}
exports.JSOL_SOL = JSOL_SOL;
class USH {
static discriminator = 35;
static kind = "USH";
discriminator = 35;
kind = "USH";
toJSON() {
return {
kind: "USH",
};
}
toEncodable() {
return {
USH: {},
};
}
}
exports.USH = USH;
class UXD {
static discriminator = 36;
static kind = "UXD";
discriminator = 36;
kind = "UXD";
toJSON() {
return {
kind: "UXD",
};
}
toEncodable() {
return {
UXD: {},
};
}
}
exports.UXD = UXD;
class USDH_TWAP {
static discriminator = 37;
static kind = "USDH_TWAP";
discriminator = 37;
kind = "USDH_TWAP";
toJSON() {
return {
kind: "USDH_TWAP",
};
}
toEncodable() {
return {
USDH_TWAP: {},
};
}
}
exports.USDH_TWAP = USDH_TWAP;
class USH_TWAP {
static discriminator = 38;
static kind = "USH_TWAP";
discriminator = 38;
kind = "USH_TWAP";
toJSON() {
return {
kind: "USH_TWAP",
};
}
toEncodable() {
return {
USH_TWAP: {},
};
}
}
exports.USH_TWAP = USH_TWAP;
class UXD_TWAP {
static discriminator = 39;
static kind = "UXD_TWAP";
discriminator = 39;
kind = "UXD_TWAP";
toJSON() {
return {
kind: "UXD_TWAP",
};
}
toEncodable() {
return {
UXD_TWAP: {},
};
}
}
exports.UXD_TWAP = UXD_TWAP;
class HDG {
static discriminator = 40;
static kind = "HDG";
discriminator = 40;
kind = "HDG";
toJSON() {
return {
kind: "HDG",
};
}
toEncodable() {
return {
HDG: {},
};
}
}
exports.HDG = HDG;
class DUST {
static discriminator = 41;
static kind = "DUST";
discriminator = 41;
kind = "DUST";
toJSON() {
return {
kind: "DUST",
};
}
toEncodable() {
return {
DUST: {},
};
}
}
exports.DUST = DUST;
class USDR {
static discriminator = 42;
static kind = "USDR";
discriminator = 42;
kind = "USDR";
toJSON() {
return {
kind: "USDR",
};
}
toEncodable() {
return {
USDR: {},
};
}
}
exports.USDR = USDR;
class USDR_TWAP {
static discriminator = 43;
static kind = "USDR_TWAP";
discriminator = 43;
kind = "USDR_TWAP";
toJSON() {
return {
kind: "USDR_TWAP",
};
}
toEncodable() {
return {
USDR_TWAP: {},
};
}
}
exports.USDR_TWAP = USDR_TWAP;
class RATIO {
static discriminator = 44;
static kind = "RATIO";
discriminator = 44;
kind = "RATIO";
toJSON() {
return {
kind: "RATIO",
};
}
toEncodable() {
return {
RATIO: {},
};
}
}
exports.RATIO = RATIO;
class UXP {
static discriminator = 45;
static kind = "UXP";
discriminator = 45;
kind = "UXP";
toJSON() {
return {
kind: "UXP",
};
}
toEncodable() {
return {
UXP: {},
};
}
}
exports.UXP = UXP;
class KUXDUSDCORCA {
static discriminator = 46;
static kind = "KUXDUSDCORCA";
discriminator = 46;
kind = "KUXDUSDCORCA";
toJSON() {
return {
kind: "KUXDUSDCORCA",
};
}
toEncodable() {
return {
KUXDUSDCORCA: {},
};
}
}
exports.KUXDUSDCORCA = KUXDUSDCORCA;
class JITOSOL_SOL {
static discriminator = 47;
static kind = "JITOSOL_SOL";
discriminator = 47;
kind = "JITOSOL_SOL";
toJSON() {
return {
kind: "JITOSOL_SOL",
};
}
toEncodable() {
return {
JITOSOL_SOL: {},
};
}
}
exports.JITOSOL_SOL = JITOSOL_SOL;
class SOL_EMA {
static discriminator = 48;
static kind = "SOL_EMA";
discriminator = 48;
kind = "SOL_EMA";
toJSON() {
return {
kind: "SOL_EMA",
};
}
toEncodable() {
return {
SOL_EMA: {},
};
}
}
exports.SOL_EMA = SOL_EMA;
class ETH_EMA {
static discriminator = 49;
static kind = "ETH_EMA";
discriminator = 49;
kind = "ETH_EMA";
toJSON() {
return {
kind: "ETH_EMA",
};
}
toEncodable() {
return {
ETH_EMA: {},
};
}
}
exports.ETH_EMA = ETH_EMA;
class BTC_EMA {
static discriminator = 50;
static kind = "BTC_EMA";
discriminator = 50;
kind = "BTC_EMA";
toJSON() {
return {
kind: "BTC_EMA",
};
}
toEncodable() {
return {
BTC_EMA: {},
};
}
}
exports.BTC_EMA = BTC_EMA;
class SRM_EMA {
static discriminator = 51;
static kind = "SRM_EMA";
discriminator = 51;
kind = "SRM_EMA";
toJSON() {
return {
kind: "SRM_EMA",
};
}
toEncodable() {
return {
SRM_EMA: {},
};
}
}
exports.SRM_EMA = SRM_EMA;
class RAY_EMA {
static discriminator = 52;
static kind = "RAY_EMA";
discriminator = 52;
kind = "RAY_EMA";
toJSON() {
return {
kind: "RAY_EMA",
};
}
toEncodable() {
return {
RAY_EMA: {},
};
}
}
exports.RAY_EMA = RAY_EMA;
class FTT_EMA {
static discriminator = 53;
static kind = "FTT_EMA";
discriminator = 53;
kind = "FTT_EMA";
toJSON() {
return {
kind: "FTT_EMA",
};
}
toEncodable() {
return {
FTT_EMA: {},
};
}
}
exports.FTT_EMA = FTT_EMA;
class MSOL_EMA {
static discriminator = 54;
static kind = "MSOL_EMA";
discriminator = 54;
kind = "MSOL_EMA";
toJSON() {
return {
kind: "MSOL_EMA",
};
}
toEncodable() {
return {
MSOL_EMA: {},
};
}
}
exports.MSOL_EMA = MSOL_EMA;
class BNB_EMA {
static discriminator = 55;
static kind = "BNB_EMA";
discriminator = 55;
kind = "BNB_EMA";
toJSON() {
return {
kind: "BNB_EMA",
};
}
toEncodable() {
return {
BNB_EMA: {},
};
}
}
exports.BNB_EMA = BNB_EMA;
class AVAX_EMA {
static discriminator = 56;
static kind = "AVAX_EMA";
discriminator = 56;
kind = "AVAX_EMA";
toJSON() {
return {
kind: "AVAX_EMA",
};
}
toEncodable() {
return {
AVAX_EMA: {},
};
}
}
exports.AVAX_EMA = AVAX_EMA;
class STSOL_EMA {
static discriminator = 57;
static kind = "STSOL_EMA";
discriminator = 57;
kind = "STSOL_EMA";
toJSON() {
return {
kind: "STSOL_EMA",
};
}
toEncodable() {
return {
STSOL_EMA: {},
};
}
}
exports.STSOL_EMA = STSOL_EMA;
class USDC_EMA {
static discriminator = 58;
static kind = "USDC_EMA";
discriminator = 58;
kind = "USDC_EMA";
toJSON() {
return {
kind: "USDC_EMA",
};
}
toEncodable() {
return {
USDC_EMA: {},
};
}
}
exports.USDC_EMA = USDC_EMA;
class USDT_EMA {
static discriminator = 59;
static kind = "USDT_EMA";
discriminator = 59;
kind = "USDT_EMA";
toJSON() {
return {
kind: "USDT_EMA",
};
}
toEncodable() {
return {
USDT_EMA: {},
};
}
}
exports.USDT_EMA = USDT_EMA;
class SLND_EMA {
static discriminator = 60;
static kind = "SLND_EMA";
discriminator = 60;
kind = "SLND_EMA";
toJSON() {
return {
kind: "SLND_EMA",
};
}
toEncodable() {
return {
SLND_EMA: {},
};
}
}
exports.SLND_EMA = SLND_EMA;
class DAI_EMA {
static discriminator = 61;
static kind = "DAI_EMA";
discriminator = 61;
kind = "DAI_EMA";
toJSON() {
return {
kind: "DAI_EMA",
};
}
toEncodable() {
return {
DAI_EMA: {},
};
}
}
exports.DAI_EMA = DAI_EMA;
class wstETH_TWAP {
static discriminator = 62;
static kind = "wstETH_TWAP";
discriminator = 62;
kind = "wstETH_TWAP";
toJSON() {
return {
kind: "wstETH_TWAP",
};
}
toEncodable() {
return {
wstETH_TWAP: {},
};
}
}
exports.wstETH_TWAP = wstETH_TWAP;
class DUST_TWAP {
static discriminator = 63;
static kind = "DUST_TWAP";
discriminator = 63;
kind = "DUST_TWAP";
toJSON() {
return {
kind: "DUST_TWAP",
};
}
toEncodable() {
return {
DUST_TWAP: {},
};
}
}
exports.DUST_TWAP = DUST_TWAP;
class BONK {
static discriminator = 64;
static kind = "BONK";
discriminator = 64;
kind = "BONK";
toJSON() {
return {
kind: "BONK",
};
}
toEncodable() {
return {
BONK: {},
};
}
}
exports.BONK = BONK;
class BONK_TWAP {
static discriminator = 65;
static kind = "BONK_TWAP";
discriminator = 65;
kind = "BONK_TWAP";
toJSON() {
return {
kind: "BONK_TWAP",
};
}
toEncodable() {
return {
BONK_TWAP: {},
};
}
}
exports.BONK_TWAP = BONK_TWAP;
class SAMO {
static discriminator = 66;
static kind = "SAMO";
discriminator = 66;
kind = "SAMO";
toJSON() {
return {
kind: "SAMO",
};
}
toEncodable() {
return {
SAMO: {},
};
}
}
exports.SAMO = SAMO;
class SAMO_TWAP {
static discriminator = 67;
static kind = "SAMO_TWAP";
discriminator = 67;
kind = "SAMO_TWAP";
toJSON() {
return {
kind: "SAMO_TWAP",
};
}
toEncodable() {
return {
SAMO_TWAP: {},
};
}
}
exports.SAMO_TWAP = SAMO_TWAP;
class BSOL {
static discriminator = 68;
static kind = "BSOL";
discriminator = 68;
kind = "BSOL";
toJSON() {
return {
kind: "BSOL",
};
}
toEncodable() {
return {
BSOL: {},
};
}
}
exports.BSOL = BSOL;
class LaineSOL {
static discriminator = 69;
static kind = "LaineSOL";
discriminator = 69;
kind = "LaineSOL";
toJSON() {
return {
kind: "LaineSOL",
};
}
toEncodable() {
return {
LaineSOL: {},
};
}
}
exports.LaineSOL = LaineSOL;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function fromDecoded(obj) {
if (typeof obj !== "object") {
throw new Error("Invalid enum object");
}
if ("SOL" in obj) {
return new SOL();
}
if ("ETH" in obj) {
return new ETH();
}
if ("BTC" in obj) {
return new BTC();
}
if ("SRM" in obj) {
return new SRM();
}
if ("RAY" in obj) {
return new RAY();
}
if ("FTT" in obj) {
return new FTT();
}
if ("MSOL" in obj) {
return new MSOL();
}
if ("scnSOL_SOL" in obj) {
return new scnSOL_SOL();
}
if ("BNB" in obj) {
return new BNB();
}
if ("AVAX" in obj) {
return new AVAX();
}
if ("DaoSOL_SOL" in obj) {
return new DaoSOL_SOL();
}
if ("SaberMSOL_SOL" in obj) {
return new SaberMSOL_SOL();
}
if ("USDH" in obj) {
return new USDH();
}
if ("StSOL" in obj) {
return new StSOL();
}
if ("CSOL_SOL" in obj) {
return new CSOL_SOL();
}
if ("CETH_ETH" in obj) {
return new CETH_ETH();
}
if ("CBTC_BTC" in obj) {
return new CBTC_BTC();
}
if ("CMSOL_SOL" in obj) {
return new CMSOL_SOL();
}
if ("wstETH" in obj) {
return new wstETH();
}
if ("LDO" in obj) {
return new LDO();
}
if ("USDC" in obj) {
return new USDC();
}
if ("CUSDC_USDC" in obj) {
return new CUSDC_USDC();
}
if ("USDT" in obj) {
return new USDT();
}
if ("ORCA" in obj) {
return new ORCA();
}
if ("MNDE" in obj) {
return new MNDE();
}
if ("HBB" in obj) {
return new HBB();
}
if ("CORCA_ORCA" in obj) {
return new CORCA_ORCA();
}
if ("CSLND_SLND" in obj) {
return new CSLND_SLND();
}
if ("CSRM_SRM" in obj) {
return new CSRM_SRM();
}
if ("CRAY_RAY" in obj) {
return new CRAY_RAY();
}
if ("CFTT_FTT" in obj) {
return new CFTT_FTT();
}
if ("CSTSOL_STSOL" in obj) {
return new CSTSOL_STSOL();
}
if ("SLND" in obj) {
return new SLND();
}
if ("DAI" in obj) {
return new DAI();
}
if ("JSOL_SOL" in obj) {
return new JSOL_SOL();
}
if ("USH" in obj) {
return new USH();
}
if ("UXD" in obj) {
return new UXD();
}
if ("USDH_TWAP" in obj) {
return new USDH_TWAP();
}
if ("USH_TWAP" in obj) {
return new USH_TWAP();
}
if ("UXD_TWAP" in obj) {
return new UXD_TWAP();
}
if ("HDG" in obj) {
return new HDG();
}
if ("DUST" in obj) {
return new DUST();
}
if ("USDR" in obj) {
return new USDR();
}
if ("USDR_TWAP" in obj) {
return new USDR_TWAP();
}
if ("RATIO" in obj) {
return new RATIO();
}
if ("UXP" in obj) {
return new UXP();
}
if ("KUXDUSDCORCA" in obj) {
return new KUXDUSDCORCA();
}
if ("JITOSOL_SOL" in obj) {
return new JITOSOL_SOL();
}
if ("SOL_EMA" in obj) {
return new SOL_EMA();
}
if ("ETH_EMA" in obj) {
return new ETH_EMA();
}
if ("BTC_EMA" in obj) {
return new BTC_EMA();
}
if ("SRM_EMA" in obj) {
return new SRM_EMA();
}
if ("RAY_EMA" in obj) {
return new RAY_EMA();
}
if ("FTT_EMA" in obj) {
return new FTT_EMA();
}
if ("MSOL_EMA" in obj) {
return new MSOL_EMA();
}
if ("BNB_EMA" in obj) {
return new BNB_EMA();
}
if ("AVAX_EMA" in obj) {
return new AVAX_EMA();
}
if ("STSOL_EMA" in obj) {
return new STSOL_EMA();
}
if ("USDC_EMA" in obj) {
return new USDC_EMA();
}
if ("USDT_EMA" in obj) {
return new USDT_EMA();
}
if ("SLND_EMA" in obj) {
return new SLND_EMA();
}
if ("DAI_EMA" in obj) {
return new DAI_EMA();
}
if ("wstETH_TWAP" in obj) {
return new wstETH_TWAP();
}
if ("DUST_TWAP" in obj) {
return new DUST_TWAP();
}
if ("BONK" in obj) {
return new BONK();
}
if ("BONK_TWAP" in obj) {
return new BONK_TWAP();
}
if ("SAMO" in obj) {
return new SAMO();
}
if ("SAMO_TWAP" in obj) {
return new SAMO_TWAP();
}
if ("BSOL" in obj) {
return new BSOL();
}
if ("LaineSOL" in obj) {
return new LaineSOL();
}
throw new Error("Invalid enum object");
}
function fromJSON(obj) {
switch (obj.kind) {
case "SOL": {
return new SOL();
}
case "ETH": {
return new ETH();
}
case "BTC": {
return new BTC();
}
case "SRM": {
return new SRM();
}
case "RAY": {
return new RAY();
}
case "FTT": {
return new FTT();
}
case "MSOL": {
return new MSOL();
}
case "scnSOL_SOL": {
return new scnSOL_SOL();
}
case "BNB": {
return new BNB();
}
case "AVAX": {
return new AVAX();
}
case "DaoSOL_SOL": {
return new DaoSOL_SOL();
}
case "SaberMSOL_SOL": {
return new SaberMSOL_SOL();
}
case "USDH": {
return new USDH();
}
case "StSOL": {
return new StSOL();
}
case "CSOL_SOL": {
return new CSOL_SOL();
}
case "CETH_ETH": {
return new CETH_ETH();
}
case "CBTC_BTC": {
return new CBTC_BTC();
}
case "CMSOL_SOL": {
return new CMSOL_SOL();
}
case "wstETH": {
return new wstETH();
}
case "LDO": {
return new LDO();
}
case "USDC": {
return new USDC();
}
case "CUSDC_USDC": {
return new CUSDC_USDC();
}
case "USDT": {
return new USDT();
}
case "ORCA": {
return new ORCA();
}
case "MNDE": {
return new MNDE();
}
case "HBB": {
return new HBB();
}
case "CORCA_ORCA": {
return new CORCA_ORCA();
}
case "CSLND_SLND": {
return new CSLND_SLND();
}
case "CSRM_SRM": {
return new CSRM_SRM();
}
case "CRAY_RAY": {
return new CRAY_RAY();
}
case "CFTT_FTT": {
return new CFTT_FTT();
}
case "CSTSOL_STSOL": {
return new CSTSOL_STSOL();
}
case "SLND": {
return new SLND();
}
case "DAI": {
return new DAI();
}
case "JSOL_SOL": {
return new JSOL_SOL();
}
case "USH": {
return new USH();
}
case "UXD": {
return new UXD();
}
case "USDH_TWAP": {
return new USDH_TWAP();
}
case "USH_TWAP": {
return new USH_TWAP();
}
case "UXD_TWAP": {
return new UXD_TWAP();
}
case "HDG": {
return new HDG();
}
case "DUST": {
return new DUST();
}
case "USDR": {
return new USDR();
}
case "USDR_TWAP": {
return new USDR_TWAP();
}
case "RATIO": {
return new RATIO();
}
case "UXP": {
return new UXP();
}
case "KUXDUSDCORCA": {
return new KUXDUSDCORCA();
}
case "JITOSOL_SOL": {
return new JITOSOL_SOL();
}
case "SOL_EMA": {
return new SOL_EMA();
}
case "ETH_EMA": {
return new ETH_EMA();
}
case "BTC_EMA": {
return new BTC_EMA();
}
case "SRM_EMA": {
return new SRM_EMA();
}
case "RAY_EMA": {
return new RAY_EMA();
}
case "FTT_EMA": {
return new FTT_EMA();
}
case "MSOL_EMA": {
return new MSOL_EMA();
}
case "BNB_EMA": {
return new BNB_EMA();
}
case "AVAX_EMA": {
return new AVAX_EMA();
}
case "STSOL_EMA": {
return new STSOL_EMA();
}
case "USDC_EMA": {
return new USDC_EMA();
}
case "USDT_EMA": {
return new USDT_EMA();
}
case "SLND_EMA": {
return new SLND_EMA();
}
case "DAI_EMA": {
return new DAI_EMA();
}
case "wstETH_TWAP": {
return new wstETH_TWAP();
}
case "DUST_TWAP": {
return new DUST_TWAP();
}
case "BONK": {
return new BONK();
}
case "BONK_TWAP": {
return new BONK_TWAP();
}
case "SAMO": {
return new SAMO();
}
case "SAMO_TWAP": {
return new SAMO_TWAP();
}
case "BSOL": {
return new BSOL();
}
case "LaineSOL": {
return new LaineSOL();
}
}
}
function layout(property) {
const ret = borsh.rustEnum([
borsh.struct([], "SOL"),
borsh.struct([], "ETH"),
borsh.struct([], "BTC"),
borsh.struct([], "SRM"),
borsh.struct([], "RAY"),
borsh.struct([], "FTT"),
borsh.struct([], "MSOL"),
borsh.struct([], "scnSOL_SOL"),
borsh.struct([], "BNB"),
borsh.struct([], "AVAX"),
borsh.struct([], "DaoSOL_SOL"),
borsh.struct([], "SaberMSOL_SOL"),
borsh.struct([], "USDH"),
borsh.struct([], "StSOL"),
borsh.struct([], "CSOL_SOL"),
borsh.struct([], "CETH_ETH"),
borsh.struct([], "CBTC_BTC"),
borsh.struct([], "CMSOL_SOL"),
borsh.struct([], "wstETH"),
borsh.struct([], "LDO"),
borsh.struct([], "USDC"),
borsh.struct([], "CUSDC_USDC"),
borsh.struct([], "USDT"),
borsh.struct([], "ORCA"),
borsh.struct([], "MNDE"),
borsh.struct([], "HBB"),
borsh.struct([], "CORCA_ORCA"),
borsh.struct([], "CSLND_SLND"),
borsh.struct([], "CSRM_SRM"),
borsh.struct([], "CRAY_RAY"),
borsh.struct([], "CFTT_FTT"),
borsh.struct([], "CSTSOL_STSOL"),
borsh.struct([], "SLND"),
borsh.struct([], "DAI"),
borsh.struct([], "JSOL_SOL"),
borsh.struct([], "USH"),
borsh.struct([], "UXD"),
borsh.struct([], "USDH_TWAP"),
borsh.struct([], "USH_TWAP"),
borsh.struct([], "UXD_TWAP"),
borsh.struct([], "HDG"),
borsh.struct([], "DUST"),
borsh.struct([], "USDR"),
borsh.struct([], "USDR_TWAP"),
borsh.struct([], "RATIO"),
borsh.struct([], "UXP"),
borsh.struct([], "KUXDUSDCORCA"),
borsh.struct([], "JITOSOL_SOL"),
borsh.struct([], "SOL_EMA"),
borsh.struct([], "ETH_EMA"),
borsh.struct([], "BTC_EMA"),
borsh.struct([], "SRM_EMA"),
borsh.struct([], "RAY_EMA"),
borsh.struct([], "FTT_EMA"),
borsh.struct([], "MSOL_EMA"),
borsh.struct([], "BNB_EMA"),
borsh.struct([], "AVAX_EMA"),
borsh.struct([], "STSOL_EMA"),
borsh.struct([], "USDC_EMA"),
borsh.struct([], "USDT_EMA"),
borsh.struct([], "SLND_EMA"),
borsh.struct([], "DAI_EMA"),
borsh.struct([], "wstETH_TWAP"),
borsh.struct([], "DUST_TWAP"),
borsh.struct([], "BONK"),
borsh.struct([], "BONK_TWAP"),
borsh.struct([], "SAMO"),
borsh.struct([], "SAMO_TWAP"),
borsh.struct([], "BSOL"),
borsh.struct([], "LaineSOL"),
]);
if (property !== undefined) {
return ret.replicate(property);
}
return ret;
}
//# sourceMappingURL=ScopePriceIdTest.js.map