@jup-ag/lend-referral-sdk.
Program addresses
Accounts
findProtocolConfigPda and findWrapperConfigPda resolve to [address, bump]. The other helpers resolve to an address.
Wrapper fields
WrapperConfig, read through resolveWrapper as ctx.wrapper.data:
The partner’s balance is not stored. It is the vault balance less the users’ and Jupiter’s balances. The stored balances exclude the fee since the last accrue: project them with
simulateAccrue before you compute a value.
claimAuthority and protocolFeeShareOverride are Kit Options. Read them with unwrapOption or isSome from @solana/kit.
ProtocolConfig, read as ctx.protocol.data or with fetchProtocol:
Limits
Instructions
This section lists the instructions that users, partners and anyone can call. Jupiter-only instructions are not listed. Instruction and argument names are the SDK’s:get<Name>Instruction builds each instruction, for example getDepositJLTokenInstruction.
User instructions
Every user instruction accrues first and is blocked while the protocol is paused. Amounts are raw token atoms. Rounding always favours the pool.
The signer is the user. The SDK action sends the
...WithMin... variant when you pass a bound, and the plain instruction for bound: "unbounded". mintUnderlying and withdrawToUnderlying always carry a maximum-input bound.
Partner and permissionless instructions
claimPartnerFees always pays the stored partnerFeeRecipient. updatePartnerFeeRecipient accepts only an existing jlToken token account under the market’s token program, and not the vault.
Errors
Lend Referral program errors use codes 7000 to 7018. An error raised inside Jupiter Lend or Liquidity during a cross-program call keeps its own code, in the 6000 range. To decode a failed send or simulation, usedecodeProgramError from the SDK.
Events
The program emits these events for users, fees and wrapper settings. Field names follow the SDK’s decoders. Amounts are raw token atoms, except inLogAccrue.
In
LogAccrue, oldPrice and newPrice are underlying per jlToken × 10^12, and the three deltas are jlToken atoms × 10^6. jlSharesReceived and jlSharesRedeemed are jlToken atoms.
The SDK has a decoder for each event, such as getLogAccrueEventDecoder. Neither Kit nor the SDK extracts events from transaction logs: parse the Program data: log lines yourself, then decode the bytes with the event’s decoder.