portal_flutter 0.1.0-alpha.13
portal_flutter: ^0.1.0-alpha.13 copied to clipboard
Flutter SDK for Portal - Stablecoin wallet infrastructure
0.1.0-alpha.13 #
iOS Dependency Setup #
-
The iOS implementation is now a Swift package, so
PortalSwiftis resolved by the plugin itself when Swift Package Manager is enabled (the Flutter default from 3.44 onward). If your app has SPM enabled and apod 'PortalSwift'line inios/Podfile, remove it. Declaring it in both places resolvesPortalSwifttwice, and the module and theMpc.xcframeworkit vendors are built and linked twice. -
Apps on CocoaPods (Flutter before 3.44, or with
flutter config --no-enable-swift-package-manager) still need the dependency declared themselves, sincePortalSwiftis not published to the CocoaPods trunk:pod 'PortalSwift', :git => 'https://github.com/portal-hq/PortalSwift.git', :tag => '7.3.0'The tag must match the
PortalSwiftversion inportal_flutter_ios.podspec.
New APIs #
-
One-call delegation helpers that build, sign, and broadcast in a single step, each returning the broadcast transaction hashes in submission order:
portal.delegations.approveAndSubmit({chain, token, delegateAddress, amount, onProgress})portal.delegations.revokeAndSubmit({chain, token, delegateAddress, onProgress})portal.delegations.transferAndSubmit({chain, token, fromAddress, toAddress, amount, onProgress})
Transactions are submitted sequentially and network confirmation is not awaited — use the returned hashes to track confirmations yourself. The optional
onProgresscallback receives aDelegationSubmitProgress(new, withstep,index,total, andhash) as each transaction is signed and submitted, wherestepis aDelegationSubmitStepofsigningorsubmitted.
Improvements #
portal_flutter_iosships an SPM manifest (ios/portal_flutter_ios/Package.swift) pinningPortalSwiftto7.3.0andAnyCodableto0.6.7, matching the podspec so the two dependency graphs cannot drift.
Notes #
- Native SDK versions are unchanged from
0.1.0-alpha.12(PortalSwift 7.3.0,portal-android 9.1.1).
0.1.0-alpha.12 #
Breaking Changes #
- Removed the
useMultiBackupparameter fromportal.initialize(). Multi-backup is no longer configurable through the Flutter SDK.
New APIs #
- Feature flags at initialization:
portal.initialize()now accepts afeatureFlagsparameter of the newPortalFeatureFlagstype. All flags are optional:useEnclaveMpcApi— Run MPC operations through Portal's Enclave MPC API.usePresignatures— Pre-generate signatures in the background and use them at signing time for reduced latency.usePreGeneratedWallet— Fetch pre-generated MPC shares from the Enclave API instead of running on-device key generation, with automatic fallback to on-device generation on transient server errors.
portal.featureFlags— Read-only access to the feature flags passed at initialization. Flags are immutable after initialization; reinitialize the SDK to change them.enclaveMpcHostparameter onportal.initialize()— Optional custom Enclave MPC host (e.g.mpc-client.portalhq.devfor staging).
Improvements #
- Yield.xyz enums (
YieldXyzMechanicsType,YieldXyzRewardSchedule,YieldXyzRewardClaiming,YieldXyzSource,YieldXyzArgumentFieldName,YieldXyzArgumentFieldType) now include anunknownvalue so unrecognized values returned by the Yield.xyz API can be surfaced instead of dropped, andYieldXyzSourcegained alendingvalue. - Bumped
PortalSwiftto7.3.0:- Adds pre-generated wallet support (see
usePreGeneratedWalletabove). - All Portal API requests now carry an
X-Portal-Trace-Idheader, and multi-step flows share a single trace ID for end-to-end request correlation.
- Adds pre-generated wallet support (see
- Bumped
portal-androidto9.1.1:- Fixed a presignature signing issue by updating the MPC binary from
1.3.9to1.4.0. - Adds pre-generated wallet support (see
usePreGeneratedWalletabove). - All Portal API requests now carry an
X-Portal-Trace-Idheader, and multi-step flows share a single trace ID for end-to-end request correlation. portal.isWalletOnDevice()now returnsfalseon a device with no wallet instead of throwing.
- Fixed a presignature signing issue by updating the MPC binary from
0.1.0-alpha.11 #
Breaking Changes #
portal.backupWallet()now returns aPendingBackupinstead ofPortalBackupResponse(removed). Read the encrypted payload frompendingBackup.cipherText, persist it, then callpendingBackup.confirm()(orpendingBackup.discard()if your storage step fails).- Removed
portal.swap()and itsPortalSwapRequest/PortalSwapResulttypes. Useportal.trading.zeroX(0x DEX aggregator) orportal.trading.lifi(cross-chain) instead.
New APIs #
portal.buildEip155Transaction({chainId, to, token, amount})— Build an unsigned EIP-155 transaction.portal.buildSolanaTransaction({chainId, to, token, amount})— Build an unsigned Solana transaction.portal.evmAccountType.buildAuthorizationList()andportal.evmAccountType.build7702UpgradeTx()— Manual EIP-7702 upgrade flow. Both accept an optionalsubsidizeflag. See the EIP-7702 tab in the example app for the full three-step flow.Portal.configureGoogleStorage(...)now acceptsbackupOption,folderName,signOutAfterUse, anduseNewExperimentalGoogleAuthApi— full parity with native SDK config knobs.- New
PortalGDriveBackupOptionenum:appDataFolder,appDataFolderWithFallback,customFolder. portal.apiKeyexposed as a public getter.- Portal native events exposed as a broadcast
Stream<PortalEventData>viaportal.events, withportal.emit(event, [data])to emit events back to the SDK (e.g. approving or rejecting a manual signing request from your listener). - Backup + signing share metadata accessors:
portal.getBackupShareMetadata()andportal.getSigningSharesMetadata(). - Share management:
portal.storedClientBackupShare(...)andportal.updateShareStatus(...)for reporting custodian-stored backup shares and updating share-pair status. - Portal-managed backups:
portal.backupWallet()andportal.recoverWallet()now support custodian-managed cipherText storage, returning aPendingBackupyou confirm once your storage step succeeds. - ZeroX (0x) DEX aggregator submodule:
portal.trading.zeroX.getSources(),portal.trading.zeroX.getQuote(), andportal.trading.zeroX.getPrice().
Deprecations #
Portal.configureGoogleStorage(applicationName: ...)is deprecated; usefolderNameinstead. Will be removed in the next minor.
Bug Fixes #
- iOS: Pigeon completion handlers that return structured or list responses (
getAssets,getBalances,getTransactions,getNftAssets,getTransactionDetails,getBackupShareMetadata,getSigningSharesMetadata,getAddresses,getClient,buildEip155Transaction,buildSolanaTransaction,evmAccountType.buildAuthorizationList,evmAccountType.build7702UpgradeTx) are now dispatched to the main thread, preventing a stack overflow crash during codec serialization of nested responses. - iOS:
configureGoogleStoragenow auto-resolves the topUIViewControllerso the Google Sign-In sheet has a presenter without callers wiring it manually. - Android:
FlutterErrorin coroutine handlers is now caught and surfaced as aPortalExceptioninstead of crashing. - Android: Fixed
Hypernative.scanEip712TxURL path (eip712→eip-712). - iOS & Android: Manual signing approve/reject events now fail fast with a
NO_PENDING_REQUESTerror when no matching pending request exists, and rejected events emit the payload type the provider expects — fixing cases where a manual signing request could hang indefinitely. - Android:
request()now serializes non-string RPC results (objects and arrays) as JSON instead of relying ontoString(), fixing malformed responses for methods that return structured data. - Android:
configurePasskeyStoragenow prependshttps://towebAuthnHostwhen the scheme is omitted, so passkey WebAuthn flows work with a bare host. - Android: Yield discovery (
portal.yieldIntegrations.yieldxyz.discover()) now skips opportunities and reward-rate components containing enum values the SDK doesn't recognize yet, instead of throwing. - Android:
availableRecoveryMethods()no longer throws on an unrecognized recovery method; unknown methods are filtered out. - Android: Backup/signing metadata accessors and 0x trading methods now surface a
NOT_INITIALIZEDerror immediately when Portal isn't initialized. PendingBackup.confirm()anddiscard()now clear the internal backup id so a pending backup can't be resolved twice.
Improvements #
- Bumped
PortalSwiftto7.2.1. - Bumped
portal-androidto9.0.0:- HTTP 400 backend errors now include the raw response body in
PortalException.detailsacross all API methods, providing clearer diagnostics on failures. portal.security.blockaid.scanUrl()—rawResponseJsonno longer contains amodalsfield (removed by the Blockaid backend).portal.security.hypernative.scanSolanaTx()— withinfindingsJson, each trace'sfuncIdchanged from a plain string to{"type": "StringValue" | "BytesValue", "value": "..."}to handle both string and byte-array formats returned by the Hypernative API.portal.security.hypernative.scanTransaction()/scanEip712Tx()— withinfindingsJson, each trace'sstatuschanged from an integer to a boolean, matching the Hypernative API.
- HTTP 400 backend errors now include the raw response body in
0.1.0-alpha.10 #
Bug Fixes #
- Android: HTTP 400 responses now surface errors as
PortalException:portal.delegations.approveportal.delegations.revokeportal.delegations.getStatusportal.delegations.transferFromportal.getTransactionDetails
- Android: Fixed release builds with proper proguard rules for response body fields.
Improvements #
- Bumped
portal-androidto8.4.0
0.1.0-alpha.8 #
Firebase Auth Backup
portal.configureFirebaseStorage({required getToken})- Configure Firebase as a backup storage method with a token callbackportal.backupWallet(method: PortalBackupMethod.firebase)- Backup wallet using Firebase authportal.recoverWallet(method: PortalBackupMethod.firebase)- Recover wallet using Firebase auth
0.1.0-alpha.7 #
New APIs #
Transaction Details
portal.getTransactionDetails(chain, txHash)- Get transaction details for a given chain and transaction hash
0.1.0-alpha.5 #
New APIs #
Security Scanning
portal.security.blockaid.scanTransaction()- Scan a transaction for security risks using Blockaidportal.security.blockaid.scanAddress()- Scan an address for security risks using Blockaidportal.security.hypernative.scanTransaction()- Scan a transaction for security risks using Hypernativeportal.security.hypernative.scanAddress()- Scan an address for security risks using Hypernative
ERC-4337 Account Abstraction
eth_signUserOperationsupport viaportal.request()- Sign UserOperations for Account Abstracted wallets
LiFi Cross-Chain Swaps
portal.trading.lifi.getQuote()- Get a quote for a cross-chain swapportal.trading.lifi.getRoutes()- Get available routes for a swapportal.trading.lifi.getRouteStep()- Get a specific step from a routeportal.trading.lifi.sendRouteTransaction()- Execute a route step transactionportal.trading.lifi.sendSequentialSteps()- Execute all steps in a route sequentiallyportal.trading.lifi.getStatus()- Check the status of a cross-chain transaction
EVM Account Type (EIP-7702)
portal.evmAccountType.getStatus()- Query the current EVM account type statusportal.evmAccountType.getAddresses()- Get EOA and smart contract addressesportal.evmAccountType.upgradeTo7702()- Upgrade an EOA to EIP-7702 smart account
MPC Progress Stream
portal.onProgress- Stream of MPC operation progress events (create, backup, recover)
Balance API
portal.getBalances()- Get native and token balances for a chain
Log Level
portal.setLogLevel()- Set the SDK log level at runtimelogLevelparameter inportal.initialize()- Set log level during initialization
Bug Fixes #
- Fixed iOS yield crash caused by Pigeon completion handlers running off main thread
- Fixed Android delegation
getStatusnull pointer when no delegations exist
Improvements #
- Dispatched MPC progress callbacks to main thread on iOS for thread safety
- Used
tokenAddressmetadata key consistently in AndroidgetBalancesimplementation - Added
isClosedguard on progress stream controller to prevent crashes after dispose - Fixed
dispose()ordering: unregister handler before closing stream controller - Added release automation CI/CD workflows for pub.dev publishing
0.1.0-alpha.4 #
New APIs #
Yield.xyz Integration
portal.yieldIntegrations.yieldxyz.discover()- Find yield opportunitiesportal.yieldIntegrations.yieldxyz.enter()- Enter yield positionsportal.yieldIntegrations.yieldxyz.exit()- Exit yield positionsportal.yieldIntegrations.yieldxyz.manage()- Manage pending actionsportal.yieldIntegrations.yieldxyz.getBalances()- Query active balancesportal.yieldIntegrations.yieldxyz.getHistoricalActions()- View historical actionsportal.yieldIntegrations.yieldxyz.getTransaction()- Get transaction statusportal.yieldIntegrations.yieldxyz.track()- Track transaction on-chain
Delegation API
portal.delegations.approve()- Approve token delegationportal.delegations.revoke()- Revoke token delegationportal.delegations.getStatus()- Get delegation statusportal.delegations.transferFrom()- Transfer from delegated allowance
Bug Fixes #
- Fixed Solana
sol_signMessageon Android (platform-specific encoding)
0.1.0-alpha.3 #
- Updated iOS podspec metadata
0.1.0-alpha.2 #
- Updated README
0.1.0-alpha.1 #
- Initial alpha release of Portal Flutter SDK
- Stablecoin wallet infrastructure for Flutter apps
- Support for iOS and Android platforms