@metamask/keyring-api 18.0.0 → 19.1.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 +18 -1
- package/dist/api/account-options.cjs +122 -0
- package/dist/api/account-options.cjs.map +1 -0
- package/dist/api/account-options.d.cts +131 -0
- package/dist/api/account-options.d.cts.map +1 -0
- package/dist/api/account-options.d.mts +131 -0
- package/dist/api/account-options.d.mts.map +1 -0
- package/dist/api/account-options.mjs +119 -0
- package/dist/api/account-options.mjs.map +1 -0
- package/dist/api/account.cjs +12 -3
- package/dist/api/account.cjs.map +1 -1
- package/dist/api/account.d.cts +33 -5
- package/dist/api/account.d.cts.map +1 -1
- package/dist/api/account.d.mts +33 -5
- package/dist/api/account.d.mts.map +1 -1
- package/dist/api/account.mjs +12 -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 +1 -0
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +1 -0
- package/dist/api/index.d.cts.map +1 -1
- package/dist/api/index.d.mts +1 -0
- package/dist/api/index.d.mts.map +1 -1
- package/dist/api/index.mjs +1 -0
- package/dist/api/index.mjs.map +1 -1
- package/dist/btc/types.d.cts +88 -8
- package/dist/btc/types.d.cts.map +1 -1
- package/dist/btc/types.d.mts +88 -8
- package/dist/btc/types.d.mts.map +1 -1
- package/dist/eth/types.d.cts +44 -4
- package/dist/eth/types.d.cts.map +1 -1
- package/dist/eth/types.d.mts +44 -4
- package/dist/eth/types.d.mts.map +1 -1
- package/dist/events.d.cts +98 -16
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +98 -16
- package/dist/events.d.mts.map +1 -1
- package/dist/rpc.d.cts +140 -26
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +140 -26
- package/dist/rpc.d.mts.map +1 -1
- package/dist/sol/types.d.cts +22 -2
- package/dist/sol/types.d.cts.map +1 -1
- package/dist/sol/types.d.mts +22 -2
- package/dist/sol/types.d.mts.map +1 -1
- package/package.json +3 -3
package/dist/api/account.d.cts
CHANGED
@@ -21,10 +21,17 @@ export declare enum BtcAccountType {
|
|
21
21
|
export declare enum SolAccountType {
|
22
22
|
DataAccount = "solana:data-account"
|
23
23
|
}
|
24
|
+
/**
|
25
|
+
* A generic account type. It can be used to represent any account type that is
|
26
|
+
* not covered by the other account types. It only applies to non-EVM chains.
|
27
|
+
*/
|
28
|
+
export declare enum AnyAccountType {
|
29
|
+
Account = "any:account"
|
30
|
+
}
|
24
31
|
/**
|
25
32
|
* Supported account types.
|
26
33
|
*/
|
27
|
-
export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc4337}` | `${BtcAccountType.P2pkh}` | `${BtcAccountType.P2sh}` | `${BtcAccountType.P2wpkh}` | `${BtcAccountType.P2tr}` | `${SolAccountType.DataAccount}`;
|
34
|
+
export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc4337}` | `${BtcAccountType.P2pkh}` | `${BtcAccountType.P2sh}` | `${BtcAccountType.P2wpkh}` | `${BtcAccountType.P2tr}` | `${SolAccountType.DataAccount}` | `${AnyAccountType.Account}`;
|
28
35
|
/**
|
29
36
|
* A struct which represents a Keyring account object. It is abstract enough to
|
30
37
|
* be used with any blockchain. Specific blockchain account types should extend
|
@@ -33,9 +40,19 @@ export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc
|
|
33
40
|
* See {@link KeyringAccount}.
|
34
41
|
*/
|
35
42
|
export declare const KeyringAccountStruct: import("@metamask/superstruct").Struct<{
|
36
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
|
43
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
37
44
|
id: string;
|
38
|
-
options: Record<string, import("@metamask/utils").Json
|
45
|
+
options: Record<string, import("@metamask/utils").Json> & {
|
46
|
+
entropy?: {
|
47
|
+
type: "mnemonic";
|
48
|
+
id: string;
|
49
|
+
derivationPath: string;
|
50
|
+
groupIndex: number;
|
51
|
+
} | {
|
52
|
+
type: "private-key";
|
53
|
+
};
|
54
|
+
exportable?: boolean;
|
55
|
+
};
|
39
56
|
address: string;
|
40
57
|
scopes: `${string}:${string}`[];
|
41
58
|
methods: string[];
|
@@ -47,7 +64,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
47
64
|
/**
|
48
65
|
* Account type.
|
49
66
|
*/
|
50
|
-
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account", {
|
67
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account", {
|
51
68
|
"eip155:eoa": "eip155:eoa";
|
52
69
|
"eip155:erc4337": "eip155:erc4337";
|
53
70
|
"bip122:p2pkh": "bip122:p2pkh";
|
@@ -55,6 +72,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
55
72
|
"bip122:p2wpkh": "bip122:p2wpkh";
|
56
73
|
"bip122:p2tr": "bip122:p2tr";
|
57
74
|
"solana:data-account": "solana:data-account";
|
75
|
+
"any:account": "any:account";
|
58
76
|
}>;
|
59
77
|
/**
|
60
78
|
* Account main address.
|
@@ -67,7 +85,17 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
67
85
|
/**
|
68
86
|
* Account options.
|
69
87
|
*/
|
70
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
88
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> & {
|
89
|
+
entropy?: {
|
90
|
+
type: "mnemonic";
|
91
|
+
id: string;
|
92
|
+
derivationPath: string;
|
93
|
+
groupIndex: number;
|
94
|
+
} | {
|
95
|
+
type: "private-key";
|
96
|
+
};
|
97
|
+
exportable?: boolean;
|
98
|
+
}, null>;
|
71
99
|
/**
|
72
100
|
* Account supported methods.
|
73
101
|
*/
|
@@ -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;;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;
|
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;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,gBAAgB;CACxB;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,GAC/B,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC;AAEhC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;;;;;IAYH;;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.d.mts
CHANGED
@@ -21,10 +21,17 @@ export declare enum BtcAccountType {
|
|
21
21
|
export declare enum SolAccountType {
|
22
22
|
DataAccount = "solana:data-account"
|
23
23
|
}
|
24
|
+
/**
|
25
|
+
* A generic account type. It can be used to represent any account type that is
|
26
|
+
* not covered by the other account types. It only applies to non-EVM chains.
|
27
|
+
*/
|
28
|
+
export declare enum AnyAccountType {
|
29
|
+
Account = "any:account"
|
30
|
+
}
|
24
31
|
/**
|
25
32
|
* Supported account types.
|
26
33
|
*/
|
27
|
-
export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc4337}` | `${BtcAccountType.P2pkh}` | `${BtcAccountType.P2sh}` | `${BtcAccountType.P2wpkh}` | `${BtcAccountType.P2tr}` | `${SolAccountType.DataAccount}`;
|
34
|
+
export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc4337}` | `${BtcAccountType.P2pkh}` | `${BtcAccountType.P2sh}` | `${BtcAccountType.P2wpkh}` | `${BtcAccountType.P2tr}` | `${SolAccountType.DataAccount}` | `${AnyAccountType.Account}`;
|
28
35
|
/**
|
29
36
|
* A struct which represents a Keyring account object. It is abstract enough to
|
30
37
|
* be used with any blockchain. Specific blockchain account types should extend
|
@@ -33,9 +40,19 @@ export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc
|
|
33
40
|
* See {@link KeyringAccount}.
|
34
41
|
*/
|
35
42
|
export declare const KeyringAccountStruct: import("@metamask/superstruct").Struct<{
|
36
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
|
43
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
37
44
|
id: string;
|
38
|
-
options: Record<string, import("@metamask/utils").Json
|
45
|
+
options: Record<string, import("@metamask/utils").Json> & {
|
46
|
+
entropy?: {
|
47
|
+
type: "mnemonic";
|
48
|
+
id: string;
|
49
|
+
derivationPath: string;
|
50
|
+
groupIndex: number;
|
51
|
+
} | {
|
52
|
+
type: "private-key";
|
53
|
+
};
|
54
|
+
exportable?: boolean;
|
55
|
+
};
|
39
56
|
address: string;
|
40
57
|
scopes: `${string}:${string}`[];
|
41
58
|
methods: string[];
|
@@ -47,7 +64,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
47
64
|
/**
|
48
65
|
* Account type.
|
49
66
|
*/
|
50
|
-
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account", {
|
67
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account", {
|
51
68
|
"eip155:eoa": "eip155:eoa";
|
52
69
|
"eip155:erc4337": "eip155:erc4337";
|
53
70
|
"bip122:p2pkh": "bip122:p2pkh";
|
@@ -55,6 +72,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
55
72
|
"bip122:p2wpkh": "bip122:p2wpkh";
|
56
73
|
"bip122:p2tr": "bip122:p2tr";
|
57
74
|
"solana:data-account": "solana:data-account";
|
75
|
+
"any:account": "any:account";
|
58
76
|
}>;
|
59
77
|
/**
|
60
78
|
* Account main address.
|
@@ -67,7 +85,17 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
|
|
67
85
|
/**
|
68
86
|
* Account options.
|
69
87
|
*/
|
70
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
88
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> & {
|
89
|
+
entropy?: {
|
90
|
+
type: "mnemonic";
|
91
|
+
id: string;
|
92
|
+
derivationPath: string;
|
93
|
+
groupIndex: number;
|
94
|
+
} | {
|
95
|
+
type: "private-key";
|
96
|
+
};
|
97
|
+
exportable?: boolean;
|
98
|
+
}, null>;
|
71
99
|
/**
|
72
100
|
* Account supported methods.
|
73
101
|
*/
|
@@ -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;
|
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;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,gBAAgB;CACxB;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,GAC/B,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC;AAEhC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;;;;;IAYH;;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,
|
3
|
-
import {
|
2
|
+
import { nonempty, array, enums, string } from "@metamask/superstruct";
|
3
|
+
import { KeyringAccountOptionsStruct } from "./account-options.mjs";
|
4
4
|
import { CaipChainIdStruct } from "./caip.mjs";
|
5
5
|
/**
|
6
6
|
* Supported Ethereum account types.
|
@@ -27,6 +27,14 @@ export var SolAccountType;
|
|
27
27
|
(function (SolAccountType) {
|
28
28
|
SolAccountType["DataAccount"] = "solana:data-account";
|
29
29
|
})(SolAccountType || (SolAccountType = {}));
|
30
|
+
/**
|
31
|
+
* A generic account type. It can be used to represent any account type that is
|
32
|
+
* not covered by the other account types. It only applies to non-EVM chains.
|
33
|
+
*/
|
34
|
+
export var AnyAccountType;
|
35
|
+
(function (AnyAccountType) {
|
36
|
+
AnyAccountType["Account"] = "any:account";
|
37
|
+
})(AnyAccountType || (AnyAccountType = {}));
|
30
38
|
/**
|
31
39
|
* A struct which represents a Keyring account object. It is abstract enough to
|
32
40
|
* be used with any blockchain. Specific blockchain account types should extend
|
@@ -50,6 +58,7 @@ export const KeyringAccountStruct = object({
|
|
50
58
|
`${BtcAccountType.P2wpkh}`,
|
51
59
|
`${BtcAccountType.P2tr}`,
|
52
60
|
`${SolAccountType.DataAccount}`,
|
61
|
+
`${AnyAccountType.Account}`,
|
53
62
|
]),
|
54
63
|
/**
|
55
64
|
* Account main address.
|
@@ -62,7 +71,7 @@ export const KeyringAccountStruct = object({
|
|
62
71
|
/**
|
63
72
|
* Account options.
|
64
73
|
*/
|
65
|
-
options:
|
74
|
+
options: KeyringAccountOptionsStruct,
|
66
75
|
/**
|
67
76
|
* Account supported methods.
|
68
77
|
*/
|
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,
|
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;AAEvE,OAAO,EAAE,2BAA2B,EAAE,8BAA0B;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAe;AAE3C;;GAEG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,wCAAsB,CAAA;IACtB,sCAAoB,CAAA;IACpB,0CAAwB,CAAA;IACxB,sCAAoB,CAAA;AACtB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,yCAAuB,CAAA;AACzB,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAeD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,EAAE,EAAE,eAAe;IAEnB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;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;QAC/B,GAAG,cAAc,CAAC,OAAO,EAAE;KAC5B,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE;IAEjB;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,2BAA2B;IAEpC;;OAEG;IACH,OAAO,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, string } from '@metamask/superstruct';\n\nimport { KeyringAccountOptionsStruct } from './account-options';\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 * A generic account type. It can be used to represent any account type that is\n * not covered by the other account types. It only applies to non-EVM chains.\n */\nexport enum AnyAccountType {\n Account = 'any: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 | `${AnyAccountType.Account}`;\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 `${AnyAccountType.Account}`,\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: KeyringAccountOptionsStruct,\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
|
-
scopes: `${string}:${string}`[];
|
20
19
|
derivationPath: `m/${string}`;
|
20
|
+
scopes: `${string}:${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
|
-
scopes: `${string}:${string}`[];
|
44
43
|
derivationPath: `m/${string}`;
|
44
|
+
scopes: `${string}:${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
|
-
scopes: `${string}:${string}`[];
|
20
19
|
derivationPath: `m/${string}`;
|
20
|
+
scopes: `${string}:${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
|
-
scopes: `${string}:${string}`[];
|
44
43
|
derivationPath: `m/${string}`;
|
44
|
+
scopes: `${string}:${string}`[];
|
45
45
|
}, {
|
46
46
|
/**
|
47
47
|
* Account type.
|
package/dist/api/index.cjs
CHANGED
@@ -15,6 +15,7 @@ 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);
|
18
19
|
__exportStar(require("./address.cjs"), exports);
|
19
20
|
__exportStar(require("./asset.cjs"), exports);
|
20
21
|
__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,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"]}
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,wDAAkC;AAClC,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 './account-options';\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,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"}
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,sCAAkC;AAClC,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,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"}
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,sCAAkC;AAClC,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,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"]}
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,8BAA0B;AAC1B,sCAAkC;AAClC,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 './account-options';\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,7 +12,17 @@ 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
|
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
|
+
};
|
16
26
|
address: string;
|
17
27
|
scopes: `${string}:${string}`[];
|
18
28
|
methods: "sendBitcoin"[];
|
@@ -36,12 +46,32 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
36
46
|
sendBitcoin: "sendBitcoin";
|
37
47
|
}>>;
|
38
48
|
id: import("@metamask/superstruct").Struct<string, null>;
|
39
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
40
60
|
}>;
|
41
61
|
export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struct<{
|
42
62
|
type: "bip122:p2sh";
|
43
63
|
id: string;
|
44
|
-
options: Record<string, import("@metamask/utils").Json
|
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
|
+
};
|
45
75
|
address: string;
|
46
76
|
scopes: `${string}:${string}`[];
|
47
77
|
methods: "sendBitcoin"[];
|
@@ -65,12 +95,32 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
65
95
|
sendBitcoin: "sendBitcoin";
|
66
96
|
}>>;
|
67
97
|
id: import("@metamask/superstruct").Struct<string, null>;
|
68
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
69
109
|
}>;
|
70
110
|
export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Struct<{
|
71
111
|
type: "bip122:p2wpkh";
|
72
112
|
id: string;
|
73
|
-
options: Record<string, import("@metamask/utils").Json
|
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
|
+
};
|
74
124
|
address: string;
|
75
125
|
scopes: `${string}:${string}`[];
|
76
126
|
methods: "sendBitcoin"[];
|
@@ -94,12 +144,32 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
94
144
|
sendBitcoin: "sendBitcoin";
|
95
145
|
}>>;
|
96
146
|
id: import("@metamask/superstruct").Struct<string, null>;
|
97
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
98
158
|
}>;
|
99
159
|
export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struct<{
|
100
160
|
type: "bip122:p2tr";
|
101
161
|
id: string;
|
102
|
-
options: Record<string, import("@metamask/utils").Json
|
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
|
+
};
|
103
173
|
address: string;
|
104
174
|
scopes: `${string}:${string}`[];
|
105
175
|
methods: "sendBitcoin"[];
|
@@ -123,7 +193,17 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
|
|
123
193
|
sendBitcoin: "sendBitcoin";
|
124
194
|
}>>;
|
125
195
|
id: import("@metamask/superstruct").Struct<string, null>;
|
126
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
127
207
|
}>;
|
128
208
|
export type BtcP2pkhAccount = Infer<typeof BtcP2pkhAccountStruct>;
|
129
209
|
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,7 +12,17 @@ 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
|
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
|
+
};
|
16
26
|
address: string;
|
17
27
|
scopes: `${string}:${string}`[];
|
18
28
|
methods: "sendBitcoin"[];
|
@@ -36,12 +46,32 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
|
|
36
46
|
sendBitcoin: "sendBitcoin";
|
37
47
|
}>>;
|
38
48
|
id: import("@metamask/superstruct").Struct<string, null>;
|
39
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
40
60
|
}>;
|
41
61
|
export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struct<{
|
42
62
|
type: "bip122:p2sh";
|
43
63
|
id: string;
|
44
|
-
options: Record<string, import("@metamask/utils").Json
|
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
|
+
};
|
45
75
|
address: string;
|
46
76
|
scopes: `${string}:${string}`[];
|
47
77
|
methods: "sendBitcoin"[];
|
@@ -65,12 +95,32 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
|
|
65
95
|
sendBitcoin: "sendBitcoin";
|
66
96
|
}>>;
|
67
97
|
id: import("@metamask/superstruct").Struct<string, null>;
|
68
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
69
109
|
}>;
|
70
110
|
export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Struct<{
|
71
111
|
type: "bip122:p2wpkh";
|
72
112
|
id: string;
|
73
|
-
options: Record<string, import("@metamask/utils").Json
|
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
|
+
};
|
74
124
|
address: string;
|
75
125
|
scopes: `${string}:${string}`[];
|
76
126
|
methods: "sendBitcoin"[];
|
@@ -94,12 +144,32 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
|
|
94
144
|
sendBitcoin: "sendBitcoin";
|
95
145
|
}>>;
|
96
146
|
id: import("@metamask/superstruct").Struct<string, null>;
|
97
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
98
158
|
}>;
|
99
159
|
export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struct<{
|
100
160
|
type: "bip122:p2tr";
|
101
161
|
id: string;
|
102
|
-
options: Record<string, import("@metamask/utils").Json
|
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
|
+
};
|
103
173
|
address: string;
|
104
174
|
scopes: `${string}:${string}`[];
|
105
175
|
methods: "sendBitcoin"[];
|
@@ -123,7 +193,17 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
|
|
123
193
|
sendBitcoin: "sendBitcoin";
|
124
194
|
}>>;
|
125
195
|
id: import("@metamask/superstruct").Struct<string, null>;
|
126
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json
|
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>;
|
127
207
|
}>;
|
128
208
|
export type BtcP2pkhAccount = Infer<typeof BtcP2pkhAccountStruct>;
|
129
209
|
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,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.mts","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"}
|