Submitting a batch of transfers (idempotently)
curl --request PUT \
--url https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches/{batchId} \
--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/{batchId}"
payload = {
"pointType": "<string>",
"transfers": [
{
"toAddress": "<string>",
"points": "<string>"
}
],
"secondsToFinalize": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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/{batchId}', 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/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/{batchId}"
payload := strings.NewReader("{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches/{batchId}")
.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/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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 (idempotently)
Submitting a batch of transfers (idempotently)
curl --request PUT \
--url https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches/{batchId} \
--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/{batchId}"
payload = {
"pointType": "<string>",
"transfers": [
{
"toAddress": "<string>",
"points": "<string>"
}
],
"secondsToFinalize": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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/{batchId}', 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/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/{batchId}"
payload := strings.NewReader("{\n \"pointType\": \"<string>\",\n \"transfers\": [\n {\n \"toAddress\": \"<string>\",\n \"points\": \"<string>\"\n }\n ],\n \"secondsToFinalize\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://waitlist-api.prod.blast.io/v1/contracts/{contractAddress}/batches/{batchId}")
.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/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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>"
}The points API accepts transfers in batches. For efficiency, try to completely fill your batches. This API expects you to provide a client generated
batchId to uniquely identify this batch of transfers.
Authentication
string
required
Bearer authentication header of the form
Bearer <token>, where <token> is your auth token.Path Params
string
required
Contract address distributing the points.
string
required
batchId is a client provided string (max length 64). If a request fails,
the request can be retried with the same batchId. If the batchId already
exists, we return a 409.We recommend using a UUID as batchId.Request
string
required
Point type to distribute, can be
PHASE2_POINTS or PHASE2_GOLDTransfer[]
required
number
Number 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
boolean
Response status
string
Transfer batch
batchId which was provided as a param.