> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lasersell.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.


## SDK Usage

### Generate Proof

Use the SDK's `proveOwnership` helper to generate a `WalletProof` locally. This is a pure cryptographic operation with no network call.

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { proveOwnership } from "@lasersell/lasersell-sdk";

  const proof = proveOwnership(keypair);
  // proof = { walletPubkey, signature, message }
  ```

  ```python Python theme={null}
  from lasersell_sdk.exit_api import prove_ownership

  proof = prove_ownership(keypair)
  # proof = WalletProof(wallet_pubkey, signature, message)
  ```

  ```rust Rust theme={null}
  use lasersell_sdk::exit_api::prove_ownership;

  let proof = prove_ownership(&keypair);
  // proof = WalletProof { wallet_pubkey, signature, message }
  ```

  ```go Go theme={null}
  proof := lasersell.ProveOwnership(privateKey)
  // proof = WalletProof{WalletPubkey, Signature, Message}
  ```
</CodeGroup>

### Register

Send the proof to the API to register the wallet.

<CodeGroup>
  ```typescript TypeScript theme={null}
  const client = ExitApiClient.withApiKey(apiKey);
  await client.registerWallet(proof, "My Wallet");
  ```

  ```python Python theme={null}
  client = ExitApiClient.with_api_key(api_key)
  await client.register_wallet(proof, label="My Wallet")
  ```

  ```rust Rust theme={null}
  client.register_wallet(&proof, Some("My Wallet")).await?;
  ```

  ```go Go theme={null}
  client.RegisterWallet(ctx, proof, lasersell.Ptr("My Wallet"))
  ```
</CodeGroup>

### Connect with Wallets (one step)

Convenience method that registers wallets and connects to the stream in one call.

<CodeGroup>
  ```typescript TypeScript theme={null}
  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
  );
  ```

  ```python Python theme={null}
  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,
  )
  ```

  ```rust Rust theme={null}
  let proof = prove_ownership(&keypair);
  let client = StreamClient::new(api_key);
  let session = client.connect_with_wallets(
      &[proof],
      strategy,
      120,
  ).await?;
  ```

  ```go Go theme={null}
  // Go SDK: register separately, then connect
  proof := lasersell.ProveOwnership(privateKey)
  client.RegisterWallet(ctx, proof, nil)
  session, _ := stream.ConnectSession(ctx, streamClient, configure)
  ```
</CodeGroup>


## OpenAPI

````yaml POST /v1/wallets/register
openapi: 3.1.0
info:
  title: LaserSell API
  version: 1.0.0
  description: >
    The LaserSell API builds unsigned Solana transactions for buying and selling
    tokens across supported DEXs.

    All transactions are non-custodial: the API returns unsigned
    `VersionedTransaction` payloads that you sign locally with your own keypair.


    Supported markets: Pump.fun, PumpSwap, Raydium (CPMM, Launchpad), Meteora
    (DBC, DAMM v2).
servers:
  - url: https://api.lasersell.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Trading
    description: Build unsigned buy and sell transactions.
  - name: Account
    description: Account details and trade history.
  - name: Wallets
    description: Wallet registration for the Exit Intelligence Stream.
paths:
  /v1/wallets/register:
    post:
      tags:
        - Wallets
      summary: Register Wallet
      description: >
        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.
      operationId: registerWallet
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterWalletRequest'
      responses:
        '200':
          description: Wallet registered successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterWalletResponse'
        '400':
          description: >-
            Invalid pubkey format, malformed message, or expired timestamp (>5
            min).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized. Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Signature verification failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RegisterWalletRequest:
      type: object
      required:
        - wallet_pubkey
        - signature
        - message
      properties:
        wallet_pubkey:
          type: string
          description: Solana wallet public key to register (base58).
          example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
        signature:
          type: string
          description: Ed25519 signature of the message, base58-encoded.
        message:
          type: string
          description: >
            Structured message in the format
            `lasersell-register:<pubkey>:<unix_timestamp>`.

            The timestamp must be within 5 minutes of the server's current time.
          example: >-
            lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000
        label:
          type: string
          description: Optional human-readable label for the wallet.
          example: My Trading Wallet
    RegisterWalletResponse:
      type: object
      required:
        - wallet_pubkey
        - registered
      properties:
        wallet_pubkey:
          type: string
          description: The registered wallet public key.
          example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
        registered:
          type: boolean
          description: Whether the wallet was successfully registered.
          example: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: invalid mint address
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your LaserSell API key. Obtain one from the [LaserSell
        dashboard](https://www.lasersell.io).

````