curl -X POST https://api.moonkey.fun/v1/wallets/wallet_36kLvUkIIvyQPbdVr7Ackvh726L/rpc \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"method": "eth_sign7702Authorization",
"params": {
"contractAddress": "0x1234567890abcdef1234567890abcdef12345678",
"chainId": "1",
"nonce": "0"
}
}'
{
"method": "eth_sign7702Authorization",
"data": {
"authorization": {
"chainId": "1",
"contractAddress": "0x1234567890abcdef1234567890abcdef12345678",
"nonce": "0",
"v": "1",
"r": "0x2183aed038b571552e7692ebcc2b27578354c95dc6ea7e2ed1cb0fc46e5f37f9",
"s": "0x2b11a93b69e8abfd3db613ed617520ea6826806c856199bdd818563d4c01d202",
"yParity": 1
}
}
}
Ethereum Wallets
Ethereum Sign EIP-7702 Authorization
Sign an EIP-7702 authorization using a managed wallet. An EIP-7702 authorization allows an externally owned account (EOA) to authorize a delegation / contract address without signing or submitting a transaction.
POST
/
v1
/
wallets
/
{wallet_id}
/
rpc
curl -X POST https://api.moonkey.fun/v1/wallets/wallet_36kLvUkIIvyQPbdVr7Ackvh726L/rpc \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"method": "eth_sign7702Authorization",
"params": {
"contractAddress": "0x1234567890abcdef1234567890abcdef12345678",
"chainId": "1",
"nonce": "0"
}
}'
{
"method": "eth_sign7702Authorization",
"data": {
"authorization": {
"chainId": "1",
"contractAddress": "0x1234567890abcdef1234567890abcdef12345678",
"nonce": "0",
"v": "1",
"r": "0x2183aed038b571552e7692ebcc2b27578354c95dc6ea7e2ed1cb0fc46e5f37f9",
"s": "0x2b11a93b69e8abfd3db613ed617520ea6826806c856199bdd818563d4c01d202",
"yParity": 1
}
}
}
The private key never leaves the vault and is never exposed to the client.
Authorizations
string
required
Auth Platform API includes all the Auth related features. All Users, Phone Numbers, Emails, and OTPs are associated with an App as the container.Endpoints only accept App's Secret API keys other than certain endpoints that are used client side or via SDK that accept the
public_token.Authentication using App Api Key
Header:Authorization: Bearer {api_key}Path Parameters
string
required
Unique ID of the wallet used to sign the authorization.
Request Body
The request uses an Ethereum JSON-RPC–compatible payload.string
required
Must be
eth_sign7702Authorization.object
required
All fields are signed exactly as provided after normalization. Changing any value invalidates the signature.
Response
string
RPC method that was executed (
eth_sign7702Authorization).object
Signed authorization payload.
Show data
Show data
object
The signed authorization object.
Show authorization
Show authorization
string
Chain ID the authorization is valid for, returned as a string representation of the number.
string
Authorized contract address.
string
Authorization nonce, returned as a string representation of the number.
string
ECDSA recovery identifier.
string
ECDSA signature
r value (hex).string
ECDSA signature
s value (hex).number
Signature y-parity (
0 or 1).Using the Signed Authorization
The returned signature can be included in an EIP-7702 transaction as part of anauthorizationList, sent to a relay or bundler, or stored and replayed until the nonce is consumed.
To submit on-chain, recombine the signature parts into a standard Ethereum signature:
signature = r || s || yParity
Notes
- This method does not broadcast a transaction.
- The authorization is off-chain until included in a transaction.
- Private keys are never exposed.
- The same authorization can be reused until its nonce is consumed.
- Input values for
chainIdandnoncemay be provided as hex strings or decimal strings/numbers. - Response values for
chainIdandnonceare always returned as strings. - This endpoint signs EIP-712 typed data under the EIP-7702 domain.
curl -X POST https://api.moonkey.fun/v1/wallets/wallet_36kLvUkIIvyQPbdVr7Ackvh726L/rpc \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"method": "eth_sign7702Authorization",
"params": {
"contractAddress": "0x1234567890abcdef1234567890abcdef12345678",
"chainId": "1",
"nonce": "0"
}
}'
{
"method": "eth_sign7702Authorization",
"data": {
"authorization": {
"chainId": "1",
"contractAddress": "0x1234567890abcdef1234567890abcdef12345678",
"nonce": "0",
"v": "1",
"r": "0x2183aed038b571552e7692ebcc2b27578354c95dc6ea7e2ed1cb0fc46e5f37f9",
"s": "0x2b11a93b69e8abfd3db613ed617520ea6826806c856199bdd818563d4c01d202",
"yParity": 1
}
}
}