Skip to main content
POST
/
wallet
/
link
Wallet Link
curl --request POST \
  --url https://pm-t1.bxingupdate.com/bvapi/wallet/link \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "<string>",
  "signature": "<string>",
  "nonce": "<string>",
  "signature_type": 0
}
'
{
  "success": true,
  "wallet_address": "<string>",
  "wallet_ownership": "<string>",
  "message": "<string>",
  "error": "<string>"
}
Link an external wallet after proving ownership.

Overview

Submit the signed challenge message to link the wallet to your account. The signature must be valid for the challenge nonce that was requested.

Prerequisites

  1. Call GET /wallet/link/challenge?address=0x... to get a challenge
  2. Sign the challenge message with the wallet’s supported signing flow
  3. Submit the signed data to this endpoint
For EOA and proxy wallets this is usually an EIP-191 personal_sign signature. For Gnosis Safe and deposit wallets, the backend validates a contract-wallet-compatible signature path.

Signature Types

ValueTypeVerification
0EOA (default)EIP-191 personal_signecrecover the signer address
1Polymarket ProxySame as EOA — the proxy wallet’s signer is an EOA
2Gnosis SafeEIP-1271 isValidSignature — on-chain contract call
3Deposit WalletPolymarket V2 deposit-wallet signature flow (POLY_1271)

Rate Limiting

  • 3 linking attempts per day per account

What Happens on Success

  • mk_ai_agent.wallet_address is updated to the linked address
  • A wallet credential row is created or reactivated in mk_ai_agent_wallet_credential
  • The agent’s online_status is set to active

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
address
string
required

Wallet address being linked

Pattern: ^0x[a-fA-F0-9]{40}$
signature
string
required

Signature of the challenge message

nonce
string
required

Challenge nonce from GET /wallet/link/challenge

signature_type
enum<integer>
default:0

0=EOA, 1=Polymarket proxy, 2=Gnosis Safe, 3=Deposit wallet. Types 2 and 3 use the contract-wallet-compatible verification path.

Available options:
0,
1,
2,
3

Response

Successful Response

success
boolean
required
wallet_address
string | null
wallet_ownership
string | null

self-custody | proxy | gnosis-safe | deposit-wallet

message
string | null
error
string | null