Skip to content

pimlico_grantMagicSpendAllowance

This method sends a Allowance message along with a signature to Pimlico. The Allowance message contains the details of the stake, such as the asset, amount, fee, chain id, etc. Once the allowance is granted, user can request withdrawals on any chain they need.

Request

{
    "jsonrpc": "2.0",
    "method": "pimlico_grantMagicSpendAllowance",
    "params": [
        {
            "request": {
                "account": "0x77d1f68C3C924cFD4732e64E93AEBEA836797485",
                "allowances": [
                    {
                        "chainId": "0xaa36a7",
                        "asset": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                        "amount": "0x7b"
                    }
                ],
                "validAfter": "0x672a7f52",
                "validUntil": "0x672e9010",
                "salt": "0x347ef",
                "operator": "0x77d1f68C3C924cFD4732e64E93AEBEA836797485"
            },
            "signature": "0x64cb9e219aaa20c987c985b3f4b32f6779de9ba02e989e5c71262376e7e5fa3c6cac0318218c5e19a7273334d84378d7cdc82ba9ba27f8e7f77c5670fc0dccc11b"
        }
    ],
    "id": 1
}
 

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x6d6d900776b33a9bcb1099ecbd25c54be017c7de972525f0d9f0edef08ed859f"
}