package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload := map[string]interface{}{
"transaction": "0x1f2e3d4c5b6a7e8f9a0b1c2d3e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5a6b7c8d9e0f1g2h3i4j5k6l7m8n9o0p",
"signature": "0x696f4402d7151fb49e52b629de3ce3098f3dda7721a7425c000b4f26653709e3",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api-test.p2p.org/api/v1/sui/testnet/transaction/send", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(respBody))
}