from compass_api_sdk import CompassAPI, models
with CompassAPI(
api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:
res = compass_api.gas_sponsorship.gas_sponsorship_prepare(owner="0xCE1A77F0abff993d6d3D04d44b70831c6924fb40", chain=models.Chain.ARBITRUM, eip_712={
"domain": {
"name": "USD Coin",
"version": "2",
"chain_id": 42161,
"verifying_contract": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
},
"types": {
"eip712_domain": [
{
"name": "name",
"type": "string",
},
{
"name": "version",
"type": "string",
},
{
"name": "chainId",
"type": "uint256",
},
{
"name": "verifyingContract",
"type": "address",
},
],
"permit": [
{
"name": "owner",
"type": "address",
},
{
"name": "spender",
"type": "address",
},
{
"name": "value",
"type": "uint256",
},
{
"name": "nonce",
"type": "uint256",
},
{
"name": "deadline",
"type": "uint256",
},
],
},
"primary_type": "Permit",
"message": {
"owner": "0xCE1A77F0abff993d6d3D04d44b70831c6924fb40",
"spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"nonce": "0",
"deadline": "1762269774",
},
}, signature="0x160d2709ae195f591daa33ad6ab1fb18b8762a39d8c4466c4cbe95cf6881fc3d54d469710ef0e7fd64ecff47c1ba5741d7254903bfaebdacea5aa8289f81ba9a1c", sender="0x02122Ac49b0Be2e0eAD957F2D080805A0127Aa9d")
# Handle response
print(res)