Preview Bundle
curl --request POST \
--url https://testnet.walletkit.com/transactions/preview-bundle \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "<string>",
"unsigned_transactions": [
{
"to": "<string>",
"value": "<string>",
"input": "<string>",
"gasLimit": "<string>",
"maxPriorityFeePerGas": "<string>",
"maxFeePerGas": "<string>",
"nonce": "<string>"
}
]
}
'import requests
url = "https://testnet.walletkit.com/transactions/preview-bundle"
payload = {
"from": "<string>",
"unsigned_transactions": [
{
"to": "<string>",
"value": "<string>",
"input": "<string>",
"gasLimit": "<string>",
"maxPriorityFeePerGas": "<string>",
"maxFeePerGas": "<string>",
"nonce": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '<string>',
unsigned_transactions: [
{
to: '<string>',
value: '<string>',
input: '<string>',
gasLimit: '<string>',
maxPriorityFeePerGas: '<string>',
maxFeePerGas: '<string>',
nonce: '<string>'
}
]
})
};
fetch('https://testnet.walletkit.com/transactions/preview-bundle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://testnet.walletkit.com/transactions/preview-bundle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '<string>',
'unsigned_transactions' => [
[
'to' => '<string>',
'value' => '<string>',
'input' => '<string>',
'gasLimit' => '<string>',
'maxPriorityFeePerGas' => '<string>',
'maxFeePerGas' => '<string>',
'nonce' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.walletkit.com/transactions/preview-bundle"
payload := strings.NewReader("{\n \"from\": \"<string>\",\n \"unsigned_transactions\": [\n {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"input\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"nonce\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://testnet.walletkit.com/transactions/preview-bundle")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"<string>\",\n \"unsigned_transactions\": [\n {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"input\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"nonce\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.walletkit.com/transactions/preview-bundle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"<string>\",\n \"unsigned_transactions\": [\n {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"input\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"nonce\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"from": "<string>",
"to": "<string>",
"contract": {
"address": "<string>",
"name": "<string>",
"logo_url": "<string>",
"token": {
"uuid": "<string>",
"contract_address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"display_decimals": 123,
"logo_url": "<string>"
},
"nft": {
"contract_address": "<string>",
"name": "<string>",
"image_url": "<string>",
"symbol": "<string>"
}
},
"function_name": "<string>",
"arguments": {},
"simulation": {
"success": true,
"asset_changes": [
{
"amount": "<string>",
"raw_amount": "<string>",
"from": "<string>",
"to": "<string>",
"token": {
"uuid": "<string>",
"contract_address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"display_decimals": 123,
"logo_url": "<string>"
},
"nft": {
"owner_wallet_address": "<string>",
"contract_address": "<string>",
"token_id": "<string>",
"metadata": {
"name": "<string>",
"description": "<string>",
"image": "<string>"
}
}
}
],
"error": "<string>"
}
}
]{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Transactions
Preview Bundle
This endpoint allows you to preview a bundle of transactions as it would execute on chain and returns results for each transaction.
Preview Bundle
curl --request POST \
--url https://testnet.walletkit.com/transactions/preview-bundle \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "<string>",
"unsigned_transactions": [
{
"to": "<string>",
"value": "<string>",
"input": "<string>",
"gasLimit": "<string>",
"maxPriorityFeePerGas": "<string>",
"maxFeePerGas": "<string>",
"nonce": "<string>"
}
]
}
'import requests
url = "https://testnet.walletkit.com/transactions/preview-bundle"
payload = {
"from": "<string>",
"unsigned_transactions": [
{
"to": "<string>",
"value": "<string>",
"input": "<string>",
"gasLimit": "<string>",
"maxPriorityFeePerGas": "<string>",
"maxFeePerGas": "<string>",
"nonce": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '<string>',
unsigned_transactions: [
{
to: '<string>',
value: '<string>',
input: '<string>',
gasLimit: '<string>',
maxPriorityFeePerGas: '<string>',
maxFeePerGas: '<string>',
nonce: '<string>'
}
]
})
};
fetch('https://testnet.walletkit.com/transactions/preview-bundle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://testnet.walletkit.com/transactions/preview-bundle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '<string>',
'unsigned_transactions' => [
[
'to' => '<string>',
'value' => '<string>',
'input' => '<string>',
'gasLimit' => '<string>',
'maxPriorityFeePerGas' => '<string>',
'maxFeePerGas' => '<string>',
'nonce' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.walletkit.com/transactions/preview-bundle"
payload := strings.NewReader("{\n \"from\": \"<string>\",\n \"unsigned_transactions\": [\n {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"input\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"nonce\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://testnet.walletkit.com/transactions/preview-bundle")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"<string>\",\n \"unsigned_transactions\": [\n {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"input\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"nonce\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.walletkit.com/transactions/preview-bundle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"<string>\",\n \"unsigned_transactions\": [\n {\n \"to\": \"<string>\",\n \"value\": \"<string>\",\n \"input\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"maxPriorityFeePerGas\": \"<string>\",\n \"maxFeePerGas\": \"<string>\",\n \"nonce\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"from": "<string>",
"to": "<string>",
"contract": {
"address": "<string>",
"name": "<string>",
"logo_url": "<string>",
"token": {
"uuid": "<string>",
"contract_address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"display_decimals": 123,
"logo_url": "<string>"
},
"nft": {
"contract_address": "<string>",
"name": "<string>",
"image_url": "<string>",
"symbol": "<string>"
}
},
"function_name": "<string>",
"arguments": {},
"simulation": {
"success": true,
"asset_changes": [
{
"amount": "<string>",
"raw_amount": "<string>",
"from": "<string>",
"to": "<string>",
"token": {
"uuid": "<string>",
"contract_address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"display_decimals": 123,
"logo_url": "<string>"
},
"nft": {
"owner_wallet_address": "<string>",
"contract_address": "<string>",
"token_id": "<string>",
"metadata": {
"name": "<string>",
"description": "<string>",
"image": "<string>"
}
}
}
],
"error": "<string>"
}
}
]{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Headers
string
required
Your WalletKit Project ID can be found on the API Keys page in the WalletKit Dashboard.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Available options:
Ethereum, Polygon, Base, Avalanche, Polkadot, Vara Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I