@metamask/snaps-utils 7.0.3 → 7.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/dist/{chunk-LCWDLIK5.mjs → chunk-6F2DZTGM.mjs} +13 -11
- package/dist/chunk-6F2DZTGM.mjs.map +1 -0
- package/dist/{chunk-AWRMYDIN.js → chunk-HKJDVWVO.js} +3 -3
- package/dist/{chunk-ENKAY3PI.js → chunk-LTWLSRSR.js} +14 -12
- package/dist/chunk-LTWLSRSR.js.map +1 -0
- package/dist/{chunk-YMUOYQFU.js → chunk-OK2Q2GT7.js} +3 -3
- package/dist/{chunk-LGT3PBPZ.mjs → chunk-RQVVWCOW.mjs} +2 -2
- package/dist/{chunk-PIG67G67.mjs → chunk-ZO24JBZA.mjs} +2 -2
- package/dist/index.js +5 -3
- package/dist/index.mjs +4 -2
- package/dist/manifest/index.js +4 -2
- package/dist/manifest/index.mjs +3 -1
- package/dist/manifest/manifest.js +3 -3
- package/dist/manifest/manifest.mjs +2 -2
- package/dist/manifest/node.js +5 -3
- package/dist/manifest/node.mjs +4 -2
- package/dist/manifest/validation.js +4 -2
- package/dist/manifest/validation.mjs +3 -1
- package/dist/node.js +6 -4
- package/dist/node.mjs +5 -3
- package/dist/npm.js +3 -3
- package/dist/npm.mjs +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/localization.d.ts +31 -55
- package/dist/types/manifest/validation.d.ts +65 -489
- package/dist/validation.js +3 -3
- package/dist/validation.mjs +2 -2
- package/package.json +4 -4
- package/dist/chunk-ENKAY3PI.js.map +0 -1
- package/dist/chunk-LCWDLIK5.mjs.map +0 -1
- /package/dist/{chunk-AWRMYDIN.js.map → chunk-HKJDVWVO.js.map} +0 -0
- /package/dist/{chunk-YMUOYQFU.js.map → chunk-OK2Q2GT7.js.map} +0 -0
- /package/dist/{chunk-LGT3PBPZ.mjs.map → chunk-RQVVWCOW.mjs.map} +0 -0
- /package/dist/{chunk-PIG67G67.mjs.map → chunk-ZO24JBZA.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [7.0.4]
|
|
10
|
+
### Changed
|
|
11
|
+
- Bump MetaMask dependencies ([#2270](https://github.com/MetaMask/snaps/pull/2270))
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- Allow `maxRequestTime` on `endowment:rpc` ([#2291](https://github.com/MetaMask/snaps/pull/2291))
|
|
15
|
+
|
|
9
16
|
## [7.0.3]
|
|
10
17
|
### Changed
|
|
11
18
|
- Update markdown parsing for better link validation ([#2261](https://github.com/MetaMask/snaps/pull/2261))
|
|
@@ -199,7 +206,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
199
206
|
- The version of the package no longer needs to match the version of all other
|
|
200
207
|
MetaMask Snaps packages.
|
|
201
208
|
|
|
202
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@7.0.
|
|
209
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@7.0.4...HEAD
|
|
210
|
+
[7.0.4]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@7.0.3...@metamask/snaps-utils@7.0.4
|
|
203
211
|
[7.0.3]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@7.0.2...@metamask/snaps-utils@7.0.3
|
|
204
212
|
[7.0.2]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@7.0.1...@metamask/snaps-utils@7.0.2
|
|
205
213
|
[7.0.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@7.0.0...@metamask/snaps-utils@7.0.1
|
|
@@ -147,6 +147,7 @@ var MaxRequestTimeStruct = size(
|
|
|
147
147
|
var HandlerCaveatsStruct = object({
|
|
148
148
|
maxRequestTime: optional(MaxRequestTimeStruct)
|
|
149
149
|
});
|
|
150
|
+
var EmptyObjectStruct = object({});
|
|
150
151
|
var PermissionsStruct = type({
|
|
151
152
|
"endowment:cronjob": optional(
|
|
152
153
|
assign(
|
|
@@ -154,7 +155,7 @@ var PermissionsStruct = type({
|
|
|
154
155
|
object({ jobs: CronjobSpecificationArrayStruct })
|
|
155
156
|
)
|
|
156
157
|
),
|
|
157
|
-
"endowment:ethereum-provider": optional(
|
|
158
|
+
"endowment:ethereum-provider": optional(EmptyObjectStruct),
|
|
158
159
|
"endowment:keyring": optional(
|
|
159
160
|
assign(HandlerCaveatsStruct, KeyringOriginsStruct)
|
|
160
161
|
),
|
|
@@ -168,9 +169,9 @@ var PermissionsStruct = type({
|
|
|
168
169
|
})
|
|
169
170
|
)
|
|
170
171
|
),
|
|
171
|
-
"endowment:network-access": optional(
|
|
172
|
+
"endowment:network-access": optional(EmptyObjectStruct),
|
|
172
173
|
"endowment:page-home": optional(HandlerCaveatsStruct),
|
|
173
|
-
"endowment:rpc": optional(RpcOriginsStruct),
|
|
174
|
+
"endowment:rpc": optional(assign(HandlerCaveatsStruct, RpcOriginsStruct)),
|
|
174
175
|
"endowment:signature-insight": optional(
|
|
175
176
|
assign(
|
|
176
177
|
HandlerCaveatsStruct,
|
|
@@ -187,11 +188,11 @@ var PermissionsStruct = type({
|
|
|
187
188
|
})
|
|
188
189
|
)
|
|
189
190
|
),
|
|
190
|
-
"endowment:webassembly": optional(
|
|
191
|
-
snap_dialog: optional(
|
|
192
|
-
snap_manageState: optional(
|
|
193
|
-
snap_manageAccounts: optional(
|
|
194
|
-
snap_notify: optional(
|
|
191
|
+
"endowment:webassembly": optional(EmptyObjectStruct),
|
|
192
|
+
snap_dialog: optional(EmptyObjectStruct),
|
|
193
|
+
snap_manageState: optional(EmptyObjectStruct),
|
|
194
|
+
snap_manageAccounts: optional(EmptyObjectStruct),
|
|
195
|
+
snap_notify: optional(EmptyObjectStruct),
|
|
195
196
|
snap_getBip32Entropy: optional(SnapGetBip32EntropyPermissionsStruct),
|
|
196
197
|
snap_getBip32PublicKey: optional(SnapGetBip32EntropyPermissionsStruct),
|
|
197
198
|
snap_getBip44Entropy: optional(
|
|
@@ -201,8 +202,8 @@ var PermissionsStruct = type({
|
|
|
201
202
|
Infinity
|
|
202
203
|
)
|
|
203
204
|
),
|
|
204
|
-
snap_getEntropy: optional(
|
|
205
|
-
snap_getLocale: optional(
|
|
205
|
+
snap_getEntropy: optional(EmptyObjectStruct),
|
|
206
|
+
snap_getLocale: optional(EmptyObjectStruct),
|
|
206
207
|
wallet_snap: optional(SnapIdsStruct)
|
|
207
208
|
});
|
|
208
209
|
var SnapAuxilaryFilesStruct = array(string());
|
|
@@ -270,6 +271,7 @@ export {
|
|
|
270
271
|
MAXIMUM_REQUEST_TIMEOUT,
|
|
271
272
|
MaxRequestTimeStruct,
|
|
272
273
|
HandlerCaveatsStruct,
|
|
274
|
+
EmptyObjectStruct,
|
|
273
275
|
PermissionsStruct,
|
|
274
276
|
SnapAuxilaryFilesStruct,
|
|
275
277
|
InitialConnectionsStruct,
|
|
@@ -278,4 +280,4 @@ export {
|
|
|
278
280
|
assertIsSnapManifest,
|
|
279
281
|
createSnapManifest
|
|
280
282
|
};
|
|
281
|
-
//# sourceMappingURL=chunk-
|
|
283
|
+
//# sourceMappingURL=chunk-6F2DZTGM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/manifest/validation.ts"],"sourcesContent":["import { isValidBIP32PathSegment } from '@metamask/key-tree';\nimport type { EmptyObject, InitialPermissions } from '@metamask/snaps-sdk';\nimport {\n assertStruct,\n ChecksumStruct,\n VersionStruct,\n isValidSemVerRange,\n inMilliseconds,\n Duration,\n} from '@metamask/utils';\nimport type { Describe, Infer, Struct } from 'superstruct';\nimport {\n array,\n boolean,\n create,\n enums,\n integer,\n is,\n literal,\n object,\n optional,\n refine,\n record,\n size,\n string,\n type,\n union,\n intersection,\n assign,\n} from 'superstruct';\n\nimport { isEqual } from '../array';\nimport { CronjobSpecificationArrayStruct } from '../cronjob';\nimport { SIP_6_MAGIC_VALUE, STATE_ENCRYPTION_MAGIC_VALUE } from '../entropy';\nimport { KeyringOriginsStruct, RpcOriginsStruct } from '../json-rpc';\nimport { ChainIdStruct } from '../namespace';\nimport { SnapIdStruct } from '../snaps';\nimport type { InferMatching } from '../structs';\nimport { NameStruct, NpmSnapFileNames, uri } from '../types';\n\n// BIP-43 purposes that cannot be used for entropy derivation. These are in the\n// string form, ending with `'`.\nconst FORBIDDEN_PURPOSES: string[] = [\n SIP_6_MAGIC_VALUE,\n STATE_ENCRYPTION_MAGIC_VALUE,\n];\n\nexport const FORBIDDEN_COIN_TYPES: number[] = [60];\nconst FORBIDDEN_PATHS: string[][] = FORBIDDEN_COIN_TYPES.map((coinType) => [\n 'm',\n \"44'\",\n `${coinType}'`,\n]);\n\nexport const Bip32PathStruct = refine(\n array(string()),\n 'BIP-32 path',\n (path: string[]) => {\n if (path.length === 0) {\n return 'Path must be a non-empty BIP-32 derivation path array';\n }\n\n if (path[0] !== 'm') {\n return 'Path must start with \"m\".';\n }\n\n if (path.length < 3) {\n return 'Paths must have a length of at least three.';\n }\n\n if (path.slice(1).some((part) => !isValidBIP32PathSegment(part))) {\n return 'Path must be a valid BIP-32 derivation path array.';\n }\n\n if (FORBIDDEN_PURPOSES.includes(path[1])) {\n return `The purpose \"${path[1]}\" is not allowed for entropy derivation.`;\n }\n\n if (\n FORBIDDEN_PATHS.some((forbiddenPath) =>\n isEqual(path.slice(0, forbiddenPath.length), forbiddenPath),\n )\n ) {\n return `The path \"${path.join(\n '/',\n )}\" is not allowed for entropy derivation.`;\n }\n\n return true;\n },\n);\n\nexport const bip32entropy = <\n Type extends { path: string[]; curve: string },\n Schema,\n>(\n struct: Struct<Type, Schema>,\n) =>\n refine(struct, 'BIP-32 entropy', (value) => {\n if (\n value.curve === 'ed25519' &&\n value.path.slice(1).some((part) => !part.endsWith(\"'\"))\n ) {\n return 'Ed25519 does not support unhardened paths.';\n }\n\n return true;\n });\n\n// Used outside @metamask/snap-utils\nexport const Bip32EntropyStruct = bip32entropy(\n type({\n path: Bip32PathStruct,\n curve: enums(['ed25519', 'secp256k1']),\n }),\n);\n\nexport type Bip32Entropy = Infer<typeof Bip32EntropyStruct>;\n\nexport const SnapGetBip32EntropyPermissionsStruct = size(\n array(Bip32EntropyStruct),\n 1,\n Infinity,\n);\n\nexport const SemVerRangeStruct = refine(string(), 'SemVer range', (value) => {\n if (isValidSemVerRange(value)) {\n return true;\n }\n return 'Expected a valid SemVer range.';\n});\n\nexport const SnapIdsStruct = refine(\n record(SnapIdStruct, object({ version: optional(SemVerRangeStruct) })),\n 'SnapIds',\n (value) => {\n if (Object.keys(value).length === 0) {\n return false;\n }\n\n return true;\n },\n);\n\nexport type SnapIds = Infer<typeof SnapIdsStruct>;\n\nexport const ChainIdsStruct = size(array(ChainIdStruct), 1, Infinity);\n\nexport const LookupMatchersStruct = union([\n object({\n tlds: size(array(string()), 1, Infinity),\n }),\n object({\n schemes: size(array(string()), 1, Infinity),\n }),\n object({\n tlds: size(array(string()), 1, Infinity),\n schemes: size(array(string()), 1, Infinity),\n }),\n]);\n\nexport const MINIMUM_REQUEST_TIMEOUT = inMilliseconds(5, Duration.Second);\nexport const MAXIMUM_REQUEST_TIMEOUT = inMilliseconds(3, Duration.Minute);\n\nexport const MaxRequestTimeStruct = size(\n integer(),\n MINIMUM_REQUEST_TIMEOUT,\n MAXIMUM_REQUEST_TIMEOUT,\n);\n\n// Utility type to union with for all handler structs\nexport const HandlerCaveatsStruct = object({\n maxRequestTime: optional(MaxRequestTimeStruct),\n});\n\nexport type HandlerCaveats = Infer<typeof HandlerCaveatsStruct>;\n\nexport const EmptyObjectStruct = object<EmptyObject>({}) as unknown as Struct<\n EmptyObject,\n null\n>;\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport const PermissionsStruct: Describe<InitialPermissions> = type({\n 'endowment:cronjob': optional(\n assign(\n HandlerCaveatsStruct,\n object({ jobs: CronjobSpecificationArrayStruct }),\n ),\n ),\n 'endowment:ethereum-provider': optional(EmptyObjectStruct),\n 'endowment:keyring': optional(\n assign(HandlerCaveatsStruct, KeyringOriginsStruct),\n ),\n 'endowment:lifecycle-hooks': optional(HandlerCaveatsStruct),\n 'endowment:name-lookup': optional(\n assign(\n HandlerCaveatsStruct,\n object({\n chains: optional(ChainIdsStruct),\n matchers: optional(LookupMatchersStruct),\n }),\n ),\n ),\n 'endowment:network-access': optional(EmptyObjectStruct),\n 'endowment:page-home': optional(HandlerCaveatsStruct),\n 'endowment:rpc': optional(assign(HandlerCaveatsStruct, RpcOriginsStruct)),\n 'endowment:signature-insight': optional(\n assign(\n HandlerCaveatsStruct,\n object({\n allowSignatureOrigin: optional(boolean()),\n }),\n ),\n ),\n 'endowment:transaction-insight': optional(\n assign(\n HandlerCaveatsStruct,\n object({\n allowTransactionOrigin: optional(boolean()),\n }),\n ),\n ),\n 'endowment:webassembly': optional(EmptyObjectStruct),\n snap_dialog: optional(EmptyObjectStruct),\n snap_manageState: optional(EmptyObjectStruct),\n snap_manageAccounts: optional(EmptyObjectStruct),\n snap_notify: optional(EmptyObjectStruct),\n snap_getBip32Entropy: optional(SnapGetBip32EntropyPermissionsStruct),\n snap_getBip32PublicKey: optional(SnapGetBip32EntropyPermissionsStruct),\n snap_getBip44Entropy: optional(\n size(\n array(object({ coinType: size(integer(), 0, 2 ** 32 - 1) })),\n 1,\n Infinity,\n ),\n ),\n snap_getEntropy: optional(EmptyObjectStruct),\n snap_getLocale: optional(EmptyObjectStruct),\n wallet_snap: optional(SnapIdsStruct),\n});\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type SnapPermissions = InferMatching<\n typeof PermissionsStruct,\n InitialPermissions\n>;\n\nexport const SnapAuxilaryFilesStruct = array(string());\n\nexport const InitialConnectionsStruct = record(\n intersection([string(), uri()]),\n object({}),\n);\n\nexport type InitialConnections = Infer<typeof InitialConnectionsStruct>;\n\nexport const SnapManifestStruct = object({\n version: VersionStruct,\n description: size(string(), 1, 280),\n proposedName: size(string(), 1, 214),\n repository: optional(\n object({\n type: size(string(), 1, Infinity),\n url: size(string(), 1, Infinity),\n }),\n ),\n source: object({\n shasum: ChecksumStruct,\n location: object({\n npm: object({\n filePath: size(string(), 1, Infinity),\n iconPath: optional(size(string(), 1, Infinity)),\n packageName: NameStruct,\n registry: union([\n literal('https://registry.npmjs.org'),\n literal('https://registry.npmjs.org/'),\n ]),\n }),\n }),\n files: optional(SnapAuxilaryFilesStruct),\n locales: optional(SnapAuxilaryFilesStruct),\n }),\n initialConnections: optional(InitialConnectionsStruct),\n initialPermissions: PermissionsStruct,\n manifestVersion: literal('0.1'),\n $schema: optional(string()), // enables JSON-Schema linting in VSC and other IDEs\n});\n\nexport type SnapManifest = Infer<typeof SnapManifestStruct>;\n\n/**\n * Check if the given value is a valid {@link SnapManifest} object.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid {@link SnapManifest} object.\n */\nexport function isSnapManifest(value: unknown): value is SnapManifest {\n return is(value, SnapManifestStruct);\n}\n\n/**\n * Assert that the given value is a valid {@link SnapManifest} object.\n *\n * @param value - The value to check.\n * @throws If the value is not a valid {@link SnapManifest} object.\n */\nexport function assertIsSnapManifest(\n value: unknown,\n): asserts value is SnapManifest {\n assertStruct(\n value,\n SnapManifestStruct,\n `\"${NpmSnapFileNames.Manifest}\" is invalid`,\n );\n}\n\n/**\n * Creates a {@link SnapManifest} object from JSON.\n *\n * @param value - The value to check.\n * @throws If the value cannot be coerced to a {@link SnapManifest} object.\n * @returns The created {@link SnapManifest} object.\n */\nexport function createSnapManifest(value: unknown): SnapManifest {\n // TODO: Add a utility to prefix these errors similar to assertStruct\n return create(value, SnapManifestStruct);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,+BAA+B;AAExC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA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AAAA,EAC9B,SAAS,SAAS,OAAO,CAAC;AAAA;AAC5B,CAAC;AAUM,SAAS,eAAe,OAAuC;AACpE,SAAO,GAAG,OAAO,kBAAkB;AACrC;AAQO,SAAS,qBACd,OAC+B;AAC/B;AAAA,IACE;AAAA,IACA;AAAA,IACA,uCAA6B;AAAA,EAC/B;AACF;AASO,SAAS,mBAAmB,OAA8B;AAE/D,SAAO,OAAO,OAAO,kBAAkB;AACzC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLTWLSRSRjs = require('./chunk-LTWLSRSR.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -342,7 +342,7 @@ async function validateNpmSnap(snapFiles, errorPrefix) {
|
|
|
342
342
|
localizationFiles
|
|
343
343
|
} = snapFiles;
|
|
344
344
|
try {
|
|
345
|
-
|
|
345
|
+
_chunkLTWLSRSRjs.assertIsSnapManifest.call(void 0, manifest.result);
|
|
346
346
|
} catch (error) {
|
|
347
347
|
throw new Error(`${errorPrefix ?? ""}${error.message}`);
|
|
348
348
|
}
|
|
@@ -406,4 +406,4 @@ async function validateNpmSnap(snapFiles, errorPrefix) {
|
|
|
406
406
|
|
|
407
407
|
|
|
408
408
|
exports.EXPECTED_SNAP_FILES = EXPECTED_SNAP_FILES; exports.SnapFileNameFromKey = SnapFileNameFromKey; exports.validateNpmSnap = validateNpmSnap; exports.checkManifest = checkManifest; exports.fixManifest = fixManifest; exports.getSnapSourceCode = getSnapSourceCode; exports.getSnapIcon = getSnapIcon; exports.getSnapFilePaths = getSnapFilePaths; exports.getSnapFiles = getSnapFiles; exports.getWritableManifest = getWritableManifest; exports.validateNpmSnapManifest = validateNpmSnapManifest;
|
|
409
|
-
//# sourceMappingURL=chunk-
|
|
409
|
+
//# sourceMappingURL=chunk-HKJDVWVO.js.map
|
|
@@ -147,6 +147,7 @@ var MaxRequestTimeStruct = _superstruct.size.call(void 0,
|
|
|
147
147
|
var HandlerCaveatsStruct = _superstruct.object.call(void 0, {
|
|
148
148
|
maxRequestTime: _superstruct.optional.call(void 0, MaxRequestTimeStruct)
|
|
149
149
|
});
|
|
150
|
+
var EmptyObjectStruct = _superstruct.object.call(void 0, {});
|
|
150
151
|
var PermissionsStruct = _superstruct.type.call(void 0, {
|
|
151
152
|
"endowment:cronjob": _superstruct.optional.call(void 0,
|
|
152
153
|
_superstruct.assign.call(void 0,
|
|
@@ -154,7 +155,7 @@ var PermissionsStruct = _superstruct.type.call(void 0, {
|
|
|
154
155
|
_superstruct.object.call(void 0, { jobs: _chunk2LBN5T56js.CronjobSpecificationArrayStruct })
|
|
155
156
|
)
|
|
156
157
|
),
|
|
157
|
-
"endowment:ethereum-provider": _superstruct.optional.call(void 0,
|
|
158
|
+
"endowment:ethereum-provider": _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
158
159
|
"endowment:keyring": _superstruct.optional.call(void 0,
|
|
159
160
|
_superstruct.assign.call(void 0, HandlerCaveatsStruct, _chunkCQRPSEH3js.KeyringOriginsStruct)
|
|
160
161
|
),
|
|
@@ -168,9 +169,9 @@ var PermissionsStruct = _superstruct.type.call(void 0, {
|
|
|
168
169
|
})
|
|
169
170
|
)
|
|
170
171
|
),
|
|
171
|
-
"endowment:network-access": _superstruct.optional.call(void 0,
|
|
172
|
+
"endowment:network-access": _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
172
173
|
"endowment:page-home": _superstruct.optional.call(void 0, HandlerCaveatsStruct),
|
|
173
|
-
"endowment:rpc": _superstruct.optional.call(void 0, _chunkCQRPSEH3js.RpcOriginsStruct),
|
|
174
|
+
"endowment:rpc": _superstruct.optional.call(void 0, _superstruct.assign.call(void 0, HandlerCaveatsStruct, _chunkCQRPSEH3js.RpcOriginsStruct)),
|
|
174
175
|
"endowment:signature-insight": _superstruct.optional.call(void 0,
|
|
175
176
|
_superstruct.assign.call(void 0,
|
|
176
177
|
HandlerCaveatsStruct,
|
|
@@ -187,11 +188,11 @@ var PermissionsStruct = _superstruct.type.call(void 0, {
|
|
|
187
188
|
})
|
|
188
189
|
)
|
|
189
190
|
),
|
|
190
|
-
"endowment:webassembly": _superstruct.optional.call(void 0,
|
|
191
|
-
snap_dialog: _superstruct.optional.call(void 0,
|
|
192
|
-
snap_manageState: _superstruct.optional.call(void 0,
|
|
193
|
-
snap_manageAccounts: _superstruct.optional.call(void 0,
|
|
194
|
-
snap_notify: _superstruct.optional.call(void 0,
|
|
191
|
+
"endowment:webassembly": _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
192
|
+
snap_dialog: _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
193
|
+
snap_manageState: _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
194
|
+
snap_manageAccounts: _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
195
|
+
snap_notify: _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
195
196
|
snap_getBip32Entropy: _superstruct.optional.call(void 0, SnapGetBip32EntropyPermissionsStruct),
|
|
196
197
|
snap_getBip32PublicKey: _superstruct.optional.call(void 0, SnapGetBip32EntropyPermissionsStruct),
|
|
197
198
|
snap_getBip44Entropy: _superstruct.optional.call(void 0,
|
|
@@ -201,8 +202,8 @@ var PermissionsStruct = _superstruct.type.call(void 0, {
|
|
|
201
202
|
Infinity
|
|
202
203
|
)
|
|
203
204
|
),
|
|
204
|
-
snap_getEntropy: _superstruct.optional.call(void 0,
|
|
205
|
-
snap_getLocale: _superstruct.optional.call(void 0,
|
|
205
|
+
snap_getEntropy: _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
206
|
+
snap_getLocale: _superstruct.optional.call(void 0, EmptyObjectStruct),
|
|
206
207
|
wallet_snap: _superstruct.optional.call(void 0, SnapIdsStruct)
|
|
207
208
|
});
|
|
208
209
|
var SnapAuxilaryFilesStruct = _superstruct.array.call(void 0, _superstruct.string.call(void 0, ));
|
|
@@ -277,5 +278,6 @@ function createSnapManifest(value) {
|
|
|
277
278
|
|
|
278
279
|
|
|
279
280
|
|
|
280
|
-
|
|
281
|
-
|
|
281
|
+
|
|
282
|
+
exports.FORBIDDEN_COIN_TYPES = FORBIDDEN_COIN_TYPES; exports.Bip32PathStruct = Bip32PathStruct; exports.bip32entropy = bip32entropy; exports.Bip32EntropyStruct = Bip32EntropyStruct; exports.SnapGetBip32EntropyPermissionsStruct = SnapGetBip32EntropyPermissionsStruct; exports.SemVerRangeStruct = SemVerRangeStruct; exports.SnapIdsStruct = SnapIdsStruct; exports.ChainIdsStruct = ChainIdsStruct; exports.LookupMatchersStruct = LookupMatchersStruct; exports.MINIMUM_REQUEST_TIMEOUT = MINIMUM_REQUEST_TIMEOUT; exports.MAXIMUM_REQUEST_TIMEOUT = MAXIMUM_REQUEST_TIMEOUT; exports.MaxRequestTimeStruct = MaxRequestTimeStruct; exports.HandlerCaveatsStruct = HandlerCaveatsStruct; exports.EmptyObjectStruct = EmptyObjectStruct; exports.PermissionsStruct = PermissionsStruct; exports.SnapAuxilaryFilesStruct = SnapAuxilaryFilesStruct; exports.InitialConnectionsStruct = InitialConnectionsStruct; exports.SnapManifestStruct = SnapManifestStruct; exports.isSnapManifest = isSnapManifest; exports.assertIsSnapManifest = assertIsSnapManifest; exports.createSnapManifest = createSnapManifest;
|
|
283
|
+
//# sourceMappingURL=chunk-LTWLSRSR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/manifest/validation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,+BAA+B;AAExC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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O,SAAS,qBACd,OAC+B;AAC/B;AAAA,IACE;AAAA,IACA;AAAA,IACA,uCAA6B;AAAA,EAC/B;AACF;AASO,SAAS,mBAAmB,OAA8B;AAE/D,SAAO,OAAO,OAAO,kBAAkB;AACzC","sourcesContent":["import { isValidBIP32PathSegment } from '@metamask/key-tree';\nimport type { EmptyObject, InitialPermissions } from '@metamask/snaps-sdk';\nimport {\n assertStruct,\n ChecksumStruct,\n VersionStruct,\n isValidSemVerRange,\n inMilliseconds,\n Duration,\n} from '@metamask/utils';\nimport type { Describe, Infer, Struct } from 'superstruct';\nimport {\n array,\n boolean,\n create,\n enums,\n integer,\n is,\n literal,\n object,\n optional,\n refine,\n record,\n size,\n string,\n type,\n union,\n intersection,\n assign,\n} from 'superstruct';\n\nimport { isEqual } from '../array';\nimport { CronjobSpecificationArrayStruct } from '../cronjob';\nimport { SIP_6_MAGIC_VALUE, STATE_ENCRYPTION_MAGIC_VALUE } from '../entropy';\nimport { KeyringOriginsStruct, RpcOriginsStruct } from '../json-rpc';\nimport { ChainIdStruct } from '../namespace';\nimport { SnapIdStruct } from '../snaps';\nimport type { InferMatching } from '../structs';\nimport { NameStruct, NpmSnapFileNames, uri } from '../types';\n\n// BIP-43 purposes that cannot be used for entropy derivation. These are in the\n// string form, ending with `'`.\nconst FORBIDDEN_PURPOSES: string[] = [\n SIP_6_MAGIC_VALUE,\n STATE_ENCRYPTION_MAGIC_VALUE,\n];\n\nexport const FORBIDDEN_COIN_TYPES: number[] = [60];\nconst FORBIDDEN_PATHS: string[][] = FORBIDDEN_COIN_TYPES.map((coinType) => [\n 'm',\n \"44'\",\n `${coinType}'`,\n]);\n\nexport const Bip32PathStruct = refine(\n array(string()),\n 'BIP-32 path',\n (path: string[]) => {\n if (path.length === 0) {\n return 'Path must be a non-empty BIP-32 derivation path array';\n }\n\n if (path[0] !== 'm') {\n return 'Path must start with \"m\".';\n }\n\n if (path.length < 3) {\n return 'Paths must have a length of at least three.';\n }\n\n if (path.slice(1).some((part) => !isValidBIP32PathSegment(part))) {\n return 'Path must be a valid BIP-32 derivation path array.';\n }\n\n if (FORBIDDEN_PURPOSES.includes(path[1])) {\n return `The purpose \"${path[1]}\" is not allowed for entropy derivation.`;\n }\n\n if (\n FORBIDDEN_PATHS.some((forbiddenPath) =>\n isEqual(path.slice(0, forbiddenPath.length), forbiddenPath),\n )\n ) {\n return `The path \"${path.join(\n '/',\n )}\" is not allowed for entropy derivation.`;\n }\n\n return true;\n },\n);\n\nexport const bip32entropy = <\n Type extends { path: string[]; curve: string },\n Schema,\n>(\n struct: Struct<Type, Schema>,\n) =>\n refine(struct, 'BIP-32 entropy', (value) => {\n if (\n value.curve === 'ed25519' &&\n value.path.slice(1).some((part) => !part.endsWith(\"'\"))\n ) {\n return 'Ed25519 does not support unhardened paths.';\n }\n\n return true;\n });\n\n// Used outside @metamask/snap-utils\nexport const Bip32EntropyStruct = bip32entropy(\n type({\n path: Bip32PathStruct,\n curve: enums(['ed25519', 'secp256k1']),\n }),\n);\n\nexport type Bip32Entropy = Infer<typeof Bip32EntropyStruct>;\n\nexport const SnapGetBip32EntropyPermissionsStruct = size(\n array(Bip32EntropyStruct),\n 1,\n Infinity,\n);\n\nexport const SemVerRangeStruct = refine(string(), 'SemVer range', (value) => {\n if (isValidSemVerRange(value)) {\n return true;\n }\n return 'Expected a valid SemVer range.';\n});\n\nexport const SnapIdsStruct = refine(\n record(SnapIdStruct, object({ version: optional(SemVerRangeStruct) })),\n 'SnapIds',\n (value) => {\n if (Object.keys(value).length === 0) {\n return false;\n }\n\n return true;\n },\n);\n\nexport type SnapIds = Infer<typeof SnapIdsStruct>;\n\nexport const ChainIdsStruct = size(array(ChainIdStruct), 1, Infinity);\n\nexport const LookupMatchersStruct = union([\n object({\n tlds: size(array(string()), 1, Infinity),\n }),\n object({\n schemes: size(array(string()), 1, Infinity),\n }),\n object({\n tlds: size(array(string()), 1, Infinity),\n schemes: size(array(string()), 1, Infinity),\n }),\n]);\n\nexport const MINIMUM_REQUEST_TIMEOUT = inMilliseconds(5, Duration.Second);\nexport const MAXIMUM_REQUEST_TIMEOUT = inMilliseconds(3, Duration.Minute);\n\nexport const MaxRequestTimeStruct = size(\n integer(),\n MINIMUM_REQUEST_TIMEOUT,\n MAXIMUM_REQUEST_TIMEOUT,\n);\n\n// Utility type to union with for all handler structs\nexport const HandlerCaveatsStruct = object({\n maxRequestTime: optional(MaxRequestTimeStruct),\n});\n\nexport type HandlerCaveats = Infer<typeof HandlerCaveatsStruct>;\n\nexport const EmptyObjectStruct = object<EmptyObject>({}) as unknown as Struct<\n EmptyObject,\n null\n>;\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport const PermissionsStruct: Describe<InitialPermissions> = type({\n 'endowment:cronjob': optional(\n assign(\n HandlerCaveatsStruct,\n object({ jobs: CronjobSpecificationArrayStruct }),\n ),\n ),\n 'endowment:ethereum-provider': optional(EmptyObjectStruct),\n 'endowment:keyring': optional(\n assign(HandlerCaveatsStruct, KeyringOriginsStruct),\n ),\n 'endowment:lifecycle-hooks': optional(HandlerCaveatsStruct),\n 'endowment:name-lookup': optional(\n assign(\n HandlerCaveatsStruct,\n object({\n chains: optional(ChainIdsStruct),\n matchers: optional(LookupMatchersStruct),\n }),\n ),\n ),\n 'endowment:network-access': optional(EmptyObjectStruct),\n 'endowment:page-home': optional(HandlerCaveatsStruct),\n 'endowment:rpc': optional(assign(HandlerCaveatsStruct, RpcOriginsStruct)),\n 'endowment:signature-insight': optional(\n assign(\n HandlerCaveatsStruct,\n object({\n allowSignatureOrigin: optional(boolean()),\n }),\n ),\n ),\n 'endowment:transaction-insight': optional(\n assign(\n HandlerCaveatsStruct,\n object({\n allowTransactionOrigin: optional(boolean()),\n }),\n ),\n ),\n 'endowment:webassembly': optional(EmptyObjectStruct),\n snap_dialog: optional(EmptyObjectStruct),\n snap_manageState: optional(EmptyObjectStruct),\n snap_manageAccounts: optional(EmptyObjectStruct),\n snap_notify: optional(EmptyObjectStruct),\n snap_getBip32Entropy: optional(SnapGetBip32EntropyPermissionsStruct),\n snap_getBip32PublicKey: optional(SnapGetBip32EntropyPermissionsStruct),\n snap_getBip44Entropy: optional(\n size(\n array(object({ coinType: size(integer(), 0, 2 ** 32 - 1) })),\n 1,\n Infinity,\n ),\n ),\n snap_getEntropy: optional(EmptyObjectStruct),\n snap_getLocale: optional(EmptyObjectStruct),\n wallet_snap: optional(SnapIdsStruct),\n});\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type SnapPermissions = InferMatching<\n typeof PermissionsStruct,\n InitialPermissions\n>;\n\nexport const SnapAuxilaryFilesStruct = array(string());\n\nexport const InitialConnectionsStruct = record(\n intersection([string(), uri()]),\n object({}),\n);\n\nexport type InitialConnections = Infer<typeof InitialConnectionsStruct>;\n\nexport const SnapManifestStruct = object({\n version: VersionStruct,\n description: size(string(), 1, 280),\n proposedName: size(string(), 1, 214),\n repository: optional(\n object({\n type: size(string(), 1, Infinity),\n url: size(string(), 1, Infinity),\n }),\n ),\n source: object({\n shasum: ChecksumStruct,\n location: object({\n npm: object({\n filePath: size(string(), 1, Infinity),\n iconPath: optional(size(string(), 1, Infinity)),\n packageName: NameStruct,\n registry: union([\n literal('https://registry.npmjs.org'),\n literal('https://registry.npmjs.org/'),\n ]),\n }),\n }),\n files: optional(SnapAuxilaryFilesStruct),\n locales: optional(SnapAuxilaryFilesStruct),\n }),\n initialConnections: optional(InitialConnectionsStruct),\n initialPermissions: PermissionsStruct,\n manifestVersion: literal('0.1'),\n $schema: optional(string()), // enables JSON-Schema linting in VSC and other IDEs\n});\n\nexport type SnapManifest = Infer<typeof SnapManifestStruct>;\n\n/**\n * Check if the given value is a valid {@link SnapManifest} object.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid {@link SnapManifest} object.\n */\nexport function isSnapManifest(value: unknown): value is SnapManifest {\n return is(value, SnapManifestStruct);\n}\n\n/**\n * Assert that the given value is a valid {@link SnapManifest} object.\n *\n * @param value - The value to check.\n * @throws If the value is not a valid {@link SnapManifest} object.\n */\nexport function assertIsSnapManifest(\n value: unknown,\n): asserts value is SnapManifest {\n assertStruct(\n value,\n SnapManifestStruct,\n `\"${NpmSnapFileNames.Manifest}\" is invalid`,\n );\n}\n\n/**\n * Creates a {@link SnapManifest} object from JSON.\n *\n * @param value - The value to check.\n * @throws If the value cannot be coerced to a {@link SnapManifest} object.\n * @returns The created {@link SnapManifest} object.\n */\nexport function createSnapManifest(value: unknown): SnapManifest {\n // TODO: Add a utility to prefix these errors similar to assertStruct\n return create(value, SnapManifestStruct);\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLTWLSRSRjs = require('./chunk-LTWLSRSR.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkTG4BDSYJjs = require('./chunk-TG4BDSYJ.js');
|
|
@@ -13,7 +13,7 @@ var _chunkAFQY2CNYjs = require('./chunk-AFQY2CNY.js');
|
|
|
13
13
|
|
|
14
14
|
// src/validation.ts
|
|
15
15
|
async function validateFetchedSnap(files) {
|
|
16
|
-
|
|
16
|
+
_chunkLTWLSRSRjs.assertIsSnapManifest.call(void 0, files.manifest.result);
|
|
17
17
|
await _chunkTG4BDSYJjs.validateSnapShasum.call(void 0, files);
|
|
18
18
|
_chunkAFQY2CNYjs.validateSnapManifestLocalizations.call(void 0,
|
|
19
19
|
files.manifest.result,
|
|
@@ -27,4 +27,4 @@ async function validateFetchedSnap(files) {
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
exports.validateFetchedSnap = validateFetchedSnap;
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-OK2Q2GT7.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertIsSnapManifest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6F2DZTGM.mjs";
|
|
4
4
|
import {
|
|
5
5
|
validateSnapShasum
|
|
6
6
|
} from "./chunk-2IWSQJKQ.mjs";
|
|
@@ -27,4 +27,4 @@ async function validateFetchedSnap(files) {
|
|
|
27
27
|
export {
|
|
28
28
|
validateFetchedSnap
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-RQVVWCOW.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertIsSnapManifest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6F2DZTGM.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ProgrammaticallyFixableSnapError,
|
|
6
6
|
getSnapChecksum,
|
|
@@ -406,4 +406,4 @@ export {
|
|
|
406
406
|
getWritableManifest,
|
|
407
407
|
validateNpmSnapManifest
|
|
408
408
|
};
|
|
409
|
-
//# sourceMappingURL=chunk-
|
|
409
|
+
//# sourceMappingURL=chunk-ZO24JBZA.mjs.map
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var _chunkIJX3CXOYjs = require('./chunk-IJX3CXOY.js');
|
|
|
23
23
|
var _chunkEX4PPLNDjs = require('./chunk-EX4PPLND.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkOK2Q2GT7js = require('./chunk-OK2Q2GT7.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -51,7 +51,8 @@ require('./chunk-4CMD46B2.js');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
|
|
55
|
+
var _chunkLTWLSRSRjs = require('./chunk-LTWLSRSR.js');
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
var _chunkAOGVLPQZjs = require('./chunk-AOGVLPQZ.js');
|
|
@@ -374,5 +375,6 @@ require('./chunk-PHUTP7NB.js');
|
|
|
374
375
|
|
|
375
376
|
|
|
376
377
|
|
|
377
|
-
exports.ACCOUNT_ADDRESS_REGEX = _chunk6LOYTBS3js.ACCOUNT_ADDRESS_REGEX; exports.ACCOUNT_ID_REGEX = _chunk6LOYTBS3js.ACCOUNT_ID_REGEX; exports.AccountAddressStruct = _chunk6LOYTBS3js.AccountAddressStruct; exports.AccountIdArrayStruct = _chunk6LOYTBS3js.AccountIdArrayStruct; exports.AccountIdStruct = _chunk6LOYTBS3js.AccountIdStruct; exports.AddressResolutionResponseStruct = _chunk3SOYDY4Wjs.AddressResolutionResponseStruct; exports.AddressResolutionStruct = _chunk3SOYDY4Wjs.AddressResolutionStruct; exports.BaseSnapIdStruct = _chunkTG4BDSYJjs.BaseSnapIdStruct; exports.Bip32EntropyStruct = _chunkENKAY3PIjs.Bip32EntropyStruct; exports.Bip32PathStruct = _chunkENKAY3PIjs.Bip32PathStruct; exports.CHAIN_ID_REGEX = _chunk6LOYTBS3js.CHAIN_ID_REGEX; exports.ChainIdStringStruct = _chunk6LOYTBS3js.ChainIdStringStruct; exports.ChainIdStruct = _chunk6LOYTBS3js.ChainIdStruct; exports.ChainIdsStruct = _chunkENKAY3PIjs.ChainIdsStruct; exports.ChainStruct = _chunk6LOYTBS3js.ChainStruct; exports.CronExpressionStruct = _chunk2LBN5T56js.CronExpressionStruct; exports.CronjobRpcRequestStruct = _chunk2LBN5T56js.CronjobRpcRequestStruct; exports.CronjobSpecificationArrayStruct = _chunk2LBN5T56js.CronjobSpecificationArrayStruct; exports.CronjobSpecificationStruct = _chunk2LBN5T56js.CronjobSpecificationStruct; exports.DEFAULT_ENDOWMENTS = _chunkN722KRZWjs.DEFAULT_ENDOWMENTS; exports.DEFAULT_REQUESTED_SNAP_VERSION = _chunkIPOE62V4js.DEFAULT_REQUESTED_SNAP_VERSION; exports.DomainResolutionResponseStruct = _chunk3SOYDY4Wjs.DomainResolutionResponseStruct; exports.DomainResolutionStruct = _chunk3SOYDY4Wjs.DomainResolutionStruct; exports.FORBIDDEN_COIN_TYPES = _chunkENKAY3PIjs.FORBIDDEN_COIN_TYPES; exports.HandlerCaveatsStruct = _chunkENKAY3PIjs.HandlerCaveatsStruct; exports.HandlerType = _chunkLEKZPKS2js.HandlerType; exports.HttpSnapIdStruct = _chunkTG4BDSYJjs.HttpSnapIdStruct; exports.InitialConnectionsStruct = _chunkENKAY3PIjs.InitialConnectionsStruct; exports.KeyringOriginsStruct = _chunkCQRPSEH3js.KeyringOriginsStruct; exports.LOCALHOST_HOSTNAMES = _chunkTG4BDSYJjs.LOCALHOST_HOSTNAMES; exports.LOCALIZABLE_FIELDS = _chunkAFQY2CNYjs.LOCALIZABLE_FIELDS; exports.LimitedString = _chunk6LOYTBS3js.LimitedString; exports.LocalSnapIdStruct = _chunkTG4BDSYJjs.LocalSnapIdStruct; exports.LocalizationFileStruct = _chunkAFQY2CNYjs.LocalizationFileStruct; exports.LookupMatchersStruct = _chunkENKAY3PIjs.LookupMatchersStruct; exports.MAXIMUM_REQUEST_TIMEOUT = _chunkENKAY3PIjs.MAXIMUM_REQUEST_TIMEOUT; exports.MINIMUM_REQUEST_TIMEOUT = _chunkENKAY3PIjs.MINIMUM_REQUEST_TIMEOUT; exports.MaxRequestTimeStruct = _chunkENKAY3PIjs.MaxRequestTimeStruct; exports.NameStruct = _chunkCMOSYNZRjs.NameStruct; exports.NamespaceIdStruct = _chunk6LOYTBS3js.NamespaceIdStruct; exports.NamespaceStruct = _chunk6LOYTBS3js.NamespaceStruct; exports.NpmSnapFileNames = _chunkCMOSYNZRjs.NpmSnapFileNames; exports.NpmSnapIdStruct = _chunkTG4BDSYJjs.NpmSnapIdStruct; exports.NpmSnapPackageJsonStruct = _chunkCMOSYNZRjs.NpmSnapPackageJsonStruct; exports.OnHomePageResponseStruct = _chunk3SOYDY4Wjs.OnHomePageResponseStruct; exports.OnHomePageResponseWithContentStruct = _chunk3SOYDY4Wjs.OnHomePageResponseWithContentStruct; exports.OnHomePageResponseWithIdStruct = _chunk3SOYDY4Wjs.OnHomePageResponseWithIdStruct; exports.OnNameLookupResponseStruct = _chunk3SOYDY4Wjs.OnNameLookupResponseStruct; exports.OnSignatureResponseStruct = _chunk3SOYDY4Wjs.OnSignatureResponseStruct; exports.OnTransactionResponseStruct = _chunk3SOYDY4Wjs.OnTransactionResponseStruct; exports.OnTransactionResponseWithContentStruct = _chunk3SOYDY4Wjs.OnTransactionResponseWithContentStruct; exports.OnTransactionResponseWithIdStruct = _chunk3SOYDY4Wjs.OnTransactionResponseWithIdStruct; exports.OnTransactionSeverityResponseStruct = _chunk3SOYDY4Wjs.OnTransactionSeverityResponseStruct; exports.PROPOSED_NAME_REGEX = _chunkTG4BDSYJjs.PROPOSED_NAME_REGEX; exports.PermissionsStruct = _chunkENKAY3PIjs.PermissionsStruct; exports.ProgrammaticallyFixableSnapError = _chunkTG4BDSYJjs.ProgrammaticallyFixableSnapError; exports.RpcOriginsStruct = _chunkCQRPSEH3js.RpcOriginsStruct; exports.SIP_6_MAGIC_VALUE = _chunkZT3KKTS2js.SIP_6_MAGIC_VALUE; exports.SNAPS_DERIVATION_PATHS = _chunk2PCPD5XYjs.SNAPS_DERIVATION_PATHS; exports.SNAP_ERROR_WRAPPER_CODE = _chunkK6BCBPXFjs.SNAP_ERROR_WRAPPER_CODE; exports.SNAP_ERROR_WRAPPER_MESSAGE = _chunkK6BCBPXFjs.SNAP_ERROR_WRAPPER_MESSAGE; exports.SNAP_EXPORTS = _chunk3SOYDY4Wjs.SNAP_EXPORTS; exports.SNAP_EXPORT_NAMES = _chunkLEKZPKS2js.SNAP_EXPORT_NAMES; exports.SNAP_STREAM_NAMES = _chunkCMOSYNZRjs.SNAP_STREAM_NAMES; exports.STATE_ENCRYPTION_MAGIC_VALUE = _chunkZT3KKTS2js.STATE_ENCRYPTION_MAGIC_VALUE; exports.SemVerRangeStruct = _chunkENKAY3PIjs.SemVerRangeStruct; exports.SnapAuxilaryFilesStruct = _chunkENKAY3PIjs.SnapAuxilaryFilesStruct; exports.SnapCaveatType = _chunkASZWZ7JTjs.SnapCaveatType; exports.SnapGetBip32EntropyPermissionsStruct = _chunkENKAY3PIjs.SnapGetBip32EntropyPermissionsStruct; exports.SnapIdPrefixes = _chunkCMOSYNZRjs.SnapIdPrefixes; exports.SnapIdStruct = _chunkTG4BDSYJjs.SnapIdStruct; exports.SnapIdsStruct = _chunkENKAY3PIjs.SnapIdsStruct; exports.SnapManifestStruct = _chunkENKAY3PIjs.SnapManifestStruct; exports.SnapStatus = _chunkTG4BDSYJjs.SnapStatus; exports.SnapStatusEvents = _chunkTG4BDSYJjs.SnapStatusEvents; exports.SnapValidationFailureReason = _chunkCMOSYNZRjs.SnapValidationFailureReason; exports.SnapsStructError = _chunkA6E325SZjs.SnapsStructError; exports.TRANSLATION_REGEX = _chunkAFQY2CNYjs.TRANSLATION_REGEX; exports.VirtualFile = _chunkHJYRGKCXjs.VirtualFile; exports.WALLET_SNAP_PERMISSION_KEY = _chunkCMOSYNZRjs.WALLET_SNAP_PERMISSION_KEY; exports.WrappedSnapError = _chunkK6BCBPXFjs.WrappedSnapError; exports.arrayToGenerator = _chunkA6E325SZjs.arrayToGenerator; exports.assertIsJsonRpcSuccess = _chunkCQRPSEH3js.assertIsJsonRpcSuccess; exports.assertIsKeyringOrigins = _chunkCQRPSEH3js.assertIsKeyringOrigins; exports.assertIsNpmSnapPackageJson = _chunkCMOSYNZRjs.assertIsNpmSnapPackageJson; exports.assertIsRpcOrigins = _chunkCQRPSEH3js.assertIsRpcOrigins; exports.assertIsSnapManifest = _chunkENKAY3PIjs.assertIsSnapManifest; exports.assertIsValidSnapId = _chunkTG4BDSYJjs.assertIsValidSnapId; exports.bip32entropy = _chunkENKAY3PIjs.bip32entropy; exports.checksum = _chunkMLOQHUOYjs.checksum; exports.checksumFiles = _chunkMLOQHUOYjs.checksumFiles; exports.createFromStruct = _chunkA6E325SZjs.createFromStruct; exports.createSnapManifest = _chunkENKAY3PIjs.createSnapManifest; exports.createUnion = _chunkA6E325SZjs.createUnion; exports.createWindow = _chunkPLBSSUVYjs.createWindow; exports.decodeBase64 = _chunkIHQPAJ2Bjs.decodeBase64; exports.deepClone = _chunkNUCLSR2Gjs.deepClone; exports.encodeAuxiliaryFile = _chunkIXBJNVHKjs.encodeAuxiliaryFile; exports.encodeBase64 = _chunkIHQPAJ2Bjs.encodeBase64; exports.getBytes = _chunk473MIETWjs.getBytes; exports.getError = _chunkA6E325SZjs.getError; exports.getLocalizationFile = _chunkAFQY2CNYjs.getLocalizationFile; exports.getLocalizedSnapManifest = _chunkAFQY2CNYjs.getLocalizedSnapManifest; exports.getSlip44ProtocolName = _chunk2PCPD5XYjs.getSlip44ProtocolName; exports.getSnapChecksum = _chunkTG4BDSYJjs.getSnapChecksum; exports.getSnapDerivationPathName = _chunk2PCPD5XYjs.getSnapDerivationPathName; exports.getSnapPrefix = _chunkTG4BDSYJjs.getSnapPrefix; exports.getStructErrorMessage = _chunkA6E325SZjs.getStructErrorMessage; exports.getStructErrorPrefix = _chunkA6E325SZjs.getStructErrorPrefix; exports.getStructFailureMessage = _chunkA6E325SZjs.getStructFailureMessage; exports.getStructFromPath = _chunkA6E325SZjs.getStructFromPath; exports.getTargetVersion = _chunkIPOE62V4js.getTargetVersion; exports.getTotalTextLength = _chunkEX4PPLNDjs.getTotalTextLength; exports.getUnionStructNames = _chunkA6E325SZjs.getUnionStructNames; exports.getValidatedLocalizationFiles = _chunkAFQY2CNYjs.getValidatedLocalizationFiles; exports.indent = _chunkIJX3CXOYjs.indent; exports.isAccountId = _chunk6LOYTBS3js.isAccountId; exports.isAccountIdArray = _chunk6LOYTBS3js.isAccountIdArray; exports.isCaipChainId = _chunkTG4BDSYJjs.isCaipChainId; exports.isChainId = _chunk6LOYTBS3js.isChainId; exports.isCronjobSpecification = _chunk2LBN5T56js.isCronjobSpecification; exports.isCronjobSpecificationArray = _chunk2LBN5T56js.isCronjobSpecificationArray; exports.isEqual = _chunkT3YY4JIJjs.isEqual; exports.isNamespace = _chunk6LOYTBS3js.isNamespace; exports.isNamespaceId = _chunk6LOYTBS3js.isNamespaceId; exports.isNpmSnapPackageJson = _chunkCMOSYNZRjs.isNpmSnapPackageJson; exports.isOriginAllowed = _chunkCQRPSEH3js.isOriginAllowed; exports.isSerializedSnapError = _chunkK6BCBPXFjs.isSerializedSnapError; exports.isSnapError = _chunkK6BCBPXFjs.isSnapError; exports.isSnapManifest = _chunkENKAY3PIjs.isSnapManifest; exports.isSnapPermitted = _chunkTG4BDSYJjs.isSnapPermitted; exports.isValidUrl = _chunkCMOSYNZRjs.isValidUrl; exports.isWrappedSnapError = _chunkK6BCBPXFjs.isWrappedSnapError; exports.logError = _chunkE3BDBG6Tjs.logError; exports.logInfo = _chunkE3BDBG6Tjs.logInfo; exports.logWarning = _chunkE3BDBG6Tjs.logWarning; exports.named = _chunkA6E325SZjs.named; exports.normalizeRelative = _chunkAOGVLPQZjs.normalizeRelative; exports.parseAccountId = _chunk6LOYTBS3js.parseAccountId; exports.parseChainId = _chunk6LOYTBS3js.parseChainId; exports.parseCronExpression = _chunk2LBN5T56js.parseCronExpression; exports.parseJson = _chunkHF7HUZ5Zjs.parseJson; exports.resolveVersionRange = _chunkIPOE62V4js.resolveVersionRange; exports.snapsLogger = _chunkE3BDBG6Tjs.snapsLogger; exports.stripSnapPrefix = _chunkTG4BDSYJjs.stripSnapPrefix; exports.translate = _chunkAFQY2CNYjs.translate; exports.unwrapError = _chunkK6BCBPXFjs.unwrapError; exports.uri = _chunkCMOSYNZRjs.uri; exports.validateComponentLinks = _chunkEX4PPLNDjs.validateComponentLinks; exports.validateFetchedSnap = _chunkYMUOYQFUjs.validateFetchedSnap; exports.validateSnapManifestLocalizations = _chunkAFQY2CNYjs.validateSnapManifestLocalizations; exports.validateSnapShasum = _chunkTG4BDSYJjs.validateSnapShasum; exports.validateTextLinks = _chunkEX4PPLNDjs.validateTextLinks; exports.validateUnion = _chunkA6E325SZjs.validateUnion; exports.verifyRequestedSnapPermissions = _chunkTG4BDSYJjs.verifyRequestedSnapPermissions;
|
|
378
|
+
|
|
379
|
+
exports.ACCOUNT_ADDRESS_REGEX = _chunk6LOYTBS3js.ACCOUNT_ADDRESS_REGEX; exports.ACCOUNT_ID_REGEX = _chunk6LOYTBS3js.ACCOUNT_ID_REGEX; exports.AccountAddressStruct = _chunk6LOYTBS3js.AccountAddressStruct; exports.AccountIdArrayStruct = _chunk6LOYTBS3js.AccountIdArrayStruct; exports.AccountIdStruct = _chunk6LOYTBS3js.AccountIdStruct; exports.AddressResolutionResponseStruct = _chunk3SOYDY4Wjs.AddressResolutionResponseStruct; exports.AddressResolutionStruct = _chunk3SOYDY4Wjs.AddressResolutionStruct; exports.BaseSnapIdStruct = _chunkTG4BDSYJjs.BaseSnapIdStruct; exports.Bip32EntropyStruct = _chunkLTWLSRSRjs.Bip32EntropyStruct; exports.Bip32PathStruct = _chunkLTWLSRSRjs.Bip32PathStruct; exports.CHAIN_ID_REGEX = _chunk6LOYTBS3js.CHAIN_ID_REGEX; exports.ChainIdStringStruct = _chunk6LOYTBS3js.ChainIdStringStruct; exports.ChainIdStruct = _chunk6LOYTBS3js.ChainIdStruct; exports.ChainIdsStruct = _chunkLTWLSRSRjs.ChainIdsStruct; exports.ChainStruct = _chunk6LOYTBS3js.ChainStruct; exports.CronExpressionStruct = _chunk2LBN5T56js.CronExpressionStruct; exports.CronjobRpcRequestStruct = _chunk2LBN5T56js.CronjobRpcRequestStruct; exports.CronjobSpecificationArrayStruct = _chunk2LBN5T56js.CronjobSpecificationArrayStruct; exports.CronjobSpecificationStruct = _chunk2LBN5T56js.CronjobSpecificationStruct; exports.DEFAULT_ENDOWMENTS = _chunkN722KRZWjs.DEFAULT_ENDOWMENTS; exports.DEFAULT_REQUESTED_SNAP_VERSION = _chunkIPOE62V4js.DEFAULT_REQUESTED_SNAP_VERSION; exports.DomainResolutionResponseStruct = _chunk3SOYDY4Wjs.DomainResolutionResponseStruct; exports.DomainResolutionStruct = _chunk3SOYDY4Wjs.DomainResolutionStruct; exports.EmptyObjectStruct = _chunkLTWLSRSRjs.EmptyObjectStruct; exports.FORBIDDEN_COIN_TYPES = _chunkLTWLSRSRjs.FORBIDDEN_COIN_TYPES; exports.HandlerCaveatsStruct = _chunkLTWLSRSRjs.HandlerCaveatsStruct; exports.HandlerType = _chunkLEKZPKS2js.HandlerType; exports.HttpSnapIdStruct = _chunkTG4BDSYJjs.HttpSnapIdStruct; exports.InitialConnectionsStruct = _chunkLTWLSRSRjs.InitialConnectionsStruct; exports.KeyringOriginsStruct = _chunkCQRPSEH3js.KeyringOriginsStruct; exports.LOCALHOST_HOSTNAMES = _chunkTG4BDSYJjs.LOCALHOST_HOSTNAMES; exports.LOCALIZABLE_FIELDS = _chunkAFQY2CNYjs.LOCALIZABLE_FIELDS; exports.LimitedString = _chunk6LOYTBS3js.LimitedString; exports.LocalSnapIdStruct = _chunkTG4BDSYJjs.LocalSnapIdStruct; exports.LocalizationFileStruct = _chunkAFQY2CNYjs.LocalizationFileStruct; exports.LookupMatchersStruct = _chunkLTWLSRSRjs.LookupMatchersStruct; exports.MAXIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MAXIMUM_REQUEST_TIMEOUT; exports.MINIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MINIMUM_REQUEST_TIMEOUT; exports.MaxRequestTimeStruct = _chunkLTWLSRSRjs.MaxRequestTimeStruct; exports.NameStruct = _chunkCMOSYNZRjs.NameStruct; exports.NamespaceIdStruct = _chunk6LOYTBS3js.NamespaceIdStruct; exports.NamespaceStruct = _chunk6LOYTBS3js.NamespaceStruct; exports.NpmSnapFileNames = _chunkCMOSYNZRjs.NpmSnapFileNames; exports.NpmSnapIdStruct = _chunkTG4BDSYJjs.NpmSnapIdStruct; exports.NpmSnapPackageJsonStruct = _chunkCMOSYNZRjs.NpmSnapPackageJsonStruct; exports.OnHomePageResponseStruct = _chunk3SOYDY4Wjs.OnHomePageResponseStruct; exports.OnHomePageResponseWithContentStruct = _chunk3SOYDY4Wjs.OnHomePageResponseWithContentStruct; exports.OnHomePageResponseWithIdStruct = _chunk3SOYDY4Wjs.OnHomePageResponseWithIdStruct; exports.OnNameLookupResponseStruct = _chunk3SOYDY4Wjs.OnNameLookupResponseStruct; exports.OnSignatureResponseStruct = _chunk3SOYDY4Wjs.OnSignatureResponseStruct; exports.OnTransactionResponseStruct = _chunk3SOYDY4Wjs.OnTransactionResponseStruct; exports.OnTransactionResponseWithContentStruct = _chunk3SOYDY4Wjs.OnTransactionResponseWithContentStruct; exports.OnTransactionResponseWithIdStruct = _chunk3SOYDY4Wjs.OnTransactionResponseWithIdStruct; exports.OnTransactionSeverityResponseStruct = _chunk3SOYDY4Wjs.OnTransactionSeverityResponseStruct; exports.PROPOSED_NAME_REGEX = _chunkTG4BDSYJjs.PROPOSED_NAME_REGEX; exports.PermissionsStruct = _chunkLTWLSRSRjs.PermissionsStruct; exports.ProgrammaticallyFixableSnapError = _chunkTG4BDSYJjs.ProgrammaticallyFixableSnapError; exports.RpcOriginsStruct = _chunkCQRPSEH3js.RpcOriginsStruct; exports.SIP_6_MAGIC_VALUE = _chunkZT3KKTS2js.SIP_6_MAGIC_VALUE; exports.SNAPS_DERIVATION_PATHS = _chunk2PCPD5XYjs.SNAPS_DERIVATION_PATHS; exports.SNAP_ERROR_WRAPPER_CODE = _chunkK6BCBPXFjs.SNAP_ERROR_WRAPPER_CODE; exports.SNAP_ERROR_WRAPPER_MESSAGE = _chunkK6BCBPXFjs.SNAP_ERROR_WRAPPER_MESSAGE; exports.SNAP_EXPORTS = _chunk3SOYDY4Wjs.SNAP_EXPORTS; exports.SNAP_EXPORT_NAMES = _chunkLEKZPKS2js.SNAP_EXPORT_NAMES; exports.SNAP_STREAM_NAMES = _chunkCMOSYNZRjs.SNAP_STREAM_NAMES; exports.STATE_ENCRYPTION_MAGIC_VALUE = _chunkZT3KKTS2js.STATE_ENCRYPTION_MAGIC_VALUE; exports.SemVerRangeStruct = _chunkLTWLSRSRjs.SemVerRangeStruct; exports.SnapAuxilaryFilesStruct = _chunkLTWLSRSRjs.SnapAuxilaryFilesStruct; exports.SnapCaveatType = _chunkASZWZ7JTjs.SnapCaveatType; exports.SnapGetBip32EntropyPermissionsStruct = _chunkLTWLSRSRjs.SnapGetBip32EntropyPermissionsStruct; exports.SnapIdPrefixes = _chunkCMOSYNZRjs.SnapIdPrefixes; exports.SnapIdStruct = _chunkTG4BDSYJjs.SnapIdStruct; exports.SnapIdsStruct = _chunkLTWLSRSRjs.SnapIdsStruct; exports.SnapManifestStruct = _chunkLTWLSRSRjs.SnapManifestStruct; exports.SnapStatus = _chunkTG4BDSYJjs.SnapStatus; exports.SnapStatusEvents = _chunkTG4BDSYJjs.SnapStatusEvents; exports.SnapValidationFailureReason = _chunkCMOSYNZRjs.SnapValidationFailureReason; exports.SnapsStructError = _chunkA6E325SZjs.SnapsStructError; exports.TRANSLATION_REGEX = _chunkAFQY2CNYjs.TRANSLATION_REGEX; exports.VirtualFile = _chunkHJYRGKCXjs.VirtualFile; exports.WALLET_SNAP_PERMISSION_KEY = _chunkCMOSYNZRjs.WALLET_SNAP_PERMISSION_KEY; exports.WrappedSnapError = _chunkK6BCBPXFjs.WrappedSnapError; exports.arrayToGenerator = _chunkA6E325SZjs.arrayToGenerator; exports.assertIsJsonRpcSuccess = _chunkCQRPSEH3js.assertIsJsonRpcSuccess; exports.assertIsKeyringOrigins = _chunkCQRPSEH3js.assertIsKeyringOrigins; exports.assertIsNpmSnapPackageJson = _chunkCMOSYNZRjs.assertIsNpmSnapPackageJson; exports.assertIsRpcOrigins = _chunkCQRPSEH3js.assertIsRpcOrigins; exports.assertIsSnapManifest = _chunkLTWLSRSRjs.assertIsSnapManifest; exports.assertIsValidSnapId = _chunkTG4BDSYJjs.assertIsValidSnapId; exports.bip32entropy = _chunkLTWLSRSRjs.bip32entropy; exports.checksum = _chunkMLOQHUOYjs.checksum; exports.checksumFiles = _chunkMLOQHUOYjs.checksumFiles; exports.createFromStruct = _chunkA6E325SZjs.createFromStruct; exports.createSnapManifest = _chunkLTWLSRSRjs.createSnapManifest; exports.createUnion = _chunkA6E325SZjs.createUnion; exports.createWindow = _chunkPLBSSUVYjs.createWindow; exports.decodeBase64 = _chunkIHQPAJ2Bjs.decodeBase64; exports.deepClone = _chunkNUCLSR2Gjs.deepClone; exports.encodeAuxiliaryFile = _chunkIXBJNVHKjs.encodeAuxiliaryFile; exports.encodeBase64 = _chunkIHQPAJ2Bjs.encodeBase64; exports.getBytes = _chunk473MIETWjs.getBytes; exports.getError = _chunkA6E325SZjs.getError; exports.getLocalizationFile = _chunkAFQY2CNYjs.getLocalizationFile; exports.getLocalizedSnapManifest = _chunkAFQY2CNYjs.getLocalizedSnapManifest; exports.getSlip44ProtocolName = _chunk2PCPD5XYjs.getSlip44ProtocolName; exports.getSnapChecksum = _chunkTG4BDSYJjs.getSnapChecksum; exports.getSnapDerivationPathName = _chunk2PCPD5XYjs.getSnapDerivationPathName; exports.getSnapPrefix = _chunkTG4BDSYJjs.getSnapPrefix; exports.getStructErrorMessage = _chunkA6E325SZjs.getStructErrorMessage; exports.getStructErrorPrefix = _chunkA6E325SZjs.getStructErrorPrefix; exports.getStructFailureMessage = _chunkA6E325SZjs.getStructFailureMessage; exports.getStructFromPath = _chunkA6E325SZjs.getStructFromPath; exports.getTargetVersion = _chunkIPOE62V4js.getTargetVersion; exports.getTotalTextLength = _chunkEX4PPLNDjs.getTotalTextLength; exports.getUnionStructNames = _chunkA6E325SZjs.getUnionStructNames; exports.getValidatedLocalizationFiles = _chunkAFQY2CNYjs.getValidatedLocalizationFiles; exports.indent = _chunkIJX3CXOYjs.indent; exports.isAccountId = _chunk6LOYTBS3js.isAccountId; exports.isAccountIdArray = _chunk6LOYTBS3js.isAccountIdArray; exports.isCaipChainId = _chunkTG4BDSYJjs.isCaipChainId; exports.isChainId = _chunk6LOYTBS3js.isChainId; exports.isCronjobSpecification = _chunk2LBN5T56js.isCronjobSpecification; exports.isCronjobSpecificationArray = _chunk2LBN5T56js.isCronjobSpecificationArray; exports.isEqual = _chunkT3YY4JIJjs.isEqual; exports.isNamespace = _chunk6LOYTBS3js.isNamespace; exports.isNamespaceId = _chunk6LOYTBS3js.isNamespaceId; exports.isNpmSnapPackageJson = _chunkCMOSYNZRjs.isNpmSnapPackageJson; exports.isOriginAllowed = _chunkCQRPSEH3js.isOriginAllowed; exports.isSerializedSnapError = _chunkK6BCBPXFjs.isSerializedSnapError; exports.isSnapError = _chunkK6BCBPXFjs.isSnapError; exports.isSnapManifest = _chunkLTWLSRSRjs.isSnapManifest; exports.isSnapPermitted = _chunkTG4BDSYJjs.isSnapPermitted; exports.isValidUrl = _chunkCMOSYNZRjs.isValidUrl; exports.isWrappedSnapError = _chunkK6BCBPXFjs.isWrappedSnapError; exports.logError = _chunkE3BDBG6Tjs.logError; exports.logInfo = _chunkE3BDBG6Tjs.logInfo; exports.logWarning = _chunkE3BDBG6Tjs.logWarning; exports.named = _chunkA6E325SZjs.named; exports.normalizeRelative = _chunkAOGVLPQZjs.normalizeRelative; exports.parseAccountId = _chunk6LOYTBS3js.parseAccountId; exports.parseChainId = _chunk6LOYTBS3js.parseChainId; exports.parseCronExpression = _chunk2LBN5T56js.parseCronExpression; exports.parseJson = _chunkHF7HUZ5Zjs.parseJson; exports.resolveVersionRange = _chunkIPOE62V4js.resolveVersionRange; exports.snapsLogger = _chunkE3BDBG6Tjs.snapsLogger; exports.stripSnapPrefix = _chunkTG4BDSYJjs.stripSnapPrefix; exports.translate = _chunkAFQY2CNYjs.translate; exports.unwrapError = _chunkK6BCBPXFjs.unwrapError; exports.uri = _chunkCMOSYNZRjs.uri; exports.validateComponentLinks = _chunkEX4PPLNDjs.validateComponentLinks; exports.validateFetchedSnap = _chunkOK2Q2GT7js.validateFetchedSnap; exports.validateSnapManifestLocalizations = _chunkAFQY2CNYjs.validateSnapManifestLocalizations; exports.validateSnapShasum = _chunkTG4BDSYJjs.validateSnapShasum; exports.validateTextLinks = _chunkEX4PPLNDjs.validateTextLinks; exports.validateUnion = _chunkA6E325SZjs.validateUnion; exports.verifyRequestedSnapPermissions = _chunkTG4BDSYJjs.verifyRequestedSnapPermissions;
|
|
378
380
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-HDZ3BJBL.mjs";
|
|
24
24
|
import {
|
|
25
25
|
validateFetchedSnap
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RQVVWCOW.mjs";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_REQUESTED_SNAP_VERSION,
|
|
29
29
|
getTargetVersion,
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
Bip32EntropyStruct,
|
|
35
35
|
Bip32PathStruct,
|
|
36
36
|
ChainIdsStruct,
|
|
37
|
+
EmptyObjectStruct,
|
|
37
38
|
FORBIDDEN_COIN_TYPES,
|
|
38
39
|
HandlerCaveatsStruct,
|
|
39
40
|
InitialConnectionsStruct,
|
|
@@ -51,7 +52,7 @@ import {
|
|
|
51
52
|
bip32entropy,
|
|
52
53
|
createSnapManifest,
|
|
53
54
|
isSnapManifest
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-6F2DZTGM.mjs";
|
|
55
56
|
import {
|
|
56
57
|
normalizeRelative
|
|
57
58
|
} from "./chunk-UW74NLTC.mjs";
|
|
@@ -242,6 +243,7 @@ export {
|
|
|
242
243
|
DEFAULT_REQUESTED_SNAP_VERSION,
|
|
243
244
|
DomainResolutionResponseStruct,
|
|
244
245
|
DomainResolutionStruct,
|
|
246
|
+
EmptyObjectStruct,
|
|
245
247
|
FORBIDDEN_COIN_TYPES,
|
|
246
248
|
HandlerCaveatsStruct,
|
|
247
249
|
HandlerType,
|
package/dist/manifest/index.js
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
var _chunkLTWLSRSRjs = require('../chunk-LTWLSRSR.js');
|
|
24
25
|
require('../chunk-TG4BDSYJ.js');
|
|
25
26
|
require('../chunk-6LOYTBS3.js');
|
|
26
27
|
require('../chunk-CMOSYNZR.js');
|
|
@@ -55,5 +56,6 @@ require('../chunk-PHUTP7NB.js');
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
|
|
60
|
+
exports.Bip32EntropyStruct = _chunkLTWLSRSRjs.Bip32EntropyStruct; exports.Bip32PathStruct = _chunkLTWLSRSRjs.Bip32PathStruct; exports.ChainIdsStruct = _chunkLTWLSRSRjs.ChainIdsStruct; exports.EmptyObjectStruct = _chunkLTWLSRSRjs.EmptyObjectStruct; exports.FORBIDDEN_COIN_TYPES = _chunkLTWLSRSRjs.FORBIDDEN_COIN_TYPES; exports.HandlerCaveatsStruct = _chunkLTWLSRSRjs.HandlerCaveatsStruct; exports.InitialConnectionsStruct = _chunkLTWLSRSRjs.InitialConnectionsStruct; exports.LookupMatchersStruct = _chunkLTWLSRSRjs.LookupMatchersStruct; exports.MAXIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MAXIMUM_REQUEST_TIMEOUT; exports.MINIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MINIMUM_REQUEST_TIMEOUT; exports.MaxRequestTimeStruct = _chunkLTWLSRSRjs.MaxRequestTimeStruct; exports.PermissionsStruct = _chunkLTWLSRSRjs.PermissionsStruct; exports.SemVerRangeStruct = _chunkLTWLSRSRjs.SemVerRangeStruct; exports.SnapAuxilaryFilesStruct = _chunkLTWLSRSRjs.SnapAuxilaryFilesStruct; exports.SnapGetBip32EntropyPermissionsStruct = _chunkLTWLSRSRjs.SnapGetBip32EntropyPermissionsStruct; exports.SnapIdsStruct = _chunkLTWLSRSRjs.SnapIdsStruct; exports.SnapManifestStruct = _chunkLTWLSRSRjs.SnapManifestStruct; exports.assertIsSnapManifest = _chunkLTWLSRSRjs.assertIsSnapManifest; exports.bip32entropy = _chunkLTWLSRSRjs.bip32entropy; exports.createSnapManifest = _chunkLTWLSRSRjs.createSnapManifest; exports.isSnapManifest = _chunkLTWLSRSRjs.isSnapManifest;
|
|
59
61
|
//# sourceMappingURL=index.js.map
|
package/dist/manifest/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Bip32EntropyStruct,
|
|
4
4
|
Bip32PathStruct,
|
|
5
5
|
ChainIdsStruct,
|
|
6
|
+
EmptyObjectStruct,
|
|
6
7
|
FORBIDDEN_COIN_TYPES,
|
|
7
8
|
HandlerCaveatsStruct,
|
|
8
9
|
InitialConnectionsStruct,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
bip32entropy,
|
|
21
22
|
createSnapManifest,
|
|
22
23
|
isSnapManifest
|
|
23
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-6F2DZTGM.mjs";
|
|
24
25
|
import "../chunk-2IWSQJKQ.mjs";
|
|
25
26
|
import "../chunk-EXUEHPZ4.mjs";
|
|
26
27
|
import "../chunk-T6FWIDA6.mjs";
|
|
@@ -38,6 +39,7 @@ export {
|
|
|
38
39
|
Bip32EntropyStruct,
|
|
39
40
|
Bip32PathStruct,
|
|
40
41
|
ChainIdsStruct,
|
|
42
|
+
EmptyObjectStruct,
|
|
41
43
|
FORBIDDEN_COIN_TYPES,
|
|
42
44
|
HandlerCaveatsStruct,
|
|
43
45
|
InitialConnectionsStruct,
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
require('../chunk-
|
|
10
|
+
var _chunkHKJDVWVOjs = require('../chunk-HKJDVWVO.js');
|
|
11
|
+
require('../chunk-LTWLSRSR.js');
|
|
12
12
|
require('../chunk-TG4BDSYJ.js');
|
|
13
13
|
require('../chunk-M3KAAQFK.js');
|
|
14
14
|
require('../chunk-6LOYTBS3.js');
|
|
@@ -38,5 +38,5 @@ require('../chunk-PHUTP7NB.js');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
exports.checkManifest =
|
|
41
|
+
exports.checkManifest = _chunkHKJDVWVOjs.checkManifest; exports.fixManifest = _chunkHKJDVWVOjs.fixManifest; exports.getSnapFilePaths = _chunkHKJDVWVOjs.getSnapFilePaths; exports.getSnapFiles = _chunkHKJDVWVOjs.getSnapFiles; exports.getSnapIcon = _chunkHKJDVWVOjs.getSnapIcon; exports.getSnapSourceCode = _chunkHKJDVWVOjs.getSnapSourceCode; exports.getWritableManifest = _chunkHKJDVWVOjs.getWritableManifest; exports.validateNpmSnapManifest = _chunkHKJDVWVOjs.validateNpmSnapManifest;
|
|
42
42
|
//# sourceMappingURL=manifest.js.map
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
getSnapSourceCode,
|
|
8
8
|
getWritableManifest,
|
|
9
9
|
validateNpmSnapManifest
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-ZO24JBZA.mjs";
|
|
11
|
+
import "../chunk-6F2DZTGM.mjs";
|
|
12
12
|
import "../chunk-2IWSQJKQ.mjs";
|
|
13
13
|
import "../chunk-MNCFAD4E.mjs";
|
|
14
14
|
import "../chunk-EXUEHPZ4.mjs";
|
package/dist/manifest/node.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkHKJDVWVOjs = require('../chunk-HKJDVWVO.js');
|
|
12
12
|
require('../chunk-4CMD46B2.js');
|
|
13
13
|
|
|
14
14
|
|
|
@@ -31,7 +31,8 @@ require('../chunk-4CMD46B2.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
var _chunkLTWLSRSRjs = require('../chunk-LTWLSRSR.js');
|
|
35
36
|
require('../chunk-TG4BDSYJ.js');
|
|
36
37
|
require('../chunk-M3KAAQFK.js');
|
|
37
38
|
require('../chunk-6LOYTBS3.js');
|
|
@@ -81,5 +82,6 @@ require('../chunk-PHUTP7NB.js');
|
|
|
81
82
|
|
|
82
83
|
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
|
|
86
|
+
exports.Bip32EntropyStruct = _chunkLTWLSRSRjs.Bip32EntropyStruct; exports.Bip32PathStruct = _chunkLTWLSRSRjs.Bip32PathStruct; exports.ChainIdsStruct = _chunkLTWLSRSRjs.ChainIdsStruct; exports.EmptyObjectStruct = _chunkLTWLSRSRjs.EmptyObjectStruct; exports.FORBIDDEN_COIN_TYPES = _chunkLTWLSRSRjs.FORBIDDEN_COIN_TYPES; exports.HandlerCaveatsStruct = _chunkLTWLSRSRjs.HandlerCaveatsStruct; exports.InitialConnectionsStruct = _chunkLTWLSRSRjs.InitialConnectionsStruct; exports.LookupMatchersStruct = _chunkLTWLSRSRjs.LookupMatchersStruct; exports.MAXIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MAXIMUM_REQUEST_TIMEOUT; exports.MINIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MINIMUM_REQUEST_TIMEOUT; exports.MaxRequestTimeStruct = _chunkLTWLSRSRjs.MaxRequestTimeStruct; exports.PermissionsStruct = _chunkLTWLSRSRjs.PermissionsStruct; exports.SemVerRangeStruct = _chunkLTWLSRSRjs.SemVerRangeStruct; exports.SnapAuxilaryFilesStruct = _chunkLTWLSRSRjs.SnapAuxilaryFilesStruct; exports.SnapGetBip32EntropyPermissionsStruct = _chunkLTWLSRSRjs.SnapGetBip32EntropyPermissionsStruct; exports.SnapIdsStruct = _chunkLTWLSRSRjs.SnapIdsStruct; exports.SnapManifestStruct = _chunkLTWLSRSRjs.SnapManifestStruct; exports.assertIsSnapManifest = _chunkLTWLSRSRjs.assertIsSnapManifest; exports.bip32entropy = _chunkLTWLSRSRjs.bip32entropy; exports.checkManifest = _chunkHKJDVWVOjs.checkManifest; exports.createSnapManifest = _chunkLTWLSRSRjs.createSnapManifest; exports.fixManifest = _chunkHKJDVWVOjs.fixManifest; exports.getSnapFilePaths = _chunkHKJDVWVOjs.getSnapFilePaths; exports.getSnapFiles = _chunkHKJDVWVOjs.getSnapFiles; exports.getSnapIcon = _chunkHKJDVWVOjs.getSnapIcon; exports.getSnapSourceCode = _chunkHKJDVWVOjs.getSnapSourceCode; exports.getWritableManifest = _chunkHKJDVWVOjs.getWritableManifest; exports.isSnapManifest = _chunkLTWLSRSRjs.isSnapManifest; exports.validateNpmSnapManifest = _chunkHKJDVWVOjs.validateNpmSnapManifest;
|
|
85
87
|
//# sourceMappingURL=node.js.map
|
package/dist/manifest/node.mjs
CHANGED
|
@@ -8,12 +8,13 @@ import {
|
|
|
8
8
|
getSnapSourceCode,
|
|
9
9
|
getWritableManifest,
|
|
10
10
|
validateNpmSnapManifest
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-ZO24JBZA.mjs";
|
|
12
12
|
import "../chunk-JI5NQ2C3.mjs";
|
|
13
13
|
import {
|
|
14
14
|
Bip32EntropyStruct,
|
|
15
15
|
Bip32PathStruct,
|
|
16
16
|
ChainIdsStruct,
|
|
17
|
+
EmptyObjectStruct,
|
|
17
18
|
FORBIDDEN_COIN_TYPES,
|
|
18
19
|
HandlerCaveatsStruct,
|
|
19
20
|
InitialConnectionsStruct,
|
|
@@ -31,7 +32,7 @@ import {
|
|
|
31
32
|
bip32entropy,
|
|
32
33
|
createSnapManifest,
|
|
33
34
|
isSnapManifest
|
|
34
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-6F2DZTGM.mjs";
|
|
35
36
|
import "../chunk-2IWSQJKQ.mjs";
|
|
36
37
|
import "../chunk-MNCFAD4E.mjs";
|
|
37
38
|
import "../chunk-EXUEHPZ4.mjs";
|
|
@@ -56,6 +57,7 @@ export {
|
|
|
56
57
|
Bip32EntropyStruct,
|
|
57
58
|
Bip32PathStruct,
|
|
58
59
|
ChainIdsStruct,
|
|
60
|
+
EmptyObjectStruct,
|
|
59
61
|
FORBIDDEN_COIN_TYPES,
|
|
60
62
|
HandlerCaveatsStruct,
|
|
61
63
|
InitialConnectionsStruct,
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
var _chunkLTWLSRSRjs = require('../chunk-LTWLSRSR.js');
|
|
23
24
|
require('../chunk-TG4BDSYJ.js');
|
|
24
25
|
require('../chunk-6LOYTBS3.js');
|
|
25
26
|
require('../chunk-CMOSYNZR.js');
|
|
@@ -54,5 +55,6 @@ require('../chunk-PHUTP7NB.js');
|
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
|
|
59
|
+
exports.Bip32EntropyStruct = _chunkLTWLSRSRjs.Bip32EntropyStruct; exports.Bip32PathStruct = _chunkLTWLSRSRjs.Bip32PathStruct; exports.ChainIdsStruct = _chunkLTWLSRSRjs.ChainIdsStruct; exports.EmptyObjectStruct = _chunkLTWLSRSRjs.EmptyObjectStruct; exports.FORBIDDEN_COIN_TYPES = _chunkLTWLSRSRjs.FORBIDDEN_COIN_TYPES; exports.HandlerCaveatsStruct = _chunkLTWLSRSRjs.HandlerCaveatsStruct; exports.InitialConnectionsStruct = _chunkLTWLSRSRjs.InitialConnectionsStruct; exports.LookupMatchersStruct = _chunkLTWLSRSRjs.LookupMatchersStruct; exports.MAXIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MAXIMUM_REQUEST_TIMEOUT; exports.MINIMUM_REQUEST_TIMEOUT = _chunkLTWLSRSRjs.MINIMUM_REQUEST_TIMEOUT; exports.MaxRequestTimeStruct = _chunkLTWLSRSRjs.MaxRequestTimeStruct; exports.PermissionsStruct = _chunkLTWLSRSRjs.PermissionsStruct; exports.SemVerRangeStruct = _chunkLTWLSRSRjs.SemVerRangeStruct; exports.SnapAuxilaryFilesStruct = _chunkLTWLSRSRjs.SnapAuxilaryFilesStruct; exports.SnapGetBip32EntropyPermissionsStruct = _chunkLTWLSRSRjs.SnapGetBip32EntropyPermissionsStruct; exports.SnapIdsStruct = _chunkLTWLSRSRjs.SnapIdsStruct; exports.SnapManifestStruct = _chunkLTWLSRSRjs.SnapManifestStruct; exports.assertIsSnapManifest = _chunkLTWLSRSRjs.assertIsSnapManifest; exports.bip32entropy = _chunkLTWLSRSRjs.bip32entropy; exports.createSnapManifest = _chunkLTWLSRSRjs.createSnapManifest; exports.isSnapManifest = _chunkLTWLSRSRjs.isSnapManifest;
|
|
58
60
|
//# sourceMappingURL=validation.js.map
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
Bip32EntropyStruct,
|
|
3
3
|
Bip32PathStruct,
|
|
4
4
|
ChainIdsStruct,
|
|
5
|
+
EmptyObjectStruct,
|
|
5
6
|
FORBIDDEN_COIN_TYPES,
|
|
6
7
|
HandlerCaveatsStruct,
|
|
7
8
|
InitialConnectionsStruct,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
bip32entropy,
|
|
20
21
|
createSnapManifest,
|
|
21
22
|
isSnapManifest
|
|
22
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-6F2DZTGM.mjs";
|
|
23
24
|
import "../chunk-2IWSQJKQ.mjs";
|
|
24
25
|
import "../chunk-EXUEHPZ4.mjs";
|
|
25
26
|
import "../chunk-T6FWIDA6.mjs";
|
|
@@ -37,6 +38,7 @@ export {
|
|
|
37
38
|
Bip32EntropyStruct,
|
|
38
39
|
Bip32PathStruct,
|
|
39
40
|
ChainIdsStruct,
|
|
41
|
+
EmptyObjectStruct,
|
|
40
42
|
FORBIDDEN_COIN_TYPES,
|
|
41
43
|
HandlerCaveatsStruct,
|
|
42
44
|
InitialConnectionsStruct,
|