@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.
- package/dist/ckb/index.js +1 -1
- package/dist.commonjs/advanced.d.ts +1 -1
- package/dist.commonjs/advanced.js +19 -40
- package/dist.commonjs/advancedBarrel.d.ts +1 -1
- package/dist.commonjs/advancedBarrel.js +14 -30
- package/dist.commonjs/barrel.d.ts +1 -1
- package/dist.commonjs/barrel.js +14 -30
- package/dist.commonjs/btc/index.d.ts +56 -63
- package/dist.commonjs/btc/index.js +114 -140
- package/dist.commonjs/ckb/index.d.ts +114 -121
- package/dist.commonjs/ckb/index.js +250 -307
- package/dist.commonjs/common/index.d.ts +21 -34
- package/dist.commonjs/common/index.js +45 -50
- package/dist.commonjs/connectionsStorage/index.d.ts +44 -53
- package/dist.commonjs/connectionsStorage/index.js +44 -47
- package/dist.commonjs/evm/index.d.ts +61 -67
- package/dist.commonjs/evm/index.js +113 -135
- package/dist.commonjs/index.d.ts +1 -1
- package/dist.commonjs/index.js +19 -40
- package/dist.commonjs/nostr/index.d.ts +42 -48
- package/dist.commonjs/nostr/index.js +91 -110
- package/dist.commonjs/signerFactory/index.d.ts +2 -6
- package/dist.commonjs/signerFactory/index.js +31 -42
- package/package.json +3 -3
- package/src/ckb/index.ts +1 -1
|
@@ -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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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.
|
|
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.
|
|
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": "
|
|
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(
|
|
215
|
+
const aggregator = new Aggregator(this.getAggregatorUri());
|
|
216
216
|
const { unlock_entry: unlockEntry } =
|
|
217
217
|
await aggregator.generateSubkeyUnlockSmt({
|
|
218
218
|
alg_index: 1,
|