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 U256BorshFields { inner: Array } export interface U256BorshJSON { inner: Array } export class U256Borsh { readonly inner: Array constructor(fields: U256BorshFields) { this.inner = fields.inner } static layout(property?: string) { return borsh.struct([borsh.array(borsh.u8(), 32, "inner")], property) } // eslint-disable-next-line @typescript-eslint/no-explicit-any static fromDecoded(obj: any) { return new U256Borsh({ inner: obj.inner, }) } static toEncodable(fields: U256BorshFields) { return { inner: fields.inner, } } toJSON(): U256BorshJSON { return { inner: this.inner, } } static fromJSON(obj: U256BorshJSON): U256Borsh { return new U256Borsh({ inner: obj.inner, }) } toEncodable() { return U256Borsh.toEncodable(this) } }