@ckb-ccc/joy-id 0.0.7-alpha.0 → 0.0.7-alpha.2

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.
@@ -17,48 +17,37 @@ const nostr_1 = require("../nostr");
17
17
  * @returns {ccc.SignerInfo[]} An array of signer information objects.
18
18
  */
19
19
  function getJoyIdSigners(client, name, icon) {
20
- if (
21
- (0, common_1.isStandaloneBrowser)() ||
22
- core_1.ccc.isWebview(window.navigator.userAgent)
23
- ) {
20
+ if ((0, common_1.isStandaloneBrowser)() || core_1.ccc.isWebview(window.navigator.userAgent)) {
21
+ return [core_1.ccc.SignerType.CKB, core_1.ccc.SignerType.EVM, core_1.ccc.SignerType.BTC].map((type) => ({
22
+ name: type,
23
+ signer: new core_1.ccc.SignerAlwaysError(client, type, "JoyID can only be used with standard browsers"),
24
+ }));
25
+ }
24
26
  return [
25
- core_1.ccc.SignerType.CKB,
26
- core_1.ccc.SignerType.EVM,
27
- core_1.ccc.SignerType.BTC,
28
- ].map((type) => ({
29
- name: type,
30
- signer: new core_1.ccc.SignerAlwaysError(
31
- client,
32
- type,
33
- "JoyID can only be used with standard browsers",
34
- ),
35
- }));
36
- }
37
- return [
38
- {
39
- name: "CKB",
40
- signer: new ckb_1.CkbSigner(client, name, icon),
41
- },
42
- {
43
- name: "BTC",
44
- signer: new btc_1.BitcoinSigner(client, name, icon),
45
- },
46
- {
47
- name: "Nostr",
48
- signer: new nostr_1.NostrSigner(client, name, icon),
49
- },
50
- {
51
- name: "EVM",
52
- signer: new evm_1.EvmSigner(client, name, icon),
53
- },
54
- {
55
- name: "BTC (P2WPKH)",
56
- signer: new btc_1.BitcoinSigner(client, name, icon, "p2wpkh"),
57
- },
58
- {
59
- name: "BTC (P2TR)",
60
- signer: new btc_1.BitcoinSigner(client, name, icon, "p2tr"),
61
- },
62
- ];
27
+ {
28
+ name: "CKB",
29
+ signer: new ckb_1.CkbSigner(client, name, icon),
30
+ },
31
+ {
32
+ name: "BTC",
33
+ signer: new btc_1.BitcoinSigner(client, name, icon),
34
+ },
35
+ {
36
+ name: "Nostr",
37
+ signer: new nostr_1.NostrSigner(client, name, icon),
38
+ },
39
+ {
40
+ name: "EVM",
41
+ signer: new evm_1.EvmSigner(client, name, icon),
42
+ },
43
+ {
44
+ name: "BTC (P2WPKH)",
45
+ signer: new btc_1.BitcoinSigner(client, name, icon, "p2wpkh"),
46
+ },
47
+ {
48
+ name: "BTC (P2TR)",
49
+ signer: new btc_1.BitcoinSigner(client, name, icon, "p2tr"),
50
+ },
51
+ ];
63
52
  }
64
53
  exports.getJoyIdSigners = getJoyIdSigners;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckb-ccc/joy-id",
3
- "version": "0.0.7-alpha.0",
3
+ "version": "0.0.7-alpha.2",
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.7-alpha.0",
41
+ "@ckb-ccc/core": "0.0.7-alpha.2",
42
42
  "@joyid/ckb": "^1.0.0",
43
43
  "@joyid/common": "^0.2.0"
44
44
  },
45
- "gitHead": "99d88c6179e7af6f592b1b39f8df6f6968cc0df3"
45
+ "gitHead": "4b773c10f39944c6380d556dbf0b35e911935d13"
46
46
  }
package/src/ckb/index.ts CHANGED
@@ -212,7 +212,7 @@ export class CkbSigner extends ccc.Signer {
212
212
 
213
213
  const pubkeyHash = ccc.ckbHash(this.connection.publicKey).substring(0, 42);
214
214
  const lock = (await this.getAddressObj()).script;
215
- const aggregator = new Aggregator(await this.getAggregatorUri());
215
+ const aggregator = new Aggregator(this.getAggregatorUri());
216
216
  const { unlock_entry: unlockEntry } =
217
217
  await aggregator.generateSubkeyUnlockSmt({
218
218
  alg_index: 1,