test-rrr-sdk
Version:
An SDK for building applications on top of Raydium.
2 lines • 3.28 kB
JavaScript
var A=Object.create;var f=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var v=(r,o)=>{for(var n in o)f(r,n,{get:o[n],enumerable:!0})},h=(r,o,n,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of I(o))!N.call(r,a)&&a!==n&&f(r,a,{get:()=>o[a],enumerable:!(s=C(o,a))||s.enumerable});return r};var E=(r,o,n)=>(n=r!=null?A(D(r)):{},h(o||!r||!r.__esModule?f(n,"default",{value:r,enumerable:!0}):n,r)),R=r=>h(f({},"__esModule",{value:!0}),r);var G={};v(G,{LaunchpadConfig:()=>F,LaunchpadPool:()=>V,LaunchpadVesting:()=>K,LaunchpadVestingSchedule:()=>k,PlatformConfig:()=>q});module.exports=R(G);var U=require("@solana/web3.js"),d=E(require("bn.js"));var e=require("@solana/buffer-layout"),l=e.Layout,S=e.Structure;var B=e.UInt;var w=e.u16;var _=e.seq;var m=e.blob;var b=class extends l{constructor(n,s,a){super(n,a);this.blob=m(n),this.signed=s}decode(n,s=0){let a=new d.default(this.blob.decode(n,s),10,"le");return this.signed?a.fromTwos(this.span*8).clone():a}encode(n,s,a=0){return typeof n=="number"&&(n=new d.default(n)),this.signed&&(n=n.toTwos(this.span*8)),this.blob.encode(n.toArrayLike(Buffer,"le",this.span),s,a)}};function i(r){return new B(1,r)}function t(r){return new b(8,!1,r)}var g=class extends l{constructor(n,s,a,y){super(n.span,y);this.layout=n,this.decoder=s,this.encoder=a}decode(n,s){return this.decoder(this.layout.decode(n,s))}encode(n,s,a){return this.layout.encode(this.encoder(n),s,a)}getSpan(n,s){return this.layout.getSpan(n,s)}};function u(r){return new g(m(32),o=>new U.PublicKey(o),o=>o.toBuffer(),r)}var L=class extends S{decode(o,n){return super.decode(o,n)}};function P(r,o,n){return new L(r,o,n)}function c(r,o,n){let s,a=typeof o=="number"?o:(0,d.isBN)(o)?o.toNumber():new Proxy(o,{get(y,x){if(!s){let p=Reflect.get(y,"count");s=(0,d.isBN)(p)?p.toNumber():p,Reflect.set(y,"count",s)}return Reflect.get(y,x)},set(y,x,p){return x==="count"&&(s=p),Reflect.set(y,x,p)}});return _(r,a,n)}var F=P([t(),t("epoch"),i("curveType"),w("index"),t("migrateFee"),t("tradeFeeRate"),t("maxShareFeeRate"),t("minSupplyA"),t("maxLockRate"),t("minSellRateA"),t("minMigrateRateA"),t("minFundRaisingB"),u("mintB"),u("protocolFeeOwner"),u("migrateFeeOwner"),u("migrateToAmmWallet"),u("migrateToCpmmWallet"),c(t(),16)]),k=P([t("totalLockedAmount"),t("cliffPeriod"),t("unlockPeriod"),t("startTime"),t("totalAllocatedShare")]),V=P([t(),t("epoch"),i("bump"),i("status"),i("mintDecimalsA"),i("mintDecimalsB"),i("migrateType"),t("supply"),t("totalSellA"),t("virtualA"),t("virtualB"),t("realA"),t("realB"),t("totalFundRaisingB"),t("protocolFee"),t("platformFee"),t("migrateFee"),k.replicate("vestingSchedule"),u("configId"),u("platformId"),u("mintA"),u("mintB"),u("vaultA"),u("vaultB"),u("creator"),c(t(),8)]),K=P([t(),t("epoch"),u("poolId"),u("beneficiary"),t("claimedAmount"),t("tokenShareAmount"),c(t(),8)]),q=P([t(),t("epoch"),u("platformClaimFeeWallet"),u("platformLockNftWallet"),t("platformScale"),t("creatorScale"),t("burnScale"),t("feeRate"),c(i(),64,"name"),c(i(),256,"web"),c(i(),256,"img"),c(i(),256)]);0&&(module.exports={LaunchpadConfig,LaunchpadPool,LaunchpadVesting,LaunchpadVestingSchedule,PlatformConfig});
//# sourceMappingURL=layout.js.map