@metamask-previews/keyring-api 18.0.0-e86c8ec → 18.0.0-f024bb4
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/dist/api/account.cjs +2 -2
- package/dist/api/account.cjs.map +1 -1
- package/dist/api/account.d.cts +2 -22
- package/dist/api/account.d.cts.map +1 -1
- package/dist/api/account.d.mts +2 -22
- package/dist/api/account.d.mts.map +1 -1
- package/dist/api/account.mjs +3 -3
- package/dist/api/account.mjs.map +1 -1
- package/dist/api/discovery.d.cts +2 -2
- package/dist/api/discovery.d.mts +2 -2
- package/dist/api/index.cjs +0 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +0 -1
- package/dist/api/index.d.cts.map +1 -1
- package/dist/api/index.d.mts +0 -1
- package/dist/api/index.d.mts.map +1 -1
- package/dist/api/index.mjs +0 -1
- package/dist/api/index.mjs.map +1 -1
- package/dist/btc/types.d.cts +8 -88
- package/dist/btc/types.d.cts.map +1 -1
- package/dist/btc/types.d.mts +8 -88
- package/dist/btc/types.d.mts.map +1 -1
- package/dist/eth/types.d.cts +4 -44
- package/dist/eth/types.d.cts.map +1 -1
- package/dist/eth/types.d.mts +4 -44
- package/dist/eth/types.d.mts.map +1 -1
- package/dist/events.d.cts +8 -88
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +8 -88
- package/dist/events.d.mts.map +1 -1
- package/dist/rpc.d.cts +15 -125
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +15 -125
- package/dist/rpc.d.mts.map +1 -1
- package/dist/sol/types.d.cts +2 -22
- package/dist/sol/types.d.cts.map +1 -1
- package/dist/sol/types.d.mts +2 -22
- package/dist/sol/types.d.mts.map +1 -1
- package/package.json +1 -1
- package/dist/api/account-options.cjs +0 -122
- package/dist/api/account-options.cjs.map +0 -1
- package/dist/api/account-options.d.cts +0 -131
- package/dist/api/account-options.d.cts.map +0 -1
- package/dist/api/account-options.d.mts +0 -131
- package/dist/api/account-options.d.mts.map +0 -1
- package/dist/api/account-options.mjs +0 -119
- package/dist/api/account-options.mjs.map +0 -1
package/dist/api/account.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.KeyringAccountStruct = exports.SolAccountType = exports.BtcAccountType = exports.EthAccountType = void 0;
|
|
4
4
|
const keyring_utils_1 = require("@metamask/keyring-utils");
|
|
5
5
|
const superstruct_1 = require("@metamask/superstruct");
|
|
6
|
-
const
|
|
6
|
+
const utils_1 = require("@metamask/utils");
|
|
7
7
|
const caip_1 = require("./caip.cjs");
|
|
8
8
|
/**
|
|
9
9
|
* Supported Ethereum account types.
|
|
@@ -65,7 +65,7 @@ exports.KeyringAccountStruct = (0, keyring_utils_1.object)({
|
|
|
65
65
|
/**
|
|
66
66
|
* Account options.
|
|
67
67
|
*/
|
|
68
|
-
options:
|
|
68
|
+
options: (0, superstruct_1.record)((0, superstruct_1.string)(), utils_1.JsonStruct),
|
|
69
69
|
/**
|
|
70
70
|
* Account supported methods.
|
|
71
71
|
*/
|
package/dist/api/account.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.cjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":";;;AAAA,2DAAkE;AAElE,
|
|
1
|
+
{"version":3,"file":"account.cjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":";;;AAAA,2DAAkE;AAElE,uDAA+E;AAC/E,2CAA6C;AAE7C,qCAA2C;AAE3C;;GAEG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,wCAAsB,CAAA;IACtB,sCAAoB,CAAA;IACpB,0CAAwB,CAAA;IACxB,sCAAoB,CAAA;AACtB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAED;;GAEG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAcD;;;;;;GAMG;AACU,QAAA,oBAAoB,GAAG,IAAA,sBAAM,EAAC;IACzC;;OAEG;IACH,EAAE,EAAE,+BAAe;IAEnB;;OAEG;IACH,IAAI,EAAE,IAAA,mBAAK,EAAC;QACV,GAAG,cAAc,CAAC,GAAG,EAAE;QACvB,GAAG,cAAc,CAAC,OAAO,EAAE;QAC3B,GAAG,cAAc,CAAC,KAAK,EAAE;QACzB,GAAG,cAAc,CAAC,IAAI,EAAE;QACxB,GAAG,cAAc,CAAC,MAAM,EAAE;QAC1B,GAAG,cAAc,CAAC,IAAI,EAAE;QACxB,GAAG,cAAc,CAAC,WAAW,EAAE;KAChC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,GAAE;IAEjB;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,wBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,oBAAM,GAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { AccountIdStruct, object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, record, string } from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\nimport { CaipChainIdStruct } from './caip';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2pkh = 'bip122:p2pkh',\n P2sh = 'bip122:p2sh',\n P2wpkh = 'bip122:p2wpkh',\n P2tr = 'bip122:p2tr',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2pkh}`\n | `${BtcAccountType.P2sh}`\n | `${BtcAccountType.P2wpkh}`\n | `${BtcAccountType.P2tr}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: AccountIdStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2pkh}`,\n `${BtcAccountType.P2sh}`,\n `${BtcAccountType.P2wpkh}`,\n `${BtcAccountType.P2tr}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
|
package/dist/api/account.d.cts
CHANGED
|
@@ -35,17 +35,7 @@ export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc
|
|
|
35
35
|
export declare const KeyringAccountStruct: import("@metamask/superstruct").Struct<{
|
|
36
36
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
|
|
37
37
|
id: string;
|
|
38
|
-
options: Record<string, import("@metamask/utils").Json
|
|
39
|
-
entropy?: {
|
|
40
|
-
type: "mnemonic";
|
|
41
|
-
id: string;
|
|
42
|
-
derivationPath: string;
|
|
43
|
-
groupIndex: number;
|
|
44
|
-
} | {
|
|
45
|
-
type: "private-key";
|
|
46
|
-
};
|
|
47
|
-
exportable?: boolean;
|
|
48
|
-
};
|
|
38
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
49
39
|
address: string;
|
|
50
40
|
scopes: `${string}:${string}`[];
|
|
51
41
|
methods: string[];
|
|
@@ -77,17 +67,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
|
77
67
|
/**
|
|
78
68
|
* Account options.
|
|
79
69
|
*/
|
|
80
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
81
|
-
entropy?: {
|
|
82
|
-
type: "mnemonic";
|
|
83
|
-
id: string;
|
|
84
|
-
derivationPath: string;
|
|
85
|
-
groupIndex: number;
|
|
86
|
-
} | {
|
|
87
|
-
type: "private-key";
|
|
88
|
-
};
|
|
89
|
-
exportable?: boolean;
|
|
90
|
-
}, null>;
|
|
70
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
91
71
|
/**
|
|
92
72
|
* Account supported methods.
|
|
93
73
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.cts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAMnD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,KAAK,iBAAiB;IACtB,IAAI,gBAAgB;IACpB,MAAM,kBAAkB;IACxB,IAAI,gBAAgB;CACrB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;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O,oBAAoB,CAAC,CAAC"}
|
package/dist/api/account.d.mts
CHANGED
|
@@ -35,17 +35,7 @@ export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc
|
|
|
35
35
|
export declare const KeyringAccountStruct: import("@metamask/superstruct").Struct<{
|
|
36
36
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
|
|
37
37
|
id: string;
|
|
38
|
-
options: Record<string, import("@metamask/utils").Json
|
|
39
|
-
entropy?: {
|
|
40
|
-
type: "mnemonic";
|
|
41
|
-
id: string;
|
|
42
|
-
derivationPath: string;
|
|
43
|
-
groupIndex: number;
|
|
44
|
-
} | {
|
|
45
|
-
type: "private-key";
|
|
46
|
-
};
|
|
47
|
-
exportable?: boolean;
|
|
48
|
-
};
|
|
38
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
49
39
|
address: string;
|
|
50
40
|
scopes: `${string}:${string}`[];
|
|
51
41
|
methods: string[];
|
|
@@ -77,17 +67,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
|
77
67
|
/**
|
|
78
68
|
* Account options.
|
|
79
69
|
*/
|
|
80
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
81
|
-
entropy?: {
|
|
82
|
-
type: "mnemonic";
|
|
83
|
-
id: string;
|
|
84
|
-
derivationPath: string;
|
|
85
|
-
groupIndex: number;
|
|
86
|
-
} | {
|
|
87
|
-
type: "private-key";
|
|
88
|
-
};
|
|
89
|
-
exportable?: boolean;
|
|
90
|
-
}, null>;
|
|
70
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
91
71
|
/**
|
|
92
72
|
* Account supported methods.
|
|
93
73
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.mts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAMnD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,KAAK,iBAAiB;IACtB,IAAI,gBAAgB;IACpB,MAAM,kBAAkB;IACxB,IAAI,gBAAgB;CACrB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,KAAK,EAAE,GACzB,GAAG,cAAc,CAAC,IAAI,EAAE,GACxB,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,IAAI,EAAE,GACxB,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"account.d.mts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAMnD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,KAAK,iBAAiB;IACtB,IAAI,gBAAgB;IACpB,MAAM,kBAAkB;IACxB,IAAI,gBAAgB;CACrB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,KAAK,EAAE,GACzB,GAAG,cAAc,CAAC,IAAI,EAAE,GACxB,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,IAAI,EAAE,GACxB,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;;;;IAWH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/api/account.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccountIdStruct, object } from "@metamask/keyring-utils";
|
|
2
|
-
import { nonempty, array, enums, string } from "@metamask/superstruct";
|
|
3
|
-
import {
|
|
2
|
+
import { nonempty, array, enums, record, string } from "@metamask/superstruct";
|
|
3
|
+
import { JsonStruct } from "@metamask/utils";
|
|
4
4
|
import { CaipChainIdStruct } from "./caip.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* Supported Ethereum account types.
|
|
@@ -62,7 +62,7 @@ export const KeyringAccountStruct = object({
|
|
|
62
62
|
/**
|
|
63
63
|
* Account options.
|
|
64
64
|
*/
|
|
65
|
-
options:
|
|
65
|
+
options: record(string(), JsonStruct),
|
|
66
66
|
/**
|
|
67
67
|
* Account supported methods.
|
|
68
68
|
*/
|
package/dist/api/account.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.mjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,gCAAgC;AAElE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;
|
|
1
|
+
{"version":3,"file":"account.mjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,gCAAgC;AAElE,OAAO,E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AO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { AccountIdStruct, object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, record, string } from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\nimport { CaipChainIdStruct } from './caip';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2pkh = 'bip122:p2pkh',\n P2sh = 'bip122:p2sh',\n P2wpkh = 'bip122:p2wpkh',\n P2tr = 'bip122:p2tr',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2pkh}`\n | `${BtcAccountType.P2sh}`\n | `${BtcAccountType.P2wpkh}`\n | `${BtcAccountType.P2tr}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: AccountIdStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2pkh}`,\n `${BtcAccountType.P2sh}`,\n `${BtcAccountType.P2wpkh}`,\n `${BtcAccountType.P2tr}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
|
package/dist/api/discovery.d.cts
CHANGED
|
@@ -16,8 +16,8 @@ export declare enum DiscoveredAccountType {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const DiscoveredBip44AccountStruct: import("@metamask/superstruct").Struct<{
|
|
18
18
|
type: "bip44";
|
|
19
|
-
derivationPath: `m/${string}`;
|
|
20
19
|
scopes: `${string}:${string}`[];
|
|
20
|
+
derivationPath: `m/${string}`;
|
|
21
21
|
}, {
|
|
22
22
|
/**
|
|
23
23
|
* Account type.
|
|
@@ -40,8 +40,8 @@ export declare const DiscoveredBip44AccountStruct: import("@metamask/superstruct
|
|
|
40
40
|
export type DiscoveredBip44Account = Infer<typeof DiscoveredBip44AccountStruct>;
|
|
41
41
|
export declare const DiscoveredAccountStruct: import("@metamask/superstruct").Struct<{
|
|
42
42
|
type: "bip44";
|
|
43
|
-
derivationPath: `m/${string}`;
|
|
44
43
|
scopes: `${string}:${string}`[];
|
|
44
|
+
derivationPath: `m/${string}`;
|
|
45
45
|
}, {
|
|
46
46
|
/**
|
|
47
47
|
* Account type.
|
package/dist/api/discovery.d.mts
CHANGED
|
@@ -16,8 +16,8 @@ export declare enum DiscoveredAccountType {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const DiscoveredBip44AccountStruct: import("@metamask/superstruct").Struct<{
|
|
18
18
|
type: "bip44";
|
|
19
|
-
derivationPath: `m/${string}`;
|
|
20
19
|
scopes: `${string}:${string}`[];
|
|
20
|
+
derivationPath: `m/${string}`;
|
|
21
21
|
}, {
|
|
22
22
|
/**
|
|
23
23
|
* Account type.
|
|
@@ -40,8 +40,8 @@ export declare const DiscoveredBip44AccountStruct: import("@metamask/superstruct
|
|
|
40
40
|
export type DiscoveredBip44Account = Infer<typeof DiscoveredBip44AccountStruct>;
|
|
41
41
|
export declare const DiscoveredAccountStruct: import("@metamask/superstruct").Struct<{
|
|
42
42
|
type: "bip44";
|
|
43
|
-
derivationPath: `m/${string}`;
|
|
44
43
|
scopes: `${string}:${string}`[];
|
|
44
|
+
derivationPath: `m/${string}`;
|
|
45
45
|
}, {
|
|
46
46
|
/**
|
|
47
47
|
* Account type.
|
package/dist/api/index.cjs
CHANGED
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./account.cjs"), exports);
|
|
18
|
-
__exportStar(require("./account-options.cjs"), exports);
|
|
19
18
|
__exportStar(require("./address.cjs"), exports);
|
|
20
19
|
__exportStar(require("./asset.cjs"), exports);
|
|
21
20
|
__exportStar(require("./balance.cjs"), exports);
|
package/dist/api/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,gDAA0B;AAC1B,8CAAwB;AACxB,gDAA0B;AAC1B,6CAAuB;AACvB,kDAA4B;AAE5B,+CAAyB;AACzB,gDAA0B;AAC1B,iDAA2B;AAC3B,oDAA8B;AAC9B,mDAA6B;AAC7B,gDAA0B","sourcesContent":["export * from './account';\nexport * from './address';\nexport * from './asset';\nexport * from './balance';\nexport * from './caip';\nexport * from './discovery';\nexport type * from './entropy';\nexport * from './export';\nexport * from './request';\nexport * from './response';\nexport * from './transaction';\nexport * from './pagination';\nexport * from './options';\nexport type * from './keyring';\n"]}
|
package/dist/api/index.d.cts
CHANGED
package/dist/api/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,gCAA4B;AAC5B,mCAA+B;AAC/B,6BAAyB;AACzB,8BAA0B;AAC1B,+BAA2B;AAC3B,kCAA8B;AAC9B,iCAA6B;AAC7B,8BAA0B;AAC1B,mCAA+B"}
|
package/dist/api/index.d.mts
CHANGED
package/dist/api/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,gCAA4B;AAC5B,mCAA+B;AAC/B,6BAAyB;AACzB,8BAA0B;AAC1B,+BAA2B;AAC3B,kCAA8B;AAC9B,iCAA6B;AAC7B,8BAA0B;AAC1B,mCAA+B"}
|
package/dist/api/index.mjs
CHANGED
package/dist/api/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,gCAA4B;AAE5B,6BAAyB;AACzB,8BAA0B;AAC1B,+BAA2B;AAC3B,kCAA8B;AAC9B,iCAA6B;AAC7B,8BAA0B","sourcesContent":["export * from './account';\nexport * from './address';\nexport * from './asset';\nexport * from './balance';\nexport * from './caip';\nexport * from './discovery';\nexport type * from './entropy';\nexport * from './export';\nexport * from './request';\nexport * from './response';\nexport * from './transaction';\nexport * from './pagination';\nexport * from './options';\nexport type * from './keyring';\n"]}
|
package/dist/btc/types.d.cts
CHANGED
|
@@ -12,17 +12,7 @@ export declare enum BtcMethod {
|
|
|
12
12
|
export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
13
13
|
type: "bip122:p2pkh";
|
|
14
14
|
id: string;
|
|
15
|
-
options: Record<string, import("@metamask/utils").Json
|
|
16
|
-
entropy?: {
|
|
17
|
-
type: "mnemonic";
|
|
18
|
-
id: string;
|
|
19
|
-
derivationPath: string;
|
|
20
|
-
groupIndex: number;
|
|
21
|
-
} | {
|
|
22
|
-
type: "private-key";
|
|
23
|
-
};
|
|
24
|
-
exportable?: boolean;
|
|
25
|
-
};
|
|
15
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
26
16
|
address: string;
|
|
27
17
|
scopes: `${string}:${string}`[];
|
|
28
18
|
methods: "sendBitcoin"[];
|
|
@@ -46,32 +36,12 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
|
46
36
|
sendBitcoin: "sendBitcoin";
|
|
47
37
|
}>>;
|
|
48
38
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
49
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
50
|
-
entropy?: {
|
|
51
|
-
type: "mnemonic";
|
|
52
|
-
id: string;
|
|
53
|
-
derivationPath: string;
|
|
54
|
-
groupIndex: number;
|
|
55
|
-
} | {
|
|
56
|
-
type: "private-key";
|
|
57
|
-
};
|
|
58
|
-
exportable?: boolean;
|
|
59
|
-
}, null>;
|
|
39
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
60
40
|
}>;
|
|
61
41
|
export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struct<{
|
|
62
42
|
type: "bip122:p2sh";
|
|
63
43
|
id: string;
|
|
64
|
-
options: Record<string, import("@metamask/utils").Json
|
|
65
|
-
entropy?: {
|
|
66
|
-
type: "mnemonic";
|
|
67
|
-
id: string;
|
|
68
|
-
derivationPath: string;
|
|
69
|
-
groupIndex: number;
|
|
70
|
-
} | {
|
|
71
|
-
type: "private-key";
|
|
72
|
-
};
|
|
73
|
-
exportable?: boolean;
|
|
74
|
-
};
|
|
44
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
75
45
|
address: string;
|
|
76
46
|
scopes: `${string}:${string}`[];
|
|
77
47
|
methods: "sendBitcoin"[];
|
|
@@ -95,32 +65,12 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
|
95
65
|
sendBitcoin: "sendBitcoin";
|
|
96
66
|
}>>;
|
|
97
67
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
98
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
99
|
-
entropy?: {
|
|
100
|
-
type: "mnemonic";
|
|
101
|
-
id: string;
|
|
102
|
-
derivationPath: string;
|
|
103
|
-
groupIndex: number;
|
|
104
|
-
} | {
|
|
105
|
-
type: "private-key";
|
|
106
|
-
};
|
|
107
|
-
exportable?: boolean;
|
|
108
|
-
}, null>;
|
|
68
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
109
69
|
}>;
|
|
110
70
|
export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
111
71
|
type: "bip122:p2wpkh";
|
|
112
72
|
id: string;
|
|
113
|
-
options: Record<string, import("@metamask/utils").Json
|
|
114
|
-
entropy?: {
|
|
115
|
-
type: "mnemonic";
|
|
116
|
-
id: string;
|
|
117
|
-
derivationPath: string;
|
|
118
|
-
groupIndex: number;
|
|
119
|
-
} | {
|
|
120
|
-
type: "private-key";
|
|
121
|
-
};
|
|
122
|
-
exportable?: boolean;
|
|
123
|
-
};
|
|
73
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
124
74
|
address: string;
|
|
125
75
|
scopes: `${string}:${string}`[];
|
|
126
76
|
methods: "sendBitcoin"[];
|
|
@@ -144,32 +94,12 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
|
144
94
|
sendBitcoin: "sendBitcoin";
|
|
145
95
|
}>>;
|
|
146
96
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
147
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
148
|
-
entropy?: {
|
|
149
|
-
type: "mnemonic";
|
|
150
|
-
id: string;
|
|
151
|
-
derivationPath: string;
|
|
152
|
-
groupIndex: number;
|
|
153
|
-
} | {
|
|
154
|
-
type: "private-key";
|
|
155
|
-
};
|
|
156
|
-
exportable?: boolean;
|
|
157
|
-
}, null>;
|
|
97
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
158
98
|
}>;
|
|
159
99
|
export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struct<{
|
|
160
100
|
type: "bip122:p2tr";
|
|
161
101
|
id: string;
|
|
162
|
-
options: Record<string, import("@metamask/utils").Json
|
|
163
|
-
entropy?: {
|
|
164
|
-
type: "mnemonic";
|
|
165
|
-
id: string;
|
|
166
|
-
derivationPath: string;
|
|
167
|
-
groupIndex: number;
|
|
168
|
-
} | {
|
|
169
|
-
type: "private-key";
|
|
170
|
-
};
|
|
171
|
-
exportable?: boolean;
|
|
172
|
-
};
|
|
102
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
173
103
|
address: string;
|
|
174
104
|
scopes: `${string}:${string}`[];
|
|
175
105
|
methods: "sendBitcoin"[];
|
|
@@ -193,17 +123,7 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
|
|
|
193
123
|
sendBitcoin: "sendBitcoin";
|
|
194
124
|
}>>;
|
|
195
125
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
196
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
197
|
-
entropy?: {
|
|
198
|
-
type: "mnemonic";
|
|
199
|
-
id: string;
|
|
200
|
-
derivationPath: string;
|
|
201
|
-
groupIndex: number;
|
|
202
|
-
} | {
|
|
203
|
-
type: "private-key";
|
|
204
|
-
};
|
|
205
|
-
exportable?: boolean;
|
|
206
|
-
}, null>;
|
|
126
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
207
127
|
}>;
|
|
208
128
|
export type BtcP2pkhAccount = Infer<typeof BtcP2pkhAccountStruct>;
|
|
209
129
|
export type BtcP2shAccount = Infer<typeof BtcP2shAccountStruct>;
|
package/dist/btc/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/btc/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAkCnD,eAAO,MAAM,qBAAqB,sDAMjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sDAMhC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sDAMlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sDAMhC,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,WAAW,gBAAgB;CAC5B;AAgBD,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/btc/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAkCnD,eAAO,MAAM,qBAAqB,sDAMjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sDAMhC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sDAMlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sDAMhC,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,WAAW,gBAAgB;CAC5B;AAgBD,eAAO,MAAM,qBAAqB;;;;;;;;IAGhC;;OAEG;;IAGH;;OAEG;;IArBH;;OAEG;;IAGH;;OAEG;;;;;;EAgBH,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;IAG/B;;OAEG;;IAGH;;OAEG;;IAnCH;;OAEG;;IAGH;;OAEG;;;;;;EA8BH,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;IAGjC;;OAEG;;IAGH;;OAEG;;IAjDH;;OAEG;;IAGH;;OAEG;;;;;;EA4CH,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;IAG/B;;OAEG;;IAGH;;OAEG;;IA/DH;;OAEG;;IAGH;;OAEG;;;;;;EA0DH,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/btc/types.d.mts
CHANGED
|
@@ -12,17 +12,7 @@ export declare enum BtcMethod {
|
|
|
12
12
|
export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
13
13
|
type: "bip122:p2pkh";
|
|
14
14
|
id: string;
|
|
15
|
-
options: Record<string, import("@metamask/utils").Json
|
|
16
|
-
entropy?: {
|
|
17
|
-
type: "mnemonic";
|
|
18
|
-
id: string;
|
|
19
|
-
derivationPath: string;
|
|
20
|
-
groupIndex: number;
|
|
21
|
-
} | {
|
|
22
|
-
type: "private-key";
|
|
23
|
-
};
|
|
24
|
-
exportable?: boolean;
|
|
25
|
-
};
|
|
15
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
26
16
|
address: string;
|
|
27
17
|
scopes: `${string}:${string}`[];
|
|
28
18
|
methods: "sendBitcoin"[];
|
|
@@ -46,32 +36,12 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
|
46
36
|
sendBitcoin: "sendBitcoin";
|
|
47
37
|
}>>;
|
|
48
38
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
49
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
50
|
-
entropy?: {
|
|
51
|
-
type: "mnemonic";
|
|
52
|
-
id: string;
|
|
53
|
-
derivationPath: string;
|
|
54
|
-
groupIndex: number;
|
|
55
|
-
} | {
|
|
56
|
-
type: "private-key";
|
|
57
|
-
};
|
|
58
|
-
exportable?: boolean;
|
|
59
|
-
}, null>;
|
|
39
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
60
40
|
}>;
|
|
61
41
|
export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struct<{
|
|
62
42
|
type: "bip122:p2sh";
|
|
63
43
|
id: string;
|
|
64
|
-
options: Record<string, import("@metamask/utils").Json
|
|
65
|
-
entropy?: {
|
|
66
|
-
type: "mnemonic";
|
|
67
|
-
id: string;
|
|
68
|
-
derivationPath: string;
|
|
69
|
-
groupIndex: number;
|
|
70
|
-
} | {
|
|
71
|
-
type: "private-key";
|
|
72
|
-
};
|
|
73
|
-
exportable?: boolean;
|
|
74
|
-
};
|
|
44
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
75
45
|
address: string;
|
|
76
46
|
scopes: `${string}:${string}`[];
|
|
77
47
|
methods: "sendBitcoin"[];
|
|
@@ -95,32 +65,12 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
|
95
65
|
sendBitcoin: "sendBitcoin";
|
|
96
66
|
}>>;
|
|
97
67
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
98
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
99
|
-
entropy?: {
|
|
100
|
-
type: "mnemonic";
|
|
101
|
-
id: string;
|
|
102
|
-
derivationPath: string;
|
|
103
|
-
groupIndex: number;
|
|
104
|
-
} | {
|
|
105
|
-
type: "private-key";
|
|
106
|
-
};
|
|
107
|
-
exportable?: boolean;
|
|
108
|
-
}, null>;
|
|
68
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
109
69
|
}>;
|
|
110
70
|
export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Struct<{
|
|
111
71
|
type: "bip122:p2wpkh";
|
|
112
72
|
id: string;
|
|
113
|
-
options: Record<string, import("@metamask/utils").Json
|
|
114
|
-
entropy?: {
|
|
115
|
-
type: "mnemonic";
|
|
116
|
-
id: string;
|
|
117
|
-
derivationPath: string;
|
|
118
|
-
groupIndex: number;
|
|
119
|
-
} | {
|
|
120
|
-
type: "private-key";
|
|
121
|
-
};
|
|
122
|
-
exportable?: boolean;
|
|
123
|
-
};
|
|
73
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
124
74
|
address: string;
|
|
125
75
|
scopes: `${string}:${string}`[];
|
|
126
76
|
methods: "sendBitcoin"[];
|
|
@@ -144,32 +94,12 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
|
144
94
|
sendBitcoin: "sendBitcoin";
|
|
145
95
|
}>>;
|
|
146
96
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
147
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
148
|
-
entropy?: {
|
|
149
|
-
type: "mnemonic";
|
|
150
|
-
id: string;
|
|
151
|
-
derivationPath: string;
|
|
152
|
-
groupIndex: number;
|
|
153
|
-
} | {
|
|
154
|
-
type: "private-key";
|
|
155
|
-
};
|
|
156
|
-
exportable?: boolean;
|
|
157
|
-
}, null>;
|
|
97
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
158
98
|
}>;
|
|
159
99
|
export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struct<{
|
|
160
100
|
type: "bip122:p2tr";
|
|
161
101
|
id: string;
|
|
162
|
-
options: Record<string, import("@metamask/utils").Json
|
|
163
|
-
entropy?: {
|
|
164
|
-
type: "mnemonic";
|
|
165
|
-
id: string;
|
|
166
|
-
derivationPath: string;
|
|
167
|
-
groupIndex: number;
|
|
168
|
-
} | {
|
|
169
|
-
type: "private-key";
|
|
170
|
-
};
|
|
171
|
-
exportable?: boolean;
|
|
172
|
-
};
|
|
102
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
173
103
|
address: string;
|
|
174
104
|
scopes: `${string}:${string}`[];
|
|
175
105
|
methods: "sendBitcoin"[];
|
|
@@ -193,17 +123,7 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
|
|
|
193
123
|
sendBitcoin: "sendBitcoin";
|
|
194
124
|
}>>;
|
|
195
125
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
196
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
197
|
-
entropy?: {
|
|
198
|
-
type: "mnemonic";
|
|
199
|
-
id: string;
|
|
200
|
-
derivationPath: string;
|
|
201
|
-
groupIndex: number;
|
|
202
|
-
} | {
|
|
203
|
-
type: "private-key";
|
|
204
|
-
};
|
|
205
|
-
exportable?: boolean;
|
|
206
|
-
}, null>;
|
|
126
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
207
127
|
}>;
|
|
208
128
|
export type BtcP2pkhAccount = Infer<typeof BtcP2pkhAccountStruct>;
|
|
209
129
|
export type BtcP2shAccount = Infer<typeof BtcP2shAccountStruct>;
|
package/dist/btc/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/btc/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,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AAG,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/eth/types.d.cts
CHANGED
|
@@ -20,17 +20,7 @@ export declare enum EthMethod {
|
|
|
20
20
|
export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct<{
|
|
21
21
|
type: "eip155:eoa";
|
|
22
22
|
id: string;
|
|
23
|
-
options: Record<string, import("@metamask/utils").Json
|
|
24
|
-
entropy?: {
|
|
25
|
-
type: "mnemonic";
|
|
26
|
-
id: string;
|
|
27
|
-
derivationPath: string;
|
|
28
|
-
groupIndex: number;
|
|
29
|
-
} | {
|
|
30
|
-
type: "private-key";
|
|
31
|
-
};
|
|
32
|
-
exportable?: boolean;
|
|
33
|
-
};
|
|
23
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
34
24
|
address: string;
|
|
35
25
|
scopes: EthScope.Eoa[];
|
|
36
26
|
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
|
@@ -59,33 +49,13 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
|
|
|
59
49
|
eth_signTypedData_v4: "eth_signTypedData_v4";
|
|
60
50
|
}>>;
|
|
61
51
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
62
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
63
|
-
entropy?: {
|
|
64
|
-
type: "mnemonic";
|
|
65
|
-
id: string;
|
|
66
|
-
derivationPath: string;
|
|
67
|
-
groupIndex: number;
|
|
68
|
-
} | {
|
|
69
|
-
type: "private-key";
|
|
70
|
-
};
|
|
71
|
-
exportable?: boolean;
|
|
72
|
-
}, null>;
|
|
52
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
73
53
|
}>;
|
|
74
54
|
export type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;
|
|
75
55
|
export declare const EthErc4337AccountStruct: import("@metamask/superstruct").Struct<{
|
|
76
56
|
type: "eip155:erc4337";
|
|
77
57
|
id: string;
|
|
78
|
-
options: Record<string, import("@metamask/utils").Json
|
|
79
|
-
entropy?: {
|
|
80
|
-
type: "mnemonic";
|
|
81
|
-
id: string;
|
|
82
|
-
derivationPath: string;
|
|
83
|
-
groupIndex: number;
|
|
84
|
-
} | {
|
|
85
|
-
type: "private-key";
|
|
86
|
-
};
|
|
87
|
-
exportable?: boolean;
|
|
88
|
-
};
|
|
58
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
89
59
|
address: string;
|
|
90
60
|
scopes: `${string}:${string}`[];
|
|
91
61
|
methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
|
|
@@ -116,17 +86,7 @@ export declare const EthErc4337AccountStruct: import("@metamask/superstruct").St
|
|
|
116
86
|
eth_signUserOperation: "eth_signUserOperation";
|
|
117
87
|
}>>;
|
|
118
88
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
119
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
|
120
|
-
entropy?: {
|
|
121
|
-
type: "mnemonic";
|
|
122
|
-
id: string;
|
|
123
|
-
derivationPath: string;
|
|
124
|
-
groupIndex: number;
|
|
125
|
-
} | {
|
|
126
|
-
type: "private-key";
|
|
127
|
-
};
|
|
128
|
-
exportable?: boolean;
|
|
129
|
-
}, null>;
|
|
89
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
130
90
|
}>;
|
|
131
91
|
export type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;
|
|
132
92
|
//# sourceMappingURL=types.d.cts.map
|