UNPKG

test-rrr-sdk

Version:

An SDK for building applications on top of Raydium.

2 lines 3.06 kB
import{PublicKey as D}from"@solana/web3.js";import B,{isBN as w}from"bn.js";import{bits as R,BitStructure as F,blob as _,Blob as V,cstr as K,f32 as q,f32be as G,f64 as M,f64be as O,greedy as j,Layout as U,ns64 as z,ns64be as W,nu64 as H,nu64be as J,offset as Q,s16 as X,s16be as Y,s24 as Z,s24be as $,s32 as ee,s32be as te,s40 as ne,s40be as re,s48 as oe,s48be as se,s8 as ae,seq as k,struct as ue,Structure as A,u16 as C,u16be as ie,u24 as ce,u24be as ye,u32 as pe,u32be as de,u40 as Pe,u40be as xe,u48 as fe,u48be as le,u8 as me,UInt as I,union as be,Union as ge,unionLayoutDiscriminator as Le,utf8 as he}from"@solana/buffer-layout";var P=U,L=A;var h=I;var T=C;var S=k;var x=_;var f=class extends P{constructor(t,n,a){super(t,a);this.blob=x(t),this.signed=n}decode(t,n=0){let a=new B(this.blob.decode(t,n),10,"le");return this.signed?a.fromTwos(this.span*8).clone():a}encode(t,n,a=0){return typeof t=="number"&&(t=new B(t)),this.signed&&(t=t.toTwos(this.span*8)),this.blob.encode(t.toArrayLike(Buffer,"le",this.span),n,a)}};function u(s){return new h(1,s)}function e(s){return new f(8,!1,s)}var l=class extends P{constructor(t,n,a,c){super(t.span,c);this.layout=t,this.decoder=n,this.encoder=a}decode(t,n){return this.decoder(this.layout.decode(t,n))}encode(t,n,a){return this.layout.encode(this.encoder(t),n,a)}getSpan(t,n){return this.layout.getSpan(t,n)}};function r(s){return new l(x(32),o=>new D(o),o=>o.toBuffer(),s)}var m=class extends L{decode(o,t){return super.decode(o,t)}};function p(s,o,t){return new m(s,o,t)}function i(s,o,t){let n,a=typeof o=="number"?o:w(o)?o.toNumber():new Proxy(o,{get(c,d){if(!n){let y=Reflect.get(c,"count");n=w(y)?y.toNumber():y,Reflect.set(c,"count",n)}return Reflect.get(c,d)},set(c,d,y){return d==="count"&&(n=y),Reflect.set(c,d,y)}});return S(s,a,t)}var Fe=p([e(),e("epoch"),u("curveType"),T("index"),e("migrateFee"),e("tradeFeeRate"),e("maxShareFeeRate"),e("minSupplyA"),e("maxLockRate"),e("minSellRateA"),e("minMigrateRateA"),e("minFundRaisingB"),r("mintB"),r("protocolFeeOwner"),r("migrateFeeOwner"),r("migrateToAmmWallet"),r("migrateToCpmmWallet"),i(e(),16)]),N=p([e("totalLockedAmount"),e("cliffPeriod"),e("unlockPeriod"),e("startTime"),e("totalAllocatedShare")]),Ve=p([e(),e("epoch"),u("bump"),u("status"),u("mintDecimalsA"),u("mintDecimalsB"),u("migrateType"),e("supply"),e("totalSellA"),e("virtualA"),e("virtualB"),e("realA"),e("realB"),e("totalFundRaisingB"),e("protocolFee"),e("platformFee"),e("migrateFee"),N.replicate("vestingSchedule"),r("configId"),r("platformId"),r("mintA"),r("mintB"),r("vaultA"),r("vaultB"),r("creator"),i(e(),8)]),Ke=p([e(),e("epoch"),r("poolId"),r("beneficiary"),e("claimedAmount"),e("tokenShareAmount"),i(e(),8)]),qe=p([e(),e("epoch"),r("platformClaimFeeWallet"),r("platformLockNftWallet"),e("platformScale"),e("creatorScale"),e("burnScale"),e("feeRate"),i(u(),64,"name"),i(u(),256,"web"),i(u(),256,"img"),i(u(),256)]);export{Fe as LaunchpadConfig,Ve as LaunchpadPool,Ke as LaunchpadVesting,N as LaunchpadVestingSchedule,qe as PlatformConfig}; //# sourceMappingURL=layout.mjs.map