useShieldedWrite
Send encrypted write transactions to shielded contracts
Hook for sending shielded write transactions. Encrypts calldata before submission so transaction data is not visible on-chain.
import { useShieldedWriteContract } from "seismic-react";Config
address
Hex
Yes
Contract address
abi
Abi
Yes
Contract ABI
functionName
string
Yes
Name of the nonpayable/payable function
args
array
No
Arguments to pass to the function
gas
bigint
No
Gas limit override
gasPrice
bigint
No
Gas price override
gasPayment
No
Auto (default), Native, or a registered Token; forwarded to signing and estimation
Return Type
writeContract
() => Promise<Hex>
Function to execute the shielded write
write
() => Promise<Hex>
Alias for writeContract
isLoading
boolean
Whether a write is in progress
error
Error | null
Error from the most recent write
hash
`0x${string}` | null
Transaction hash from last successful write
Usage
Shielded token transfer
Transaction hash tracking
The hash field updates after each successful write. Use it to link to a block explorer or track confirmation.
Loading and error state handling
With gas override
Pass gas or gasPrice to override the automatic estimates:
See Also
useSignedReadContract -- Perform signed, encrypted read calls
useShieldedContract -- Contract instance with both read and write methods
useShieldedWallet -- Access the underlying wallet client
ShieldedWalletProvider -- Context provider required by this hook
Hooks Overview -- Summary of all hooks
Last updated

