ChangePubKey
Modifies the public key hash of the Layer3 account.
type
String
yes
The value is "ChangePubKey"
chainId
yes
ID defined by zkLink, for example, when the user performs ChangePubKey on ETH, the front-end needs to set this value to the Ethereum ID defined by zkLink on Layer3
subAccountId
yes
Target subaccount ID of ChangePubKey, the fee will be deducted from this subaccount
signature
yes
the public key hash corresponding to the signature must be aligned with the newPkHash
ts
u32
yes
Timestamp of the API call, used as front-end request id to generate transaction hash
where the ChangePubKeyAuthData is an Enum which contains 3 types: EthECDSA
, EthCreate2
, Onchain
type
String
yes
The value is "EthECDSA"
ethSignature
String
yes
eth signature with 0x
prefix
Refer to EIP712 to create the signature content in this way, where the domain is:
Note: Different chain has different
chainId
andverifyingContract
, you can get the chain information from rpc interfacegetSupportChains
.
For Example:
sign
For more detail please refer to Golang example in SDK
Last updated