You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uuid field will be required (need to keep it optional for a while to support existing clients).
Timestamp field: within the last 5 minutes from the current UTC time in epoch seconds format.
Signatures field: array of signatures of the registration request by the owner keys imported in the client. Associate those signing addresses with the cloud messaging token. Hex string: 0x + hex(r) + hex(s) + hex(v + 27)
Add new type of notification CONFIRMATION_REQUEST
Sent on receiving new transaction for a Safe to those cloudMessaging tokens that have associated owner keys and those owner keys are owners of the safes that will have this transaction, and those keys did not sign that transaction.
Signature calculation
To calculate the signature, the following fields must be used:
prefix: constant, it will be gnosis-safe
timestamp:
uuid: uuid of the device
cloudMessagingToken
safes: concat list of sorted checksummed addresses
So the hash must be calculated: keccak256($prefix + timestamp + uuid + cloudMessagingToken + sorted(safes)
- Refactor create/update Firebase device endpoint
- Protect endpoint with signatures/timestamp
- Create new model on database `FirebaseDeviceOwner`
- Add new `NotificationType`: `CONFIRMATION_REQUEST`
- Create new task to send notifications to owners
- Add tests
- Closes#190
Push notifications registration changes
0x + hex(r) + hex(s) + hex(v + 27)
Add new type of notification
CONFIRMATION_REQUEST
Sent on receiving new transaction for a Safe to those
cloudMessaging
tokens that have associated owner keys and those owner keys are owners of the safes that will have this transaction, and those keys did not sign that transaction.Signature calculation
To calculate the signature, the following fields must be used:
prefix
: constant, it will begnosis-safe
timestamp
:uuid
: uuid of the devicecloudMessagingToken
safes
: concat list of sorted checksummed addressesSo the hash must be calculated:
keccak256($prefix + timestamp + uuid + cloudMessagingToken + sorted(safes)
For example:
keccak256("gnosis-safe160518664515533971c4e-fb98-4e18-a08d-13c881ae292adSh5Se1XgEiTiY-AXQAX210xa2AC1760DAf52986421b1552bDCa04707e78950E0xbDEbdd6CEE25b2F931D2FE265D70E1A533b02453)
More details in the spec document https://docs.google.com/document/d/1RqIfZkqdS_TZ4IQVjeWUhNI1ZguD3NfpohSSRLVxB5Q/edit#
The text was updated successfully, but these errors were encountered: