@ckb-ccc/okx 0.0.12-alpha.7 → 0.0.13-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.
@@ -3,159 +3,147 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BitcoinSigner = void 0;
4
4
  const core_1 = require("@ckb-ccc/core");
5
5
  /**
6
- * Class representing a Bitcoin signer that extends SignerBtc from @ckb-ccc/core.
7
- * @class
8
- * @extends {ccc.SignerBtc}
6
+ * Class representing a Bitcoin signer that extends SignerBtc
7
+ * @public
9
8
  */
10
9
  class BitcoinSigner extends core_1.ccc.SignerBtc {
11
- /**
12
- * Creates an instance of Signer.
13
- * @param {ccc.Client} client - The client instance.
14
- * @param {Provider} provider - The provider instance.
15
- */
16
- constructor(
17
- client,
18
- providers,
19
- preferredNetworks = [
20
- {
21
- addressPrefix: "ckb",
22
- signerType: core_1.ccc.SignerType.BTC,
23
- network: "btc",
24
- },
25
- {
26
- addressPrefix: "ckt",
27
- signerType: core_1.ccc.SignerType.BTC,
28
- network: "btcTestnet",
29
- },
30
- ],
31
- ) {
32
- super(client);
33
- this.providers = providers;
34
- this.preferredNetworks = preferredNetworks;
35
- this.network = "btcTestnet";
36
- }
37
- get provider() {
38
- const { network } = this.matchNetworkPreference(
39
- this.preferredNetworks,
40
- this.network,
41
- ) ?? { network: this.network };
42
- this.network = network;
43
- const chain = {
44
- btc: "bitcoin",
45
- btcTestnet: "bitcoinTestnet",
46
- btcSignet: "bitcoinSignet",
47
- }[network];
48
- if (!chain) {
49
- throw new Error(
50
- `OKX wallet doesn't support the requested chain ${this.network}`,
51
- );
10
+ /**
11
+ * Creates an instance of Signer.
12
+ * @param client - The client instance.
13
+ * @param providers - The providers instance.
14
+ * @param preferredNetworks - All preferred networks
15
+ */
16
+ constructor(client, providers, preferredNetworks = [
17
+ {
18
+ addressPrefix: "ckb",
19
+ signerType: core_1.ccc.SignerType.BTC,
20
+ network: "btc",
21
+ },
22
+ {
23
+ addressPrefix: "ckt",
24
+ signerType: core_1.ccc.SignerType.BTC,
25
+ network: "btcTestnet",
26
+ },
27
+ ]) {
28
+ super(client);
29
+ this.providers = providers;
30
+ this.preferredNetworks = preferredNetworks;
31
+ this.network = "btcTestnet";
52
32
  }
53
- const provider = this.providers[chain];
54
- if (!provider) {
55
- throw new Error(
56
- `OKX wallet doesn't support the requested chain ${this.network}`,
57
- );
33
+ get provider() {
34
+ const { network } = this.matchNetworkPreference(this.preferredNetworks, this.network) ?? { network: this.network };
35
+ this.network = network;
36
+ const chain = {
37
+ btc: "bitcoin",
38
+ btcTestnet: "bitcoinTestnet",
39
+ btcSignet: "bitcoinSignet",
40
+ }[network];
41
+ if (!chain) {
42
+ throw new Error(`OKX wallet doesn't support the requested chain ${this.network}`);
43
+ }
44
+ const provider = this.providers[chain];
45
+ if (!provider) {
46
+ throw new Error(`OKX wallet doesn't support the requested chain ${this.network}`);
47
+ }
48
+ return provider;
58
49
  }
59
- return provider;
60
- }
61
- /**
62
- * Gets the Bitcoin account address.
63
- * @returns {Promise<string>} A promise that resolves to the Bitcoin account address.
64
- */
65
- async getBtcAccount() {
66
- if (this.provider.getAccounts) {
67
- const address = (await this.provider.getAccounts())[0];
68
- if (!address) {
69
- throw Error("Not connected");
70
- }
71
- return address;
50
+ /**
51
+ * Gets the Bitcoin account address.
52
+ * @returns A promise that resolves to the Bitcoin account address.
53
+ */
54
+ async getBtcAccount() {
55
+ if (this.provider.getAccounts) {
56
+ const address = (await this.provider.getAccounts())[0];
57
+ if (!address) {
58
+ throw Error("Not connected");
59
+ }
60
+ return address;
61
+ }
62
+ if (this.provider.getSelectedAccount) {
63
+ const account = await this.provider.getSelectedAccount();
64
+ if (!account) {
65
+ throw Error("Not connected");
66
+ }
67
+ return account.address;
68
+ }
69
+ throw Error("Unsupported OKX provider");
72
70
  }
73
- if (this.provider.getSelectedAccount) {
74
- const account = await this.provider.getSelectedAccount();
75
- if (!account) {
76
- throw Error("Not connected");
77
- }
78
- return account.address;
71
+ /**
72
+ * Gets the Bitcoin public key.
73
+ * @returns A promise that resolves to the Bitcoin public key.
74
+ */
75
+ async getBtcPublicKey() {
76
+ if (this.provider.getPublicKey) {
77
+ return core_1.ccc.hexFrom(await this.provider.getPublicKey());
78
+ }
79
+ if (this.provider.getSelectedAccount) {
80
+ const account = await this.provider.getSelectedAccount();
81
+ if (!account) {
82
+ throw Error("Not connected");
83
+ }
84
+ return core_1.ccc.hexFrom(account.compressedPublicKey);
85
+ }
86
+ throw Error("Unsupported OKX provider");
79
87
  }
80
- throw Error("Unsupported OKX provider");
81
- }
82
- /**
83
- * Gets the Bitcoin public key.
84
- * @returns {Promise<ccc.Hex>} A promise that resolves to the Bitcoin public key.
85
- */
86
- async getBtcPublicKey() {
87
- if (this.provider.getPublicKey) {
88
- return core_1.ccc.hexFrom(await this.provider.getPublicKey());
88
+ /**
89
+ * Connects to the provider by requesting accounts.
90
+ * @returns A promise that resolves when the connection is established.
91
+ */
92
+ async connect() {
93
+ if (this.provider.requestAccounts) {
94
+ await this.provider.requestAccounts();
95
+ return;
96
+ }
97
+ if (this.provider.connect) {
98
+ await this.provider.connect();
99
+ return;
100
+ }
101
+ throw Error("Unsupported OKX provider");
89
102
  }
90
- if (this.provider.getSelectedAccount) {
91
- const account = await this.provider.getSelectedAccount();
92
- if (!account) {
93
- throw Error("Not connected");
94
- }
95
- return core_1.ccc.hexFrom(account.compressedPublicKey);
103
+ onReplaced(listener) {
104
+ const stop = [];
105
+ const replacer = async () => {
106
+ listener();
107
+ stop[0]?.();
108
+ };
109
+ stop.push(() => {
110
+ this.provider.removeListener("accountChanged", replacer);
111
+ });
112
+ this.provider.on("accountChanged", replacer);
113
+ return stop[0];
96
114
  }
97
- throw Error("Unsupported OKX provider");
98
- }
99
- /**
100
- * Connects to the provider by requesting accounts.
101
- * @returns {Promise<void>} A promise that resolves when the connection is established.
102
- */
103
- async connect() {
104
- if (this.provider.requestAccounts) {
105
- await this.provider.requestAccounts();
106
- return;
115
+ /**
116
+ * Checks if the signer is connected.
117
+ * @returns A promise that resolves to true if connected, false otherwise.
118
+ */
119
+ async isConnected() {
120
+ try {
121
+ this.provider;
122
+ }
123
+ catch (_) {
124
+ return false;
125
+ }
126
+ if (this.provider.getAccounts) {
127
+ if ((await this.provider.getAccounts()).length === 0) {
128
+ return false;
129
+ }
130
+ }
131
+ else if (this.provider.getSelectedAccount) {
132
+ if ((await this.provider.getSelectedAccount()) === null) {
133
+ return false;
134
+ }
135
+ }
136
+ await this.connect();
137
+ return true;
107
138
  }
108
- if (this.provider.connect) {
109
- await this.provider.connect();
110
- return;
139
+ /**
140
+ * Signs a raw message with the Bitcoin account.
141
+ * @param message - The message to sign.
142
+ * @returns A promise that resolves to the signed message.
143
+ */
144
+ async signMessageRaw(message) {
145
+ const challenge = typeof message === "string" ? message : core_1.ccc.hexFrom(message).slice(2);
146
+ return this.provider.signMessage(challenge, "ecdsa");
111
147
  }
112
- throw Error("Unsupported OKX provider");
113
- }
114
- onReplaced(listener) {
115
- const stop = [];
116
- const replacer = async () => {
117
- listener();
118
- stop[0]?.();
119
- };
120
- stop.push(() => {
121
- this.provider.removeListener("accountChanged", replacer);
122
- });
123
- this.provider.on("accountChanged", replacer);
124
- return stop[0];
125
- }
126
- /**
127
- * Checks if the signer is connected.
128
- * @returns {Promise<boolean>} A promise that resolves to true if connected, false otherwise.
129
- */
130
- async isConnected() {
131
- try {
132
- this.provider;
133
- } catch (_) {
134
- return false;
135
- }
136
- if (this.provider.getAccounts) {
137
- if ((await this.provider.getAccounts()).length === 0) {
138
- return false;
139
- }
140
- } else if (this.provider.getSelectedAccount) {
141
- if ((await this.provider.getSelectedAccount()) === null) {
142
- return false;
143
- }
144
- }
145
- await this.connect();
146
- return true;
147
- }
148
- /**
149
- * Signs a raw message with the Bitcoin account.
150
- * @param {string | ccc.BytesLike} message - The message to sign.
151
- * @returns {Promise<string>} A promise that resolves to the signed message.
152
- */
153
- async signMessageRaw(message) {
154
- const challenge =
155
- typeof message === "string"
156
- ? message
157
- : core_1.ccc.hexFrom(message).slice(2);
158
- return this.provider.signMessage(challenge, "ecdsa");
159
- }
160
148
  }
161
149
  exports.BitcoinSigner = BitcoinSigner;
@@ -1,2 +1,2 @@
1
1
  export * as Okx from "./barrel.js";
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,48 +1,27 @@
1
1
  "use strict";
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) {
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) {
37
19
  if (mod && mod.__esModule) return mod;
38
20
  var result = {};
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);
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43
22
  __setModuleDefault(result, mod);
44
23
  return result;
45
- };
24
+ };
46
25
  Object.defineProperty(exports, "__esModule", { value: true });
47
26
  exports.Okx = void 0;
48
27
  exports.Okx = __importStar(require("./barrel.js"));
@@ -1,18 +1,17 @@
1
1
  import { ccc } from "@ckb-ccc/core";
2
2
  import { NostrProvider } from "../advancedBarrel.js";
3
3
  /**
4
- * Class representing a Bitcoin signer that extends SignerBtc from @ckb-ccc/core.
5
- * @class
6
- * @extends {ccc.SignerBtc}
4
+ * Class representing a Bitcoin signer that extends SignerBtc
5
+ * @public
7
6
  */
8
7
  export declare class NostrSigner extends ccc.SignerNostr {
9
- readonly provider: NostrProvider;
10
- private publicKeyCache?;
11
- constructor(client: ccc.Client, provider: NostrProvider);
12
- getNostrPublicKey(): Promise<ccc.Hex>;
13
- signNostrEvent(event: ccc.NostrEvent): Promise<Required<ccc.NostrEvent>>;
14
- connect(): Promise<void>;
15
- onReplaced(listener: () => void): () => void;
16
- isConnected(): Promise<boolean>;
8
+ readonly provider: NostrProvider;
9
+ private publicKeyCache?;
10
+ constructor(client: ccc.Client, provider: NostrProvider);
11
+ getNostrPublicKey(): Promise<ccc.Hex>;
12
+ signNostrEvent(event: ccc.NostrEvent): Promise<Required<ccc.NostrEvent>>;
13
+ connect(): Promise<void>;
14
+ onReplaced(listener: () => void): () => void;
15
+ isConnected(): Promise<boolean>;
17
16
  }
18
- //# sourceMappingURL=index.d.ts.map
17
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nostr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,GAAG,CAAC,WAAW;aAK5B,QAAQ,EAAE,aAAa;IAJzC,OAAO,CAAC,cAAc,CAAC,CAA8B;gBAGnD,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,aAAa;IAKnC,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAsBrC,cAAc,CAClB,KAAK,EAAE,GAAG,CAAC,UAAU,GACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAO9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAM9B,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAetC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAGtC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nostr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;GAGG;AACH,qBAAa,WAAY,SAAQ,GAAG,CAAC,WAAW;aAK5B,QAAQ,EAAE,aAAa;IAJzC,OAAO,CAAC,cAAc,CAAC,CAA8B;gBAGnD,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,aAAa;IAKnC,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAsBrC,cAAc,CAClB,KAAK,EAAE,GAAG,CAAC,UAAU,GACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAO9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAM9B,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAetC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAGtC"}
@@ -3,59 +3,58 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NostrSigner = void 0;
4
4
  const core_1 = require("@ckb-ccc/core");
5
5
  /**
6
- * Class representing a Bitcoin signer that extends SignerBtc from @ckb-ccc/core.
7
- * @class
8
- * @extends {ccc.SignerBtc}
6
+ * Class representing a Bitcoin signer that extends SignerBtc
7
+ * @public
9
8
  */
10
9
  class NostrSigner extends core_1.ccc.SignerNostr {
11
- constructor(client, provider) {
12
- super(client);
13
- this.provider = provider;
14
- this.publicKeyCache = undefined;
15
- }
16
- async getNostrPublicKey() {
17
- if (!this.publicKeyCache) {
18
- this.publicKeyCache = this.provider
19
- .getPublicKey()
20
- .then((v) => {
21
- // For some account types of OKX Wallet, this might returns null
22
- // e.g. Keyless accounts
23
- if (v) {
24
- return v;
25
- }
26
- throw Error("This OKX Wallet account does not support Nostr");
27
- })
28
- .catch((e) => {
29
- this.publicKeyCache = undefined;
30
- throw e;
10
+ constructor(client, provider) {
11
+ super(client);
12
+ this.provider = provider;
13
+ this.publicKeyCache = undefined;
14
+ }
15
+ async getNostrPublicKey() {
16
+ if (!this.publicKeyCache) {
17
+ this.publicKeyCache = this.provider
18
+ .getPublicKey()
19
+ .then((v) => {
20
+ // For some account types of OKX Wallet, this might returns null
21
+ // e.g. Keyless accounts
22
+ if (v) {
23
+ return v;
24
+ }
25
+ throw Error("This OKX Wallet account does not support Nostr");
26
+ })
27
+ .catch((e) => {
28
+ this.publicKeyCache = undefined;
29
+ throw e;
30
+ });
31
+ }
32
+ return core_1.ccc.hexFrom(await this.publicKeyCache);
33
+ }
34
+ async signNostrEvent(event) {
35
+ return this.provider.signEvent({
36
+ ...event,
37
+ pubkey: await this.publicKeyCache,
38
+ });
39
+ }
40
+ async connect() {
41
+ await this.provider.connect?.(); // Help extension to switch network
42
+ await this.getNostrPublicKey();
43
+ }
44
+ onReplaced(listener) {
45
+ const stop = [];
46
+ const replacer = async () => {
47
+ listener();
48
+ stop[0]?.();
49
+ };
50
+ stop.push(() => {
51
+ this.provider.removeListener("accountChanged", replacer);
31
52
  });
53
+ this.provider.on("accountChanged", replacer);
54
+ return stop[0];
55
+ }
56
+ async isConnected() {
57
+ return true;
32
58
  }
33
- return core_1.ccc.hexFrom(await this.publicKeyCache);
34
- }
35
- async signNostrEvent(event) {
36
- return this.provider.signEvent({
37
- ...event,
38
- pubkey: await this.publicKeyCache,
39
- });
40
- }
41
- async connect() {
42
- await this.provider.connect?.(); // Help extension to switch network
43
- await this.getNostrPublicKey();
44
- }
45
- onReplaced(listener) {
46
- const stop = [];
47
- const replacer = async () => {
48
- listener();
49
- stop[0]?.();
50
- };
51
- stop.push(() => {
52
- this.provider.removeListener("accountChanged", replacer);
53
- });
54
- this.provider.on("accountChanged", replacer);
55
- return stop[0];
56
- }
57
- async isConnected() {
58
- return true;
59
- }
60
59
  }
61
60
  exports.NostrSigner = NostrSigner;
@@ -1,11 +1,10 @@
1
1
  import { ccc } from "@ckb-ccc/core";
2
2
  /**
3
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.
4
+ * @public
5
+ *
6
+ * @param client - The client instance.
7
+ * @returns The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
6
8
  */
7
- export declare function getOKXSigners(
8
- client: ccc.Client,
9
- preferredNetworks?: ccc.NetworkPreference[],
10
- ): ccc.SignerInfo[];
11
- //# sourceMappingURL=signersFactory.d.ts.map
9
+ export declare function getOKXSigners(client: ccc.Client, preferredNetworks?: ccc.NetworkPreference[]): ccc.SignerInfo[];
10
+ //# 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;AAKpC;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,GAAG,CAAC,MAAM,EAClB,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,GAC1C,GAAG,CAAC,UAAU,EAAE,CAmBlB"}
1
+ {"version":3,"file":"signersFactory.d.ts","sourceRoot":"","sources":["../src/signersFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKpC;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,GAAG,CAAC,MAAM,EAClB,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,GAC1C,GAAG,CAAC,UAAU,EAAE,CAmBlB"}
@@ -5,27 +5,25 @@ const index_js_1 = require("./btc/index.js");
5
5
  const index_js_2 = require("./nostr/index.js");
6
6
  /**
7
7
  * Retrieves the OKX Bitcoin signer if available.
8
- * @param {ccc.Client} client - The client instance.
9
- * @returns {BitcoinSigner | undefined} The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
8
+ * @public
9
+ *
10
+ * @param client - The client instance.
11
+ * @returns The BitcoinSigner instance if the OKX wallet is available, otherwise undefined.
10
12
  */
11
13
  function getOKXSigners(client, preferredNetworks) {
12
- const windowRef = window;
13
- if (typeof windowRef.okxwallet === "undefined") {
14
- return [];
15
- }
16
- return [
17
- {
18
- signer: new index_js_1.BitcoinSigner(
19
- client,
20
- windowRef.okxwallet,
21
- preferredNetworks,
22
- ),
23
- name: "BTC",
24
- },
25
- {
26
- signer: new index_js_2.NostrSigner(client, windowRef.okxwallet.nostr),
27
- name: "Nostr",
28
- },
29
- ];
14
+ const windowRef = window;
15
+ if (typeof windowRef.okxwallet === "undefined") {
16
+ return [];
17
+ }
18
+ return [
19
+ {
20
+ signer: new index_js_1.BitcoinSigner(client, windowRef.okxwallet, preferredNetworks),
21
+ name: "BTC",
22
+ },
23
+ {
24
+ signer: new index_js_2.NostrSigner(client, windowRef.okxwallet.nostr),
25
+ name: "Nostr",
26
+ },
27
+ ];
30
28
  }
31
29
  exports.getOKXSigners = getOKXSigners;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckb-ccc/okx",
3
- "version": "0.0.12-alpha.7",
3
+ "version": "0.0.13-alpha.0",
4
4
  "description": "CCC - CKBer's Codebase. Common Chains Connector's support for OKX",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
@@ -38,9 +38,9 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@ckb-ccc/core": "0.0.12-alpha.1",
42
- "@ckb-ccc/nip07": "0.0.12-alpha.2",
43
- "@ckb-ccc/uni-sat": "0.0.12-alpha.1"
41
+ "@ckb-ccc/core": "0.0.13-alpha.0",
42
+ "@ckb-ccc/uni-sat": "0.0.13-alpha.0",
43
+ "@ckb-ccc/nip07": "0.0.13-alpha.0"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "rimraf ./dist && rimraf ./dist.commonjs && tsc && tsc --project tsconfig.commonjs.json && copyfiles -u 2 misc/basedirs/**/* .",
@@ -39,7 +39,6 @@ export interface NostrProvider extends Nip07A.Provider {
39
39
 
40
40
  /**
41
41
  * Interface representing a method to add event listeners to the provider.
42
- * @interface
43
42
  */
44
43
  export interface NostrOnMethod {
45
44
  /**