"use strict";const y=require("@coral-xyz/anchor"),_=require("@solana/web3.js"),f=require("./sui-CTJDL6Rq.js");function e(r,t){var i;if(Array.isArray(r))return r.map(n=>e(n,t));if(typeof r=="object"&&!((i=t(r))!=null&&i.__type)&&!(r!=null&&r.__type)){const n={};for(const s in r)r.hasOwnProperty(s)&&(n[s]=e(r[s],t));return n}return t(r)}const c=(r,t)=>{const i=r===f.NetworkSymbols.sol?"BN":"bigint";return e(t,n=>n instanceof _.PublicKey?{__type:"SolanaPublicKey",value:n.toBase58()}:n instanceof Uint8Array?{__type:"Uint8Array",value:n.toString()}:n instanceof y.BN?{__type:i,value:n.toString()}:typeof n=="bigint"?{__type:i,value:n.toString()}:n)},o=r=>e(r,t=>(t==null?void 0:t.__type)==="bigint"?BigInt(t.value):(t==null?void 0:t.__type)==="BN"?new y.BN(t.value):(t==null?void 0:t.__type)==="SolanaPublicKey"?new _.PublicKey(t.value):(t==null?void 0:t.__type)==="Uint8Array"?new Uint8Array(t.value):t);exports.deserialize=o;exports.serialize=c;
//# sourceMappingURL=serialize-0ZBTpxya.js.map
