Return a signed VRF transaction signature for 3rd party to call
curl --request GET \
--url https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}import requests
url = "https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}', 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://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"requestId": "1234567890",
"roundNumber": "12345",
"randomNumber": "100390681190810751958784661347623210498151382836405096200928376056671247975325",
"signature": "0x3ba0095fdcd3704f83882efe53562bfaf84a34ae30765def05ce78d213b41ca568cf5da0c507be8b02c39ae47c377dbb5f7085e9a91919fd07dddc264f0df7d81c"
}Services
Get vRNG signed message
Generate a signature offchain to call deliverSignedRandomNumber. This can be useful for users who want to manually retry a random number.
GET
/
v1
/
vrf
/
{chainId}
/
{txHash}
Return a signed VRF transaction signature for 3rd party to call
curl --request GET \
--url https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}import requests
url = "https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}', 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://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.vrf.proofofplay.com/v1/vrf/{chainId}/{txHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"requestId": "1234567890",
"roundNumber": "12345",
"randomNumber": "100390681190810751958784661347623210498151382836405096200928376056671247975325",
"signature": "0x3ba0095fdcd3704f83882efe53562bfaf84a34ae30765def05ce78d213b41ca568cf5da0c507be8b02c39ae47c377dbb5f7085e9a91919fd07dddc264f0df7d81c"
}How it works
Response
200 - application/json
vrf tx process successful
The unique identifier for the request
Example:
"1234567890"
The round number used for randomness generation
Example:
"12345"
The generated random number
Example:
"100390681190810751958784661347623210498151382836405096200928376056671247975325"
The cryptographic signature of the random number data
Example:
"0x3ba0095fdcd3704f83882efe53562bfaf84a34ae30765def05ce78d213b41ca568cf5da0c507be8b02c39ae47c377dbb5f7085e9a91919fd07dddc264f0df7d81c"