sync: Rise TypeScript v0.4.76 - #83
Open
jchen1 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated by
.github/scripts/sync_rise.py.Source
Phoenix commit:
116538d2560135ebd0d7d11fbb8804d32db043d8Mode: automatic
Synced paths:
rise/ts->tsrise/README.md->README.mdrise/instructions.json->instructions.jsonrise/programs->programsrise/test-fixtures->test-fixturesChangelog Draft
This draft was also appended to package changelog file(s) in this PR so it can be manually edited before merge:
ts/CHANGELOG.mdSummary
tryWrapFlightInstructionis renamed totryWrapOrderInstructionand now takes ausePositionAuthorityflag so Flight can append the collateral-transfer tail and collect its builder fee when a delegate, not the trader owner, signs — including forPlaceMarketOrderDelegated.buildFlameAtomicDepositFlow(plusbuildFlameDepositToPhoenixIx,deriveFlameDepositToPhoenixAddresses,deriveFlameGlobalStateAddress) for atomic, sponsor-cranked Flame deposits so wallets holding no SOL can deposit in one bundled transaction.spotCollateralsfields onSubaccountMarginInputs,TraderView, and trader-state snapshot/delta types, plus new margin totals (spotCollateralNotionalQuoteLots,spotCollateralDiscountedQuoteLots).computeDraftOrderMarginRequirementFromInputs/FromSnapshot,computeMaxDraftOrderSizeForAvailableMarginFromInputs/FromSnapshot) for pre-trade margin estimation.resolvePhoenixBuilderAddresses,BETA_USDC_MINT_ADDRESS,EMBER_STATE_ADDRESS, andDEPOSIT_PERMISSIONexports, and aminBaseLotsToFillfield on isolated market order requests.Breaking Changes
tryWrapFlightInstruction(instruction, authority)is renamed totryWrapOrderInstruction(instruction, signer, usePositionAuthority?)on the Flight client; update call sites, and passusePositionAuthority: truewhen the signer is a delegate rather than the trader owner.wrapInstructionWithFlight'sauthorityparam is renamed tosigner; it now also acceptsusePositionAuthority/resolveRootAuthority, and calling it withusePositionAuthority: truebut noresolveRootAuthoritynow throws.PhoenixIxOperationContext.maybeWrapOrderIxgained an optional thirdusePositionAuthorityparameter, and the interface now requires a newmaybeWrapConditionalOrderIxmethod — custom implementations of this interface need updating.ProxyInstructionParams/buildProxyInstructionIx) now append two extra trailing accounts (collateral-transfer authority + permission account) whenrootAuthorityis set; code that indexes into the proxy instruction's account list positionally must account for this.Consumer Notes
ClientPlaceMarketOrderDelegatedInput.traderWalletis deprecated in favor ofpositionAuthority, now the shared way to declare a delegate signer across all order builders — the effective signer ispositionAuthority ?? authority, and high-levelclient.ixsmethods pick the position-authority Flight path automatically when they differ.buildFlameAtomicDepositFlowcurrently only supportstraderSubaccountIndex0 and throws for any other value.spotCollateralsfields onSubaccountMarginInputs,TraderView, and trader-state types are optional and default to empty, so existing integrations keep compiling without changes.