send_token
Sends NIGHT or a chosen token from a wallet to shielded or unshielded addresses, with the sponsor paying the fee, for payouts, salaries, or invoice settlements.
Instructions
Send an amount from this wallet to another address, with the sponsor paying the fee: a payout, a salary, an invoice settlement. The address decides what moves. To a shielded address (mn_shield-addr_...) a shielded token goes: the transfer is built and proven here from the wallet's coins (at most maxInputs of them), and the server records the declared type and amount. To an unshielded address (mn_addr_...) NIGHT goes, or the unshielded tokenType given: the transfer is built and signed here from the wallet's unshielded coins, which sync on first use, and the server reads type, amount and recipient from it. One such payment or NIGHT pay-in runs at a time. get_swap_wallet shows what the wallet holds of either kind. Only the fee-unpaid bytes go to the server. The recipient needs nothing but its address. Needs sponsorTransfer in the grant and the type on the sponsor's list; an unshielded address also needs allowUnshieldedOffers on the grant. The tool also waits for the block (about a minute more) and then carries the instance's signed receipt; if that wait runs out, receipt is null and the same call again fetches it. The tool waits until the job settled (about 1 minute) and returns { status, txHash, transactionHash, result }. failed: next says what to do. If the call was cut off or came back pending, run it again with the same arguments: it picks up the job it started and submits nothing new (the answer says deduplicated). With an idempotencyKey that also holds after a restart of this server. A second, separate call with the same arguments needs a new idempotencyKey.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"amount": "<amount>",
"to": "<to>"
},
"name": "send_token"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The recipient's address as its get_attester_identity shows it: shieldedAddress (mn_shield-addr_...) or nightAddress (mn_addr_...) | |
| amount | Yes | Atoms to send; a decimal string is exact | |
| tokenType | No | Raw token type (64 hex), what derive_token_type or mint_token returns; required for a shielded address, default NIGHT for an unshielded one | |
| idempotencyKey | No | Dedupes retries |