Crear un desafío nonce para vincular una wallet externa
curl --request POST \
--url https://api.qbank.cl/platform/v1/wallet-links/challenges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chain": "eth",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
}
'import requests
url = "https://api.qbank.cl/platform/v1/wallet-links/challenges"
payload = {
"chain": "eth",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
}
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({chain: 'eth', address: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'})
};
fetch('https://api.qbank.cl/platform/v1/wallet-links/challenges', 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://api.qbank.cl/platform/v1/wallet-links/challenges",
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([
'chain' => 'eth',
'address' => '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
]),
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://api.qbank.cl/platform/v1/wallet-links/challenges"
payload := strings.NewReader("{\n \"chain\": \"eth\",\n \"address\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\"\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://api.qbank.cl/platform/v1/wallet-links/challenges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"eth\",\n \"address\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/wallet-links/challenges")
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 \"chain\": \"eth\",\n \"address\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\"\n}"
response = http.request(request)
puts response.read_body{
"challenge": {
"link_id": "d52e7b91-4c68-4f89-1b23-5d7e9f0a2c46",
"chain": "eth",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"nonce": "9f2c41d2a887f3e4b219c6d2e8f1a5b7",
"envelope": "CBPay Signature Proof\nDomain: https://api.qbank.cl/platform\nPurpose: wallet_link\nWallet: 0x71C7656EC7ab88b098defB751B7401B5f6d8976F\nAccount: ae8c1f02-3b45-4c67-9d12-8f0e5a6b7c8d\nNonce: 9f2c41d2a887f3e4b219c6d2e8f1a5b7\nIssued: 2026-08-21T14:03:11Z\nExpires: 2026-08-21T14:13:11Z",
"expires_at": "2026-08-21T14:13:11Z"
}
}Crear un desafío nonce para vincular una wallet externa
Crea un desafío nonce para vincular una wallet EXTERNA
(custody=client) a la cuenta. El cliente firma el envelope con su wallet
(EIP-191 para ETH/EVM, TIP-191 para TRON) y lo envía a POST /v1/wallet-links/verify. El desafío expira en 10 minutos y es de un solo uso.
Errores específicos: unsupported_chain, invalid_address, nonce_failed.
POST
/
v1
/
wallet-links
/
challenges
Crear un desafío nonce para vincular una wallet externa
curl --request POST \
--url https://api.qbank.cl/platform/v1/wallet-links/challenges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chain": "eth",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
}
'import requests
url = "https://api.qbank.cl/platform/v1/wallet-links/challenges"
payload = {
"chain": "eth",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
}
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({chain: 'eth', address: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'})
};
fetch('https://api.qbank.cl/platform/v1/wallet-links/challenges', 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://api.qbank.cl/platform/v1/wallet-links/challenges",
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([
'chain' => 'eth',
'address' => '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
]),
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://api.qbank.cl/platform/v1/wallet-links/challenges"
payload := strings.NewReader("{\n \"chain\": \"eth\",\n \"address\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\"\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://api.qbank.cl/platform/v1/wallet-links/challenges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"eth\",\n \"address\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/wallet-links/challenges")
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 \"chain\": \"eth\",\n \"address\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\"\n}"
response = http.request(request)
puts response.read_body{
"challenge": {
"link_id": "d52e7b91-4c68-4f89-1b23-5d7e9f0a2c46",
"chain": "eth",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"nonce": "9f2c41d2a887f3e4b219c6d2e8f1a5b7",
"envelope": "CBPay Signature Proof\nDomain: https://api.qbank.cl/platform\nPurpose: wallet_link\nWallet: 0x71C7656EC7ab88b098defB751B7401B5f6d8976F\nAccount: ae8c1f02-3b45-4c67-9d12-8f0e5a6b7c8d\nNonce: 9f2c41d2a887f3e4b219c6d2e8f1a5b7\nIssued: 2026-08-21T14:03:11Z\nExpires: 2026-08-21T14:13:11Z",
"expires_at": "2026-08-21T14:13:11Z"
}
}Autorizaciones
JWT de sesión (de register/login) o llave de API (pk_...).
X-API-Key: <token> se acepta como header alternativo.
Cuerpo
application/json
Respuesta
Desafío creado.
Show child attributes
Show child attributes
Última modificación el 22 de agosto de 2026
⌘I