@ckb-ccc/okx 0.0.5-alpha.8 → 0.0.7-alpha.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/signer.d.ts CHANGED
@@ -1,9 +1,18 @@
1
1
  import { ccc } from "@ckb-ccc/core";
2
2
  import { UniSat } from "@ckb-ccc/uni-sat";
3
3
  import { BitcoinProvider } from "./advancedBarrel";
4
+ /**
5
+ * Class representing a Bitcoin signer that extends the UniSat Signer.
6
+ * @class
7
+ * @extends {UniSat.Signer}
8
+ */
4
9
  export declare class BitcoinSigner extends UniSat.Signer {
5
10
  readonly provider: BitcoinProvider;
11
+ /**
12
+ * Creates an instance of BitcoinSigner.
13
+ * @param {ccc.Client} client - The client instance.
14
+ * @param {BitcoinProvider} provider - The Bitcoin provider.
15
+ */
6
16
  constructor(client: ccc.Client, provider: BitcoinProvider);
7
- replaceClient(client: ccc.Client): Promise<BitcoinSigner>;
8
17
  }
9
18
  //# sourceMappingURL=signer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,qBAAa,aAAc,SAAQ,MAAM,CAAC,MAAM;aAG5B,QAAQ,EAAE,eAAe;gBADzC,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,eAAe;IAKrC,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGhE"}
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,MAAM,CAAC,MAAM;aAQ5B,QAAQ,EAAE,eAAe;IAP3C;;;;OAIG;gBAED,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,eAAe;CAI5C"}
package/dist/signer.js CHANGED
@@ -1,10 +1,17 @@
1
1
  import { UniSat } from "@ckb-ccc/uni-sat";
2
+ /**
3
+ * Class representing a Bitcoin signer that extends the UniSat Signer.
4
+ * @class
5
+ * @extends {UniSat.Signer}
6
+ */
2
7
  export class BitcoinSigner extends UniSat.Signer {
8
+ /**
9
+ * Creates an instance of BitcoinSigner.
10
+ * @param {ccc.Client} client - The client instance.
11
+ * @param {BitcoinProvider} provider - The Bitcoin provider.
12
+ */
3
13
  constructor(client, provider) {
4
14
  super(client, provider);
5
15
  this.provider = provider;
6
16
  }
7
- async replaceClient(client) {
8
- return new BitcoinSigner(client, this.provider);
9
- }
10
17
  }
@@ -1,4 +1,9 @@
1
1
  import { ccc } from "@ckb-ccc/core";
2
2
  import { BitcoinSigner } from "./signer";
3
+ /**
4
+ * Retrieves the OKX Bitcoin signer if available.
5
+ * @param {ccc.Client} client - The client instance.
6
+ * @returns {BitcoinSigner | undefined} The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
7
+ */
3
8
  export declare function getOKXBitcoinSigner(client: ccc.Client): BitcoinSigner | undefined;
4
9
  //# sourceMappingURL=signersFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signersFactory.d.ts","sourceRoot":"","sources":["../src/signersFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,GAAG,CAAC,MAAM,GACjB,aAAa,GAAG,SAAS,CAQ3B"}
1
+ {"version":3,"file":"signersFactory.d.ts","sourceRoot":"","sources":["../src/signersFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,GAAG,CAAC,MAAM,GACjB,aAAa,GAAG,SAAS,CAQ3B"}
@@ -1,8 +1,13 @@
1
1
  import { BitcoinSigner } from "./signer";
2
+ /**
3
+ * Retrieves the OKX Bitcoin signer if available.
4
+ * @param {ccc.Client} client - The client instance.
5
+ * @returns {BitcoinSigner | undefined} The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
6
+ */
2
7
  export function getOKXBitcoinSigner(client) {
3
8
  const windowRef = window;
4
9
  if (typeof windowRef.okxwallet === "undefined") {
5
- return;
10
+ return undefined;
6
11
  }
7
12
  return new BitcoinSigner(client, windowRef.okxwallet.bitcoin);
8
13
  }
@@ -1,2 +1,2 @@
1
1
  export * as OkxA from "./advancedBarrel";
2
- //# sourceMappingURL=advanced.d.ts.map
2
+ //# sourceMappingURL=advanced.d.ts.map
@@ -1,27 +1,48 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (
9
+ !desc ||
10
+ ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
11
+ ) {
12
+ desc = {
13
+ enumerable: true,
14
+ get: function () {
15
+ return m[k];
16
+ },
17
+ };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }
21
+ : function (o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ });
25
+ var __setModuleDefault =
26
+ (this && this.__setModuleDefault) ||
27
+ (Object.create
28
+ ? function (o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }
31
+ : function (o, v) {
32
+ o["default"] = v;
33
+ });
34
+ var __importStar =
35
+ (this && this.__importStar) ||
36
+ function (mod) {
19
37
  if (mod && mod.__esModule) return mod;
20
38
  var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
39
+ if (mod != null)
40
+ for (var k in mod)
41
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
42
+ __createBinding(result, mod, k);
22
43
  __setModuleDefault(result, mod);
23
44
  return result;
24
- };
45
+ };
25
46
  Object.defineProperty(exports, "__esModule", { value: true });
26
47
  exports.OkxA = void 0;
27
48
  exports.OkxA = __importStar(require("./advancedBarrel"));
@@ -1,4 +1,3 @@
1
1
  import { UniSatA } from "@ckb-ccc/uni-sat/advanced";
2
- export interface BitcoinProvider extends UniSatA.Provider {
3
- }
4
- //# sourceMappingURL=advancedBarrel.d.ts.map
2
+ export interface BitcoinProvider extends UniSatA.Provider {}
3
+ //# sourceMappingURL=advancedBarrel.d.ts.map
@@ -1,3 +1,3 @@
1
1
  export * from "./signer";
2
2
  export * from "./signersFactory";
3
- //# sourceMappingURL=barrel.d.ts.map
3
+ //# sourceMappingURL=barrel.d.ts.map
@@ -1,18 +1,34 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (
9
+ !desc ||
10
+ ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
11
+ ) {
12
+ desc = {
13
+ enumerable: true,
14
+ get: function () {
15
+ return m[k];
16
+ },
17
+ };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }
21
+ : function (o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ });
25
+ var __exportStar =
26
+ (this && this.__exportStar) ||
27
+ function (m, exports) {
28
+ for (var p in m)
29
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
30
+ __createBinding(exports, m, p);
31
+ };
16
32
  Object.defineProperty(exports, "__esModule", { value: true });
17
33
  __exportStar(require("./signer"), exports);
18
34
  __exportStar(require("./signersFactory"), exports);
@@ -1,2 +1,2 @@
1
1
  export * as Okx from "./barrel";
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,27 +1,48 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (
9
+ !desc ||
10
+ ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
11
+ ) {
12
+ desc = {
13
+ enumerable: true,
14
+ get: function () {
15
+ return m[k];
16
+ },
17
+ };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }
21
+ : function (o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ });
25
+ var __setModuleDefault =
26
+ (this && this.__setModuleDefault) ||
27
+ (Object.create
28
+ ? function (o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }
31
+ : function (o, v) {
32
+ o["default"] = v;
33
+ });
34
+ var __importStar =
35
+ (this && this.__importStar) ||
36
+ function (mod) {
19
37
  if (mod && mod.__esModule) return mod;
20
38
  var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
39
+ if (mod != null)
40
+ for (var k in mod)
41
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
42
+ __createBinding(result, mod, k);
22
43
  __setModuleDefault(result, mod);
23
44
  return result;
24
- };
45
+ };
25
46
  Object.defineProperty(exports, "__esModule", { value: true });
26
47
  exports.Okx = void 0;
27
48
  exports.Okx = __importStar(require("./barrel"));
@@ -1,9 +1,18 @@
1
1
  import { ccc } from "@ckb-ccc/core";
2
2
  import { UniSat } from "@ckb-ccc/uni-sat";
3
3
  import { BitcoinProvider } from "./advancedBarrel";
4
+ /**
5
+ * Class representing a Bitcoin signer that extends the UniSat Signer.
6
+ * @class
7
+ * @extends {UniSat.Signer}
8
+ */
4
9
  export declare class BitcoinSigner extends UniSat.Signer {
5
- readonly provider: BitcoinProvider;
6
- constructor(client: ccc.Client, provider: BitcoinProvider);
7
- replaceClient(client: ccc.Client): Promise<BitcoinSigner>;
10
+ readonly provider: BitcoinProvider;
11
+ /**
12
+ * Creates an instance of BitcoinSigner.
13
+ * @param {ccc.Client} client - The client instance.
14
+ * @param {BitcoinProvider} provider - The Bitcoin provider.
15
+ */
16
+ constructor(client: ccc.Client, provider: BitcoinProvider);
8
17
  }
9
- //# sourceMappingURL=signer.d.ts.map
18
+ //# sourceMappingURL=signer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,qBAAa,aAAc,SAAQ,MAAM,CAAC,MAAM;aAG5B,QAAQ,EAAE,eAAe;gBADzC,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,eAAe;IAKrC,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGhE"}
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,MAAM,CAAC,MAAM;aAQ5B,QAAQ,EAAE,eAAe;IAP3C;;;;OAIG;gBAED,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,eAAe;CAI5C"}
@@ -2,13 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BitcoinSigner = void 0;
4
4
  const uni_sat_1 = require("@ckb-ccc/uni-sat");
5
+ /**
6
+ * Class representing a Bitcoin signer that extends the UniSat Signer.
7
+ * @class
8
+ * @extends {UniSat.Signer}
9
+ */
5
10
  class BitcoinSigner extends uni_sat_1.UniSat.Signer {
6
- constructor(client, provider) {
7
- super(client, provider);
8
- this.provider = provider;
9
- }
10
- async replaceClient(client) {
11
- return new BitcoinSigner(client, this.provider);
12
- }
11
+ /**
12
+ * Creates an instance of BitcoinSigner.
13
+ * @param {ccc.Client} client - The client instance.
14
+ * @param {BitcoinProvider} provider - The Bitcoin provider.
15
+ */
16
+ constructor(client, provider) {
17
+ super(client, provider);
18
+ this.provider = provider;
19
+ }
13
20
  }
14
21
  exports.BitcoinSigner = BitcoinSigner;
@@ -1,4 +1,11 @@
1
1
  import { ccc } from "@ckb-ccc/core";
2
2
  import { BitcoinSigner } from "./signer";
3
- export declare function getOKXBitcoinSigner(client: ccc.Client): BitcoinSigner | undefined;
4
- //# sourceMappingURL=signersFactory.d.ts.map
3
+ /**
4
+ * Retrieves the OKX Bitcoin signer if available.
5
+ * @param {ccc.Client} client - The client instance.
6
+ * @returns {BitcoinSigner | undefined} The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
7
+ */
8
+ export declare function getOKXBitcoinSigner(
9
+ client: ccc.Client,
10
+ ): BitcoinSigner | undefined;
11
+ //# sourceMappingURL=signersFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signersFactory.d.ts","sourceRoot":"","sources":["../src/signersFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,GAAG,CAAC,MAAM,GACjB,aAAa,GAAG,SAAS,CAQ3B"}
1
+ {"version":3,"file":"signersFactory.d.ts","sourceRoot":"","sources":["../src/signersFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,GAAG,CAAC,MAAM,GACjB,aAAa,GAAG,SAAS,CAQ3B"}
@@ -2,11 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOKXBitcoinSigner = void 0;
4
4
  const signer_1 = require("./signer");
5
+ /**
6
+ * Retrieves the OKX Bitcoin signer if available.
7
+ * @param {ccc.Client} client - The client instance.
8
+ * @returns {BitcoinSigner | undefined} The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
9
+ */
5
10
  function getOKXBitcoinSigner(client) {
6
- const windowRef = window;
7
- if (typeof windowRef.okxwallet === "undefined") {
8
- return;
9
- }
10
- return new signer_1.BitcoinSigner(client, windowRef.okxwallet.bitcoin);
11
+ const windowRef = window;
12
+ if (typeof windowRef.okxwallet === "undefined") {
13
+ return undefined;
14
+ }
15
+ return new signer_1.BitcoinSigner(client, windowRef.okxwallet.bitcoin);
11
16
  }
12
17
  exports.getOKXBitcoinSigner = getOKXBitcoinSigner;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckb-ccc/okx",
3
- "version": "0.0.5-alpha.8",
3
+ "version": "0.0.7-alpha.0",
4
4
  "description": "Common Chains Connector's support for OKX",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
@@ -42,8 +42,8 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@ckb-ccc/core": "0.0.5-alpha.8",
46
- "@ckb-ccc/uni-sat": "0.0.5-alpha.8"
45
+ "@ckb-ccc/core": "0.0.7-alpha.0",
46
+ "@ckb-ccc/uni-sat": "0.0.7-alpha.0"
47
47
  },
48
- "gitHead": "f12b8758d8581bfae0c9a00abbb5f7d2c6d03147"
48
+ "gitHead": "99d88c6179e7af6f592b1b39f8df6f6968cc0df3"
49
49
  }
package/src/signer.ts CHANGED
@@ -2,15 +2,21 @@ import { ccc } from "@ckb-ccc/core";
2
2
  import { UniSat } from "@ckb-ccc/uni-sat";
3
3
  import { BitcoinProvider } from "./advancedBarrel";
4
4
 
5
+ /**
6
+ * Class representing a Bitcoin signer that extends the UniSat Signer.
7
+ * @class
8
+ * @extends {UniSat.Signer}
9
+ */
5
10
  export class BitcoinSigner extends UniSat.Signer {
11
+ /**
12
+ * Creates an instance of BitcoinSigner.
13
+ * @param {ccc.Client} client - The client instance.
14
+ * @param {BitcoinProvider} provider - The Bitcoin provider.
15
+ */
6
16
  constructor(
7
17
  client: ccc.Client,
8
18
  public readonly provider: BitcoinProvider,
9
19
  ) {
10
20
  super(client, provider);
11
21
  }
12
-
13
- async replaceClient(client: ccc.Client): Promise<BitcoinSigner> {
14
- return new BitcoinSigner(client, this.provider);
15
- }
16
22
  }
@@ -2,13 +2,18 @@ import { ccc } from "@ckb-ccc/core";
2
2
  import { BitcoinProvider } from "./advancedBarrel";
3
3
  import { BitcoinSigner } from "./signer";
4
4
 
5
+ /**
6
+ * Retrieves the OKX Bitcoin signer if available.
7
+ * @param {ccc.Client} client - The client instance.
8
+ * @returns {BitcoinSigner | undefined} The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
9
+ */
5
10
  export function getOKXBitcoinSigner(
6
11
  client: ccc.Client,
7
12
  ): BitcoinSigner | undefined {
8
13
  const windowRef = window as { okxwallet?: { bitcoin: BitcoinProvider } };
9
14
 
10
15
  if (typeof windowRef.okxwallet === "undefined") {
11
- return;
16
+ return undefined;
12
17
  }
13
18
 
14
19
  return new BitcoinSigner(client, windowRef.okxwallet.bitcoin);