@getpara/wagmi-v2-connector 2.0.0-dev.4 → 2.0.0-dev.6
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/ParaEIP1193Provider.js +268 -0
- package/dist/chunk-IV3L3JVM.js +46 -0
- package/dist/index.js +2 -359
- package/dist/package.json +4 -0
- package/dist/paraConnector.d.ts +156 -1830
- package/dist/paraConnector.js +60 -0
- package/package.json +20 -20
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async,
|
|
4
|
+
__spreadProps,
|
|
5
|
+
__spreadValues
|
|
6
|
+
} from "./chunk-IV3L3JVM.js";
|
|
7
|
+
import { injected } from "wagmi/connectors";
|
|
8
|
+
import { ParaEIP1193Provider } from "./ParaEIP1193Provider.js";
|
|
9
|
+
import { createConnector } from "wagmi";
|
|
10
|
+
const PARA_ID = "para";
|
|
11
|
+
const PARA_NAME = "Para";
|
|
12
|
+
const PARA_ICON = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjE2IiBoZWlnaHQ9IjIwNCIgdmlld0JveD0iMCAwIDIxNiAyMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02MCAwSDE0NEMxODMuNzY0IDAgMjE2IDMyLjIzNTUgMjE2IDcyQzIxNiAxMTEuNzY1IDE4My43NjQgMTQ0IDE0NCAxNDRIOTZDODIuNzQ1MiAxNDQgNzIgMTU0Ljc0NSA3MiAxNjhWMjA0SDBWMTMySDM2QzQ5LjI1NDggMTMyIDYwIDEyMS4yNTUgNjAgMTA4TDYwIDBaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K";
|
|
13
|
+
const createParaConnector = ({
|
|
14
|
+
para,
|
|
15
|
+
chains: _chains,
|
|
16
|
+
disableModal,
|
|
17
|
+
storageOverride,
|
|
18
|
+
options,
|
|
19
|
+
iconOverride,
|
|
20
|
+
nameOverride,
|
|
21
|
+
idOverride,
|
|
22
|
+
transports,
|
|
23
|
+
renderModal
|
|
24
|
+
}) => {
|
|
25
|
+
return createConnector((config) => {
|
|
26
|
+
const chains = [...config.chains];
|
|
27
|
+
const eip1193Provider = new ParaEIP1193Provider({
|
|
28
|
+
para,
|
|
29
|
+
chainId: `${chains[0].id}`,
|
|
30
|
+
chains,
|
|
31
|
+
disableModal,
|
|
32
|
+
storageOverride,
|
|
33
|
+
transports: transports || config.transports,
|
|
34
|
+
renderModal
|
|
35
|
+
});
|
|
36
|
+
const injectedObj = injected(__spreadValues({
|
|
37
|
+
target: {
|
|
38
|
+
name: PARA_NAME,
|
|
39
|
+
id: idOverride != null ? idOverride : PARA_ID,
|
|
40
|
+
provider: eip1193Provider
|
|
41
|
+
}
|
|
42
|
+
}, options))(config);
|
|
43
|
+
return __spreadProps(__spreadValues({}, injectedObj), {
|
|
44
|
+
type: idOverride != null ? idOverride : PARA_ID,
|
|
45
|
+
name: nameOverride != null ? nameOverride : PARA_NAME,
|
|
46
|
+
icon: iconOverride != null ? iconOverride : PARA_ICON,
|
|
47
|
+
disconnect: () => __async(void 0, null, function* () {
|
|
48
|
+
eip1193Provider.closeModal();
|
|
49
|
+
yield injectedObj.disconnect();
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const paraConnector = (opts) => {
|
|
55
|
+
return createParaConnector(opts);
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
createParaConnector,
|
|
59
|
+
paraConnector
|
|
60
|
+
};
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/wagmi-v2-connector",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"sideEffects": false,
|
|
3
|
+
"version": "2.0.0-dev.6",
|
|
8
4
|
"dependencies": {
|
|
9
|
-
"@getpara/
|
|
10
|
-
"@getpara/
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs",
|
|
14
|
-
"typegen": "tsc --emitDeclarationOnly"
|
|
5
|
+
"@getpara/viem-v2-integration": "2.0.0-dev.6",
|
|
6
|
+
"@getpara/web-sdk": "2.0.0-dev.6"
|
|
15
7
|
},
|
|
16
8
|
"devDependencies": {
|
|
17
|
-
"typescript": "5.
|
|
18
|
-
"viem": "2.
|
|
19
|
-
"wagmi": "2.
|
|
9
|
+
"typescript": "^5.8.3",
|
|
10
|
+
"viem": "^2.24.2",
|
|
11
|
+
"wagmi": "^2.14.16"
|
|
20
12
|
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"package.json"
|
|
16
|
+
],
|
|
17
|
+
"gitHead": "c2125e37c73a19f11978031f5aa2eab39b978c56",
|
|
18
|
+
"main": "dist/index.js",
|
|
21
19
|
"peerDependencies": {
|
|
22
20
|
"react": "*",
|
|
23
21
|
"react-dom": "*",
|
|
24
22
|
"viem": "2.x",
|
|
25
|
-
"wagmi": "2.
|
|
23
|
+
"wagmi": "^2.9.0"
|
|
26
24
|
},
|
|
27
|
-
"
|
|
28
|
-
"dist",
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
"
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs",
|
|
27
|
+
"typegen": "tsc --emitDeclarationOnly"
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"type": "module",
|
|
31
|
+
"types": "dist/index.d.ts"
|
|
32
32
|
}
|
package/dist/index.js.br
DELETED
|
Binary file
|
package/dist/index.js.gz
DELETED
|
Binary file
|