Repository navigation
feat(swift-sdk): add v3 state transitions - #3008
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
QuantumExplorer
approved these changes
Jan 22, 2026
shumkov
added a commit
that referenced
this pull request
May 22, 2026
Restore the descriptive legacy name across rs-platform-wallet, rs-platform-wallet-ffi, Swift SDK, and SwiftExampleApp. The previous `top_up` name was ambiguous next to the identity-side `register_identity_with_funding` and conflicted with the prior legacy `fund_from_asset_lock` terminology. Pre-existing `TopUpAddress` SDK trait and `top_up_with_signers` method in rs-sdk (added in #2875/#3008) are untouched — they're shared SDK API, not part of this PR's surface. Same for `AssetLockFundingType::*TopUp` enum variants. Build verified: cargo check -p platform-wallet-ffi, ./build_ios.sh (sim, debug), xcodebuild SwiftExampleApp — all green.
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.
Issue being fixed or feature implemented
This PR implements support for all 6 address-related state transitions from Dash Platform v3.0, along with 4 new address query operations. These features enable iOS applications to fully interact with Platform addresses, including transferring funds, withdrawing to Core addresses, and managing identity funding operations.
What was done?
Address State Transitions (6 total)
AddressFundsTransferTransition - Transfer credits between Platform addresses
dash_sdk_address_transfer_fundsAddresses.transferFunds(inputs:outputs:feeFromInputIndex:)TransferAddressFundsViewwith input/output address managementAddressCreditWithdrawalTransition - Withdraw credits from Platform addresses to Core (L1) Dash addresses
dash_sdk_address_withdraw_fundsAddresses.withdrawFunds(inputs:coreAddress:coreFeePerByte:pooling:feeFromInputIndex:changeAddress:)WithdrawAddressFundsViewwith pooling strategy selectionAddressFundingFromAssetLockTransition - Top up Platform address from asset lock
dash_sdk_address_top_up_from_asset_lockAddresses.topUpAddressFromAssetLock(...)TopUpAddressFromAssetLockViewsupporting both instant and chain lock proofsIdentityTopUpFromAddressesTransition - Top up identity using Platform address balances
dash_sdk_identity_top_up_from_addressesAddresses.topUpIdentityFromAddresses(identityId:inputs:)TopUpIdentityFromAddressesViewIdentityCreditTransferToAddressesTransition - Transfer credits from identity to Platform addresses
dash_sdk_identity_transfer_credits_to_addressesAddresses.transferCreditsToAddresses(identityId:outputs:identityPrivateKey:publicKeyId:)TransferIdentityToAddressesViewIdentityCreateFromAddressesTransition - Create identity funded by Platform addresses
dash_sdk_identity_create_from_addressesAddresses.createIdentityFromAddresses(identityId:inputs:output:identityPrivateKey:)CreateIdentityFromAddressesViewAddress Queries (4 new)
getAddressesTrunkState - Fetch top-level state of address tree
dash_sdk_address_fetch_trunk_stateAddresses.getTrunkState()GetTrunkStateViewwith copy functionality for keys and hashesgetAddressesBranchState - Fetch state of specific branch in address tree
dash_sdk_address_fetch_branch_stateAddresses.getBranchState(key:depth:expectedHash:checkpointHeight:)GetBranchStateViewwith expanded fields to prevent truncationgetRecentAddressBalanceChanges - Fetch recent, uncompacted address balance changes
dash_sdk_address_fetch_recent_balance_changesAddresses.getRecentBalanceChanges(startHeight:)GetRecentBalanceChangesViewwith block-by-block change displaygetRecentCompactedAddressBalanceChanges - Fetch recent, compacted address balance changes
dash_sdk_address_fetch_compacted_balance_changesAddresses.getCompactedBalanceChanges(startBlockHeight:)GetCompactedBalanceChangesViewwith compacted range displayAdditional Features
Bech32m Address Support: Full encoding/decoding support for bech32m Platform addresses
Bech32m.decode(_:)andBech32m.isValidPlatformAddress(_:)helper methodsUI Organization: All address-related state transitions are accessible through "Platform -> State Transitions -> Address" menu, separate from address queries
Technical Implementation
How Has This Been Tested?
Breaking Changes
No breaking changes. This is a feature addition that extends the existing
Addressesservice class with new methods and adds new UI views.Checklist:
For repository code-owners and collaborators only