@metamask-previews/keyring-api 11.0.0-22cd5fe → 11.0.0-b85bfaa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api/account.cjs → account.cjs} +3 -8
- package/dist/account.cjs.map +1 -0
- package/dist/{api/account.d.cts → account.d.cts} +1 -6
- package/dist/account.d.cts.map +1 -0
- package/dist/{api/account.d.mts → account.d.mts} +1 -6
- package/dist/account.d.mts.map +1 -0
- package/dist/{api/account.mjs → account.mjs} +3 -8
- package/dist/account.mjs.map +1 -0
- package/dist/balance.cjs +10 -0
- package/dist/balance.cjs.map +1 -0
- package/dist/balance.d.cts.map +1 -0
- package/dist/balance.d.mts.map +1 -0
- package/dist/{api/balance.mjs → balance.mjs} +1 -2
- package/dist/balance.mjs.map +1 -0
- package/dist/{api/caip.cjs → caip.cjs} +3 -3
- package/dist/{api/caip.cjs.map → caip.cjs.map} +1 -1
- package/dist/caip.d.cts.map +1 -0
- package/dist/caip.d.mts.map +1 -0
- package/dist/{api/caip.mjs → caip.mjs} +1 -1
- package/dist/{api/caip.mjs.map → caip.mjs.map} +1 -1
- package/dist/export.cjs.map +1 -0
- package/dist/export.d.cts.map +1 -0
- package/dist/export.d.mts.map +1 -0
- package/dist/export.mjs.map +1 -0
- package/dist/index.cjs +6 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -12
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +7 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -12
- package/dist/index.mjs.map +1 -1
- package/dist/keyring.cjs +5 -0
- package/dist/keyring.cjs.map +1 -0
- package/dist/keyring.d.cts.map +1 -0
- package/dist/keyring.d.mts.map +1 -0
- package/dist/keyring.mjs +4 -0
- package/dist/keyring.mjs.map +1 -0
- package/dist/{api/request.cjs → request.cjs} +6 -7
- package/dist/request.cjs.map +1 -0
- package/dist/{api/request.d.cts → request.d.cts} +3 -3
- package/dist/request.d.cts.map +1 -0
- package/dist/{api/request.d.mts → request.d.mts} +3 -3
- package/dist/request.d.mts.map +1 -0
- package/dist/{api/request.mjs → request.mjs} +1 -2
- package/dist/request.mjs.map +1 -0
- package/dist/{api/response.cjs → response.cjs} +6 -6
- package/dist/{api/response.cjs.map → response.cjs.map} +1 -1
- package/dist/response.d.cts.map +1 -0
- package/dist/response.d.mts.map +1 -0
- package/dist/{api/response.mjs → response.mjs} +1 -1
- package/dist/{api/response.mjs.map → response.mjs.map} +1 -1
- package/package.json +9 -10
- package/dist/JsonRpcRequest.cjs +0 -13
- package/dist/JsonRpcRequest.cjs.map +0 -1
- package/dist/JsonRpcRequest.d.cts +0 -17
- package/dist/JsonRpcRequest.d.cts.map +0 -1
- package/dist/JsonRpcRequest.d.mts +0 -17
- package/dist/JsonRpcRequest.d.mts.map +0 -1
- package/dist/JsonRpcRequest.mjs +0 -10
- package/dist/JsonRpcRequest.mjs.map +0 -1
- package/dist/KeyringClient.cjs +0 -124
- package/dist/KeyringClient.cjs.map +0 -1
- package/dist/KeyringClient.d.cts +0 -29
- package/dist/KeyringClient.d.cts.map +0 -1
- package/dist/KeyringClient.d.mts +0 -29
- package/dist/KeyringClient.d.mts.map +0 -1
- package/dist/KeyringClient.mjs +0 -120
- package/dist/KeyringClient.mjs.map +0 -1
- package/dist/KeyringSnapRpcClient.cjs +0 -68
- package/dist/KeyringSnapRpcClient.cjs.map +0 -1
- package/dist/KeyringSnapRpcClient.d.cts +0 -40
- package/dist/KeyringSnapRpcClient.d.cts.map +0 -1
- package/dist/KeyringSnapRpcClient.d.mts +0 -40
- package/dist/KeyringSnapRpcClient.d.mts.map +0 -1
- package/dist/KeyringSnapRpcClient.mjs +0 -63
- package/dist/KeyringSnapRpcClient.mjs.map +0 -1
- package/dist/api/account.cjs.map +0 -1
- package/dist/api/account.d.cts.map +0 -1
- package/dist/api/account.d.mts.map +0 -1
- package/dist/api/account.mjs.map +0 -1
- package/dist/api/balance.cjs +0 -11
- package/dist/api/balance.cjs.map +0 -1
- package/dist/api/balance.d.cts.map +0 -1
- package/dist/api/balance.d.mts.map +0 -1
- package/dist/api/balance.mjs.map +0 -1
- package/dist/api/caip.d.cts.map +0 -1
- package/dist/api/caip.d.mts.map +0 -1
- package/dist/api/export.cjs.map +0 -1
- package/dist/api/export.d.cts.map +0 -1
- package/dist/api/export.d.mts.map +0 -1
- package/dist/api/export.mjs.map +0 -1
- package/dist/api/index.cjs +0 -23
- package/dist/api/index.cjs.map +0 -1
- package/dist/api/index.d.cts +0 -8
- package/dist/api/index.d.cts.map +0 -1
- package/dist/api/index.d.mts +0 -8
- package/dist/api/index.d.mts.map +0 -1
- package/dist/api/index.mjs +0 -7
- package/dist/api/index.mjs.map +0 -1
- package/dist/api/keyring.cjs +0 -3
- package/dist/api/keyring.cjs.map +0 -1
- package/dist/api/keyring.d.cts.map +0 -1
- package/dist/api/keyring.d.mts.map +0 -1
- package/dist/api/keyring.mjs +0 -2
- package/dist/api/keyring.mjs.map +0 -1
- package/dist/api/request.cjs.map +0 -1
- package/dist/api/request.d.cts.map +0 -1
- package/dist/api/request.d.mts.map +0 -1
- package/dist/api/request.mjs.map +0 -1
- package/dist/api/response.d.cts.map +0 -1
- package/dist/api/response.d.mts.map +0 -1
- package/dist/btc/constants.cjs +0 -13
- package/dist/btc/constants.cjs.map +0 -1
- package/dist/btc/constants.d.cts +0 -9
- package/dist/btc/constants.d.cts.map +0 -1
- package/dist/btc/constants.d.mts +0 -9
- package/dist/btc/constants.d.mts.map +0 -1
- package/dist/btc/constants.mjs +0 -10
- package/dist/btc/constants.mjs.map +0 -1
- package/dist/btc/index.cjs +0 -19
- package/dist/btc/index.cjs.map +0 -1
- package/dist/btc/index.d.cts +0 -3
- package/dist/btc/index.d.cts.map +0 -1
- package/dist/btc/index.d.mts +0 -3
- package/dist/btc/index.d.mts.map +0 -1
- package/dist/btc/index.mjs +0 -3
- 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 -36
- package/dist/btc/types.d.cts.map +0 -1
- package/dist/btc/types.d.mts +0 -36
- 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/constants.cjs +0 -12
- package/dist/eth/constants.cjs.map +0 -1
- package/dist/eth/constants.d.cts +0 -8
- package/dist/eth/constants.d.cts.map +0 -1
- package/dist/eth/constants.d.mts +0 -8
- package/dist/eth/constants.d.mts.map +0 -1
- package/dist/eth/constants.mjs +0 -9
- package/dist/eth/constants.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 -62
- 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 -59
- package/dist/eth/erc4337/types.mjs.map +0 -1
- package/dist/eth/index.cjs +0 -21
- package/dist/eth/index.cjs.map +0 -1
- package/dist/eth/index.d.cts +0 -5
- package/dist/eth/index.d.cts.map +0 -1
- package/dist/eth/index.d.mts +0 -5
- package/dist/eth/index.d.mts.map +0 -1
- package/dist/eth/index.mjs +0 -5
- package/dist/eth/index.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 -85
- package/dist/eth/types.d.cts.map +0 -1
- package/dist/eth/types.d.mts +0 -85
- 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 -17
- package/dist/events.cjs.map +0 -1
- package/dist/events.d.cts +0 -11
- package/dist/events.d.cts.map +0 -1
- package/dist/events.d.mts +0 -11
- package/dist/events.d.mts.map +0 -1
- package/dist/events.mjs +0 -14
- package/dist/events.mjs.map +0 -1
- package/dist/internal/api.cjs +0 -139
- package/dist/internal/api.cjs.map +0 -1
- package/dist/internal/api.d.cts +0 -431
- package/dist/internal/api.d.cts.map +0 -1
- package/dist/internal/api.d.mts +0 -431
- package/dist/internal/api.d.mts.map +0 -1
- package/dist/internal/api.mjs +0 -136
- package/dist/internal/api.mjs.map +0 -1
- package/dist/internal/eth/EthKeyring.cjs +0 -3
- package/dist/internal/eth/EthKeyring.cjs.map +0 -1
- package/dist/internal/eth/EthKeyring.d.cts +0 -34
- package/dist/internal/eth/EthKeyring.d.cts.map +0 -1
- package/dist/internal/eth/EthKeyring.d.mts +0 -34
- package/dist/internal/eth/EthKeyring.d.mts.map +0 -1
- package/dist/internal/eth/EthKeyring.mjs +0 -2
- package/dist/internal/eth/EthKeyring.mjs.map +0 -1
- package/dist/internal/eth/index.cjs +0 -3
- package/dist/internal/eth/index.cjs.map +0 -1
- package/dist/internal/eth/index.d.cts +0 -2
- package/dist/internal/eth/index.d.cts.map +0 -1
- package/dist/internal/eth/index.d.mts +0 -2
- package/dist/internal/eth/index.d.mts.map +0 -1
- package/dist/internal/eth/index.mjs +0 -2
- package/dist/internal/eth/index.mjs.map +0 -1
- package/dist/internal/events.cjs +0 -72
- package/dist/internal/events.cjs.map +0 -1
- package/dist/internal/events.d.cts +0 -170
- package/dist/internal/events.d.cts.map +0 -1
- package/dist/internal/events.d.mts +0 -170
- package/dist/internal/events.d.mts.map +0 -1
- package/dist/internal/events.mjs +0 -69
- package/dist/internal/events.mjs.map +0 -1
- package/dist/internal/index.cjs +0 -21
- package/dist/internal/index.cjs.map +0 -1
- package/dist/internal/index.d.cts +0 -6
- package/dist/internal/index.d.cts.map +0 -1
- package/dist/internal/index.d.mts +0 -6
- package/dist/internal/index.d.mts.map +0 -1
- package/dist/internal/index.mjs +0 -5
- package/dist/internal/index.mjs.map +0 -1
- package/dist/internal/rpc.cjs +0 -33
- package/dist/internal/rpc.cjs.map +0 -1
- package/dist/internal/rpc.d.cts +0 -26
- package/dist/internal/rpc.d.cts.map +0 -1
- package/dist/internal/rpc.d.mts +0 -26
- package/dist/internal/rpc.d.mts.map +0 -1
- package/dist/internal/rpc.mjs +0 -29
- package/dist/internal/rpc.mjs.map +0 -1
- package/dist/internal/types.cjs +0 -52
- package/dist/internal/types.cjs.map +0 -1
- package/dist/internal/types.d.cts +0 -402
- package/dist/internal/types.d.cts.map +0 -1
- package/dist/internal/types.d.mts +0 -402
- package/dist/internal/types.d.mts.map +0 -1
- package/dist/internal/types.mjs +0 -49
- package/dist/internal/types.mjs.map +0 -1
- package/dist/rpc-handler.cjs +0 -136
- package/dist/rpc-handler.cjs.map +0 -1
- package/dist/rpc-handler.d.cts +0 -30
- package/dist/rpc-handler.d.cts.map +0 -1
- package/dist/rpc-handler.d.mts +0 -30
- package/dist/rpc-handler.d.mts.map +0 -1
- package/dist/rpc-handler.mjs +0 -131
- package/dist/rpc-handler.mjs.map +0 -1
- package/dist/snap-utils.cjs +0 -20
- package/dist/snap-utils.cjs.map +0 -1
- package/dist/snap-utils.d.cts +0 -12
- package/dist/snap-utils.d.cts.map +0 -1
- package/dist/snap-utils.d.mts +0 -12
- package/dist/snap-utils.d.mts.map +0 -1
- package/dist/snap-utils.mjs +0 -17
- package/dist/snap-utils.mjs.map +0 -1
- package/dist/sol/constants.cjs +0 -14
- package/dist/sol/constants.cjs.map +0 -1
- package/dist/sol/constants.d.cts +0 -10
- package/dist/sol/constants.d.cts.map +0 -1
- package/dist/sol/constants.d.mts +0 -10
- package/dist/sol/constants.d.mts.map +0 -1
- package/dist/sol/constants.mjs +0 -11
- package/dist/sol/constants.mjs.map +0 -1
- package/dist/sol/index.cjs +0 -19
- package/dist/sol/index.cjs.map +0 -1
- package/dist/sol/index.d.cts +0 -3
- package/dist/sol/index.d.cts.map +0 -1
- package/dist/sol/index.d.mts +0 -3
- package/dist/sol/index.d.mts.map +0 -1
- package/dist/sol/index.mjs +0 -3
- 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 -41
- package/dist/sol/types.d.cts.map +0 -1
- package/dist/sol/types.d.mts +0 -41
- 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/superstruct.cjs +0 -80
- package/dist/superstruct.cjs.map +0 -1
- package/dist/superstruct.d.cts +0 -84
- package/dist/superstruct.d.cts.map +0 -1
- package/dist/superstruct.d.mts +0 -84
- package/dist/superstruct.d.mts.map +0 -1
- package/dist/superstruct.mjs +0 -74
- package/dist/superstruct.mjs.map +0 -1
- package/dist/utils/index.cjs +0 -19
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -3
- package/dist/utils/index.d.cts.map +0 -1
- package/dist/utils/index.d.mts +0 -3
- package/dist/utils/index.d.mts.map +0 -1
- package/dist/utils/index.mjs +0 -3
- package/dist/utils/index.mjs.map +0 -1
- package/dist/utils/types.cjs +0 -29
- package/dist/utils/types.cjs.map +0 -1
- package/dist/utils/types.d.cts +0 -18
- package/dist/utils/types.d.cts.map +0 -1
- package/dist/utils/types.d.mts +0 -18
- package/dist/utils/types.d.mts.map +0 -1
- package/dist/utils/types.mjs +0 -26
- package/dist/utils/types.mjs.map +0 -1
- package/dist/utils/typing.cjs +0 -20
- package/dist/utils/typing.cjs.map +0 -1
- package/dist/utils/typing.d.cts +0 -33
- package/dist/utils/typing.d.cts.map +0 -1
- package/dist/utils/typing.d.mts +0 -33
- package/dist/utils/typing.d.mts.map +0 -1
- package/dist/utils/typing.mjs +0 -17
- package/dist/utils/typing.mjs.map +0 -1
- /package/dist/{api/balance.d.cts → balance.d.cts} +0 -0
- /package/dist/{api/balance.d.mts → balance.d.mts} +0 -0
- /package/dist/{api/caip.d.cts → caip.d.cts} +0 -0
- /package/dist/{api/caip.d.mts → caip.d.mts} +0 -0
- /package/dist/{api/export.cjs → export.cjs} +0 -0
- /package/dist/{api/export.d.cts → export.d.cts} +0 -0
- /package/dist/{api/export.d.mts → export.d.mts} +0 -0
- /package/dist/{api/export.mjs → export.mjs} +0 -0
- /package/dist/{api/keyring.d.cts → keyring.d.cts} +0 -0
- /package/dist/{api/keyring.d.mts → keyring.d.mts} +0 -0
- /package/dist/{api/response.d.cts → response.d.cts} +0 -0
- /package/dist/{api/response.d.mts → response.d.mts} +0 -0
package/dist/eth/types.cjs
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EthErc4337AccountStruct = exports.EthEoaAccountStruct = exports.EthMethod = exports.EthUint256Struct = exports.EthAddressStruct = exports.EthBytesStruct = void 0;
|
|
4
|
-
const superstruct_1 = require("@metamask/superstruct");
|
|
5
|
-
const api_1 = require("../api/index.cjs");
|
|
6
|
-
const superstruct_2 = require("../superstruct.cjs");
|
|
7
|
-
exports.EthBytesStruct = (0, superstruct_2.definePattern)('EthBytes', /^0x[0-9a-f]*$/iu);
|
|
8
|
-
exports.EthAddressStruct = (0, superstruct_2.definePattern)('EthAddress', /^0x[0-9a-f]{40}$/iu);
|
|
9
|
-
exports.EthUint256Struct = (0, superstruct_2.definePattern)('EthUint256', /^0x([1-9a-f][0-9a-f]*|0)$/iu);
|
|
10
|
-
/**
|
|
11
|
-
* Supported Ethereum methods.
|
|
12
|
-
*/
|
|
13
|
-
var EthMethod;
|
|
14
|
-
(function (EthMethod) {
|
|
15
|
-
// General signing methods
|
|
16
|
-
EthMethod["PersonalSign"] = "personal_sign";
|
|
17
|
-
EthMethod["Sign"] = "eth_sign";
|
|
18
|
-
EthMethod["SignTransaction"] = "eth_signTransaction";
|
|
19
|
-
EthMethod["SignTypedDataV1"] = "eth_signTypedData_v1";
|
|
20
|
-
EthMethod["SignTypedDataV3"] = "eth_signTypedData_v3";
|
|
21
|
-
EthMethod["SignTypedDataV4"] = "eth_signTypedData_v4";
|
|
22
|
-
// ERC-4337 methods
|
|
23
|
-
EthMethod["PrepareUserOperation"] = "eth_prepareUserOperation";
|
|
24
|
-
EthMethod["PatchUserOperation"] = "eth_patchUserOperation";
|
|
25
|
-
EthMethod["SignUserOperation"] = "eth_signUserOperation";
|
|
26
|
-
})(EthMethod || (exports.EthMethod = EthMethod = {}));
|
|
27
|
-
exports.EthEoaAccountStruct = (0, superstruct_2.object)({
|
|
28
|
-
...api_1.KeyringAccountStruct.schema,
|
|
29
|
-
/**
|
|
30
|
-
* Account address.
|
|
31
|
-
*/
|
|
32
|
-
address: exports.EthAddressStruct,
|
|
33
|
-
/**
|
|
34
|
-
* Account type.
|
|
35
|
-
*/
|
|
36
|
-
type: (0, superstruct_1.literal)(`${api_1.EthAccountType.Eoa}`),
|
|
37
|
-
/**
|
|
38
|
-
* Account supported methods.
|
|
39
|
-
*/
|
|
40
|
-
methods: (0, superstruct_1.array)((0, superstruct_1.enums)([
|
|
41
|
-
`${EthMethod.PersonalSign}`,
|
|
42
|
-
`${EthMethod.Sign}`,
|
|
43
|
-
`${EthMethod.SignTransaction}`,
|
|
44
|
-
`${EthMethod.SignTypedDataV1}`,
|
|
45
|
-
`${EthMethod.SignTypedDataV3}`,
|
|
46
|
-
`${EthMethod.SignTypedDataV4}`,
|
|
47
|
-
])),
|
|
48
|
-
});
|
|
49
|
-
exports.EthErc4337AccountStruct = (0, superstruct_2.object)({
|
|
50
|
-
...api_1.KeyringAccountStruct.schema,
|
|
51
|
-
/**
|
|
52
|
-
* Account address.
|
|
53
|
-
*/
|
|
54
|
-
address: exports.EthAddressStruct,
|
|
55
|
-
/**
|
|
56
|
-
* Account type.
|
|
57
|
-
*/
|
|
58
|
-
type: (0, superstruct_1.literal)(`${api_1.EthAccountType.Erc4337}`),
|
|
59
|
-
/**
|
|
60
|
-
* Account supported methods.
|
|
61
|
-
*/
|
|
62
|
-
methods: (0, superstruct_1.array)((0, superstruct_1.enums)([
|
|
63
|
-
`${EthMethod.PersonalSign}`,
|
|
64
|
-
`${EthMethod.Sign}`,
|
|
65
|
-
`${EthMethod.SignTypedDataV1}`,
|
|
66
|
-
`${EthMethod.SignTypedDataV3}`,
|
|
67
|
-
`${EthMethod.SignTypedDataV4}`,
|
|
68
|
-
`${EthMethod.PrepareUserOperation}`,
|
|
69
|
-
`${EthMethod.PatchUserOperation}`,
|
|
70
|
-
`${EthMethod.SignUserOperation}`,
|
|
71
|
-
])),
|
|
72
|
-
});
|
|
73
|
-
//# sourceMappingURL=types.cjs.map
|
package/dist/eth/types.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":";;;AACA,uDAA8D;AAE9D,0CAA8D;AAC9D,oDAAuD;AAE1C,QAAA,cAAc,GAAG,IAAA,2BAAa,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AAE9D,QAAA,gBAAgB,GAAG,IAAA,2BAAa,EAC3C,YAAY,EACZ,oBAAoB,CACrB,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAA,2BAAa,EAC3C,YAAY,EACZ,6BAA6B,CAC9B,CAAC;AAEF;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,0BAA0B;IAC1B,2CAA8B,CAAA;IAC9B,8BAAiB,CAAA;IACjB,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,mBAAmB;IACnB,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;AAC7C,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AAEY,QAAA,mBAAmB,GAAG,IAAA,oBAAM,EAAC;IACxC,GAAG,0BAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,GAAG,EAAE,CAAC;IAEtC;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EACZ,IAAA,mBAAK,EAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;KAC/B,CAAC,CACH;CACF,CAAC,CAAC;AAIU,QAAA,uBAAuB,GAAG,IAAA,oBAAM,EAAC;IAC5C,GAAG,0BAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,OAAO,EAAE,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EACZ,IAAA,mBAAK,EAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,oBAAoB,EAAE;QACnC,GAAG,SAAS,CAAC,kBAAkB,EAAE;QACjC,GAAG,SAAS,CAAC,iBAAiB,EAAE;KACjC,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal } from '@metamask/superstruct';\n\nimport { EthAccountType, KeyringAccountStruct } from '../api';\nimport { object, definePattern } from '../superstruct';\n\nexport const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);\n\nexport const EthAddressStruct = definePattern(\n 'EthAddress',\n /^0x[0-9a-f]{40}$/iu,\n);\n\nexport const EthUint256Struct = definePattern(\n 'EthUint256',\n /^0x([1-9a-f][0-9a-f]*|0)$/iu,\n);\n\n/**\n * Supported Ethereum methods.\n */\nexport enum EthMethod {\n // General signing methods\n PersonalSign = 'personal_sign',\n Sign = 'eth_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n // ERC-4337 methods\n PrepareUserOperation = 'eth_prepareUserOperation',\n PatchUserOperation = 'eth_patchUserOperation',\n SignUserOperation = 'eth_signUserOperation',\n}\n\nexport const EthEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Eoa}`),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTransaction}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n ]),\n ),\n});\n\nexport type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;\n\nexport const EthErc4337AccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Erc4337}`),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n `${EthMethod.PrepareUserOperation}`,\n `${EthMethod.PatchUserOperation}`,\n `${EthMethod.SignUserOperation}`,\n ]),\n ),\n});\n\nexport type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;\n"]}
|
package/dist/eth/types.d.cts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { Infer } from "@metamask/superstruct";
|
|
2
|
-
export declare const EthBytesStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
3
|
-
export declare const EthAddressStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
4
|
-
export declare const EthUint256Struct: import("@metamask/superstruct").Struct<string, null>;
|
|
5
|
-
/**
|
|
6
|
-
* Supported Ethereum methods.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum EthMethod {
|
|
9
|
-
PersonalSign = "personal_sign",
|
|
10
|
-
Sign = "eth_sign",
|
|
11
|
-
SignTransaction = "eth_signTransaction",
|
|
12
|
-
SignTypedDataV1 = "eth_signTypedData_v1",
|
|
13
|
-
SignTypedDataV3 = "eth_signTypedData_v3",
|
|
14
|
-
SignTypedDataV4 = "eth_signTypedData_v4",
|
|
15
|
-
PrepareUserOperation = "eth_prepareUserOperation",
|
|
16
|
-
PatchUserOperation = "eth_patchUserOperation",
|
|
17
|
-
SignUserOperation = "eth_signUserOperation"
|
|
18
|
-
}
|
|
19
|
-
export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct<{
|
|
20
|
-
type: "eip155:eoa";
|
|
21
|
-
id: string;
|
|
22
|
-
address: string;
|
|
23
|
-
scopes: string[];
|
|
24
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
25
|
-
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
|
26
|
-
}, {
|
|
27
|
-
/**
|
|
28
|
-
* Account address.
|
|
29
|
-
*/
|
|
30
|
-
address: import("@metamask/superstruct").Struct<string, null>;
|
|
31
|
-
/**
|
|
32
|
-
* Account type.
|
|
33
|
-
*/
|
|
34
|
-
type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">;
|
|
35
|
-
/**
|
|
36
|
-
* Account supported methods.
|
|
37
|
-
*/
|
|
38
|
-
methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
|
|
39
|
-
personal_sign: "personal_sign";
|
|
40
|
-
eth_sign: "eth_sign";
|
|
41
|
-
eth_signTransaction: "eth_signTransaction";
|
|
42
|
-
eth_signTypedData_v1: "eth_signTypedData_v1";
|
|
43
|
-
eth_signTypedData_v3: "eth_signTypedData_v3";
|
|
44
|
-
eth_signTypedData_v4: "eth_signTypedData_v4";
|
|
45
|
-
}>>;
|
|
46
|
-
id: import("@metamask/superstruct").Struct<string, null>;
|
|
47
|
-
scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
48
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
49
|
-
}>;
|
|
50
|
-
export type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;
|
|
51
|
-
export declare const EthErc4337AccountStruct: import("@metamask/superstruct").Struct<{
|
|
52
|
-
type: "eip155:erc4337";
|
|
53
|
-
id: string;
|
|
54
|
-
address: string;
|
|
55
|
-
scopes: string[];
|
|
56
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
57
|
-
methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
|
|
58
|
-
}, {
|
|
59
|
-
/**
|
|
60
|
-
* Account address.
|
|
61
|
-
*/
|
|
62
|
-
address: import("@metamask/superstruct").Struct<string, null>;
|
|
63
|
-
/**
|
|
64
|
-
* Account type.
|
|
65
|
-
*/
|
|
66
|
-
type: import("@metamask/superstruct").Struct<"eip155:erc4337", "eip155:erc4337">;
|
|
67
|
-
/**
|
|
68
|
-
* Account supported methods.
|
|
69
|
-
*/
|
|
70
|
-
methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation", {
|
|
71
|
-
personal_sign: "personal_sign";
|
|
72
|
-
eth_sign: "eth_sign";
|
|
73
|
-
eth_signTypedData_v1: "eth_signTypedData_v1";
|
|
74
|
-
eth_signTypedData_v3: "eth_signTypedData_v3";
|
|
75
|
-
eth_signTypedData_v4: "eth_signTypedData_v4";
|
|
76
|
-
eth_prepareUserOperation: "eth_prepareUserOperation";
|
|
77
|
-
eth_patchUserOperation: "eth_patchUserOperation";
|
|
78
|
-
eth_signUserOperation: "eth_signUserOperation";
|
|
79
|
-
}>>;
|
|
80
|
-
id: import("@metamask/superstruct").Struct<string, null>;
|
|
81
|
-
scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
82
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
83
|
-
}>;
|
|
84
|
-
export type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;
|
|
85
|
-
//# sourceMappingURL=types.d.cts.map
|
package/dist/eth/types.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAMnD,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C,iBAAiB,0BAA0B;CAC5C;AAED,eAAO,MAAM,mBAAmB;;;;;;;;IAG9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;EAWH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;IAGlC;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/eth/types.d.mts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { Infer } from "@metamask/superstruct";
|
|
2
|
-
export declare const EthBytesStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
3
|
-
export declare const EthAddressStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
4
|
-
export declare const EthUint256Struct: import("@metamask/superstruct").Struct<string, null>;
|
|
5
|
-
/**
|
|
6
|
-
* Supported Ethereum methods.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum EthMethod {
|
|
9
|
-
PersonalSign = "personal_sign",
|
|
10
|
-
Sign = "eth_sign",
|
|
11
|
-
SignTransaction = "eth_signTransaction",
|
|
12
|
-
SignTypedDataV1 = "eth_signTypedData_v1",
|
|
13
|
-
SignTypedDataV3 = "eth_signTypedData_v3",
|
|
14
|
-
SignTypedDataV4 = "eth_signTypedData_v4",
|
|
15
|
-
PrepareUserOperation = "eth_prepareUserOperation",
|
|
16
|
-
PatchUserOperation = "eth_patchUserOperation",
|
|
17
|
-
SignUserOperation = "eth_signUserOperation"
|
|
18
|
-
}
|
|
19
|
-
export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct<{
|
|
20
|
-
type: "eip155:eoa";
|
|
21
|
-
id: string;
|
|
22
|
-
address: string;
|
|
23
|
-
scopes: string[];
|
|
24
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
25
|
-
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
|
26
|
-
}, {
|
|
27
|
-
/**
|
|
28
|
-
* Account address.
|
|
29
|
-
*/
|
|
30
|
-
address: import("@metamask/superstruct").Struct<string, null>;
|
|
31
|
-
/**
|
|
32
|
-
* Account type.
|
|
33
|
-
*/
|
|
34
|
-
type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">;
|
|
35
|
-
/**
|
|
36
|
-
* Account supported methods.
|
|
37
|
-
*/
|
|
38
|
-
methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
|
|
39
|
-
personal_sign: "personal_sign";
|
|
40
|
-
eth_sign: "eth_sign";
|
|
41
|
-
eth_signTransaction: "eth_signTransaction";
|
|
42
|
-
eth_signTypedData_v1: "eth_signTypedData_v1";
|
|
43
|
-
eth_signTypedData_v3: "eth_signTypedData_v3";
|
|
44
|
-
eth_signTypedData_v4: "eth_signTypedData_v4";
|
|
45
|
-
}>>;
|
|
46
|
-
id: import("@metamask/superstruct").Struct<string, null>;
|
|
47
|
-
scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
48
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
49
|
-
}>;
|
|
50
|
-
export type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;
|
|
51
|
-
export declare const EthErc4337AccountStruct: import("@metamask/superstruct").Struct<{
|
|
52
|
-
type: "eip155:erc4337";
|
|
53
|
-
id: string;
|
|
54
|
-
address: string;
|
|
55
|
-
scopes: string[];
|
|
56
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
57
|
-
methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
|
|
58
|
-
}, {
|
|
59
|
-
/**
|
|
60
|
-
* Account address.
|
|
61
|
-
*/
|
|
62
|
-
address: import("@metamask/superstruct").Struct<string, null>;
|
|
63
|
-
/**
|
|
64
|
-
* Account type.
|
|
65
|
-
*/
|
|
66
|
-
type: import("@metamask/superstruct").Struct<"eip155:erc4337", "eip155:erc4337">;
|
|
67
|
-
/**
|
|
68
|
-
* Account supported methods.
|
|
69
|
-
*/
|
|
70
|
-
methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation", {
|
|
71
|
-
personal_sign: "personal_sign";
|
|
72
|
-
eth_sign: "eth_sign";
|
|
73
|
-
eth_signTypedData_v1: "eth_signTypedData_v1";
|
|
74
|
-
eth_signTypedData_v3: "eth_signTypedData_v3";
|
|
75
|
-
eth_signTypedData_v4: "eth_signTypedData_v4";
|
|
76
|
-
eth_prepareUserOperation: "eth_prepareUserOperation";
|
|
77
|
-
eth_patchUserOperation: "eth_patchUserOperation";
|
|
78
|
-
eth_signUserOperation: "eth_signUserOperation";
|
|
79
|
-
}>>;
|
|
80
|
-
id: import("@metamask/superstruct").Struct<string, null>;
|
|
81
|
-
scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
82
|
-
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
83
|
-
}>;
|
|
84
|
-
export type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;
|
|
85
|
-
//# sourceMappingURL=types.d.mts.map
|
package/dist/eth/types.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAMnD,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C,iBAAiB,0BAA0B;CAC5C;AAED,eAAO,MAAM,mBAAmB;;;;;;;;IAG9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;EAWH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;IAGlC;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/eth/types.mjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { array, enums, literal } from "@metamask/superstruct";
|
|
2
|
-
import { EthAccountType, KeyringAccountStruct } from "../api/index.mjs";
|
|
3
|
-
import { object, definePattern } from "../superstruct.mjs";
|
|
4
|
-
export const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);
|
|
5
|
-
export const EthAddressStruct = definePattern('EthAddress', /^0x[0-9a-f]{40}$/iu);
|
|
6
|
-
export const EthUint256Struct = definePattern('EthUint256', /^0x([1-9a-f][0-9a-f]*|0)$/iu);
|
|
7
|
-
/**
|
|
8
|
-
* Supported Ethereum methods.
|
|
9
|
-
*/
|
|
10
|
-
export var EthMethod;
|
|
11
|
-
(function (EthMethod) {
|
|
12
|
-
// General signing methods
|
|
13
|
-
EthMethod["PersonalSign"] = "personal_sign";
|
|
14
|
-
EthMethod["Sign"] = "eth_sign";
|
|
15
|
-
EthMethod["SignTransaction"] = "eth_signTransaction";
|
|
16
|
-
EthMethod["SignTypedDataV1"] = "eth_signTypedData_v1";
|
|
17
|
-
EthMethod["SignTypedDataV3"] = "eth_signTypedData_v3";
|
|
18
|
-
EthMethod["SignTypedDataV4"] = "eth_signTypedData_v4";
|
|
19
|
-
// ERC-4337 methods
|
|
20
|
-
EthMethod["PrepareUserOperation"] = "eth_prepareUserOperation";
|
|
21
|
-
EthMethod["PatchUserOperation"] = "eth_patchUserOperation";
|
|
22
|
-
EthMethod["SignUserOperation"] = "eth_signUserOperation";
|
|
23
|
-
})(EthMethod || (EthMethod = {}));
|
|
24
|
-
export const EthEoaAccountStruct = object({
|
|
25
|
-
...KeyringAccountStruct.schema,
|
|
26
|
-
/**
|
|
27
|
-
* Account address.
|
|
28
|
-
*/
|
|
29
|
-
address: EthAddressStruct,
|
|
30
|
-
/**
|
|
31
|
-
* Account type.
|
|
32
|
-
*/
|
|
33
|
-
type: literal(`${EthAccountType.Eoa}`),
|
|
34
|
-
/**
|
|
35
|
-
* Account supported methods.
|
|
36
|
-
*/
|
|
37
|
-
methods: array(enums([
|
|
38
|
-
`${EthMethod.PersonalSign}`,
|
|
39
|
-
`${EthMethod.Sign}`,
|
|
40
|
-
`${EthMethod.SignTransaction}`,
|
|
41
|
-
`${EthMethod.SignTypedDataV1}`,
|
|
42
|
-
`${EthMethod.SignTypedDataV3}`,
|
|
43
|
-
`${EthMethod.SignTypedDataV4}`,
|
|
44
|
-
])),
|
|
45
|
-
});
|
|
46
|
-
export const EthErc4337AccountStruct = object({
|
|
47
|
-
...KeyringAccountStruct.schema,
|
|
48
|
-
/**
|
|
49
|
-
* Account address.
|
|
50
|
-
*/
|
|
51
|
-
address: EthAddressStruct,
|
|
52
|
-
/**
|
|
53
|
-
* Account type.
|
|
54
|
-
*/
|
|
55
|
-
type: literal(`${EthAccountType.Erc4337}`),
|
|
56
|
-
/**
|
|
57
|
-
* Account supported methods.
|
|
58
|
-
*/
|
|
59
|
-
methods: array(enums([
|
|
60
|
-
`${EthMethod.PersonalSign}`,
|
|
61
|
-
`${EthMethod.Sign}`,
|
|
62
|
-
`${EthMethod.SignTypedDataV1}`,
|
|
63
|
-
`${EthMethod.SignTypedDataV3}`,
|
|
64
|
-
`${EthMethod.SignTypedDataV4}`,
|
|
65
|
-
`${EthMethod.PrepareUserOperation}`,
|
|
66
|
-
`${EthMethod.PatchUserOperation}`,
|
|
67
|
-
`${EthMethod.SignUserOperation}`,
|
|
68
|
-
])),
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=types.mjs.map
|
package/dist/eth/types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,8BAA8B;AAE9D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,yBAAe;AAC9D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,2BAAuB;AAEvD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,oBAAoB,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,6BAA6B,CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAN,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,0BAA0B;IAC1B,2CAA8B,CAAA;IAC9B,8BAAiB,CAAA;IACjB,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,mBAAmB;IACnB,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;AAC7C,CAAC,EAZW,SAAS,KAAT,SAAS,QAYpB;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC,GAAG,oBAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC;IAEtC;;OAEG;IACH,OAAO,EAAE,KAAK,CACZ,KAAK,CAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;KAC/B,CAAC,CACH;CACF,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;IAC5C,GAAG,oBAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,KAAK,CACZ,KAAK,CAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,oBAAoB,EAAE;QACnC,GAAG,SAAS,CAAC,kBAAkB,EAAE;QACjC,GAAG,SAAS,CAAC,iBAAiB,EAAE;KACjC,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal } from '@metamask/superstruct';\n\nimport { EthAccountType, KeyringAccountStruct } from '../api';\nimport { object, definePattern } from '../superstruct';\n\nexport const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);\n\nexport const EthAddressStruct = definePattern(\n 'EthAddress',\n /^0x[0-9a-f]{40}$/iu,\n);\n\nexport const EthUint256Struct = definePattern(\n 'EthUint256',\n /^0x([1-9a-f][0-9a-f]*|0)$/iu,\n);\n\n/**\n * Supported Ethereum methods.\n */\nexport enum EthMethod {\n // General signing methods\n PersonalSign = 'personal_sign',\n Sign = 'eth_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n // ERC-4337 methods\n PrepareUserOperation = 'eth_prepareUserOperation',\n PatchUserOperation = 'eth_patchUserOperation',\n SignUserOperation = 'eth_signUserOperation',\n}\n\nexport const EthEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Eoa}`),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTransaction}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n ]),\n ),\n});\n\nexport type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;\n\nexport const EthErc4337AccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Erc4337}`),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n `${EthMethod.PrepareUserOperation}`,\n `${EthMethod.PatchUserOperation}`,\n `${EthMethod.SignUserOperation}`,\n ]),\n ),\n});\n\nexport type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;\n"]}
|
package/dist/eth/utils.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEvmAccountType = isEvmAccountType;
|
|
4
|
-
const api_1 = require("../api/index.cjs");
|
|
5
|
-
/**
|
|
6
|
-
* Checks if the given type is an EVM account type.
|
|
7
|
-
*
|
|
8
|
-
* @param type - The type to check.
|
|
9
|
-
* @returns Returns true if the type is an EVM account type, false otherwise.
|
|
10
|
-
*/
|
|
11
|
-
function isEvmAccountType(type) {
|
|
12
|
-
return type === api_1.EthAccountType.Eoa || type === api_1.EthAccountType.Erc4337;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=utils.cjs.map
|
package/dist/eth/utils.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs","sourceRoot":"","sources":["../../src/eth/utils.ts"],"names":[],"mappings":";;AASA,4CAEC;AAVD,0CAAwC;AAExC;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,IAAwB;IACvD,OAAO,IAAI,KAAK,oBAAc,CAAC,GAAG,IAAI,IAAI,KAAK,oBAAc,CAAC,OAAO,CAAC;AACxE,CAAC","sourcesContent":["import type { KeyringAccountType } from '../api';\nimport { EthAccountType } from '../api';\n\n/**\n * Checks if the given type is an EVM account type.\n *\n * @param type - The type to check.\n * @returns Returns true if the type is an EVM account type, false otherwise.\n */\nexport function isEvmAccountType(type: KeyringAccountType): boolean {\n return type === EthAccountType.Eoa || type === EthAccountType.Erc4337;\n}\n"]}
|
package/dist/eth/utils.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { KeyringAccountType } from "../api/index.cjs";
|
|
2
|
-
/**
|
|
3
|
-
* Checks if the given type is an EVM account type.
|
|
4
|
-
*
|
|
5
|
-
* @param type - The type to check.
|
|
6
|
-
* @returns Returns true if the type is an EVM account type, false otherwise.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isEvmAccountType(type: KeyringAccountType): boolean;
|
|
9
|
-
//# sourceMappingURL=utils.d.cts.map
|
package/dist/eth/utils.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.cts","sourceRoot":"","sources":["../../src/eth/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAe;AAGjD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAElE"}
|
package/dist/eth/utils.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { KeyringAccountType } from "../api/index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* Checks if the given type is an EVM account type.
|
|
4
|
-
*
|
|
5
|
-
* @param type - The type to check.
|
|
6
|
-
* @returns Returns true if the type is an EVM account type, false otherwise.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isEvmAccountType(type: KeyringAccountType): boolean;
|
|
9
|
-
//# sourceMappingURL=utils.d.mts.map
|
package/dist/eth/utils.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../../src/eth/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAe;AAGjD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAElE"}
|
package/dist/eth/utils.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EthAccountType } from "../api/index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* Checks if the given type is an EVM account type.
|
|
4
|
-
*
|
|
5
|
-
* @param type - The type to check.
|
|
6
|
-
* @returns Returns true if the type is an EVM account type, false otherwise.
|
|
7
|
-
*/
|
|
8
|
-
export function isEvmAccountType(type) {
|
|
9
|
-
return type === EthAccountType.Eoa || type === EthAccountType.Erc4337;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=utils.mjs.map
|
package/dist/eth/utils.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../../src/eth/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,yBAAe;AAExC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAwB;IACvD,OAAO,IAAI,KAAK,cAAc,CAAC,GAAG,IAAI,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC;AACxE,CAAC","sourcesContent":["import type { KeyringAccountType } from '../api';\nimport { EthAccountType } from '../api';\n\n/**\n * Checks if the given type is an EVM account type.\n *\n * @param type - The type to check.\n * @returns Returns true if the type is an EVM account type, false otherwise.\n */\nexport function isEvmAccountType(type: KeyringAccountType): boolean {\n return type === EthAccountType.Eoa || type === EthAccountType.Erc4337;\n}\n"]}
|
package/dist/events.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KeyringEvent = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Supported keyring events.
|
|
6
|
-
*/
|
|
7
|
-
var KeyringEvent;
|
|
8
|
-
(function (KeyringEvent) {
|
|
9
|
-
// Account events
|
|
10
|
-
KeyringEvent["AccountCreated"] = "notify:accountCreated";
|
|
11
|
-
KeyringEvent["AccountUpdated"] = "notify:accountUpdated";
|
|
12
|
-
KeyringEvent["AccountDeleted"] = "notify:accountDeleted";
|
|
13
|
-
// Request events
|
|
14
|
-
KeyringEvent["RequestApproved"] = "notify:requestApproved";
|
|
15
|
-
KeyringEvent["RequestRejected"] = "notify:requestRejected";
|
|
16
|
-
})(KeyringEvent || (exports.KeyringEvent = KeyringEvent = {}));
|
|
17
|
-
//# sourceMappingURL=events.cjs.map
|
package/dist/events.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.cjs","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,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,4BAAZ,YAAY,QASvB","sourcesContent":["/**\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"]}
|
package/dist/events.d.cts
DELETED
|
@@ -1,11 +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
|
-
//# sourceMappingURL=events.d.cts.map
|
package/dist/events.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.cts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IAEtB,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IAGxC,eAAe,2BAA2B;IAC1C,eAAe,2BAA2B;CAC3C"}
|
package/dist/events.d.mts
DELETED
|
@@ -1,11 +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
|
-
//# 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":"AAAA;;GAEG;AACH,oBAAY,YAAY;IAEtB,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IAGxC,eAAe,2BAA2B;IAC1C,eAAe,2BAA2B;CAC3C"}
|
package/dist/events.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Supported keyring events.
|
|
3
|
-
*/
|
|
4
|
-
export var KeyringEvent;
|
|
5
|
-
(function (KeyringEvent) {
|
|
6
|
-
// Account events
|
|
7
|
-
KeyringEvent["AccountCreated"] = "notify:accountCreated";
|
|
8
|
-
KeyringEvent["AccountUpdated"] = "notify:accountUpdated";
|
|
9
|
-
KeyringEvent["AccountDeleted"] = "notify:accountDeleted";
|
|
10
|
-
// Request events
|
|
11
|
-
KeyringEvent["RequestApproved"] = "notify:requestApproved";
|
|
12
|
-
KeyringEvent["RequestRejected"] = "notify:requestRejected";
|
|
13
|
-
})(KeyringEvent || (KeyringEvent = {}));
|
|
14
|
-
//# 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;;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","sourcesContent":["/**\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"]}
|
package/dist/internal/api.cjs
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RejectRequestResponseStruct = exports.RejectRequestRequestStruct = exports.ApproveRequestResponseStruct = exports.ApproveRequestRequestStruct = exports.SubmitRequestResponseStruct = exports.SubmitRequestRequestStruct = exports.GetRequestResponseStruct = exports.GetRequestRequestStruct = exports.ListRequestsResponseStruct = exports.ListRequestsRequestStruct = exports.ExportAccountResponseStruct = exports.ExportAccountRequestStruct = exports.DeleteAccountResponseStruct = exports.DeleteAccountRequestStruct = exports.UpdateAccountResponseStruct = exports.UpdateAccountRequestStruct = exports.FilterAccountChainsResponseStruct = exports.FilterAccountChainsStruct = exports.GetAccountBalancesResponseStruct = exports.GetAccountBalancesRequestStruct = exports.CreateAccountResponseStruct = exports.CreateAccountRequestStruct = exports.GetAccountResponseStruct = exports.GetAccountRequestStruct = exports.ListAccountsResponseStruct = exports.ListAccountsRequestStruct = void 0;
|
|
4
|
-
const superstruct_1 = require("@metamask/superstruct");
|
|
5
|
-
const utils_1 = require("@metamask/utils");
|
|
6
|
-
const rpc_1 = require("./rpc.cjs");
|
|
7
|
-
const api_1 = require("../api/index.cjs");
|
|
8
|
-
const superstruct_2 = require("../superstruct.cjs");
|
|
9
|
-
const utils_2 = require("../utils/index.cjs");
|
|
10
|
-
const CommonHeader = {
|
|
11
|
-
jsonrpc: (0, superstruct_1.literal)('2.0'),
|
|
12
|
-
id: (0, superstruct_1.union)([(0, superstruct_1.string)(), (0, superstruct_1.number)(), (0, superstruct_1.literal)(null)]),
|
|
13
|
-
};
|
|
14
|
-
// ----------------------------------------------------------------------------
|
|
15
|
-
// List accounts
|
|
16
|
-
exports.ListAccountsRequestStruct = (0, superstruct_2.object)({
|
|
17
|
-
...CommonHeader,
|
|
18
|
-
method: (0, superstruct_1.literal)('keyring_listAccounts'),
|
|
19
|
-
});
|
|
20
|
-
exports.ListAccountsResponseStruct = (0, superstruct_1.array)(api_1.KeyringAccountStruct);
|
|
21
|
-
// ----------------------------------------------------------------------------
|
|
22
|
-
// Get account
|
|
23
|
-
exports.GetAccountRequestStruct = (0, superstruct_2.object)({
|
|
24
|
-
...CommonHeader,
|
|
25
|
-
method: (0, superstruct_1.literal)('keyring_getAccount'),
|
|
26
|
-
params: (0, superstruct_2.object)({
|
|
27
|
-
id: utils_2.UuidStruct,
|
|
28
|
-
}),
|
|
29
|
-
});
|
|
30
|
-
exports.GetAccountResponseStruct = api_1.KeyringAccountStruct;
|
|
31
|
-
// ----------------------------------------------------------------------------
|
|
32
|
-
// Create account
|
|
33
|
-
exports.CreateAccountRequestStruct = (0, superstruct_2.object)({
|
|
34
|
-
...CommonHeader,
|
|
35
|
-
method: (0, superstruct_1.literal)('keyring_createAccount'),
|
|
36
|
-
params: (0, superstruct_2.object)({
|
|
37
|
-
options: (0, superstruct_1.record)((0, superstruct_1.string)(), utils_1.JsonStruct),
|
|
38
|
-
}),
|
|
39
|
-
});
|
|
40
|
-
exports.CreateAccountResponseStruct = api_1.KeyringAccountStruct;
|
|
41
|
-
// ----------------------------------------------------------------------------
|
|
42
|
-
// Get account balances
|
|
43
|
-
exports.GetAccountBalancesRequestStruct = (0, superstruct_2.object)({
|
|
44
|
-
...CommonHeader,
|
|
45
|
-
method: (0, superstruct_1.literal)(`${rpc_1.KeyringRpcMethod.GetAccountBalances}`),
|
|
46
|
-
params: (0, superstruct_2.object)({
|
|
47
|
-
id: utils_2.UuidStruct,
|
|
48
|
-
assets: (0, superstruct_1.array)(api_1.CaipAssetTypeStruct),
|
|
49
|
-
}),
|
|
50
|
-
});
|
|
51
|
-
exports.GetAccountBalancesResponseStruct = (0, superstruct_1.record)(api_1.CaipAssetTypeStruct, api_1.BalanceStruct);
|
|
52
|
-
// ----------------------------------------------------------------------------
|
|
53
|
-
// Filter account chains
|
|
54
|
-
exports.FilterAccountChainsStruct = (0, superstruct_2.object)({
|
|
55
|
-
...CommonHeader,
|
|
56
|
-
method: (0, superstruct_1.literal)('keyring_filterAccountChains'),
|
|
57
|
-
params: (0, superstruct_2.object)({
|
|
58
|
-
id: utils_2.UuidStruct,
|
|
59
|
-
chains: (0, superstruct_1.array)((0, superstruct_1.string)()),
|
|
60
|
-
}),
|
|
61
|
-
});
|
|
62
|
-
exports.FilterAccountChainsResponseStruct = (0, superstruct_1.array)((0, superstruct_1.string)());
|
|
63
|
-
// ----------------------------------------------------------------------------
|
|
64
|
-
// Update account
|
|
65
|
-
exports.UpdateAccountRequestStruct = (0, superstruct_2.object)({
|
|
66
|
-
...CommonHeader,
|
|
67
|
-
method: (0, superstruct_1.literal)('keyring_updateAccount'),
|
|
68
|
-
params: (0, superstruct_2.object)({
|
|
69
|
-
account: api_1.KeyringAccountStruct,
|
|
70
|
-
}),
|
|
71
|
-
});
|
|
72
|
-
exports.UpdateAccountResponseStruct = (0, superstruct_1.literal)(null);
|
|
73
|
-
// ----------------------------------------------------------------------------
|
|
74
|
-
// Delete account
|
|
75
|
-
exports.DeleteAccountRequestStruct = (0, superstruct_2.object)({
|
|
76
|
-
...CommonHeader,
|
|
77
|
-
method: (0, superstruct_1.literal)('keyring_deleteAccount'),
|
|
78
|
-
params: (0, superstruct_2.object)({
|
|
79
|
-
id: utils_2.UuidStruct,
|
|
80
|
-
}),
|
|
81
|
-
});
|
|
82
|
-
exports.DeleteAccountResponseStruct = (0, superstruct_1.literal)(null);
|
|
83
|
-
// ----------------------------------------------------------------------------
|
|
84
|
-
// Export account
|
|
85
|
-
exports.ExportAccountRequestStruct = (0, superstruct_2.object)({
|
|
86
|
-
...CommonHeader,
|
|
87
|
-
method: (0, superstruct_1.literal)('keyring_exportAccount'),
|
|
88
|
-
params: (0, superstruct_2.object)({
|
|
89
|
-
id: utils_2.UuidStruct,
|
|
90
|
-
}),
|
|
91
|
-
});
|
|
92
|
-
exports.ExportAccountResponseStruct = api_1.KeyringAccountDataStruct;
|
|
93
|
-
// ----------------------------------------------------------------------------
|
|
94
|
-
// List requests
|
|
95
|
-
exports.ListRequestsRequestStruct = (0, superstruct_2.object)({
|
|
96
|
-
...CommonHeader,
|
|
97
|
-
method: (0, superstruct_1.literal)('keyring_listRequests'),
|
|
98
|
-
});
|
|
99
|
-
exports.ListRequestsResponseStruct = (0, superstruct_1.array)(api_1.KeyringRequestStruct);
|
|
100
|
-
// ----------------------------------------------------------------------------
|
|
101
|
-
// Get request
|
|
102
|
-
exports.GetRequestRequestStruct = (0, superstruct_2.object)({
|
|
103
|
-
...CommonHeader,
|
|
104
|
-
method: (0, superstruct_1.literal)('keyring_getRequest'),
|
|
105
|
-
params: (0, superstruct_2.object)({
|
|
106
|
-
id: utils_2.UuidStruct,
|
|
107
|
-
}),
|
|
108
|
-
});
|
|
109
|
-
exports.GetRequestResponseStruct = api_1.KeyringRequestStruct;
|
|
110
|
-
// ----------------------------------------------------------------------------
|
|
111
|
-
// Submit request
|
|
112
|
-
exports.SubmitRequestRequestStruct = (0, superstruct_2.object)({
|
|
113
|
-
...CommonHeader,
|
|
114
|
-
method: (0, superstruct_1.literal)('keyring_submitRequest'),
|
|
115
|
-
params: api_1.KeyringRequestStruct,
|
|
116
|
-
});
|
|
117
|
-
exports.SubmitRequestResponseStruct = api_1.KeyringResponseStruct;
|
|
118
|
-
// ----------------------------------------------------------------------------
|
|
119
|
-
// Approve request
|
|
120
|
-
exports.ApproveRequestRequestStruct = (0, superstruct_2.object)({
|
|
121
|
-
...CommonHeader,
|
|
122
|
-
method: (0, superstruct_1.literal)('keyring_approveRequest'),
|
|
123
|
-
params: (0, superstruct_2.object)({
|
|
124
|
-
id: utils_2.UuidStruct,
|
|
125
|
-
data: (0, superstruct_1.record)((0, superstruct_1.string)(), utils_1.JsonStruct),
|
|
126
|
-
}),
|
|
127
|
-
});
|
|
128
|
-
exports.ApproveRequestResponseStruct = (0, superstruct_1.literal)(null);
|
|
129
|
-
// ----------------------------------------------------------------------------
|
|
130
|
-
// Reject request
|
|
131
|
-
exports.RejectRequestRequestStruct = (0, superstruct_2.object)({
|
|
132
|
-
...CommonHeader,
|
|
133
|
-
method: (0, superstruct_1.literal)('keyring_rejectRequest'),
|
|
134
|
-
params: (0, superstruct_2.object)({
|
|
135
|
-
id: utils_2.UuidStruct,
|
|
136
|
-
}),
|
|
137
|
-
});
|
|
138
|
-
exports.RejectRequestResponseStruct = (0, superstruct_1.literal)(null);
|
|
139
|
-
//# sourceMappingURL=api.cjs.map
|