sync: Rise TypeScript v0.4.75 - #81
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:
8b82f4267044e45cd33050bf86138e845866e049Mode: 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.mdGenerating the changelog entry for the Rise TS SDK sync from Phoenix 0.4.74 → 0.4.75.
Summary
positionAuthorityon the high-levelclient.ixsorder methods now routes through a new collateral-transfer tail so builder fees can be collected for delegate-signed market orders.client.tryWrapFlightInstructionis renamed toclient.tryWrapOrderInstructionand gains ausePositionAuthorityparameter.buildFlameAtomicDepositFlow/buildFlameDepositToPhoenixIxfor a single-transaction, sponsor-cranked Flame deposit that works even when the depositing wallet holds no SOL.resolvePhoenixBuilderAddressesplus new exports (BETA_USDC_MINT_ADDRESS,EMBER_STATE_ADDRESS) for environment-aware USDC mint / Ember state resolution.spotCollaterals/SpotCollateralBalance) to trader state snapshots/deltas andTraderView, and adds draft-order margin helpers (computeDraftOrderMarginRequirementFrom*,computeMaxDraftOrderSizeForAvailableMarginFrom*) under@/margin.AuthorizedTransferCollateralinstruction discriminant andDEPOSIT_PERMISSIONpermission bit.Breaking Changes
flight.wrapInstructionWithFlightrenamed itsauthorityparam tosignerand added an optionalusePositionAuthorityflag;PhoenixFlightClient.tryWrapFlightInstructionis renamed totryWrapOrderInstructionwith a newusePositionAuthorityargument. Consumers calling these directly must update call sites.PhoenixIxOperationContext.maybeWrapOrderIxsignature changed from(instruction, authority)to(instruction, signer, usePositionAuthority?), and a new requiredmaybeWrapConditionalOrderIxmethod was added to the context interface. Custom implementations of this interface must be updated.flight.buildProxyInstructionIx's fee-bps-override validation error message changed from"Fee bps override must be in the range 0..=10000"to"Invalid fee bps override (must be in 0..=10000)"; code matching on the old string will break.ClientPlaceMarketOrderDelegatedInput.traderWalletis now deprecated in favor ofpositionAuthority(still functional, but slated for removal).Consumer Notes
positionAuthorityonclient.ixs.place*methods instead of manually wrapping instructions — the position-authority path (and the required collateral-transfer tail) is now derived automatically by comparingpositionAuthority ?? authorityagainstauthority.spotCollateralsfields default to[]and are additive/optional, so existing trader-state consumers are unaffected unless they need the new data.margindraft-order helpers can compute/display live margin requirements and max order size before submission; seets/src/margin/draftOrders.tsfor input shapes.