@reef-knot/wallet-adapter-bitkeep 1.3.0 → 2.0.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/dist/index.d.ts +2 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -21
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { WalletAdapterType } from '@reef-knot/types';
|
|
2
|
-
import {
|
|
3
|
-
import { InjectedConnector } from 'wagmi/connectors/injected';
|
|
2
|
+
import type { EIP1193Provider } from 'viem';
|
|
4
3
|
declare global {
|
|
5
4
|
interface Window {
|
|
6
5
|
bitkeep?: {
|
|
7
|
-
ethereum?:
|
|
6
|
+
ethereum?: EIP1193Provider;
|
|
8
7
|
};
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
export declare const id = "bitget";
|
|
12
11
|
export declare const name = "Bitget";
|
|
13
|
-
export declare class BitgetConnector extends InjectedConnector {
|
|
14
|
-
readonly id = "bitget";
|
|
15
|
-
readonly name = "Bitget";
|
|
16
|
-
constructor(chains: Chain[]);
|
|
17
|
-
}
|
|
18
12
|
export declare const Bitget: WalletAdapterType;
|
|
19
13
|
export declare const BitKeep: WalletAdapterType;
|
|
20
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE;YACR,QAAQ,CAAC,EAAE,eAAe,CAAC;SAC5B,CAAC;KACH;CACF;AAID,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,IAAI,WAAW,CAAC;AAc7B,eAAO,MAAM,MAAM,EAAE,iBAWnB,CAAC;AAIH,eAAO,MAAM,OAAO,mBAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { injected } from 'wagmi/connectors';
|
|
2
2
|
import Memo from './icons/bitget.svg.js';
|
|
3
3
|
|
|
4
4
|
// The current metrics implementation is based on walletId,
|
|
@@ -6,26 +6,20 @@ import Memo from './icons/bitget.svg.js';
|
|
|
6
6
|
const id = 'bitget';
|
|
7
7
|
const name = 'Bitget';
|
|
8
8
|
const currentHref = globalThis.window ? encodeURIComponent(globalThis.window.location.href) : '';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.id = id;
|
|
21
|
-
this.name = name;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
const Bitget = ({
|
|
25
|
-
chains
|
|
26
|
-
}) => ({
|
|
9
|
+
const getBitgetConnector = () => injected({
|
|
10
|
+
target: () => ({
|
|
11
|
+
id,
|
|
12
|
+
name,
|
|
13
|
+
provider: () => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
return (_b = (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.bitkeep) === null || _b === void 0 ? void 0 : _b.ethereum;
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
const Bitget = () => ({
|
|
27
20
|
walletName: name,
|
|
28
21
|
walletId: id,
|
|
22
|
+
type: injected.type,
|
|
29
23
|
icon: Memo,
|
|
30
24
|
detector: () => {
|
|
31
25
|
var _a, _b;
|
|
@@ -35,10 +29,10 @@ const Bitget = ({
|
|
|
35
29
|
default: 'https://web3.bitget.com/'
|
|
36
30
|
},
|
|
37
31
|
deeplink: `https://bkcode.vip?action=dapp&url=${currentHref}`,
|
|
38
|
-
|
|
32
|
+
createConnectorFn: getBitgetConnector()
|
|
39
33
|
});
|
|
40
34
|
// BitKeep is the previous name of the wallet.
|
|
41
35
|
// Exporting the wallet adapter with the old name for compatibility.
|
|
42
36
|
const BitKeep = Bitget;
|
|
43
37
|
|
|
44
|
-
export { BitKeep, Bitget,
|
|
38
|
+
export { BitKeep, Bitget, id, name };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/wallet-adapter-bitkeep",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -32,12 +32,13 @@
|
|
|
32
32
|
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@reef-knot/types": "^
|
|
35
|
+
"@reef-knot/types": "^2.0.0",
|
|
36
36
|
"@svgr/rollup": "^6.5.1",
|
|
37
37
|
"eslint-config-custom": "*"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"wagmi": "
|
|
41
|
-
"@reef-knot/types": "^
|
|
40
|
+
"wagmi": "2.10.4",
|
|
41
|
+
"@reef-knot/types": "^2.0.0",
|
|
42
|
+
"@tanstack/react-query": "^5.29.0"
|
|
42
43
|
}
|
|
43
44
|
}
|