@metamask/snaps-utils 7.0.2 → 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 +15 -1
- package/dist/{chunk-LCWDLIK5.mjs → chunk-6F2DZTGM.mjs} +13 -11
- package/dist/chunk-6F2DZTGM.mjs.map +1 -0
- package/dist/{chunk-772OPTGX.js → chunk-EX4PPLND.js} +14 -8
- package/dist/chunk-EX4PPLND.js.map +1 -0
- package/dist/{chunk-44GPX66J.mjs → chunk-HDZ3BJBL.mjs} +14 -8
- package/dist/chunk-HDZ3BJBL.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 +6 -4
- package/dist/index.mjs +5 -3
- 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 +7 -5
- package/dist/node.mjs +6 -4
- package/dist/npm.js +3 -3
- package/dist/npm.mjs +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/handlers.d.ts +14 -14
- package/dist/types/localization.d.ts +31 -55
- package/dist/types/manifest/validation.d.ts +65 -489
- package/dist/ui.js +2 -2
- package/dist/ui.mjs +1 -1
- package/dist/validation.js +3 -3
- package/dist/validation.mjs +2 -2
- package/package.json +6 -5
- package/dist/chunk-44GPX66J.mjs.map +0 -1
- package/dist/chunk-772OPTGX.js.map +0 -1
- 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/dist/types/handlers.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export declare const OnTransactionResponseWithContentStruct: import("superstruct
|
|
|
91
91
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
92
92
|
markdown?: boolean | undefined;
|
|
93
93
|
} | {
|
|
94
|
-
value: string
|
|
94
|
+
value: `0x${string}`;
|
|
95
95
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
96
96
|
} | {
|
|
97
97
|
value: {
|
|
@@ -102,7 +102,7 @@ export declare const OnTransactionResponseWithContentStruct: import("superstruct
|
|
|
102
102
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
103
103
|
markdown?: boolean | undefined;
|
|
104
104
|
} | {
|
|
105
|
-
value: string
|
|
105
|
+
value: `0x${string}`;
|
|
106
106
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
107
107
|
};
|
|
108
108
|
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
@@ -162,7 +162,7 @@ export declare const OnTransactionResponseWithContentStruct: import("superstruct
|
|
|
162
162
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
163
163
|
markdown?: boolean | undefined;
|
|
164
164
|
} | {
|
|
165
|
-
value: string
|
|
165
|
+
value: `0x${string}`;
|
|
166
166
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
167
167
|
} | {
|
|
168
168
|
value: {
|
|
@@ -173,7 +173,7 @@ export declare const OnTransactionResponseWithContentStruct: import("superstruct
|
|
|
173
173
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
174
174
|
markdown?: boolean | undefined;
|
|
175
175
|
} | {
|
|
176
|
-
value: string
|
|
176
|
+
value: `0x${string}`;
|
|
177
177
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
178
178
|
};
|
|
179
179
|
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
@@ -237,7 +237,7 @@ export declare const OnTransactionResponseStruct: import("superstruct").Struct<{
|
|
|
237
237
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
238
238
|
markdown?: boolean | undefined;
|
|
239
239
|
} | {
|
|
240
|
-
value: string
|
|
240
|
+
value: `0x${string}`;
|
|
241
241
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
242
242
|
} | {
|
|
243
243
|
value: {
|
|
@@ -248,7 +248,7 @@ export declare const OnTransactionResponseStruct: import("superstruct").Struct<{
|
|
|
248
248
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
249
249
|
markdown?: boolean | undefined;
|
|
250
250
|
} | {
|
|
251
|
-
value: string
|
|
251
|
+
value: `0x${string}`;
|
|
252
252
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
253
253
|
};
|
|
254
254
|
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
@@ -312,7 +312,7 @@ export declare const OnSignatureResponseStruct: import("superstruct").Struct<{
|
|
|
312
312
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
313
313
|
markdown?: boolean | undefined;
|
|
314
314
|
} | {
|
|
315
|
-
value: string
|
|
315
|
+
value: `0x${string}`;
|
|
316
316
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
317
317
|
} | {
|
|
318
318
|
value: {
|
|
@@ -323,7 +323,7 @@ export declare const OnSignatureResponseStruct: import("superstruct").Struct<{
|
|
|
323
323
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
324
324
|
markdown?: boolean | undefined;
|
|
325
325
|
} | {
|
|
326
|
-
value: string
|
|
326
|
+
value: `0x${string}`;
|
|
327
327
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
328
328
|
};
|
|
329
329
|
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
@@ -384,7 +384,7 @@ export declare const OnHomePageResponseWithContentStruct: import("superstruct").
|
|
|
384
384
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
385
385
|
markdown?: boolean | undefined;
|
|
386
386
|
} | {
|
|
387
|
-
value: string
|
|
387
|
+
value: `0x${string}`;
|
|
388
388
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
389
389
|
} | {
|
|
390
390
|
value: {
|
|
@@ -395,7 +395,7 @@ export declare const OnHomePageResponseWithContentStruct: import("superstruct").
|
|
|
395
395
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
396
396
|
markdown?: boolean | undefined;
|
|
397
397
|
} | {
|
|
398
|
-
value: string
|
|
398
|
+
value: `0x${string}`;
|
|
399
399
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
400
400
|
};
|
|
401
401
|
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
@@ -454,7 +454,7 @@ export declare const OnHomePageResponseWithContentStruct: import("superstruct").
|
|
|
454
454
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
455
455
|
markdown?: boolean | undefined;
|
|
456
456
|
} | {
|
|
457
|
-
value: string
|
|
457
|
+
value: `0x${string}`;
|
|
458
458
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
459
459
|
} | {
|
|
460
460
|
value: {
|
|
@@ -465,7 +465,7 @@ export declare const OnHomePageResponseWithContentStruct: import("superstruct").
|
|
|
465
465
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
466
466
|
markdown?: boolean | undefined;
|
|
467
467
|
} | {
|
|
468
|
-
value: string
|
|
468
|
+
value: `0x${string}`;
|
|
469
469
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
470
470
|
};
|
|
471
471
|
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
@@ -530,7 +530,7 @@ export declare const OnHomePageResponseStruct: import("superstruct").Struct<{
|
|
|
530
530
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
531
531
|
markdown?: boolean | undefined;
|
|
532
532
|
} | {
|
|
533
|
-
value: string
|
|
533
|
+
value: `0x${string}`;
|
|
534
534
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
535
535
|
} | {
|
|
536
536
|
value: {
|
|
@@ -541,7 +541,7 @@ export declare const OnHomePageResponseStruct: import("superstruct").Struct<{
|
|
|
541
541
|
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
542
542
|
markdown?: boolean | undefined;
|
|
543
543
|
} | {
|
|
544
|
-
value: string
|
|
544
|
+
value: `0x${string}`;
|
|
545
545
|
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
546
546
|
};
|
|
547
547
|
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
@@ -79,78 +79,54 @@ export declare function getLocalizedSnapManifest(snapManifest: SnapManifest, loc
|
|
|
79
79
|
locales?: string[] | undefined;
|
|
80
80
|
};
|
|
81
81
|
proposedName: string;
|
|
82
|
-
initialPermissions: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
path: string[];
|
|
86
|
-
curve: "ed25519" | "secp256k1";
|
|
87
|
-
}[] | undefined;
|
|
88
|
-
snap_getBip32PublicKey?: {
|
|
89
|
-
path: string[];
|
|
90
|
-
curve: "ed25519" | "secp256k1";
|
|
91
|
-
}[] | undefined;
|
|
92
|
-
snap_getBip44Entropy?: {
|
|
93
|
-
coinType: number;
|
|
94
|
-
}[] | undefined;
|
|
95
|
-
snap_getEntropy?: {} | undefined;
|
|
96
|
-
snap_getLocale?: {} | undefined;
|
|
97
|
-
snap_manageAccounts?: {} | undefined;
|
|
98
|
-
snap_manageState?: {} | undefined;
|
|
99
|
-
snap_notify?: {} | undefined;
|
|
100
|
-
wallet_snap?: Record<string, {
|
|
101
|
-
version?: string | undefined;
|
|
102
|
-
}> | undefined;
|
|
103
|
-
'endowment:cronjob'?: {
|
|
104
|
-
jobs: {
|
|
105
|
-
request: {
|
|
106
|
-
method: string;
|
|
107
|
-
id?: string | number | null | undefined;
|
|
108
|
-
jsonrpc?: "2.0" | undefined;
|
|
109
|
-
params?: Record<string, import("@metamask/snaps-sdk").Json> | import("@metamask/snaps-sdk").Json[] | undefined;
|
|
110
|
-
};
|
|
111
|
-
expression: string;
|
|
112
|
-
}[];
|
|
82
|
+
initialPermissions: Partial<{
|
|
83
|
+
'endowment:cronjob': {
|
|
84
|
+
jobs: import("@metamask/snaps-sdk").Cronjob[];
|
|
113
85
|
maxRequestTime?: number | undefined;
|
|
114
|
-
}
|
|
115
|
-
'endowment:ethereum-provider'
|
|
116
|
-
'endowment:keyring'
|
|
86
|
+
};
|
|
87
|
+
'endowment:ethereum-provider': import("@metamask/snaps-sdk").EmptyObject;
|
|
88
|
+
'endowment:keyring': {
|
|
117
89
|
allowedOrigins?: string[] | undefined;
|
|
118
90
|
maxRequestTime?: number | undefined;
|
|
119
|
-
}
|
|
91
|
+
};
|
|
120
92
|
'endowment:lifecycle-hooks'?: {
|
|
121
93
|
maxRequestTime?: number | undefined;
|
|
122
94
|
} | undefined;
|
|
123
|
-
'endowment:name-lookup'
|
|
95
|
+
'endowment:name-lookup': {
|
|
124
96
|
chains?: `${string}:${string}`[] | undefined;
|
|
97
|
+
matchers?: import("@metamask/snaps-sdk").NameLookupMatchers | undefined;
|
|
125
98
|
maxRequestTime?: number | undefined;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
} | {
|
|
129
|
-
schemes: string[];
|
|
130
|
-
} | {
|
|
131
|
-
tlds: string[];
|
|
132
|
-
schemes: string[];
|
|
133
|
-
} | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
'endowment:network-access'?: {} | undefined;
|
|
99
|
+
};
|
|
100
|
+
'endowment:network-access': import("@metamask/snaps-sdk").EmptyObject;
|
|
136
101
|
'endowment:page-home'?: {
|
|
137
102
|
maxRequestTime?: number | undefined;
|
|
138
103
|
} | undefined;
|
|
139
|
-
'endowment:rpc'
|
|
140
|
-
snaps?: boolean | undefined;
|
|
104
|
+
'endowment:rpc': {
|
|
141
105
|
dapps?: boolean | undefined;
|
|
106
|
+
snaps?: boolean | undefined;
|
|
142
107
|
allowedOrigins?: string[] | undefined;
|
|
143
|
-
} | undefined;
|
|
144
|
-
'endowment:signature-insight'?: {
|
|
145
108
|
maxRequestTime?: number | undefined;
|
|
109
|
+
};
|
|
110
|
+
'endowment:signature-insight': {
|
|
146
111
|
allowSignatureOrigin?: boolean | undefined;
|
|
147
|
-
} | undefined;
|
|
148
|
-
'endowment:transaction-insight'?: {
|
|
149
112
|
maxRequestTime?: number | undefined;
|
|
113
|
+
};
|
|
114
|
+
'endowment:transaction-insight': {
|
|
150
115
|
allowTransactionOrigin?: boolean | undefined;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
116
|
+
maxRequestTime?: number | undefined;
|
|
117
|
+
};
|
|
118
|
+
'endowment:webassembly': import("@metamask/snaps-sdk").EmptyObject;
|
|
119
|
+
snap_dialog: import("@metamask/snaps-sdk").EmptyObject;
|
|
120
|
+
snap_getBip32Entropy: import("@metamask/snaps-sdk").Bip32Entropy[];
|
|
121
|
+
snap_getBip32PublicKey: import("@metamask/snaps-sdk").Bip32Entropy[];
|
|
122
|
+
snap_getBip44Entropy: import("@metamask/snaps-sdk").Bip44Entropy[];
|
|
123
|
+
snap_getEntropy: import("@metamask/snaps-sdk").EmptyObject;
|
|
124
|
+
snap_getLocale: import("@metamask/snaps-sdk").EmptyObject;
|
|
125
|
+
snap_manageAccounts: import("@metamask/snaps-sdk").EmptyObject;
|
|
126
|
+
snap_manageState: import("@metamask/snaps-sdk").EmptyObject;
|
|
127
|
+
snap_notify: import("@metamask/snaps-sdk").EmptyObject;
|
|
128
|
+
wallet_snap: Record<string, import("@metamask/snaps-sdk").RequestedSnap>;
|
|
129
|
+
}>;
|
|
154
130
|
manifestVersion: "0.1";
|
|
155
131
|
repository?: {
|
|
156
132
|
type: string;
|