TRANSACTION LIFECYCLE
Sign locally
Delegate authorization to your signer while preserving the transaction you prepared. FramePay rejects changes to the signed envelope.
API
client.signFrameTransaction({ transaction, signer })Usage
TYPESCRIPTsign.ts
import { privateKeyToFrameSigner } from '@framepay/sdk';import { generatePrivateKey } from 'viem/accounts';// A disposable local-devnet account. Fund its address before sending.const signer = privateKeyToFrameSigner(generatePrivateKey());// Prepare the transaction with sender: signer.address first.const signed = await client.signFrameTransaction({ transaction, signer });Examples use the configured client from Create a client.
Parameters
| Name | Type | Description |
|---|---|---|
transaction | FrameTx | The complete prepared transaction. |
signer | FrameSigner | An adapter implementing address and sign({ profile, transaction }). |
Returns
Promise<FrameTx> — a signed copy of the transaction.
Behavior to know
- The included local adapter uses SECP256K1. PQ authorization and browser-wallet adapters are future integrations.
- Private keys should remain inside your signer. The playground generates its key in this browser tab and does not persist it.