goosefx-ssl-sdk-prism
Version:
SDK for interacting with GooseFX Single-sided Liquidity pools
40 lines • 1.74 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PAIR_LAYOUT = exports.ORACLE_LAYOUT = exports.ORACLE_ELEMENT_LAYOUT = void 0;
const borsh_1 = require("@project-serum/borsh");
exports.ORACLE_ELEMENT_LAYOUT = (0, borsh_1.struct)([
(0, borsh_1.publicKey)("address"),
(0, borsh_1.bool)("inverse"),
]);
exports.ORACLE_LAYOUT = (0, borsh_1.struct)([
(0, borsh_1.array)(exports.ORACLE_ELEMENT_LAYOUT, 4, "elements"),
(0, borsh_1.array)((0, borsh_1.u8)(), 4, 'padding'),
(0, borsh_1.u64)("n"),
(0, borsh_1.array)((0, borsh_1.u8)(), 64),
]);
exports.PAIR_LAYOUT = (0, borsh_1.struct)([
(0, borsh_1.array)((0, borsh_1.u8)(), 8, 'sighash'),
(0, borsh_1.publicKey)("controller"),
(0, borsh_1.array)((0, borsh_1.publicKey)("mint"), 2, "mints"),
(0, borsh_1.array)((0, borsh_1.u8)(), 8),
(0, borsh_1.array)(exports.ORACLE_LAYOUT, 5, "oracles"),
(0, borsh_1.u64)("nOracle"),
(0, borsh_1.u8)("A"),
(0, borsh_1.array)((0, borsh_1.u8)(), 2, "feeRates"),
(0, borsh_1.array)((0, borsh_1.u8)(), 5),
(0, borsh_1.u64)("maxDelay"),
(0, borsh_1.u64)("confidence"),
(0, borsh_1.publicKey)("balancer"),
(0, borsh_1.u16)("excessiveConfiscateRate"),
(0, borsh_1.publicKey)("feeCollector"),
(0, borsh_1.array)((0, borsh_1.u16)(), 2, "platformFeeRate"),
(0, borsh_1.array)((0, borsh_1.u8)(), 18),
(0, borsh_1.array)((0, borsh_1.u128)("volumes"), 2, "volumes"),
(0, borsh_1.array)((0, borsh_1.u8)(), 80),
(0, borsh_1.bool)("enableRebalanceSwap"),
(0, borsh_1.array)((0, borsh_1.u8)(), 151, "padding"),
]);
if (exports.PAIR_LAYOUT.span != 1528 + 8) {
throw new Error("PAIR LAYOUT SIZE MISMATCH");
}
//# sourceMappingURL=pair.js.map