Generate and broadcast a swap or bridge transaction.
VmId
: evm
, solana
,
alt-vm
(any non-named VM - e.g., Bitcoin, Ripple).
Configure the transaction request
recipient
should only be different from the sender
if you are:EVM <> Solana
)Generate the transaction
ActionRequest
and ActionResponse
. This API endpoint will return a transaction object we will use to actually execute this transaction.Import the recommended libraries
actionRequest
used to generate our transaction. Let’s see how we can broadcast it on Solana.
View the Solana transaction type here.
Import the recommended libraries
@solana/web3.js
, which is the standard SDK for interacting with the Solana blockchain.Broadcast the transaction
actionRequest
used to generate our transaction. Let’s see how we can broadcast it on Bitcoin.
View the alt VM transaction type here.
sender
to the to
field specified in the AltVmTransaction
response.
This transfer triggers the swap transaction and funds will ultimately be
delivered to the recipient
.Install recommended package
Import the recommended libraries
Broadcast the transaction