Issue the challenge an external wallet signs
curl --request POST \
--url https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challengeimport requests
url = "https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge', 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://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"challenge": "Crown: whitelist wallet 0xdda4775ed1d0c831b006fd4061edb1b30693a44c for account 019712cf-c86d-703f-85b8-bdaa4fc8d254. Expires at 2024-01-15T10:45:00Z.",
"expires-at": "2024-01-15T10:45:00Z"
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}Wallets
Issue External Wallet Challenge
Returns the text the wallet signs to prove the account controls it, valid for 15 minutes. Sign it with personal_sign (EIP-191) and send it back exactly as returned, with the signature, to POST /v1/accounts/{account-id}/external-wallets.
account-id is the caller’s own account or one of its sub-accounts. Requires the manage-wallets capability on the account.
POST
/
api
/
v1
/
accounts
/
{account-id}
/
external-wallets
/
{address}
/
challenge
Issue the challenge an external wallet signs
curl --request POST \
--url https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challengeimport requests
url = "https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge', 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://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crown-brlv.com/api/v1/accounts/{account-id}/external-wallets/{address}/challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"challenge": "Crown: whitelist wallet 0xdda4775ed1d0c831b006fd4061edb1b30693a44c for account 019712cf-c86d-703f-85b8-bdaa4fc8d254. Expires at 2024-01-15T10:45:00Z.",
"expires-at": "2024-01-15T10:45:00Z"
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}Path Parameters
Response
Challenge issued