Developer Guides
Core Methods
Four primitives cover almost every integration: connect, pay, sign, and error handling.
connect()
Requests the user's public address. Read-only — does not move funds.
const { address } = await vaulty.connect();pay()
const { signature, status } = await vaulty.pay({
amount: 12.5,
token: "USDC",
ref: "order_8721",
memo: "Order #8721"
});- status: "paid" | "cancelled" | "failed"
- signature: on-chain transaction signature (verifiable on Solscan)
signMessage()
const { signature } = await vaulty.signMessage("Login to Acme #" + nonce);Use for passwordless sign-in, terms acceptance, or proof-of-ownership. Never moves funds.
Error handling
import { VaultyError } from "@vaulty/wallet";
try {
await vaulty.pay({ amount: 5, token: "USDC" });
} catch (e) {
if (e instanceof VaultyError) {
// e.code: "user_rejected" | "insufficient_funds" | "network" | "timeout"
}
}
