Compose Transaction

On top of web3 compatibility, Fortmatic also provides custom SDK functions that are optimized for better developer experience and end-user flows. Here's how users can initiate Ether transfers from their wallet to another.

Send Ether

As a developer, you can send Ether using the Fortmatic.transactions.sendmethod. With the Fortmatic SDK you don't need to specify the sender's wallet address or use Wei for the transaction amount, the Ether to Wei conversion is done for you automatically.

import Fortmatic from 'fortmatic';

const fm = new Fortmatic('YOUR_API_KEY');

fm.transactions.send({
  amount: '100.001',
  to: '0xe0cef4417a772512e6c95cef366403839b0d6d6d'
});

Send Any Amount Anywhere

In addition to the familiar confirmation dialog with web3. You can allow end-users to send any amount of Ether to any address by leaving out send option parameters.

import Fortmatic from 'fortmatic';

const fm = new Fortmatic('YOUR_API_KEY');

// End user customizes the ETH amount
fm.transactions.send({
  to: '0xe0cef4417a772512e6c95cef366403839b0d6d6d'
});

// End user customizes the destination
fm.transactions.send({
  amount: '56.10003',
});

// End user customizes the amount and the destination
fm.transactions.send()

Send Transactions with Web3

You can also use Fortmatic to send transactions with web3 if you already use it to develop. You can follow the links below:

Last updated