mirage-private-transfer
Installation
SKILL.md
Mirage Solana Wallet and Program-Invocation Workflow
Use this skill whenever the task involves a Mirage wallet, a funding or transfer flow, a Solana signing flow, or invoking an Anchor program on Solana by its IDL. With mirage invoke, this skill can construct and send an instruction or transaction for any Solana program that has an Anchor IDL — no bespoke client code required.
Safety
- Treat wallet funding, transfer, program-invocation, and transaction-signing flows as sensitive actions.
- Before opening a funding link, broadcasting a transfer, or signing an arbitrary Solana transaction, restate the exact wallet, recipient, mint, amount, network, and transaction source in one short confirmation.
- Before running
mirage invoke, restate the program ID, cluster (devnet or mainnet), the instruction(s) picked, and any user-provided arguments or accounts. Prefer devnet for first-time runs on an unfamiliar program. - Prefer
OWS_PASSPHRASEover passing--passphraseon the command line. - Do not convert UI amounts to base units for
mirage transfer; the CLI already accepts UI amounts like0.1.
Workflow
- Create or resolve the wallet the user wants to operate.
- Create a named wallet with
mirage ows wallet create --name <wallet>. - Use
mirage ows wallet listwhen the user needs to inspect available wallets. mirage address,mirage balance,mirage fund, andmirage transferauto-create the defaultagent-treasurywallet if it is missing.
- Create a named wallet with
- Resolve the sender or recipient address if the user gives a wallet name.
- Use
mirage address --wallet <name>. - The default wallet is
agent-treasury.
- Use
- If the user wants to receive funds or top up a wallet, use:
mirage fundmirage fund --wallet <name>- This opens the Mirage funding flow with the wallet address as
rcv. - If the user wants a private or non-private funding flow, keep the request scoped to Mirage's hosted funding flow and follow the requested visibility there.
- If the user wants an SPL transfer, prefer:
mirage transfer --to <recipient> --amount <ui-amount>- Add
--wallet <name>when the sender is notagent-treasury. - Add
--mint <mint>only when the user wants a non-default mint. - Add
--visibility privateor--visibility publicto match the user's request. The default is private. - Use
--clusteror--rpc-urlonly when the user asks or the environment requires it.
- If the user wants to invoke an arbitrary Anchor program:
- Always attempt the program ID on its own first: run
mirage invoke <program-id>(add--cluster devnetor--rpc-url <url>for non-mainnet). Most Anchor programs publish their IDL on-chain, so this is the expected default path. - If Mirage errors with
No Anchor IDL is published on-chain for <program-id>. Provide one with --idl <path>., ask the user for a local IDL JSON file (e.g. from their repo attarget/idl/<name>.jsonor the program's GitHub) and retry withmirage invoke <program-id> --idl <path> .... - During the flow, the CLI fetches the IDL, lets the user pick one or more instructions interactively, auto-derives the signer, well-known sysvars/programs, and any IDL-declared PDAs, and only prompts for args or accounts it cannot resolve. The user then confirms a final transaction summary before it is signed and broadcast.
- Add
--wallet <name>when the fee payer is notagent-treasury. - Add
--yesonly when the user has already confirmed the full transaction plan; otherwise let the CLI show the final summary and prompt for confirmation. - Report the transaction signature and a cluster-appropriate explorer URL after the send.
- Always attempt the program ID on its own first: run
- If the user wants to sign some other Solana transaction instead of using the transfer or invoke flows:
- Use
mirage ows sign tx --wallet <name> --chain solana --tx <unsigned-tx-hex>. - Use
mirage ows sign message --wallet <name> --chain solana --message "<message>"only for message-signing tasks, not transaction signing.
- Use
- After a transfer or invoke:
- Report the transaction signature and sender address.
- If useful, verify status on Solana RPC or check balances with
mirage balance.
Common Commands
mirage ows wallet create --name agent-treasury-1
mirage ows wallet list
mirage fund
mirage fund --wallet agent-treasury
mirage address --wallet recipient-wallet
mirage transfer --to <recipient> --amount 0.1
mirage transfer --wallet sender-wallet --to <recipient> --amount 2.5
mirage transfer --wallet sender-wallet --to <recipient> --amount 2.5 --visibility public
mirage transfer --wallet sender-wallet --to <recipient> --mint <mint> --amount 1
mirage ows sign tx --wallet agent-treasury --chain solana --tx <unsigned-tx-hex>
mirage invoke <program-id> --cluster devnet # default: try on-chain IDL
mirage invoke <program-id> --idl ./target/idl/<name>.json # fallback when no on-chain IDL
mirage invoke <program-id> --wallet sender-wallet --rpc-url https://api.mainnet-beta.solana.com
Notes
mirage fundis the receive or top-up flow, not a send flow.mirage transferdefaults to mainnet USDC and private visibility, but it also supports--visibility public.- If the user only supplies a recipient wallet name, resolve it with
mirage addressbefore sending. - If the user needs a brand-new named wallet, create it explicitly with
mirage ows wallet create --name <wallet>before using it in other commands. - Use
mirage ows sign txfor arbitrary Solana transactions that are outside Mirage's higher-level transfer flow. mirage invokedefaults to the on-chain Anchor IDL PDA. Try the baremirage invoke <program-id>form first; only ask the user for a local IDL when Mirage reports that no on-chain IDL is published.mirage invokeauto-derives signers, well-known sysvars/programs, and PDAs whose seeds are declared in the IDL. Any remaining account is prompted for, so the flow works even with partially-declared IDL metadata.- On older Mirage installs,
BlockhashNotFoundon private transfers can indicate an outdated global CLI. Re-run with the current build if needed.
Related skills