import { PublicKey } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars import * as types from "../types" // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@project-serum/borsh" export interface CreatePoolInfoFields { inputBase: number inputQuote: number outputLpToken: number } export interface CreatePoolInfoJSON { inputBase: number inputQuote: number outputLpToken: number } export class CreatePoolInfo { readonly inputBase: number readonly inputQuote: number readonly outputLpToken: number constructor(fields: CreatePoolInfoFields) { this.inputBase = fields.inputBase this.inputQuote = fields.inputQuote this.outputLpToken = fields.outputLpToken } static layout(property?: string) { return borsh.struct( [ borsh.u8("inputBase"), borsh.u8("inputQuote"), borsh.u8("outputLpToken"), ], property ) } // eslint-disable-next-line @typescript-eslint/no-explicit-any static fromDecoded(obj: any) { return new CreatePoolInfo({ inputBase: obj.inputBase, inputQuote: obj.inputQuote, outputLpToken: obj.outputLpToken, }) } static toEncodable(fields: CreatePoolInfoFields) { return { inputBase: fields.inputBase, inputQuote: fields.inputQuote, outputLpToken: fields.outputLpToken, } } toJSON(): CreatePoolInfoJSON { return { inputBase: this.inputBase, inputQuote: this.inputQuote, outputLpToken: this.outputLpToken, } } static fromJSON(obj: CreatePoolInfoJSON): CreatePoolInfo { return new CreatePoolInfo({ inputBase: obj.inputBase, inputQuote: obj.inputQuote, outputLpToken: obj.outputLpToken, }) } toEncodable() { return CreatePoolInfo.toEncodable(this) } }