create_transaction
Installation
Usage
Initialization
First, initialize the 'Spiderswap'
class with your API key.
Method: create_transaction
Description
The 'create_transaction'
method creates a Solana transaction from a base64-encoded string containing the swap transaction data.
Parameters
'swap_transaction_data'
(str): The base64-encoded string containing the swap transaction data.
Returns
'VersionedTransaction'
: A promise that resolves to a 'VersionedTransaction'
object.
Example
This example demonstrates using both 'get_swap'
and 'create_transaction'
methods.
Implementation Details
This method converts the 'swap_transaction_data'
from a base64-encoded string to a buffer and deserializes it into a 'VersionedTransaction'
.
Last updated