@ckb-ccc/joy-id 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 +6 -4
- package/dist/ckb/index.js +1 -1
- package/dist/nostr/index.d.ts +0 -1
- package/dist/nostr/index.d.ts.map +1 -1
- package/dist/nostr/index.js +0 -6
- package/dist.commonjs/ckb/index.js +1 -1
- package/dist.commonjs/nostr/index.d.ts +0 -1
- package/dist.commonjs/nostr/index.d.ts.map +1 -1
- package/dist.commonjs/nostr/index.js +0 -6
- package/package.json +3 -3
- package/src/ckb/index.ts +1 -1
- package/src/nostr/index.ts +0 -7
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/ckb/index.js
CHANGED
|
@@ -169,7 +169,7 @@ export class CkbSigner extends ccc.Signer {
|
|
|
169
169
|
if (this.connection?.keyType !== "sub_key") {
|
|
170
170
|
return [];
|
|
171
171
|
}
|
|
172
|
-
const pubkeyHash = ccc.
|
|
172
|
+
const pubkeyHash = ccc.hashCkb(this.connection.publicKey).substring(0, 42);
|
|
173
173
|
const lock = (await this.getAddressObj()).script;
|
|
174
174
|
const aggregator = new Aggregator(this.getAggregatorUri());
|
|
175
175
|
const { unlock_entry: unlockEntry } = await aggregator.generateSubkeyUnlockSmt({
|
package/dist/nostr/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ export declare class NostrSigner extends ccc.SignerNostr {
|
|
|
27
27
|
* @param {ConnectionsRepo} [connectionsRepo=new ConnectionsRepoLocalStorage()] - The connections repository.
|
|
28
28
|
*/
|
|
29
29
|
constructor(client: ccc.Client, name: string, icon: string, appUri?: string, connectionsRepo?: ConnectionsRepo);
|
|
30
|
-
static isValidClient(client: ccc.Client): boolean;
|
|
31
30
|
replaceClient(client: ccc.Client): Promise<boolean>;
|
|
32
31
|
/**
|
|
33
32
|
* Gets the configuration for JoyID.
|
|
@@ -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;AAGpC,OAAO,EAEL,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,GAAG,CAAC,WAAW;IA2B5C,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IA7BlC,OAAO,CAAC,UAAU,CAAC,CAAa;IAEhC;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAQxB;;;;;;;OAOG;gBAED,MAAM,EAAE,GAAG,CAAC,MAAM,EACD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,SAAuB,EAC7B,eAAe,GAAE,eAAmD;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nostr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAGpC,OAAO,EAEL,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,GAAG,CAAC,WAAW;IA2B5C,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IA7BlC,OAAO,CAAC,UAAU,CAAC,CAAa;IAEhC;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAQxB;;;;;;;OAOG;gBAED,MAAM,EAAE,GAAG,CAAC,MAAM,EACD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,SAAuB,EAC7B,eAAe,GAAE,eAAmD;IAKjF,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzD;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAUjB;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB9B;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAY/B,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAIrC,cAAc,CAClB,KAAK,EAAE,GAAG,CAAC,UAAU,GACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAWrC"}
|
package/dist/nostr/index.js
CHANGED
|
@@ -35,13 +35,7 @@ export class NostrSigner extends ccc.SignerNostr {
|
|
|
35
35
|
this.appUri = appUri;
|
|
36
36
|
this.connectionsRepo = connectionsRepo;
|
|
37
37
|
}
|
|
38
|
-
static isValidClient(client) {
|
|
39
|
-
return client.addressPrefix === "ckt";
|
|
40
|
-
}
|
|
41
38
|
async replaceClient(client) {
|
|
42
|
-
if (!NostrSigner.isValidClient(client)) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
39
|
return super.replaceClient(client);
|
|
46
40
|
}
|
|
47
41
|
/**
|
|
@@ -172,7 +172,7 @@ class CkbSigner extends core_1.ccc.Signer {
|
|
|
172
172
|
if (this.connection?.keyType !== "sub_key") {
|
|
173
173
|
return [];
|
|
174
174
|
}
|
|
175
|
-
const pubkeyHash = core_1.ccc.
|
|
175
|
+
const pubkeyHash = core_1.ccc.hashCkb(this.connection.publicKey).substring(0, 42);
|
|
176
176
|
const lock = (await this.getAddressObj()).script;
|
|
177
177
|
const aggregator = new ckb_1.Aggregator(this.getAggregatorUri());
|
|
178
178
|
const { unlock_entry: unlockEntry } = await aggregator.generateSubkeyUnlockSmt({
|
|
@@ -27,7 +27,6 @@ export declare class NostrSigner extends ccc.SignerNostr {
|
|
|
27
27
|
* @param {ConnectionsRepo} [connectionsRepo=new ConnectionsRepoLocalStorage()] - The connections repository.
|
|
28
28
|
*/
|
|
29
29
|
constructor(client: ccc.Client, name: string, icon: string, appUri?: string, connectionsRepo?: ConnectionsRepo);
|
|
30
|
-
static isValidClient(client: ccc.Client): boolean;
|
|
31
30
|
replaceClient(client: ccc.Client): Promise<boolean>;
|
|
32
31
|
/**
|
|
33
32
|
* Gets the configuration for JoyID.
|
|
@@ -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;AAGpC,OAAO,EAEL,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,GAAG,CAAC,WAAW;IA2B5C,OAAO,CAA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AiB,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAIrC,cAAc,CAClB,KAAK,EAAE,GAAG,CAAC,UAAU,GACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAWrC"}
|
|
@@ -38,13 +38,7 @@ class NostrSigner extends core_1.ccc.SignerNostr {
|
|
|
38
38
|
this.appUri = appUri;
|
|
39
39
|
this.connectionsRepo = connectionsRepo;
|
|
40
40
|
}
|
|
41
|
-
static isValidClient(client) {
|
|
42
|
-
return client.addressPrefix === "ckt";
|
|
43
|
-
}
|
|
44
41
|
async replaceClient(client) {
|
|
45
|
-
if (!NostrSigner.isValidClient(client)) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
42
|
return super.replaceClient(client);
|
|
49
43
|
}
|
|
50
44
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckb-ccc/joy-id",
|
|
3
|
-
"version": "0.0.8-alpha.
|
|
3
|
+
"version": "0.0.8-alpha.4",
|
|
4
4
|
"description": "Connector's support for JoyID",
|
|
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.
|
|
41
|
+
"@ckb-ccc/core": "0.0.8-alpha.4",
|
|
42
42
|
"@joyid/ckb": "^1.0.0",
|
|
43
43
|
"@joyid/common": "^0.2.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "444a378be18f46f5d13b18848fa90829755d5ff8"
|
|
46
46
|
}
|
package/src/ckb/index.ts
CHANGED
|
@@ -210,7 +210,7 @@ export class CkbSigner extends ccc.Signer {
|
|
|
210
210
|
return [];
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
const pubkeyHash = ccc.
|
|
213
|
+
const pubkeyHash = ccc.hashCkb(this.connection.publicKey).substring(0, 42);
|
|
214
214
|
const lock = (await this.getAddressObj()).script;
|
|
215
215
|
const aggregator = new Aggregator(this.getAggregatorUri());
|
|
216
216
|
const { unlock_entry: unlockEntry } =
|
package/src/nostr/index.ts
CHANGED
|
@@ -47,14 +47,7 @@ export class NostrSigner extends ccc.SignerNostr {
|
|
|
47
47
|
super(client);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
static isValidClient(client: ccc.Client): boolean {
|
|
51
|
-
return client.addressPrefix === "ckt";
|
|
52
|
-
}
|
|
53
|
-
|
|
54
50
|
async replaceClient(client: ccc.Client): Promise<boolean> {
|
|
55
|
-
if (!NostrSigner.isValidClient(client)) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
51
|
return super.replaceClient(client);
|
|
59
52
|
}
|
|
60
53
|
|