Socket
Socket
Sign inDemoInstall

@metamask/snaps-registry

Package Overview
Dependencies
Maintainers
10
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/snaps-registry - npm Package Compare versions

Comparing version 1.2.2 to 2.0.0

11

CHANGELOG.md

@@ -9,2 +9,10 @@ # Changelog

## [2.0.0]
### Changed
- **BREAKING**: Snap IDs are now required to start with the prefix `npm:` ([#75](https://github.com/MetaMask/snaps-registry/pull/75))
- Bump `@metamask/utils` to `^8.1.0` ([#72](https://github.com/MetaMask/snaps-registry/pull/72))
### Fixed
- Bump `semver` to `6.3.1` ([#70](https://github.com/MetaMask/snaps-registry/pull/70))
## [1.2.2]

@@ -35,3 +43,4 @@ ### Changed

[Unreleased]: https://github.com/MetaMask/snaps-registry/compare/v1.2.2...HEAD
[Unreleased]: https://github.com/MetaMask/snaps-registry/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/MetaMask/snaps-registry/compare/v1.2.2...v2.0.0
[1.2.2]: https://github.com/MetaMask/snaps-registry/compare/v1.2.1...v1.2.2

@@ -38,0 +47,0 @@ [1.2.1]: https://github.com/MetaMask/snaps-registry/compare/v1.2.0...v1.2.1

@@ -1,2 +0,18 @@

import { Infer } from 'superstruct';
import type { Infer } from 'superstruct';
export declare const AuthorStruct: import("superstruct").Struct<{
name: string;
website: string;
}, {
name: import("superstruct").Struct<string, null>;
website: import("superstruct").Struct<string, null>;
}>;
export declare type Author = Infer<typeof AuthorStruct>;
export declare const AuditStruct: import("superstruct").Struct<{
report: string;
auditor: string;
}, {
auditor: import("superstruct").Struct<string, null>;
report: import("superstruct").Struct<string, null>;
}>;
export declare type Audit = Infer<typeof AuditStruct>;
export declare const VerifiedSnapStruct: import("superstruct").Struct<{

@@ -6,2 +22,18 @@ id: string;

name: string;
type?: "account" | undefined;
summary?: string | undefined;
description?: string | undefined;
website?: string | undefined;
author?: {
name: string;
website: string;
} | undefined;
audits?: {
report: string;
auditor: string;
}[] | undefined;
category?: "notifications" | "interoperability" | "transaction insights" | undefined;
tags?: string[] | undefined;
support?: string | undefined;
sourceCode?: string | undefined;
};

@@ -15,4 +47,51 @@ versions: Record<import("@metamask/utils").SemVerVersion, {

name: string;
type?: "account" | undefined;
summary?: string | undefined;
description?: string | undefined;
website?: string | undefined;
author?: {
name: string;
website: string;
} | undefined;
audits?: {
report: string;
auditor: string;
}[] | undefined;
category?: "notifications" | "interoperability" | "transaction insights" | undefined;
tags?: string[] | undefined;
support?: string | undefined;
sourceCode?: string | undefined;
}, {
name: import("superstruct").Struct<string, null>;
type: import("superstruct").Struct<"account" | undefined, {
account: "account";
}>;
author: import("superstruct").Struct<{
name: string;
website: string;
} | undefined, {
name: import("superstruct").Struct<string, null>;
website: import("superstruct").Struct<string, null>;
}>;
website: import("superstruct").Struct<string | undefined, null>;
summary: import("superstruct").Struct<string | undefined, null>;
description: import("superstruct").Struct<string | undefined, null>;
audits: import("superstruct").Struct<{
report: string;
auditor: string;
}[] | undefined, import("superstruct").Struct<{
report: string;
auditor: string;
}, {
auditor: import("superstruct").Struct<string, null>;
report: import("superstruct").Struct<string, null>;
}>>;
category: import("superstruct").Struct<"notifications" | "interoperability" | "transaction insights" | undefined, {
notifications: "notifications";
interoperability: "interoperability";
"transaction insights": "transaction insights";
}>;
tags: import("superstruct").Struct<string[] | undefined, import("superstruct").Struct<string, null>>;
support: import("superstruct").Struct<string | undefined, null>;
sourceCode: import("superstruct").Struct<string | undefined, null>;
}>;

@@ -50,2 +129,18 @@ versions: import("superstruct").Struct<Record<import("@metamask/utils").SemVerVersion, {

name: string;
type?: "account" | undefined;
summary?: string | undefined;
description?: string | undefined;
website?: string | undefined;
author?: {
name: string;
website: string;
} | undefined;
audits?: {
report: string;
auditor: string;
}[] | undefined;
category?: "notifications" | "interoperability" | "transaction insights" | undefined;
tags?: string[] | undefined;
support?: string | undefined;
sourceCode?: string | undefined;
};

@@ -75,2 +170,18 @@ versions: Record<import("@metamask/utils").SemVerVersion, {

name: string;
type?: "account" | undefined;
summary?: string | undefined;
description?: string | undefined;
website?: string | undefined;
author?: {
name: string;
website: string;
} | undefined;
audits?: {
report: string;
auditor: string;
}[] | undefined;
category?: "notifications" | "interoperability" | "transaction insights" | undefined;
tags?: string[] | undefined;
support?: string | undefined;
sourceCode?: string | undefined;
};

@@ -77,0 +188,0 @@ versions: Record<import("@metamask/utils").SemVerVersion, {

@@ -17,12 +17,32 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SnapsRegistryDatabaseStruct = exports.BlockedSnapStruct = exports.BlockReasonStruct = exports.VerifiedSnapStruct = void 0;
exports.SnapsRegistryDatabaseStruct = exports.BlockedSnapStruct = exports.BlockReasonStruct = exports.VerifiedSnapStruct = exports.AuditStruct = exports.AuthorStruct = void 0;
const utils_1 = require("@metamask/utils");
const superstruct_1 = require("superstruct");
// For now, validate that each snap is using an NPM id.
const NpmIdStruct = (0, superstruct_1.refine)((0, superstruct_1.string)(), 'Npm ID', (value) => value.startsWith('npm:'));
const VerifiedSnapVersionStruct = (0, superstruct_1.object)({
checksum: utils_1.ChecksumStruct,
});
exports.AuthorStruct = (0, superstruct_1.object)({
name: (0, superstruct_1.string)(),
website: (0, superstruct_1.string)(),
});
exports.AuditStruct = (0, superstruct_1.object)({
auditor: (0, superstruct_1.string)(),
report: (0, superstruct_1.string)(),
});
exports.VerifiedSnapStruct = (0, superstruct_1.object)({
id: (0, superstruct_1.string)(),
id: NpmIdStruct,
metadata: (0, superstruct_1.object)({
name: (0, superstruct_1.string)(),
type: (0, superstruct_1.optional)((0, superstruct_1.enums)(['account'])),
author: (0, superstruct_1.optional)(exports.AuthorStruct),
website: (0, superstruct_1.optional)((0, superstruct_1.string)()),
summary: (0, superstruct_1.optional)((0, superstruct_1.string)()),
description: (0, superstruct_1.optional)((0, superstruct_1.string)()),
audits: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.AuditStruct)),
category: (0, superstruct_1.optional)((0, superstruct_1.enums)(['interoperability', 'notifications', 'transaction insights'])),
tags: (0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.string)())),
support: (0, superstruct_1.optional)((0, superstruct_1.string)()),
sourceCode: (0, superstruct_1.optional)((0, superstruct_1.string)()),
}),

@@ -37,3 +57,3 @@ versions: (0, superstruct_1.record)(utils_1.VersionStruct, VerifiedSnapVersionStruct),

(0, superstruct_1.object)({
id: (0, superstruct_1.string)(),
id: NpmIdStruct,
versionRange: utils_1.VersionRangeStruct,

@@ -45,3 +65,3 @@ reason: (0, superstruct_1.optional)(exports.BlockReasonStruct),

exports.SnapsRegistryDatabaseStruct = (0, superstruct_1.object)({
verifiedSnaps: (0, superstruct_1.record)((0, superstruct_1.string)(), exports.VerifiedSnapStruct),
verifiedSnaps: (0, superstruct_1.record)(NpmIdStruct, exports.VerifiedSnapStruct),
blockedSnaps: (0, superstruct_1.array)(exports.BlockedSnapStruct),

@@ -48,0 +68,0 @@ });

4

dist/verify.d.ts

@@ -1,3 +0,3 @@

import { Hex } from '@metamask/utils';
import { Infer } from 'superstruct';
import type { Hex } from '@metamask/utils';
import type { Infer } from 'superstruct';
export declare const SignatureStruct: import("superstruct").Struct<{

@@ -4,0 +4,0 @@ curve: "secp256k1";

{
"name": "@metamask/snaps-registry",
"version": "1.2.2",
"version": "2.0.0",
"description": "A registry containing metadata about verified and blocked Snaps.",

@@ -27,6 +27,7 @@ "repository": {

"test:watch": "jest --watch",
"verify": "ts-node scripts/verify-registry.ts"
"verify": "ts-node scripts/verify-registry.ts",
"verify-snaps": "ts-node scripts/verify-snaps.ts"
},
"dependencies": {
"@metamask/utils": "^7.1.0",
"@metamask/utils": "^8.1.0",
"@noble/secp256k1": "^1.7.1",

@@ -36,10 +37,11 @@ "superstruct": "^1.0.3"

"devDependencies": {
"@lavamoat/allow-scripts": "^2.0.3",
"@lavamoat/allow-scripts": "^2.3.1",
"@metamask/auto-changelog": "^3.1.0",
"@metamask/eslint-config": "^11.1.0",
"@metamask/eslint-config-jest": "^11.1.0",
"@metamask/eslint-config-nodejs": "^11.1.0",
"@metamask/eslint-config-typescript": "^11.1.0",
"@noble/curves": "^0.9.0",
"@noble/hashes": "^1.3.0",
"@metamask/eslint-config": "^12.1.0",
"@metamask/eslint-config-jest": "^12.1.0",
"@metamask/eslint-config-nodejs": "^12.1.0",
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/snaps-controllers": "^1.0.2",
"@noble/curves": "^1.2.0",
"@noble/hashes": "^1.3.2",
"@types/jest": "^28.1.6",

@@ -52,7 +54,9 @@ "@types/node": "^17.0.23",

"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.1.5",
"eslint-plugin-jsdoc": "^39.6.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"fast-deep-equal": "^3.1.3",
"jest": "^28.1.3",

@@ -63,2 +67,3 @@ "jest-it-up": "^2.0.2",

"rimraf": "^3.0.2",
"semver": "^7.5.4",
"ts-jest": "^28.0.7",

@@ -78,5 +83,7 @@ "ts-node": "^10.7.0",

"allowScripts": {
"@lavamoat/preinstall-always-fail": false
"@lavamoat/preinstall-always-fail": false,
"@metamask/snaps-controllers>@metamask/permission-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>keccak": false,
"@metamask/snaps-controllers>@metamask/permission-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>secp256k1": false
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc