DOCS / SUPPORTED CHAINS
Supported chains
Use the same PairKey client for every destination. Connect an account, program, passkey or OIDC/OAuth authority once, then choose the chain, derivation path and operation.
Current coverage
Public release status: The public service supports EVM EIP-191 messages and Base Sepolia legacy native transfers. SDK 0.2.1 includes EIP-712 typed data, selectable EVM chain IDs, and restricted Bitcoin Taproot PSBT client support, but the public service does not yet advertise those capabilities. Zcash PCZT signing is a separate testnet library alpha without hosted support or a ZIP 2005 recovery guarantee. Check GET /api/v2/config for deployment capabilities before showing these options.
| Chain | signMessage | signTypedData | signTransaction | signAndSend |
|---|---|---|---|---|
| Solana | Yes · Ed25519 application message | — | Yes · legacy and v0 messages | Yes · Solana connection |
| EVM | Yes · EIP-191 | EIP-712 · source preview | Base Sepolia legacy native transfer live · chain selection source preview | Yes · EVM RPC URL for supported transfers |
| NEAR | Yes · Ed25519 application message | — | Yes · Borsh Transaction | Yes · NEAR RPC URL |
| Sui | Yes · Ed25519 application message | — | Yes · BCS TransactionData | Yes · Sui client |
| Bitcoin | Yes · PairKey-tagged BIP-340 digest | — | Testnet single-input Taproot PSBT · source preview | Bitcoin JSON-RPC · source preview |
| Zcash | Yes · raw RedPallas application message | — | Testnet Ironwood PCZT · library alpha only | Not yet |
Read GET /api/v2/config at runtime before offering transaction or typed-data actions. PairKey rejects operations when the deployment does not advertise their adapters. signMessage signs application-supplied message bytes using the destination scheme; EVM applies EIP-191 and Bitcoin applies PairKey's BIP-340 tagged digest. signTypedData is a separate EVM operation. These methods are not replacements for chain transaction signing or wallet login standards. See the scheme and signed-byte map.
What to build with destination signatures
Install @pairkey/sdk, then connect an authority once. The destination key and signature are selected by chain and path; the source used to approve the request can be an account, program, passkey or OIDC/OAuth identity.
npm install @pairkey/sdk
| Destination | Example use case | SDK operation | Important boundary |
|---|---|---|---|
| Solana | Program-governed treasury or app wallet | signTransaction / signAndSend | The derived key must be a required signer in a legacy or v0 transaction. |
| EVM | Policy-approved native payout; selectable chain in source preview | signTransaction / signAndSend | Public service uses Base Sepolia. Legacy EIP-155 native transfer only; no contract calls or EIP-1559. |
| EVM | Governance vote or app authorization using EIP-712 · source preview | signTypedData | Requires a service deployment that advertises typed-data signing; bind the selected key's chain ID and exact verifying domain. |
| NEAR | Account operation under an installed access key | signTransaction / signAndSend | Install the derived public key as a NEAR access key first. |
| Sui | Policy-controlled transfer or programmable transaction | signTransaction / signAndSend | Build BCS TransactionData with the derived address as sender. |
| Bitcoin | Application-specific proof tied to a derived key | signMessage | PairKey-tagged BIP-340 digest; not BIP-322 or a transaction signature. |
| Bitcoin | Single-input testnet BTCFi spend · source preview | signTransaction / signAndSend | Exact Taproot PSBT v0, previous transaction, outputs and fee caps; requires a compatible service release. |
| Zcash | Application-specific off-chain authorization | signMessage | Raw RedPallas signature; no Orchard transaction authorization. |
| Zcash | One-output Ironwood shielded spend on testnet · library alpha | No released SDK operation | v6 PCZT v2 only; one real spend and output, no hosted service or ZIP 2005 recovery guarantee. See the escrow guide. |
For transaction destinations, build the transaction with the chain's normal tooling. PairKey signs the exact canonical payload and can submit it through your supplied RPC or client. Bitcoin's new PSBT path is a source preview. Bitcoin and Zcash signMessage outputs remain application signatures and cannot be broadcast as transactions.
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'
});
// The same calls below also work after connecting a program, passkey or OIDC/OAuth source.
Solana
PairKey derives an Ed25519 key. Message signing is an application message signature, not Sign-In with Solana. A transaction must list the key as a required signer; your application supplies its instructions, fee payer, recent blockhash, lookup tables and any other signatures.
Sign a message
const messageResult = await pairkey.signMessage({
chain: 'solana', path: [0], message: 'Approve order 1842'
});
console.log(messageResult.signatureHex);
Sign a transaction
// transaction is a web3.Transaction or web3.VersionedTransaction.
const signed = await pairkey.signTransaction({
chain: 'solana', path: [0], transaction
});
// signed.signedTransaction contains the serialized transaction with PairKey's signature.
Sign and send
const sent = await pairkey.signAndSend({
chain: 'solana', path: [0], transaction, connection
});
console.log(sent.transactionId, sent.status);
EVM
Source preview: The chainId: 1 and signTypedData examples below use SDK 0.2.1 and require a service deployment that advertises evm_chain_selection and typed_data_signing.evm. They do not run against the current public deployment.
The hosted adapter defaults to Base Sepolia, chain ID 84532. On a deployment advertising evm_chain_selection, pass chainId to key, signMessage, signTypedData and transaction methods to select another EIP-155 chain. The key and approval destination are bound to that chain ID. EIP-712 signing also requires the same domain.chainId. Transaction signing still accepts only a legacy native transfer; EIP-1559, calldata, contract calls, access lists and arbitrary RLP are not accepted. A destination RPC must accept that legacy format for the signed transfer to execute.
Sign a message
const messageResult = await pairkey.signMessage({
chain: 'evm', chainId: 1, path: [0], message: 'Approve order 1842'
});
// EIP-191 personal_sign digest, signed with the derived secp256k1 key.
Sign EIP-712 typed data
const typedData = {
types: {
EIP712Domain: [
{name: 'name', type: 'string'},
{name: 'chainId', type: 'uint256'},
{name: 'verifyingContract', type: 'address'}
],
Vote: [{name: 'proposalId', type: 'uint256'}, {name: 'support', type: 'bool'}]
},
primaryType: 'Vote',
domain: {name: 'Council', chainId: 1, verifyingContract: '0x1111111111111111111111111111111111111111'},
message: {proposalId: '42', support: true}
};
const signedVote = await pairkey.signTypedData({chainId: 1, path: [0], typedData});
console.log(signedVote.evmSignatureHex); // 65-byte signature with v = 27 or 28
signTypedData requires typed_data_signing.evm in GET /api/v2/config. It signs the EIP-712 digest of the complete approved typed-data object and returns a signature; it does not broadcast a transaction. The serialized typed data is limited to 1,000 UTF-8 bytes by the hosted approval size bound. Construct exact domain and message values with the application before calling it.
Sign a transaction
const transfer = {
chain_id: 1,
nonce,
gas_price: gasPrice,
gas_limit: 21000,
to: recipientBytes, // exactly 20 bytes
value: amountWei
};
const signed = await pairkey.signTransaction({
chain: 'evm', chainId: 1, path: [0], transaction: transfer
});
// signed.signedTransaction is the complete signed legacy transaction.
Sign and send
const sent = await pairkey.signAndSend({
chain: 'evm', chainId: 1, path: [0], transaction: transfer,
rpcUrl: 'https://your-ethereum-rpc.example',
confirm: true
});
NEAR
PairKey derives an Ed25519 public key. Message signing is an application message signature, not NEP-413. Install the public key as an access key on the NEAR account before using it as the transaction signer. Your application supplies the signer account, nonce, recent block hash, receiver and actions.
Sign a message
const messageResult = await pairkey.signMessage({
chain: 'near', path: [0], message: 'Approve order 1842'
});
Sign a transaction
// nearTransactionBytes is a canonical Borsh-serialized NEAR Transaction.
const signed = await pairkey.signTransaction({
chain: 'near', path: [0], transaction: nearTransactionBytes
});
// signed.signedTransaction is a Borsh-serialized SignedTransaction.
Sign and send
const sent = await pairkey.signAndSend({
chain: 'near', path: [0], transaction: nearTransactionBytes,
rpcUrl: 'https://your-near-rpc.example'
});
Sui
PairKey derives a Sui Ed25519 address. Build the programmable transaction block with that address as sender and let the Sui client resolve gas and object data before signing.
Sign a message
const messageResult = await pairkey.signMessage({
chain: 'sui', path: [0], message: 'Approve order 1842'
});
// This signs application message bytes, not Sui personal-message format.
Sign a transaction
import {Transaction} from '@mysten/sui/transactions';
const key = await pairkey.key({chain: 'sui', path: [0]});
const tx = new Transaction();
tx.setSender(key.address);
tx.transferObjects([tx.gas], tx.pure.address(recipient));
const transaction = await tx.build({client: suiClient});
const signed = await pairkey.signTransaction({
chain: 'sui', path: [0], transaction
});
// Use signed.signedTransaction and signed.serializedSignature together.
Sign and send
const sent = await pairkey.signAndSend({
chain: 'sui', path: [0], transaction, connection: suiClient
});
console.log(sent.transactionId, sent.status);
Bitcoin
PairKey provides BIP-340 message signatures over its tagged message digest; this is not BIP-322. SDK 0.2.1 includes a restricted testnet Taproot PSBT client adapter, but it requires a compatible service deployment. It validates one key-path input, its complete previous transaction and witness UTXO, one or two exact outputs, fee caps and BIP-341 SIGHASH_DEFAULT. See the BTCFi tutorial.
Sign a message
const messageResult = await pairkey.signMessage({
chain: 'bitcoin', path: [0], message: 'Approve order 1842'
});
console.log(messageResult.signatureHex);
Sign a transaction · source preview
const config = await fetch('/api/v2/config').then(response => response.json());
if (config.transaction_signing.bitcoin.sign) {
const signed = await pairkey.signTransaction({chain: 'bitcoin', path: [0], transaction: spend});
console.log(signed.signedPsbt, signed.signedTransaction);
}
Sign and send · source preview
On a matching deployment, signAndSend({chain:'bitcoin', transaction:spend, rpcUrl}) broadcasts the finalized raw transaction with Bitcoin JSON-RPC sendrawtransaction. A custom broadcast callback also works. The current public deployment reports transaction_signing.bitcoin.sign: false.
Zcash
The released service provides raw RedPallas application-message signatures. A feature-gated library alpha now validates one testnet Ironwood action in a version-6 PCZT v2 and inserts a two-party spend signature. The hosted API and published SDK do not expose it, and account setup, private PCZT delivery, wallet/prover integration, and independent testnet-spend validation remain. The alpha does not enroll ZIP 2005 recovery keys; future quantum recovery is not guaranteed. See the shielded escrow guide.
Sign a message
const messageResult = await pairkey.signMessage({
chain: 'zcash', path: [0], message: 'Approve order 1842'
});
console.log(messageResult.signatureHex);
Sign a transaction · not available
const config = await fetch('/api/v2/config').then(response => response.json());
console.log(config.transaction_signing.zcash.sign); // false
console.log(config.transaction_signing.zcash.reason);
// signTransaction({chain: 'zcash', ...}) rejects before approval or signing.
Sign and send · not available
signAndSend({chain: 'zcash', ...}) uses the same capability check and rejects before contacting a Zcash node.
Handle submission safely
signTransaction never contacts the destination RPC. signAndSend uses the connection, RPC URL or custom broadcast callback supplied by your application. PairKey saves the exact signed output before the first broadcast attempt. If submission returns status: "unknown", recover the original job and check the destination before replacing it.
const recovered = await pairkey.recoverAndSend(sent.jobId, {
chain: 'solana', connection, rebroadcast: true
});
Continue to Signing schemes for native digest and serialization details, or SDK & API reference for result verification and recovery.