eip-1193 0.7.0 → 0.7.2
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/index.d.ts +23 -0
- package/package.json +10 -1
package/index.d.ts
CHANGED
|
@@ -1110,6 +1110,23 @@ export type Methods = WalletMethods;
|
|
|
1110
1110
|
*/
|
|
1111
1111
|
export type HttpNodeMethods = Omit<NodeMethods, keyof SubscriptionMethods>;
|
|
1112
1112
|
|
|
1113
|
+
/**
|
|
1114
|
+
* The core every provider here serves: a browser wallet, a JSON-RPC node and a plain HTTP node.
|
|
1115
|
+
* The other sets are this core plus extras: {@link WalletMethods} adds subscriptions and the
|
|
1116
|
+
* `wallet_*` namespace, {@link NodeMethods} adds subscriptions, node introspection and the legacy
|
|
1117
|
+
* methods, and {@link HttpNodeMethods} is the node set without subscriptions.
|
|
1118
|
+
*
|
|
1119
|
+
* Use it to type a PARAMETER: code that only reads chain state, signs and broadcasts can then
|
|
1120
|
+
* accept whichever kind of provider the caller holds. Typing the parameter as the wallet surface
|
|
1121
|
+
* would reject a node provider (and the reverse), although the code needs neither side's extras.
|
|
1122
|
+
*/
|
|
1123
|
+
export type CoreMethods = ClientMethods &
|
|
1124
|
+
ReadMethods &
|
|
1125
|
+
FilterMethods &
|
|
1126
|
+
WriteMethods &
|
|
1127
|
+
SignerMethods &
|
|
1128
|
+
ConnectedAccountMethods;
|
|
1129
|
+
|
|
1113
1130
|
/** Every method in this file, node and wallet and debug. Permissive; prefer a narrower set. */
|
|
1114
1131
|
export type AllMethods = NodeMethods & WalletMethods & DebugOnlyMethods;
|
|
1115
1132
|
|
|
@@ -1221,6 +1238,12 @@ export type EIP1193NodeProvider = RequestRPC<NodeMethods>;
|
|
|
1221
1238
|
/** A node reached over plain HTTP, where `eth_subscribe` cannot work. */
|
|
1222
1239
|
export type EIP1193HttpNodeProvider = RequestRPC<HttpNodeMethods>;
|
|
1223
1240
|
|
|
1241
|
+
/**
|
|
1242
|
+
* Accepts a wallet, a node or an HTTP node provider: see {@link CoreMethods}. Prefer it for a
|
|
1243
|
+
* parameter whose code only needs the methods all of them serve.
|
|
1244
|
+
*/
|
|
1245
|
+
export type EIP1193CoreProvider = RequestRPC<CoreMethods>;
|
|
1246
|
+
|
|
1224
1247
|
/** Just the key-holding methods. */
|
|
1225
1248
|
export type EIP1193SignerProvider = RequestRPC<SignerMethods>;
|
|
1226
1249
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eip-1193",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Types for EIP-1193 ethereum provider",
|
|
5
5
|
"keywords": ["ethereum", "eip-1193"],
|
|
6
6
|
"author": "Ronan Sandford",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/jolly-roger-eth/eip-1193.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/jolly-roger-eth/eip-1193#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/jolly-roger-eth/eip-1193/issues"
|
|
15
|
+
},
|
|
8
16
|
"types": "index.d.ts",
|
|
9
17
|
"files": ["index.d.ts"],
|
|
18
|
+
"packageManager": "pnpm@11.25.0",
|
|
10
19
|
"scripts": {
|
|
11
20
|
"test": "tsc -p test-d/tsconfig.json",
|
|
12
21
|
"format": "prettier --write ."
|