Send Transaction V2
URI Params
Param
Type
Description
Methods
Method
REST Method
Description
Example Request
Expected Response
Status Code
Description
Last updated
Last updated
curl --location 'https://lim.gateway.astralane.io/iris2?api-key=APIKEY&method=sendTransaction' \
--header 'Content-Type: text/plain' \
--data 'base64_encoded_txn'#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Content-Type", "text/plain".parse()?);
let data = "base64_encoded_txn";
let request = client.request(reqwest::Method::POST, "https://lim.gateway.astralane.io/iris2?api-key=APIKEY&method=sendTransaction")
.headers(headers)
.body(data);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}
const axios = require('axios');
let data = 'base64_encoded_txn';
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://lim.gateway.astralane.io/iris2?api-key=APIKEY&method=sendTransaction',
headers: {
'Content-Type': 'text/plain'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lim.gateway.astralane.io/iris2?api-key=APIKEY&method=sendTransaction"
method := "POST"
payload := strings.NewReader(`base64_encoded_txn`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "text/plain")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}