Register Wallet
Register a wallet by proving ownership with an Ed25519 signature. Registration is required before connecting wallets to the Exit Intelligence Stream.
No on-chain transaction is needed. Generate the proof locally using your keypair and the SDK’s proveOwnership helper.
curl --request POST \
--url https://api.lasersell.io/v1/wallets/register \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"signature": "<string>",
"message": "lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000",
"label": "My Trading Wallet"
}
'import requests
url = "https://api.lasersell.io/v1/wallets/register"
payload = {
"wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"signature": "<string>",
"message": "lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000",
"label": "My Trading Wallet"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
wallet_pubkey: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
signature: '<string>',
message: 'lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000',
label: 'My Trading Wallet'
})
};
fetch('https://api.lasersell.io/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.lasersell.io/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",
CURLOPT_POSTFIELDS => json_encode([
'wallet_pubkey' => '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
'signature' => '<string>',
'message' => 'lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000',
'label' => 'My Trading Wallet'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.lasersell.io/v1/wallets/register"
payload := strings.NewReader("{\n \"wallet_pubkey\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"signature\": \"<string>\",\n \"message\": \"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000\",\n \"label\": \"My Trading Wallet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.lasersell.io/v1/wallets/register")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"wallet_pubkey\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"signature\": \"<string>\",\n \"message\": \"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000\",\n \"label\": \"My Trading Wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lasersell.io/v1/wallets/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet_pubkey\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"signature\": \"<string>\",\n \"message\": \"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000\",\n \"label\": \"My Trading Wallet\"\n}"
response = http.request(request)
puts response.read_body{
"wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"registered": true
}{
"error": "invalid mint address"
}{
"error": "invalid mint address"
}{
"error": "invalid mint address"
}SDK Usage
Generate Proof
Use the SDK’sproveOwnership helper to generate a WalletProof locally. This is a pure cryptographic operation with no network call.
import { proveOwnership } from "@lasersell/lasersell-sdk";
const proof = proveOwnership(keypair);
// proof = { walletPubkey, signature, message }
from lasersell_sdk.exit_api import prove_ownership
proof = prove_ownership(keypair)
# proof = WalletProof(wallet_pubkey, signature, message)
use lasersell_sdk::exit_api::prove_ownership;
let proof = prove_ownership(&keypair);
// proof = WalletProof { wallet_pubkey, signature, message }
proof := lasersell.ProveOwnership(privateKey)
// proof = WalletProof{WalletPubkey, Signature, Message}
Register
Send the proof to the API to register the wallet.const client = ExitApiClient.withApiKey(apiKey);
await client.registerWallet(proof, "My Wallet");
client = ExitApiClient.with_api_key(api_key)
await client.register_wallet(proof, label="My Wallet")
client.register_wallet(&proof, Some("My Wallet")).await?;
client.RegisterWallet(ctx, proof, lasersell.Ptr("My Wallet"))
Connect with Wallets (one step)
Convenience method that registers wallets and connects to the stream in one call.import { StreamClient, proveOwnership } from "@lasersell/lasersell-sdk";
const proof = proveOwnership(keypair);
const client = new StreamClient(apiKey);
const session = await client.connectWithWallets(
[proof],
{ target_profit_pct: 50, stop_loss_pct: 10 },
120, // deadline_timeout_sec
);
from lasersell_sdk.exit_api import prove_ownership
from lasersell_sdk.stream.client import StreamClient
proof = prove_ownership(keypair)
client = StreamClient(api_key)
session = await client.connect_with_wallets(
[proof],
{"target_profit_pct": 50, "stop_loss_pct": 10},
deadline_timeout_sec=120,
)
let proof = prove_ownership(&keypair);
let client = StreamClient::new(api_key);
let session = client.connect_with_wallets(
&[proof],
strategy,
120,
).await?;
// Go SDK: register separately, then connect
proof := lasersell.ProveOwnership(privateKey)
client.RegisterWallet(ctx, proof, nil)
session, _ := stream.ConnectSession(ctx, streamClient, configure)
Authorizations
Your LaserSell API key. Obtain one from the LaserSell dashboard.
Body
Solana wallet public key to register (base58).
"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
Ed25519 signature of the message, base58-encoded.
Structured message in the format lasersell-register:<pubkey>:<unix_timestamp>.
The timestamp must be within 5 minutes of the server's current time.
"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000"
Optional human-readable label for the wallet.
"My Trading Wallet"
curl --request POST \
--url https://api.lasersell.io/v1/wallets/register \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"signature": "<string>",
"message": "lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000",
"label": "My Trading Wallet"
}
'import requests
url = "https://api.lasersell.io/v1/wallets/register"
payload = {
"wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"signature": "<string>",
"message": "lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000",
"label": "My Trading Wallet"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
wallet_pubkey: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
signature: '<string>',
message: 'lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000',
label: 'My Trading Wallet'
})
};
fetch('https://api.lasersell.io/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.lasersell.io/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",
CURLOPT_POSTFIELDS => json_encode([
'wallet_pubkey' => '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
'signature' => '<string>',
'message' => 'lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000',
'label' => 'My Trading Wallet'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.lasersell.io/v1/wallets/register"
payload := strings.NewReader("{\n \"wallet_pubkey\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"signature\": \"<string>\",\n \"message\": \"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000\",\n \"label\": \"My Trading Wallet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.lasersell.io/v1/wallets/register")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"wallet_pubkey\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"signature\": \"<string>\",\n \"message\": \"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000\",\n \"label\": \"My Trading Wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lasersell.io/v1/wallets/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet_pubkey\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"signature\": \"<string>\",\n \"message\": \"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000\",\n \"label\": \"My Trading Wallet\"\n}"
response = http.request(request)
puts response.read_body{
"wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"registered": true
}{
"error": "invalid mint address"
}{
"error": "invalid mint address"
}{
"error": "invalid mint address"
}
