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.
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, orsolana_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
0for Solana.
- Name
- typed_data
- Type
- string
- Description
Required for typed data signing. JSON string containing
domain,types, andmessage.
- Name
- X-Idempotency-Key
- Type
- string
- Description
Optional header. Reuse the same key when retrying a request. The SDK currently does not map
options.idempotencyKeyto this header.
Response
- Name
- transaction_id
- Type
- string
- Description
Request ID for checking signing status.
Request
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 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, orrejected.
- Name
- signature
- Type
- string
- Description
Signature, when available. EVM SDK signers wait for
confirmedwith a signature.
- Name
- approvals
- Type
- array
- Description
Records with
user_idandstatus:pending,approved, orrejected.
- 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
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)
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, andaccessList. - Solana:
data(base64 serialized transaction),from,meta.tx_method(solana_signTransaction), andchainId("1399811149").
The EVM SDK's signTransaction returns a transaction hash. sendTransaction populates transaction fields and returns a transaction response.
Request
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 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
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)