@reef-knot/wallet-adapter-bitkeep 1.1.0 → 1.2.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 +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -15
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WalletAdapterType } from '@reef-knot/types';
|
|
2
|
-
import { Ethereum as EthereumTypeWagmi } from '@wagmi/core';
|
|
2
|
+
import { Ethereum as EthereumTypeWagmi, Chain } from '@wagmi/core';
|
|
3
|
+
import { InjectedConnector } from 'wagmi/connectors/injected';
|
|
3
4
|
declare global {
|
|
4
5
|
interface Window {
|
|
5
6
|
bitkeep?: {
|
|
@@ -7,6 +8,13 @@ declare global {
|
|
|
7
8
|
};
|
|
8
9
|
}
|
|
9
10
|
}
|
|
11
|
+
export declare const id = "bitget";
|
|
12
|
+
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
|
+
}
|
|
10
18
|
export declare const Bitget: WalletAdapterType;
|
|
11
19
|
export declare const BitKeep: WalletAdapterType;
|
|
12
20
|
//# 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;AACrD,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE;YACR,QAAQ,CAAC,EAAE,iBAAiB,CAAC;SAC9B,CAAC;KACH;CACF;AAID,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,IAAI,WAAW,CAAC;AAE7B,qBAAa,eAAgB,SAAQ,iBAAiB;IACpD,QAAQ,CAAC,EAAE,YAAM;IACjB,QAAQ,CAAC,IAAI,YAAQ;gBACT,MAAM,EAAE,KAAK,EAAE;CAQ5B;AAED,eAAO,MAAM,MAAM,EAAE,iBASnB,CAAC;AAIH,eAAO,MAAM,OAAO,mBAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
import { InjectedConnector } from 'wagmi/connectors/injected';
|
|
2
2
|
import Memo from './icons/bitget.svg.js';
|
|
3
3
|
|
|
4
|
+
// The current metrics implementation is based on walletId,
|
|
5
|
+
// using previous "bitkeep" name here not to break metrics
|
|
6
|
+
const id = 'bitget';
|
|
7
|
+
const name = 'Bitget';
|
|
8
|
+
class BitgetConnector extends InjectedConnector {
|
|
9
|
+
constructor(chains) {
|
|
10
|
+
super({
|
|
11
|
+
chains,
|
|
12
|
+
options: {
|
|
13
|
+
getProvider: () => {
|
|
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
|
+
this.id = id;
|
|
20
|
+
this.name = name;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
4
23
|
const Bitget = ({
|
|
5
24
|
chains
|
|
6
25
|
}) => ({
|
|
7
|
-
walletName:
|
|
8
|
-
|
|
9
|
-
// using previous "bitkeep" name here not to break metrics
|
|
10
|
-
walletId: 'bitkeep',
|
|
26
|
+
walletName: name,
|
|
27
|
+
walletId: id,
|
|
11
28
|
icon: Memo,
|
|
12
29
|
detector: () => {
|
|
13
30
|
var _a, _b;
|
|
@@ -16,19 +33,10 @@ const Bitget = ({
|
|
|
16
33
|
downloadURLs: {
|
|
17
34
|
default: 'https://web3.bitget.com/'
|
|
18
35
|
},
|
|
19
|
-
connector: new
|
|
20
|
-
chains,
|
|
21
|
-
options: {
|
|
22
|
-
name: 'Bitget',
|
|
23
|
-
getProvider: () => {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
return (_b = (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.bitkeep) === null || _b === void 0 ? void 0 : _b.ethereum;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
})
|
|
36
|
+
connector: new BitgetConnector(chains)
|
|
29
37
|
});
|
|
30
38
|
// BitKeep is the previous name of the wallet.
|
|
31
39
|
// Exporting the wallet adapter with the old name for compatibility.
|
|
32
40
|
const BitKeep = Bitget;
|
|
33
41
|
|
|
34
|
-
export { BitKeep, Bitget };
|
|
42
|
+
export { BitKeep, Bitget, BitgetConnector, id, name };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/wallet-adapter-bitkeep",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "rollup -c",
|
|
31
31
|
"dev": "dev=on rollup -c -w",
|
|
32
|
-
"lint": "eslint"
|
|
32
|
+
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@reef-knot/types": "^1.
|
|
36
|
-
"@svgr/rollup": "^6.5.1"
|
|
35
|
+
"@reef-knot/types": "^1.6.0",
|
|
36
|
+
"@svgr/rollup": "^6.5.1",
|
|
37
|
+
"eslint-config-custom": "*"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"wagmi": "^0.12.19",
|