Note: All delegation methods require an authenticated Otim Client. Ensure you have completed the authentication flow before using these methods.
Get Delegation Status Method
Check whether a wallet address is currently delegated to Otim.Quick Reference
Method Signature
Parameters
Response
Delegate Method
Perform wallet delegation using EIP-7702 signed authorization. This method handles the complete delegation process including submission to the API and polling for blockchain confirmation.What the delegate Method Does
- Submits delegation - Sends the signed EIP-7702 authorization to Otim’s API
- Returns submission result - Provides immediate response about the delegation submission
Method Signature
Parameters
Response
The delegate method returns the submission result:**Required Steps Before Calling **delegate
Before calling the delegate method, you must:
- Get current nonce for the wallet address
- Sign EIP-7702 authorization using the wallet’s private key
- Convert to RLP format using viem’s
toRlp()
function
Checking Delegation Status
After calling the delegate method, you’ll need to check the delegation status separately usinggetDelegationStatus()
to confirm when the delegation is processed on-chain:
success: true
– Delegation submitted successfully, check status for confirmationsuccess: false
– Delegation submission failed, check message for detailstransactionHash
– Optional hash of the delegation transaction