@ckb-ccc/core 0.1.0-alpha.7 → 0.1.1
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/CHANGELOG.md +33 -0
- package/dist/ckb/transactionLumos.d.ts +2 -1
- package/dist/ckb/transactionLumos.d.ts.map +1 -1
- package/dist/client/client.js +1 -1
- package/dist/signer/btc/signerBtc.d.ts.map +1 -1
- package/dist/signer/btc/signerBtc.js +2 -3
- package/dist/signer/btc/verify.d.ts +14 -1
- package/dist/signer/btc/verify.d.ts.map +1 -1
- package/dist/signer/btc/verify.js +22 -1
- package/dist/signer/doge/index.d.ts +5 -0
- package/dist/signer/doge/index.d.ts.map +1 -0
- package/dist/signer/doge/index.js +4 -0
- package/dist/signer/doge/signerDoge.d.ts +52 -0
- package/dist/signer/doge/signerDoge.d.ts.map +1 -0
- package/dist/signer/doge/signerDoge.js +82 -0
- package/dist/signer/doge/signerDogeAddressReadonly.d.ts +41 -0
- package/dist/signer/doge/signerDogeAddressReadonly.d.ts.map +1 -0
- package/dist/signer/doge/signerDogeAddressReadonly.js +45 -0
- package/dist/signer/doge/signerDogePrivateKey.d.ts +52 -0
- package/dist/signer/doge/signerDogePrivateKey.d.ts.map +1 -0
- package/dist/signer/doge/signerDogePrivateKey.js +68 -0
- package/dist/signer/doge/verify.d.ts +6 -0
- package/dist/signer/doge/verify.d.ts.map +1 -0
- package/dist/signer/doge/verify.js +17 -0
- package/dist/signer/index.d.ts +1 -0
- package/dist/signer/index.d.ts.map +1 -1
- package/dist/signer/index.js +1 -0
- package/dist/signer/nostr/index.d.ts +1 -0
- package/dist/signer/nostr/index.d.ts.map +1 -1
- package/dist/signer/nostr/index.js +1 -0
- package/dist/signer/signer/index.d.ts +4 -2
- package/dist/signer/signer/index.d.ts.map +1 -1
- package/dist/signer/signer/index.js +5 -0
- package/dist.commonjs/address/address.advanced.js +23 -28
- package/dist.commonjs/address/advanced.js +1 -17
- package/dist.commonjs/address/index.js +11 -15
- package/dist.commonjs/advanced.js +2 -31
- package/dist.commonjs/advancedBarrel.js +5 -21
- package/dist.commonjs/barrel.js +12 -41
- package/dist.commonjs/bytes/advanced.js +1 -2
- package/dist.commonjs/bytes/index.js +7 -12
- package/dist.commonjs/ckb/advanced.js +3 -32
- package/dist.commonjs/ckb/index.js +3 -19
- package/dist.commonjs/ckb/molecule.advanced/generated.js +64 -131
- package/dist.commonjs/ckb/molecule.advanced/index.js +2 -19
- package/dist.commonjs/ckb/script.advanced.js +3 -6
- package/dist.commonjs/ckb/script.js +23 -53
- package/dist.commonjs/ckb/transaction.advanced.js +3 -6
- package/dist.commonjs/ckb/transaction.js +122 -163
- package/dist.commonjs/ckb/transactionLumos.d.ts +2 -1
- package/dist.commonjs/ckb/transactionLumos.d.ts.map +1 -1
- package/dist.commonjs/ckb/transactionLumos.js +1 -2
- package/dist.commonjs/client/advanced.js +6 -22
- package/dist.commonjs/client/cache/advanced.js +1 -17
- package/dist.commonjs/client/cache/cache.js +3 -7
- package/dist.commonjs/client/cache/index.js +2 -18
- package/dist.commonjs/client/cache/memory.advanced.js +21 -28
- package/dist.commonjs/client/cache/memory.js +19 -23
- package/dist.commonjs/client/client.js +22 -26
- package/dist.commonjs/client/clientPublicMainnet.advanced.js +22 -25
- package/dist.commonjs/client/clientPublicMainnet.js +8 -15
- package/dist.commonjs/client/clientPublicTestnet.advanced.js +22 -25
- package/dist.commonjs/client/clientPublicTestnet.js +8 -15
- package/dist.commonjs/client/clientTypes.advanced.js +3 -6
- package/dist.commonjs/client/clientTypes.js +29 -43
- package/dist.commonjs/client/index.js +6 -22
- package/dist.commonjs/client/jsonRpc/advanced.js +2 -18
- package/dist.commonjs/client/jsonRpc/index.js +37 -41
- package/dist.commonjs/client/jsonRpc/transformers.js +57 -61
- package/dist.commonjs/client/jsonRpc/types.js +1 -2
- package/dist.commonjs/client/transports/advanced.js +8 -25
- package/dist.commonjs/client/transports/http.js +1 -5
- package/dist.commonjs/client/transports/transport.js +1 -2
- package/dist.commonjs/client/transports/webSocket.js +3 -10
- package/dist.commonjs/fixedPoint/index.js +4 -9
- package/dist.commonjs/hasher/advanced.js +1 -4
- package/dist.commonjs/hasher/hasher.js +1 -2
- package/dist.commonjs/hasher/hasherCkb.js +14 -20
- package/dist.commonjs/hasher/hasherKeecak256.js +7 -11
- package/dist.commonjs/hasher/index.js +3 -19
- package/dist.commonjs/hex/index.js +3 -6
- package/dist.commonjs/index.js +2 -31
- package/dist.commonjs/keystore/index.js +21 -25
- package/dist.commonjs/molecule/codec.js +48 -63
- package/dist.commonjs/molecule/index.js +2 -18
- package/dist.commonjs/molecule/predefined.js +77 -103
- package/dist.commonjs/num/index.js +17 -29
- package/dist.commonjs/signer/btc/index.js +3 -19
- package/dist.commonjs/signer/btc/signerBtc.d.ts.map +1 -1
- package/dist.commonjs/signer/btc/signerBtc.js +20 -25
- package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.js +4 -8
- package/dist.commonjs/signer/btc/verify.d.ts +14 -1
- package/dist.commonjs/signer/btc/verify.d.ts.map +1 -1
- package/dist.commonjs/signer/btc/verify.js +29 -11
- package/dist.commonjs/signer/ckb/index.js +5 -21
- package/dist.commonjs/signer/ckb/signerCkbPrivateKey.js +16 -20
- package/dist.commonjs/signer/ckb/signerCkbPublicKey.js +20 -24
- package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.js +8 -12
- package/dist.commonjs/signer/ckb/verifyCkbSecp256k1.js +12 -16
- package/dist.commonjs/signer/ckb/verifyJoyId.js +5 -8
- package/dist.commonjs/signer/doge/index.d.ts +5 -0
- package/dist.commonjs/signer/doge/index.d.ts.map +1 -0
- package/dist.commonjs/signer/doge/index.js +4 -0
- package/dist.commonjs/signer/doge/signerDoge.d.ts +52 -0
- package/dist.commonjs/signer/doge/signerDoge.d.ts.map +1 -0
- package/dist.commonjs/signer/doge/signerDoge.js +82 -0
- package/dist.commonjs/signer/doge/signerDogeAddressReadonly.d.ts +41 -0
- package/dist.commonjs/signer/doge/signerDogeAddressReadonly.d.ts.map +1 -0
- package/dist.commonjs/signer/doge/signerDogeAddressReadonly.js +45 -0
- package/dist.commonjs/signer/doge/signerDogePrivateKey.d.ts +52 -0
- package/dist.commonjs/signer/doge/signerDogePrivateKey.d.ts.map +1 -0
- package/dist.commonjs/signer/doge/signerDogePrivateKey.js +68 -0
- package/dist.commonjs/signer/doge/verify.d.ts +6 -0
- package/dist.commonjs/signer/doge/verify.d.ts.map +1 -0
- package/dist.commonjs/signer/doge/verify.js +17 -0
- package/dist.commonjs/signer/dummy/alwaysError.js +2 -6
- package/dist.commonjs/signer/dummy/dummy.js +3 -7
- package/dist.commonjs/signer/dummy/index.js +3 -19
- package/dist.commonjs/signer/dummy/openLink.js +2 -6
- package/dist.commonjs/signer/evm/index.js +3 -19
- package/dist.commonjs/signer/evm/signerEvm.js +31 -35
- package/dist.commonjs/signer/evm/signerEvmAddressReadonly.js +4 -8
- package/dist.commonjs/signer/evm/verify.js +4 -7
- package/dist.commonjs/signer/index.d.ts +1 -0
- package/dist.commonjs/signer/index.d.ts.map +1 -1
- package/dist.commonjs/signer/index.js +7 -22
- package/dist.commonjs/signer/nostr/index.d.ts +1 -0
- package/dist.commonjs/signer/nostr/index.d.ts.map +1 -1
- package/dist.commonjs/signer/nostr/index.js +2 -17
- package/dist.commonjs/signer/nostr/signerNostr.js +21 -25
- package/dist.commonjs/signer/nostr/verify.js +12 -16
- package/dist.commonjs/signer/signer/index.d.ts +4 -2
- package/dist.commonjs/signer/signer/index.d.ts.map +1 -1
- package/dist.commonjs/signer/signer/index.js +22 -23
- package/dist.commonjs/utils/index.js +6 -12
- package/package.json +8 -1
- package/src/ckb/transactionLumos.ts +2 -1
- package/src/client/client.ts +1 -1
- package/src/signer/btc/signerBtc.ts +2 -3
- package/src/signer/btc/verify.ts +31 -2
- package/src/signer/doge/index.ts +4 -0
- package/src/signer/doge/signerDoge.ts +116 -0
- package/src/signer/doge/signerDogeAddressReadonly.ts +52 -0
- package/src/signer/doge/signerDogePrivateKey.ts +97 -0
- package/src/signer/doge/verify.ts +38 -0
- package/src/signer/index.ts +1 -0
- package/src/signer/nostr/index.ts +1 -0
- package/src/signer/signer/index.ts +9 -0
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const index_js_5 = require("../../hasher/index.js");
|
|
9
|
-
const index_js_6 = require("../../hex/index.js");
|
|
10
|
-
const index_js_7 = require("../signer/index.js");
|
|
1
|
+
import { Address } from "../../address/index.js";
|
|
2
|
+
import { bytesFrom } from "../../bytes/index.js";
|
|
3
|
+
import { Script, Transaction } from "../../ckb/index.js";
|
|
4
|
+
import { KnownScript } from "../../client/index.js";
|
|
5
|
+
import { hashCkb } from "../../hasher/index.js";
|
|
6
|
+
import { hexFrom } from "../../hex/index.js";
|
|
7
|
+
import { Signer, SignerSignType, SignerType } from "../signer/index.js";
|
|
11
8
|
/**
|
|
12
9
|
* @public
|
|
13
10
|
*/
|
|
14
|
-
class SignerCkbPublicKey extends
|
|
11
|
+
export class SignerCkbPublicKey extends Signer {
|
|
15
12
|
get type() {
|
|
16
|
-
return
|
|
13
|
+
return SignerType.CKB;
|
|
17
14
|
}
|
|
18
15
|
get signType() {
|
|
19
|
-
return
|
|
16
|
+
return SignerSignType.CkbSecp256k1;
|
|
20
17
|
}
|
|
21
18
|
constructor(client, publicKey) {
|
|
22
19
|
super(client);
|
|
23
|
-
this.publicKey =
|
|
24
|
-
if (
|
|
20
|
+
this.publicKey = hexFrom(publicKey);
|
|
21
|
+
if (bytesFrom(this.publicKey).length !== 33) {
|
|
25
22
|
throw new Error("Public key must be 33 bytes!");
|
|
26
23
|
}
|
|
27
24
|
}
|
|
@@ -36,7 +33,7 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
36
33
|
return this.publicKey;
|
|
37
34
|
}
|
|
38
35
|
async getAddressObjSecp256k1() {
|
|
39
|
-
return
|
|
36
|
+
return Address.fromKnownScript(this.client, KnownScript.Secp256k1Blake160, bytesFrom(hashCkb(this.publicKey)).slice(0, 20));
|
|
40
37
|
}
|
|
41
38
|
async getRecommendedAddressObj(_preference) {
|
|
42
39
|
return this.getAddressObjSecp256k1();
|
|
@@ -46,7 +43,7 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
46
43
|
const addresses = [];
|
|
47
44
|
let count = 0;
|
|
48
45
|
for await (const cell of this.client.findCells({
|
|
49
|
-
script: await
|
|
46
|
+
script: await Script.fromKnownScript(this.client, KnownScript.AnyoneCanPay, secp256k1.script.args),
|
|
50
47
|
scriptType: "lock",
|
|
51
48
|
scriptSearchMode: "prefix",
|
|
52
49
|
withData: false,
|
|
@@ -58,7 +55,7 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
58
55
|
if (addresses.some(({ script }) => script.eq(cell.cellOutput.lock))) {
|
|
59
56
|
continue;
|
|
60
57
|
}
|
|
61
|
-
addresses.push(
|
|
58
|
+
addresses.push(Address.from({
|
|
62
59
|
prefix: this.client.addressPrefix,
|
|
63
60
|
script: cell.cellOutput.lock,
|
|
64
61
|
}));
|
|
@@ -66,9 +63,9 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
66
63
|
return [secp256k1, ...addresses];
|
|
67
64
|
}
|
|
68
65
|
async getRelatedScripts(txLike) {
|
|
69
|
-
const tx =
|
|
66
|
+
const tx = Transaction.from(txLike);
|
|
70
67
|
const secp256k1 = await this.getAddressObjSecp256k1();
|
|
71
|
-
const acp = await
|
|
68
|
+
const acp = await Script.fromKnownScript(this.client, KnownScript.AnyoneCanPay, secp256k1.script.args);
|
|
72
69
|
const scripts = [];
|
|
73
70
|
for (const input of tx.inputs) {
|
|
74
71
|
await input.completeExtraInfos(this.client);
|
|
@@ -82,7 +79,7 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
82
79
|
if (lock.eq(secp256k1.script)) {
|
|
83
80
|
scripts.push({
|
|
84
81
|
script: lock,
|
|
85
|
-
cellDeps: (await this.client.getKnownScript(
|
|
82
|
+
cellDeps: (await this.client.getKnownScript(KnownScript.Secp256k1Blake160)).cellDeps,
|
|
86
83
|
});
|
|
87
84
|
}
|
|
88
85
|
else if (lock.codeHash === acp.codeHash &&
|
|
@@ -90,7 +87,7 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
90
87
|
lock.args.startsWith(acp.args)) {
|
|
91
88
|
scripts.push({
|
|
92
89
|
script: lock,
|
|
93
|
-
cellDeps: (await this.client.getKnownScript(
|
|
90
|
+
cellDeps: (await this.client.getKnownScript(KnownScript.AnyoneCanPay))
|
|
94
91
|
.cellDeps,
|
|
95
92
|
});
|
|
96
93
|
}
|
|
@@ -98,7 +95,7 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
98
95
|
return scripts;
|
|
99
96
|
}
|
|
100
97
|
async prepareTransaction(txLike) {
|
|
101
|
-
const tx =
|
|
98
|
+
const tx = Transaction.from(txLike);
|
|
102
99
|
await Promise.all((await this.getRelatedScripts(tx)).map(async ({ script, cellDeps }) => {
|
|
103
100
|
await tx.prepareSighashAllWitness(script, 65, this.client);
|
|
104
101
|
await tx.addCellDepInfos(this.client, cellDeps);
|
|
@@ -106,4 +103,3 @@ class SignerCkbPublicKey extends index_js_7.Signer {
|
|
|
106
103
|
return tx;
|
|
107
104
|
}
|
|
108
105
|
}
|
|
109
|
-
exports.SignerCkbPublicKey = SignerCkbPublicKey;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const index_js_1 = require("../../address/index.js");
|
|
5
|
-
const index_js_2 = require("../../ckb/index.js");
|
|
6
|
-
const index_js_3 = require("../signer/index.js");
|
|
1
|
+
import { Address } from "../../address/index.js";
|
|
2
|
+
import { Script } from "../../ckb/index.js";
|
|
3
|
+
import { Signer, SignerSignType, SignerType } from "../signer/index.js";
|
|
7
4
|
/**
|
|
8
5
|
* A class extending Signer that provides read-only access to a CKB script.
|
|
9
6
|
* This class does not support signing operations.
|
|
10
7
|
* @public
|
|
11
8
|
*/
|
|
12
|
-
class SignerCkbScriptReadonly extends
|
|
9
|
+
export class SignerCkbScriptReadonly extends Signer {
|
|
13
10
|
get type() {
|
|
14
|
-
return
|
|
11
|
+
return SignerType.CKB;
|
|
15
12
|
}
|
|
16
13
|
get signType() {
|
|
17
|
-
return
|
|
14
|
+
return SignerSignType.Unknown;
|
|
18
15
|
}
|
|
19
16
|
/**
|
|
20
17
|
* Creates an instance of SignerCkbScriptReadonly.
|
|
@@ -24,7 +21,7 @@ class SignerCkbScriptReadonly extends index_js_3.Signer {
|
|
|
24
21
|
*/
|
|
25
22
|
constructor(client, script) {
|
|
26
23
|
super(client);
|
|
27
|
-
this.script =
|
|
24
|
+
this.script = Script.from(script);
|
|
28
25
|
}
|
|
29
26
|
/**
|
|
30
27
|
* Connects to the client. This implementation does nothing as the class is read-only.
|
|
@@ -64,7 +61,6 @@ class SignerCkbScriptReadonly extends index_js_3.Signer {
|
|
|
64
61
|
* ```
|
|
65
62
|
*/
|
|
66
63
|
async getAddressObjs() {
|
|
67
|
-
return [
|
|
64
|
+
return [Address.fromScript(this.script, this.client)];
|
|
68
65
|
}
|
|
69
66
|
}
|
|
70
|
-
exports.SignerCkbScriptReadonly = SignerCkbScriptReadonly;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const index_js_1 = require("../../bytes/index.js");
|
|
7
|
-
const index_js_2 = require("../../hasher/index.js");
|
|
8
|
-
const index_js_3 = require("../../hex/index.js");
|
|
9
|
-
const index_js_4 = require("../../num/index.js");
|
|
1
|
+
import { secp256k1 } from "@noble/curves/secp256k1";
|
|
2
|
+
import { bytesFrom } from "../../bytes/index.js";
|
|
3
|
+
import { hashCkb } from "../../hasher/index.js";
|
|
4
|
+
import { hexFrom } from "../../hex/index.js";
|
|
5
|
+
import { numFrom } from "../../num/index.js";
|
|
10
6
|
/**
|
|
11
7
|
* @public
|
|
12
8
|
*/
|
|
13
|
-
function messageHashCkbSecp256k1(message) {
|
|
14
|
-
const msg = typeof message === "string" ? message :
|
|
15
|
-
const buffer =
|
|
16
|
-
return
|
|
9
|
+
export function messageHashCkbSecp256k1(message) {
|
|
10
|
+
const msg = typeof message === "string" ? message : hexFrom(message);
|
|
11
|
+
const buffer = bytesFrom(`Nervos Message:${msg}`, "utf8");
|
|
12
|
+
return hashCkb(buffer);
|
|
17
13
|
}
|
|
18
14
|
/**
|
|
19
15
|
* @public
|
|
20
16
|
*/
|
|
21
|
-
function verifyMessageCkbSecp256k1(message, signature, publicKey) {
|
|
22
|
-
const signatureBytes =
|
|
23
|
-
return
|
|
17
|
+
export function verifyMessageCkbSecp256k1(message, signature, publicKey) {
|
|
18
|
+
const signatureBytes = bytesFrom(signature);
|
|
19
|
+
return secp256k1.verify(new secp256k1.Signature(numFrom(signatureBytes.slice(0, 32)), numFrom(signatureBytes.slice(32, 64))).addRecoveryBit(Number(numFrom(signatureBytes.slice(64, 65)))), bytesFrom(messageHashCkbSecp256k1(message)), bytesFrom(publicKey));
|
|
24
20
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.verifyMessageJoyId = verifyMessageJoyId;
|
|
4
|
-
const ckb_1 = require("@joyid/ckb");
|
|
5
|
-
const index_js_1 = require("../../hex/index.js");
|
|
1
|
+
import { verifySignature } from "@joyid/ckb";
|
|
2
|
+
import { hexFrom } from "../../hex/index.js";
|
|
6
3
|
/**
|
|
7
4
|
* @public
|
|
8
5
|
*/
|
|
9
|
-
function verifyMessageJoyId(message, signature, identity) {
|
|
10
|
-
const challenge = typeof message === "string" ? message :
|
|
6
|
+
export function verifyMessageJoyId(message, signature, identity) {
|
|
7
|
+
const challenge = typeof message === "string" ? message : hexFrom(message).slice(2);
|
|
11
8
|
const { publicKey, keyType } = JSON.parse(identity);
|
|
12
9
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
13
|
-
return
|
|
10
|
+
return verifySignature({
|
|
14
11
|
challenge,
|
|
15
12
|
pubkey: publicKey,
|
|
16
13
|
keyType,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/signer/doge/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Address } from "../../address/index.js";
|
|
2
|
+
import { Transaction, TransactionLike } from "../../ckb/index.js";
|
|
3
|
+
import { Signer, SignerSignType, SignerType } from "../signer/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* An abstract class extending the Signer class for Dogecoin-like signing operations.
|
|
6
|
+
* This class provides methods to get Doge account, public key, and internal address,
|
|
7
|
+
* as well as signing transactions.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class SignerDoge extends Signer {
|
|
11
|
+
get type(): SignerType;
|
|
12
|
+
get signType(): SignerSignType;
|
|
13
|
+
/**
|
|
14
|
+
* Gets the Doge address associated with the signer.
|
|
15
|
+
*
|
|
16
|
+
* @returns A promise that resolves to a string representing the Doge account.
|
|
17
|
+
*/
|
|
18
|
+
abstract getDogeAddress(): Promise<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Gets the internal address, which is the Doge account in this case.
|
|
21
|
+
*
|
|
22
|
+
* @returns A promise that resolves to a string representing the internal address.
|
|
23
|
+
*/
|
|
24
|
+
getInternalAddress(): Promise<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the identity, which is the Doge address in this case.
|
|
27
|
+
*
|
|
28
|
+
* @returns A promise that resolves to a string representing the identity
|
|
29
|
+
*/
|
|
30
|
+
getIdentity(): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Gets an array of Address objects representing the known script addresses for the signer.
|
|
33
|
+
*
|
|
34
|
+
* @returns A promise that resolves to an array of Address objects.
|
|
35
|
+
*/
|
|
36
|
+
getAddressObjs(): Promise<Address[]>;
|
|
37
|
+
/**
|
|
38
|
+
* prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
|
|
39
|
+
*
|
|
40
|
+
* @param txLike - The transaction to prepare, represented as a TransactionLike object.
|
|
41
|
+
* @returns A promise that resolves to the prepared Transaction object.
|
|
42
|
+
*/
|
|
43
|
+
prepareTransaction(txLike: TransactionLike): Promise<Transaction>;
|
|
44
|
+
/**
|
|
45
|
+
* Signs a transaction without modifying it.
|
|
46
|
+
*
|
|
47
|
+
* @param txLike - The transaction to sign, represented as a TransactionLike object.
|
|
48
|
+
* @returns A promise that resolves to a signed Transaction object.
|
|
49
|
+
*/
|
|
50
|
+
signOnlyTransaction(txLike: TransactionLike): Promise<Transaction>;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=signerDoge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerDoge.d.ts","sourceRoot":"","sources":["../../../src/signer/doge/signerDoge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAe,MAAM,oBAAoB,CAAC;AAI/E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAExE;;;;;GAKG;AACH,8BAAsB,UAAW,SAAQ,MAAM;IAC7C,IAAI,IAAI,IAAI,UAAU,CAErB;IAED,IAAI,QAAQ,IAAI,cAAc,CAE7B;IAED;;;;OAIG;IACH,QAAQ,CAAC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAE1C;;;;OAIG;IACG,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAIpC;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAY1C;;;;;OAKG;IACG,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IAQvE;;;;;OAKG;IACG,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CA6BzE"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import bs58check from "bs58check";
|
|
2
|
+
import { Address } from "../../address/index.js";
|
|
3
|
+
import { bytesConcat, bytesFrom } from "../../bytes/index.js";
|
|
4
|
+
import { Transaction, WitnessArgs } from "../../ckb/index.js";
|
|
5
|
+
import { KnownScript } from "../../client/index.js";
|
|
6
|
+
import { hexFrom } from "../../hex/index.js";
|
|
7
|
+
import { numToBytes } from "../../num/index.js";
|
|
8
|
+
import { Signer, SignerSignType, SignerType } from "../signer/index.js";
|
|
9
|
+
/**
|
|
10
|
+
* An abstract class extending the Signer class for Dogecoin-like signing operations.
|
|
11
|
+
* This class provides methods to get Doge account, public key, and internal address,
|
|
12
|
+
* as well as signing transactions.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export class SignerDoge extends Signer {
|
|
16
|
+
get type() {
|
|
17
|
+
return SignerType.Doge;
|
|
18
|
+
}
|
|
19
|
+
get signType() {
|
|
20
|
+
return SignerSignType.DogeEcdsa;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Gets the internal address, which is the Doge account in this case.
|
|
24
|
+
*
|
|
25
|
+
* @returns A promise that resolves to a string representing the internal address.
|
|
26
|
+
*/
|
|
27
|
+
async getInternalAddress() {
|
|
28
|
+
return this.getDogeAddress();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Gets the identity, which is the Doge address in this case.
|
|
32
|
+
*
|
|
33
|
+
* @returns A promise that resolves to a string representing the identity
|
|
34
|
+
*/
|
|
35
|
+
async getIdentity() {
|
|
36
|
+
return this.getDogeAddress();
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Gets an array of Address objects representing the known script addresses for the signer.
|
|
40
|
+
*
|
|
41
|
+
* @returns A promise that resolves to an array of Address objects.
|
|
42
|
+
*/
|
|
43
|
+
async getAddressObjs() {
|
|
44
|
+
const hash = bs58check.decode(await this.getDogeAddress()).slice(1);
|
|
45
|
+
return [
|
|
46
|
+
await Address.fromKnownScript(this.client, KnownScript.OmniLock, hexFrom([0x05, ...hash, 0x00])),
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
|
|
51
|
+
*
|
|
52
|
+
* @param txLike - The transaction to prepare, represented as a TransactionLike object.
|
|
53
|
+
* @returns A promise that resolves to the prepared Transaction object.
|
|
54
|
+
*/
|
|
55
|
+
async prepareTransaction(txLike) {
|
|
56
|
+
const tx = Transaction.from(txLike);
|
|
57
|
+
const { script } = await this.getRecommendedAddressObj();
|
|
58
|
+
await tx.addCellDepsOfKnownScripts(this.client, KnownScript.OmniLock);
|
|
59
|
+
await tx.prepareSighashAllWitness(script, 85, this.client);
|
|
60
|
+
return tx;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Signs a transaction without modifying it.
|
|
64
|
+
*
|
|
65
|
+
* @param txLike - The transaction to sign, represented as a TransactionLike object.
|
|
66
|
+
* @returns A promise that resolves to a signed Transaction object.
|
|
67
|
+
*/
|
|
68
|
+
async signOnlyTransaction(txLike) {
|
|
69
|
+
const tx = Transaction.from(txLike);
|
|
70
|
+
const { script } = await this.getRecommendedAddressObj();
|
|
71
|
+
const info = await tx.getSignHashInfo(script, this.client);
|
|
72
|
+
if (!info) {
|
|
73
|
+
return tx;
|
|
74
|
+
}
|
|
75
|
+
const signature = bytesFrom(await this.signMessageRaw(info.message.slice(2)), "base64");
|
|
76
|
+
signature[0] = 31 + ((signature[0] - 27) % 4);
|
|
77
|
+
const witness = WitnessArgs.fromBytes(tx.witnesses[info.position]);
|
|
78
|
+
witness.lock = hexFrom(bytesConcat(numToBytes(5 * 4 + signature.length, 4), numToBytes(4 * 4, 4), numToBytes(5 * 4 + signature.length, 4), numToBytes(5 * 4 + signature.length, 4), numToBytes(signature.length, 4), signature));
|
|
79
|
+
tx.setWitnessArgsAt(info.position, witness);
|
|
80
|
+
return tx;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Client } from "../../client/index.js";
|
|
2
|
+
import { SignerDoge } from "./signerDoge.js";
|
|
3
|
+
/**
|
|
4
|
+
* A class extending SignerDoge that provides read-only access to a Doge address.
|
|
5
|
+
* This class does not support signing operations.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class SignerDogeAddressReadonly extends SignerDoge {
|
|
9
|
+
private readonly address;
|
|
10
|
+
/**
|
|
11
|
+
* Creates an instance of SignerDogeAddressReadonly.
|
|
12
|
+
*
|
|
13
|
+
* @param client - The client instance used for communication.
|
|
14
|
+
* @param address - The Doge address with the signer.
|
|
15
|
+
*/
|
|
16
|
+
constructor(client: Client, address: string);
|
|
17
|
+
/**
|
|
18
|
+
* Connects to the client. This implementation does nothing as the class is read-only.
|
|
19
|
+
*
|
|
20
|
+
* @returns A promise that resolves when the connection is complete.
|
|
21
|
+
*/
|
|
22
|
+
connect(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Check if the signer is connected.
|
|
25
|
+
*
|
|
26
|
+
* @returns A promise that resolves the connection status.
|
|
27
|
+
*/
|
|
28
|
+
isConnected(): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the Doge address associated with the signer.
|
|
31
|
+
*
|
|
32
|
+
* @returns A promise that resolves to a string representing the Doge address.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const account = await signer.getDogeAddress(); // Outputs the Doge address
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
getDogeAddress(): Promise<string>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=signerDogeAddressReadonly.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerDogeAddressReadonly.d.ts","sourceRoot":"","sources":["../../../src/signer/doge/signerDogeAddressReadonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,UAAU;IASrD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAR1B;;;;;OAKG;gBAED,MAAM,EAAE,MAAM,EACG,OAAO,EAAE,MAAM;IAKlC;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC;;;;;;;;;OASG;IACG,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;CAGxC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { SignerDoge } from "./signerDoge.js";
|
|
2
|
+
/**
|
|
3
|
+
* A class extending SignerDoge that provides read-only access to a Doge address.
|
|
4
|
+
* This class does not support signing operations.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export class SignerDogeAddressReadonly extends SignerDoge {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of SignerDogeAddressReadonly.
|
|
10
|
+
*
|
|
11
|
+
* @param client - The client instance used for communication.
|
|
12
|
+
* @param address - The Doge address with the signer.
|
|
13
|
+
*/
|
|
14
|
+
constructor(client, address) {
|
|
15
|
+
super(client);
|
|
16
|
+
this.address = address;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Connects to the client. This implementation does nothing as the class is read-only.
|
|
20
|
+
*
|
|
21
|
+
* @returns A promise that resolves when the connection is complete.
|
|
22
|
+
*/
|
|
23
|
+
async connect() { }
|
|
24
|
+
/**
|
|
25
|
+
* Check if the signer is connected.
|
|
26
|
+
*
|
|
27
|
+
* @returns A promise that resolves the connection status.
|
|
28
|
+
*/
|
|
29
|
+
async isConnected() {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Gets the Doge address associated with the signer.
|
|
34
|
+
*
|
|
35
|
+
* @returns A promise that resolves to a string representing the Doge address.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const account = await signer.getDogeAddress(); // Outputs the Doge address
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
async getDogeAddress() {
|
|
43
|
+
return this.address;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BytesLike } from "../../bytes/index.js";
|
|
2
|
+
import { Client } from "../../client/index.js";
|
|
3
|
+
import { Hex } from "../../hex/index.js";
|
|
4
|
+
import { SignerDoge } from "./signerDoge.js";
|
|
5
|
+
/**
|
|
6
|
+
* A class extending SignerDoge that provides access to a Doge address.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class SignerDogePrivateKey extends SignerDoge {
|
|
10
|
+
readonly dogeNetwork: number;
|
|
11
|
+
private readonly privateKey;
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of SignerDogePrivateKey
|
|
14
|
+
*
|
|
15
|
+
* @param client - The client instance used for communication.
|
|
16
|
+
* @param privateKey - The Doge private key with the signer.
|
|
17
|
+
*/
|
|
18
|
+
constructor(client: Client, privateKey: BytesLike, dogeNetwork?: number);
|
|
19
|
+
/**
|
|
20
|
+
* Connects to the client. This implementation does nothing as the class is always connected.
|
|
21
|
+
*
|
|
22
|
+
* @returns A promise that resolves when the connection is complete.
|
|
23
|
+
*/
|
|
24
|
+
connect(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Check if the signer is connected.
|
|
27
|
+
*
|
|
28
|
+
* @returns A promise that resolves the connection status.
|
|
29
|
+
*/
|
|
30
|
+
isConnected(): Promise<boolean>;
|
|
31
|
+
getDogePublicKey(): Promise<Hex>;
|
|
32
|
+
/**
|
|
33
|
+
* Gets the Doge address associated with the signer.
|
|
34
|
+
*
|
|
35
|
+
* @returns A promise that resolves to a string representing the Doge address.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const account = await signer.getDogeAddress(); // Outputs the Doge address
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
getDogeAddress(): Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Signs a message and returns signature only.
|
|
45
|
+
*
|
|
46
|
+
* @param msg - The message to sign, as a string or BytesLike object.
|
|
47
|
+
* @returns A promise that resolves to the signature as a string.
|
|
48
|
+
* @throws Will throw an error if not implemented.
|
|
49
|
+
*/
|
|
50
|
+
signMessageRaw(msg: string | BytesLike): Promise<string>;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=signerDogePrivateKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerDogePrivateKey.d.ts","sourceRoot":"","sources":["../../../src/signer/doge/signerDogePrivateKey.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,SAAS,EAEV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAW,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,UAAU;aAYhC,WAAW;IAX7B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IAEnC;;;;;OAKG;gBAED,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,SAAS,EACL,WAAW,SAAO;IASpC;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC;IAItC;;;;;;;;;OASG;IACG,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAOvC;;;;;;OAMG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;CAa/D"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { secp256k1 } from "@noble/curves/secp256k1";
|
|
2
|
+
import { magicHash } from "bitcoinjs-message";
|
|
3
|
+
import { bytesConcat, bytesFrom, bytesTo, } from "../../bytes/index.js";
|
|
4
|
+
import { hexFrom } from "../../hex/index.js";
|
|
5
|
+
import { btcP2pkhAddressFromPublicKey } from "../btc/verify.js";
|
|
6
|
+
import { SignerDoge } from "./signerDoge.js";
|
|
7
|
+
/**
|
|
8
|
+
* A class extending SignerDoge that provides access to a Doge address.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export class SignerDogePrivateKey extends SignerDoge {
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of SignerDogePrivateKey
|
|
14
|
+
*
|
|
15
|
+
* @param client - The client instance used for communication.
|
|
16
|
+
* @param privateKey - The Doge private key with the signer.
|
|
17
|
+
*/
|
|
18
|
+
constructor(client, privateKey, dogeNetwork = 0x1e) {
|
|
19
|
+
super(client);
|
|
20
|
+
this.dogeNetwork = dogeNetwork;
|
|
21
|
+
this.privateKey = bytesFrom(privateKey);
|
|
22
|
+
if (this.privateKey.length !== 32) {
|
|
23
|
+
throw new Error("Private key must be 32 bytes!");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Connects to the client. This implementation does nothing as the class is always connected.
|
|
28
|
+
*
|
|
29
|
+
* @returns A promise that resolves when the connection is complete.
|
|
30
|
+
*/
|
|
31
|
+
async connect() { }
|
|
32
|
+
/**
|
|
33
|
+
* Check if the signer is connected.
|
|
34
|
+
*
|
|
35
|
+
* @returns A promise that resolves the connection status.
|
|
36
|
+
*/
|
|
37
|
+
async isConnected() {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
async getDogePublicKey() {
|
|
41
|
+
return hexFrom(secp256k1.getPublicKey(this.privateKey, true));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Gets the Doge address associated with the signer.
|
|
45
|
+
*
|
|
46
|
+
* @returns A promise that resolves to a string representing the Doge address.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const account = await signer.getDogeAddress(); // Outputs the Doge address
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
async getDogeAddress() {
|
|
54
|
+
return btcP2pkhAddressFromPublicKey(await this.getDogePublicKey(), this.dogeNetwork);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Signs a message and returns signature only.
|
|
58
|
+
*
|
|
59
|
+
* @param msg - The message to sign, as a string or BytesLike object.
|
|
60
|
+
* @returns A promise that resolves to the signature as a string.
|
|
61
|
+
* @throws Will throw an error if not implemented.
|
|
62
|
+
*/
|
|
63
|
+
async signMessageRaw(msg) {
|
|
64
|
+
const challenge = typeof msg === "string" ? msg : hexFrom(msg).slice(2);
|
|
65
|
+
const signature = secp256k1.sign(magicHash(challenge, "\x19Dogecoin Signed Message:\n"), this.privateKey);
|
|
66
|
+
return bytesTo(bytesConcat([31 + signature.recovery], signature.toCompactRawBytes()), "base64");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/signer/doge/verify.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAO5D;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAqBT"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { secp256k1 } from "@noble/curves/secp256k1";
|
|
2
|
+
import { magicHash } from "bitcoinjs-message";
|
|
3
|
+
import { bytesFrom } from "../../bytes/index.js";
|
|
4
|
+
import { hexFrom } from "../../hex/index.js";
|
|
5
|
+
import { btcEcdsaPublicKeyHash, btcPublicKeyFromP2pkhAddress, } from "../btc/verify.js";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export function verifyMessageDogeEcdsa(message, signature, address) {
|
|
10
|
+
const challenge = typeof message === "string" ? message : hexFrom(message).slice(2);
|
|
11
|
+
const [recoveryBit, ...rawSign] = bytesFrom(signature, "base64");
|
|
12
|
+
const sig = secp256k1.Signature.fromCompact(hexFrom(rawSign).slice(2)).addRecoveryBit(recoveryBit - 31);
|
|
13
|
+
return (btcPublicKeyFromP2pkhAddress(address) ===
|
|
14
|
+
hexFrom(btcEcdsaPublicKeyHash(sig
|
|
15
|
+
.recoverPublicKey(magicHash(challenge, "\x19Dogecoin Signed Message:\n"))
|
|
16
|
+
.toHex())));
|
|
17
|
+
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SignerAlwaysError = void 0;
|
|
4
|
-
const dummy_js_1 = require("./dummy.js");
|
|
1
|
+
import { SignerDummy } from "./dummy.js";
|
|
5
2
|
/**
|
|
6
3
|
* @public
|
|
7
4
|
*/
|
|
8
|
-
class SignerAlwaysError extends
|
|
5
|
+
export class SignerAlwaysError extends SignerDummy {
|
|
9
6
|
constructor(client, type, message) {
|
|
10
7
|
super(client, type);
|
|
11
8
|
this.message = message;
|
|
@@ -14,4 +11,3 @@ class SignerAlwaysError extends dummy_js_1.SignerDummy {
|
|
|
14
11
|
throw new Error(this.message);
|
|
15
12
|
}
|
|
16
13
|
}
|
|
17
|
-
exports.SignerAlwaysError = SignerAlwaysError;
|