@metamask-previews/keyring-internal-api 0.0.1-11541a9
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 +10 -0
- package/README.md +15 -0
- package/dist/api.cjs +138 -0
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +420 -0
- package/dist/api.d.cts.map +1 -0
- package/dist/api.d.mts +420 -0
- package/dist/api.d.mts.map +1 -0
- package/dist/api.mjs +135 -0
- package/dist/api.mjs.map +1 -0
- package/dist/btc/index.cjs +18 -0
- package/dist/btc/index.cjs.map +1 -0
- package/dist/btc/index.d.cts +2 -0
- package/dist/btc/index.d.cts.map +1 -0
- package/dist/btc/index.d.mts +2 -0
- package/dist/btc/index.d.mts.map +1 -0
- package/dist/btc/index.mjs +2 -0
- package/dist/btc/index.mjs.map +1 -0
- package/dist/btc/types.cjs +40 -0
- package/dist/btc/types.cjs.map +1 -0
- package/dist/btc/types.d.cts +34 -0
- package/dist/btc/types.d.cts.map +1 -0
- package/dist/btc/types.d.mts +34 -0
- package/dist/btc/types.d.mts.map +1 -0
- package/dist/btc/types.mjs +37 -0
- package/dist/btc/types.mjs.map +1 -0
- package/dist/eth/EthKeyring.cjs +3 -0
- package/dist/eth/EthKeyring.cjs.map +1 -0
- package/dist/eth/EthKeyring.d.cts +34 -0
- package/dist/eth/EthKeyring.d.cts.map +1 -0
- package/dist/eth/EthKeyring.d.mts +34 -0
- package/dist/eth/EthKeyring.d.mts.map +1 -0
- package/dist/eth/EthKeyring.mjs +2 -0
- package/dist/eth/EthKeyring.mjs.map +1 -0
- package/dist/eth/erc4337/index.cjs +18 -0
- package/dist/eth/erc4337/index.cjs.map +1 -0
- package/dist/eth/erc4337/index.d.cts +2 -0
- package/dist/eth/erc4337/index.d.cts.map +1 -0
- package/dist/eth/erc4337/index.d.mts +2 -0
- package/dist/eth/erc4337/index.d.mts.map +1 -0
- package/dist/eth/erc4337/index.mjs +2 -0
- package/dist/eth/erc4337/index.mjs.map +1 -0
- package/dist/eth/erc4337/types.cjs +61 -0
- package/dist/eth/erc4337/types.cjs.map +1 -0
- package/dist/eth/erc4337/types.d.cts +98 -0
- package/dist/eth/erc4337/types.d.cts.map +1 -0
- package/dist/eth/erc4337/types.d.mts +98 -0
- package/dist/eth/erc4337/types.d.mts.map +1 -0
- package/dist/eth/erc4337/types.mjs +58 -0
- package/dist/eth/erc4337/types.mjs.map +1 -0
- package/dist/eth/index.cjs +20 -0
- package/dist/eth/index.cjs.map +1 -0
- package/dist/eth/index.d.cts +5 -0
- package/dist/eth/index.d.cts.map +1 -0
- package/dist/eth/index.d.mts +5 -0
- package/dist/eth/index.d.mts.map +1 -0
- package/dist/eth/index.mjs +4 -0
- package/dist/eth/index.mjs.map +1 -0
- package/dist/eth/types.cjs +73 -0
- package/dist/eth/types.cjs.map +1 -0
- package/dist/eth/types.d.cts +81 -0
- package/dist/eth/types.d.cts.map +1 -0
- package/dist/eth/types.d.mts +81 -0
- package/dist/eth/types.d.mts.map +1 -0
- package/dist/eth/types.mjs +70 -0
- package/dist/eth/types.mjs.map +1 -0
- package/dist/eth/utils.cjs +14 -0
- package/dist/eth/utils.cjs.map +1 -0
- package/dist/eth/utils.d.cts +9 -0
- package/dist/eth/utils.d.cts.map +1 -0
- package/dist/eth/utils.d.mts +9 -0
- package/dist/eth/utils.d.mts.map +1 -0
- package/dist/eth/utils.mjs +11 -0
- package/dist/eth/utils.mjs.map +1 -0
- package/dist/events.cjs +83 -0
- package/dist/events.cjs.map +1 -0
- package/dist/events.d.cts +172 -0
- package/dist/events.d.cts.map +1 -0
- package/dist/events.d.mts +172 -0
- package/dist/events.d.mts.map +1 -0
- package/dist/events.mjs +80 -0
- package/dist/events.mjs.map +1 -0
- package/dist/index.cjs +24 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -0
- package/dist/rpc.cjs +33 -0
- package/dist/rpc.cjs.map +1 -0
- package/dist/rpc.d.cts +26 -0
- package/dist/rpc.d.cts.map +1 -0
- package/dist/rpc.d.mts +26 -0
- package/dist/rpc.d.mts.map +1 -0
- package/dist/rpc.mjs +29 -0
- package/dist/rpc.mjs.map +1 -0
- package/dist/sol/index.cjs +18 -0
- package/dist/sol/index.cjs.map +1 -0
- package/dist/sol/index.d.cts +2 -0
- package/dist/sol/index.d.cts.map +1 -0
- package/dist/sol/index.d.mts +2 -0
- package/dist/sol/index.d.mts.map +1 -0
- package/dist/sol/index.mjs +2 -0
- package/dist/sol/index.mjs.map +1 -0
- package/dist/sol/types.cjs +36 -0
- package/dist/sol/types.cjs.map +1 -0
- package/dist/sol/types.d.cts +39 -0
- package/dist/sol/types.d.cts.map +1 -0
- package/dist/sol/types.d.mts +39 -0
- package/dist/sol/types.d.mts.map +1 -0
- package/dist/sol/types.mjs +33 -0
- package/dist/sol/types.mjs.map +1 -0
- package/dist/types.cjs +56 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +392 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +392 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +53 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported keyring events.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum KeyringEvent {
|
|
5
|
+
AccountCreated = "notify:accountCreated",
|
|
6
|
+
AccountUpdated = "notify:accountUpdated",
|
|
7
|
+
AccountDeleted = "notify:accountDeleted",
|
|
8
|
+
RequestApproved = "notify:requestApproved",
|
|
9
|
+
RequestRejected = "notify:requestRejected"
|
|
10
|
+
}
|
|
11
|
+
export declare const AccountCreatedEventStruct: import("@metamask/superstruct").Struct<{
|
|
12
|
+
method: "notify:accountCreated";
|
|
13
|
+
params: {
|
|
14
|
+
account: {
|
|
15
|
+
id: string;
|
|
16
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
17
|
+
address: string;
|
|
18
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
19
|
+
methods: string[];
|
|
20
|
+
};
|
|
21
|
+
accountNameSuggestion?: string;
|
|
22
|
+
displayConfirmation?: boolean;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
method: import("@metamask/superstruct").Struct<"notify:accountCreated", "notify:accountCreated">;
|
|
26
|
+
params: import("@metamask/superstruct").Struct<{
|
|
27
|
+
account: {
|
|
28
|
+
id: string;
|
|
29
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
30
|
+
address: string;
|
|
31
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
32
|
+
methods: string[];
|
|
33
|
+
};
|
|
34
|
+
accountNameSuggestion?: string;
|
|
35
|
+
displayConfirmation?: boolean;
|
|
36
|
+
}, {
|
|
37
|
+
/**
|
|
38
|
+
* New account object.
|
|
39
|
+
*/
|
|
40
|
+
account: import("@metamask/superstruct").Struct<{
|
|
41
|
+
id: string;
|
|
42
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
43
|
+
address: string;
|
|
44
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
45
|
+
methods: string[];
|
|
46
|
+
}, {
|
|
47
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
48
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
|
|
49
|
+
"eip155:eoa": "eip155:eoa";
|
|
50
|
+
"eip155:erc4337": "eip155:erc4337";
|
|
51
|
+
"bip122:p2wpkh": "bip122:p2wpkh";
|
|
52
|
+
"solana:data-account": "solana:data-account";
|
|
53
|
+
}>;
|
|
54
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
55
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
56
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Account name suggestion provided to the MetaMask client.
|
|
60
|
+
*
|
|
61
|
+
* The keyring can suggest a name for the account, but it's up to the
|
|
62
|
+
* client to decide whether to use it. The keyring won't be informed if the
|
|
63
|
+
* client decides to use a different name.
|
|
64
|
+
*/
|
|
65
|
+
accountNameSuggestion: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
66
|
+
/**
|
|
67
|
+
* Instructs MetaMask to display the add account confirmation dialog in the UI.
|
|
68
|
+
* **Note:** This is not guaranteed to be honored by the MetaMask client.
|
|
69
|
+
*/
|
|
70
|
+
displayConfirmation: import("@metamask/superstruct").Struct<boolean | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").Struct<{
|
|
74
|
+
method: "notify:accountUpdated";
|
|
75
|
+
params: {
|
|
76
|
+
account: {
|
|
77
|
+
id: string;
|
|
78
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
79
|
+
address: string;
|
|
80
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
81
|
+
methods: string[];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
method: import("@metamask/superstruct").Struct<"notify:accountUpdated", "notify:accountUpdated">;
|
|
86
|
+
params: import("@metamask/superstruct").Struct<{
|
|
87
|
+
account: {
|
|
88
|
+
id: string;
|
|
89
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
90
|
+
address: string;
|
|
91
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
92
|
+
methods: string[];
|
|
93
|
+
};
|
|
94
|
+
}, {
|
|
95
|
+
/**
|
|
96
|
+
* Updated account object.
|
|
97
|
+
*/
|
|
98
|
+
account: import("@metamask/superstruct").Struct<{
|
|
99
|
+
id: string;
|
|
100
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
101
|
+
address: string;
|
|
102
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
103
|
+
methods: string[];
|
|
104
|
+
}, {
|
|
105
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
106
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
|
|
107
|
+
"eip155:eoa": "eip155:eoa";
|
|
108
|
+
"eip155:erc4337": "eip155:erc4337";
|
|
109
|
+
"bip122:p2wpkh": "bip122:p2wpkh";
|
|
110
|
+
"solana:data-account": "solana:data-account";
|
|
111
|
+
}>;
|
|
112
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
113
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
114
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
115
|
+
}>;
|
|
116
|
+
}>;
|
|
117
|
+
}>;
|
|
118
|
+
export declare const AccountDeletedEventStruct: import("@metamask/superstruct").Struct<{
|
|
119
|
+
method: "notify:accountDeleted";
|
|
120
|
+
params: {
|
|
121
|
+
id: string;
|
|
122
|
+
};
|
|
123
|
+
}, {
|
|
124
|
+
method: import("@metamask/superstruct").Struct<"notify:accountDeleted", "notify:accountDeleted">;
|
|
125
|
+
params: import("@metamask/superstruct").Struct<{
|
|
126
|
+
id: string;
|
|
127
|
+
}, {
|
|
128
|
+
/**
|
|
129
|
+
* Deleted account ID.
|
|
130
|
+
*/
|
|
131
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
132
|
+
}>;
|
|
133
|
+
}>;
|
|
134
|
+
export declare const RequestApprovedEventStruct: import("@metamask/superstruct").Struct<{
|
|
135
|
+
method: "notify:requestApproved";
|
|
136
|
+
params: {
|
|
137
|
+
id: string;
|
|
138
|
+
result: import("@metamask/utils").Json;
|
|
139
|
+
};
|
|
140
|
+
}, {
|
|
141
|
+
method: import("@metamask/superstruct").Struct<"notify:requestApproved", "notify:requestApproved">;
|
|
142
|
+
params: import("@metamask/superstruct").Struct<{
|
|
143
|
+
id: string;
|
|
144
|
+
result: import("@metamask/utils").Json;
|
|
145
|
+
}, {
|
|
146
|
+
/**
|
|
147
|
+
* Request ID.
|
|
148
|
+
*/
|
|
149
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
150
|
+
/**
|
|
151
|
+
* Request result.
|
|
152
|
+
*/
|
|
153
|
+
result: import("@metamask/superstruct").Struct<import("@metamask/utils").Json, unknown>;
|
|
154
|
+
}>;
|
|
155
|
+
}>;
|
|
156
|
+
export declare const RequestRejectedEventStruct: import("@metamask/superstruct").Struct<{
|
|
157
|
+
method: "notify:requestRejected";
|
|
158
|
+
params: {
|
|
159
|
+
id: string;
|
|
160
|
+
};
|
|
161
|
+
}, {
|
|
162
|
+
method: import("@metamask/superstruct").Struct<"notify:requestRejected", "notify:requestRejected">;
|
|
163
|
+
params: import("@metamask/superstruct").Struct<{
|
|
164
|
+
id: string;
|
|
165
|
+
}, {
|
|
166
|
+
/**
|
|
167
|
+
* Request ID.
|
|
168
|
+
*/
|
|
169
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
170
|
+
}>;
|
|
171
|
+
}>;
|
|
172
|
+
//# sourceMappingURL=events.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.cts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,YAAY;IAEtB,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IAGxC,eAAe,2BAA2B;IAC1C,eAAe,2BAA2B;CAC3C;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;QAGH;;;;;;WAMG;;QAGH;;;WAGG;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;QAGlC;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;QAGnC;;WAEG;;QAGH;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;QAGnC;;WAEG;;;EAGL,CAAC"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported keyring events.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum KeyringEvent {
|
|
5
|
+
AccountCreated = "notify:accountCreated",
|
|
6
|
+
AccountUpdated = "notify:accountUpdated",
|
|
7
|
+
AccountDeleted = "notify:accountDeleted",
|
|
8
|
+
RequestApproved = "notify:requestApproved",
|
|
9
|
+
RequestRejected = "notify:requestRejected"
|
|
10
|
+
}
|
|
11
|
+
export declare const AccountCreatedEventStruct: import("@metamask/superstruct").Struct<{
|
|
12
|
+
method: "notify:accountCreated";
|
|
13
|
+
params: {
|
|
14
|
+
account: {
|
|
15
|
+
id: string;
|
|
16
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
17
|
+
address: string;
|
|
18
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
19
|
+
methods: string[];
|
|
20
|
+
};
|
|
21
|
+
accountNameSuggestion?: string;
|
|
22
|
+
displayConfirmation?: boolean;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
method: import("@metamask/superstruct").Struct<"notify:accountCreated", "notify:accountCreated">;
|
|
26
|
+
params: import("@metamask/superstruct").Struct<{
|
|
27
|
+
account: {
|
|
28
|
+
id: string;
|
|
29
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
30
|
+
address: string;
|
|
31
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
32
|
+
methods: string[];
|
|
33
|
+
};
|
|
34
|
+
accountNameSuggestion?: string;
|
|
35
|
+
displayConfirmation?: boolean;
|
|
36
|
+
}, {
|
|
37
|
+
/**
|
|
38
|
+
* New account object.
|
|
39
|
+
*/
|
|
40
|
+
account: import("@metamask/superstruct").Struct<{
|
|
41
|
+
id: string;
|
|
42
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
43
|
+
address: string;
|
|
44
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
45
|
+
methods: string[];
|
|
46
|
+
}, {
|
|
47
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
48
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
|
|
49
|
+
"eip155:eoa": "eip155:eoa";
|
|
50
|
+
"eip155:erc4337": "eip155:erc4337";
|
|
51
|
+
"bip122:p2wpkh": "bip122:p2wpkh";
|
|
52
|
+
"solana:data-account": "solana:data-account";
|
|
53
|
+
}>;
|
|
54
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
55
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
56
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Account name suggestion provided to the MetaMask client.
|
|
60
|
+
*
|
|
61
|
+
* The keyring can suggest a name for the account, but it's up to the
|
|
62
|
+
* client to decide whether to use it. The keyring won't be informed if the
|
|
63
|
+
* client decides to use a different name.
|
|
64
|
+
*/
|
|
65
|
+
accountNameSuggestion: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
66
|
+
/**
|
|
67
|
+
* Instructs MetaMask to display the add account confirmation dialog in the UI.
|
|
68
|
+
* **Note:** This is not guaranteed to be honored by the MetaMask client.
|
|
69
|
+
*/
|
|
70
|
+
displayConfirmation: import("@metamask/superstruct").Struct<boolean | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").Struct<{
|
|
74
|
+
method: "notify:accountUpdated";
|
|
75
|
+
params: {
|
|
76
|
+
account: {
|
|
77
|
+
id: string;
|
|
78
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
79
|
+
address: string;
|
|
80
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
81
|
+
methods: string[];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
method: import("@metamask/superstruct").Struct<"notify:accountUpdated", "notify:accountUpdated">;
|
|
86
|
+
params: import("@metamask/superstruct").Struct<{
|
|
87
|
+
account: {
|
|
88
|
+
id: string;
|
|
89
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
90
|
+
address: string;
|
|
91
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
92
|
+
methods: string[];
|
|
93
|
+
};
|
|
94
|
+
}, {
|
|
95
|
+
/**
|
|
96
|
+
* Updated account object.
|
|
97
|
+
*/
|
|
98
|
+
account: import("@metamask/superstruct").Struct<{
|
|
99
|
+
id: string;
|
|
100
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
101
|
+
address: string;
|
|
102
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
103
|
+
methods: string[];
|
|
104
|
+
}, {
|
|
105
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
106
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
|
|
107
|
+
"eip155:eoa": "eip155:eoa";
|
|
108
|
+
"eip155:erc4337": "eip155:erc4337";
|
|
109
|
+
"bip122:p2wpkh": "bip122:p2wpkh";
|
|
110
|
+
"solana:data-account": "solana:data-account";
|
|
111
|
+
}>;
|
|
112
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
113
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
114
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
115
|
+
}>;
|
|
116
|
+
}>;
|
|
117
|
+
}>;
|
|
118
|
+
export declare const AccountDeletedEventStruct: import("@metamask/superstruct").Struct<{
|
|
119
|
+
method: "notify:accountDeleted";
|
|
120
|
+
params: {
|
|
121
|
+
id: string;
|
|
122
|
+
};
|
|
123
|
+
}, {
|
|
124
|
+
method: import("@metamask/superstruct").Struct<"notify:accountDeleted", "notify:accountDeleted">;
|
|
125
|
+
params: import("@metamask/superstruct").Struct<{
|
|
126
|
+
id: string;
|
|
127
|
+
}, {
|
|
128
|
+
/**
|
|
129
|
+
* Deleted account ID.
|
|
130
|
+
*/
|
|
131
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
132
|
+
}>;
|
|
133
|
+
}>;
|
|
134
|
+
export declare const RequestApprovedEventStruct: import("@metamask/superstruct").Struct<{
|
|
135
|
+
method: "notify:requestApproved";
|
|
136
|
+
params: {
|
|
137
|
+
id: string;
|
|
138
|
+
result: import("@metamask/utils").Json;
|
|
139
|
+
};
|
|
140
|
+
}, {
|
|
141
|
+
method: import("@metamask/superstruct").Struct<"notify:requestApproved", "notify:requestApproved">;
|
|
142
|
+
params: import("@metamask/superstruct").Struct<{
|
|
143
|
+
id: string;
|
|
144
|
+
result: import("@metamask/utils").Json;
|
|
145
|
+
}, {
|
|
146
|
+
/**
|
|
147
|
+
* Request ID.
|
|
148
|
+
*/
|
|
149
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
150
|
+
/**
|
|
151
|
+
* Request result.
|
|
152
|
+
*/
|
|
153
|
+
result: import("@metamask/superstruct").Struct<import("@metamask/utils").Json, unknown>;
|
|
154
|
+
}>;
|
|
155
|
+
}>;
|
|
156
|
+
export declare const RequestRejectedEventStruct: import("@metamask/superstruct").Struct<{
|
|
157
|
+
method: "notify:requestRejected";
|
|
158
|
+
params: {
|
|
159
|
+
id: string;
|
|
160
|
+
};
|
|
161
|
+
}, {
|
|
162
|
+
method: import("@metamask/superstruct").Struct<"notify:requestRejected", "notify:requestRejected">;
|
|
163
|
+
params: import("@metamask/superstruct").Struct<{
|
|
164
|
+
id: string;
|
|
165
|
+
}, {
|
|
166
|
+
/**
|
|
167
|
+
* Request ID.
|
|
168
|
+
*/
|
|
169
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
170
|
+
}>;
|
|
171
|
+
}>;
|
|
172
|
+
//# sourceMappingURL=events.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,YAAY;IAEtB,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IAGxC,eAAe,2BAA2B;IAC1C,eAAe,2BAA2B;CAC3C;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;QAGH;;;;;;WAMG;;QAGH;;;WAGG;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;QAGlC;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;QAGnC;;WAEG;;QAGH;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;QAGnC;;WAEG;;;EAGL,CAAC"}
|
package/dist/events.mjs
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { KeyringAccountStruct } from "@metamask/keyring-api";
|
|
2
|
+
import { exactOptional, object, UuidStruct } from "@metamask/keyring-utils";
|
|
3
|
+
import { boolean, literal, string } from "@metamask/superstruct";
|
|
4
|
+
import { JsonStruct } from "@metamask/utils";
|
|
5
|
+
/**
|
|
6
|
+
* Supported keyring events.
|
|
7
|
+
*/
|
|
8
|
+
export var KeyringEvent;
|
|
9
|
+
(function (KeyringEvent) {
|
|
10
|
+
// Account events
|
|
11
|
+
KeyringEvent["AccountCreated"] = "notify:accountCreated";
|
|
12
|
+
KeyringEvent["AccountUpdated"] = "notify:accountUpdated";
|
|
13
|
+
KeyringEvent["AccountDeleted"] = "notify:accountDeleted";
|
|
14
|
+
// Request events
|
|
15
|
+
KeyringEvent["RequestApproved"] = "notify:requestApproved";
|
|
16
|
+
KeyringEvent["RequestRejected"] = "notify:requestRejected";
|
|
17
|
+
})(KeyringEvent || (KeyringEvent = {}));
|
|
18
|
+
export const AccountCreatedEventStruct = object({
|
|
19
|
+
method: literal(`${KeyringEvent.AccountCreated}`),
|
|
20
|
+
params: object({
|
|
21
|
+
/**
|
|
22
|
+
* New account object.
|
|
23
|
+
*/
|
|
24
|
+
account: KeyringAccountStruct,
|
|
25
|
+
/**
|
|
26
|
+
* Account name suggestion provided to the MetaMask client.
|
|
27
|
+
*
|
|
28
|
+
* The keyring can suggest a name for the account, but it's up to the
|
|
29
|
+
* client to decide whether to use it. The keyring won't be informed if the
|
|
30
|
+
* client decides to use a different name.
|
|
31
|
+
*/
|
|
32
|
+
accountNameSuggestion: exactOptional(string()),
|
|
33
|
+
/**
|
|
34
|
+
* Instructs MetaMask to display the add account confirmation dialog in the UI.
|
|
35
|
+
* **Note:** This is not guaranteed to be honored by the MetaMask client.
|
|
36
|
+
*/
|
|
37
|
+
displayConfirmation: exactOptional(boolean()),
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
export const AccountUpdatedEventStruct = object({
|
|
41
|
+
method: literal(`${KeyringEvent.AccountUpdated}`),
|
|
42
|
+
params: object({
|
|
43
|
+
/**
|
|
44
|
+
* Updated account object.
|
|
45
|
+
*/
|
|
46
|
+
account: KeyringAccountStruct,
|
|
47
|
+
}),
|
|
48
|
+
});
|
|
49
|
+
export const AccountDeletedEventStruct = object({
|
|
50
|
+
method: literal(`${KeyringEvent.AccountDeleted}`),
|
|
51
|
+
params: object({
|
|
52
|
+
/**
|
|
53
|
+
* Deleted account ID.
|
|
54
|
+
*/
|
|
55
|
+
id: UuidStruct,
|
|
56
|
+
}),
|
|
57
|
+
});
|
|
58
|
+
export const RequestApprovedEventStruct = object({
|
|
59
|
+
method: literal(`${KeyringEvent.RequestApproved}`),
|
|
60
|
+
params: object({
|
|
61
|
+
/**
|
|
62
|
+
* Request ID.
|
|
63
|
+
*/
|
|
64
|
+
id: UuidStruct,
|
|
65
|
+
/**
|
|
66
|
+
* Request result.
|
|
67
|
+
*/
|
|
68
|
+
result: JsonStruct,
|
|
69
|
+
}),
|
|
70
|
+
});
|
|
71
|
+
export const RequestRejectedEventStruct = object({
|
|
72
|
+
method: literal(`${KeyringEvent.RequestRejected}`),
|
|
73
|
+
params: object({
|
|
74
|
+
/**
|
|
75
|
+
* Request ID.
|
|
76
|
+
*/
|
|
77
|
+
id: UuidStruct,
|
|
78
|
+
}),
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=events.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.mjs","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,8BAA8B;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,gCAAgC;AAC5E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,8BAA8B;AACjE,OAAO,EAAE,UAAU,EAAE,wBAAwB;AAE7C;;GAEG;AACH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,iBAAiB;IACjB,wDAAwC,CAAA;IACxC,wDAAwC,CAAA;IACxC,wDAAwC,CAAA;IAExC,iBAAiB;IACjB,0DAA0C,CAAA;IAC1C,0DAA0C,CAAA;AAC5C,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,OAAO,EAAE,oBAAoB;QAE7B;;;;;;WAMG;QACH,qBAAqB,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC;QAE9C;;;WAGG;QACH,mBAAmB,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC;KAC9C,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,OAAO,EAAE,oBAAoB;KAC9B,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,EAAE,EAAE,UAAU;KACf,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,EAAE,EAAE,UAAU;QAEd;;WAEG;QACH,MAAM,EAAE,UAAU;KACnB,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,EAAE,EAAE,UAAU;KACf,CAAC;CACH,CAAC,CAAC","sourcesContent":["import { KeyringAccountStruct } from '@metamask/keyring-api';\nimport { exactOptional, object, UuidStruct } from '@metamask/keyring-utils';\nimport { boolean, literal, string } from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\n/**\n * Supported keyring events.\n */\nexport enum KeyringEvent {\n // Account events\n AccountCreated = 'notify:accountCreated',\n AccountUpdated = 'notify:accountUpdated',\n AccountDeleted = 'notify:accountDeleted',\n\n // Request events\n RequestApproved = 'notify:requestApproved',\n RequestRejected = 'notify:requestRejected',\n}\n\nexport const AccountCreatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountCreated}`),\n params: object({\n /**\n * New account object.\n */\n account: KeyringAccountStruct,\n\n /**\n * Account name suggestion provided to the MetaMask client.\n *\n * The keyring can suggest a name for the account, but it's up to the\n * client to decide whether to use it. The keyring won't be informed if the\n * client decides to use a different name.\n */\n accountNameSuggestion: exactOptional(string()),\n\n /**\n * Instructs MetaMask to display the add account confirmation dialog in the UI.\n * **Note:** This is not guaranteed to be honored by the MetaMask client.\n */\n displayConfirmation: exactOptional(boolean()),\n }),\n});\n\nexport const AccountUpdatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountUpdated}`),\n params: object({\n /**\n * Updated account object.\n */\n account: KeyringAccountStruct,\n }),\n});\n\nexport const AccountDeletedEventStruct = object({\n method: literal(`${KeyringEvent.AccountDeleted}`),\n params: object({\n /**\n * Deleted account ID.\n */\n id: UuidStruct,\n }),\n});\n\nexport const RequestApprovedEventStruct = object({\n method: literal(`${KeyringEvent.RequestApproved}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n\n /**\n * Request result.\n */\n result: JsonStruct,\n }),\n});\n\nexport const RequestRejectedEventStruct = object({\n method: literal(`${KeyringEvent.RequestRejected}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n }),\n});\n"]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./btc/index.cjs"), exports);
|
|
18
|
+
__exportStar(require("./eth/index.cjs"), exports);
|
|
19
|
+
__exportStar(require("./sol/index.cjs"), exports);
|
|
20
|
+
__exportStar(require("./api.cjs"), exports);
|
|
21
|
+
__exportStar(require("./events.cjs"), exports);
|
|
22
|
+
__exportStar(require("./rpc.cjs"), exports);
|
|
23
|
+
__exportStar(require("./types.cjs"), exports);
|
|
24
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAsB;AACtB,kDAAsB;AACtB,kDAAsB;AACtB,4CAAsB;AACtB,+CAAyB;AACzB,4CAAsB;AACtB,8CAAwB","sourcesContent":["export * from './btc';\nexport * from './eth';\nexport * from './sol';\nexport * from './api';\nexport * from './events';\nexport * from './rpc';\nexport * from './types';\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,gCAAsB;AACtB,gCAAsB;AACtB,0BAAsB;AACtB,6BAAyB;AACzB,0BAAsB;AACtB,4BAAwB"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,gCAAsB;AACtB,gCAAsB;AACtB,0BAAsB;AACtB,6BAAyB;AACzB,0BAAsB;AACtB,4BAAwB"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,gCAAsB;AACtB,gCAAsB;AACtB,0BAAsB;AACtB,6BAAyB;AACzB,0BAAsB;AACtB,4BAAwB","sourcesContent":["export * from './btc';\nexport * from './eth';\nexport * from './sol';\nexport * from './api';\nexport * from './events';\nexport * from './rpc';\nexport * from './types';\n"]}
|
package/dist/rpc.cjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeyringRpcMethod = void 0;
|
|
4
|
+
exports.isKeyringRpcMethod = isKeyringRpcMethod;
|
|
5
|
+
/**
|
|
6
|
+
* Keyring RPC methods used by the API.
|
|
7
|
+
*/
|
|
8
|
+
var KeyringRpcMethod;
|
|
9
|
+
(function (KeyringRpcMethod) {
|
|
10
|
+
KeyringRpcMethod["ListAccounts"] = "keyring_listAccounts";
|
|
11
|
+
KeyringRpcMethod["GetAccount"] = "keyring_getAccount";
|
|
12
|
+
KeyringRpcMethod["CreateAccount"] = "keyring_createAccount";
|
|
13
|
+
KeyringRpcMethod["GetAccountBalances"] = "keyring_getAccountBalances";
|
|
14
|
+
KeyringRpcMethod["FilterAccountChains"] = "keyring_filterAccountChains";
|
|
15
|
+
KeyringRpcMethod["UpdateAccount"] = "keyring_updateAccount";
|
|
16
|
+
KeyringRpcMethod["DeleteAccount"] = "keyring_deleteAccount";
|
|
17
|
+
KeyringRpcMethod["ExportAccount"] = "keyring_exportAccount";
|
|
18
|
+
KeyringRpcMethod["ListRequests"] = "keyring_listRequests";
|
|
19
|
+
KeyringRpcMethod["GetRequest"] = "keyring_getRequest";
|
|
20
|
+
KeyringRpcMethod["SubmitRequest"] = "keyring_submitRequest";
|
|
21
|
+
KeyringRpcMethod["ApproveRequest"] = "keyring_approveRequest";
|
|
22
|
+
KeyringRpcMethod["RejectRequest"] = "keyring_rejectRequest";
|
|
23
|
+
})(KeyringRpcMethod || (exports.KeyringRpcMethod = KeyringRpcMethod = {}));
|
|
24
|
+
/**
|
|
25
|
+
* Check if a method is a keyring RPC method.
|
|
26
|
+
*
|
|
27
|
+
* @param method - Method to check.
|
|
28
|
+
* @returns Whether the method is a keyring RPC method.
|
|
29
|
+
*/
|
|
30
|
+
function isKeyringRpcMethod(method) {
|
|
31
|
+
return Object.values(KeyringRpcMethod).includes(method);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=rpc.cjs.map
|
package/dist/rpc.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.cjs","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":";;;AAyBA,gDAEC;AA3BD;;GAEG;AACH,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC1B,yDAAqC,CAAA;IACrC,qDAAiC,CAAA;IACjC,2DAAuC,CAAA;IACvC,qEAAiD,CAAA;IACjD,uEAAmD,CAAA;IACnD,2DAAuC,CAAA;IACvC,2DAAuC,CAAA;IACvC,2DAAuC,CAAA;IACvC,yDAAqC,CAAA;IACrC,qDAAiC,CAAA;IACjC,2DAAuC,CAAA;IACvC,6DAAyC,CAAA;IACzC,2DAAuC,CAAA;AACzC,CAAC,EAdW,gBAAgB,gCAAhB,gBAAgB,QAc3B;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,MAAc;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,MAA0B,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/**\n * Keyring RPC methods used by the API.\n */\nexport enum KeyringRpcMethod {\n ListAccounts = 'keyring_listAccounts',\n GetAccount = 'keyring_getAccount',\n CreateAccount = 'keyring_createAccount',\n GetAccountBalances = 'keyring_getAccountBalances',\n FilterAccountChains = 'keyring_filterAccountChains',\n UpdateAccount = 'keyring_updateAccount',\n DeleteAccount = 'keyring_deleteAccount',\n ExportAccount = 'keyring_exportAccount',\n ListRequests = 'keyring_listRequests',\n GetRequest = 'keyring_getRequest',\n SubmitRequest = 'keyring_submitRequest',\n ApproveRequest = 'keyring_approveRequest',\n RejectRequest = 'keyring_rejectRequest',\n}\n\n/**\n * Check if a method is a keyring RPC method.\n *\n * @param method - Method to check.\n * @returns Whether the method is a keyring RPC method.\n */\nexport function isKeyringRpcMethod(method: string): boolean {\n return Object.values(KeyringRpcMethod).includes(method as KeyringRpcMethod);\n}\n"]}
|
package/dist/rpc.d.cts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyring RPC methods used by the API.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum KeyringRpcMethod {
|
|
5
|
+
ListAccounts = "keyring_listAccounts",
|
|
6
|
+
GetAccount = "keyring_getAccount",
|
|
7
|
+
CreateAccount = "keyring_createAccount",
|
|
8
|
+
GetAccountBalances = "keyring_getAccountBalances",
|
|
9
|
+
FilterAccountChains = "keyring_filterAccountChains",
|
|
10
|
+
UpdateAccount = "keyring_updateAccount",
|
|
11
|
+
DeleteAccount = "keyring_deleteAccount",
|
|
12
|
+
ExportAccount = "keyring_exportAccount",
|
|
13
|
+
ListRequests = "keyring_listRequests",
|
|
14
|
+
GetRequest = "keyring_getRequest",
|
|
15
|
+
SubmitRequest = "keyring_submitRequest",
|
|
16
|
+
ApproveRequest = "keyring_approveRequest",
|
|
17
|
+
RejectRequest = "keyring_rejectRequest"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Check if a method is a keyring RPC method.
|
|
21
|
+
*
|
|
22
|
+
* @param method - Method to check.
|
|
23
|
+
* @returns Whether the method is a keyring RPC method.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isKeyringRpcMethod(method: string): boolean;
|
|
26
|
+
//# sourceMappingURL=rpc.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.cts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,kBAAkB,+BAA+B;IACjD,mBAAmB,gCAAgC;IACnD,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,cAAc,2BAA2B;IACzC,aAAa,0BAA0B;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
package/dist/rpc.d.mts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyring RPC methods used by the API.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum KeyringRpcMethod {
|
|
5
|
+
ListAccounts = "keyring_listAccounts",
|
|
6
|
+
GetAccount = "keyring_getAccount",
|
|
7
|
+
CreateAccount = "keyring_createAccount",
|
|
8
|
+
GetAccountBalances = "keyring_getAccountBalances",
|
|
9
|
+
FilterAccountChains = "keyring_filterAccountChains",
|
|
10
|
+
UpdateAccount = "keyring_updateAccount",
|
|
11
|
+
DeleteAccount = "keyring_deleteAccount",
|
|
12
|
+
ExportAccount = "keyring_exportAccount",
|
|
13
|
+
ListRequests = "keyring_listRequests",
|
|
14
|
+
GetRequest = "keyring_getRequest",
|
|
15
|
+
SubmitRequest = "keyring_submitRequest",
|
|
16
|
+
ApproveRequest = "keyring_approveRequest",
|
|
17
|
+
RejectRequest = "keyring_rejectRequest"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Check if a method is a keyring RPC method.
|
|
21
|
+
*
|
|
22
|
+
* @param method - Method to check.
|
|
23
|
+
* @returns Whether the method is a keyring RPC method.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isKeyringRpcMethod(method: string): boolean;
|
|
26
|
+
//# sourceMappingURL=rpc.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.mts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,kBAAkB,+BAA+B;IACjD,mBAAmB,gCAAgC;IACnD,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,cAAc,2BAA2B;IACzC,aAAa,0BAA0B;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
package/dist/rpc.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyring RPC methods used by the API.
|
|
3
|
+
*/
|
|
4
|
+
export var KeyringRpcMethod;
|
|
5
|
+
(function (KeyringRpcMethod) {
|
|
6
|
+
KeyringRpcMethod["ListAccounts"] = "keyring_listAccounts";
|
|
7
|
+
KeyringRpcMethod["GetAccount"] = "keyring_getAccount";
|
|
8
|
+
KeyringRpcMethod["CreateAccount"] = "keyring_createAccount";
|
|
9
|
+
KeyringRpcMethod["GetAccountBalances"] = "keyring_getAccountBalances";
|
|
10
|
+
KeyringRpcMethod["FilterAccountChains"] = "keyring_filterAccountChains";
|
|
11
|
+
KeyringRpcMethod["UpdateAccount"] = "keyring_updateAccount";
|
|
12
|
+
KeyringRpcMethod["DeleteAccount"] = "keyring_deleteAccount";
|
|
13
|
+
KeyringRpcMethod["ExportAccount"] = "keyring_exportAccount";
|
|
14
|
+
KeyringRpcMethod["ListRequests"] = "keyring_listRequests";
|
|
15
|
+
KeyringRpcMethod["GetRequest"] = "keyring_getRequest";
|
|
16
|
+
KeyringRpcMethod["SubmitRequest"] = "keyring_submitRequest";
|
|
17
|
+
KeyringRpcMethod["ApproveRequest"] = "keyring_approveRequest";
|
|
18
|
+
KeyringRpcMethod["RejectRequest"] = "keyring_rejectRequest";
|
|
19
|
+
})(KeyringRpcMethod || (KeyringRpcMethod = {}));
|
|
20
|
+
/**
|
|
21
|
+
* Check if a method is a keyring RPC method.
|
|
22
|
+
*
|
|
23
|
+
* @param method - Method to check.
|
|
24
|
+
* @returns Whether the method is a keyring RPC method.
|
|
25
|
+
*/
|
|
26
|
+
export function isKeyringRpcMethod(method) {
|
|
27
|
+
return Object.values(KeyringRpcMethod).includes(method);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=rpc.mjs.map
|
package/dist/rpc.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.mjs","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC1B,yDAAqC,CAAA;IACrC,qDAAiC,CAAA;IACjC,2DAAuC,CAAA;IACvC,qEAAiD,CAAA;IACjD,uEAAmD,CAAA;IACnD,2DAAuC,CAAA;IACvC,2DAAuC,CAAA;IACvC,2DAAuC,CAAA;IACvC,yDAAqC,CAAA;IACrC,qDAAiC,CAAA;IACjC,2DAAuC,CAAA;IACvC,6DAAyC,CAAA;IACzC,2DAAuC,CAAA;AACzC,CAAC,EAdW,gBAAgB,KAAhB,gBAAgB,QAc3B;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,MAA0B,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/**\n * Keyring RPC methods used by the API.\n */\nexport enum KeyringRpcMethod {\n ListAccounts = 'keyring_listAccounts',\n GetAccount = 'keyring_getAccount',\n CreateAccount = 'keyring_createAccount',\n GetAccountBalances = 'keyring_getAccountBalances',\n FilterAccountChains = 'keyring_filterAccountChains',\n UpdateAccount = 'keyring_updateAccount',\n DeleteAccount = 'keyring_deleteAccount',\n ExportAccount = 'keyring_exportAccount',\n ListRequests = 'keyring_listRequests',\n GetRequest = 'keyring_getRequest',\n SubmitRequest = 'keyring_submitRequest',\n ApproveRequest = 'keyring_approveRequest',\n RejectRequest = 'keyring_rejectRequest',\n}\n\n/**\n * Check if a method is a keyring RPC method.\n *\n * @param method - Method to check.\n * @returns Whether the method is a keyring RPC method.\n */\nexport function isKeyringRpcMethod(method: string): boolean {\n return Object.values(KeyringRpcMethod).includes(method as KeyringRpcMethod);\n}\n"]}
|