@ckb-ccc/connector 0.0.11-alpha.2 → 0.0.11-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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAOjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,qBAAa,iBAAkB,YAAW,kBAAkB;IAMxD,OAAO,CAAC,QAAQ,CAAC,IAAI;IALhB,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAEzC,OAAO,CAAC,cAAc,CAAsB;gBAGzB,IAAI,EAAE,sBAAsB,GAAG;QAC9C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;QACtB,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,IAAI,CAAC;KAC3B;IAKH,SAAS;;;;;;IA6BT,MAAM;IAKN,OAAO;YAkGO,SAAS;IAkCvB,aAAa,IAAI,IAAI;IAKrB,gBAAgB,IAAI,IAAI;CACzB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAOjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,qBAAa,iBAAkB,YAAW,kBAAkB;IAMxD,OAAO,CAAC,QAAQ,CAAC,IAAI;IALhB,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAEzC,OAAO,CAAC,cAAc,CAAsB;gBAGzB,IAAI,EAAE,sBAAsB,GAAG;QAC9C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;QACtB,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,IAAI,CAAC;KAC3B;IAKH,SAAS;;;;;;IAgCT,MAAM;IAKN,OAAO;YAkGO,SAAS;IAkCvB,aAAa,IAAI,IAAI;IAKrB,gBAAgB,IAAI,IAAI;CACzB"}
@@ -14,9 +14,12 @@ export class SignersController {
14
14
  }
15
15
  getConfig() {
16
16
  const name = this.host.name ??
17
- document.querySelector("head title").text;
17
+ document.querySelector("head title")?.text ??
18
+ "Unknown";
18
19
  const icon = this.host.icon ??
19
- document.querySelector('link[rel="icon"]').href;
20
+ document.querySelector('link[rel="icon"]')
21
+ ?.href ??
22
+ "https://fav.farm/%E2%9D%93";
20
23
  const preferredNetworks = [
21
24
  ...(this.host.preferredNetworks ?? []),
22
25
  {
@@ -46,8 +49,11 @@ export class SignersController {
46
49
  this.resetListeners = [];
47
50
  this.wallets = [];
48
51
  const { client, name, icon, preferredNetworks } = this.getConfig();
52
+ ccc.UtxoGlobal.getUtxoGlobalSigners(client).forEach(({ signer, name }) => {
53
+ this.addSigner("UTXO Global Wallet", name, UTXO_GLOBAL_SVG, signer);
54
+ });
49
55
  ccc.JoyId.getJoyIdSigners(client, name, icon, preferredNetworks).forEach(({ signer, name }) => {
50
- this.addSigner("JoyID", name, JOY_ID_SVG, signer);
56
+ this.addSigner("JoyID Passkey", name, JOY_ID_SVG, signer);
51
57
  });
52
58
  const uniSatSigner = ccc.UniSat.getUniSatSigner(client, preferredNetworks);
53
59
  if (uniSatSigner) {
@@ -60,9 +66,6 @@ export class SignersController {
60
66
  if (nip07Signer) {
61
67
  this.addSigner("Nostr", "Nostr", NOSTR_SVG, nip07Signer);
62
68
  }
63
- ccc.UtxoGlobal.getUtxoGlobalSigners(client).forEach(({ signer, name }) => {
64
- this.addSigner("UTXO Global Wallet", name, UTXO_GLOBAL_SVG, signer);
65
- });
66
69
  const eip6963Manager = new ccc.Eip6963.SignerFactory(client);
67
70
  this.resetListeners.push(eip6963Manager.subscribeSigners((signer) => {
68
71
  this.addSigner(`${signer.detail.info.name}`, "EVM", signer.detail.info.icon, signer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckb-ccc/connector",
3
- "version": "0.0.11-alpha.2",
3
+ "version": "0.0.11-alpha.3",
4
4
  "description": "CCC - CKBer's Codebase. Common Chains Connector UI",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
@@ -38,8 +38,8 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@ckb-ccc/ccc": "0.0.11-alpha.2",
41
+ "@ckb-ccc/ccc": "0.0.11-alpha.3",
42
42
  "lit": "^3.1.3"
43
43
  },
44
- "gitHead": "fd2ee28eac9dc6a3572181b9da05eba204ee13df"
44
+ "gitHead": "235ba3c69a0a1098fcd741fafb4b8f32dcfbc2b5"
45
45
  }
@@ -32,10 +32,13 @@ export class SignersController implements ReactiveController {
32
32
  getConfig() {
33
33
  const name =
34
34
  this.host.name ??
35
- (document.querySelector("head title") as HTMLTitleElement).text;
35
+ (document.querySelector("head title") as HTMLTitleElement | null)?.text ??
36
+ "Unknown";
36
37
  const icon =
37
38
  this.host.icon ??
38
- (document.querySelector('link[rel="icon"]') as HTMLLinkElement).href;
39
+ (document.querySelector('link[rel="icon"]') as HTMLLinkElement | null)
40
+ ?.href ??
41
+ "https://fav.farm/%E2%9D%93";
39
42
  const preferredNetworks = [
40
43
  ...(this.host.preferredNetworks ?? []),
41
44
  {
@@ -71,9 +74,13 @@ export class SignersController implements ReactiveController {
71
74
 
72
75
  const { client, name, icon, preferredNetworks } = this.getConfig();
73
76
 
77
+ ccc.UtxoGlobal.getUtxoGlobalSigners(client).forEach(({ signer, name }) => {
78
+ this.addSigner("UTXO Global Wallet", name, UTXO_GLOBAL_SVG, signer);
79
+ });
80
+
74
81
  ccc.JoyId.getJoyIdSigners(client, name, icon, preferredNetworks).forEach(
75
82
  ({ signer, name }) => {
76
- this.addSigner("JoyID", name, JOY_ID_SVG, signer);
83
+ this.addSigner("JoyID Passkey", name, JOY_ID_SVG, signer);
77
84
  },
78
85
  );
79
86
 
@@ -91,10 +98,6 @@ export class SignersController implements ReactiveController {
91
98
  this.addSigner("Nostr", "Nostr", NOSTR_SVG, nip07Signer);
92
99
  }
93
100
 
94
- ccc.UtxoGlobal.getUtxoGlobalSigners(client).forEach(({ signer, name }) => {
95
- this.addSigner("UTXO Global Wallet", name, UTXO_GLOBAL_SVG, signer);
96
- });
97
-
98
101
  const eip6963Manager = new ccc.Eip6963.SignerFactory(client);
99
102
  this.resetListeners.push(
100
103
  eip6963Manager.subscribeSigners((signer) => {