feat: expose Account Abstraction methods (ENG-6250) - #42
Merged
Conversation
Adds ParaManager+SmartAccount extension with three methods mirroring the bridge-v2 contract: createSmartAccount, sendSmartAccountTransaction, sendSmartAccountBatchTransaction. Each uses inline Encodable param structs following the ParaManager+Signing convention. Adds SmartAccountInfo and AATransactionReceipt models for the serialized bridge responses. Bigint fields arrive as decimal strings. Bumps ParaWebView default requestTimeout from 30s to 120s — AA UserOp inclusion on Sepolia routinely exceeds 30s (observed ~75s), and the timeout is per-request so non-AA calls are unaffected in practice. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
The bridge now sends a trimmed receipt with all bigint fields already stringified by the top-level `convertBigIntsToStrings`, so the three-way `String / NSNumber / Int` fallback in `decodeReceipt` was dead code. Collapse to direct `as? String ?? ""`. Also fix the `30.0` fallback in `ParaWebView`'s timeout task that diverged from the new 120s default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex review caught two gaps: 1. createSmartAccount / sendSmartAccountTransaction / sendSmartAccountBatchTransaction didn't call ensureTransmissionKeysharesLoaded() before the bridge call. Other signing paths (formatAndSignMessage, transfer, signTransaction) all call it first — without it, AA UserOps fail to sign when invoked before any other signing happens in a session. 2. decodeReceipt went straight to transactionHash without checking for the pendingTransactionId / transactionReviewUrl response shape that the bridge returns when a permissions policy requires approval. Now mirrors the checkForTransactionDenial pattern from Signing: fire the transactionReviewHandler if set, then throw ParaError.transactionDenied with the review URL so callers can surface it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Match web SDK parity — callers can now pass either walletId or address to select the signing wallet for the smart account. address takes precedence when both are supplied; neither falls back to the active EVM wallet (resolution handled by the underlying web SDK).
kwingram25
approved these changes
Apr 24, 2026
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.
Summary
Adds three public methods on
ParaManagerthat mirror the new AA handlers in bridge-v2 (web-sdk PR #1644):createSmartAccount(provider:apiKey:chainId:gasPolicyId:mode:walletId:) -> SmartAccountInfosendSmartAccountTransaction(smartAccountAddress:chainId:to:value:data:provider:) -> AATransactionReceiptsendSmartAccountBatchTransaction(smartAccountAddress:chainId:calls:provider:) -> AATransactionReceiptEach uses inline
Encodableparam structs +postMessage+decodeResult, following theParaManager+Signing.swiftconvention.Also bumps ParaWebView default timeout 30s → 120s
AA UserOp inclusion on Sepolia routinely exceeds 30s (observed ~75s in verification). The timeout is per-request, so non-AA calls are unaffected in practice — a 30s request still returns in 30s even with a 120s limit. Callers who want a tighter bound can still pass a custom
requestTimeouttoParaWebView.init.Test plan
swift build/xcodebuild -scheme ParaSwift -sdk iphonesimulator buildsucceeds.0x44fc3499cb00888e278006169e6b89ab807d55d83e8e485ce6df5e75b2d69554landed on Sepolia (block 10,680,701).swiftformat --swiftversion 6.1 .— not available on the test host; new code follows 4-space indent + repo conventions by eye. Reviewer to run.Coordination
Needs to ship + tag a release before the web-sdk example PR can merge — the Swift example references this SDK via SPM semver from
github.com/getpara/swift-sdk.NO DOCS NEEDED
NO EXAMPLES NEEDED
🤖 Generated with Claude Code