Skip to main content

Function Signature

Future<PortalAddresses> createWallet()

Description

Generates a new MPC wallet and returns the addresses for Ethereum and Solana. The private keys are split across multiple parties and never exist in full on the device.

Parameters

This method takes no parameters.

Returns

PortalAddresses - An object containing:
PropertyTypeDescription
ethereumString?The Ethereum/EVM address
solanaString?The Solana address

Example

import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

final addresses = await portal.createWallet();

print('EVM address: ${addresses.ethereum}');
print('Solana address: ${addresses.solana}');

Errors

CodeDescription
NOT_INITIALIZEDPortal was not initialized before calling this method
WALLET_EXISTSA wallet already exists for this client