Client: Monero
Prepare and sign transfers
Local prepareTransfer / signTransfer after sync; broadcast txHex via Cloud.
Overview
Monero sends do not use Cloud transactions.prepare + signPreparedTransaction (that throws unsupported_capability). Use prepareTransfer / signTransfer after a live sync, then Cloud broadcast with signedPayload: signed.txHex.
prepareTransfer
js
await account.monero.prepareTransfer({ to, amount, … })| Field | Required | Description |
|---|---|---|
| to | Yes | `string` — primary `4…` or subaddress `8…` |
| amount | Yes | `string` — XMR amount (decimal string as accepted by the WASM binder) |
Response: Promise<MoneroPreparedTransfer> (opaque fields for signTransfer).
signTransfer
js
await account.monero.signTransfer(prepared)| Field | Required | Description |
|---|---|---|
| prepared | Yes | `MoneroPreparedTransfer` from `prepareTransfer` |
ts
type MoneroSignedTransfer = {
txHex: string; // broadcast as signedPayload
// txHash / metadata may also be present
};Usage
js
await a.monero.sync({
connection: gray.monero.syncConnection(),
restoreHeight: 3_200_000,
});
const prepared = await a.monero.prepareTransfer({
to: "4…",
amount: "0.1",
});
const signed = await a.monero.signTransfer(prepared);
await gray.transactions.broadcast({
chainId: "monero",
signedPayload: signed.txHex,
});
await a.monero.close();Throws
| Field | Required | Description |
|---|---|---|
| unsupported_capability | No | No live sync in session (the cache alone cannot build transactions); Monero disabled; or mistakenly using `signPreparedTransaction`. |
| invalid_argument | No | Bad address / amount. |
| unauthorized | No | Watch-only / missing keys. |