portal_flutter 0.1.0-alpha.11
portal_flutter: ^0.1.0-alpha.11 copied to clipboard
Flutter SDK for Portal - Stablecoin wallet infrastructure
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