Skip to content

Commit 37c15f3

Browse files
committed
feat: add unsubscription type
1 parent 977a8c5 commit 37c15f3

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

src/schemas/unsubscription.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/Unsubscription",
4+
"definitions": {
5+
"Unsubscription": {
6+
"title": "Unsubscription",
7+
"type": "object",
8+
"properties": {
9+
"type": {
10+
"type": "string",
11+
"enum": ["email"]
12+
},
13+
"value": {
14+
"type": "string",
15+
"title": "value",
16+
"maxLength": 256
17+
}
18+
},
19+
"required": ["type", "value"],
20+
"additionalProperties": false
21+
}
22+
}
23+
}

src/sign/hashedTypes.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,6 @@
6363
"4288d50b713081aae77d60d596d75864bff7acf7791a00183401e58658ee9da5": "statement",
6464
"d56782e3b50ac86c25ae292923da8c367e3c9e8e7ea9d8baa435051fe2f430fa": "proposal",
6565
"df10a7eeabe19301d6018be8b6c5d13231320d7ece64d021043fa172b64f3796": "update-proposal",
66-
"499ff7269df478dede66b3c0b96a0b90286c479b4013b423ac7cf8628a94e6db": "subscription"
66+
"499ff7269df478dede66b3c0b96a0b90286c479b4013b423ac7cf8628a94e6db": "subscription",
67+
"3c211382d04e80cbd21f3275e0674387bde366bbb885215e3735151763ca2813": "unsubscription"
6768
}

src/sign/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,3 +355,12 @@ export const subscriptionTypes = {
355355
{ name: 'timestamp', type: 'uint64' }
356356
]
357357
};
358+
359+
export const unsubscriptionTypes = {
360+
Unsubscription: [
361+
{ name: 'from', type: 'address' },
362+
{ name: 'type', type: 'string' },
363+
{ name: 'value', type: 'string' },
364+
{ name: 'timestamp', type: 'uint64' }
365+
]
366+
};

0 commit comments

Comments
 (0)