Register Wallet
curl --request POST \
--url https://api.example.com/v1/wallets/registerimport requests
url = "https://api.example.com/v1/wallets/register"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/wallets/register', 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.example.com/v1/wallets/register",
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://api.example.com/v1/wallets/register"
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://api.example.com/v1/wallets/register")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallets/register")
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_bodyWallets
Register Wallet
POST /v1/wallets/register — Register a wallet for your organization (idempotent)
POST
/
v1
/
wallets
/
register
Register Wallet
curl --request POST \
--url https://api.example.com/v1/wallets/registerimport requests
url = "https://api.example.com/v1/wallets/register"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/wallets/register', 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.example.com/v1/wallets/register",
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://api.example.com/v1/wallets/register"
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://api.example.com/v1/wallets/register")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallets/register")
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_bodyEndpoint:
POST https://api.rebelfi.io/v1/wallets/registerproof to show that you hold the address’s key: the wallet is registered CONTROLLED. Get the proof from
Request Ownership Challenge: sign the challenge message with the wallet and send the
challengeId and signature.
Deprecation window. A register without
proof currently creates a LEGACY wallet (when no other organization
owns the address), and a legacy wallet can Supply, Unwind and Transfer Out as before. This window will end at a date
to be announced. After it, a register without proof creates a WATCH_ONLY wallet: its balance is tracked, but
operations fail with WALLET_NOT_VERIFIED until you verify it. Start sending
proof now.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | Wallet address on the blockchain |
blockchain | string | Yes | Blockchain network: solana, polygon, ethereum, or base |
userId | string | No | Your external user or account ID (for multi-wallet management). Not allowed when your organization opens client accounts: send accountId instead |
accountId | number | No | The client account the wallet belongs to. Links the wallet and sets its userId to the account’s reference. Only when your organization opens client accounts |
orgMetadata | object | No | Arbitrary metadata to store with the wallet |
proof | object | No | Proof of control: { challengeId, signature } |
proof.challengeId | number | Yes, with proof | From Request Ownership Challenge |
proof.signature | string | Yes, with proof | The wallet’s signature of the challenge message. Solana: base58. EVM: 0x hex |
Example Request
curl -X POST "https://api.rebelfi.io/v1/wallets/register" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"walletAddress": "So11...abc",
"blockchain": "solana",
"userId": "user-123",
"orgMetadata": { "plan": "premium" }
}'
const wallet = await client.wallets.register({
walletAddress: 'So11...abc',
blockchain: 'solana',
userId: 'user-123',
orgMetadata: { plan: 'premium' }
});
Example Request with Proof
SDK
import nacl from 'tweetnacl';
import bs58 from 'bs58';
const walletAddress = keypair.publicKey.toBase58();
const { challengeId, message } = await client.wallets.challenge({ walletAddress, blockchain: 'solana' });
const signature = bs58.encode(nacl.sign.detached(new TextEncoder().encode(message), keypair.secretKey));
const wallet = await client.wallets.register({
walletAddress,
blockchain: 'solana',
proof: { challengeId, signature }
});
// wallet.control.status === 'CONTROLLED'
Example Request Linking a Client Account
For an organization that opens client accounts: name the account, and leave outuserId.
SDK
const wallet = await client.wallets.register({
walletAddress,
blockchain: 'solana',
accountId: 17,
proof: { challengeId, signature }
});
// wallet.accountId === 17; wallet.userId is the account's reference
accountId links it, as long as it isn’t linked to another account.
Example Response
{
"walletId": 42,
"walletAddress": "So11...abc",
"blockchain": "solana",
"userId": "user-123",
"orgMetadata": { "plan": "premium" },
"createdAt": "2024-01-15T10:30:00.000Z",
"control": {
"status": "CONTROLLED",
"method": "SIGNED_CHALLENGE",
"provenAt": "2024-01-15T10:30:00.000Z"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
walletId | number | Wallet identifier (use for subsequent API calls) |
walletAddress | string | Wallet address on the blockchain |
blockchain | string | Blockchain network |
userId | string? | External user ID. For a wallet linked to a client account, the account’s reference |
accountId | number? | The client account the wallet is linked to |
orgMetadata | object? | Organization-specific metadata |
createdAt | string | Creation timestamp (ISO 8601) |
control.status | string | CONTROLLED (control proven), LEGACY (registered without proof; operates normally during the deprecation window), or WATCH_ONLY (balance only; operations fail with WALLET_NOT_VERIFIED) |
control.method | string? | How control was established, for example SIGNED_CHALLENGE or LEGACY_SDK. null when WATCH_ONLY |
control.provenAt | string? | When control was proven (ISO 8601). Absent unless proven |
userId, accountId, orgMetadata) are left out of the response. They are never
null.
Outcomes
| Request | Address | Result |
|---|---|---|
With proof | No owner, or already yours | CONTROLLED |
With proof | Held by another organization without proof | WATCH_ONLY; RebelFi reviews the dispute |
With proof | Another organization has proven control | 409 ADDRESS_NOT_CLAIMABLE; nothing is registered |
Without proof, during the window | No owner | LEGACY |
Without proof | Owned by another organization, or after the window | WATCH_ONLY |
proof is verified, the same as
Verify Wallet.
Errors
| Code | HTTP | Description |
|---|---|---|
CHALLENGE_EXPIRED | 410 | The challenge expired; request a new one |
CHALLENGE_USED | 409 | The challenge was already used |
CHALLENGE_MISMATCH | 400 | Unknown challenge, or issued for another address or chain |
INVALID_SIGNATURE | 400 | Not the address’s signature of the challenge message; the challenge is used up |
ADDRESS_NOT_CLAIMABLE | 409 | Another organization has proven control of the address |
USER_ID_NOT_ALLOWED | 400 | Your organization opens client accounts, so userId is set from the account. Send accountId instead |
CLIENT_ACCOUNTS_NOT_ENABLED | 403 | accountId sent, but your organization doesn’t open client accounts |
ACCOUNT_NOT_FOUND | 404 | accountId is not one of your client accounts |
WALLET_LINKED_TO_ANOTHER_ACCOUNT | 409 | The wallet is already linked to another client account. details: { walletId, accountId, linkedAccountId } |
VALIDATION_FAILED | 400 | Invalid request body or address |
Registration is idempotent. If you register the same wallet address again, it returns the existing wallet without error.