@reef-knot/wallet-adapter-bitkeep 2.0.0 → 2.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/dist/index.d.ts +2 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -19
- package/package.json +6 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { WalletAdapterType } from '@reef-knot/types';
|
|
2
|
-
import type { EIP1193Provider } from 'viem';
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
bitkeep?: {
|
|
6
|
-
ethereum?: EIP1193Provider;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
import type { WalletAdapterType } from '@reef-knot/types';
|
|
10
2
|
export declare const id = "bitget";
|
|
11
3
|
export declare const name = "Bitget";
|
|
4
|
+
export declare const rdns = "com.bitget.web3";
|
|
12
5
|
export declare const Bitget: WalletAdapterType;
|
|
13
6
|
export declare const BitKeep: WalletAdapterType;
|
|
14
7
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAO1D,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,eAAO,MAAM,IAAI,oBAAoB,CAAC;AAKtC,eAAO,MAAM,MAAM,EAAE,iBAanB,CAAC;AAIH,eAAO,MAAM,OAAO,mBAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
import { injected } from 'wagmi/connectors';
|
|
2
|
+
import { isProviderExistsEIP6963, getTargetEIP6963 } from '@reef-knot/wallets-helpers';
|
|
2
3
|
import Memo from './icons/bitget.svg.js';
|
|
3
4
|
|
|
4
|
-
// The current metrics implementation is based on walletId,
|
|
5
|
-
// using previous "bitkeep" name here not to break metrics
|
|
6
5
|
const id = 'bitget';
|
|
7
6
|
const name = 'Bitget';
|
|
7
|
+
const rdns = 'com.bitget.web3';
|
|
8
8
|
const currentHref = globalThis.window ? encodeURIComponent(globalThis.window.location.href) : '';
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
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 = () => ({
|
|
9
|
+
const Bitget = ({
|
|
10
|
+
providersStore
|
|
11
|
+
}) => ({
|
|
20
12
|
walletName: name,
|
|
21
13
|
walletId: id,
|
|
22
14
|
type: injected.type,
|
|
23
15
|
icon: Memo,
|
|
24
|
-
detector: () =>
|
|
25
|
-
var _a, _b;
|
|
26
|
-
return !!((_b = (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.bitkeep) === null || _b === void 0 ? void 0 : _b.ethereum);
|
|
27
|
-
},
|
|
16
|
+
detector: () => isProviderExistsEIP6963(providersStore, rdns),
|
|
28
17
|
downloadURLs: {
|
|
29
18
|
default: 'https://web3.bitget.com/'
|
|
30
19
|
},
|
|
31
20
|
deeplink: `https://bkcode.vip?action=dapp&url=${currentHref}`,
|
|
32
|
-
createConnectorFn:
|
|
21
|
+
createConnectorFn: injected({
|
|
22
|
+
target: () => getTargetEIP6963(providersStore, rdns)
|
|
23
|
+
})
|
|
33
24
|
});
|
|
34
25
|
// BitKeep is the previous name of the wallet.
|
|
35
26
|
// Exporting the wallet adapter with the old name for compatibility.
|
|
36
27
|
const BitKeep = Bitget;
|
|
37
28
|
|
|
38
|
-
export { BitKeep, Bitget, id, name };
|
|
29
|
+
export { BitKeep, Bitget, id, name, rdns };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/wallet-adapter-bitkeep",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -32,13 +32,15 @@
|
|
|
32
32
|
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@reef-knot/types": "^2.
|
|
35
|
+
"@reef-knot/types": "^2.1.0",
|
|
36
|
+
"@reef-knot/wallets-helpers": "^2.1.0",
|
|
36
37
|
"@svgr/rollup": "^6.5.1",
|
|
37
38
|
"eslint-config-custom": "*"
|
|
38
39
|
},
|
|
39
40
|
"peerDependencies": {
|
|
40
|
-
"wagmi": "2.
|
|
41
|
-
"@reef-knot/types": "^2.0.
|
|
41
|
+
"wagmi": "2.11.2",
|
|
42
|
+
"@reef-knot/types": "^2.0.1",
|
|
43
|
+
"@reef-knot/wallets-helpers": "^2.0.2",
|
|
42
44
|
"@tanstack/react-query": "^5.29.0"
|
|
43
45
|
}
|
|
44
46
|
}
|