@metamask/snaps-utils 10.0.0 → 11.0.0
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 +26 -1
- package/dist/base64.cjs +1 -1
- package/dist/base64.cjs.map +1 -1
- package/dist/base64.d.cts +1 -1
- package/dist/base64.d.mts +1 -1
- package/dist/base64.mjs +1 -1
- package/dist/base64.mjs.map +1 -1
- package/dist/errors.cjs +2 -2
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.mjs +2 -2
- package/dist/errors.mjs.map +1 -1
- package/dist/handlers/assets-conversion.cjs +1 -19
- package/dist/handlers/assets-conversion.cjs.map +1 -1
- package/dist/handlers/assets-conversion.d.cts +0 -61
- package/dist/handlers/assets-conversion.d.cts.map +1 -1
- package/dist/handlers/assets-conversion.d.mts +0 -61
- package/dist/handlers/assets-conversion.d.mts.map +1 -1
- package/dist/handlers/assets-conversion.mjs +1 -19
- package/dist/handlers/assets-conversion.mjs.map +1 -1
- package/dist/handlers/assets-market-data.cjs +30 -0
- package/dist/handlers/assets-market-data.cjs.map +1 -0
- package/dist/handlers/assets-market-data.d.cts +49 -0
- package/dist/handlers/assets-market-data.d.cts.map +1 -0
- package/dist/handlers/assets-market-data.d.mts +49 -0
- package/dist/handlers/assets-market-data.d.mts.map +1 -0
- package/dist/handlers/assets-market-data.mjs +27 -0
- package/dist/handlers/assets-market-data.mjs.map +1 -0
- package/dist/handlers/exports.cjs +21 -0
- package/dist/handlers/exports.cjs.map +1 -1
- package/dist/handlers/exports.d.cts +16 -1
- package/dist/handlers/exports.d.cts.map +1 -1
- package/dist/handlers/exports.d.mts +16 -1
- package/dist/handlers/exports.d.mts.map +1 -1
- package/dist/handlers/exports.mjs +21 -0
- package/dist/handlers/exports.mjs.map +1 -1
- package/dist/handlers/home-page.d.cts +15 -15
- package/dist/handlers/home-page.d.mts +15 -15
- package/dist/handlers/index.cjs +1 -0
- package/dist/handlers/index.cjs.map +1 -1
- package/dist/handlers/index.d.cts +1 -0
- package/dist/handlers/index.d.cts.map +1 -1
- package/dist/handlers/index.d.mts +1 -0
- package/dist/handlers/index.d.mts.map +1 -1
- package/dist/handlers/index.mjs +1 -0
- package/dist/handlers/index.mjs.map +1 -1
- package/dist/handlers/settings-page.d.cts +5 -5
- package/dist/handlers/settings-page.d.mts +5 -5
- package/dist/handlers/signature.d.cts +5 -5
- package/dist/handlers/signature.d.mts +5 -5
- package/dist/handlers/transaction.d.cts +15 -15
- package/dist/handlers/transaction.d.mts +15 -15
- package/dist/handlers/types.cjs +3 -0
- package/dist/handlers/types.cjs.map +1 -1
- package/dist/handlers/types.d.cts +4 -1
- package/dist/handlers/types.d.cts.map +1 -1
- package/dist/handlers/types.d.mts +4 -1
- package/dist/handlers/types.d.mts.map +1 -1
- package/dist/handlers/types.mjs +3 -0
- package/dist/handlers/types.mjs.map +1 -1
- package/dist/localization.d.cts +1 -1
- package/dist/localization.d.mts +1 -1
- package/dist/manifest/validation.d.cts +3 -3
- package/dist/manifest/validation.d.cts.map +1 -1
- package/dist/manifest/validation.d.mts +3 -3
- package/dist/manifest/validation.d.mts.map +1 -1
- package/dist/manifest/validators/unused-exports.cjs +12 -2
- package/dist/manifest/validators/unused-exports.cjs.map +1 -1
- package/dist/manifest/validators/unused-exports.d.cts.map +1 -1
- package/dist/manifest/validators/unused-exports.d.mts.map +1 -1
- package/dist/manifest/validators/unused-exports.mjs +12 -2
- package/dist/manifest/validators/unused-exports.mjs.map +1 -1
- package/dist/types.cjs +7 -3
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +2 -2
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +8 -4
- package/dist/types.mjs.map +1 -1
- package/package.json +6 -9
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A struct representing the market data for an asset.
|
|
3
|
+
*/
|
|
4
|
+
export declare const PricePercentChangeStruct: import("@metamask/superstruct").Struct<Record<string, number>, null>;
|
|
5
|
+
/**
|
|
6
|
+
* A struct representing the market data for an asset.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FungibleAssetMarketDataStruct: import("@metamask/superstruct").Struct<{
|
|
9
|
+
fungible: true;
|
|
10
|
+
marketCap?: string | undefined;
|
|
11
|
+
totalVolume?: string | undefined;
|
|
12
|
+
circulatingSupply?: string | undefined;
|
|
13
|
+
allTimeHigh?: string | undefined;
|
|
14
|
+
allTimeLow?: string | undefined;
|
|
15
|
+
pricePercentChange?: Record<string, number> | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
fungible: import("@metamask/superstruct").Struct<true, true>;
|
|
18
|
+
marketCap: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
19
|
+
totalVolume: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
20
|
+
circulatingSupply: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
21
|
+
allTimeHigh: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
22
|
+
allTimeLow: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
23
|
+
pricePercentChange: import("@metamask/superstruct").Struct<Record<string, number> | undefined, null>;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* A struct representing the response of the `onAssetsMarketData` method.
|
|
27
|
+
*/
|
|
28
|
+
export declare const OnAssetsMarketDataResponseStruct: import("@metamask/superstruct").Struct<{
|
|
29
|
+
marketData: Record<`${string}:${string}/${string}:${string}`, Record<`${string}:${string}/${string}:${string}`, {
|
|
30
|
+
fungible: true;
|
|
31
|
+
marketCap?: string | undefined;
|
|
32
|
+
totalVolume?: string | undefined;
|
|
33
|
+
circulatingSupply?: string | undefined;
|
|
34
|
+
allTimeHigh?: string | undefined;
|
|
35
|
+
allTimeLow?: string | undefined;
|
|
36
|
+
pricePercentChange?: Record<string, number> | undefined;
|
|
37
|
+
} | null>>;
|
|
38
|
+
}, {
|
|
39
|
+
marketData: import("@metamask/superstruct").Struct<Record<`${string}:${string}/${string}:${string}`, Record<`${string}:${string}/${string}:${string}`, {
|
|
40
|
+
fungible: true;
|
|
41
|
+
marketCap?: string | undefined;
|
|
42
|
+
totalVolume?: string | undefined;
|
|
43
|
+
circulatingSupply?: string | undefined;
|
|
44
|
+
allTimeHigh?: string | undefined;
|
|
45
|
+
allTimeLow?: string | undefined;
|
|
46
|
+
pricePercentChange?: Record<string, number> | undefined;
|
|
47
|
+
} | null>>, null>;
|
|
48
|
+
}>;
|
|
49
|
+
//# sourceMappingURL=assets-market-data.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets-market-data.d.mts","sourceRoot":"","sources":["../../src/handlers/assets-market-data.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,eAAO,MAAM,wBAAwB,sEAGpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;EAQxC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;EAK3C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { nonEmptyRecord } from "@metamask/snaps-sdk";
|
|
2
|
+
import { literal, nullable, number, object, optional, record, string, union } from "@metamask/superstruct";
|
|
3
|
+
import { CaipAssetTypeStruct } from "@metamask/utils";
|
|
4
|
+
import { ISO8601DurationStruct } from "../time.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* A struct representing the market data for an asset.
|
|
7
|
+
*/
|
|
8
|
+
export const PricePercentChangeStruct = nonEmptyRecord(union([literal('all'), ISO8601DurationStruct]), number());
|
|
9
|
+
/**
|
|
10
|
+
* A struct representing the market data for an asset.
|
|
11
|
+
*/
|
|
12
|
+
export const FungibleAssetMarketDataStruct = object({
|
|
13
|
+
fungible: literal(true),
|
|
14
|
+
marketCap: optional(string()),
|
|
15
|
+
totalVolume: optional(string()),
|
|
16
|
+
circulatingSupply: optional(string()),
|
|
17
|
+
allTimeHigh: optional(string()),
|
|
18
|
+
allTimeLow: optional(string()),
|
|
19
|
+
pricePercentChange: optional(PricePercentChangeStruct),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* A struct representing the response of the `onAssetsMarketData` method.
|
|
23
|
+
*/
|
|
24
|
+
export const OnAssetsMarketDataResponseStruct = object({
|
|
25
|
+
marketData: record(CaipAssetTypeStruct, record(CaipAssetTypeStruct, nullable(FungibleAssetMarketDataStruct))),
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=assets-market-data.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets-market-data.mjs","sourceRoot":"","sources":["../../src/handlers/assets-market-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,4BAA4B;AACrD,OAAO,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACN,8BAA8B;AAC/B,OAAO,EAAE,mBAAmB,EAAE,wBAAwB;AAEtD,OAAO,EAAE,qBAAqB,EAAE,oBAAgB;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,cAAc,CACpD,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,qBAAqB,CAAC,CAAC,EAC9C,MAAM,EAAE,CACT,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC;IACvB,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC7B,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC/B,iBAAiB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrC,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC/B,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC9B,kBAAkB,EAAE,QAAQ,CAAC,wBAAwB,CAAC;CACvD,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC;IACrD,UAAU,EAAE,MAAM,CAChB,mBAAmB,EACnB,MAAM,CAAC,mBAAmB,EAAE,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CACrE;CACF,CAAC,CAAC","sourcesContent":["import { nonEmptyRecord } from '@metamask/snaps-sdk';\nimport {\n literal,\n nullable,\n number,\n object,\n optional,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport { CaipAssetTypeStruct } from '@metamask/utils';\n\nimport { ISO8601DurationStruct } from '../time';\n\n/**\n * A struct representing the market data for an asset.\n */\nexport const PricePercentChangeStruct = nonEmptyRecord(\n union([literal('all'), ISO8601DurationStruct]),\n number(),\n);\n\n/**\n * A struct representing the market data for an asset.\n */\nexport const FungibleAssetMarketDataStruct = object({\n fungible: literal(true),\n marketCap: optional(string()),\n totalVolume: optional(string()),\n circulatingSupply: optional(string()),\n allTimeHigh: optional(string()),\n allTimeLow: optional(string()),\n pricePercentChange: optional(PricePercentChangeStruct),\n});\n\n/**\n * A struct representing the response of the `onAssetsMarketData` method.\n */\nexport const OnAssetsMarketDataResponseStruct = object({\n marketData: record(\n CaipAssetTypeStruct,\n record(CaipAssetTypeStruct, nullable(FungibleAssetMarketDataStruct)),\n ),\n});\n"]}
|
|
@@ -45,6 +45,13 @@ exports.SNAP_EXPORTS = {
|
|
|
45
45
|
return typeof snapExport === 'function';
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
|
+
[types_1.HandlerType.OnStart]: {
|
|
49
|
+
type: types_1.HandlerType.OnStart,
|
|
50
|
+
required: false,
|
|
51
|
+
validator: (snapExport) => {
|
|
52
|
+
return typeof snapExport === 'function';
|
|
53
|
+
},
|
|
54
|
+
},
|
|
48
55
|
[types_1.HandlerType.OnKeyringRequest]: {
|
|
49
56
|
type: types_1.HandlerType.OnKeyringRequest,
|
|
50
57
|
required: true,
|
|
@@ -101,6 +108,13 @@ exports.SNAP_EXPORTS = {
|
|
|
101
108
|
return typeof snapExport === 'function';
|
|
102
109
|
},
|
|
103
110
|
},
|
|
111
|
+
[types_1.HandlerType.OnAssetsMarketData]: {
|
|
112
|
+
type: types_1.HandlerType.OnAssetsMarketData,
|
|
113
|
+
required: true,
|
|
114
|
+
validator: (snapExport) => {
|
|
115
|
+
return typeof snapExport === 'function';
|
|
116
|
+
},
|
|
117
|
+
},
|
|
104
118
|
[types_1.HandlerType.OnProtocolRequest]: {
|
|
105
119
|
type: types_1.HandlerType.OnProtocolRequest,
|
|
106
120
|
required: true,
|
|
@@ -115,6 +129,13 @@ exports.SNAP_EXPORTS = {
|
|
|
115
129
|
return typeof snapExport === 'function';
|
|
116
130
|
},
|
|
117
131
|
},
|
|
132
|
+
[types_1.HandlerType.OnWebSocketEvent]: {
|
|
133
|
+
type: types_1.HandlerType.OnWebSocketEvent,
|
|
134
|
+
required: true,
|
|
135
|
+
validator: (snapExport) => {
|
|
136
|
+
return typeof snapExport === 'function';
|
|
137
|
+
},
|
|
138
|
+
},
|
|
118
139
|
};
|
|
119
140
|
exports.SNAP_EXPORT_NAMES = Object.values(types_1.HandlerType);
|
|
120
141
|
//# sourceMappingURL=exports.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.cjs","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"exports.cjs","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":";;;AAsBA,uCAAsC;AAEzB,QAAA,YAAY,GAAG;IAC1B,CAAC,mBAAW,CAAC,YAAY,CAAC,EAAE;QAC1B,IAAI,EAAE,mBAAW,CAAC,YAAY;QAC9B,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,CAAC,UAAmB,EAAqC,EAAE;YACpE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;K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ACd,SAAS,EAAE,CAAC,UAAmB,EAAyC,EAAE;YACxE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;CACO,CAAC;AAEE,QAAA,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAW,CAAC,CAAC","sourcesContent":["import type {\n OnAssetHistoricalPriceHandler,\n OnAssetsConversionHandler,\n OnAssetsLookupHandler,\n OnAssetsMarketDataHandler,\n OnClientRequestHandler,\n OnCronjobHandler,\n OnHomePageHandler,\n OnInstallHandler,\n OnKeyringRequestHandler,\n OnNameLookupHandler,\n OnProtocolRequestHandler,\n OnRpcRequestHandler,\n OnSettingsPageHandler,\n OnSignatureHandler,\n OnStartHandler,\n OnTransactionHandler,\n OnUpdateHandler,\n OnUserInputHandler,\n OnWebSocketEventHandler,\n} from '@metamask/snaps-sdk';\n\nimport { HandlerType } from './types';\n\nexport const SNAP_EXPORTS = {\n [HandlerType.OnRpcRequest]: {\n type: HandlerType.OnRpcRequest,\n required: true,\n validator: (snapExport: unknown): snapExport is OnRpcRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnTransaction]: {\n type: HandlerType.OnTransaction,\n required: true,\n validator: (snapExport: unknown): snapExport is OnTransactionHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnCronjob]: {\n type: HandlerType.OnCronjob,\n required: true,\n validator: (snapExport: unknown): snapExport is OnCronjobHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnNameLookup]: {\n type: HandlerType.OnNameLookup,\n required: true,\n validator: (snapExport: unknown): snapExport is OnNameLookupHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnInstall]: {\n type: HandlerType.OnInstall,\n required: false,\n validator: (snapExport: unknown): snapExport is OnInstallHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnUpdate]: {\n type: HandlerType.OnUpdate,\n required: false,\n validator: (snapExport: unknown): snapExport is OnUpdateHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnStart]: {\n type: HandlerType.OnStart,\n required: false,\n validator: (snapExport: unknown): snapExport is OnStartHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnKeyringRequest]: {\n type: HandlerType.OnKeyringRequest,\n required: true,\n validator: (snapExport: unknown): snapExport is OnKeyringRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnHomePage]: {\n type: HandlerType.OnHomePage,\n required: true,\n validator: (snapExport: unknown): snapExport is OnHomePageHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnSettingsPage]: {\n type: HandlerType.OnSettingsPage,\n required: true,\n validator: (snapExport: unknown): snapExport is OnSettingsPageHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnSignature]: {\n type: HandlerType.OnSignature,\n required: true,\n validator: (snapExport: unknown): snapExport is OnSignatureHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnUserInput]: {\n type: HandlerType.OnUserInput,\n required: false,\n validator: (snapExport: unknown): snapExport is OnUserInputHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetHistoricalPrice]: {\n type: HandlerType.OnAssetHistoricalPrice,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnAssetHistoricalPriceHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetsLookup]: {\n type: HandlerType.OnAssetsLookup,\n required: true,\n validator: (snapExport: unknown): snapExport is OnAssetsLookupHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetsConversion]: {\n type: HandlerType.OnAssetsConversion,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnAssetsConversionHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetsMarketData]: {\n type: HandlerType.OnAssetsMarketData,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnAssetsMarketDataHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnProtocolRequest]: {\n type: HandlerType.OnProtocolRequest,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnProtocolRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnClientRequest]: {\n type: HandlerType.OnClientRequest,\n required: true,\n validator: (snapExport: unknown): snapExport is OnClientRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnWebSocketEvent]: {\n type: HandlerType.OnWebSocketEvent,\n required: true,\n validator: (snapExport: unknown): snapExport is OnWebSocketEventHandler => {\n return typeof snapExport === 'function';\n },\n },\n} as const;\n\nexport const SNAP_EXPORT_NAMES = Object.values(HandlerType);\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnAssetHistoricalPriceHandler, OnAssetsConversionHandler, OnAssetsLookupHandler, OnClientRequestHandler, OnCronjobHandler, OnHomePageHandler, OnKeyringRequestHandler, OnNameLookupHandler, OnProtocolRequestHandler, OnRpcRequestHandler, OnSettingsPageHandler, OnSignatureHandler, OnTransactionHandler, OnUserInputHandler } from "@metamask/snaps-sdk";
|
|
1
|
+
import type { OnAssetHistoricalPriceHandler, OnAssetsConversionHandler, OnAssetsLookupHandler, OnAssetsMarketDataHandler, OnClientRequestHandler, OnCronjobHandler, OnHomePageHandler, OnKeyringRequestHandler, OnNameLookupHandler, OnProtocolRequestHandler, OnRpcRequestHandler, OnSettingsPageHandler, OnSignatureHandler, OnTransactionHandler, OnUserInputHandler, OnWebSocketEventHandler } from "@metamask/snaps-sdk";
|
|
2
2
|
import { HandlerType } from "./types.cjs";
|
|
3
3
|
export declare const SNAP_EXPORTS: {
|
|
4
4
|
readonly onRpcRequest: {
|
|
@@ -31,6 +31,11 @@ export declare const SNAP_EXPORTS: {
|
|
|
31
31
|
readonly required: false;
|
|
32
32
|
readonly validator: (snapExport: unknown) => snapExport is import("@metamask/snaps-sdk").LifecycleEventHandler;
|
|
33
33
|
};
|
|
34
|
+
readonly onStart: {
|
|
35
|
+
readonly type: HandlerType.OnStart;
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly validator: (snapExport: unknown) => snapExport is import("@metamask/snaps-sdk").LifecycleEventHandler;
|
|
38
|
+
};
|
|
34
39
|
readonly onKeyringRequest: {
|
|
35
40
|
readonly type: HandlerType.OnKeyringRequest;
|
|
36
41
|
readonly required: true;
|
|
@@ -71,6 +76,11 @@ export declare const SNAP_EXPORTS: {
|
|
|
71
76
|
readonly required: true;
|
|
72
77
|
readonly validator: (snapExport: unknown) => snapExport is OnAssetsConversionHandler;
|
|
73
78
|
};
|
|
79
|
+
readonly onAssetsMarketData: {
|
|
80
|
+
readonly type: HandlerType.OnAssetsMarketData;
|
|
81
|
+
readonly required: true;
|
|
82
|
+
readonly validator: (snapExport: unknown) => snapExport is OnAssetsMarketDataHandler;
|
|
83
|
+
};
|
|
74
84
|
readonly onProtocolRequest: {
|
|
75
85
|
readonly type: HandlerType.OnProtocolRequest;
|
|
76
86
|
readonly required: true;
|
|
@@ -81,6 +91,11 @@ export declare const SNAP_EXPORTS: {
|
|
|
81
91
|
readonly required: true;
|
|
82
92
|
readonly validator: (snapExport: unknown) => snapExport is OnClientRequestHandler;
|
|
83
93
|
};
|
|
94
|
+
readonly onWebSocketEvent: {
|
|
95
|
+
readonly type: HandlerType.OnWebSocketEvent;
|
|
96
|
+
readonly required: true;
|
|
97
|
+
readonly validator: (snapExport: unknown) => snapExport is OnWebSocketEventHandler;
|
|
98
|
+
};
|
|
84
99
|
};
|
|
85
100
|
export declare const SNAP_EXPORT_NAMES: HandlerType[];
|
|
86
101
|
//# sourceMappingURL=exports.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.cts","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EAEjB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"exports.d.cts","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EAEjB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAElB,oBAAoB,EAEpB,kBAAkB,EAClB,uBAAuB,EACxB,4BAA4B;AAE7B,OAAO,EAAE,WAAW,EAAE,oBAAgB;AAEtC,eAAO,MAAM,YAAY;;;;yCAIG,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAQjB,OAAO;;;;;yCAQG,OAAO;;;;;yCAQjB,OAAO;;;;;yCASP,OAAO;;;;;yCASP,OAAO;;;;;yCAQG,OAAO;;;;;yCAOP,OAAO;;CAIzB,CAAC;AAEX,eAAO,MAAM,iBAAiB,eAA6B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnAssetHistoricalPriceHandler, OnAssetsConversionHandler, OnAssetsLookupHandler, OnClientRequestHandler, OnCronjobHandler, OnHomePageHandler, OnKeyringRequestHandler, OnNameLookupHandler, OnProtocolRequestHandler, OnRpcRequestHandler, OnSettingsPageHandler, OnSignatureHandler, OnTransactionHandler, OnUserInputHandler } from "@metamask/snaps-sdk";
|
|
1
|
+
import type { OnAssetHistoricalPriceHandler, OnAssetsConversionHandler, OnAssetsLookupHandler, OnAssetsMarketDataHandler, OnClientRequestHandler, OnCronjobHandler, OnHomePageHandler, OnKeyringRequestHandler, OnNameLookupHandler, OnProtocolRequestHandler, OnRpcRequestHandler, OnSettingsPageHandler, OnSignatureHandler, OnTransactionHandler, OnUserInputHandler, OnWebSocketEventHandler } from "@metamask/snaps-sdk";
|
|
2
2
|
import { HandlerType } from "./types.mjs";
|
|
3
3
|
export declare const SNAP_EXPORTS: {
|
|
4
4
|
readonly onRpcRequest: {
|
|
@@ -31,6 +31,11 @@ export declare const SNAP_EXPORTS: {
|
|
|
31
31
|
readonly required: false;
|
|
32
32
|
readonly validator: (snapExport: unknown) => snapExport is import("@metamask/snaps-sdk").LifecycleEventHandler;
|
|
33
33
|
};
|
|
34
|
+
readonly onStart: {
|
|
35
|
+
readonly type: HandlerType.OnStart;
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly validator: (snapExport: unknown) => snapExport is import("@metamask/snaps-sdk").LifecycleEventHandler;
|
|
38
|
+
};
|
|
34
39
|
readonly onKeyringRequest: {
|
|
35
40
|
readonly type: HandlerType.OnKeyringRequest;
|
|
36
41
|
readonly required: true;
|
|
@@ -71,6 +76,11 @@ export declare const SNAP_EXPORTS: {
|
|
|
71
76
|
readonly required: true;
|
|
72
77
|
readonly validator: (snapExport: unknown) => snapExport is OnAssetsConversionHandler;
|
|
73
78
|
};
|
|
79
|
+
readonly onAssetsMarketData: {
|
|
80
|
+
readonly type: HandlerType.OnAssetsMarketData;
|
|
81
|
+
readonly required: true;
|
|
82
|
+
readonly validator: (snapExport: unknown) => snapExport is OnAssetsMarketDataHandler;
|
|
83
|
+
};
|
|
74
84
|
readonly onProtocolRequest: {
|
|
75
85
|
readonly type: HandlerType.OnProtocolRequest;
|
|
76
86
|
readonly required: true;
|
|
@@ -81,6 +91,11 @@ export declare const SNAP_EXPORTS: {
|
|
|
81
91
|
readonly required: true;
|
|
82
92
|
readonly validator: (snapExport: unknown) => snapExport is OnClientRequestHandler;
|
|
83
93
|
};
|
|
94
|
+
readonly onWebSocketEvent: {
|
|
95
|
+
readonly type: HandlerType.OnWebSocketEvent;
|
|
96
|
+
readonly required: true;
|
|
97
|
+
readonly validator: (snapExport: unknown) => snapExport is OnWebSocketEventHandler;
|
|
98
|
+
};
|
|
84
99
|
};
|
|
85
100
|
export declare const SNAP_EXPORT_NAMES: HandlerType[];
|
|
86
101
|
//# sourceMappingURL=exports.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.mts","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EAEjB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"exports.d.mts","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EAEjB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAElB,oBAAoB,EAEpB,kBAAkB,EAClB,uBAAuB,EACxB,4BAA4B;AAE7B,OAAO,EAAE,WAAW,EAAE,oBAAgB;AAEtC,eAAO,MAAM,YAAY;;;;yCAIG,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAOP,OAAO;;;;;yCAQjB,OAAO;;;;;yCAQG,OAAO;;;;;yCAQjB,OAAO;;;;;yCASP,OAAO;;;;;yCASP,OAAO;;;;;yCAQG,OAAO;;;;;yCAOP,OAAO;;CAIzB,CAAC;AAEX,eAAO,MAAM,iBAAiB,eAA6B,CAAC"}
|
|
@@ -42,6 +42,13 @@ export const SNAP_EXPORTS = {
|
|
|
42
42
|
return typeof snapExport === 'function';
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
+
[HandlerType.OnStart]: {
|
|
46
|
+
type: HandlerType.OnStart,
|
|
47
|
+
required: false,
|
|
48
|
+
validator: (snapExport) => {
|
|
49
|
+
return typeof snapExport === 'function';
|
|
50
|
+
},
|
|
51
|
+
},
|
|
45
52
|
[HandlerType.OnKeyringRequest]: {
|
|
46
53
|
type: HandlerType.OnKeyringRequest,
|
|
47
54
|
required: true,
|
|
@@ -98,6 +105,13 @@ export const SNAP_EXPORTS = {
|
|
|
98
105
|
return typeof snapExport === 'function';
|
|
99
106
|
},
|
|
100
107
|
},
|
|
108
|
+
[HandlerType.OnAssetsMarketData]: {
|
|
109
|
+
type: HandlerType.OnAssetsMarketData,
|
|
110
|
+
required: true,
|
|
111
|
+
validator: (snapExport) => {
|
|
112
|
+
return typeof snapExport === 'function';
|
|
113
|
+
},
|
|
114
|
+
},
|
|
101
115
|
[HandlerType.OnProtocolRequest]: {
|
|
102
116
|
type: HandlerType.OnProtocolRequest,
|
|
103
117
|
required: true,
|
|
@@ -112,6 +126,13 @@ export const SNAP_EXPORTS = {
|
|
|
112
126
|
return typeof snapExport === 'function';
|
|
113
127
|
},
|
|
114
128
|
},
|
|
129
|
+
[HandlerType.OnWebSocketEvent]: {
|
|
130
|
+
type: HandlerType.OnWebSocketEvent,
|
|
131
|
+
required: true,
|
|
132
|
+
validator: (snapExport) => {
|
|
133
|
+
return typeof snapExport === 'function';
|
|
134
|
+
},
|
|
135
|
+
},
|
|
115
136
|
};
|
|
116
137
|
export const SNAP_EXPORT_NAMES = Object.values(HandlerType);
|
|
117
138
|
//# sourceMappingURL=exports.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.mjs","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exports.mjs","sourceRoot":"","sources":["../../src/handlers/exports.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,WAAW,EAAE,oBAAgB;AAEtC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE;QAC1B,IAAI,EAAE,WAAW,CAAC,YAAY;QAC9B,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,CAAC,UAAmB,EAAqC,EAAE;YACpE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,IAAI,EAAE,WAAW,CAAC,aAAa;QAC/B,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,CAAC,UAAmB,EAAsC,EAAE;YACrE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,IAAI,EAAE,WAAW,CAAC,SAAS;QAC3B,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,CAAC,UAAmB,EAAkC,EAAE;YACjE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;IACD,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE;QAC1B,IAAI,EAAE,WAAW,CAAC,YAAY;QAC9B,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,CAAC,UAAmB,EAAqC,EAAE;YACpE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,IAAI,EAAE,WAAW,CAAC,SAAS;QAC3B,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,CAAC,UAAmB,EAAkC,EAAE;YACjE,OAAO,OAA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T,UAAmB,EACqB,EAAE;YAC1C,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;IACD,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE;QAC7B,IAAI,EAAE,WAAW,CAAC,eAAe;QACjC,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,CAAC,UAAmB,EAAwC,EAAE;YACvE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;IACD,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE;QAC9B,IAAI,EAAE,WAAW,CAAC,gBAAgB;QAClC,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,CAAC,UAAmB,EAAyC,EAAE;YACxE,OAAO,OAAO,UAAU,KAAK,UAAU,CAAC;QAC1C,CAAC;KACF;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import type {\n OnAssetHistoricalPriceHandler,\n OnAssetsConversionHandler,\n OnAssetsLookupHandler,\n OnAssetsMarketDataHandler,\n OnClientRequestHandler,\n OnCronjobHandler,\n OnHomePageHandler,\n OnInstallHandler,\n OnKeyringRequestHandler,\n OnNameLookupHandler,\n OnProtocolRequestHandler,\n OnRpcRequestHandler,\n OnSettingsPageHandler,\n OnSignatureHandler,\n OnStartHandler,\n OnTransactionHandler,\n OnUpdateHandler,\n OnUserInputHandler,\n OnWebSocketEventHandler,\n} from '@metamask/snaps-sdk';\n\nimport { HandlerType } from './types';\n\nexport const SNAP_EXPORTS = {\n [HandlerType.OnRpcRequest]: {\n type: HandlerType.OnRpcRequest,\n required: true,\n validator: (snapExport: unknown): snapExport is OnRpcRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnTransaction]: {\n type: HandlerType.OnTransaction,\n required: true,\n validator: (snapExport: unknown): snapExport is OnTransactionHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnCronjob]: {\n type: HandlerType.OnCronjob,\n required: true,\n validator: (snapExport: unknown): snapExport is OnCronjobHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnNameLookup]: {\n type: HandlerType.OnNameLookup,\n required: true,\n validator: (snapExport: unknown): snapExport is OnNameLookupHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnInstall]: {\n type: HandlerType.OnInstall,\n required: false,\n validator: (snapExport: unknown): snapExport is OnInstallHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnUpdate]: {\n type: HandlerType.OnUpdate,\n required: false,\n validator: (snapExport: unknown): snapExport is OnUpdateHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnStart]: {\n type: HandlerType.OnStart,\n required: false,\n validator: (snapExport: unknown): snapExport is OnStartHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnKeyringRequest]: {\n type: HandlerType.OnKeyringRequest,\n required: true,\n validator: (snapExport: unknown): snapExport is OnKeyringRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnHomePage]: {\n type: HandlerType.OnHomePage,\n required: true,\n validator: (snapExport: unknown): snapExport is OnHomePageHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnSettingsPage]: {\n type: HandlerType.OnSettingsPage,\n required: true,\n validator: (snapExport: unknown): snapExport is OnSettingsPageHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnSignature]: {\n type: HandlerType.OnSignature,\n required: true,\n validator: (snapExport: unknown): snapExport is OnSignatureHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnUserInput]: {\n type: HandlerType.OnUserInput,\n required: false,\n validator: (snapExport: unknown): snapExport is OnUserInputHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetHistoricalPrice]: {\n type: HandlerType.OnAssetHistoricalPrice,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnAssetHistoricalPriceHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetsLookup]: {\n type: HandlerType.OnAssetsLookup,\n required: true,\n validator: (snapExport: unknown): snapExport is OnAssetsLookupHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetsConversion]: {\n type: HandlerType.OnAssetsConversion,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnAssetsConversionHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnAssetsMarketData]: {\n type: HandlerType.OnAssetsMarketData,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnAssetsMarketDataHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnProtocolRequest]: {\n type: HandlerType.OnProtocolRequest,\n required: true,\n validator: (\n snapExport: unknown,\n ): snapExport is OnProtocolRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnClientRequest]: {\n type: HandlerType.OnClientRequest,\n required: true,\n validator: (snapExport: unknown): snapExport is OnClientRequestHandler => {\n return typeof snapExport === 'function';\n },\n },\n [HandlerType.OnWebSocketEvent]: {\n type: HandlerType.OnWebSocketEvent,\n required: true,\n validator: (snapExport: unknown): snapExport is OnWebSocketEventHandler => {\n return typeof snapExport === 'function';\n },\n },\n} as const;\n\nexport const SNAP_EXPORT_NAMES = Object.values(HandlerType);\n"]}
|
|
@@ -36,8 +36,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
36
36
|
label: string;
|
|
37
37
|
variant?: "warning" | "default" | "critical" | undefined;
|
|
38
38
|
} | {
|
|
39
|
-
name: string;
|
|
40
39
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
40
|
+
name: string;
|
|
41
41
|
value?: string | undefined;
|
|
42
42
|
label?: string | undefined;
|
|
43
43
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -46,15 +46,15 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
46
46
|
} | {
|
|
47
47
|
value: string;
|
|
48
48
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
49
|
-
name?: string | undefined;
|
|
50
49
|
variant?: "primary" | "secondary" | undefined;
|
|
50
|
+
name?: string | undefined;
|
|
51
51
|
buttonType?: "button" | "submit" | undefined;
|
|
52
52
|
} | {
|
|
53
|
-
name: string;
|
|
54
53
|
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
54
|
+
name: string;
|
|
55
55
|
children: ({
|
|
56
|
-
name: string;
|
|
57
56
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
57
|
+
name: string;
|
|
58
58
|
value?: string | undefined;
|
|
59
59
|
label?: string | undefined;
|
|
60
60
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -63,8 +63,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
63
63
|
} | {
|
|
64
64
|
value: string;
|
|
65
65
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
66
|
-
name?: string | undefined;
|
|
67
66
|
variant?: "primary" | "secondary" | undefined;
|
|
67
|
+
name?: string | undefined;
|
|
68
68
|
buttonType?: "button" | "submit" | undefined;
|
|
69
69
|
})[];
|
|
70
70
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AccountSelectorProps, "AccountSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -122,8 +122,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
122
122
|
label: string;
|
|
123
123
|
variant?: "warning" | "default" | "critical" | undefined;
|
|
124
124
|
} | {
|
|
125
|
-
name: string;
|
|
126
125
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
126
|
+
name: string;
|
|
127
127
|
value?: string | undefined;
|
|
128
128
|
label?: string | undefined;
|
|
129
129
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -132,15 +132,15 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
132
132
|
} | {
|
|
133
133
|
value: string;
|
|
134
134
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
135
|
-
name?: string | undefined;
|
|
136
135
|
variant?: "primary" | "secondary" | undefined;
|
|
136
|
+
name?: string | undefined;
|
|
137
137
|
buttonType?: "button" | "submit" | undefined;
|
|
138
138
|
} | {
|
|
139
|
-
name: string;
|
|
140
139
|
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
140
|
+
name: string;
|
|
141
141
|
children: ({
|
|
142
|
-
name: string;
|
|
143
142
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
143
|
+
name: string;
|
|
144
144
|
value?: string | undefined;
|
|
145
145
|
label?: string | undefined;
|
|
146
146
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -149,8 +149,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
149
149
|
} | {
|
|
150
150
|
value: string;
|
|
151
151
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
152
|
-
name?: string | undefined;
|
|
153
152
|
variant?: "primary" | "secondary" | undefined;
|
|
153
|
+
name?: string | undefined;
|
|
154
154
|
buttonType?: "button" | "submit" | undefined;
|
|
155
155
|
})[];
|
|
156
156
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AccountSelectorProps, "AccountSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -214,8 +214,8 @@ export declare const OnHomePageResponseStruct: import("@metamask/superstruct").S
|
|
|
214
214
|
label: string;
|
|
215
215
|
variant?: "warning" | "default" | "critical" | undefined;
|
|
216
216
|
} | {
|
|
217
|
-
name: string;
|
|
218
217
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
218
|
+
name: string;
|
|
219
219
|
value?: string | undefined;
|
|
220
220
|
label?: string | undefined;
|
|
221
221
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -224,15 +224,15 @@ export declare const OnHomePageResponseStruct: import("@metamask/superstruct").S
|
|
|
224
224
|
} | {
|
|
225
225
|
value: string;
|
|
226
226
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
227
|
-
name?: string | undefined;
|
|
228
227
|
variant?: "primary" | "secondary" | undefined;
|
|
228
|
+
name?: string | undefined;
|
|
229
229
|
buttonType?: "button" | "submit" | undefined;
|
|
230
230
|
} | {
|
|
231
|
-
name: string;
|
|
232
231
|
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
232
|
+
name: string;
|
|
233
233
|
children: ({
|
|
234
|
-
name: string;
|
|
235
234
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
235
|
+
name: string;
|
|
236
236
|
value?: string | undefined;
|
|
237
237
|
label?: string | undefined;
|
|
238
238
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -241,8 +241,8 @@ export declare const OnHomePageResponseStruct: import("@metamask/superstruct").S
|
|
|
241
241
|
} | {
|
|
242
242
|
value: string;
|
|
243
243
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
244
|
-
name?: string | undefined;
|
|
245
244
|
variant?: "primary" | "secondary" | undefined;
|
|
245
|
+
name?: string | undefined;
|
|
246
246
|
buttonType?: "button" | "submit" | undefined;
|
|
247
247
|
})[];
|
|
248
248
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AccountSelectorProps, "AccountSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -36,8 +36,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
36
36
|
label: string;
|
|
37
37
|
variant?: "warning" | "default" | "critical" | undefined;
|
|
38
38
|
} | {
|
|
39
|
-
name: string;
|
|
40
39
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
40
|
+
name: string;
|
|
41
41
|
value?: string | undefined;
|
|
42
42
|
label?: string | undefined;
|
|
43
43
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -46,15 +46,15 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
46
46
|
} | {
|
|
47
47
|
value: string;
|
|
48
48
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
49
|
-
name?: string | undefined;
|
|
50
49
|
variant?: "primary" | "secondary" | undefined;
|
|
50
|
+
name?: string | undefined;
|
|
51
51
|
buttonType?: "button" | "submit" | undefined;
|
|
52
52
|
} | {
|
|
53
|
-
name: string;
|
|
54
53
|
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
54
|
+
name: string;
|
|
55
55
|
children: ({
|
|
56
|
-
name: string;
|
|
57
56
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
57
|
+
name: string;
|
|
58
58
|
value?: string | undefined;
|
|
59
59
|
label?: string | undefined;
|
|
60
60
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -63,8 +63,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
63
63
|
} | {
|
|
64
64
|
value: string;
|
|
65
65
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
66
|
-
name?: string | undefined;
|
|
67
66
|
variant?: "primary" | "secondary" | undefined;
|
|
67
|
+
name?: string | undefined;
|
|
68
68
|
buttonType?: "button" | "submit" | undefined;
|
|
69
69
|
})[];
|
|
70
70
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AccountSelectorProps, "AccountSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -122,8 +122,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
122
122
|
label: string;
|
|
123
123
|
variant?: "warning" | "default" | "critical" | undefined;
|
|
124
124
|
} | {
|
|
125
|
-
name: string;
|
|
126
125
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
126
|
+
name: string;
|
|
127
127
|
value?: string | undefined;
|
|
128
128
|
label?: string | undefined;
|
|
129
129
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -132,15 +132,15 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
132
132
|
} | {
|
|
133
133
|
value: string;
|
|
134
134
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
135
|
-
name?: string | undefined;
|
|
136
135
|
variant?: "primary" | "secondary" | undefined;
|
|
136
|
+
name?: string | undefined;
|
|
137
137
|
buttonType?: "button" | "submit" | undefined;
|
|
138
138
|
} | {
|
|
139
|
-
name: string;
|
|
140
139
|
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
140
|
+
name: string;
|
|
141
141
|
children: ({
|
|
142
|
-
name: string;
|
|
143
142
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
143
|
+
name: string;
|
|
144
144
|
value?: string | undefined;
|
|
145
145
|
label?: string | undefined;
|
|
146
146
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -149,8 +149,8 @@ export declare const OnHomePageResponseWithContentStruct: import("@metamask/supe
|
|
|
149
149
|
} | {
|
|
150
150
|
value: string;
|
|
151
151
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
152
|
-
name?: string | undefined;
|
|
153
152
|
variant?: "primary" | "secondary" | undefined;
|
|
153
|
+
name?: string | undefined;
|
|
154
154
|
buttonType?: "button" | "submit" | undefined;
|
|
155
155
|
})[];
|
|
156
156
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AccountSelectorProps, "AccountSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -214,8 +214,8 @@ export declare const OnHomePageResponseStruct: import("@metamask/superstruct").S
|
|
|
214
214
|
label: string;
|
|
215
215
|
variant?: "warning" | "default" | "critical" | undefined;
|
|
216
216
|
} | {
|
|
217
|
-
name: string;
|
|
218
217
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
218
|
+
name: string;
|
|
219
219
|
value?: string | undefined;
|
|
220
220
|
label?: string | undefined;
|
|
221
221
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -224,15 +224,15 @@ export declare const OnHomePageResponseStruct: import("@metamask/superstruct").S
|
|
|
224
224
|
} | {
|
|
225
225
|
value: string;
|
|
226
226
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
227
|
-
name?: string | undefined;
|
|
228
227
|
variant?: "primary" | "secondary" | undefined;
|
|
228
|
+
name?: string | undefined;
|
|
229
229
|
buttonType?: "button" | "submit" | undefined;
|
|
230
230
|
} | {
|
|
231
|
-
name: string;
|
|
232
231
|
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
232
|
+
name: string;
|
|
233
233
|
children: ({
|
|
234
|
-
name: string;
|
|
235
234
|
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
235
|
+
name: string;
|
|
236
236
|
value?: string | undefined;
|
|
237
237
|
label?: string | undefined;
|
|
238
238
|
inputType?: "number" | "text" | "password" | undefined;
|
|
@@ -241,8 +241,8 @@ export declare const OnHomePageResponseStruct: import("@metamask/superstruct").S
|
|
|
241
241
|
} | {
|
|
242
242
|
value: string;
|
|
243
243
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
244
|
-
name?: string | undefined;
|
|
245
244
|
variant?: "primary" | "secondary" | undefined;
|
|
245
|
+
name?: string | undefined;
|
|
246
246
|
buttonType?: "button" | "submit" | undefined;
|
|
247
247
|
})[];
|
|
248
248
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AccountSelectorProps, "AccountSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
package/dist/handlers/index.cjs
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./asset-historical-price.cjs"), exports);
|
|
18
18
|
__exportStar(require("./assets-conversion.cjs"), exports);
|
|
19
|
+
__exportStar(require("./assets-market-data.cjs"), exports);
|
|
19
20
|
__exportStar(require("./exports.cjs"), exports);
|
|
20
21
|
__exportStar(require("./home-page.cjs"), exports);
|
|
21
22
|
__exportStar(require("./name-lookup.cjs"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAAyC;AACzC,0DAAoC;AACpC,gDAA0B;AAC1B,kDAA4B;AAC5B,oDAA8B;AAC9B,sDAAgC;AAChC,kDAA4B;AAC5B,oDAA8B;AAC9B,8CAAwB","sourcesContent":["export * from './asset-historical-price';\nexport * from './assets-conversion';\nexport * from './exports';\nexport * from './home-page';\nexport * from './name-lookup';\nexport * from './settings-page';\nexport * from './signature';\nexport * from './transaction';\nexport * from './types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAAyC;AACzC,0DAAoC;AACpC,2DAAqC;AACrC,gDAA0B;AAC1B,kDAA4B;AAC5B,oDAA8B;AAC9B,sDAAgC;AAChC,kDAA4B;AAC5B,oDAA8B;AAC9B,8CAAwB","sourcesContent":["export * from './asset-historical-price';\nexport * from './assets-conversion';\nexport * from './assets-market-data';\nexport * from './exports';\nexport * from './home-page';\nexport * from './name-lookup';\nexport * from './settings-page';\nexport * from './signature';\nexport * from './transaction';\nexport * from './types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,6CAAyC;AACzC,wCAAoC;AACpC,8BAA0B;AAC1B,gCAA4B;AAC5B,kCAA8B;AAC9B,oCAAgC;AAChC,gCAA4B;AAC5B,kCAA8B;AAC9B,4BAAwB"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,6CAAyC;AACzC,wCAAoC;AACpC,yCAAqC;AACrC,8BAA0B;AAC1B,gCAA4B;AAC5B,kCAA8B;AAC9B,oCAAgC;AAChC,gCAA4B;AAC5B,kCAA8B;AAC9B,4BAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,6CAAyC;AACzC,wCAAoC;AACpC,8BAA0B;AAC1B,gCAA4B;AAC5B,kCAA8B;AAC9B,oCAAgC;AAChC,gCAA4B;AAC5B,kCAA8B;AAC9B,4BAAwB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,6CAAyC;AACzC,wCAAoC;AACpC,yCAAqC;AACrC,8BAA0B;AAC1B,gCAA4B;AAC5B,kCAA8B;AAC9B,oCAAgC;AAChC,gCAA4B;AAC5B,kCAA8B;AAC9B,4BAAwB"}
|