Submitting a batch of transfers (conveniently)
curl --request POST \
--url https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"pointType": "<string>",
"transfers": [
{
"toAddress": "<string>",
"points": "<string>"
}
],
"secondsToFinalize": 123
}
'import requests
url = "https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches"
payload = {
"pointType": "<string>",
"transfers": [
{
"toAddress": "<string>",
"points": "<string>"
}
],
"secondsToFinalize": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pointType: '<string>',
transfers: [{toAddress: '<string>', points: '<string>'}],
secondsToFinalize: 123
})
};
fetch('https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches', 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://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches",
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([
'pointType' => '<string>',
'transfers' => [
[
'toAddress' => '<string>',
'points' => '<string>'
]
],
'secondsToFinalize' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches"
payload := strings.NewReader("{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"batchId": "<string>"
}Submitting a batch of transfers (conveniently)
Submitting a batch of transfers (conveniently)
curl --request POST \
--url https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"pointType": "<string>",
"transfers": [
{
"toAddress": "<string>",
"points": "<string>"
}
],
"secondsToFinalize": 123
}
'import requests
url = "https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches"
payload = {
"pointType": "<string>",
"transfers": [
{
"toAddress": "<string>",
"points": "<string>"
}
],
"secondsToFinalize": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pointType: '<string>',
transfers: [{toAddress: '<string>', points: '<string>'}],
secondsToFinalize: 123
})
};
fetch('https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches', 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://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches",
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([
'pointType' => '<string>',
'transfers' => [
[
'toAddress' => '<string>',
'points' => '<string>'
]
],
'secondsToFinalize' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches"
payload := strings.NewReader("{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"batchId": "<string>"
}This API is the same as the idempotent transfer API above, but if you don’t need the idempotency, you can use this POST API and avoid providing your own
batchIds.
Authentication
Bearer authentication header of the form
Bearer <token>, where <token> is your auth token.Path Params
Contract address distributing the points.
Request
Point type to distribute, can be
PHASE2_POINTS or PHASE2_GOLDNumber of seconds to wait before finalizing this batch, must be between
MINIMUM_FINALIZE_SECONDS and DEFAULT_FINALIZE_SECONDS.If not present uses DEFAULT_FINALIZE_SECONDSResponse
Response status
Transfer batch
batchId that can be used to fetch it’s status.⌘I