@ckb-ccc/joy-id 0.0.5-alpha.0 → 0.0.5-alpha.10
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/advancedBarrel.d.ts +1 -0
- package/dist/advancedBarrel.d.ts.map +1 -1
- package/dist/advancedBarrel.js +1 -0
- package/dist/barrel.d.ts +1 -0
- package/dist/barrel.d.ts.map +1 -1
- package/dist/barrel.js +1 -0
- package/dist/btc/index.d.ts +6 -4
- package/dist/btc/index.d.ts.map +1 -1
- package/dist/btc/index.js +26 -18
- package/dist/ckb/index.d.ts +9 -4
- package/dist/ckb/index.d.ts.map +1 -1
- package/dist/ckb/index.js +59 -33
- package/dist/common/index.d.ts +24 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +50 -0
- package/dist/evm/index.d.ts +19 -0
- package/dist/evm/index.d.ts.map +1 -0
- package/dist/evm/index.js +75 -0
- package/dist/signerFactory/index.d.ts +1 -1
- package/dist/signerFactory/index.d.ts.map +1 -1
- package/dist/signerFactory/index.js +17 -9
- package/dist.commonjs/advanced.d.ts +1 -1
- package/dist.commonjs/advanced.js +40 -19
- package/dist.commonjs/advancedBarrel.d.ts +2 -1
- package/dist.commonjs/advancedBarrel.d.ts.map +1 -1
- package/dist.commonjs/advancedBarrel.js +31 -14
- package/dist.commonjs/barrel.d.ts +2 -1
- package/dist.commonjs/barrel.d.ts.map +1 -1
- package/dist.commonjs/barrel.js +31 -14
- package/dist.commonjs/btc/index.d.ts +22 -13
- package/dist.commonjs/btc/index.d.ts.map +1 -1
- package/dist.commonjs/btc/index.js +100 -66
- package/dist.commonjs/ckb/index.d.ts +33 -21
- package/dist.commonjs/ckb/index.d.ts.map +1 -1
- package/dist.commonjs/ckb/index.js +205 -136
- package/dist.commonjs/common/index.d.ts +37 -0
- package/dist.commonjs/common/index.d.ts.map +1 -0
- package/dist.commonjs/common/index.js +59 -0
- package/dist.commonjs/connectionsStorage/index.d.ts +23 -14
- package/dist.commonjs/connectionsStorage/index.js +28 -25
- package/dist.commonjs/evm/index.d.ts +25 -0
- package/dist.commonjs/evm/index.d.ts.map +1 -0
- package/dist.commonjs/evm/index.js +101 -0
- package/dist.commonjs/index.d.ts +1 -1
- package/dist.commonjs/index.js +40 -19
- package/dist.commonjs/signerFactory/index.d.ts +6 -2
- package/dist.commonjs/signerFactory/index.d.ts.map +1 -1
- package/dist.commonjs/signerFactory/index.js +41 -22
- package/package.json +3 -3
- package/src/advancedBarrel.ts +1 -0
- package/src/barrel.ts +1 -0
- package/src/btc/index.ts +35 -20
- package/src/ckb/index.ts +84 -48
- package/src/common/index.ts +100 -0
- package/src/evm/index.ts +108 -0
- package/src/signerFactory/index.ts +28 -9
- package/dist.commonjs/tsconfig.commonjs.tsbuildinfo +0 -1
|
@@ -1,27 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __setModuleDefault =
|
|
26
|
+
(this && this.__setModuleDefault) ||
|
|
27
|
+
(Object.create
|
|
28
|
+
? function (o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}
|
|
31
|
+
: function (o, v) {
|
|
32
|
+
o["default"] = v;
|
|
33
|
+
});
|
|
34
|
+
var __importStar =
|
|
35
|
+
(this && this.__importStar) ||
|
|
36
|
+
function (mod) {
|
|
19
37
|
if (mod && mod.__esModule) return mod;
|
|
20
38
|
var result = {};
|
|
21
|
-
if (mod != null)
|
|
39
|
+
if (mod != null)
|
|
40
|
+
for (var k in mod)
|
|
41
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
42
|
+
__createBinding(result, mod, k);
|
|
22
43
|
__setModuleDefault(result, mod);
|
|
23
44
|
return result;
|
|
24
|
-
};
|
|
45
|
+
};
|
|
25
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
47
|
exports.JoyIdA = void 0;
|
|
27
48
|
exports.JoyIdA = __importStar(require("./advancedBarrel"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advancedBarrel.d.ts","sourceRoot":"","sources":["../src/advancedBarrel.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"advancedBarrel.d.ts","sourceRoot":"","sources":["../src/advancedBarrel.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
16
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./common"), exports);
|
|
17
34
|
__exportStar(require("./connectionsStorage"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../src/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../src/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC"}
|
package/dist.commonjs/barrel.js
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
16
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
33
|
__exportStar(require("./btc"), exports);
|
|
18
34
|
__exportStar(require("./ckb"), exports);
|
|
35
|
+
__exportStar(require("./evm"), exports);
|
|
19
36
|
__exportStar(require("./signerFactory"), exports);
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/core";
|
|
2
2
|
import { ConnectionsRepo } from "../connectionsStorage";
|
|
3
3
|
export declare class BitcoinSigner extends ccc.SignerBtc {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
private readonly name;
|
|
5
|
+
private readonly icon;
|
|
6
|
+
private readonly addressType;
|
|
7
|
+
private readonly appUri;
|
|
8
|
+
private readonly connectionsRepo;
|
|
9
|
+
private connection?;
|
|
10
|
+
private assertConnection;
|
|
11
|
+
constructor(
|
|
12
|
+
client: ccc.Client,
|
|
13
|
+
name: string,
|
|
14
|
+
icon: string,
|
|
15
|
+
addressType?: "auto" | "p2wpkh" | "p2tr",
|
|
16
|
+
appUri?: string,
|
|
17
|
+
connectionsRepo?: ConnectionsRepo,
|
|
18
|
+
);
|
|
19
|
+
private getConfig;
|
|
20
|
+
getBtcAccount(): Promise<string>;
|
|
21
|
+
getBtcPublicKey(): Promise<ccc.Hex>;
|
|
22
|
+
connect(): Promise<void>;
|
|
23
|
+
isConnected(): Promise<boolean>;
|
|
24
|
+
signMessageRaw(message: string | ccc.BytesLike): Promise<string>;
|
|
16
25
|
}
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/btc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/btc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAGpC,OAAO,EAEL,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAE/B,qBAAa,aAAc,SAAQ,GAAG,CAAC,SAAS;IAa5C,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAhBlC,OAAO,CAAC,UAAU,CAAC,CAAa;IAEhC,OAAO,CAAC,gBAAgB;gBAStB,MAAM,EAAE,GAAG,CAAC,MAAM,EACD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,MAAM,GAAG,QAAQ,GAAG,MAAe,EAChD,MAAM,SAAuB,EAC7B,eAAe,GAAE,eAAmD;IAKvF,OAAO,CAAC,SAAS;IAUX,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAKhC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAKnC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA+BxB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAY/B,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;CAsBvE"}
|
|
@@ -3,75 +3,109 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BitcoinSigner = void 0;
|
|
4
4
|
const core_1 = require("@ckb-ccc/core");
|
|
5
5
|
const common_1 = require("@joyid/common");
|
|
6
|
+
const common_2 = require("../common");
|
|
6
7
|
const connectionsStorage_1 = require("../connectionsStorage");
|
|
7
8
|
class BitcoinSigner extends core_1.ccc.SignerBtc {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
return this.connection;
|
|
9
|
+
assertConnection() {
|
|
10
|
+
if (!this.isConnected() || !this.connection) {
|
|
11
|
+
throw new Error("Not connected");
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
13
|
+
return this.connection;
|
|
14
|
+
}
|
|
15
|
+
constructor(
|
|
16
|
+
client,
|
|
17
|
+
name,
|
|
18
|
+
icon,
|
|
19
|
+
addressType = "auto",
|
|
20
|
+
appUri = "https://app.joy.id",
|
|
21
|
+
connectionsRepo = new connectionsStorage_1.ConnectionsRepoLocalStorage(),
|
|
22
|
+
) {
|
|
23
|
+
super(client);
|
|
24
|
+
this.name = name;
|
|
25
|
+
this.icon = icon;
|
|
26
|
+
this.addressType = addressType;
|
|
27
|
+
this.appUri = appUri;
|
|
28
|
+
this.connectionsRepo = connectionsRepo;
|
|
29
|
+
}
|
|
30
|
+
getConfig() {
|
|
31
|
+
return {
|
|
32
|
+
redirectURL: location.href,
|
|
33
|
+
joyidAppURL: this.appUri,
|
|
34
|
+
requestNetwork: `btc-${this.addressType}`,
|
|
35
|
+
name: this.name,
|
|
36
|
+
logo: this.icon,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async getBtcAccount() {
|
|
40
|
+
const { address } = this.assertConnection();
|
|
41
|
+
return address;
|
|
42
|
+
}
|
|
43
|
+
async getBtcPublicKey() {
|
|
44
|
+
const { publicKey } = this.assertConnection();
|
|
45
|
+
return publicKey;
|
|
46
|
+
}
|
|
47
|
+
async connect() {
|
|
48
|
+
const config = this.getConfig();
|
|
49
|
+
const res = await (0, common_2.createPopup)(
|
|
50
|
+
(0, common_1.buildJoyIDURL)(config, "popup", "/auth"),
|
|
51
|
+
{
|
|
52
|
+
...config,
|
|
53
|
+
type: common_1.DappRequestType.Auth,
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
const { address, pubkey } = (() => {
|
|
57
|
+
if (this.addressType === "auto") {
|
|
58
|
+
return res.btcAddressType === "p2wpkh" ? res.nativeSegwit : res.taproot;
|
|
59
|
+
}
|
|
60
|
+
return res.btcAddressType === "p2wpkh" ? res.nativeSegwit : res.taproot;
|
|
61
|
+
})();
|
|
62
|
+
this.connection = {
|
|
63
|
+
address,
|
|
64
|
+
publicKey: core_1.ccc.hexFrom(pubkey),
|
|
65
|
+
keyType: res.keyType,
|
|
66
|
+
};
|
|
67
|
+
await Promise.all([
|
|
68
|
+
this.connectionsRepo.set(
|
|
69
|
+
{ uri: this.appUri, addressType: `btc-${res.btcAddressType}` },
|
|
70
|
+
this.connection,
|
|
71
|
+
),
|
|
72
|
+
this.connectionsRepo.set(
|
|
73
|
+
{ uri: this.appUri, addressType: "btc-auto" },
|
|
74
|
+
this.connection,
|
|
75
|
+
),
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
async isConnected() {
|
|
79
|
+
if (this.connection) {
|
|
80
|
+
return true;
|
|
75
81
|
}
|
|
82
|
+
this.connection = await this.connectionsRepo.get({
|
|
83
|
+
uri: this.appUri,
|
|
84
|
+
addressType: `btc-${this.addressType}`,
|
|
85
|
+
});
|
|
86
|
+
return this.connection !== undefined;
|
|
87
|
+
}
|
|
88
|
+
async signMessageRaw(message) {
|
|
89
|
+
const { address } = this.assertConnection();
|
|
90
|
+
const challenge =
|
|
91
|
+
typeof message === "string"
|
|
92
|
+
? message
|
|
93
|
+
: core_1.ccc.hexFrom(message).slice(2);
|
|
94
|
+
const config = this.getConfig();
|
|
95
|
+
const { signature } = await (0, common_2.createPopup)(
|
|
96
|
+
(0, common_1.buildJoyIDURL)(
|
|
97
|
+
{
|
|
98
|
+
...config,
|
|
99
|
+
challenge,
|
|
100
|
+
address,
|
|
101
|
+
signMessageType: "ecdsa",
|
|
102
|
+
},
|
|
103
|
+
"popup",
|
|
104
|
+
"/sign-message",
|
|
105
|
+
),
|
|
106
|
+
{ ...config, type: common_1.DappRequestType.SignMessage },
|
|
107
|
+
);
|
|
108
|
+
return signature;
|
|
109
|
+
}
|
|
76
110
|
}
|
|
77
111
|
exports.BitcoinSigner = BitcoinSigner;
|
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/core";
|
|
2
2
|
import { ConnectionsRepo } from "../connectionsStorage";
|
|
3
3
|
export declare class CkbSigner extends ccc.Signer {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
private readonly name;
|
|
5
|
+
private readonly icon;
|
|
6
|
+
private readonly _appUri?;
|
|
7
|
+
private readonly _aggregatorUri?;
|
|
8
|
+
private readonly connectionsRepo;
|
|
9
|
+
get type(): ccc.SignerType;
|
|
10
|
+
get signType(): ccc.SignerSignType;
|
|
11
|
+
private connection?;
|
|
12
|
+
private assertConnection;
|
|
13
|
+
constructor(
|
|
14
|
+
client: ccc.Client,
|
|
15
|
+
name: string,
|
|
16
|
+
icon: string,
|
|
17
|
+
_appUri?: string | undefined,
|
|
18
|
+
_aggregatorUri?: string | undefined,
|
|
19
|
+
connectionsRepo?: ConnectionsRepo,
|
|
20
|
+
);
|
|
21
|
+
private getConfig;
|
|
22
|
+
private getAggregatorUri;
|
|
23
|
+
connect(): Promise<void>;
|
|
24
|
+
disconnect(): Promise<void>;
|
|
25
|
+
isConnected(): Promise<boolean>;
|
|
26
|
+
getInternalAddress(): Promise<string>;
|
|
27
|
+
getIdentity(): Promise<string>;
|
|
28
|
+
getAddressObj(): Promise<ccc.Address>;
|
|
29
|
+
getAddressObjs(): Promise<ccc.Address[]>;
|
|
30
|
+
prepareTransaction(txLike: ccc.TransactionLike): Promise<ccc.Transaction>;
|
|
31
|
+
private prepareTransactionForSubKey;
|
|
32
|
+
signOnlyTransaction(txLike: ccc.TransactionLike): Promise<ccc.Transaction>;
|
|
33
|
+
signMessageRaw(message: string | ccc.BytesLike): Promise<string>;
|
|
34
|
+
private saveConnection;
|
|
35
|
+
private restoreConnection;
|
|
24
36
|
}
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ckb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ckb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIpC,OAAO,EAEL,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAE/B,qBAAa,SAAU,SAAQ,GAAG,CAAC,MAAM;IAqBrC,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAxBlC,IAAI,IAAI,IAAI,GAAG,CAAC,UAAU,CAEzB;IAED,IAAI,QAAQ,IAAI,GAAG,CAAC,cAAc,CAEjC;IAED,OAAO,CAAC,UAAU,CAAC,CAAa;YAElB,gBAAgB;gBAS5B,MAAM,EAAE,GAAG,CAAC,MAAM,EACD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,oBAAQ,EAChB,cAAc,CAAC,oBAAQ,EACvB,eAAe,GAAE,eAAmD;IAKvF,OAAO,CAAC,SAAS;IAYjB,OAAO,CAAC,gBAAgB;IAUlB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAQ/B,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIrC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAQ9B,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IAOrC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IAIxC,kBAAkB,CACtB,MAAM,EAAE,GAAG,CAAC,eAAe,GAC1B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;YAkBb,2BAA2B;IAuCnC,mBAAmB,CACvB,MAAM,EAAE,GAAG,CAAC,eAAe,GAC1B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAyBrB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;YA2BxD,cAAc;YAUd,iBAAiB;CAMhC"}
|