@ckb-ccc/okx 0.0.12-alpha.7 → 0.0.12

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/src/btc/index.ts CHANGED
@@ -2,17 +2,17 @@ import { ccc } from "@ckb-ccc/core";
2
2
  import { BitcoinProvider } from "../advancedBarrel.js";
3
3
 
4
4
  /**
5
- * Class representing a Bitcoin signer that extends SignerBtc from @ckb-ccc/core.
6
- * @class
7
- * @extends {ccc.SignerBtc}
5
+ * Class representing a Bitcoin signer that extends SignerBtc
6
+ * @public
8
7
  */
9
8
  export class BitcoinSigner extends ccc.SignerBtc {
10
9
  private network = "btcTestnet";
11
10
 
12
11
  /**
13
12
  * Creates an instance of Signer.
14
- * @param {ccc.Client} client - The client instance.
15
- * @param {Provider} provider - The provider instance.
13
+ * @param client - The client instance.
14
+ * @param providers - The providers instance.
15
+ * @param preferredNetworks - All preferred networks
16
16
  */
17
17
  constructor(
18
18
  client: ccc.Client,
@@ -61,7 +61,7 @@ export class BitcoinSigner extends ccc.SignerBtc {
61
61
 
62
62
  /**
63
63
  * Gets the Bitcoin account address.
64
- * @returns {Promise<string>} A promise that resolves to the Bitcoin account address.
64
+ * @returns A promise that resolves to the Bitcoin account address.
65
65
  */
66
66
  async getBtcAccount(): Promise<string> {
67
67
  if (this.provider.getAccounts) {
@@ -85,7 +85,7 @@ export class BitcoinSigner extends ccc.SignerBtc {
85
85
 
86
86
  /**
87
87
  * Gets the Bitcoin public key.
88
- * @returns {Promise<ccc.Hex>} A promise that resolves to the Bitcoin public key.
88
+ * @returns A promise that resolves to the Bitcoin public key.
89
89
  */
90
90
  async getBtcPublicKey(): Promise<ccc.Hex> {
91
91
  if (this.provider.getPublicKey) {
@@ -105,7 +105,7 @@ export class BitcoinSigner extends ccc.SignerBtc {
105
105
 
106
106
  /**
107
107
  * Connects to the provider by requesting accounts.
108
- * @returns {Promise<void>} A promise that resolves when the connection is established.
108
+ * @returns A promise that resolves when the connection is established.
109
109
  */
110
110
  async connect(): Promise<void> {
111
111
  if (this.provider.requestAccounts) {
@@ -138,7 +138,7 @@ export class BitcoinSigner extends ccc.SignerBtc {
138
138
 
139
139
  /**
140
140
  * Checks if the signer is connected.
141
- * @returns {Promise<boolean>} A promise that resolves to true if connected, false otherwise.
141
+ * @returns A promise that resolves to true if connected, false otherwise.
142
142
  */
143
143
  async isConnected(): Promise<boolean> {
144
144
  try {
@@ -163,8 +163,8 @@ export class BitcoinSigner extends ccc.SignerBtc {
163
163
 
164
164
  /**
165
165
  * Signs a raw message with the Bitcoin account.
166
- * @param {string | ccc.BytesLike} message - The message to sign.
167
- * @returns {Promise<string>} A promise that resolves to the signed message.
166
+ * @param message - The message to sign.
167
+ * @returns A promise that resolves to the signed message.
168
168
  */
169
169
  async signMessageRaw(message: string | ccc.BytesLike): Promise<string> {
170
170
  const challenge =
@@ -2,9 +2,8 @@ import { ccc } from "@ckb-ccc/core";
2
2
  import { NostrProvider } from "../advancedBarrel.js";
3
3
 
4
4
  /**
5
- * Class representing a Bitcoin signer that extends SignerBtc from @ckb-ccc/core.
6
- * @class
7
- * @extends {ccc.SignerBtc}
5
+ * Class representing a Bitcoin signer that extends SignerBtc
6
+ * @public
8
7
  */
9
8
  export class NostrSigner extends ccc.SignerNostr {
10
9
  private publicKeyCache?: Promise<string> = undefined;
@@ -5,8 +5,10 @@ import { NostrSigner } from "./nostr/index.js";
5
5
 
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
  export function getOKXSigners(
12
14
  client: ccc.Client,
package/typedoc.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://typedoc.org/schema.json",
3
+ "entryPoints": ["./src/index.ts", "./src/advanced.ts"],
4
+ "extends": ["../../typedoc.base.json"],
5
+ "name": "@ckb-ccc okx"
6
+ }