@ckb-ccc/nip07 0.0.8-alpha.1 → 0.0.8-alpha.3
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 +6 -4
- package/dist/signer.js +3 -5
- package/dist.commonjs/signer.js +3 -4
- package/package.json +3 -3
- package/src/signer.ts +4 -4
package/README.md
CHANGED
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
<p align="center">
|
|
24
|
-
"
|
|
24
|
+
"CCC - CKBers' Codebase" is the next step of "Common Chains Connector".
|
|
25
25
|
<br />
|
|
26
|
-
|
|
26
|
+
Empower yourself with CCC to discover the unlimited potential of CKB.
|
|
27
27
|
<br />
|
|
28
|
-
|
|
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.js
CHANGED
|
@@ -34,12 +34,10 @@ export class Signer extends ccc.SignerNostr {
|
|
|
34
34
|
await this.connectionsRepo.set({ publicKey: this.publicKey });
|
|
35
35
|
}
|
|
36
36
|
async isConnected() {
|
|
37
|
-
|
|
38
|
-
await this.getNostrPublicKey();
|
|
37
|
+
if (this.publicKey) {
|
|
39
38
|
return true;
|
|
40
39
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
40
|
+
this.publicKey = (await this.connectionsRepo.get())?.publicKey;
|
|
41
|
+
return this.publicKey !== undefined;
|
|
44
42
|
}
|
|
45
43
|
}
|
package/dist.commonjs/signer.js
CHANGED
|
@@ -41,12 +41,11 @@ class Signer extends core_1.ccc.SignerNostr {
|
|
|
41
41
|
await this.connectionsRepo.set({ publicKey: this.publicKey });
|
|
42
42
|
}
|
|
43
43
|
async isConnected() {
|
|
44
|
-
|
|
45
|
-
await this.getNostrPublicKey();
|
|
44
|
+
if (this.publicKey) {
|
|
46
45
|
return true;
|
|
47
|
-
} catch (_) {
|
|
48
|
-
return false;
|
|
49
46
|
}
|
|
47
|
+
this.publicKey = (await this.connectionsRepo.get())?.publicKey;
|
|
48
|
+
return this.publicKey !== undefined;
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
exports.Signer = Signer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckb-ccc/nip07",
|
|
3
|
-
"version": "0.0.8-alpha.
|
|
3
|
+
"version": "0.0.8-alpha.3",
|
|
4
4
|
"description": "Common Chains Connector's support for NIP07",
|
|
5
5
|
"author": "Hanssen0 <hanssen0@hanssen0.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@ckb-ccc/core": "0.0.
|
|
45
|
+
"@ckb-ccc/core": "0.0.8-alpha.3"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "bddfa3e5631252194dfde32b79ee589703f18afb"
|
|
48
48
|
}
|
package/src/signer.ts
CHANGED
|
@@ -52,11 +52,11 @@ export class Signer extends ccc.SignerNostr {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async isConnected(): Promise<boolean> {
|
|
55
|
-
|
|
56
|
-
await this.getNostrPublicKey();
|
|
55
|
+
if (this.publicKey) {
|
|
57
56
|
return true;
|
|
58
|
-
} catch (_) {
|
|
59
|
-
return false;
|
|
60
57
|
}
|
|
58
|
+
|
|
59
|
+
this.publicKey = (await this.connectionsRepo.get())?.publicKey;
|
|
60
|
+
return this.publicKey !== undefined;
|
|
61
61
|
}
|
|
62
62
|
}
|