Skip to main content

Which service does what?

RPC sequences depend on your wallet and transport; viem handles these calls.

Contract mapping

Deposit targets the cToken. For raw reads, declare required functions with viem parseAbi; the SDK does not export ABIs.

Minimal raw read

Raw JSON-RPC health example:
Raw writes require amount validation, wrapper/allowance checks, confirmation handling, and Lightning encryption/attestations. The core transaction methods handle these steps.

Covalidator endpoints

Discovery and transport

Lightning discovers covalidators for the selected network. RPC URLs come from publicClient or incoRpcUrls; initialization is lazy. KMS requests use Lightning’s quorum/retry policy, independent of indexer timeouts.

Readiness probe

Signed request structure

Lightning builds protobuf requests. AttestedDecrypt: userAddress, handlesWithProofs, eip712Signature, reencryptPubKey. AttestedCompute: userAddress, op, lhsHandle, rhsPlaintext (hex), eip712Signature, reencryptPubKey, aclProof. Use Lightning to encode proofs, signatures, session scope, and reencryption keys and verify the quorum. These field lists are not unsigned JSON templates; possessing a handle does not authorize decryption. Use decryptHandles() and withdraw() through the SDK. There are no top-level encrypt() or attestedCompute() methods.