@metamask-previews/controller-utils 11.2.0-preview-cf09c0a → 11.2.0-preview-09a2ffd5

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.
Files changed (88) hide show
  1. package/dist/chunk-DBJSLKNR.js +9 -0
  2. package/dist/chunk-DBJSLKNR.js.map +1 -0
  3. package/dist/chunk-HL2W4XJY.js +147 -0
  4. package/dist/chunk-HL2W4XJY.js.map +1 -0
  5. package/dist/chunk-IPGJBD5N.mjs +306 -0
  6. package/dist/chunk-IPGJBD5N.mjs.map +1 -0
  7. package/dist/chunk-M6G3ISXG.js +86 -0
  8. package/dist/chunk-M6G3ISXG.js.map +1 -0
  9. package/dist/chunk-OA7K6K6E.js +85 -0
  10. package/dist/chunk-OA7K6K6E.js.map +1 -0
  11. package/dist/chunk-QZDAFEVW.mjs +147 -0
  12. package/dist/chunk-QZDAFEVW.mjs.map +1 -0
  13. package/dist/chunk-RZFCNKW4.mjs +9 -0
  14. package/dist/chunk-RZFCNKW4.mjs.map +1 -0
  15. package/dist/chunk-UQHQI6IV.mjs +85 -0
  16. package/dist/chunk-UQHQI6IV.mjs.map +1 -0
  17. package/dist/chunk-VDEIYYE4.mjs +86 -0
  18. package/dist/chunk-VDEIYYE4.mjs.map +1 -0
  19. package/dist/chunk-YIBQE73N.js +306 -0
  20. package/dist/chunk-YIBQE73N.js.map +1 -0
  21. package/dist/constants.js +56 -0
  22. package/dist/constants.js.map +1 -0
  23. package/dist/constants.mjs +54 -133
  24. package/dist/constants.mjs.map +1 -1
  25. package/dist/index.js +138 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/index.mjs +137 -4
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/logger.js +9 -0
  30. package/dist/logger.js.map +1 -0
  31. package/dist/logger.mjs +8 -3
  32. package/dist/logger.mjs.map +1 -1
  33. package/dist/siwe.js +12 -0
  34. package/dist/siwe.js.map +1 -0
  35. package/dist/siwe.mjs +10 -120
  36. package/dist/siwe.mjs.map +1 -1
  37. package/dist/tsconfig.build.tsbuildinfo +1 -0
  38. package/dist/{constants.d.mts → types/constants.d.ts} +2 -2
  39. package/dist/types/constants.d.ts.map +1 -0
  40. package/dist/{index.d.cts → types/index.d.ts} +6 -6
  41. package/dist/types/index.d.ts.map +1 -0
  42. package/dist/{logger.d.cts → types/logger.d.ts} +2 -2
  43. package/dist/types/logger.d.ts.map +1 -0
  44. package/dist/{siwe.d.mts → types/siwe.d.ts} +2 -2
  45. package/dist/types/siwe.d.ts.map +1 -0
  46. package/dist/{types.d.cts → types/types.d.ts} +1 -29
  47. package/dist/types/types.d.ts.map +1 -0
  48. package/dist/{util.d.cts → types/util.d.ts} +4 -4
  49. package/dist/types/util.d.ts.map +1 -0
  50. package/dist/types.js +23 -0
  51. package/dist/types.js.map +1 -0
  52. package/dist/types.mjs +21 -100
  53. package/dist/types.mjs.map +1 -1
  54. package/dist/util.js +61 -0
  55. package/dist/util.js.map +1 -0
  56. package/dist/util.mjs +59 -488
  57. package/dist/util.mjs.map +1 -1
  58. package/package.json +7 -12
  59. package/dist/constants.cjs +0 -138
  60. package/dist/constants.cjs.map +0 -1
  61. package/dist/constants.d.cts +0 -117
  62. package/dist/constants.d.cts.map +0 -1
  63. package/dist/constants.d.mts.map +0 -1
  64. package/dist/index.cjs +0 -48
  65. package/dist/index.cjs.map +0 -1
  66. package/dist/index.d.cts.map +0 -1
  67. package/dist/index.d.mts +0 -6
  68. package/dist/index.d.mts.map +0 -1
  69. package/dist/logger.cjs +0 -7
  70. package/dist/logger.cjs.map +0 -1
  71. package/dist/logger.d.cts.map +0 -1
  72. package/dist/logger.d.mts +0 -5
  73. package/dist/logger.d.mts.map +0 -1
  74. package/dist/siwe.cjs +0 -128
  75. package/dist/siwe.cjs.map +0 -1
  76. package/dist/siwe.d.cts +0 -68
  77. package/dist/siwe.d.cts.map +0 -1
  78. package/dist/siwe.d.mts.map +0 -1
  79. package/dist/types.cjs +0 -107
  80. package/dist/types.cjs.map +0 -1
  81. package/dist/types.d.cts.map +0 -1
  82. package/dist/types.d.mts +0 -132
  83. package/dist/types.d.mts.map +0 -1
  84. package/dist/util.cjs +0 -512
  85. package/dist/util.cjs.map +0 -1
  86. package/dist/util.d.cts.map +0 -1
  87. package/dist/util.d.mts +0 -243
  88. package/dist/util.d.mts.map +0 -1
package/dist/types.cjs DELETED
@@ -1,107 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NetworkNickname = exports.BlockExplorerUrl = exports.NetworksTicker = exports.ChainId = exports.BuiltInNetworkName = exports.isInfuraNetworkType = exports.isNetworkType = exports.NetworkType = exports.InfuraNetworkType = void 0;
4
- /**
5
- * The names of built-in Infura networks
6
- */
7
- exports.InfuraNetworkType = {
8
- mainnet: 'mainnet',
9
- goerli: 'goerli',
10
- sepolia: 'sepolia',
11
- 'linea-goerli': 'linea-goerli',
12
- 'linea-sepolia': 'linea-sepolia',
13
- 'linea-mainnet': 'linea-mainnet',
14
- };
15
- /**
16
- * The "network type"; either the name of a built-in network, or "rpc" for custom networks.
17
- */
18
- exports.NetworkType = {
19
- ...exports.InfuraNetworkType,
20
- rpc: 'rpc',
21
- };
22
- /**
23
- * A helper to determine whether a given input is NetworkType.
24
- *
25
- * @param val - the value to check whether it is NetworkType or not.
26
- * @returns boolean indicating whether or not the argument is NetworkType.
27
- */
28
- function isNetworkType(val) {
29
- return Object.values(exports.NetworkType).includes(val);
30
- }
31
- exports.isNetworkType = isNetworkType;
32
- /**
33
- * A type guard to determine whether the input is an InfuraNetworkType.
34
- *
35
- * @param value - The value to check.
36
- * @returns True if the given value is within the InfuraNetworkType enum,
37
- * false otherwise.
38
- */
39
- function isInfuraNetworkType(value) {
40
- const infuraNetworkTypes = Object.keys(exports.InfuraNetworkType);
41
- return infuraNetworkTypes.includes(value);
42
- }
43
- exports.isInfuraNetworkType = isInfuraNetworkType;
44
- /**
45
- * Names of networks built into the wallet.
46
- *
47
- * This includes both Infura and non-Infura networks.
48
- */
49
- var BuiltInNetworkName;
50
- (function (BuiltInNetworkName) {
51
- BuiltInNetworkName["Mainnet"] = "mainnet";
52
- BuiltInNetworkName["Goerli"] = "goerli";
53
- BuiltInNetworkName["Sepolia"] = "sepolia";
54
- BuiltInNetworkName["LineaGoerli"] = "linea-goerli";
55
- BuiltInNetworkName["LineaSepolia"] = "linea-sepolia";
56
- BuiltInNetworkName["LineaMainnet"] = "linea-mainnet";
57
- BuiltInNetworkName["Aurora"] = "aurora";
58
- })(BuiltInNetworkName || (exports.BuiltInNetworkName = BuiltInNetworkName = {}));
59
- /**
60
- * Decimal string chain IDs of built-in networks, by name.
61
- *
62
- * `toHex` not invoked to avoid cyclic dependency
63
- */
64
- exports.ChainId = {
65
- [BuiltInNetworkName.Mainnet]: '0x1',
66
- [BuiltInNetworkName.Goerli]: '0x5',
67
- [BuiltInNetworkName.Sepolia]: '0xaa36a7',
68
- [BuiltInNetworkName.Aurora]: '0x4e454152',
69
- [BuiltInNetworkName.LineaGoerli]: '0xe704',
70
- [BuiltInNetworkName.LineaSepolia]: '0xe705',
71
- [BuiltInNetworkName.LineaMainnet]: '0xe708', // toHex(59144)
72
- };
73
- var NetworksTicker;
74
- (function (NetworksTicker) {
75
- // TODO: Either fix this lint violation or explain why it's necessary to ignore.
76
- // eslint-disable-next-line @typescript-eslint/naming-convention
77
- NetworksTicker["mainnet"] = "ETH";
78
- // TODO: Either fix this lint violation or explain why it's necessary to ignore.
79
- // eslint-disable-next-line @typescript-eslint/naming-convention
80
- NetworksTicker["goerli"] = "GoerliETH";
81
- // TODO: Either fix this lint violation or explain why it's necessary to ignore.
82
- // eslint-disable-next-line @typescript-eslint/naming-convention
83
- NetworksTicker["sepolia"] = "SepoliaETH";
84
- NetworksTicker["linea-goerli"] = "LineaETH";
85
- NetworksTicker["linea-sepolia"] = "LineaETH";
86
- NetworksTicker["linea-mainnet"] = "ETH";
87
- // TODO: Either fix this lint violation or explain why it's necessary to ignore.
88
- // eslint-disable-next-line @typescript-eslint/naming-convention
89
- NetworksTicker["rpc"] = "";
90
- })(NetworksTicker || (exports.NetworksTicker = NetworksTicker = {}));
91
- exports.BlockExplorerUrl = {
92
- [BuiltInNetworkName.Mainnet]: 'https://etherscan.io',
93
- [BuiltInNetworkName.Goerli]: 'https://goerli.etherscan.io',
94
- [BuiltInNetworkName.Sepolia]: 'https://sepolia.etherscan.io',
95
- [BuiltInNetworkName.LineaGoerli]: 'https://goerli.lineascan.build',
96
- [BuiltInNetworkName.LineaSepolia]: 'https://sepolia.lineascan.build',
97
- [BuiltInNetworkName.LineaMainnet]: 'https://lineascan.build',
98
- };
99
- exports.NetworkNickname = {
100
- [BuiltInNetworkName.Mainnet]: 'Mainnet',
101
- [BuiltInNetworkName.Goerli]: 'Goerli',
102
- [BuiltInNetworkName.Sepolia]: 'Sepolia',
103
- [BuiltInNetworkName.LineaGoerli]: 'Linea Goerli',
104
- [BuiltInNetworkName.LineaSepolia]: 'Linea Sepolia',
105
- [BuiltInNetworkName.LineaMainnet]: 'Linea Mainnet',
106
- };
107
- //# sourceMappingURL=types.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,cAAc;IAC9B,eAAe,EAAE,eAAe;IAChC,eAAe,EAAE,eAAe;CACxB,CAAC;AAKX;;GAEG;AACU,QAAA,WAAW,GAAG;IACzB,GAAG,yBAAiB;IACpB,GAAG,EAAE,KAAK;CACF,CAAC;AAIX;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,GAAW;IACvC,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAW,CAAC,CAAC,QAAQ,CAAC,GAAkB,CAAC,CAAC;AACjE,CAAC;AAFD,sCAEC;AAED;;;;;;GAM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C9B,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,sBAAsB;IACpD,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,6BAA6B;IAC1D,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,8BAA8B;IAC5D,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,gCAAgC;IAClE,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,iCAAiC;IACpE,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,yBAAyB;CACR,CAAC;AAI1C,QAAA,eAAe,GAAG;IAC7B,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS;IACvC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,QAAQ;IACrC,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS;IACvC,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,cAAc;IAChD,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,eAAe;IAClD,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,eAAe;CACE,CAAC","sourcesContent":["/**\n * The names of built-in Infura networks\n */\nexport const InfuraNetworkType = {\n mainnet: 'mainnet',\n goerli: 'goerli',\n sepolia: 'sepolia',\n 'linea-goerli': 'linea-goerli',\n 'linea-sepolia': 'linea-sepolia',\n 'linea-mainnet': 'linea-mainnet',\n} as const;\n\nexport type InfuraNetworkType =\n (typeof InfuraNetworkType)[keyof typeof InfuraNetworkType];\n\n/**\n * The \"network type\"; either the name of a built-in network, or \"rpc\" for custom networks.\n */\nexport const NetworkType = {\n ...InfuraNetworkType,\n rpc: 'rpc',\n} as const;\n\nexport type NetworkType = (typeof NetworkType)[keyof typeof NetworkType];\n\n/**\n * A helper to determine whether a given input is NetworkType.\n *\n * @param val - the value to check whether it is NetworkType or not.\n * @returns boolean indicating whether or not the argument is NetworkType.\n */\nexport function isNetworkType(val: string): val is NetworkType {\n return Object.values(NetworkType).includes(val as NetworkType);\n}\n\n/**\n * A type guard to determine whether the input is an InfuraNetworkType.\n *\n * @param value - The value to check.\n * @returns True if the given value is within the InfuraNetworkType enum,\n * false otherwise.\n */\nexport function isInfuraNetworkType(\n value: unknown,\n): value is InfuraNetworkType {\n const infuraNetworkTypes: unknown[] = Object.keys(InfuraNetworkType);\n return infuraNetworkTypes.includes(value);\n}\n\n/**\n * Names of networks built into the wallet.\n *\n * This includes both Infura and non-Infura networks.\n */\nexport enum BuiltInNetworkName {\n Mainnet = 'mainnet',\n Goerli = 'goerli',\n Sepolia = 'sepolia',\n LineaGoerli = 'linea-goerli',\n LineaSepolia = 'linea-sepolia',\n LineaMainnet = 'linea-mainnet',\n Aurora = 'aurora',\n}\n\n/**\n * Decimal string chain IDs of built-in networks, by name.\n *\n * `toHex` not invoked to avoid cyclic dependency\n */\nexport const ChainId = {\n [BuiltInNetworkName.Mainnet]: '0x1', // toHex(1)\n [BuiltInNetworkName.Goerli]: '0x5', // toHex(5)\n [BuiltInNetworkName.Sepolia]: '0xaa36a7', // toHex(11155111)\n [BuiltInNetworkName.Aurora]: '0x4e454152', // toHex(1313161554)\n [BuiltInNetworkName.LineaGoerli]: '0xe704', // toHex(59140)\n [BuiltInNetworkName.LineaSepolia]: '0xe705', // toHex(59141)\n [BuiltInNetworkName.LineaMainnet]: '0xe708', // toHex(59144)\n} as const;\nexport type ChainId = (typeof ChainId)[keyof typeof ChainId];\n\nexport enum NetworksTicker {\n // TODO: Either fix this lint violation or explain why it's necessary to ignore.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n mainnet = 'ETH',\n // TODO: Either fix this lint violation or explain why it's necessary to ignore.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n goerli = 'GoerliETH',\n // TODO: Either fix this lint violation or explain why it's necessary to ignore.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n sepolia = 'SepoliaETH',\n 'linea-goerli' = 'LineaETH',\n 'linea-sepolia' = 'LineaETH',\n 'linea-mainnet' = 'ETH',\n // TODO: Either fix this lint violation or explain why it's necessary to ignore.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n rpc = '',\n}\n\nexport const BlockExplorerUrl = {\n [BuiltInNetworkName.Mainnet]: 'https://etherscan.io',\n [BuiltInNetworkName.Goerli]: 'https://goerli.etherscan.io',\n [BuiltInNetworkName.Sepolia]: 'https://sepolia.etherscan.io',\n [BuiltInNetworkName.LineaGoerli]: 'https://goerli.lineascan.build',\n [BuiltInNetworkName.LineaSepolia]: 'https://sepolia.lineascan.build',\n [BuiltInNetworkName.LineaMainnet]: 'https://lineascan.build',\n} as const satisfies Record<InfuraNetworkType, string>;\nexport type BlockExplorerUrl =\n (typeof BlockExplorerUrl)[keyof typeof BlockExplorerUrl];\n\nexport const NetworkNickname = {\n [BuiltInNetworkName.Mainnet]: 'Mainnet',\n [BuiltInNetworkName.Goerli]: 'Goerli',\n [BuiltInNetworkName.Sepolia]: 'Sepolia',\n [BuiltInNetworkName.LineaGoerli]: 'Linea Goerli',\n [BuiltInNetworkName.LineaSepolia]: 'Linea Sepolia',\n [BuiltInNetworkName.LineaMainnet]: 'Linea Mainnet',\n} as const satisfies Record<InfuraNetworkType, string>;\nexport type NetworkNickname =\n (typeof NetworkNickname)[keyof typeof NetworkNickname];\n\n/**\n * Makes a selection of keys in a Record optional.\n *\n * @template Type - The Record that you want to operate on.\n * @template Key - The union of keys you want to make optional.\n */\n// TODO: Move to @metamask/utils\nexport type Partialize<Type, Key extends keyof Type> = Omit<Type, Key> &\n Partial<Pick<Type, Key>>;\n\n/** A context in which to execute a trace, in order to generate nested timings. */\nexport type TraceContext = unknown;\n\n/** Request to trace an operation. */\nexport type TraceRequest = {\n /** Additional data to include in the trace. */\n data?: Record<string, number | string | boolean>;\n\n /** Name of the operation. */\n name: string;\n\n /**\n * Unique identifier for the trace.\n * Required if starting a trace and not providing a callback.\n */\n id?: string;\n\n /** Trace context in which to execute the operation. */\n parentContext?: TraceContext;\n\n /** Additional tags to include in the trace to filter results. */\n tags?: Record<string, number | string | boolean>;\n};\n\n/** Callback that traces the performance of an operation. */\nexport type TraceCallback = <ReturnType>(\n /** Request to trace the performance of an operation. */\n request: TraceRequest,\n\n /**\n * Callback to trace.\n * Thrown errors will not be caught, but the trace will still be recorded.\n * @param context - The context in which the operation is running.\n */\n fn?: (context?: TraceContext) => ReturnType,\n) => Promise<ReturnType>;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;CAGd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,WAAW,CAE7D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,iBAAiB,CAG5B;AAED;;;;GAIG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;;;;;;CAQV,CAAC;AACX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAE7D,oBAAY,cAAc;IAGxB,OAAO,QAAQ;IAGf,MAAM,cAAc;IAGpB,OAAO,eAAe;IACtB,cAAc,aAAa;IAC3B,eAAe,aAAa;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1,132 +0,0 @@
1
- /**
2
- * The names of built-in Infura networks
3
- */
4
- export declare const InfuraNetworkType: {
5
- readonly mainnet: "mainnet";
6
- readonly goerli: "goerli";
7
- readonly sepolia: "sepolia";
8
- readonly 'linea-goerli': "linea-goerli";
9
- readonly 'linea-sepolia': "linea-sepolia";
10
- readonly 'linea-mainnet': "linea-mainnet";
11
- };
12
- export type InfuraNetworkType = (typeof InfuraNetworkType)[keyof typeof InfuraNetworkType];
13
- /**
14
- * The "network type"; either the name of a built-in network, or "rpc" for custom networks.
15
- */
16
- export declare const NetworkType: {
17
- readonly rpc: "rpc";
18
- readonly mainnet: "mainnet";
19
- readonly goerli: "goerli";
20
- readonly sepolia: "sepolia";
21
- readonly 'linea-goerli': "linea-goerli";
22
- readonly 'linea-sepolia': "linea-sepolia";
23
- readonly 'linea-mainnet': "linea-mainnet";
24
- };
25
- export type NetworkType = (typeof NetworkType)[keyof typeof NetworkType];
26
- /**
27
- * A helper to determine whether a given input is NetworkType.
28
- *
29
- * @param val - the value to check whether it is NetworkType or not.
30
- * @returns boolean indicating whether or not the argument is NetworkType.
31
- */
32
- export declare function isNetworkType(val: string): val is NetworkType;
33
- /**
34
- * A type guard to determine whether the input is an InfuraNetworkType.
35
- *
36
- * @param value - The value to check.
37
- * @returns True if the given value is within the InfuraNetworkType enum,
38
- * false otherwise.
39
- */
40
- export declare function isInfuraNetworkType(value: unknown): value is InfuraNetworkType;
41
- /**
42
- * Names of networks built into the wallet.
43
- *
44
- * This includes both Infura and non-Infura networks.
45
- */
46
- export declare enum BuiltInNetworkName {
47
- Mainnet = "mainnet",
48
- Goerli = "goerli",
49
- Sepolia = "sepolia",
50
- LineaGoerli = "linea-goerli",
51
- LineaSepolia = "linea-sepolia",
52
- LineaMainnet = "linea-mainnet",
53
- Aurora = "aurora"
54
- }
55
- /**
56
- * Decimal string chain IDs of built-in networks, by name.
57
- *
58
- * `toHex` not invoked to avoid cyclic dependency
59
- */
60
- export declare const ChainId: {
61
- readonly mainnet: "0x1";
62
- readonly goerli: "0x5";
63
- readonly sepolia: "0xaa36a7";
64
- readonly aurora: "0x4e454152";
65
- readonly "linea-goerli": "0xe704";
66
- readonly "linea-sepolia": "0xe705";
67
- readonly "linea-mainnet": "0xe708";
68
- };
69
- export type ChainId = (typeof ChainId)[keyof typeof ChainId];
70
- export declare enum NetworksTicker {
71
- mainnet = "ETH",
72
- goerli = "GoerliETH",
73
- sepolia = "SepoliaETH",
74
- 'linea-goerli' = "LineaETH",
75
- 'linea-sepolia' = "LineaETH",
76
- 'linea-mainnet' = "ETH",
77
- rpc = ""
78
- }
79
- export declare const BlockExplorerUrl: {
80
- readonly mainnet: "https://etherscan.io";
81
- readonly goerli: "https://goerli.etherscan.io";
82
- readonly sepolia: "https://sepolia.etherscan.io";
83
- readonly "linea-goerli": "https://goerli.lineascan.build";
84
- readonly "linea-sepolia": "https://sepolia.lineascan.build";
85
- readonly "linea-mainnet": "https://lineascan.build";
86
- };
87
- export type BlockExplorerUrl = (typeof BlockExplorerUrl)[keyof typeof BlockExplorerUrl];
88
- export declare const NetworkNickname: {
89
- readonly mainnet: "Mainnet";
90
- readonly goerli: "Goerli";
91
- readonly sepolia: "Sepolia";
92
- readonly "linea-goerli": "Linea Goerli";
93
- readonly "linea-sepolia": "Linea Sepolia";
94
- readonly "linea-mainnet": "Linea Mainnet";
95
- };
96
- export type NetworkNickname = (typeof NetworkNickname)[keyof typeof NetworkNickname];
97
- /**
98
- * Makes a selection of keys in a Record optional.
99
- *
100
- * @template Type - The Record that you want to operate on.
101
- * @template Key - The union of keys you want to make optional.
102
- */
103
- export type Partialize<Type, Key extends keyof Type> = Omit<Type, Key> & Partial<Pick<Type, Key>>;
104
- /** A context in which to execute a trace, in order to generate nested timings. */
105
- export type TraceContext = unknown;
106
- /** Request to trace an operation. */
107
- export type TraceRequest = {
108
- /** Additional data to include in the trace. */
109
- data?: Record<string, number | string | boolean>;
110
- /** Name of the operation. */
111
- name: string;
112
- /**
113
- * Unique identifier for the trace.
114
- * Required if starting a trace and not providing a callback.
115
- */
116
- id?: string;
117
- /** Trace context in which to execute the operation. */
118
- parentContext?: TraceContext;
119
- /** Additional tags to include in the trace to filter results. */
120
- tags?: Record<string, number | string | boolean>;
121
- };
122
- /** Callback that traces the performance of an operation. */
123
- export type TraceCallback = <ReturnType>(
124
- /** Request to trace the performance of an operation. */
125
- request: TraceRequest,
126
- /**
127
- * Callback to trace.
128
- * Thrown errors will not be caught, but the trace will still be recorded.
129
- * @param context - The context in which the operation is running.
130
- */
131
- fn?: (context?: TraceContext) => ReturnType) => Promise<ReturnType>;
132
- //# sourceMappingURL=types.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;CAGd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,WAAW,CAE7D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,iBAAiB,CAG5B;AAED;;;;GAIG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;;;;;;CAQV,CAAC;AACX,MAAM,MAAM,OAAO,GA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