@metamask-previews/keyring-api 21.0.0-45ee2b8 → 21.0.0-50e2da5

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/rpc.d.cts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { Infer } from "@metamask/superstruct";
2
- import type { Keyring } from "./api/index.cjs";
3
2
  /**
4
3
  * Keyring RPC methods used by the API.
5
4
  */
@@ -21,7 +20,7 @@ export declare enum KeyringRpcMethod {
21
20
  SubmitRequest = "keyring_submitRequest",
22
21
  ApproveRequest = "keyring_approveRequest",
23
22
  RejectRequest = "keyring_rejectRequest",
24
- Batch = "keyring_batch"
23
+ SetSelectedAccounts = "keyring_setSelectedAccounts"
25
24
  }
26
25
  /**
27
26
  * Check if a method is a keyring RPC method.
@@ -30,18 +29,6 @@ export declare enum KeyringRpcMethod {
30
29
  * @returns Whether the method is a keyring RPC method.
31
30
  */
32
31
  export declare function isKeyringRpcMethod(method: string): boolean;
33
- /**
34
- * Keyring RPC interface.
35
- */
36
- export type KeyringRpc = Keyring & {
37
- /**
38
- * Batch keyring RPC requests.
39
- *
40
- * @returns A promise that resolves to an array of results or errors for each
41
- * keyring RPC requests.
42
- */
43
- batch(requests: BatchRequest[]): Promise<BatchResponse>;
44
- };
45
32
  export declare const ListAccountsRequestStruct: import("@metamask/superstruct").Struct<{
46
33
  method: "keyring_listAccounts";
47
34
  id: string | number | null;
@@ -695,7 +682,7 @@ export declare const ResolveAccountAddressResponseStruct: import("@metamask/supe
695
682
  address: import("@metamask/superstruct").Struct<`${string}:${string}:${string}`, null>;
696
683
  }>;
697
684
  export type ResolveAccountAddressResponse = Infer<typeof ResolveAccountAddressResponseStruct>;
698
- export declare const FilterAccountChainsRequestStruct: import("@metamask/superstruct").Struct<{
685
+ export declare const FilterAccountChainsStruct: import("@metamask/superstruct").Struct<{
699
686
  method: "keyring_filterAccountChains";
700
687
  id: string | number | null;
701
688
  jsonrpc: "2.0";
@@ -715,7 +702,7 @@ export declare const FilterAccountChainsRequestStruct: import("@metamask/superst
715
702
  jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
716
703
  id: import("@metamask/superstruct").Struct<string | number | null, null>;
717
704
  }>;
718
- export type FilterAccountChainsRequest = Infer<typeof FilterAccountChainsRequestStruct>;
705
+ export type FilterAccountChainsRequest = Infer<typeof FilterAccountChainsStruct>;
719
706
  export declare const FilterAccountChainsResponseStruct: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
720
707
  export type FilterAccountChainsResponse = Infer<typeof FilterAccountChainsResponseStruct>;
721
708
  export declare const UpdateAccountRequestStruct: import("@metamask/superstruct").Struct<{
@@ -1035,884 +1022,4 @@ export declare const RejectRequestRequestStruct: import("@metamask/superstruct")
1035
1022
  export type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;
1036
1023
  export declare const RejectRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
1037
1024
  export type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;
1038
- export declare const BatchRequestStruct: import("@metamask/superstruct").Struct<{
1039
- method: "keyring_batch";
1040
- id: string | number | null;
1041
- jsonrpc: "2.0";
1042
- params: {
1043
- id: string;
1044
- requests: ({
1045
- method: "keyring_listAccounts";
1046
- id: string | number | null;
1047
- jsonrpc: "2.0";
1048
- } | {
1049
- method: "keyring_getAccount";
1050
- id: string | number | null;
1051
- jsonrpc: "2.0";
1052
- params: {
1053
- id: string;
1054
- };
1055
- } | {
1056
- method: "keyring_createAccount";
1057
- id: string | number | null;
1058
- jsonrpc: "2.0";
1059
- params: {
1060
- options: Record<string, import("@metamask/utils").Json>;
1061
- };
1062
- } | {
1063
- method: "keyring_discoverAccounts";
1064
- id: string | number | null;
1065
- jsonrpc: "2.0";
1066
- params: {
1067
- groupIndex: number;
1068
- scopes: `${string}:${string}`[];
1069
- entropySource: string;
1070
- };
1071
- } | {
1072
- method: "keyring_listAccountAssets";
1073
- id: string | number | null;
1074
- jsonrpc: "2.0";
1075
- params: {
1076
- id: string;
1077
- };
1078
- } | {
1079
- method: "keyring_listAccountTransactions";
1080
- id: string | number | null;
1081
- jsonrpc: "2.0";
1082
- params: {
1083
- id: string;
1084
- pagination: {
1085
- limit: number;
1086
- next?: string | null;
1087
- };
1088
- };
1089
- } | {
1090
- method: "keyring_getAccountBalances";
1091
- id: string | number | null;
1092
- jsonrpc: "2.0";
1093
- params: {
1094
- id: string;
1095
- assets: `${string}:${string}/${string}:${string}`[];
1096
- };
1097
- } | {
1098
- method: "keyring_resolveAccountAddress";
1099
- id: string | number | null;
1100
- jsonrpc: "2.0";
1101
- params: {
1102
- request: {
1103
- method: string;
1104
- id: string | number | null;
1105
- jsonrpc: "2.0";
1106
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1107
- };
1108
- scope: `${string}:${string}`;
1109
- };
1110
- } | {
1111
- method: "keyring_filterAccountChains";
1112
- id: string | number | null;
1113
- jsonrpc: "2.0";
1114
- params: {
1115
- id: string;
1116
- chains: string[];
1117
- };
1118
- } | {
1119
- method: "keyring_updateAccount";
1120
- id: string | number | null;
1121
- jsonrpc: "2.0";
1122
- params: {
1123
- account: {
1124
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1125
- id: string;
1126
- options: Record<string, import("@metamask/utils").Json> & {
1127
- entropy?: {
1128
- type: "mnemonic";
1129
- id: string;
1130
- derivationPath: string;
1131
- groupIndex: number;
1132
- } | {
1133
- type: "private-key";
1134
- };
1135
- exportable?: boolean;
1136
- };
1137
- address: string;
1138
- scopes: `${string}:${string}`[];
1139
- methods: string[];
1140
- };
1141
- };
1142
- } | {
1143
- method: "keyring_deleteAccount";
1144
- id: string | number | null;
1145
- jsonrpc: "2.0";
1146
- params: {
1147
- id: string;
1148
- };
1149
- } | {
1150
- method: "keyring_exportAccount";
1151
- id: string | number | null;
1152
- jsonrpc: "2.0";
1153
- params: {
1154
- id: string;
1155
- };
1156
- } | {
1157
- method: "keyring_listRequests";
1158
- id: string | number | null;
1159
- jsonrpc: "2.0";
1160
- } | {
1161
- method: "keyring_getRequest";
1162
- id: string | number | null;
1163
- jsonrpc: "2.0";
1164
- params: {
1165
- id: string;
1166
- };
1167
- } | {
1168
- method: "keyring_submitRequest";
1169
- id: string | number | null;
1170
- jsonrpc: "2.0";
1171
- params: {
1172
- id: string;
1173
- origin: string;
1174
- request: {
1175
- method: string;
1176
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1177
- };
1178
- scope: string;
1179
- account: string;
1180
- };
1181
- } | {
1182
- method: "keyring_approveRequest";
1183
- id: string | number | null;
1184
- jsonrpc: "2.0";
1185
- params: {
1186
- data: Record<string, import("@metamask/utils").Json>;
1187
- id: string;
1188
- };
1189
- } | {
1190
- method: "keyring_rejectRequest";
1191
- id: string | number | null;
1192
- jsonrpc: "2.0";
1193
- params: {
1194
- id: string;
1195
- };
1196
- })[];
1197
- };
1198
- }, {
1199
- method: import("@metamask/superstruct").Struct<"keyring_batch", "keyring_batch">;
1200
- params: import("@metamask/superstruct").Struct<{
1201
- id: string;
1202
- requests: ({
1203
- method: "keyring_listAccounts";
1204
- id: string | number | null;
1205
- jsonrpc: "2.0";
1206
- } | {
1207
- method: "keyring_getAccount";
1208
- id: string | number | null;
1209
- jsonrpc: "2.0";
1210
- params: {
1211
- id: string;
1212
- };
1213
- } | {
1214
- method: "keyring_createAccount";
1215
- id: string | number | null;
1216
- jsonrpc: "2.0";
1217
- params: {
1218
- options: Record<string, import("@metamask/utils").Json>;
1219
- };
1220
- } | {
1221
- method: "keyring_discoverAccounts";
1222
- id: string | number | null;
1223
- jsonrpc: "2.0";
1224
- params: {
1225
- groupIndex: number;
1226
- scopes: `${string}:${string}`[];
1227
- entropySource: string;
1228
- };
1229
- } | {
1230
- method: "keyring_listAccountAssets";
1231
- id: string | number | null;
1232
- jsonrpc: "2.0";
1233
- params: {
1234
- id: string;
1235
- };
1236
- } | {
1237
- method: "keyring_listAccountTransactions";
1238
- id: string | number | null;
1239
- jsonrpc: "2.0";
1240
- params: {
1241
- id: string;
1242
- pagination: {
1243
- limit: number;
1244
- next?: string | null;
1245
- };
1246
- };
1247
- } | {
1248
- method: "keyring_getAccountBalances";
1249
- id: string | number | null;
1250
- jsonrpc: "2.0";
1251
- params: {
1252
- id: string;
1253
- assets: `${string}:${string}/${string}:${string}`[];
1254
- };
1255
- } | {
1256
- method: "keyring_resolveAccountAddress";
1257
- id: string | number | null;
1258
- jsonrpc: "2.0";
1259
- params: {
1260
- request: {
1261
- method: string;
1262
- id: string | number | null;
1263
- jsonrpc: "2.0";
1264
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1265
- };
1266
- scope: `${string}:${string}`;
1267
- };
1268
- } | {
1269
- method: "keyring_filterAccountChains";
1270
- id: string | number | null;
1271
- jsonrpc: "2.0";
1272
- params: {
1273
- id: string;
1274
- chains: string[];
1275
- };
1276
- } | {
1277
- method: "keyring_updateAccount";
1278
- id: string | number | null;
1279
- jsonrpc: "2.0";
1280
- params: {
1281
- account: {
1282
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1283
- id: string;
1284
- options: Record<string, import("@metamask/utils").Json> & {
1285
- entropy?: {
1286
- type: "mnemonic";
1287
- id: string;
1288
- derivationPath: string;
1289
- groupIndex: number;
1290
- } | {
1291
- type: "private-key";
1292
- };
1293
- exportable?: boolean;
1294
- };
1295
- address: string;
1296
- scopes: `${string}:${string}`[];
1297
- methods: string[];
1298
- };
1299
- };
1300
- } | {
1301
- method: "keyring_deleteAccount";
1302
- id: string | number | null;
1303
- jsonrpc: "2.0";
1304
- params: {
1305
- id: string;
1306
- };
1307
- } | {
1308
- method: "keyring_exportAccount";
1309
- id: string | number | null;
1310
- jsonrpc: "2.0";
1311
- params: {
1312
- id: string;
1313
- };
1314
- } | {
1315
- method: "keyring_listRequests";
1316
- id: string | number | null;
1317
- jsonrpc: "2.0";
1318
- } | {
1319
- method: "keyring_getRequest";
1320
- id: string | number | null;
1321
- jsonrpc: "2.0";
1322
- params: {
1323
- id: string;
1324
- };
1325
- } | {
1326
- method: "keyring_submitRequest";
1327
- id: string | number | null;
1328
- jsonrpc: "2.0";
1329
- params: {
1330
- id: string;
1331
- origin: string;
1332
- request: {
1333
- method: string;
1334
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1335
- };
1336
- scope: string;
1337
- account: string;
1338
- };
1339
- } | {
1340
- method: "keyring_approveRequest";
1341
- id: string | number | null;
1342
- jsonrpc: "2.0";
1343
- params: {
1344
- data: Record<string, import("@metamask/utils").Json>;
1345
- id: string;
1346
- };
1347
- } | {
1348
- method: "keyring_rejectRequest";
1349
- id: string | number | null;
1350
- jsonrpc: "2.0";
1351
- params: {
1352
- id: string;
1353
- };
1354
- })[];
1355
- }, {
1356
- id: import("@metamask/superstruct").Struct<string, null>;
1357
- requests: import("@metamask/superstruct").Struct<({
1358
- method: "keyring_listAccounts";
1359
- id: string | number | null;
1360
- jsonrpc: "2.0";
1361
- } | {
1362
- method: "keyring_getAccount";
1363
- id: string | number | null;
1364
- jsonrpc: "2.0";
1365
- params: {
1366
- id: string;
1367
- };
1368
- } | {
1369
- method: "keyring_createAccount";
1370
- id: string | number | null;
1371
- jsonrpc: "2.0";
1372
- params: {
1373
- options: Record<string, import("@metamask/utils").Json>;
1374
- };
1375
- } | {
1376
- method: "keyring_discoverAccounts";
1377
- id: string | number | null;
1378
- jsonrpc: "2.0";
1379
- params: {
1380
- groupIndex: number;
1381
- scopes: `${string}:${string}`[];
1382
- entropySource: string;
1383
- };
1384
- } | {
1385
- method: "keyring_listAccountAssets";
1386
- id: string | number | null;
1387
- jsonrpc: "2.0";
1388
- params: {
1389
- id: string;
1390
- };
1391
- } | {
1392
- method: "keyring_listAccountTransactions";
1393
- id: string | number | null;
1394
- jsonrpc: "2.0";
1395
- params: {
1396
- id: string;
1397
- pagination: {
1398
- limit: number;
1399
- next?: string | null;
1400
- };
1401
- };
1402
- } | {
1403
- method: "keyring_getAccountBalances";
1404
- id: string | number | null;
1405
- jsonrpc: "2.0";
1406
- params: {
1407
- id: string;
1408
- assets: `${string}:${string}/${string}:${string}`[];
1409
- };
1410
- } | {
1411
- method: "keyring_resolveAccountAddress";
1412
- id: string | number | null;
1413
- jsonrpc: "2.0";
1414
- params: {
1415
- request: {
1416
- method: string;
1417
- id: string | number | null;
1418
- jsonrpc: "2.0";
1419
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1420
- };
1421
- scope: `${string}:${string}`;
1422
- };
1423
- } | {
1424
- method: "keyring_filterAccountChains";
1425
- id: string | number | null;
1426
- jsonrpc: "2.0";
1427
- params: {
1428
- id: string;
1429
- chains: string[];
1430
- };
1431
- } | {
1432
- method: "keyring_updateAccount";
1433
- id: string | number | null;
1434
- jsonrpc: "2.0";
1435
- params: {
1436
- account: {
1437
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1438
- id: string;
1439
- options: Record<string, import("@metamask/utils").Json> & {
1440
- entropy?: {
1441
- type: "mnemonic";
1442
- id: string;
1443
- derivationPath: string;
1444
- groupIndex: number;
1445
- } | {
1446
- type: "private-key";
1447
- };
1448
- exportable?: boolean;
1449
- };
1450
- address: string;
1451
- scopes: `${string}:${string}`[];
1452
- methods: string[];
1453
- };
1454
- };
1455
- } | {
1456
- method: "keyring_deleteAccount";
1457
- id: string | number | null;
1458
- jsonrpc: "2.0";
1459
- params: {
1460
- id: string;
1461
- };
1462
- } | {
1463
- method: "keyring_exportAccount";
1464
- id: string | number | null;
1465
- jsonrpc: "2.0";
1466
- params: {
1467
- id: string;
1468
- };
1469
- } | {
1470
- method: "keyring_listRequests";
1471
- id: string | number | null;
1472
- jsonrpc: "2.0";
1473
- } | {
1474
- method: "keyring_getRequest";
1475
- id: string | number | null;
1476
- jsonrpc: "2.0";
1477
- params: {
1478
- id: string;
1479
- };
1480
- } | {
1481
- method: "keyring_submitRequest";
1482
- id: string | number | null;
1483
- jsonrpc: "2.0";
1484
- params: {
1485
- id: string;
1486
- origin: string;
1487
- request: {
1488
- method: string;
1489
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1490
- };
1491
- scope: string;
1492
- account: string;
1493
- };
1494
- } | {
1495
- method: "keyring_approveRequest";
1496
- id: string | number | null;
1497
- jsonrpc: "2.0";
1498
- params: {
1499
- data: Record<string, import("@metamask/utils").Json>;
1500
- id: string;
1501
- };
1502
- } | {
1503
- method: "keyring_rejectRequest";
1504
- id: string | number | null;
1505
- jsonrpc: "2.0";
1506
- params: {
1507
- id: string;
1508
- };
1509
- })[], import("@metamask/superstruct").Struct<{
1510
- method: "keyring_listAccounts";
1511
- id: string | number | null;
1512
- jsonrpc: "2.0";
1513
- } | {
1514
- method: "keyring_getAccount";
1515
- id: string | number | null;
1516
- jsonrpc: "2.0";
1517
- params: {
1518
- id: string;
1519
- };
1520
- } | {
1521
- method: "keyring_createAccount";
1522
- id: string | number | null;
1523
- jsonrpc: "2.0";
1524
- params: {
1525
- options: Record<string, import("@metamask/utils").Json>;
1526
- };
1527
- } | {
1528
- method: "keyring_discoverAccounts";
1529
- id: string | number | null;
1530
- jsonrpc: "2.0";
1531
- params: {
1532
- groupIndex: number;
1533
- scopes: `${string}:${string}`[];
1534
- entropySource: string;
1535
- };
1536
- } | {
1537
- method: "keyring_listAccountAssets";
1538
- id: string | number | null;
1539
- jsonrpc: "2.0";
1540
- params: {
1541
- id: string;
1542
- };
1543
- } | {
1544
- method: "keyring_listAccountTransactions";
1545
- id: string | number | null;
1546
- jsonrpc: "2.0";
1547
- params: {
1548
- id: string;
1549
- pagination: {
1550
- limit: number;
1551
- next?: string | null;
1552
- };
1553
- };
1554
- } | {
1555
- method: "keyring_getAccountBalances";
1556
- id: string | number | null;
1557
- jsonrpc: "2.0";
1558
- params: {
1559
- id: string;
1560
- assets: `${string}:${string}/${string}:${string}`[];
1561
- };
1562
- } | {
1563
- method: "keyring_resolveAccountAddress";
1564
- id: string | number | null;
1565
- jsonrpc: "2.0";
1566
- params: {
1567
- request: {
1568
- method: string;
1569
- id: string | number | null;
1570
- jsonrpc: "2.0";
1571
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1572
- };
1573
- scope: `${string}:${string}`;
1574
- };
1575
- } | {
1576
- method: "keyring_filterAccountChains";
1577
- id: string | number | null;
1578
- jsonrpc: "2.0";
1579
- params: {
1580
- id: string;
1581
- chains: string[];
1582
- };
1583
- } | {
1584
- method: "keyring_updateAccount";
1585
- id: string | number | null;
1586
- jsonrpc: "2.0";
1587
- params: {
1588
- account: {
1589
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1590
- id: string;
1591
- options: Record<string, import("@metamask/utils").Json> & {
1592
- entropy?: {
1593
- type: "mnemonic";
1594
- id: string;
1595
- derivationPath: string;
1596
- groupIndex: number;
1597
- } | {
1598
- type: "private-key";
1599
- };
1600
- exportable?: boolean;
1601
- };
1602
- address: string;
1603
- scopes: `${string}:${string}`[];
1604
- methods: string[];
1605
- };
1606
- };
1607
- } | {
1608
- method: "keyring_deleteAccount";
1609
- id: string | number | null;
1610
- jsonrpc: "2.0";
1611
- params: {
1612
- id: string;
1613
- };
1614
- } | {
1615
- method: "keyring_exportAccount";
1616
- id: string | number | null;
1617
- jsonrpc: "2.0";
1618
- params: {
1619
- id: string;
1620
- };
1621
- } | {
1622
- method: "keyring_listRequests";
1623
- id: string | number | null;
1624
- jsonrpc: "2.0";
1625
- } | {
1626
- method: "keyring_getRequest";
1627
- id: string | number | null;
1628
- jsonrpc: "2.0";
1629
- params: {
1630
- id: string;
1631
- };
1632
- } | {
1633
- method: "keyring_submitRequest";
1634
- id: string | number | null;
1635
- jsonrpc: "2.0";
1636
- params: {
1637
- id: string;
1638
- origin: string;
1639
- request: {
1640
- method: string;
1641
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1642
- };
1643
- scope: string;
1644
- account: string;
1645
- };
1646
- } | {
1647
- method: "keyring_approveRequest";
1648
- id: string | number | null;
1649
- jsonrpc: "2.0";
1650
- params: {
1651
- data: Record<string, import("@metamask/utils").Json>;
1652
- id: string;
1653
- };
1654
- } | {
1655
- method: "keyring_rejectRequest";
1656
- id: string | number | null;
1657
- jsonrpc: "2.0";
1658
- params: {
1659
- id: string;
1660
- };
1661
- }, null>>;
1662
- }>;
1663
- jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
1664
- id: import("@metamask/superstruct").Struct<string | number | null, null>;
1665
- }>;
1666
- export type BatchRequest = Infer<typeof BatchRequestStruct>;
1667
- export declare const BatchResponseStruct: import("@metamask/superstruct").Struct<({
1668
- response: string[] | Record<string, import("@metamask/utils").Json> | {
1669
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1670
- id: string;
1671
- options: Record<string, import("@metamask/utils").Json> & {
1672
- entropy?: {
1673
- type: "mnemonic";
1674
- id: string;
1675
- derivationPath: string;
1676
- groupIndex: number;
1677
- } | {
1678
- type: "private-key";
1679
- };
1680
- exportable?: boolean;
1681
- };
1682
- address: string;
1683
- scopes: `${string}:${string}`[];
1684
- methods: string[];
1685
- } | {
1686
- id: string;
1687
- origin: string;
1688
- request: {
1689
- method: string;
1690
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1691
- };
1692
- scope: string;
1693
- account: string;
1694
- } | {
1695
- pending: true;
1696
- redirect?: {
1697
- message?: string;
1698
- url?: string;
1699
- };
1700
- } | {
1701
- result: import("@metamask/utils").Json;
1702
- pending: false;
1703
- } | {
1704
- data: {
1705
- type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
1706
- id: string;
1707
- from: {
1708
- address: string;
1709
- asset: {
1710
- unit: string;
1711
- type: `${string}:${string}/${string}:${string}`;
1712
- amount: string;
1713
- fungible: true;
1714
- } | {
1715
- id: `${string}:${string}/${string}:${string}/${string}`;
1716
- fungible: false;
1717
- } | null;
1718
- }[];
1719
- events: {
1720
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
1721
- timestamp: number | null;
1722
- }[];
1723
- chain: `${string}:${string}`;
1724
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
1725
- account: string;
1726
- timestamp: number | null;
1727
- to: {
1728
- address: string;
1729
- asset: {
1730
- unit: string;
1731
- type: `${string}:${string}/${string}:${string}`;
1732
- amount: string;
1733
- fungible: true;
1734
- } | {
1735
- id: `${string}:${string}/${string}:${string}/${string}`;
1736
- fungible: false;
1737
- } | null;
1738
- }[];
1739
- fees: {
1740
- type: "base" | "priority";
1741
- asset: {
1742
- unit: string;
1743
- type: `${string}:${string}/${string}:${string}`;
1744
- amount: string;
1745
- fungible: true;
1746
- } | {
1747
- id: `${string}:${string}/${string}:${string}/${string}`;
1748
- fungible: false;
1749
- };
1750
- }[];
1751
- }[];
1752
- next: string | null;
1753
- } | {
1754
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1755
- id: string;
1756
- options: Record<string, import("@metamask/utils").Json> & {
1757
- entropy?: {
1758
- type: "mnemonic";
1759
- id: string;
1760
- derivationPath: string;
1761
- groupIndex: number;
1762
- } | {
1763
- type: "private-key";
1764
- };
1765
- exportable?: boolean;
1766
- };
1767
- address: string;
1768
- scopes: `${string}:${string}`[];
1769
- methods: string[];
1770
- }[] | (`${string}:${string}/${string}:${string}` | `${string}:${string}/${string}:${string}/${string}`)[] | {
1771
- type: "bip44";
1772
- derivationPath: `m/${string}`;
1773
- scopes: `${string}:${string}`[];
1774
- }[] | Record<`${string}:${string}/${string}:${string}`, {
1775
- unit: string;
1776
- amount: string;
1777
- }> | {
1778
- id: string;
1779
- origin: string;
1780
- request: {
1781
- method: string;
1782
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1783
- };
1784
- scope: string;
1785
- account: string;
1786
- }[] | {
1787
- address: `${string}:${string}:${string}`;
1788
- } | null;
1789
- } | {
1790
- error: string;
1791
- })[], import("@metamask/superstruct").Struct<{
1792
- response: string[] | Record<string, import("@metamask/utils").Json> | {
1793
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1794
- id: string;
1795
- options: Record<string, import("@metamask/utils").Json> & {
1796
- entropy?: {
1797
- type: "mnemonic";
1798
- id: string;
1799
- derivationPath: string;
1800
- groupIndex: number;
1801
- } | {
1802
- type: "private-key";
1803
- };
1804
- exportable?: boolean;
1805
- };
1806
- address: string;
1807
- scopes: `${string}:${string}`[];
1808
- methods: string[];
1809
- } | {
1810
- id: string;
1811
- origin: string;
1812
- request: {
1813
- method: string;
1814
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1815
- };
1816
- scope: string;
1817
- account: string;
1818
- } | {
1819
- pending: true;
1820
- redirect?: {
1821
- message?: string;
1822
- url?: string;
1823
- };
1824
- } | {
1825
- result: import("@metamask/utils").Json;
1826
- pending: false;
1827
- } | {
1828
- data: {
1829
- type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive";
1830
- id: string;
1831
- from: {
1832
- address: string;
1833
- asset: {
1834
- unit: string;
1835
- type: `${string}:${string}/${string}:${string}`;
1836
- amount: string;
1837
- fungible: true;
1838
- } | {
1839
- id: `${string}:${string}/${string}:${string}/${string}`;
1840
- fungible: false;
1841
- } | null;
1842
- }[];
1843
- events: {
1844
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
1845
- timestamp: number | null;
1846
- }[];
1847
- chain: `${string}:${string}`;
1848
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
1849
- account: string;
1850
- timestamp: number | null;
1851
- to: {
1852
- address: string;
1853
- asset: {
1854
- unit: string;
1855
- type: `${string}:${string}/${string}:${string}`;
1856
- amount: string;
1857
- fungible: true;
1858
- } | {
1859
- id: `${string}:${string}/${string}:${string}/${string}`;
1860
- fungible: false;
1861
- } | null;
1862
- }[];
1863
- fees: {
1864
- type: "base" | "priority";
1865
- asset: {
1866
- unit: string;
1867
- type: `${string}:${string}/${string}:${string}`;
1868
- amount: string;
1869
- fungible: true;
1870
- } | {
1871
- id: `${string}:${string}/${string}:${string}/${string}`;
1872
- fungible: false;
1873
- };
1874
- }[];
1875
- }[];
1876
- next: string | null;
1877
- } | {
1878
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1879
- id: string;
1880
- options: Record<string, import("@metamask/utils").Json> & {
1881
- entropy?: {
1882
- type: "mnemonic";
1883
- id: string;
1884
- derivationPath: string;
1885
- groupIndex: number;
1886
- } | {
1887
- type: "private-key";
1888
- };
1889
- exportable?: boolean;
1890
- };
1891
- address: string;
1892
- scopes: `${string}:${string}`[];
1893
- methods: string[];
1894
- }[] | (`${string}:${string}/${string}:${string}` | `${string}:${string}/${string}:${string}/${string}`)[] | {
1895
- type: "bip44";
1896
- derivationPath: `m/${string}`;
1897
- scopes: `${string}:${string}`[];
1898
- }[] | Record<`${string}:${string}/${string}:${string}`, {
1899
- unit: string;
1900
- amount: string;
1901
- }> | {
1902
- id: string;
1903
- origin: string;
1904
- request: {
1905
- method: string;
1906
- params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1907
- };
1908
- scope: string;
1909
- account: string;
1910
- }[] | {
1911
- address: `${string}:${string}:${string}`;
1912
- } | null;
1913
- } | {
1914
- error: string;
1915
- }, null>>;
1916
- export type BatchResponse = Infer<typeof BatchResponseStruct>;
1917
- export type BatchResponseOne = BatchResponse[number];
1918
1025
  //# sourceMappingURL=rpc.d.cts.map