@ckb-ccc/nip07 0.0.8-alpha.2 → 0.0.8-alpha.4

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/README.md CHANGED
@@ -21,11 +21,13 @@
21
21
  </p>
22
22
 
23
23
  <p align="center">
24
- "Common Chains Connector" is where CCC begins.
24
+ "CCC - CKBers' Codebase" is the next step of "Common Chains Connector".
25
25
  <br />
26
- CCC helps you to interoperate wallets from different chain ecosystems with CKB,
26
+ Empower yourself with CCC to discover the unlimited potential of CKB.
27
27
  <br />
28
- fully enabling CKB's cryptographic freedom power.
28
+ Interoperate with wallets from different chain ecosystems.
29
+ <br />
30
+ Fully enabling CKB's Turing completeness and cryptographic freedom power.
29
31
  </p>
30
32
 
31
33
  ## Preview
@@ -36,7 +38,7 @@
36
38
  </a>
37
39
  </p>
38
40
 
39
- This project is still under active development, and we are looking forward to your feedback. [Try its demo now here](https://ckbccc-demo.vercel.app/).
41
+ This project is still under active development, and we are looking forward to your feedback. [Try its demo now here](https://ckbccc-demo.vercel.app/). It showcases how to use CCC for some basic scenarios in CKB.
40
42
 
41
43
  <h3 align="center">
42
44
  Read more about CCC on its <a href="https://github.com/ckb-ecofund/ccc">GitHub Repo</a>.
package/dist/signer.d.ts CHANGED
@@ -6,7 +6,6 @@ export declare class Signer extends ccc.SignerNostr {
6
6
  private readonly connectionsRepo;
7
7
  private publicKey;
8
8
  constructor(client: ccc.Client, provider: Provider, connectionsRepo?: ConnectionsRepo);
9
- static isValidClient(client: ccc.Client): boolean;
10
9
  replaceClient(client: ccc.Client): Promise<boolean>;
11
10
  getNostrPublicKey(): Promise<ccc.Hex>;
12
11
  signNostrEvent(event: ccc.NostrEvent): Promise<Required<ccc.NostrEvent>>;
@@ -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,OA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AC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAInD,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAarC,cAAc,CAClB,KAAK,EAAE,GAAG,CAAC,UAAU,GACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAI9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAKxB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAQtC"}
package/dist/signer.js CHANGED
@@ -7,13 +7,7 @@ export class Signer extends ccc.SignerNostr {
7
7
  this.connectionsRepo = connectionsRepo;
8
8
  this.publicKey = undefined;
9
9
  }
10
- static isValidClient(client) {
11
- return client.addressPrefix === "ckt";
12
- }
13
10
  async replaceClient(client) {
14
- if (!Signer.isValidClient(client)) {
15
- return false;
16
- }
17
11
  return super.replaceClient(client);
18
12
  }
19
13
  async getNostrPublicKey() {
@@ -1,7 +1,7 @@
1
1
  import { Signer } from "./signer";
2
2
  export function getNip07Signer(client) {
3
3
  const windowRef = window;
4
- if (typeof windowRef.nostr === "undefined" || !Signer.isValidClient(client)) {
4
+ if (typeof windowRef.nostr === "undefined") {
5
5
  return;
6
6
  }
7
7
  return new Signer(client, windowRef.nostr);
@@ -6,7 +6,6 @@ export declare class Signer extends ccc.SignerNostr {
6
6
  private readonly connectionsRepo;
7
7
  private publicKey;
8
8
  constructor(client: ccc.Client, provider: Provider, connectionsRepo?: ConnectionsRepo);
9
- static isValidClient(client: ccc.Client): boolean;
10
9
  replaceClient(client: ccc.Client): Promise<boolean>;
11
10
  getNostrPublicKey(): Promise<ccc.Hex>;
12
11
  signNostrEvent(event: ccc.NostrEvent): Promise<Required<ccc.NostrEvent>>;
@@ -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,EACL,eAAe,EAEhB,MA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AC,OAAO,CAAC;IAInD,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAarC,cAAc,CAClB,KAAK,EAAE,GAAG,CAAC,UAAU,GACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAI9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAKxB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAQtC"}
@@ -10,13 +10,7 @@ class Signer extends core_1.ccc.SignerNostr {
10
10
  this.connectionsRepo = connectionsRepo;
11
11
  this.publicKey = undefined;
12
12
  }
13
- static isValidClient(client) {
14
- return client.addressPrefix === "ckt";
15
- }
16
13
  async replaceClient(client) {
17
- if (!Signer.isValidClient(client)) {
18
- return false;
19
- }
20
14
  return super.replaceClient(client);
21
15
  }
22
16
  async getNostrPublicKey() {
@@ -4,7 +4,7 @@ exports.getNip07Signer = void 0;
4
4
  const signer_1 = require("./signer");
5
5
  function getNip07Signer(client) {
6
6
  const windowRef = window;
7
- if (typeof windowRef.nostr === "undefined" || !signer_1.Signer.isValidClient(client)) {
7
+ if (typeof windowRef.nostr === "undefined") {
8
8
  return;
9
9
  }
10
10
  return new signer_1.Signer(client, windowRef.nostr);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ckb-ccc/nip07",
3
- "version": "0.0.8-alpha.2",
4
- "description": "Common Chains Connector's support for NIP07",
3
+ "version": "0.0.8-alpha.4",
4
+ "description": "CCC - CKBer's Codebase. Common Chains Connector's support for NIP07",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -42,7 +42,7 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@ckb-ccc/core": "0.0.7-alpha.2"
45
+ "@ckb-ccc/core": "0.0.8-alpha.4"
46
46
  },
47
- "gitHead": "ca01248c0bb4c59c7e3ce83ec5fc50d9de4f7d93"
47
+ "gitHead": "444a378be18f46f5d13b18848fa90829755d5ff8"
48
48
  }
package/src/signer.ts CHANGED
@@ -16,14 +16,7 @@ export class Signer extends ccc.SignerNostr {
16
16
  super(client);
17
17
  }
18
18
 
19
- static isValidClient(client: ccc.Client): boolean {
20
- return client.addressPrefix === "ckt";
21
- }
22
-
23
19
  async replaceClient(client: ccc.Client): Promise<boolean> {
24
- if (!Signer.isValidClient(client)) {
25
- return false;
26
- }
27
20
  return super.replaceClient(client);
28
21
  }
29
22
 
@@ -5,7 +5,7 @@ import { Signer } from "./signer";
5
5
  export function getNip07Signer(client: ccc.Client): Signer | undefined {
6
6
  const windowRef = window as { nostr?: Provider };
7
7
 
8
- if (typeof windowRef.nostr === "undefined" || !Signer.isValidClient(client)) {
8
+ if (typeof windowRef.nostr === "undefined") {
9
9
  return;
10
10
  }
11
11