Trust Engine link-wallet

Link a wallet to a user ID
The link-wallet command allows you to create a permanent association between a user ID and a wallet address in the Trust Engine system. This relationship is stored on the Solana blockchain and can be used to manage user identities across your application. To use it, run the following command from your terminal
trust-engine-cli link-wallet [options]

Options

OptionDescription
-u, --userID <id>User ID (alphanumeric string)
-w, --walletAddress <address>Wallet address (Solana public key)
--jsonOutput the result as JSON

Example

Link a wallet address to a user ID:
trust-engine-cli link-wallet \
  --userID "user_12345" \
  --walletAddress "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
After running the command, you’ll see linking confirmation:
✅ Success! The wallet address has been linked to the user ID.

Details:
  - User ID: user_12345
  - Wallet Address: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
  - Transaction Signature: 5J7X2vK8mWzNfEtY2jDw5mVpL1WzNfEtYKJH2mNqR3pB
  - Explorer URL: https://explorer.solana.com/address/5J7X2vK8mWzNfEtY2jDw5mVpL1WzNfEtYKJH2mNqR3pB?cluster=devnet
For automation purposes, use the JSON output:
trust-engine-cli link-wallet --userID "user_12345" --walletAddress "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM" --json
This will return:
{
  "message": "Success! The wallet address has been linked to the user ID.",
  "details": {
    "userID": "user_12345",
    "walletAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
    "status": "submitted",
    "transactionId": "5J7X2vK8mWzNfEtY2jDw5mVpL1WzNfEtYKJH2mNqR3pB",
    "explorerUrl": "https://explorer.solana.com/address/5J7X2vK8mWzNfEtY2jDw5mVpL1WzNfEtYKJH2mNqR3pB?cluster=devnet"
  }
}