Hyphen
  • Hyphen
  • Concepts
    • Auth Methods
    • Hyphen Multi-Sig Account
      • Device Key
      • Recovery Key
      • Server Key
    • Paymaster
    • Hybrid Custody
  • Mechanism Paper
  • iOS SDK
    • Quick Start
    • Authenticating Users
    • Using Hyphen UI Kit
      • Account Management Screen
    • Sample Project
  • Android SDK
    • Quick Start
    • Authenticating Users
    • Handling 2FA / Transaction Request
    • Using Hyphen UI Kit
    • Sending Transactions
  • Flutter SDK
    • Quick Start
    • Authenticating Users
    • Using Hyphen UI Kit
    • Sending Transactions
    • Example App
  • Hybrid Custody
    • Into the Hybrid Custody
  • Without Using SDK
    • Authenticating Users
    • Handling 2FA Push
  • REST API
    • API Reference
      • Account
      • Auth
      • Device
      • Key
      • Sign
    • Swagger
Powered by GitBook
On this page
  • Sending Transactions
  • Creating, Signing, and Sending Transactions

Was this helpful?

  1. Flutter SDK

Sending Transactions

To send a transaction with Hyphen Android SDK

Sending Transactions

How to send a transaction with the Hyphen Flutter SDK

Creating, Signing, and Sending Transactions

To create, sign, and send transactions with the Hyphen Flutter SDK, follow these steps:

try {
  // Define Cadence script
  final String cadenceScript = "...";

  // Define arguments
  final List<Map<String, dynamic>> arguments = [...];

  // Sign and send transaction
  final String txId = await HyphenFlow.signAndSendTransaction(
    cadenceScript,
    arguments,
    true,
  );

  // Handle transaction result
  print("Transaction result: $txId");
} catch (e) {
  print("Error: $e");
}
  • cadenceScript: The Cadence script to be executed in the transaction.

  • arguments: List of arguments for the transaction.

  • withAuthorizer: A boolean indicating whether the transaction requires an authorizer.

  • txId: The transaction ID returned by the signAndSendTransaction method.

PreviousUsing Hyphen UI KitNextExample App

Last updated 1 year ago

Was this helpful?