@metamask-previews/keyring-internal-api 0.0.1-11541a9 → 0.0.1-1c468fa
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/eth/EthKeyring.cjs.map +1 -1
- package/dist/eth/EthKeyring.d.cts +1 -2
- package/dist/eth/EthKeyring.d.cts.map +1 -1
- package/dist/eth/EthKeyring.d.mts +1 -2
- package/dist/eth/EthKeyring.d.mts.map +1 -1
- package/dist/eth/EthKeyring.mjs.map +1 -1
- package/dist/eth/index.cjs +0 -17
- package/dist/eth/index.cjs.map +1 -1
- package/dist/eth/index.d.cts +0 -3
- package/dist/eth/index.d.cts.map +1 -1
- package/dist/eth/index.d.mts +0 -3
- package/dist/eth/index.d.mts.map +1 -1
- package/dist/eth/index.mjs +1 -3
- package/dist/eth/index.mjs.map +1 -1
- package/dist/index.cjs +1 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -6
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs +4 -7
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +45 -45
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +45 -45
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +1 -4
- package/dist/types.mjs.map +1 -1
- package/package.json +5 -6
- package/dist/api.cjs +0 -138
- package/dist/api.cjs.map +0 -1
- package/dist/api.d.cts +0 -420
- package/dist/api.d.cts.map +0 -1
- package/dist/api.d.mts +0 -420
- package/dist/api.d.mts.map +0 -1
- package/dist/api.mjs +0 -135
- package/dist/api.mjs.map +0 -1
- package/dist/btc/index.cjs +0 -18
- package/dist/btc/index.cjs.map +0 -1
- package/dist/btc/index.d.cts +0 -2
- package/dist/btc/index.d.cts.map +0 -1
- package/dist/btc/index.d.mts +0 -2
- package/dist/btc/index.d.mts.map +0 -1
- package/dist/btc/index.mjs +0 -2
- package/dist/btc/index.mjs.map +0 -1
- package/dist/btc/types.cjs +0 -40
- package/dist/btc/types.cjs.map +0 -1
- package/dist/btc/types.d.cts +0 -34
- package/dist/btc/types.d.cts.map +0 -1
- package/dist/btc/types.d.mts +0 -34
- package/dist/btc/types.d.mts.map +0 -1
- package/dist/btc/types.mjs +0 -37
- package/dist/btc/types.mjs.map +0 -1
- package/dist/eth/erc4337/index.cjs +0 -18
- package/dist/eth/erc4337/index.cjs.map +0 -1
- package/dist/eth/erc4337/index.d.cts +0 -2
- package/dist/eth/erc4337/index.d.cts.map +0 -1
- package/dist/eth/erc4337/index.d.mts +0 -2
- package/dist/eth/erc4337/index.d.mts.map +0 -1
- package/dist/eth/erc4337/index.mjs +0 -2
- package/dist/eth/erc4337/index.mjs.map +0 -1
- package/dist/eth/erc4337/types.cjs +0 -61
- package/dist/eth/erc4337/types.cjs.map +0 -1
- package/dist/eth/erc4337/types.d.cts +0 -98
- package/dist/eth/erc4337/types.d.cts.map +0 -1
- package/dist/eth/erc4337/types.d.mts +0 -98
- package/dist/eth/erc4337/types.d.mts.map +0 -1
- package/dist/eth/erc4337/types.mjs +0 -58
- package/dist/eth/erc4337/types.mjs.map +0 -1
- package/dist/eth/types.cjs +0 -73
- package/dist/eth/types.cjs.map +0 -1
- package/dist/eth/types.d.cts +0 -81
- package/dist/eth/types.d.cts.map +0 -1
- package/dist/eth/types.d.mts +0 -81
- package/dist/eth/types.d.mts.map +0 -1
- package/dist/eth/types.mjs +0 -70
- package/dist/eth/types.mjs.map +0 -1
- package/dist/eth/utils.cjs +0 -14
- package/dist/eth/utils.cjs.map +0 -1
- package/dist/eth/utils.d.cts +0 -9
- package/dist/eth/utils.d.cts.map +0 -1
- package/dist/eth/utils.d.mts +0 -9
- package/dist/eth/utils.d.mts.map +0 -1
- package/dist/eth/utils.mjs +0 -11
- package/dist/eth/utils.mjs.map +0 -1
- package/dist/events.cjs +0 -83
- package/dist/events.cjs.map +0 -1
- package/dist/events.d.cts +0 -172
- package/dist/events.d.cts.map +0 -1
- package/dist/events.d.mts +0 -172
- package/dist/events.d.mts.map +0 -1
- package/dist/events.mjs +0 -80
- package/dist/events.mjs.map +0 -1
- package/dist/rpc.cjs +0 -33
- package/dist/rpc.cjs.map +0 -1
- package/dist/rpc.d.cts +0 -26
- package/dist/rpc.d.cts.map +0 -1
- package/dist/rpc.d.mts +0 -26
- package/dist/rpc.d.mts.map +0 -1
- package/dist/rpc.mjs +0 -29
- package/dist/rpc.mjs.map +0 -1
- package/dist/sol/index.cjs +0 -18
- package/dist/sol/index.cjs.map +0 -1
- package/dist/sol/index.d.cts +0 -2
- package/dist/sol/index.d.cts.map +0 -1
- package/dist/sol/index.d.mts +0 -2
- package/dist/sol/index.d.mts.map +0 -1
- package/dist/sol/index.mjs +0 -2
- package/dist/sol/index.mjs.map +0 -1
- package/dist/sol/types.cjs +0 -36
- package/dist/sol/types.cjs.map +0 -1
- package/dist/sol/types.d.cts +0 -39
- package/dist/sol/types.d.cts.map +0 -1
- package/dist/sol/types.d.mts +0 -39
- package/dist/sol/types.d.mts.map +0 -1
- package/dist/sol/types.mjs +0 -33
- package/dist/sol/types.mjs.map +0 -1
package/dist/events.d.mts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
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
|
package/dist/events.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
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
|
package/dist/events.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/rpc.cjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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
|
package/dist/rpc.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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
|
package/dist/rpc.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
package/dist/sol/index.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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("./types.cjs"), exports);
|
|
18
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/sol/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/sol/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAAwB","sourcesContent":["export * from './types';\n"]}
|
package/dist/sol/index.d.cts
DELETED
package/dist/sol/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/sol/index.ts"],"names":[],"mappings":"AAAA,4BAAwB"}
|
package/dist/sol/index.d.mts
DELETED
package/dist/sol/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/sol/index.ts"],"names":[],"mappings":"AAAA,4BAAwB"}
|
package/dist/sol/index.mjs
DELETED
package/dist/sol/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/sol/index.ts"],"names":[],"mappings":"AAAA,4BAAwB","sourcesContent":["export * from './types';\n"]}
|
package/dist/sol/types.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SolDataAccountStruct = exports.SolMethod = exports.SolAddressStruct = void 0;
|
|
4
|
-
const keyring_api_1 = require("@metamask/keyring-api");
|
|
5
|
-
const keyring_utils_1 = require("@metamask/keyring-utils");
|
|
6
|
-
const superstruct_1 = require("@metamask/superstruct");
|
|
7
|
-
/**
|
|
8
|
-
* Solana addresses are represented in the format of a 256-bit ed25519 public key and
|
|
9
|
-
* are encoded using base58.
|
|
10
|
-
* They are usually 32 to 44 characters long.
|
|
11
|
-
*/
|
|
12
|
-
exports.SolAddressStruct = (0, keyring_utils_1.definePattern)('SolAddress', /^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);
|
|
13
|
-
/**
|
|
14
|
-
* Supported Solana methods.
|
|
15
|
-
*/
|
|
16
|
-
var SolMethod;
|
|
17
|
-
(function (SolMethod) {
|
|
18
|
-
// General transaction methods
|
|
19
|
-
SolMethod["SendAndConfirmTransaction"] = "sendAndConfirmTransaction";
|
|
20
|
-
})(SolMethod || (exports.SolMethod = SolMethod = {}));
|
|
21
|
-
exports.SolDataAccountStruct = (0, keyring_utils_1.object)({
|
|
22
|
-
...keyring_api_1.KeyringAccountStruct.schema,
|
|
23
|
-
/**
|
|
24
|
-
* Account address.
|
|
25
|
-
*/
|
|
26
|
-
address: exports.SolAddressStruct,
|
|
27
|
-
/**
|
|
28
|
-
* Account type.
|
|
29
|
-
*/
|
|
30
|
-
type: (0, superstruct_1.literal)(`${keyring_api_1.SolAccountType.DataAccount}`),
|
|
31
|
-
/**
|
|
32
|
-
* Account supported methods.
|
|
33
|
-
*/
|
|
34
|
-
methods: (0, superstruct_1.array)((0, superstruct_1.enums)([`${SolMethod.SendAndConfirmTransaction}`])),
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=types.cjs.map
|
package/dist/sol/types.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":";;;AAAA,uDAA6E;AAC7E,2DAAgE;AAEhE,uDAA8D;AAE9D;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAC3C,YAAY,EACZ,iCAAiC,CAClC,CAAC;AAEF;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,8BAA8B;IAC9B,oEAAuD,CAAA;AACzD,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAEY,QAAA,oBAAoB,GAAG,IAAA,sBAAM,EAAC;IACzC,GAAG,kCAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,4BAAc,CAAC,WAAW,EAAE,CAAC;IAE9C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,mBAAK,EAAC,CAAC,GAAG,SAAS,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC;CAClE,CAAC,CAAC","sourcesContent":["import { KeyringAccountStruct, SolAccountType } from '@metamask/keyring-api';\nimport { object, definePattern } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal } from '@metamask/superstruct';\n\n/**\n * Solana addresses are represented in the format of a 256-bit ed25519 public key and\n * are encoded using base58.\n * They are usually 32 to 44 characters long.\n */\nexport const SolAddressStruct = definePattern(\n 'SolAddress',\n /^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu,\n);\n\n/**\n * Supported Solana methods.\n */\nexport enum SolMethod {\n // General transaction methods\n SendAndConfirmTransaction = 'sendAndConfirmTransaction',\n}\n\nexport const SolDataAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: SolAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${SolAccountType.DataAccount}`),\n\n /**\n * Account supported methods.\n */\n methods: array(enums([`${SolMethod.SendAndConfirmTransaction}`])),\n});\n\nexport type SolDataAccount = Infer<typeof SolDataAccountStruct>;\n"]}
|
package/dist/sol/types.d.cts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Infer } from "@metamask/superstruct";
|
|
2
|
-
/**
|
|
3
|
-
* Solana addresses are represented in the format of a 256-bit ed25519 public key and
|
|
4
|
-
* are encoded using base58.
|
|
5
|
-
* They are usually 32 to 44 characters long.
|
|
6
|
-
*/
|
|
7
|
-
export declare const SolAddressStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
8
|
-
/**
|
|
9
|
-
* Supported Solana methods.
|
|
10
|
-
*/
|
|
11
|
-
export declare enum SolMethod {
|
|
12
|
-
SendAndConfirmTransaction = "sendAndConfirmTransaction"
|
|
13
|
-
}
|
|
14
|
-
export declare const SolDataAccountStruct: import("@metamask/superstruct").Struct<{
|
|
15
|
-
id: string;
|
|
16
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
17
|
-
type: "solana:data-account";
|
|
18
|
-
address: string;
|
|
19
|
-
methods: "sendAndConfirmTransaction"[];
|
|
20
|
-
}, {
|
|
21
|
-
/**
|
|
22
|
-
* Account address.
|
|
23
|
-
*/
|
|
24
|
-
address: import("@metamask/superstruct").Struct<string, null>;
|
|
25
|
-
/**
|
|
26
|
-
* Account type.
|
|
27
|
-
*/
|
|
28
|
-
type: import("@metamask/superstruct").Struct<"solana:data-account", "solana:data-account">;
|
|
29
|
-
/**
|
|
30
|
-
* Account supported methods.
|
|
31
|
-
*/
|
|
32
|
-
methods: import("@metamask/superstruct").Struct<"sendAndConfirmTransaction"[], import("@metamask/superstruct").Struct<"sendAndConfirmTransaction", {
|
|
33
|
-
sendAndConfirmTransaction: "sendAndConfirmTransaction";
|
|
34
|
-
}>>;
|
|
35
|
-
id: import("@metamask/superstruct").Struct<string, null>;
|
|
36
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
37
|
-
}>;
|
|
38
|
-
export type SolDataAccount = Infer<typeof SolDataAccountStruct>;
|
|
39
|
-
//# sourceMappingURL=types.d.cts.map
|
package/dist/sol/types.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAGnD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,yBAAyB,8BAA8B;CACxD;AAED,eAAO,MAAM,oBAAoB;;;;;;;IAG/B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/sol/types.d.mts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Infer } from "@metamask/superstruct";
|
|
2
|
-
/**
|
|
3
|
-
* Solana addresses are represented in the format of a 256-bit ed25519 public key and
|
|
4
|
-
* are encoded using base58.
|
|
5
|
-
* They are usually 32 to 44 characters long.
|
|
6
|
-
*/
|
|
7
|
-
export declare const SolAddressStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
8
|
-
/**
|
|
9
|
-
* Supported Solana methods.
|
|
10
|
-
*/
|
|
11
|
-
export declare enum SolMethod {
|
|
12
|
-
SendAndConfirmTransaction = "sendAndConfirmTransaction"
|
|
13
|
-
}
|
|
14
|
-
export declare const SolDataAccountStruct: import("@metamask/superstruct").Struct<{
|
|
15
|
-
id: string;
|
|
16
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
17
|
-
type: "solana:data-account";
|
|
18
|
-
address: string;
|
|
19
|
-
methods: "sendAndConfirmTransaction"[];
|
|
20
|
-
}, {
|
|
21
|
-
/**
|
|
22
|
-
* Account address.
|
|
23
|
-
*/
|
|
24
|
-
address: import("@metamask/superstruct").Struct<string, null>;
|
|
25
|
-
/**
|
|
26
|
-
* Account type.
|
|
27
|
-
*/
|
|
28
|
-
type: import("@metamask/superstruct").Struct<"solana:data-account", "solana:data-account">;
|
|
29
|
-
/**
|
|
30
|
-
* Account supported methods.
|
|
31
|
-
*/
|
|
32
|
-
methods: import("@metamask/superstruct").Struct<"sendAndConfirmTransaction"[], import("@metamask/superstruct").Struct<"sendAndConfirmTransaction", {
|
|
33
|
-
sendAndConfirmTransaction: "sendAndConfirmTransaction";
|
|
34
|
-
}>>;
|
|
35
|
-
id: import("@metamask/superstruct").Struct<string, null>;
|
|
36
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
37
|
-
}>;
|
|
38
|
-
export type SolDataAccount = Infer<typeof SolDataAccountStruct>;
|
|
39
|
-
//# sourceMappingURL=types.d.mts.map
|
package/dist/sol/types.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAGnD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,yBAAyB,8BAA8B;CACxD;AAED,eAAO,MAAM,oBAAoB;;;;;;;IAG/B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/sol/types.mjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { KeyringAccountStruct, SolAccountType } from "@metamask/keyring-api";
|
|
2
|
-
import { object, definePattern } from "@metamask/keyring-utils";
|
|
3
|
-
import { array, enums, literal } from "@metamask/superstruct";
|
|
4
|
-
/**
|
|
5
|
-
* Solana addresses are represented in the format of a 256-bit ed25519 public key and
|
|
6
|
-
* are encoded using base58.
|
|
7
|
-
* They are usually 32 to 44 characters long.
|
|
8
|
-
*/
|
|
9
|
-
export const SolAddressStruct = definePattern('SolAddress', /^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);
|
|
10
|
-
/**
|
|
11
|
-
* Supported Solana methods.
|
|
12
|
-
*/
|
|
13
|
-
export var SolMethod;
|
|
14
|
-
(function (SolMethod) {
|
|
15
|
-
// General transaction methods
|
|
16
|
-
SolMethod["SendAndConfirmTransaction"] = "sendAndConfirmTransaction";
|
|
17
|
-
})(SolMethod || (SolMethod = {}));
|
|
18
|
-
export const SolDataAccountStruct = object({
|
|
19
|
-
...KeyringAccountStruct.schema,
|
|
20
|
-
/**
|
|
21
|
-
* Account address.
|
|
22
|
-
*/
|
|
23
|
-
address: SolAddressStruct,
|
|
24
|
-
/**
|
|
25
|
-
* Account type.
|
|
26
|
-
*/
|
|
27
|
-
type: literal(`${SolAccountType.DataAccount}`),
|
|
28
|
-
/**
|
|
29
|
-
* Account supported methods.
|
|
30
|
-
*/
|
|
31
|
-
methods: array(enums([`${SolMethod.SendAndConfirmTransaction}`])),
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=types.mjs.map
|
package/dist/sol/types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,8BAA8B;AAC7E,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gCAAgC;AAEhE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,8BAA8B;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,iCAAiC,CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,8BAA8B;IAC9B,oEAAuD,CAAA;AACzD,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IACzC,GAAG,oBAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;IAE9C;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,SAAS,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC;CAClE,CAAC,CAAC","sourcesContent":["import { KeyringAccountStruct, SolAccountType } from '@metamask/keyring-api';\nimport { object, definePattern } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal } from '@metamask/superstruct';\n\n/**\n * Solana addresses are represented in the format of a 256-bit ed25519 public key and\n * are encoded using base58.\n * They are usually 32 to 44 characters long.\n */\nexport const SolAddressStruct = definePattern(\n 'SolAddress',\n /^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu,\n);\n\n/**\n * Supported Solana methods.\n */\nexport enum SolMethod {\n // General transaction methods\n SendAndConfirmTransaction = 'sendAndConfirmTransaction',\n}\n\nexport const SolDataAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: SolAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${SolAccountType.DataAccount}`),\n\n /**\n * Account supported methods.\n */\n methods: array(enums([`${SolMethod.SendAndConfirmTransaction}`])),\n});\n\nexport type SolDataAccount = Infer<typeof SolDataAccountStruct>;\n"]}
|