Import
import type { WalletType, SignRawRequest, SignMessageRequest, SignTransactionRequest, SignTypedDataRequest, SignAuthorizationRequest } from "@getpara/rest-sdk";
Raw messages and EVM messages
interface SignRawRequest { data: string; encoding?: 'hex'; walletType?: WalletType; }
interface SignRawResponse { signature: string; }
interface SignMessageRequest { message: string; }
interface SignMessageResponse { signature: string; }
Transactions and typed data
interface EvmSignTransactionRequest {
to: string; chainId: string | number; type: 0 | 2;
value?: string; data?: string; nonce?: number; gasLimit?: string;
maxFeePerGas?: string; maxPriorityFeePerGas?: string; gasPrice?: string;
}
interface SignTransactionRequest {
transaction: EvmSignTransactionRequest | string;
broadcast?: boolean; network?: 'SOLANA' | 'SOLANA_DEVNET'; networkPassphrase?: string;
}
interface SignTransactionResponse { signedTransaction: string; txHash?: string; transactionId?: string; }
interface TypedDataPayload {
domain: Record<string, unknown>;
types: Record<string, Array<{ name: string; type: string }>>;
primaryType: string;
message: Record<string, unknown>;
}
interface SignTypedDataRequest { typedData: TypedDataPayload; }
interface SignTypedDataResponse { signature: string; }
EIP-7702 authorization
type SignAuthorizationPayload =
({ contractAddress: string; address?: string } | { address: string; contractAddress?: string }) &
{ chainId: string | number; nonce: number };
interface SignAuthorizationRequest { authorization: SignAuthorizationPayload; }
interface SignAuthorizationResponse {
address: string; chainId: number; nonce: number; r: string; s: string; yParity: 0 | 1; signature: string;
}