Releases: UXDProtocol/uxd-client
Releases · UXDProtocol/uxd-client
Fix MangoDepositoryAccount type
v2.0.1
What's Changed
- Update IDL to fit program v3.1.0
- Name of the instruction
disableDepositoryMintingchanged todisableDepositoryRegularMinting
- Name of the instruction
Full Changelog: v2.0.0...v2.0.1
v2.0.0
Fixed
Depository.getDeltaNeutralPositionNotionalSizeUI(mango: Mango)now retrieves Mango account, PERP market & price concurrently.Depository.getUnrealizedPnl(mango: Mango, options: ConfirmOptions)now retrieves depository account & delta-neutral position size concurrently.Depository.getFundingRate(mango: Mango)now retrieves Mango Perp market & cache + bids & asks concurrently.Depository.settleMangoDepositoryMangoAccountPnl(payer: Payer, mango: Mango)now retrieves Mango account, cache, PERP market & quote root bank concurrently.
Added
- Add
Client.createQuoteMintWithMangoDepositoryInstructionmethod. - Add
Client.createQuoteRedeemWithMangoDepositoryInstructionmethod. - Add
Client.createSetMangoDepositoryQuoteMintAndRedeemFeeInstructionmethod. - Add
Client.createSetMangoDepositoryQuoteMintAndRedeemSoftCapInstructionmethod. - Add
Client.createDisableDepositoryMintingInstructionmethod. - Add
Depository.getOffsetUnrealizedPnl(mango: Mango, options: ConfirmOptions)method. - Add
Depository.getCollateralPerpPriceNativeQuotePerNativeBase(mango: Mango): Promise<I80F48>method. - Add
Depository.getLimitPrice(slippage: I80F48, perpOrderTakerSide: 'short' | 'long', mango: Mango): Promise<I80F48> method. - Export new
findMultipleATAAddSync(wallet: PublicKey, mintAddresses: PublicKey[]): [PublicKey, number][]utility function.
Changed
- Update IDL to match UXD Program version 3.1.0 (audited).
Client.createRebalanceMangoDepositoryLiteInstructionnow returnsPromise<TransactionInstruction>asynchronously to retrieve, compute & enforce the slippage limit price.Client.createMintWithMangoDepositoryInstructionnow returnsPromise<TransactionInstruction>asynchronously to retrive, compute & enforce the slippage limit price.Client.createRedeemFromMangoDepositoryInstructionnow returnsPromise<TransactionInstruction>asynchronously to retrieve, compute & enforce the slippage limit price.Depository.getMinTradingSizeCollateralUI(mango: Mango)now returns anumbersynchronously.getBalanceutility function now throws anErrorinstead of astringwhen unable to retrieve token account balance.- Upgrade
@project-serum/anchorto0.24.2(from0.22.0). - Upgrade
@solana/web3.jsto1.42.0(from1.35.1). - Add
mangoDepositoriesQuoteRedeemableSoftCap!: BN; // u64property to the Controller account. - Add the following properties to the Depository account:
netQuoteMinted!: BN; // i128 // The signed amount of quote-minted redeemable-tokens, negative means redeemed
quoteMintAndRedeemFee!: number; // u8 // The fee applied to quote-mint/redeem
totalQuoteMintAndRedeemFees!: BN; // u128 // The total amount of fee collected
mintingDisabled!: boolean; // If the depository has disabled both collateral and quote minting
- All token account required by program instructions now need to be created by the caller. The program does not initialise accounts on behalf of the user anymore
Removed
- Remove
findAddrSyncutility function export, usePublicKey.findProgramAddressSyncinstead.
v1.0.0
Initial release.