TRANSACTION LIFECYCLE

Sign locally

Delegate authorization to your signer while preserving the transaction you prepared. FramePay rejects changes to the signed envelope.

APIclient.signFrameTransaction({ transaction, signer })

Usage

TYPESCRIPT
sign.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

NameTypeDescription
transactionFrameTxThe complete prepared transaction.
signerFrameSignerAn 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.
NEXT UPSubmit to the sidecar