Closed d10r closed 1 year ago
Here are some older, but still-mostly-relevant documentation on delegates and signing:
https://github.com/safe-global/safe-docs/blob/devportal/docs/tutorial_tx_service_set_delegate.md
The only caveat is that the path is /v1/delegates
as you noted, and now has an extra delegator
field. Other than adding the delegator
address to the payload, my code is the exact same from the above document.
After you get that squared away and have the delegate set, if you need help signing, here are some additional docs on that: https://github.com/safe-global/safe-docs/blob/devportal/docs/tutorial_tx_service_initiate_sign.md (Note: You can skip the gas parts, since they'll simply be calculated on execution)
But essentially you are building the Safe Transaction Hash (the same hash used to differentiate each Safe Transaction, based on the payload data) and use that delegate account's private key to sign that message as outlined in the document.
thx, that indeed looks useful, will try.
works. Looks like the Python libs have a different default way of signing than the JS libs.
I'm stuck trying to specify a delegate using the API endpoint POST `/v1/delegates . All attempts end up with the error message:
It's essentially the same problem reported by somebody else >1 year ago here: https://ethereum.stackexchange.com/questions/127433/gnosis-safe-create-delegate-key-api-400
I found a test case for the endpoint here, but it doesn't create an actual signature, thus doesn't help figuring out what's expected. Since the transaction service is written in Python, I also checked Python's way of signing, but that only adds question marks.
Please provide some clarification in the endpoint description, in the tests or in the docs about how to create a valid signature.