SDK Signature
Loopring SDK supports EOA (EOA hardware wallet) & Loopring Smart Wallet signature
Last updated
Was this helpful?
Loopring SDK supports EOA (EOA hardware wallet) & Loopring Smart Wallet signature
Last updated
Was this helpful?
For Browser extension, Dapp, and hardware wallet we only support EOA
For Loopring smart wallet (App), the provider gateway is WalletConnect
MetaMask (Ledger, Trezor)
WalletConnect (Authereum, Loopring smart wallet )
Coinbase
Understand what is (eth_sign, personal_sign, v1, v3, v4)
❗ when adding
SigSuffix
02|03
(please follow:EIP712
&signTypedData_v4
+02
,personal_sign
+03
)
for
v4
ecdsaSignature, the result signature should +SigSuffix.Suffix02
;for
personal_sign
ecdsaSignature the result signature should +SigSuffix.Suffix03
;
common EOA: we use the v4
signature and web3.eth.personal.ecRecover
validate signature
when v4
signature fails for any step, we will try personal_sign
and web3.eth.personal.ecRecover
validate signature
For Dapp
when loopring DEX is inside Dapp Webview & connect by window.ethereum
, we remove the web3.eth.personal.ecRecover
validate
For Loopring smart wallet we send eth_signTypedData
by WalletConnect & validate ABI.Contracts.ContractWallet.encodeInputs isValidSignature(bytes32,bytes)
signature is same as Loopring smart wallet
But ecRecover is by walletOwner, const {walletOwner} = await LoopringAPI.exchangeAPI.getCounterFactualInfo({ accountId: LOOPRING_EXPORTED_ACCOUNT.accountIdCF, });
For Browser extension ()