From 323c2ccb840fd9a84219ec6cd39fe6429006f8e1 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 7 Dec 2023 13:13:44 +0100 Subject: [PATCH] Add more metadata fields (#316) Add a handful of new metadata fields that are needed in the near future. --- src/index.ts | 9 ++++++++- src/registry.test.ts | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5bdb6913..ae6a4300 100644 --- a/src/index.ts +++ b/src/index.ts @@ -59,12 +59,19 @@ export const VerifiedSnapStruct = object({ description: optional(string()), audits: optional(array(AuditStruct)), category: optional( - enums(['interoperability', 'notifications', 'transaction insights']), + enums([ + 'interoperability', + 'notifications', + 'transaction insights', + 'account management', + ]), ), tags: optional(array(string())), support: optional(SupportStruct), sourceCode: optional(string()), hidden: optional(boolean()), + privateCode: optional(boolean()), + privacyPolicy: optional(string()), }), versions: record(VersionStruct, VerifiedSnapVersionStruct), }); diff --git a/src/registry.test.ts b/src/registry.test.ts index de527e74..58fd23cd 100644 --- a/src/registry.test.ts +++ b/src/registry.test.ts @@ -45,6 +45,8 @@ describe('Snaps Registry', () => { sourceCode: 'https://metamask.io/example/source-code', category: 'interoperability', tags: ['accounts', 'example'], + privacyPolicy: 'https://metamask.io/example/privacy', + privateCode: true, }, versions: { ['0.1.0' as SemVerVersion]: {