DOCS / QUICKSTART: ACCOUNT
Your wallet. Your programmable keys.
Your wallet controls the keys. Approve an exact message off-chain, and two independent signers return one signature.
When to use an account
Choose this source when users already operate a Solana wallet and can approve an exact request with signMessage. The wallet public key is the stable source identity. Changing wallets selects a different PairKey key family; changing policy does not.
Use a named namespace for each business or security boundary and numeric paths for related subaccounts. Plan these identifiers with Keys & namespaces before funding derived addresses.
Try it with your wallet
Connect Phantom or Solflare. This uses your connected account as the authority. No registration transaction, SOL balance or destination-chain funds are needed for ordinary message approvals.
Connect your wallet to begin.
Derived public key
Your key will appear here.
Signature
Your signature will appear here.
Use it in your application
Install @pairkey/sdk and @solana/web3.js; the import below uses the released package. Your application uses the hosted signers; it never sends a wallet private key.
import * as web3 from '@solana/web3.js';
import {PairKeyClient} from '@pairkey/sdk';
const pairkey = new PairKeyClient({web3, storage: localStorage});
await pairkey.connect({
source: 'account', wallet: window.phantom.solana,
namespace: 'org/acme/treasury'
});
const key = await pairkey.key({chain: 'solana', path: [0]});
const signed = await pairkey.signMessage({
chain: 'solana', path: [0], message: 'Hello from my application.'
});
console.log(key.public_key_hex, signed.signatureHex, signed.jobId);
// A complete Solana Transaction or VersionedTransaction can use the same key.
const sent = await pairkey.signAndSend({
chain: 'solana', path: [0], transaction, connection
});
if (sent.status === 'unknown') {
await pairkey.recoverAndSend(sent.jobId, {
chain: 'solana', connection, rebroadcast: true
});
}
What your wallet authorizes
Your wallet signs a domain-separated approval digest binding the identity, namespace, destination, derivation path, exact message commitment, request ID, policy revision and expiry. The browser recomputes these fields before asking for a signature. Both signers verify your authorization independently. Knowing your address or loading a public key does not authorize signing.
Account approval uses signMessage. It sends no Solana transaction and creates no per-message rent account. Solana, EVM, Zcash, NEAR, Bitcoin and Sui message signing use the same approval flow. Sessions are deferred in this API.
Set optional account rules
With no saved policy, every request still needs your wallet signature. To add persistent restrictions, write one compact policy account on Solana. The wallet authorizes edits, which reuse that account and increase its revision. Both signers read it on each signing request.
The released PairKeyClient handles signing and recovery but does not expose standard-rule edits. For an account policy edit, integrate the low-level policy flow: read current rules, prepare the next revision, check the returned update and instructions, then send the owner-signed Solana transaction. The rules, preparePolicy and setPolicy methods belong to that repository implementation; they are not methods on the packaged PairKeyClient.
Policy creation needs transaction fees and a rent deposit; later same-size edits reuse that deposit. Ordinary off-chain signing adds neither approval rent nor a Solana transaction fee. The prefix applies to the canonical signing payload; use an empty prefix for unrestricted message contents. Read Policy & rules for identity-specific updates and custom program logic.
Verify and recover
The Verify button asks the service to verify the displayed message and signature. The browser also checks exact approval context and Ed25519 signatures locally. Use the offline Rust verifier for independent verification of all signature suites, key certificates and both signer receipts; service verification alone does not provide that independence. Save the returned result and the SDK's public recovery record for that verifier, and check signer identities against a trusted deployment configuration.
The client saves the public prepared request, key, deployment and deterministic job ID before submission. Keep that recovery record; it contains no wallet signature, JWT or passkey assertion, but it does contain your message. “Recover last job” only retrieves the original attempt. It never asks for another approval, submits another job or consumes another allowance. If the original submission never reached the service, recovery reports an unknown job. An uncertain outcome is not proof that no signature exists.
How addresses are scoped
The authority and namespace label scope the namespace. Labels such as org/acme/treasury or user/alice/trading are case-sensitive NFC strings mapped to stable 32-byte IDs. Destination, signature scheme and numeric path select keys inside it. Keep the deployment and namespace metadata to recover the same keys.
The UI displays a Solana public key, a NEAR ed25519: public-key identifier or an EVM or Sui address where applicable. Zcash and Bitcoin display signing public keys. See supported chain operations for message, transaction and delivery examples.