@qorechain/qorex-rainbowkit 0.0.0-stage → 0.1.0
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/LICENSE +201 -0
- package/README.md +47 -2
- package/dist/index.cjs +177 -0
- package/dist/index.d.cts +251 -0
- package/dist/index.d.ts +251 -0
- package/dist/index.js +177 -0
- package/package.json +74 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work, excluding
|
|
103
|
+
those notices that do not pertain to any part of the Derivative
|
|
104
|
+
Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one of
|
|
111
|
+
the following places: within a NOTICE text file distributed as
|
|
112
|
+
part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and do
|
|
117
|
+
not modify the License. You may add Your own attribution notices
|
|
118
|
+
within Derivative Works that You distribute, alongside or as an
|
|
119
|
+
addendum to the NOTICE text from the Work, provided that such
|
|
120
|
+
additional attribution notices cannot be construed as modifying
|
|
121
|
+
the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 QoreChain Association
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @qorechain/qorex-rainbowkit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
QoreX as a RainbowKit wallet, plus viem chain definitions for the QoreChain EVM lane.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @qorechain/qorex-rainbowkit @rainbow-me/rainbowkit wagmi viem @tanstack/react-query
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { connectorsForWallets } from "@rainbow-me/rainbowkit";
|
|
11
|
+
import { metaMaskWallet } from "@rainbow-me/rainbowkit/wallets";
|
|
12
|
+
import { createConfig, http } from "wagmi";
|
|
13
|
+
import { QOREX_CHAINS, qorechain, qorechainTestnet, qorexWallet } from "@qorechain/qorex-rainbowkit";
|
|
14
|
+
|
|
15
|
+
const connectors = connectorsForWallets(
|
|
16
|
+
[{ groupName: "Recommended", wallets: [qorexWallet, metaMaskWallet] }],
|
|
17
|
+
{ appName: "My dApp", projectId: "<walletconnect project id>" },
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const config = createConfig({
|
|
21
|
+
chains: QOREX_CHAINS,
|
|
22
|
+
connectors,
|
|
23
|
+
transports: { [qorechain.id]: http(), [qorechainTestnet.id]: http() },
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- `qorexWallet()` returns a RainbowKit `Wallet` (id `qorex`, rdns `network.qore.qorex`). Its connector is wagmi's injected connector pinned to the provider QoreX announces through EIP-6963; it never falls back to `window.ethereum`. When QoreX is not installed, RainbowKit shows the store links.
|
|
28
|
+
- `QOREX_CHAINS` is `[qorechain, qorechainTestnet]`: EVM chain ids 9801 and 9800, RPC `https://evm.qore.host` and `https://evm-testnet.qore.host`, native currency QOR with 18 decimals, explorer `https://explore.qore.network`.
|
|
29
|
+
|
|
30
|
+
## Account and network changes
|
|
31
|
+
|
|
32
|
+
QoreX does not emit `accountsChanged` or `chainChanged` yet, so wagmi does not see a change made in the wallet. Opt in to a re-read when the page regains focus:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
wallets: [() => qorexWallet({ pollAccountsOnFocus: true })]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
While connected, the connector reads `eth_accounts` and `eth_chainId` on `focus` and `visibilitychange` and reports a change to wagmi. An empty account list (wallet locked or site disconnected) disconnects.
|
|
39
|
+
|
|
40
|
+
## What QoreX answers on EVM today
|
|
41
|
+
|
|
42
|
+
`eth_chainId`, `eth_accounts`, `eth_requestAccounts`, and `wallet_switchEthereumChain` for the network selected in QoreX (others reject with code 4902). Signing methods such as `personal_sign`, `eth_signTypedData_v4` and `eth_sendTransaction`, and `wallet_addEthereumChain`, are not supported yet and reject with "QoreX: EVM method ... not yet supported".
|
|
43
|
+
|
|
44
|
+
On QoreChain, an EVM transaction is accepted only when the sender has a registered ML-DSA-87 key and an open EVM authorization window, both set up from the native lane.
|
|
45
|
+
|
|
46
|
+
Guides: <https://github.com/qorechain/qorex-integrations>.
|
|
47
|
+
|
|
48
|
+
Apache-2.0. Copyright 2026 QoreChain Association.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/wallet.ts
|
|
2
|
+
var _wagmi = require('wagmi');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _qorextypes = require('@qorechain/qorex-types');
|
|
9
|
+
var _icon = require('@qorechain/qorex-types/icon');
|
|
10
|
+
var QOREX_ICON_BACKGROUND = "#EEE9FB";
|
|
11
|
+
function getQorexEip1193Provider() {
|
|
12
|
+
const announced = _qorextypes.findQorexEip1193.call(void 0, );
|
|
13
|
+
if (announced) return announced;
|
|
14
|
+
if (typeof window === "undefined") return void 0;
|
|
15
|
+
const evm = _optionalChain([window, 'access', _ => _.qorex, 'optionalAccess', _2 => _2.evm]);
|
|
16
|
+
return evm && evm.isQoreX === true && typeof evm.request === "function" ? evm : void 0;
|
|
17
|
+
}
|
|
18
|
+
function createQorexConnector(walletDetails, options = {}) {
|
|
19
|
+
const { id, name } = walletDetails.rkDetails;
|
|
20
|
+
let cached;
|
|
21
|
+
const provider = () => cached ??= getQorexEip1193Provider();
|
|
22
|
+
return _wagmi.createConnector.call(void 0, (config) => {
|
|
23
|
+
const base = _wagmi.injected.call(void 0, {
|
|
24
|
+
shimDisconnect: true,
|
|
25
|
+
// An object target: wagmi then never substitutes window.ethereum.
|
|
26
|
+
target: { id, name, icon: _icon.QOREX_ICON_DATA_URI, provider }
|
|
27
|
+
})(config);
|
|
28
|
+
let stopPolling;
|
|
29
|
+
const startPolling = (connector2, accounts, chainId) => {
|
|
30
|
+
if (options.pollAccountsOnFocus !== true || typeof window === "undefined") return;
|
|
31
|
+
_optionalChain([stopPolling, 'optionalCall', _3 => _3()]);
|
|
32
|
+
let lastAccounts = accounts.map((a) => a.toLowerCase()).join(",");
|
|
33
|
+
let lastChainId = chainId;
|
|
34
|
+
let running = false;
|
|
35
|
+
const check = async () => {
|
|
36
|
+
if (running) return;
|
|
37
|
+
running = true;
|
|
38
|
+
try {
|
|
39
|
+
const p = provider();
|
|
40
|
+
if (!p) return;
|
|
41
|
+
const nextAccounts = await p.request({ method: "eth_accounts" });
|
|
42
|
+
const nextChainHex = await p.request({ method: "eth_chainId" });
|
|
43
|
+
const accountsKey = nextAccounts.map((a) => a.toLowerCase()).join(",");
|
|
44
|
+
const nextChainId = Number(nextChainHex);
|
|
45
|
+
if (accountsKey !== lastAccounts) {
|
|
46
|
+
lastAccounts = accountsKey;
|
|
47
|
+
connector2.onAccountsChanged(nextAccounts);
|
|
48
|
+
}
|
|
49
|
+
if (Number.isFinite(nextChainId) && nextChainId !== lastChainId) {
|
|
50
|
+
lastChainId = nextChainId;
|
|
51
|
+
connector2.onChainChanged(nextChainHex);
|
|
52
|
+
}
|
|
53
|
+
} catch (e) {
|
|
54
|
+
} finally {
|
|
55
|
+
running = false;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const onFocus = () => void check();
|
|
59
|
+
const onVisibility = () => {
|
|
60
|
+
if (document.visibilityState === "visible") void check();
|
|
61
|
+
};
|
|
62
|
+
window.addEventListener("focus", onFocus);
|
|
63
|
+
document.addEventListener("visibilitychange", onVisibility);
|
|
64
|
+
stopPolling = () => {
|
|
65
|
+
window.removeEventListener("focus", onFocus);
|
|
66
|
+
document.removeEventListener("visibilitychange", onVisibility);
|
|
67
|
+
stopPolling = void 0;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
const connect = async function(parameters) {
|
|
71
|
+
const result = await base.connect.call(this, parameters);
|
|
72
|
+
const accounts = result.accounts.map(
|
|
73
|
+
(a) => typeof a === "string" ? a : a.address
|
|
74
|
+
);
|
|
75
|
+
startPolling(this, accounts, result.chainId);
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
const connector = {
|
|
79
|
+
...base,
|
|
80
|
+
rdns: _qorextypes.QOREX_RDNS,
|
|
81
|
+
connect,
|
|
82
|
+
async disconnect() {
|
|
83
|
+
_optionalChain([stopPolling, 'optionalCall', _4 => _4()]);
|
|
84
|
+
await base.disconnect.call(this);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return { ...connector, ...walletDetails };
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function qorexWallet(options = {}) {
|
|
91
|
+
const connectorOptions = { pollAccountsOnFocus: options.pollAccountsOnFocus === true };
|
|
92
|
+
return {
|
|
93
|
+
id: "qorex",
|
|
94
|
+
name: _qorextypes.QOREX_NAME,
|
|
95
|
+
rdns: _qorextypes.QOREX_RDNS,
|
|
96
|
+
iconUrl: _icon.QOREX_ICON_DATA_URI,
|
|
97
|
+
iconBackground: QOREX_ICON_BACKGROUND,
|
|
98
|
+
installed: typeof window === "undefined" ? void 0 : getQorexEip1193Provider() !== void 0,
|
|
99
|
+
downloadUrls: {
|
|
100
|
+
chrome: _qorextypes.QOREX_DOWNLOAD_URLS.chrome,
|
|
101
|
+
edge: _qorextypes.QOREX_DOWNLOAD_URLS.chrome,
|
|
102
|
+
opera: _qorextypes.QOREX_DOWNLOAD_URLS.chrome,
|
|
103
|
+
firefox: _qorextypes.QOREX_DOWNLOAD_URLS.firefox,
|
|
104
|
+
safari: _qorextypes.QOREX_DOWNLOAD_URLS.safari,
|
|
105
|
+
macos: _qorextypes.QOREX_DOWNLOAD_URLS.safari,
|
|
106
|
+
browserExtension: _qorextypes.QOREX_DOWNLOAD_URLS.chrome,
|
|
107
|
+
ios: _qorextypes.QOREX_DOWNLOAD_URLS.ios,
|
|
108
|
+
android: _qorextypes.QOREX_DOWNLOAD_URLS.android,
|
|
109
|
+
mobile: _qorextypes.QOREX_DOWNLOAD_URLS.website,
|
|
110
|
+
qrCode: _qorextypes.QOREX_DOWNLOAD_URLS.website
|
|
111
|
+
},
|
|
112
|
+
extension: {
|
|
113
|
+
instructions: {
|
|
114
|
+
learnMoreUrl: _qorextypes.QOREX_DOWNLOAD_URLS.website,
|
|
115
|
+
steps: [
|
|
116
|
+
{
|
|
117
|
+
step: "install",
|
|
118
|
+
title: "Install the QoreX extension",
|
|
119
|
+
description: "Add QoreX to your browser and pin it to the toolbar so you can open it quickly."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
step: "create",
|
|
123
|
+
title: "Create or import a wallet",
|
|
124
|
+
description: "Write down your recovery phrase and keep it offline. Never share it with anyone."
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
step: "refresh",
|
|
128
|
+
title: "Refresh this page",
|
|
129
|
+
description: "After setting up QoreX, refresh the page so it can find the extension."
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
createConnector: (walletDetails) => createQorexConnector(walletDetails, connectorOptions)
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// src/chains.ts
|
|
139
|
+
var _viem = require('viem');
|
|
140
|
+
var nativeCurrency = { name: "QOR", symbol: "QOR", decimals: 18 };
|
|
141
|
+
var qorechain = _viem.defineChain.call(void 0, {
|
|
142
|
+
id: 9801,
|
|
143
|
+
name: "QoreChain",
|
|
144
|
+
nativeCurrency,
|
|
145
|
+
rpcUrls: {
|
|
146
|
+
default: { http: ["https://evm.qore.host"] }
|
|
147
|
+
},
|
|
148
|
+
blockExplorers: {
|
|
149
|
+
default: { name: "QoreChain Explorer", url: "https://explore.qore.network" }
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
var qorechainTestnet = _viem.defineChain.call(void 0, {
|
|
153
|
+
id: 9800,
|
|
154
|
+
name: "QoreChain Testnet",
|
|
155
|
+
nativeCurrency,
|
|
156
|
+
rpcUrls: {
|
|
157
|
+
default: { http: ["https://evm-testnet.qore.host"] }
|
|
158
|
+
},
|
|
159
|
+
blockExplorers: {
|
|
160
|
+
default: { name: "QoreChain Explorer", url: "https://explore.qore.network" }
|
|
161
|
+
},
|
|
162
|
+
testnet: true
|
|
163
|
+
});
|
|
164
|
+
var QOREX_CHAINS = [qorechain, qorechainTestnet];
|
|
165
|
+
|
|
166
|
+
// src/index.ts
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
exports.QOREX_CHAINS = QOREX_CHAINS; exports.QOREX_ICON_BACKGROUND = QOREX_ICON_BACKGROUND; exports.QOREX_RDNS = _qorextypes.QOREX_RDNS; exports.createQorexConnector = createQorexConnector; exports.getQorexEip1193Provider = getQorexEip1193Provider; exports.qorechain = qorechain; exports.qorechainTestnet = qorechainTestnet; exports.qorexWallet = qorexWallet;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { WalletDetailsParams, Wallet } from '@rainbow-me/rainbowkit';
|
|
2
|
+
import { CreateConnectorFn } from 'wagmi';
|
|
3
|
+
import { QorexEip1193Provider } from '@qorechain/qorex-types';
|
|
4
|
+
export { QOREX_RDNS } from '@qorechain/qorex-types';
|
|
5
|
+
import * as viem from 'viem';
|
|
6
|
+
|
|
7
|
+
/** Background behind the QoreX icon in RainbowKit's lists. */
|
|
8
|
+
declare const QOREX_ICON_BACKGROUND = "#EEE9FB";
|
|
9
|
+
interface QorexConnectorOptions {
|
|
10
|
+
/**
|
|
11
|
+
* QoreX does not emit `accountsChanged` or `chainChanged` yet, so wagmi does
|
|
12
|
+
* not see an account or network change made in the wallet. When true, the
|
|
13
|
+
* connector re-reads `eth_accounts` and `eth_chainId` each time the page
|
|
14
|
+
* regains focus or becomes visible while connected, and reports a change to
|
|
15
|
+
* wagmi as if the wallet had emitted the event. An empty account list (the
|
|
16
|
+
* wallet was locked or the site disconnected) disconnects. Default false.
|
|
17
|
+
*/
|
|
18
|
+
readonly pollAccountsOnFocus?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface QorexWalletOptions extends QorexConnectorOptions {
|
|
21
|
+
/** Passed by RainbowKit to every wallet function; not used. */
|
|
22
|
+
readonly projectId?: string;
|
|
23
|
+
/** Passed by RainbowKit to every wallet function; not used. */
|
|
24
|
+
readonly appName?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The QoreX EVM provider: the one announced through EIP-6963 with rdns
|
|
28
|
+
* `network.qore.qorex`, or `window.qorex.evm` (the same object) if the
|
|
29
|
+
* announcement is not seen.
|
|
30
|
+
*/
|
|
31
|
+
declare function getQorexEip1193Provider(): QorexEip1193Provider | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* wagmi connector for QoreX. `qorexWallet().createConnector` uses this; call
|
|
34
|
+
* it directly only to use QoreX with plain wagmi.
|
|
35
|
+
*/
|
|
36
|
+
declare function createQorexConnector(walletDetails: WalletDetailsParams, options?: QorexConnectorOptions): CreateConnectorFn;
|
|
37
|
+
/**
|
|
38
|
+
* QoreX as a RainbowKit wallet.
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* connectorsForWallets([{ groupName: "Recommended", wallets: [qorexWallet] }], { appName, projectId });
|
|
42
|
+
* // with options:
|
|
43
|
+
* connectorsForWallets([{ groupName: "Recommended", wallets: [() => qorexWallet({ pollAccountsOnFocus: true })] }], { appName, projectId });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function qorexWallet(options?: QorexWalletOptions): Wallet;
|
|
47
|
+
|
|
48
|
+
/** QoreChain mainnet, EVM chain id 9801. */
|
|
49
|
+
declare const qorechain: {
|
|
50
|
+
blockExplorers: {
|
|
51
|
+
readonly default: {
|
|
52
|
+
readonly name: "QoreChain Explorer";
|
|
53
|
+
readonly url: "https://explore.qore.network";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
blockTime?: number | undefined | undefined;
|
|
57
|
+
contracts?: {
|
|
58
|
+
[x: string]: viem.ChainContract | {
|
|
59
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
62
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
63
|
+
multicall3?: viem.ChainContract | undefined;
|
|
64
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
ensTlds?: readonly string[] | undefined;
|
|
67
|
+
id: 9801;
|
|
68
|
+
name: "QoreChain";
|
|
69
|
+
nativeCurrency: {
|
|
70
|
+
readonly name: "QOR";
|
|
71
|
+
readonly symbol: "QOR";
|
|
72
|
+
readonly decimals: 18;
|
|
73
|
+
};
|
|
74
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
75
|
+
rpcUrls: {
|
|
76
|
+
readonly default: {
|
|
77
|
+
readonly http: readonly ["https://evm.qore.host"];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
sourceId?: number | undefined | undefined;
|
|
81
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
82
|
+
testnet?: boolean | undefined | undefined;
|
|
83
|
+
custom?: Record<string, unknown> | undefined;
|
|
84
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
85
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
86
|
+
formatters?: undefined;
|
|
87
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
88
|
+
client: viem.Client;
|
|
89
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
90
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
91
|
+
client: viem.Client;
|
|
92
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
93
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
94
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
95
|
+
}] | undefined;
|
|
96
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
97
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
98
|
+
};
|
|
99
|
+
/** QoreChain testnet, EVM chain id 9800. */
|
|
100
|
+
declare const qorechainTestnet: {
|
|
101
|
+
blockExplorers: {
|
|
102
|
+
readonly default: {
|
|
103
|
+
readonly name: "QoreChain Explorer";
|
|
104
|
+
readonly url: "https://explore.qore.network";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
blockTime?: number | undefined | undefined;
|
|
108
|
+
contracts?: {
|
|
109
|
+
[x: string]: viem.ChainContract | {
|
|
110
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
111
|
+
} | undefined;
|
|
112
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
113
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
114
|
+
multicall3?: viem.ChainContract | undefined;
|
|
115
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
ensTlds?: readonly string[] | undefined;
|
|
118
|
+
id: 9800;
|
|
119
|
+
name: "QoreChain Testnet";
|
|
120
|
+
nativeCurrency: {
|
|
121
|
+
readonly name: "QOR";
|
|
122
|
+
readonly symbol: "QOR";
|
|
123
|
+
readonly decimals: 18;
|
|
124
|
+
};
|
|
125
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
126
|
+
rpcUrls: {
|
|
127
|
+
readonly default: {
|
|
128
|
+
readonly http: readonly ["https://evm-testnet.qore.host"];
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
sourceId?: number | undefined | undefined;
|
|
132
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
133
|
+
testnet: true;
|
|
134
|
+
custom?: Record<string, unknown> | undefined;
|
|
135
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
136
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
137
|
+
formatters?: undefined;
|
|
138
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
139
|
+
client: viem.Client;
|
|
140
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
141
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
142
|
+
client: viem.Client;
|
|
143
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
144
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
145
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
146
|
+
}] | undefined;
|
|
147
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
148
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
149
|
+
};
|
|
150
|
+
/** Both QoreChain EVM chains, mainnet first. Pass to wagmi or RainbowKit `chains`. */
|
|
151
|
+
declare const QOREX_CHAINS: readonly [{
|
|
152
|
+
blockExplorers: {
|
|
153
|
+
readonly default: {
|
|
154
|
+
readonly name: "QoreChain Explorer";
|
|
155
|
+
readonly url: "https://explore.qore.network";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
blockTime?: number | undefined | undefined;
|
|
159
|
+
contracts?: {
|
|
160
|
+
[x: string]: viem.ChainContract | {
|
|
161
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
164
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
165
|
+
multicall3?: viem.ChainContract | undefined;
|
|
166
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
ensTlds?: readonly string[] | undefined;
|
|
169
|
+
id: 9801;
|
|
170
|
+
name: "QoreChain";
|
|
171
|
+
nativeCurrency: {
|
|
172
|
+
readonly name: "QOR";
|
|
173
|
+
readonly symbol: "QOR";
|
|
174
|
+
readonly decimals: 18;
|
|
175
|
+
};
|
|
176
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
177
|
+
rpcUrls: {
|
|
178
|
+
readonly default: {
|
|
179
|
+
readonly http: readonly ["https://evm.qore.host"];
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
sourceId?: number | undefined | undefined;
|
|
183
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
184
|
+
testnet?: boolean | undefined | undefined;
|
|
185
|
+
custom?: Record<string, unknown> | undefined;
|
|
186
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
187
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
188
|
+
formatters?: undefined;
|
|
189
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
190
|
+
client: viem.Client;
|
|
191
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
192
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
193
|
+
client: viem.Client;
|
|
194
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
195
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
196
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
197
|
+
}] | undefined;
|
|
198
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
199
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
blockExplorers: {
|
|
202
|
+
readonly default: {
|
|
203
|
+
readonly name: "QoreChain Explorer";
|
|
204
|
+
readonly url: "https://explore.qore.network";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
blockTime?: number | undefined | undefined;
|
|
208
|
+
contracts?: {
|
|
209
|
+
[x: string]: viem.ChainContract | {
|
|
210
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
211
|
+
} | undefined;
|
|
212
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
213
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
214
|
+
multicall3?: viem.ChainContract | undefined;
|
|
215
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
216
|
+
} | undefined;
|
|
217
|
+
ensTlds?: readonly string[] | undefined;
|
|
218
|
+
id: 9800;
|
|
219
|
+
name: "QoreChain Testnet";
|
|
220
|
+
nativeCurrency: {
|
|
221
|
+
readonly name: "QOR";
|
|
222
|
+
readonly symbol: "QOR";
|
|
223
|
+
readonly decimals: 18;
|
|
224
|
+
};
|
|
225
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
226
|
+
rpcUrls: {
|
|
227
|
+
readonly default: {
|
|
228
|
+
readonly http: readonly ["https://evm-testnet.qore.host"];
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
sourceId?: number | undefined | undefined;
|
|
232
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
233
|
+
testnet: true;
|
|
234
|
+
custom?: Record<string, unknown> | undefined;
|
|
235
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
236
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
237
|
+
formatters?: undefined;
|
|
238
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
239
|
+
client: viem.Client;
|
|
240
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
241
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
242
|
+
client: viem.Client;
|
|
243
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
244
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
245
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
246
|
+
}] | undefined;
|
|
247
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
248
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
249
|
+
}];
|
|
250
|
+
|
|
251
|
+
export { QOREX_CHAINS, QOREX_ICON_BACKGROUND, type QorexConnectorOptions, type QorexWalletOptions, createQorexConnector, getQorexEip1193Provider, qorechain, qorechainTestnet, qorexWallet };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { WalletDetailsParams, Wallet } from '@rainbow-me/rainbowkit';
|
|
2
|
+
import { CreateConnectorFn } from 'wagmi';
|
|
3
|
+
import { QorexEip1193Provider } from '@qorechain/qorex-types';
|
|
4
|
+
export { QOREX_RDNS } from '@qorechain/qorex-types';
|
|
5
|
+
import * as viem from 'viem';
|
|
6
|
+
|
|
7
|
+
/** Background behind the QoreX icon in RainbowKit's lists. */
|
|
8
|
+
declare const QOREX_ICON_BACKGROUND = "#EEE9FB";
|
|
9
|
+
interface QorexConnectorOptions {
|
|
10
|
+
/**
|
|
11
|
+
* QoreX does not emit `accountsChanged` or `chainChanged` yet, so wagmi does
|
|
12
|
+
* not see an account or network change made in the wallet. When true, the
|
|
13
|
+
* connector re-reads `eth_accounts` and `eth_chainId` each time the page
|
|
14
|
+
* regains focus or becomes visible while connected, and reports a change to
|
|
15
|
+
* wagmi as if the wallet had emitted the event. An empty account list (the
|
|
16
|
+
* wallet was locked or the site disconnected) disconnects. Default false.
|
|
17
|
+
*/
|
|
18
|
+
readonly pollAccountsOnFocus?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface QorexWalletOptions extends QorexConnectorOptions {
|
|
21
|
+
/** Passed by RainbowKit to every wallet function; not used. */
|
|
22
|
+
readonly projectId?: string;
|
|
23
|
+
/** Passed by RainbowKit to every wallet function; not used. */
|
|
24
|
+
readonly appName?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The QoreX EVM provider: the one announced through EIP-6963 with rdns
|
|
28
|
+
* `network.qore.qorex`, or `window.qorex.evm` (the same object) if the
|
|
29
|
+
* announcement is not seen.
|
|
30
|
+
*/
|
|
31
|
+
declare function getQorexEip1193Provider(): QorexEip1193Provider | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* wagmi connector for QoreX. `qorexWallet().createConnector` uses this; call
|
|
34
|
+
* it directly only to use QoreX with plain wagmi.
|
|
35
|
+
*/
|
|
36
|
+
declare function createQorexConnector(walletDetails: WalletDetailsParams, options?: QorexConnectorOptions): CreateConnectorFn;
|
|
37
|
+
/**
|
|
38
|
+
* QoreX as a RainbowKit wallet.
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* connectorsForWallets([{ groupName: "Recommended", wallets: [qorexWallet] }], { appName, projectId });
|
|
42
|
+
* // with options:
|
|
43
|
+
* connectorsForWallets([{ groupName: "Recommended", wallets: [() => qorexWallet({ pollAccountsOnFocus: true })] }], { appName, projectId });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function qorexWallet(options?: QorexWalletOptions): Wallet;
|
|
47
|
+
|
|
48
|
+
/** QoreChain mainnet, EVM chain id 9801. */
|
|
49
|
+
declare const qorechain: {
|
|
50
|
+
blockExplorers: {
|
|
51
|
+
readonly default: {
|
|
52
|
+
readonly name: "QoreChain Explorer";
|
|
53
|
+
readonly url: "https://explore.qore.network";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
blockTime?: number | undefined | undefined;
|
|
57
|
+
contracts?: {
|
|
58
|
+
[x: string]: viem.ChainContract | {
|
|
59
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
62
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
63
|
+
multicall3?: viem.ChainContract | undefined;
|
|
64
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
ensTlds?: readonly string[] | undefined;
|
|
67
|
+
id: 9801;
|
|
68
|
+
name: "QoreChain";
|
|
69
|
+
nativeCurrency: {
|
|
70
|
+
readonly name: "QOR";
|
|
71
|
+
readonly symbol: "QOR";
|
|
72
|
+
readonly decimals: 18;
|
|
73
|
+
};
|
|
74
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
75
|
+
rpcUrls: {
|
|
76
|
+
readonly default: {
|
|
77
|
+
readonly http: readonly ["https://evm.qore.host"];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
sourceId?: number | undefined | undefined;
|
|
81
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
82
|
+
testnet?: boolean | undefined | undefined;
|
|
83
|
+
custom?: Record<string, unknown> | undefined;
|
|
84
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
85
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
86
|
+
formatters?: undefined;
|
|
87
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
88
|
+
client: viem.Client;
|
|
89
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
90
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
91
|
+
client: viem.Client;
|
|
92
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
93
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
94
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
95
|
+
}] | undefined;
|
|
96
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
97
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
98
|
+
};
|
|
99
|
+
/** QoreChain testnet, EVM chain id 9800. */
|
|
100
|
+
declare const qorechainTestnet: {
|
|
101
|
+
blockExplorers: {
|
|
102
|
+
readonly default: {
|
|
103
|
+
readonly name: "QoreChain Explorer";
|
|
104
|
+
readonly url: "https://explore.qore.network";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
blockTime?: number | undefined | undefined;
|
|
108
|
+
contracts?: {
|
|
109
|
+
[x: string]: viem.ChainContract | {
|
|
110
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
111
|
+
} | undefined;
|
|
112
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
113
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
114
|
+
multicall3?: viem.ChainContract | undefined;
|
|
115
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
ensTlds?: readonly string[] | undefined;
|
|
118
|
+
id: 9800;
|
|
119
|
+
name: "QoreChain Testnet";
|
|
120
|
+
nativeCurrency: {
|
|
121
|
+
readonly name: "QOR";
|
|
122
|
+
readonly symbol: "QOR";
|
|
123
|
+
readonly decimals: 18;
|
|
124
|
+
};
|
|
125
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
126
|
+
rpcUrls: {
|
|
127
|
+
readonly default: {
|
|
128
|
+
readonly http: readonly ["https://evm-testnet.qore.host"];
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
sourceId?: number | undefined | undefined;
|
|
132
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
133
|
+
testnet: true;
|
|
134
|
+
custom?: Record<string, unknown> | undefined;
|
|
135
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
136
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
137
|
+
formatters?: undefined;
|
|
138
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
139
|
+
client: viem.Client;
|
|
140
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
141
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
142
|
+
client: viem.Client;
|
|
143
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
144
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
145
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
146
|
+
}] | undefined;
|
|
147
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
148
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
149
|
+
};
|
|
150
|
+
/** Both QoreChain EVM chains, mainnet first. Pass to wagmi or RainbowKit `chains`. */
|
|
151
|
+
declare const QOREX_CHAINS: readonly [{
|
|
152
|
+
blockExplorers: {
|
|
153
|
+
readonly default: {
|
|
154
|
+
readonly name: "QoreChain Explorer";
|
|
155
|
+
readonly url: "https://explore.qore.network";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
blockTime?: number | undefined | undefined;
|
|
159
|
+
contracts?: {
|
|
160
|
+
[x: string]: viem.ChainContract | {
|
|
161
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
164
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
165
|
+
multicall3?: viem.ChainContract | undefined;
|
|
166
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
ensTlds?: readonly string[] | undefined;
|
|
169
|
+
id: 9801;
|
|
170
|
+
name: "QoreChain";
|
|
171
|
+
nativeCurrency: {
|
|
172
|
+
readonly name: "QOR";
|
|
173
|
+
readonly symbol: "QOR";
|
|
174
|
+
readonly decimals: 18;
|
|
175
|
+
};
|
|
176
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
177
|
+
rpcUrls: {
|
|
178
|
+
readonly default: {
|
|
179
|
+
readonly http: readonly ["https://evm.qore.host"];
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
sourceId?: number | undefined | undefined;
|
|
183
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
184
|
+
testnet?: boolean | undefined | undefined;
|
|
185
|
+
custom?: Record<string, unknown> | undefined;
|
|
186
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
187
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
188
|
+
formatters?: undefined;
|
|
189
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
190
|
+
client: viem.Client;
|
|
191
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
192
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
193
|
+
client: viem.Client;
|
|
194
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
195
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
196
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
197
|
+
}] | undefined;
|
|
198
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
199
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
blockExplorers: {
|
|
202
|
+
readonly default: {
|
|
203
|
+
readonly name: "QoreChain Explorer";
|
|
204
|
+
readonly url: "https://explore.qore.network";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
blockTime?: number | undefined | undefined;
|
|
208
|
+
contracts?: {
|
|
209
|
+
[x: string]: viem.ChainContract | {
|
|
210
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
211
|
+
} | undefined;
|
|
212
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
213
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
214
|
+
multicall3?: viem.ChainContract | undefined;
|
|
215
|
+
erc6492Verifier?: viem.ChainContract | undefined;
|
|
216
|
+
} | undefined;
|
|
217
|
+
ensTlds?: readonly string[] | undefined;
|
|
218
|
+
id: 9800;
|
|
219
|
+
name: "QoreChain Testnet";
|
|
220
|
+
nativeCurrency: {
|
|
221
|
+
readonly name: "QOR";
|
|
222
|
+
readonly symbol: "QOR";
|
|
223
|
+
readonly decimals: 18;
|
|
224
|
+
};
|
|
225
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
226
|
+
rpcUrls: {
|
|
227
|
+
readonly default: {
|
|
228
|
+
readonly http: readonly ["https://evm-testnet.qore.host"];
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
sourceId?: number | undefined | undefined;
|
|
232
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
233
|
+
testnet: true;
|
|
234
|
+
custom?: Record<string, unknown> | undefined;
|
|
235
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
236
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
237
|
+
formatters?: undefined;
|
|
238
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
239
|
+
client: viem.Client;
|
|
240
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
241
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
242
|
+
client: viem.Client;
|
|
243
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
244
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
245
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
246
|
+
}] | undefined;
|
|
247
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
248
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
249
|
+
}];
|
|
250
|
+
|
|
251
|
+
export { QOREX_CHAINS, QOREX_ICON_BACKGROUND, type QorexConnectorOptions, type QorexWalletOptions, createQorexConnector, getQorexEip1193Provider, qorechain, qorechainTestnet, qorexWallet };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// src/wallet.ts
|
|
2
|
+
import { createConnector, injected } from "wagmi";
|
|
3
|
+
import {
|
|
4
|
+
QOREX_DOWNLOAD_URLS,
|
|
5
|
+
QOREX_NAME,
|
|
6
|
+
QOREX_RDNS,
|
|
7
|
+
findQorexEip1193
|
|
8
|
+
} from "@qorechain/qorex-types";
|
|
9
|
+
import { QOREX_ICON_DATA_URI } from "@qorechain/qorex-types/icon";
|
|
10
|
+
var QOREX_ICON_BACKGROUND = "#EEE9FB";
|
|
11
|
+
function getQorexEip1193Provider() {
|
|
12
|
+
const announced = findQorexEip1193();
|
|
13
|
+
if (announced) return announced;
|
|
14
|
+
if (typeof window === "undefined") return void 0;
|
|
15
|
+
const evm = window.qorex?.evm;
|
|
16
|
+
return evm && evm.isQoreX === true && typeof evm.request === "function" ? evm : void 0;
|
|
17
|
+
}
|
|
18
|
+
function createQorexConnector(walletDetails, options = {}) {
|
|
19
|
+
const { id, name } = walletDetails.rkDetails;
|
|
20
|
+
let cached;
|
|
21
|
+
const provider = () => cached ??= getQorexEip1193Provider();
|
|
22
|
+
return createConnector((config) => {
|
|
23
|
+
const base = injected({
|
|
24
|
+
shimDisconnect: true,
|
|
25
|
+
// An object target: wagmi then never substitutes window.ethereum.
|
|
26
|
+
target: { id, name, icon: QOREX_ICON_DATA_URI, provider }
|
|
27
|
+
})(config);
|
|
28
|
+
let stopPolling;
|
|
29
|
+
const startPolling = (connector2, accounts, chainId) => {
|
|
30
|
+
if (options.pollAccountsOnFocus !== true || typeof window === "undefined") return;
|
|
31
|
+
stopPolling?.();
|
|
32
|
+
let lastAccounts = accounts.map((a) => a.toLowerCase()).join(",");
|
|
33
|
+
let lastChainId = chainId;
|
|
34
|
+
let running = false;
|
|
35
|
+
const check = async () => {
|
|
36
|
+
if (running) return;
|
|
37
|
+
running = true;
|
|
38
|
+
try {
|
|
39
|
+
const p = provider();
|
|
40
|
+
if (!p) return;
|
|
41
|
+
const nextAccounts = await p.request({ method: "eth_accounts" });
|
|
42
|
+
const nextChainHex = await p.request({ method: "eth_chainId" });
|
|
43
|
+
const accountsKey = nextAccounts.map((a) => a.toLowerCase()).join(",");
|
|
44
|
+
const nextChainId = Number(nextChainHex);
|
|
45
|
+
if (accountsKey !== lastAccounts) {
|
|
46
|
+
lastAccounts = accountsKey;
|
|
47
|
+
connector2.onAccountsChanged(nextAccounts);
|
|
48
|
+
}
|
|
49
|
+
if (Number.isFinite(nextChainId) && nextChainId !== lastChainId) {
|
|
50
|
+
lastChainId = nextChainId;
|
|
51
|
+
connector2.onChainChanged(nextChainHex);
|
|
52
|
+
}
|
|
53
|
+
} catch {
|
|
54
|
+
} finally {
|
|
55
|
+
running = false;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const onFocus = () => void check();
|
|
59
|
+
const onVisibility = () => {
|
|
60
|
+
if (document.visibilityState === "visible") void check();
|
|
61
|
+
};
|
|
62
|
+
window.addEventListener("focus", onFocus);
|
|
63
|
+
document.addEventListener("visibilitychange", onVisibility);
|
|
64
|
+
stopPolling = () => {
|
|
65
|
+
window.removeEventListener("focus", onFocus);
|
|
66
|
+
document.removeEventListener("visibilitychange", onVisibility);
|
|
67
|
+
stopPolling = void 0;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
const connect = async function(parameters) {
|
|
71
|
+
const result = await base.connect.call(this, parameters);
|
|
72
|
+
const accounts = result.accounts.map(
|
|
73
|
+
(a) => typeof a === "string" ? a : a.address
|
|
74
|
+
);
|
|
75
|
+
startPolling(this, accounts, result.chainId);
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
const connector = {
|
|
79
|
+
...base,
|
|
80
|
+
rdns: QOREX_RDNS,
|
|
81
|
+
connect,
|
|
82
|
+
async disconnect() {
|
|
83
|
+
stopPolling?.();
|
|
84
|
+
await base.disconnect.call(this);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return { ...connector, ...walletDetails };
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function qorexWallet(options = {}) {
|
|
91
|
+
const connectorOptions = { pollAccountsOnFocus: options.pollAccountsOnFocus === true };
|
|
92
|
+
return {
|
|
93
|
+
id: "qorex",
|
|
94
|
+
name: QOREX_NAME,
|
|
95
|
+
rdns: QOREX_RDNS,
|
|
96
|
+
iconUrl: QOREX_ICON_DATA_URI,
|
|
97
|
+
iconBackground: QOREX_ICON_BACKGROUND,
|
|
98
|
+
installed: typeof window === "undefined" ? void 0 : getQorexEip1193Provider() !== void 0,
|
|
99
|
+
downloadUrls: {
|
|
100
|
+
chrome: QOREX_DOWNLOAD_URLS.chrome,
|
|
101
|
+
edge: QOREX_DOWNLOAD_URLS.chrome,
|
|
102
|
+
opera: QOREX_DOWNLOAD_URLS.chrome,
|
|
103
|
+
firefox: QOREX_DOWNLOAD_URLS.firefox,
|
|
104
|
+
safari: QOREX_DOWNLOAD_URLS.safari,
|
|
105
|
+
macos: QOREX_DOWNLOAD_URLS.safari,
|
|
106
|
+
browserExtension: QOREX_DOWNLOAD_URLS.chrome,
|
|
107
|
+
ios: QOREX_DOWNLOAD_URLS.ios,
|
|
108
|
+
android: QOREX_DOWNLOAD_URLS.android,
|
|
109
|
+
mobile: QOREX_DOWNLOAD_URLS.website,
|
|
110
|
+
qrCode: QOREX_DOWNLOAD_URLS.website
|
|
111
|
+
},
|
|
112
|
+
extension: {
|
|
113
|
+
instructions: {
|
|
114
|
+
learnMoreUrl: QOREX_DOWNLOAD_URLS.website,
|
|
115
|
+
steps: [
|
|
116
|
+
{
|
|
117
|
+
step: "install",
|
|
118
|
+
title: "Install the QoreX extension",
|
|
119
|
+
description: "Add QoreX to your browser and pin it to the toolbar so you can open it quickly."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
step: "create",
|
|
123
|
+
title: "Create or import a wallet",
|
|
124
|
+
description: "Write down your recovery phrase and keep it offline. Never share it with anyone."
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
step: "refresh",
|
|
128
|
+
title: "Refresh this page",
|
|
129
|
+
description: "After setting up QoreX, refresh the page so it can find the extension."
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
createConnector: (walletDetails) => createQorexConnector(walletDetails, connectorOptions)
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// src/chains.ts
|
|
139
|
+
import { defineChain } from "viem";
|
|
140
|
+
var nativeCurrency = { name: "QOR", symbol: "QOR", decimals: 18 };
|
|
141
|
+
var qorechain = defineChain({
|
|
142
|
+
id: 9801,
|
|
143
|
+
name: "QoreChain",
|
|
144
|
+
nativeCurrency,
|
|
145
|
+
rpcUrls: {
|
|
146
|
+
default: { http: ["https://evm.qore.host"] }
|
|
147
|
+
},
|
|
148
|
+
blockExplorers: {
|
|
149
|
+
default: { name: "QoreChain Explorer", url: "https://explore.qore.network" }
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
var qorechainTestnet = defineChain({
|
|
153
|
+
id: 9800,
|
|
154
|
+
name: "QoreChain Testnet",
|
|
155
|
+
nativeCurrency,
|
|
156
|
+
rpcUrls: {
|
|
157
|
+
default: { http: ["https://evm-testnet.qore.host"] }
|
|
158
|
+
},
|
|
159
|
+
blockExplorers: {
|
|
160
|
+
default: { name: "QoreChain Explorer", url: "https://explore.qore.network" }
|
|
161
|
+
},
|
|
162
|
+
testnet: true
|
|
163
|
+
});
|
|
164
|
+
var QOREX_CHAINS = [qorechain, qorechainTestnet];
|
|
165
|
+
|
|
166
|
+
// src/index.ts
|
|
167
|
+
import { QOREX_RDNS as QOREX_RDNS2 } from "@qorechain/qorex-types";
|
|
168
|
+
export {
|
|
169
|
+
QOREX_CHAINS,
|
|
170
|
+
QOREX_ICON_BACKGROUND,
|
|
171
|
+
QOREX_RDNS2 as QOREX_RDNS,
|
|
172
|
+
createQorexConnector,
|
|
173
|
+
getQorexEip1193Provider,
|
|
174
|
+
qorechain,
|
|
175
|
+
qorechainTestnet,
|
|
176
|
+
qorexWallet
|
|
177
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qorechain/qorex-rainbowkit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "QoreX wallet for RainbowKit, plus viem chain definitions for the QoreChain EVM lane.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "QoreChain Association",
|
|
7
|
+
"homepage": "https://github.com/qorechain/qorex-integrations/tree/main/packages/rainbowkit#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/qorechain/qorex-integrations.git",
|
|
11
|
+
"directory": "packages/rainbowkit"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/qorechain/qorex-integrations/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"qorex",
|
|
18
|
+
"qorechain",
|
|
19
|
+
"rainbowkit",
|
|
20
|
+
"wagmi",
|
|
21
|
+
"viem",
|
|
22
|
+
"eip-6963",
|
|
23
|
+
"wallet"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "./dist/index.cjs",
|
|
28
|
+
"module": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/index.d.cts",
|
|
38
|
+
"default": "./dist/index.cjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
47
|
+
],
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@qorechain/qorex-types": "0.1.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@rainbow-me/rainbowkit": "^2.2.11",
|
|
56
|
+
"viem": "^2.0.0",
|
|
57
|
+
"wagmi": "^2.9.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@rainbow-me/rainbowkit": "2.2.11",
|
|
61
|
+
"@tanstack/react-query": "5.104.2",
|
|
62
|
+
"jsdom": "30.1.2",
|
|
63
|
+
"react": "19.3.0",
|
|
64
|
+
"react-dom": "19.3.0",
|
|
65
|
+
"viem": "2.57.5",
|
|
66
|
+
"wagmi": "2.19.5"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "tsup",
|
|
73
|
+
"test": "vitest run",
|
|
74
|
+
"lint": "eslint src test",
|
|
75
|
+
"typecheck": "tsc --noEmit"
|
|
76
|
+
}
|
|
6
77
|
}
|