Magic empowers developers to protect their users via an innovative, passwordless authentication flow without the UX compromises that burden traditional OAuth implementations.


This is your passwordless authentication for your iOS or Android-based Flutter app and enables you to interact with Tezos


Add magic_sdk to your pubspec.yaml:

    sdk: flutter
  magic_sdk: ^4.0.0
  magic_ext_tezos: ^0.2.0

  # Please use a forked version of tezart, that have Remote signer enabled

Run the following command to install dependencies

$ dart pub get

Create an SDK Instance

In main.dart, instantiate Magic with your publishable key, and Tezos.

void main() {
  runApp(const MyApp());

  Magic.instance = Magic.blockchain("YOUR_PUBLISHABLE_KEY", rpcUrl: "", chain: SupportedBlockchain.tezos);

Use Stack in the top level and add Magic.instance.relayer to the children of Stack to ensure the best performance

Note: Relayer is required to establish communication between apps and Magic service. Make sure to have it in a stack whenever you need to authenticate or interact with blockchain

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Magic Demo',
        home: Stack(children: [
          const LoginPage(),

Authenticate your first user via OAuth!

var token = await magic.auth.loginWithEmailOTP(email: textController.text);

After authenticated a new user, now it's time to interact with Tezos.

  // Create Tezos signer
  final tezosSigner = Magic.instance.tezos;

  // Create Tezart instance
  final client = TezartClient('');
  // Fetch public key and address from the logged in user
  await tezosSigner.init(); 
  // Now send a transaction! 
    final operationsList = await client.transferOperation(
        source: Keystore.fromRemoteSigner(tezosSigner),
        destination: tezosSigner.address,
        amount: 10001,
    await operationsList.executeAndMonitor();

Additional information

For more implementation on Tezart, please check the Tezart doc