send
Send an encrypted message to a contact, address, or group.
can send --to <RECIPIENT> --message <TEXT> [OPTIONS]
can send --group <GROUP_NAME> --message <TEXT> [OPTIONS]
Options
| Flag | Description |
|---|---|
--to <NAME_OR_ADDRESS> | Recipient: contact name or Algorand address |
--group <GROUP_NAME> | Send to all members of a group channel |
--message <TEXT> | Message text to send |
--network | Network preset (default: localnet) |
--password | Keystore password |
Examples
# Send to a named contact
can send --to alice --message "Hello!"
# Send to a raw address
can send --to ALGO_ADDRESS... --message "Hello!"
# Broadcast to a group
can send --group team --message "Meeting in 5 minutes"
How it works
- Resolves the recipient (contact name -> address, or validates raw address)
- Encrypts the message using the PSK shared with that contact
- Builds an Algorand transaction with the ciphertext in the note field
- Signs and submits the transaction
- Displays the transaction ID
For group sends, the message is encrypted and sent individually to each group member.