@ckb-ccc/core 0.0.4 → 0.0.5-alpha.0
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/README.md +6 -0
- package/dist/ckb/transaction.d.ts +85 -2
- package/dist/ckb/transaction.d.ts.map +1 -1
- package/dist/ckb/transaction.js +152 -7
- package/dist/client/client.d.ts +8 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +29 -2
- package/dist/client/clientPublicMainnet.advanced.d.ts.map +1 -1
- package/dist/client/clientPublicMainnet.advanced.js +4 -0
- package/dist/client/clientPublicTestnet.advanced.d.ts.map +1 -1
- package/dist/client/clientPublicTestnet.advanced.js +4 -0
- package/dist/client/clientTypes.d.ts +48 -1
- package/dist/client/clientTypes.d.ts.map +1 -1
- package/dist/client/clientTypes.js +27 -1
- package/dist/client/jsonRpc/index.d.ts +9 -1
- package/dist/client/jsonRpc/index.d.ts.map +1 -1
- package/dist/client/jsonRpc/index.js +15 -1
- package/dist/client/jsonRpc/transformers.d.ts +17 -3
- package/dist/client/jsonRpc/transformers.d.ts.map +1 -1
- package/dist/client/jsonRpc/transformers.js +37 -3
- package/dist/client/jsonRpc/types.d.ts +15 -0
- package/dist/client/jsonRpc/types.d.ts.map +1 -1
- package/dist/fixedPoint/index.d.ts.map +1 -1
- package/dist/fixedPoint/index.js +4 -1
- package/dist/fixedPoint/index.test.d.ts +2 -0
- package/dist/fixedPoint/index.test.d.ts.map +1 -0
- package/dist/fixedPoint/index.test.js +43 -0
- package/dist/signer/btc/signerBtc.d.ts.map +1 -1
- package/dist/signer/btc/signerBtc.js +2 -3
- package/dist/signer/evm/signerEvm.d.ts.map +1 -1
- package/dist/signer/evm/signerEvm.js +2 -3
- package/dist/signer/index.d.ts +0 -1
- package/dist/signer/index.d.ts.map +1 -1
- package/dist/signer/index.js +0 -1
- package/dist/signer/signer.d.ts +10 -2
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/signer/signer.js +9 -1
- package/dist.commonjs/ckb/transaction.d.ts +85 -2
- package/dist.commonjs/ckb/transaction.d.ts.map +1 -1
- package/dist.commonjs/ckb/transaction.js +150 -5
- package/dist.commonjs/client/client.d.ts +8 -3
- package/dist.commonjs/client/client.d.ts.map +1 -1
- package/dist.commonjs/client/client.js +28 -1
- package/dist.commonjs/client/clientPublicMainnet.advanced.d.ts.map +1 -1
- package/dist.commonjs/client/clientPublicMainnet.advanced.js +4 -0
- package/dist.commonjs/client/clientPublicTestnet.advanced.d.ts.map +1 -1
- package/dist.commonjs/client/clientPublicTestnet.advanced.js +4 -0
- package/dist.commonjs/client/clientTypes.d.ts +48 -1
- package/dist.commonjs/client/clientTypes.d.ts.map +1 -1
- package/dist.commonjs/client/clientTypes.js +29 -0
- package/dist.commonjs/client/jsonRpc/index.d.ts +9 -1
- package/dist.commonjs/client/jsonRpc/index.d.ts.map +1 -1
- package/dist.commonjs/client/jsonRpc/index.js +15 -1
- package/dist.commonjs/client/jsonRpc/transformers.d.ts +17 -3
- package/dist.commonjs/client/jsonRpc/transformers.d.ts.map +1 -1
- package/dist.commonjs/client/jsonRpc/transformers.js +35 -1
- package/dist.commonjs/client/jsonRpc/types.d.ts +15 -0
- package/dist.commonjs/client/jsonRpc/types.d.ts.map +1 -1
- package/dist.commonjs/fixedPoint/index.d.ts.map +1 -1
- package/dist.commonjs/fixedPoint/index.js +4 -1
- package/dist.commonjs/fixedPoint/index.test.d.ts +2 -0
- package/dist.commonjs/fixedPoint/index.test.d.ts.map +1 -0
- package/dist.commonjs/fixedPoint/index.test.js +45 -0
- package/dist.commonjs/signer/btc/signerBtc.d.ts.map +1 -1
- package/dist.commonjs/signer/btc/signerBtc.js +2 -3
- package/dist.commonjs/signer/evm/signerEvm.d.ts.map +1 -1
- package/dist.commonjs/signer/evm/signerEvm.js +2 -3
- package/dist.commonjs/signer/index.d.ts +0 -1
- package/dist.commonjs/signer/index.d.ts.map +1 -1
- package/dist.commonjs/signer/index.js +0 -1
- package/dist.commonjs/signer/signer.d.ts +10 -2
- package/dist.commonjs/signer/signer.d.ts.map +1 -1
- package/dist.commonjs/signer/signer.js +9 -1
- package/dist.commonjs/tsconfig.commonjs.tsbuildinfo +1 -1
- package/jest.config.js +5 -0
- package/package.json +6 -2
- package/src/ckb/transaction.ts +198 -3
- package/src/client/client.ts +64 -3
- package/src/client/clientPublicMainnet.advanced.ts +5 -0
- package/src/client/clientPublicTestnet.advanced.ts +5 -0
- package/src/client/clientTypes.ts +70 -1
- package/src/client/jsonRpc/index.ts +38 -2
- package/src/client/jsonRpc/transformers.ts +73 -4
- package/src/client/jsonRpc/types.ts +16 -0
- package/src/fixedPoint/index.test.ts +55 -0
- package/src/fixedPoint/index.ts +7 -1
- package/src/signer/btc/signerBtc.ts +6 -3
- package/src/signer/evm/signerEvm.ts +2 -3
- package/src/signer/index.ts +0 -1
- package/src/signer/signer.ts +9 -0
- package/dist/signer/helpers.d.ts +0 -40
- package/dist/signer/helpers.d.ts.map +0 -1
- package/dist/signer/helpers.js +0 -91
- package/dist.commonjs/signer/helpers.d.ts +0 -40
- package/dist.commonjs/signer/helpers.d.ts.map +0 -1
- package/dist.commonjs/signer/helpers.js +0 -96
- package/src/signer/helpers.ts +0 -124
- package/tsconfig.base.json +0 -21
- package/tsconfig.commonjs.json +0 -8
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fetch from "cross-fetch";
|
|
2
2
|
import { hexFrom } from "../../hex";
|
|
3
|
+
import { numToHex } from "../../num";
|
|
3
4
|
import { Client } from "../client";
|
|
4
5
|
import { JsonRpcTransformers } from "./advanced";
|
|
5
6
|
/**
|
|
@@ -51,6 +52,17 @@ export class ClientJsonRpc extends Client {
|
|
|
51
52
|
* @returns The transaction with status.
|
|
52
53
|
*/
|
|
53
54
|
this.getTransaction = this.buildSender("get_transaction", [hexFrom], JsonRpcTransformers.transactionResponseTo);
|
|
55
|
+
/**
|
|
56
|
+
* find cells from node.
|
|
57
|
+
*
|
|
58
|
+
* @param txHash - The hash of the transaction.
|
|
59
|
+
* @returns The found cells.
|
|
60
|
+
*/
|
|
61
|
+
this.findCellsPaged = this.buildSender("get_cells", [
|
|
62
|
+
JsonRpcTransformers.indexerSearchKeyFrom,
|
|
63
|
+
(order) => order ?? "asc",
|
|
64
|
+
(limit) => numToHex(limit ?? 10),
|
|
65
|
+
], JsonRpcTransformers.findCellsResponseTo);
|
|
54
66
|
}
|
|
55
67
|
/**
|
|
56
68
|
* Returns the URL of the JSON-RPC server.
|
|
@@ -70,7 +82,9 @@ export class ClientJsonRpc extends Client {
|
|
|
70
82
|
*/
|
|
71
83
|
buildSender(rpcMethod, inTransformers, outTransformer) {
|
|
72
84
|
return async (...req) => {
|
|
73
|
-
const payload = ClientJsonRpc.buildPayload(rpcMethod, await Promise.all(req
|
|
85
|
+
const payload = ClientJsonRpc.buildPayload(rpcMethod, await Promise.all(req
|
|
86
|
+
.concat(Array.from(new Array(Math.max(inTransformers.length - req.length, 0))))
|
|
87
|
+
.map((v, i) => transform(v, inTransformers[i]))));
|
|
74
88
|
return transform(await this.send(payload), outTransformer);
|
|
75
89
|
};
|
|
76
90
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CellDep, CellDepLike, CellInput, CellInputLike, CellOutput, CellOutputLike, DepType, DepTypeLike, HashType, HashTypeLike, OutPoint, OutPointLike, Script, ScriptLike, Transaction, TransactionLike } from "../../ckb";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Hex } from "../../hex";
|
|
3
|
+
import { NumLike } from "../../num";
|
|
4
|
+
import { ClientFindCellsResponse, ClientIndexerSearchKeyLike, ClientTransactionResponse, TransactionStatus } from "../clientTypes";
|
|
5
|
+
import { JsonRpcCellDep, JsonRpcCellInput, JsonRpcCellOutput, JsonRpcDepType, JsonRpcHashType, JsonRpcIndexerSearchKey, JsonRpcOutPoint, JsonRpcScript, JsonRpcTransaction } from "./types";
|
|
4
6
|
export declare class JsonRpcTransformers {
|
|
5
7
|
static hashTypeFrom(hashType: HashTypeLike): JsonRpcHashType;
|
|
6
8
|
static hashTypeTo(hashType: JsonRpcHashType): HashType;
|
|
@@ -18,11 +20,23 @@ export declare class JsonRpcTransformers {
|
|
|
18
20
|
static cellDepTo(cellDep: JsonRpcCellDep): CellDep;
|
|
19
21
|
static transactionFrom(txLike: TransactionLike): JsonRpcTransaction;
|
|
20
22
|
static transactionTo(tx: JsonRpcTransaction): Transaction;
|
|
21
|
-
static transactionResponseTo({ tx_status: { status }, transaction, }: {
|
|
23
|
+
static transactionResponseTo({ tx_status: { status, block_number }, transaction, }: {
|
|
22
24
|
tx_status: {
|
|
23
25
|
status: TransactionStatus;
|
|
26
|
+
block_number: Hex;
|
|
24
27
|
};
|
|
25
28
|
transaction: JsonRpcTransaction;
|
|
26
29
|
}): ClientTransactionResponse;
|
|
30
|
+
static rangeFrom([a, b]: [NumLike, NumLike]): [Hex, Hex];
|
|
31
|
+
static indexerSearchKeyFrom(keyLike: ClientIndexerSearchKeyLike): JsonRpcIndexerSearchKey;
|
|
32
|
+
static findCellsResponseTo({ last_cursor, objects, }: {
|
|
33
|
+
last_cursor: string;
|
|
34
|
+
objects: {
|
|
35
|
+
block_number: Hex;
|
|
36
|
+
out_point: JsonRpcOutPoint;
|
|
37
|
+
output: JsonRpcCellOutput;
|
|
38
|
+
output_data: Hex;
|
|
39
|
+
}[];
|
|
40
|
+
}): ClientFindCellsResponse;
|
|
27
41
|
}
|
|
28
42
|
//# sourceMappingURL=transformers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformers.d.ts","sourceRoot":"","sources":["../../../src/client/jsonRpc/transformers.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"transformers.d.ts","sourceRoot":"","sources":["../../../src/client/jsonRpc/transformers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EACP,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,cAAc,EACd,OAAO,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B,GAAG,UAAU;IAO9D,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc;IAMxD,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO;IAMlD,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,kBAAkB;IAYnE,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,kBAAkB,GAAG,WAAW;IAWzD,MAAM,CAAC,qBAAqB,CAAC,EAC3B,SAAS,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,EACnC,WAAW,GACZ,EAAE;QACD,SAAS,EAAE;YAAE,MAAM,EAAE,iBAAiB,CAAC;YAAC,YAAY,EAAE,GAAG,CAAA;SAAE,CAAC;QAC5D,WAAW,EAAE,kBAAkB,CAAC;KACjC,GAAG,yBAAyB;IAO7B,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC;IAGxD,MAAM,CAAC,oBAAoB,CACzB,OAAO,EAAE,0BAA0B,GAClC,uBAAuB;IA8B1B,MAAM,CAAC,mBAAmB,CAAC,EACzB,WAAW,EACX,OAAO,GACR,EAAE;QACD,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE;YACP,YAAY,EAAE,GAAG,CAAC;YAClB,SAAS,EAAE,eAAe,CAAC;YAC3B,MAAM,EAAE,iBAAiB,CAAC;YAC1B,WAAW,EAAE,GAAG,CAAC;SAClB,EAAE,CAAC;KACL,GAAG,uBAAuB;CAa5B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CellDep, CellInput, CellOutput, OutPoint, Script, Transaction, depTypeFrom, hashTypeFrom, } from "../../ckb";
|
|
2
|
-
import { numToHex } from "../../num";
|
|
1
|
+
import { Cell, CellDep, CellInput, CellOutput, OutPoint, Script, Transaction, depTypeFrom, hashTypeFrom, } from "../../ckb";
|
|
2
|
+
import { numFrom, numToHex } from "../../num";
|
|
3
3
|
import { apply } from "../../utils";
|
|
4
|
+
import { ClientIndexerSearchKey, } from "../clientTypes";
|
|
4
5
|
export class JsonRpcTransformers {
|
|
5
6
|
static hashTypeFrom(hashType) {
|
|
6
7
|
return hashTypeFrom(hashType);
|
|
@@ -113,10 +114,43 @@ export class JsonRpcTransformers {
|
|
|
113
114
|
witnesses: tx.witnesses,
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
|
-
static transactionResponseTo({ tx_status: { status }, transaction, }) {
|
|
117
|
+
static transactionResponseTo({ tx_status: { status, block_number }, transaction, }) {
|
|
117
118
|
return {
|
|
118
119
|
transaction: JsonRpcTransformers.transactionTo(transaction),
|
|
119
120
|
status,
|
|
121
|
+
blockNumber: numFrom(block_number),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
static rangeFrom([a, b]) {
|
|
125
|
+
return [numToHex(a), numToHex(b)];
|
|
126
|
+
}
|
|
127
|
+
static indexerSearchKeyFrom(keyLike) {
|
|
128
|
+
const key = ClientIndexerSearchKey.from(keyLike);
|
|
129
|
+
return {
|
|
130
|
+
script: JsonRpcTransformers.scriptFrom(key.script),
|
|
131
|
+
script_type: key.scriptType,
|
|
132
|
+
script_search_mode: key.scriptSearchMode,
|
|
133
|
+
filter: apply((filter) => ({
|
|
134
|
+
script: apply(JsonRpcTransformers.scriptFrom, filter.script),
|
|
135
|
+
script_len_range: apply(JsonRpcTransformers.rangeFrom, filter.scriptLenRange),
|
|
136
|
+
output_data: filter.outputData,
|
|
137
|
+
output_data_filter_mode: filter.outputDataSearchMode,
|
|
138
|
+
output_data_len_range: apply(JsonRpcTransformers.rangeFrom, filter.outputDataLenRange),
|
|
139
|
+
output_capacity_range: apply(JsonRpcTransformers.rangeFrom, filter.outputCapacityRange),
|
|
140
|
+
block_range: apply(JsonRpcTransformers.rangeFrom, filter.blockRange),
|
|
141
|
+
}), key.filter),
|
|
142
|
+
with_data: key.withData,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
static findCellsResponseTo({ last_cursor, objects, }) {
|
|
146
|
+
return {
|
|
147
|
+
lastCursor: last_cursor,
|
|
148
|
+
cells: objects.map((cell) => Cell.from({
|
|
149
|
+
blockNumber: cell.block_number,
|
|
150
|
+
outPoint: JsonRpcTransformers.outPointTo(cell.out_point),
|
|
151
|
+
cellOutput: JsonRpcTransformers.cellOutputTo(cell.output),
|
|
152
|
+
outputData: cell.output_data,
|
|
153
|
+
})),
|
|
120
154
|
};
|
|
121
155
|
}
|
|
122
156
|
}
|
|
@@ -38,4 +38,19 @@ export type JsonRpcTransaction = {
|
|
|
38
38
|
outputs_data: Hex[];
|
|
39
39
|
witnesses: Hex[];
|
|
40
40
|
};
|
|
41
|
+
export type JsonRpcIndexerSearchKey = {
|
|
42
|
+
script: JsonRpcScript;
|
|
43
|
+
script_type: "lock" | "type";
|
|
44
|
+
script_search_mode?: "prefix" | "exact" | "partial";
|
|
45
|
+
filter?: {
|
|
46
|
+
script?: JsonRpcScript;
|
|
47
|
+
script_len_range?: [Hex, Hex];
|
|
48
|
+
output_data?: Hex;
|
|
49
|
+
output_data_filter_mode?: "prefix" | "exact" | "partial";
|
|
50
|
+
output_data_len_range?: [Hex, Hex];
|
|
51
|
+
output_capacity_range?: [Hex, Hex];
|
|
52
|
+
block_range?: [Hex, Hex];
|
|
53
|
+
};
|
|
54
|
+
with_data?: boolean;
|
|
55
|
+
};
|
|
41
56
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/jsonRpc/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAA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AAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACpD,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC9B,WAAW,CAAC,EAAE,GAAG,CAAC;QAClB,uBAAuB,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;QACzD,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACnC,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACnC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;KAC1B,CAAC;IACF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixedPoint/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;;GAGG;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AAEH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,SAAI,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixedPoint/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;;GAGG;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AAEH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,SAAI,GAAG,MAAM,CAa5E;AAED;;;;;;;;;;;;;GAaG;AAEH,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,SAAI,GAAG,UAAU,CAc5E;AAED;;GAEG;AAEH,eAAO,MAAM,IAAI,KAAK,CAAC;AAEvB;;;GAGG;AAEH,eAAO,MAAM,GAAG,QAAsB,CAAC"}
|
package/dist/fixedPoint/index.js
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export function fixedPointToString(val, decimals = 8) {
|
|
19
19
|
const str = fixedPointFrom(val).toString();
|
|
20
|
+
if (decimals === 0) {
|
|
21
|
+
return str;
|
|
22
|
+
}
|
|
20
23
|
const l = str.length <= decimals ? "0" : str.slice(0, -decimals);
|
|
21
24
|
const r = str.slice(-decimals).padStart(decimals, "0").replace(/0*$/, "");
|
|
22
25
|
if (r === "") {
|
|
@@ -42,7 +45,7 @@ export function fixedPointFrom(val, decimals = 8) {
|
|
|
42
45
|
if (typeof val === "bigint") {
|
|
43
46
|
return val;
|
|
44
47
|
}
|
|
45
|
-
const [l, r] = val.toString().split(".");
|
|
48
|
+
const [l, r] = (typeof val === "number" ? val.toFixed(decimals) : val.toString()).split(".");
|
|
46
49
|
const lVal = BigInt(l.padEnd(l.length + decimals, "0"));
|
|
47
50
|
if (r === undefined) {
|
|
48
51
|
return lVal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/fixedPoint/index.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { fixedPointFrom, fixedPointToString } from ".";
|
|
2
|
+
describe("fixedPointToString", () => {
|
|
3
|
+
const cases = [
|
|
4
|
+
[0n, "0"],
|
|
5
|
+
[1n, "0.00000001"],
|
|
6
|
+
[100000000n, "1"],
|
|
7
|
+
[1000000000n, "10"],
|
|
8
|
+
[1010100000n, "10.101"],
|
|
9
|
+
[11n, "1.1", 1],
|
|
10
|
+
[0n, "0", 1],
|
|
11
|
+
[1n, "1", 0],
|
|
12
|
+
[0n, "0", 0],
|
|
13
|
+
];
|
|
14
|
+
cases.forEach(([i, o, decimals]) => test(`${i} with ${decimals ?? "default"} decimals = "${o}"`, () => {
|
|
15
|
+
expect(fixedPointToString(i, decimals)).toBe(o);
|
|
16
|
+
}));
|
|
17
|
+
});
|
|
18
|
+
describe("fixedPointFrom string", () => {
|
|
19
|
+
const cases = [
|
|
20
|
+
["0", 0n],
|
|
21
|
+
["0.00000001", 1n],
|
|
22
|
+
["1", 100000000n],
|
|
23
|
+
["10", 1000000000n],
|
|
24
|
+
["10.101", 1010100000n],
|
|
25
|
+
["1.1", 11n, 1],
|
|
26
|
+
["0", 0n, 1],
|
|
27
|
+
["1", 1n, 0],
|
|
28
|
+
["0", 0n, 0],
|
|
29
|
+
];
|
|
30
|
+
cases.forEach(([i, o, decimals]) => test(`"${i}" = ${o} with ${decimals ?? "default"} decimals `, () => {
|
|
31
|
+
expect(fixedPointFrom(i, decimals)).toBe(o);
|
|
32
|
+
}));
|
|
33
|
+
});
|
|
34
|
+
describe("fixedPointFrom number", () => {
|
|
35
|
+
const cases = [
|
|
36
|
+
[0.00000001, 1n],
|
|
37
|
+
[10.101, 1010100000n],
|
|
38
|
+
[1.1, 11n, 1],
|
|
39
|
+
];
|
|
40
|
+
cases.forEach(([i, o, decimals]) => test(`${i} = ${o} with ${decimals ?? "default"} decimals `, () => {
|
|
41
|
+
expect(fixedPointFrom(i, decimals)).toBe(o);
|
|
42
|
+
}));
|
|
43
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signerBtc.d.ts","sourceRoot":"","sources":["../../../src/signer/btc/signerBtc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAe,MAAM,WAAW,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"signerBtc.d.ts","sourceRoot":"","sources":["../../../src/signer/btc/signerBtc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAe,MAAM,WAAW,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;GAIG;AACH,8BAAsB,SAAU,SAAQ,MAAM;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAEzC;;;;OAIG;IACH,QAAQ,CAAC,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAE5C;;;;OAIG;IACG,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAa1C;;;;;OAKG;IACG,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IASvE;;;;;OAKG;IACG,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CAgCzE"}
|
|
@@ -6,7 +6,6 @@ import { Transaction, WitnessArgs } from "../../ckb";
|
|
|
6
6
|
import { KnownScript } from "../../client";
|
|
7
7
|
import { hexFrom } from "../../hex";
|
|
8
8
|
import { numToBytes } from "../../num";
|
|
9
|
-
import { getSignHashInfo, prepareSighashAllWitness } from "../helpers";
|
|
10
9
|
import { Signer } from "../signer";
|
|
11
10
|
/**
|
|
12
11
|
* An abstract class extending the Signer class for Bitcoin-like signing operations.
|
|
@@ -42,7 +41,7 @@ export class SignerBtc extends Signer {
|
|
|
42
41
|
*/
|
|
43
42
|
async prepareTransaction(txLike) {
|
|
44
43
|
const { script } = await this.getRecommendedAddressObj();
|
|
45
|
-
return prepareSighashAllWitness(
|
|
44
|
+
return Transaction.from(txLike).prepareSighashAllWitness(script, 85, this.client);
|
|
46
45
|
}
|
|
47
46
|
/**
|
|
48
47
|
* Signs a transaction without modifying it.
|
|
@@ -53,7 +52,7 @@ export class SignerBtc extends Signer {
|
|
|
53
52
|
async signOnlyTransaction(txLike) {
|
|
54
53
|
const tx = Transaction.from(txLike);
|
|
55
54
|
const { script } = await this.getRecommendedAddressObj();
|
|
56
|
-
const info = await getSignHashInfo(
|
|
55
|
+
const info = await tx.getSignHashInfo(script, this.client);
|
|
57
56
|
if (!info) {
|
|
58
57
|
return tx;
|
|
59
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signerEvm.d.ts","sourceRoot":"","sources":["../../../src/signer/evm/signerEvm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAA0B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAe,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"signerEvm.d.ts","sourceRoot":"","sources":["../../../src/signer/evm/signerEvm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAA0B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAe,MAAM,WAAW,CAAC;AAI9E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;GAGG;AACH,8BAAsB,SAAU,SAAQ,MAAM;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAEzC;;;;OAIG;IACG,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAQpC,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ5D,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrE;;;;;OAKG;IACG,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IAYvE;;;;;OAKG;IACG,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IAsBlE,iCAAiC,CACrC,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,GAC9C,OAAO,CAAC,WAAW,CAAC;CA6BxB"}
|
|
@@ -4,7 +4,6 @@ import { Transaction, WitnessArgs } from "../../ckb";
|
|
|
4
4
|
import { KnownScript } from "../../client";
|
|
5
5
|
import { hexFrom } from "../../hex";
|
|
6
6
|
import { numToBytes } from "../../num";
|
|
7
|
-
import { getSignHashInfo, prepareSighashAllWitness } from "../helpers";
|
|
8
7
|
import { Signer } from "../signer";
|
|
9
8
|
/**
|
|
10
9
|
* An abstract class extending Signer for Ethereum Virtual Machine (EVM) based signing operations.
|
|
@@ -45,7 +44,7 @@ export class SignerEvm extends Signer {
|
|
|
45
44
|
*/
|
|
46
45
|
async prepareTransaction(txLike) {
|
|
47
46
|
const addresses = await this.getAddressObjs();
|
|
48
|
-
return addresses.reduce((txPromise, { script }) => txPromise.then((tx) => prepareSighashAllWitness(
|
|
47
|
+
return addresses.reduce((txPromise, { script }) => txPromise.then((tx) => tx.prepareSighashAllWitness(script, 85, this.client)), Promise.resolve(Transaction.from(txLike)));
|
|
49
48
|
}
|
|
50
49
|
/**
|
|
51
50
|
* Signs a transaction without modifying it.
|
|
@@ -63,7 +62,7 @@ export class SignerEvm extends Signer {
|
|
|
63
62
|
return tx;
|
|
64
63
|
}
|
|
65
64
|
async _signOmniLockScriptForTransaction(tx, script, messageTransformer) {
|
|
66
|
-
const info = await getSignHashInfo(
|
|
65
|
+
const info = await tx.getSignHashInfo(script, this.client);
|
|
67
66
|
if (!info) {
|
|
68
67
|
return tx;
|
|
69
68
|
}
|
package/dist/signer/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
|
package/dist/signer/index.js
CHANGED
package/dist/signer/signer.d.ts
CHANGED
|
@@ -23,6 +23,12 @@ export declare abstract class Signer {
|
|
|
23
23
|
* @returns A promise that resolves when the connection is complete.
|
|
24
24
|
*/
|
|
25
25
|
abstract connect(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Disconnects to the signer.
|
|
28
|
+
*
|
|
29
|
+
* @returns A promise that resolves when disconnected.
|
|
30
|
+
*/
|
|
31
|
+
disconnect(): Promise<void>;
|
|
26
32
|
/**
|
|
27
33
|
* Check if the signer is connected.
|
|
28
34
|
*
|
|
@@ -105,15 +111,17 @@ export declare abstract class Signer {
|
|
|
105
111
|
*/
|
|
106
112
|
export declare enum SignerType {
|
|
107
113
|
EVM = "EVM",
|
|
108
|
-
BTC = "BTC"
|
|
114
|
+
BTC = "BTC",
|
|
115
|
+
CKB = "CKB"
|
|
109
116
|
}
|
|
110
117
|
/**
|
|
111
118
|
* A class representing information about a signer, including its type and the signer instance.
|
|
112
119
|
*/
|
|
113
120
|
export declare class SignerInfo {
|
|
121
|
+
name: string;
|
|
114
122
|
type: SignerType;
|
|
115
123
|
signer: Signer;
|
|
116
|
-
constructor(type: SignerType, signer: Signer);
|
|
124
|
+
constructor(name: string, type: SignerType, signer: Signer);
|
|
117
125
|
}
|
|
118
126
|
/**
|
|
119
127
|
* Represents a wallet with a name, icon, and an array of signer information.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/signer/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B;;;GAGG;AACH,8BAAsB,MAAM;IACd,SAAS,CAAC,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;IAErC,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAEvD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAExC;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAE9C;;;;OAIG;IACH,QAAQ,CAAC,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAE7C;;;;;OAKG;IACG,wBAAwB,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvE;;;;;OAKG;IACG,qBAAqB,CAAC,UAAU,CAAC,E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AU;IAChB,MAAM,EAAE,MAAM;gBAFd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM;CAExB;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
package/dist/signer/signer.js
CHANGED
|
@@ -9,6 +9,12 @@ export class Signer {
|
|
|
9
9
|
get client() {
|
|
10
10
|
return this.client_;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Disconnects to the signer.
|
|
14
|
+
*
|
|
15
|
+
* @returns A promise that resolves when disconnected.
|
|
16
|
+
*/
|
|
17
|
+
async disconnect() { }
|
|
12
18
|
/**
|
|
13
19
|
* Gets the recommended Address object for the signer.
|
|
14
20
|
*
|
|
@@ -92,12 +98,14 @@ export var SignerType;
|
|
|
92
98
|
(function (SignerType) {
|
|
93
99
|
SignerType["EVM"] = "EVM";
|
|
94
100
|
SignerType["BTC"] = "BTC";
|
|
101
|
+
SignerType["CKB"] = "CKB";
|
|
95
102
|
})(SignerType || (SignerType = {}));
|
|
96
103
|
/**
|
|
97
104
|
* A class representing information about a signer, including its type and the signer instance.
|
|
98
105
|
*/
|
|
99
106
|
export class SignerInfo {
|
|
100
|
-
constructor(type, signer) {
|
|
107
|
+
constructor(name, type, signer) {
|
|
108
|
+
this.name = name;
|
|
101
109
|
this.type = type;
|
|
102
110
|
this.signer = signer;
|
|
103
111
|
}
|
|
@@ -184,19 +184,25 @@ export declare class CellOutput {
|
|
|
184
184
|
static fromBytes(bytes: BytesLike | mol.CellOutput): CellOutput;
|
|
185
185
|
}
|
|
186
186
|
export type CellLike = {
|
|
187
|
+
outPoint: OutPointLike;
|
|
187
188
|
cellOutput: CellOutputLike;
|
|
188
189
|
outputData: HexLike;
|
|
190
|
+
blockNumber: NumLike;
|
|
189
191
|
};
|
|
190
192
|
export declare class Cell {
|
|
193
|
+
outPoint: OutPoint;
|
|
191
194
|
cellOutput: CellOutput;
|
|
192
195
|
outputData: Hex;
|
|
196
|
+
blockNumber: Num;
|
|
193
197
|
/**
|
|
194
198
|
* Creates an instance of Cell.
|
|
195
199
|
*
|
|
200
|
+
* @param outPoint - The output point of the cell.
|
|
196
201
|
* @param cellOutput - The cell output of the cell.
|
|
197
202
|
* @param outputData - The output data of the cell.
|
|
203
|
+
* @param blockNumber - The block number of the cell.
|
|
198
204
|
*/
|
|
199
|
-
constructor(cellOutput: CellOutput, outputData: Hex);
|
|
205
|
+
constructor(outPoint: OutPoint, cellOutput: CellOutput, outputData: Hex, blockNumber: Num);
|
|
200
206
|
/**
|
|
201
207
|
* Creates a Cell instance from a CellLike object.
|
|
202
208
|
*
|
|
@@ -210,12 +216,14 @@ export type CellInputLike = {
|
|
|
210
216
|
since: NumLike;
|
|
211
217
|
cellOutput?: CellOutputLike;
|
|
212
218
|
outputData?: HexLike;
|
|
219
|
+
blockNumber?: NumLike;
|
|
213
220
|
};
|
|
214
221
|
export declare class CellInput {
|
|
215
222
|
previousOutput: OutPoint;
|
|
216
223
|
since: Num;
|
|
217
224
|
cellOutput?: CellOutput | undefined;
|
|
218
225
|
outputData?: `0x${string}` | undefined;
|
|
226
|
+
blockNumber?: bigint | undefined;
|
|
219
227
|
/**
|
|
220
228
|
* Creates an instance of CellInput.
|
|
221
229
|
*
|
|
@@ -223,8 +231,9 @@ export declare class CellInput {
|
|
|
223
231
|
* @param since - The since value of the cell input.
|
|
224
232
|
* @param cellOutput - The optional cell output associated with the cell input.
|
|
225
233
|
* @param outputData - The optional output data associated with the cell input.
|
|
234
|
+
* @param blockNumber - The optional block number associated with the cell input.
|
|
226
235
|
*/
|
|
227
|
-
constructor(previousOutput: OutPoint, since: Num, cellOutput?: CellOutput | undefined, outputData?: `0x${string}` | undefined);
|
|
236
|
+
constructor(previousOutput: OutPoint, since: Num, cellOutput?: CellOutput | undefined, outputData?: `0x${string}` | undefined, blockNumber?: bigint | undefined);
|
|
228
237
|
/**
|
|
229
238
|
* Creates a CellInput instance from a CellInputLike object.
|
|
230
239
|
*
|
|
@@ -495,6 +504,7 @@ export declare class Transaction {
|
|
|
495
504
|
* ```
|
|
496
505
|
*/
|
|
497
506
|
static fromLumosSkeleton(skeleton: TransactionSkeletonType): Transaction;
|
|
507
|
+
stringify(): string;
|
|
498
508
|
/**
|
|
499
509
|
* Converts the raw transaction data to bytes.
|
|
500
510
|
*
|
|
@@ -529,5 +539,78 @@ export declare class Transaction {
|
|
|
529
539
|
* ```
|
|
530
540
|
*/
|
|
531
541
|
static hashWitnessToHasher(witness: HexLike, hasher: Hasher): void;
|
|
542
|
+
/**
|
|
543
|
+
* Computes the signing hash information for a given script.
|
|
544
|
+
*
|
|
545
|
+
* @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
|
|
546
|
+
* @param client - The client for complete extra infos in the transaction.
|
|
547
|
+
* @returns A promise that resolves to an object containing the signing message and the witness position,
|
|
548
|
+
* or undefined if no matching input is found.
|
|
549
|
+
*
|
|
550
|
+
* @example
|
|
551
|
+
* ```typescript
|
|
552
|
+
* const signHashInfo = await tx.getSignHashInfo(scriptLike, client);
|
|
553
|
+
* if (signHashInfo) {
|
|
554
|
+
* console.log(signHashInfo.message); // Outputs the signing message
|
|
555
|
+
* console.log(signHashInfo.position); // Outputs the witness position
|
|
556
|
+
* }
|
|
557
|
+
* ```
|
|
558
|
+
*/
|
|
559
|
+
getSignHashInfo(scriptLike: ScriptLike, client: Client): Promise<{
|
|
560
|
+
message: Hex;
|
|
561
|
+
position: number;
|
|
562
|
+
} | undefined>;
|
|
563
|
+
/**
|
|
564
|
+
* Find the first occurrence of a input with the specified lock
|
|
565
|
+
*
|
|
566
|
+
* @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
|
|
567
|
+
* @param client - The client for complete extra infos in the transaction.
|
|
568
|
+
* @returns A promise that resolves to the prepared transaction
|
|
569
|
+
*
|
|
570
|
+
* @example
|
|
571
|
+
* ```typescript
|
|
572
|
+
* const index = await tx.findInputIndexByLock(scriptLike, client);
|
|
573
|
+
* ```
|
|
574
|
+
*/
|
|
575
|
+
findInputIndexByLock(scriptLike: ScriptLike, client: Client): Promise<number | undefined>;
|
|
576
|
+
/**
|
|
577
|
+
* Get witness at index as WitnessArgs
|
|
578
|
+
*
|
|
579
|
+
* @param index - The index of the witness.
|
|
580
|
+
* @returns The witness parsed as WitnessArgs.
|
|
581
|
+
*
|
|
582
|
+
* @example
|
|
583
|
+
* ```typescript
|
|
584
|
+
* const witnessArgs = await tx.getWitnessArgsAt(0);
|
|
585
|
+
* ```
|
|
586
|
+
*/
|
|
587
|
+
getWitnessArgsAt(index: number): WitnessArgs | undefined;
|
|
588
|
+
/**
|
|
589
|
+
* Set witness at index by WitnessArgs
|
|
590
|
+
*
|
|
591
|
+
* @param index - The index of the witness.
|
|
592
|
+
* @param witness - The WitnessArgs to set.
|
|
593
|
+
* @returns The transaction itself.
|
|
594
|
+
*
|
|
595
|
+
* @example
|
|
596
|
+
* ```typescript
|
|
597
|
+
* await tx.setWitnessArgsAt(0, witnessArgs);
|
|
598
|
+
* ```
|
|
599
|
+
*/
|
|
600
|
+
setWitnessArgsAt(index: number, witness: WitnessArgs): Transaction;
|
|
601
|
+
/**
|
|
602
|
+
* Prepare dummy witness for sighash all method
|
|
603
|
+
*
|
|
604
|
+
* @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
|
|
605
|
+
* @param lockLen - The length of dummy lock bytes.
|
|
606
|
+
* @param client - The client for complete extra infos in the transaction.
|
|
607
|
+
* @returns A promise that resolves to the prepared transaction
|
|
608
|
+
*
|
|
609
|
+
* @example
|
|
610
|
+
* ```typescript
|
|
611
|
+
* await tx.prepareSighashAllWitness(scriptLike, 85, client);
|
|
612
|
+
* ```
|
|
613
|
+
*/
|
|
614
|
+
prepareSighashAllWitness(scriptLike: ScriptLike, lockLen: number, client: Client): Promise<Transaction>;
|
|
532
615
|
}
|
|
533
616
|
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/ckb/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAa,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,MAAM,EAAW,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,QAAQ,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/ckb/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAa,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,MAAM,EAAW,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,QAAQ,CAAC;AAC/C,OAAO,EACL,GAAG,EACH,OAAO,EAKR,MAAM,QAAQ,CAAC;AAEhB,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AACnD,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAE1C;;;;;;;;;;;;;GAaG;AAEH,wBAAgB,WAAW,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAgBrD;AAED;;;;;;;;;;GAUG;AAEH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,KAAK,CAE1D;AAED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