Web3 Sign

Sign messages, typed data, and transactions on EVM and Solana networks.

Signing requests require approval before execution. Review them under Approval → DApp Transaction in the dashboard. See Web3 signing approvals.

Requests return a transaction_id. Poll the status endpoint until signing completes or fails.


POST/web3/:wallet_id/sign

Request a signature

Sign an EVM or Solana message. See API keys for authentication.

The SDK requires a wallet and an RPC provider for EVM signing. It polls for the signature automatically.

Parameters

  • Name
    wallet_id
    Type
    string
    Description

    Wallet ID in the URL path.

  • Name
    method
    Type
    string
    Description

    eth_sign, eth_signTypedData_v4, or solana_signMessage.

  • Name
    message
    Type
    string
    Description

    Message to sign. Use an empty string for typed data.

  • Name
    chain_id
    Type
    number
    Description

    EVM chain ID. Use 0 for Solana.

  • Name
    typed_data
    Type
    string
    Description

    Required for typed data signing. JSON string containing domain, types, and message.

  • Name
    X-Idempotency-Key
    Type
    string
    Description

    Optional header. Reuse the same key when retrying a request. The SDK currently does not map options.idempotencyKey to this header.

Response

  • Name
    transaction_id
    Type
    string
    Description

    Request ID for checking signing status.

Request

POST
/web3/:wallet_id/sign
import { EtherSigner, Environment } from '@fystack/sdk'
import { JsonRpcProvider } from 'ethers'

const provider = new JsonRpcProvider(process.env.RPC_URL!)
const signer = new EtherSigner(
  {
    apiKey: process.env.API_KEY!,
    apiSecret: process.env.API_SECRET!,
  },
  Environment.Production,
  provider,
)

signer.setWallet('YOUR_WALLET_ID')
const signature = await signer.signMessage('Authorize this session')

GET/web3/:wallet_id/sign/:transaction_id

Get signing status

Get the status and signature for a signing request.

  • Name
    transaction_id
    Type
    string
    Description

    Signing request ID.

  • Name
    status
    Type
    string
    Description

    pending_approval, pending, completed, confirmed, failed, or rejected.

  • Name
    signature
    Type
    string
    Description

    Signature, when available. EVM SDK signers wait for confirmed with a signature.

  • Name
    approvals
    Type
    array
    Description

    Records with user_id and status: pending, approved, or rejected.

  • Name
    created_at
    Type
    string
    Description

    Creation timestamp.

  • Name
    updated_at
    Type
    string
    Description

    Last update timestamp.

If polling times out, check the existing request before submitting another.

Request

GET
/web3/:wallet_id/sign/:transaction_id
import { APIService, Environment } from '@fystack/sdk'

const api = new APIService(
  { apiKey: process.env.API_KEY!, apiSecret: process.env.API_SECRET! },
  Environment.Production,
)

const status = await api.getSignStatus('YOUR_WALLET_ID', 'TRANSACTION_ID')
console.log(status.signature)

POST/web3/transaction/:wallet_id/signRaw

Sign a transaction

Unsafe signing

Raw signing is not recommended. A malicious request can trick you into signing a transaction that steals funds. Only sign payloads you have verified.

Submit a transaction for signing and processing. Returns a transaction_id.

  • EVM: from, to, nonce, gasLimit, data, value, chainId, maxFeePerGas, maxPriorityFeePerGas, and accessList.
  • Solana: data (base64 serialized transaction), from, meta.tx_method (solana_signTransaction), and chainId ("1399811149").

The EVM SDK's signTransaction returns a transaction hash. sendTransaction populates transaction fields and returns a transaction response.

Request

POST
/web3/transaction/:wallet_id/signRaw
import { EtherSigner, Environment } from '@fystack/sdk'
import { JsonRpcProvider, parseEther } from 'ethers'

const provider = new JsonRpcProvider(process.env.RPC_URL!)
const signer = new EtherSigner(
  {
    apiKey: process.env.API_KEY!,
    apiSecret: process.env.API_SECRET!,
  },
  Environment.Production,
  provider,
)

signer.setWallet('YOUR_WALLET_ID')
const tx = await signer.sendTransaction({
  to: '0x7c2BbE2e02af09F1cf9aFd4A79EC201DC841675a',
  value: parseEther('0.01'),
})

console.log(tx.hash)

GET/web3/transaction/:wallet_id/:transaction_id

Get transaction status

Returns transaction_id, status, method, approvals, created_at, and updated_at, with hash and failed_reason when available.

SDK transaction signers wait for confirmed or completed with a hash, and stop on failed or rejected.

Request

GET
/web3/transaction/:wallet_id/:transaction_id
import { APIService, Environment } from '@fystack/sdk'

const api = new APIService(
  { apiKey: process.env.API_KEY!, apiSecret: process.env.API_SECRET! },
  Environment.Production,
)

const status = await api.getTransactionStatus('YOUR_WALLET_ID', 'TRANSACTION_ID')
console.log(status.hash)