@ckb-ccc/core 0.0.4 → 0.0.5-alpha.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/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 +11 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +44 -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 +19 -1
- package/dist/client/jsonRpc/index.d.ts.map +1 -1
- package/dist/client/jsonRpc/index.js +25 -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 +17 -2
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/signer/signer.js +17 -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 +11 -3
- package/dist.commonjs/client/client.d.ts.map +1 -1
- package/dist.commonjs/client/client.js +43 -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 +19 -1
- package/dist.commonjs/client/jsonRpc/index.d.ts.map +1 -1
- package/dist.commonjs/client/jsonRpc/index.js +25 -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 +17 -2
- package/dist.commonjs/signer/signer.d.ts.map +1 -1
- package/dist.commonjs/signer/signer.js +17 -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 +87 -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 +54 -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 +21 -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 +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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clE;;;;;;;;;;;;OAYG;IACG,wBAAwB,CAC5B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC;CAUxB"}
|
|
@@ -247,12 +247,16 @@ class Cell {
|
|
|
247
247
|
/**
|
|
248
248
|
* Creates an instance of Cell.
|
|
249
249
|
*
|
|
250
|
+
* @param outPoint - The output point of the cell.
|
|
250
251
|
* @param cellOutput - The cell output of the cell.
|
|
251
252
|
* @param outputData - The output data of the cell.
|
|
253
|
+
* @param blockNumber - The block number of the cell.
|
|
252
254
|
*/
|
|
253
|
-
constructor(cellOutput, outputData) {
|
|
255
|
+
constructor(outPoint, cellOutput, outputData, blockNumber) {
|
|
256
|
+
this.outPoint = outPoint;
|
|
254
257
|
this.cellOutput = cellOutput;
|
|
255
258
|
this.outputData = outputData;
|
|
259
|
+
this.blockNumber = blockNumber;
|
|
256
260
|
}
|
|
257
261
|
/**
|
|
258
262
|
* Creates a Cell instance from a CellLike object.
|
|
@@ -264,7 +268,7 @@ class Cell {
|
|
|
264
268
|
if (cell instanceof Cell) {
|
|
265
269
|
return cell;
|
|
266
270
|
}
|
|
267
|
-
return new Cell(CellOutput.from(cell.cellOutput), (0, hex_1.hexFrom)(cell.outputData));
|
|
271
|
+
return new Cell(OutPoint.from(cell.outPoint), CellOutput.from(cell.cellOutput), (0, hex_1.hexFrom)(cell.outputData), (0, num_1.numFrom)(cell.blockNumber));
|
|
268
272
|
}
|
|
269
273
|
}
|
|
270
274
|
exports.Cell = Cell;
|
|
@@ -276,12 +280,14 @@ class CellInput {
|
|
|
276
280
|
* @param since - The since value of the cell input.
|
|
277
281
|
* @param cellOutput - The optional cell output associated with the cell input.
|
|
278
282
|
* @param outputData - The optional output data associated with the cell input.
|
|
283
|
+
* @param blockNumber - The optional block number associated with the cell input.
|
|
279
284
|
*/
|
|
280
|
-
constructor(previousOutput, since, cellOutput, outputData) {
|
|
285
|
+
constructor(previousOutput, since, cellOutput, outputData, blockNumber) {
|
|
281
286
|
this.previousOutput = previousOutput;
|
|
282
287
|
this.since = since;
|
|
283
288
|
this.cellOutput = cellOutput;
|
|
284
289
|
this.outputData = outputData;
|
|
290
|
+
this.blockNumber = blockNumber;
|
|
285
291
|
}
|
|
286
292
|
/**
|
|
287
293
|
* Creates a CellInput instance from a CellInputLike object.
|
|
@@ -301,7 +307,7 @@ class CellInput {
|
|
|
301
307
|
if (cellInput instanceof CellInput) {
|
|
302
308
|
return cellInput;
|
|
303
309
|
}
|
|
304
|
-
return new CellInput(OutPoint.from(cellInput.previousOutput), (0, num_1.numFrom)(cellInput.since), (0, utils_1.apply)(CellOutput.from, cellInput.cellOutput), (0, utils_1.apply)(hex_1.hexFrom, cellInput.outputData));
|
|
310
|
+
return new CellInput(OutPoint.from(cellInput.previousOutput), (0, num_1.numFrom)(cellInput.since), (0, utils_1.apply)(CellOutput.from, cellInput.cellOutput), (0, utils_1.apply)(hex_1.hexFrom, cellInput.outputData), (0, utils_1.apply)(num_1.numFrom, cellInput.blockNumber));
|
|
305
311
|
}
|
|
306
312
|
/**
|
|
307
313
|
* Complete extra infos in the input. Like the output of the out point.
|
|
@@ -316,13 +322,14 @@ class CellInput {
|
|
|
316
322
|
* ```
|
|
317
323
|
*/
|
|
318
324
|
async completeExtraInfos(client) {
|
|
319
|
-
if (this.cellOutput && this.outputData) {
|
|
325
|
+
if (this.cellOutput && this.outputData && this.blockNumber) {
|
|
320
326
|
return this;
|
|
321
327
|
}
|
|
322
328
|
const cell = await client.getCell(this.previousOutput);
|
|
323
329
|
if (cell) {
|
|
324
330
|
this.cellOutput = cell.cellOutput;
|
|
325
331
|
this.outputData = cell.outputData;
|
|
332
|
+
this.blockNumber = cell.blockNumber;
|
|
326
333
|
}
|
|
327
334
|
return this;
|
|
328
335
|
}
|
|
@@ -612,6 +619,14 @@ class Transaction {
|
|
|
612
619
|
witnesses: skeleton.witnesses.toArray(),
|
|
613
620
|
});
|
|
614
621
|
}
|
|
622
|
+
stringify() {
|
|
623
|
+
return JSON.stringify(this, (_, value) => {
|
|
624
|
+
if (typeof value === "bigint") {
|
|
625
|
+
return (0, num_1.numToHex)(value);
|
|
626
|
+
}
|
|
627
|
+
return value;
|
|
628
|
+
});
|
|
629
|
+
}
|
|
615
630
|
/**
|
|
616
631
|
* Converts the raw transaction data to bytes.
|
|
617
632
|
*
|
|
@@ -661,5 +676,135 @@ class Transaction {
|
|
|
661
676
|
hasher.update((0, num_1.numToBytes)(raw.length, 8));
|
|
662
677
|
hasher.update(raw);
|
|
663
678
|
}
|
|
679
|
+
/**
|
|
680
|
+
* Computes the signing hash information for a given script.
|
|
681
|
+
*
|
|
682
|
+
* @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
|
|
683
|
+
* @param client - The client for complete extra infos in the transaction.
|
|
684
|
+
* @returns A promise that resolves to an object containing the signing message and the witness position,
|
|
685
|
+
* or undefined if no matching input is found.
|
|
686
|
+
*
|
|
687
|
+
* @example
|
|
688
|
+
* ```typescript
|
|
689
|
+
* const signHashInfo = await tx.getSignHashInfo(scriptLike, client);
|
|
690
|
+
* if (signHashInfo) {
|
|
691
|
+
* console.log(signHashInfo.message); // Outputs the signing message
|
|
692
|
+
* console.log(signHashInfo.position); // Outputs the witness position
|
|
693
|
+
* }
|
|
694
|
+
* ```
|
|
695
|
+
*/
|
|
696
|
+
async getSignHashInfo(scriptLike, client) {
|
|
697
|
+
const script = script_1.Script.from(scriptLike);
|
|
698
|
+
let position = -1;
|
|
699
|
+
const hasher = new hasher_1.Hasher();
|
|
700
|
+
hasher.update(this.hash());
|
|
701
|
+
for (let i = 0; i < this.witnesses.length; i += 1) {
|
|
702
|
+
if (this.inputs[i]) {
|
|
703
|
+
const input = await this.inputs[i].completeExtraInfos(client);
|
|
704
|
+
if (!input.cellOutput) {
|
|
705
|
+
throw Error("Unable to resolve inputs info");
|
|
706
|
+
}
|
|
707
|
+
if (!script.eq(input.cellOutput.lock)) {
|
|
708
|
+
continue;
|
|
709
|
+
}
|
|
710
|
+
if (position === -1) {
|
|
711
|
+
position = i;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
if (position === -1) {
|
|
715
|
+
return undefined;
|
|
716
|
+
}
|
|
717
|
+
Transaction.hashWitnessToHasher(this.witnesses[i], hasher);
|
|
718
|
+
}
|
|
719
|
+
if (position === -1) {
|
|
720
|
+
return undefined;
|
|
721
|
+
}
|
|
722
|
+
return {
|
|
723
|
+
message: hasher.digest(),
|
|
724
|
+
position,
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Find the first occurrence of a input with the specified lock
|
|
729
|
+
*
|
|
730
|
+
* @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
|
|
731
|
+
* @param client - The client for complete extra infos in the transaction.
|
|
732
|
+
* @returns A promise that resolves to the prepared transaction
|
|
733
|
+
*
|
|
734
|
+
* @example
|
|
735
|
+
* ```typescript
|
|
736
|
+
* const index = await tx.findInputIndexByLock(scriptLike, client);
|
|
737
|
+
* ```
|
|
738
|
+
*/
|
|
739
|
+
async findInputIndexByLock(scriptLike, client) {
|
|
740
|
+
const script = script_1.Script.from(scriptLike);
|
|
741
|
+
for (let i = 0; i < this.inputs.length; i += 1) {
|
|
742
|
+
const input = await this.inputs[i].completeExtraInfos(client);
|
|
743
|
+
if (!input.cellOutput) {
|
|
744
|
+
throw Error("Unable to resolve inputs info");
|
|
745
|
+
}
|
|
746
|
+
if (script.eq(input.cellOutput.lock)) {
|
|
747
|
+
return i;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Get witness at index as WitnessArgs
|
|
753
|
+
*
|
|
754
|
+
* @param index - The index of the witness.
|
|
755
|
+
* @returns The witness parsed as WitnessArgs.
|
|
756
|
+
*
|
|
757
|
+
* @example
|
|
758
|
+
* ```typescript
|
|
759
|
+
* const witnessArgs = await tx.getWitnessArgsAt(0);
|
|
760
|
+
* ```
|
|
761
|
+
*/
|
|
762
|
+
getWitnessArgsAt(index) {
|
|
763
|
+
const rawWitness = this.witnesses[index];
|
|
764
|
+
return (rawWitness ?? "0x") !== "0x"
|
|
765
|
+
? WitnessArgs.fromBytes(rawWitness)
|
|
766
|
+
: undefined;
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Set witness at index by WitnessArgs
|
|
770
|
+
*
|
|
771
|
+
* @param index - The index of the witness.
|
|
772
|
+
* @param witness - The WitnessArgs to set.
|
|
773
|
+
* @returns The transaction itself.
|
|
774
|
+
*
|
|
775
|
+
* @example
|
|
776
|
+
* ```typescript
|
|
777
|
+
* await tx.setWitnessArgsAt(0, witnessArgs);
|
|
778
|
+
* ```
|
|
779
|
+
*/
|
|
780
|
+
setWitnessArgsAt(index, witness) {
|
|
781
|
+
if (this.witnesses.length < index) {
|
|
782
|
+
this.witnesses.push(...Array.from(new Array(index - this.witnesses.length), () => "0x"));
|
|
783
|
+
}
|
|
784
|
+
this.witnesses[index] = (0, hex_1.hexFrom)(witness.toBytes());
|
|
785
|
+
return this;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Prepare dummy witness for sighash all method
|
|
789
|
+
*
|
|
790
|
+
* @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
|
|
791
|
+
* @param lockLen - The length of dummy lock bytes.
|
|
792
|
+
* @param client - The client for complete extra infos in the transaction.
|
|
793
|
+
* @returns A promise that resolves to the prepared transaction
|
|
794
|
+
*
|
|
795
|
+
* @example
|
|
796
|
+
* ```typescript
|
|
797
|
+
* await tx.prepareSighashAllWitness(scriptLike, 85, client);
|
|
798
|
+
* ```
|
|
799
|
+
*/
|
|
800
|
+
async prepareSighashAllWitness(scriptLike, lockLen, client) {
|
|
801
|
+
const position = await this.findInputIndexByLock(scriptLike, client);
|
|
802
|
+
if (position === undefined) {
|
|
803
|
+
return this;
|
|
804
|
+
}
|
|
805
|
+
const witness = this.getWitnessArgsAt(position) ?? WitnessArgs.from({});
|
|
806
|
+
witness.lock = (0, hex_1.hexFrom)(Array.from(new Array(lockLen), () => 0));
|
|
807
|
+
return this.setWitnessArgsAt(position, witness);
|
|
808
|
+
}
|
|
664
809
|
}
|
|
665
810
|
exports.Transaction = Transaction;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Cell, OutPointLike, Script, TransactionLike } from "../ckb";
|
|
1
|
+
import { Cell, OutPointLike, Script, ScriptLike, TransactionLike } from "../ckb";
|
|
2
2
|
import { Hex, HexLike } from "../hex";
|
|
3
|
-
import {
|
|
3
|
+
import { Num, NumLike } from "../num";
|
|
4
|
+
import { ClientFindCellsResponse, ClientIndexerSearchKeyLike, ClientTransactionResponse, OutputsValidator } from "./clientTypes";
|
|
4
5
|
export declare enum KnownScript {
|
|
5
6
|
Secp256k1Blake160 = 0,
|
|
6
7
|
Secp256k1Multisig = 1,
|
|
7
8
|
AnyoneCanPay = 2,
|
|
8
9
|
JoyId = 3,
|
|
9
|
-
|
|
10
|
+
COTA = 4,
|
|
11
|
+
OmniLock = 5
|
|
10
12
|
}
|
|
11
13
|
export declare abstract class Client {
|
|
12
14
|
abstract getUrl(): string;
|
|
@@ -15,5 +17,11 @@ export declare abstract class Client {
|
|
|
15
17
|
abstract sendTransaction(transaction: TransactionLike, validator?: OutputsValidator): Promise<Hex>;
|
|
16
18
|
abstract getTransaction(txHash: HexLike): Promise<ClientTransactionResponse | null>;
|
|
17
19
|
getCell(outPoint: OutPointLike): Promise<Cell | null>;
|
|
20
|
+
abstract findCellsPaged(key: ClientIndexerSearchKeyLike, order?: "asc" | "desc", limit?: NumLike, after?: string): Promise<ClientFindCellsResponse>;
|
|
21
|
+
findCells(key: ClientIndexerSearchKeyLike, order?: "asc" | "desc", limit?: number): AsyncGenerator<Cell>;
|
|
22
|
+
findCellsByLockAndType(lock: ScriptLike, type: ScriptLike, withData?: boolean): AsyncGenerator<Cell>;
|
|
23
|
+
abstract getCellsCapacity(key: ClientIndexerSearchKeyLike): Promise<Num>;
|
|
24
|
+
getBalanceSingle(lock: ScriptLike): Promise<Num>;
|
|
25
|
+
getBalance(locks: ScriptLike[]): Promise<Num>;
|
|
18
26
|
}
|
|
19
27
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,UAAU,EACV,eAAe,EAChB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,QAAQ,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,oBAAY,WAAW;IACrB,iBAAiB,IAAA;IACjB,iBAAiB,IAAA;IACjB,YAAY,IAAA;IACZ,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,QAAQ,IAAA;CACT;AAED,8BAAsB,MAAM;IAC1B,QAAQ,CAAC,MAAM,IAAI,MAAM;IAEzB,QAAQ,CAAC,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAC5C,QAAQ,CAAC,cAAc,CACrB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;IAEjD,QAAQ,CAAC,eAAe,CACtB,WAAW,EAAE,eAAe,EAC5B,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,GAAG,CAAC;IACf,QAAQ,CAAC,cAAc,CACrB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAEtC,OAAO,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAmB3D,QAAQ,CAAC,cAAc,CACrB,GAAG,EAAE,0BAA0B,EAC/B,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,EACtB,KAAK,CAAC,EAAE,OAAO,EACf,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,uBAAuB,CAAC;IAE5B,SAAS,CACd,GAAG,EAAE,0BAA0B,EAC/B,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,EACtB,KAAK,SAAK,GACT,cAAc,CAAC,IAAI,CAAC;IAoBvB,sBAAsB,CACpB,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,UAAU,EAChB,QAAQ,UAAO,GACd,cAAc,CAAC,IAAI,CAAC;IAYvB,QAAQ,CAAC,gBAAgB,CAAC,GAAG,EAAE,0BAA0B,GAAG,OAAO,CAAC,GAAG,CAAC;IAElE,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAYhD,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAOpD"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = exports.KnownScript = void 0;
|
|
4
4
|
const ckb_1 = require("../ckb");
|
|
5
|
+
const fixedPoint_1 = require("../fixedPoint");
|
|
5
6
|
const num_1 = require("../num");
|
|
6
7
|
var KnownScript;
|
|
7
8
|
(function (KnownScript) {
|
|
@@ -9,7 +10,8 @@ var KnownScript;
|
|
|
9
10
|
KnownScript[KnownScript["Secp256k1Multisig"] = 1] = "Secp256k1Multisig";
|
|
10
11
|
KnownScript[KnownScript["AnyoneCanPay"] = 2] = "AnyoneCanPay";
|
|
11
12
|
KnownScript[KnownScript["JoyId"] = 3] = "JoyId";
|
|
12
|
-
KnownScript[KnownScript["
|
|
13
|
+
KnownScript[KnownScript["COTA"] = 4] = "COTA";
|
|
14
|
+
KnownScript[KnownScript["OmniLock"] = 5] = "OmniLock";
|
|
13
15
|
})(KnownScript || (exports.KnownScript = KnownScript = {}));
|
|
14
16
|
class Client {
|
|
15
17
|
async getCell(outPoint) {
|
|
@@ -22,9 +24,49 @@ class Client {
|
|
|
22
24
|
return null;
|
|
23
25
|
}
|
|
24
26
|
return ckb_1.Cell.from({
|
|
27
|
+
outPoint,
|
|
25
28
|
cellOutput: transaction.transaction.outputs[index],
|
|
26
29
|
outputData: transaction.transaction.outputsData[index] ?? "0x",
|
|
30
|
+
blockNumber: transaction.blockNumber,
|
|
27
31
|
});
|
|
28
32
|
}
|
|
33
|
+
async *findCells(key, order, limit = 10) {
|
|
34
|
+
let last = undefined;
|
|
35
|
+
while (true) {
|
|
36
|
+
const { cells, lastCursor } = await this.findCellsPaged(key, order, limit, last);
|
|
37
|
+
for (const cell of cells) {
|
|
38
|
+
yield cell;
|
|
39
|
+
}
|
|
40
|
+
if (cells.length === 0 || cells.length < limit) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
last = lastCursor;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
findCellsByLockAndType(lock, type, withData = true) {
|
|
47
|
+
return this.findCells({
|
|
48
|
+
script: lock,
|
|
49
|
+
scriptType: "lock",
|
|
50
|
+
scriptSearchMode: "exact",
|
|
51
|
+
filter: {
|
|
52
|
+
script: type,
|
|
53
|
+
},
|
|
54
|
+
withData,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async getBalanceSingle(lock) {
|
|
58
|
+
return this.getCellsCapacity({
|
|
59
|
+
script: lock,
|
|
60
|
+
scriptType: "lock",
|
|
61
|
+
scriptSearchMode: "exact",
|
|
62
|
+
filter: {
|
|
63
|
+
scriptLenRange: [0, 1],
|
|
64
|
+
outputDataLenRange: [0, 1],
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async getBalance(locks) {
|
|
69
|
+
return locks.reduce((res, lock) => this.getBalanceSingle(lock).then((a) => res.then((b) => a + b)), Promise.resolve(fixedPoint_1.Zero));
|
|
70
|
+
}
|
|
29
71
|
}
|
|
30
72
|
exports.Client = Client;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientPublicMainnet.advanced.d.ts","sourceRoot":"","sources":["../../src/client/clientPublicMainnet.advanced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,WAAW,EACX,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"clientPublicMainnet.advanced.d.ts","sourceRoot":"","sources":["../../src/client/clientPublicMainnet.advanced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,WAAW,EACX,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAgCtC,CAAC"}
|
|
@@ -19,6 +19,10 @@ exports.MAINNET_SCRIPTS = {
|
|
|
19
19
|
codeHash: "0xd00c84f0ec8fd441c38bc3f87a371f547190f2fcff88e642bc5bf54b9e318323",
|
|
20
20
|
hashType: "type",
|
|
21
21
|
},
|
|
22
|
+
[client_1.KnownScript.COTA]: {
|
|
23
|
+
codeHash: "0x1122a4fb54697cf2e6e3a96c9d80fd398a936559b90954c6e88eb7ba0cf652df",
|
|
24
|
+
hashType: "type",
|
|
25
|
+
},
|
|
22
26
|
[client_1.KnownScript.OmniLock]: {
|
|
23
27
|
codeHash: "0x9b819793a64463aed77c615d6cb226eea5487ccfc0783043a587254cda2b6f26",
|
|
24
28
|
hashType: "type",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientPublicTestnet.advanced.d.ts","sourceRoot":"","sources":["../../src/client/clientPublicTestnet.advanced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,WAAW,EACX,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"clientPublicTestnet.advanced.d.ts","sourceRoot":"","sources":["../../src/client/clientPublicTestnet.advanced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,WAAW,EACX,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAgCtC,CAAC"}
|
|
@@ -19,6 +19,10 @@ exports.TESTNET_SCRIPTS = {
|
|
|
19
19
|
codeHash: "0xd23761b364210735c19c60561d213fb3beae2fd6172743719eff6920e020baac",
|
|
20
20
|
hashType: "type",
|
|
21
21
|
},
|
|
22
|
+
[client_1.KnownScript.COTA]: {
|
|
23
|
+
codeHash: "0x89cd8003a0eaf8e65e0c31525b7d1d5c1becefd2ea75bb4cff87810ae37764d8",
|
|
24
|
+
hashType: "type",
|
|
25
|
+
},
|
|
22
26
|
[client_1.KnownScript.OmniLock]: {
|
|
23
27
|
codeHash: "0xf329effd1c475a2978453c8600e1eaf0bc2087ee093c3ee64cc96ec6847752cb",
|
|
24
28
|
hashType: "type",
|
|
@@ -1,8 +1,55 @@
|
|
|
1
|
-
import { Transaction } from "../ckb";
|
|
1
|
+
import { Cell, Script, ScriptLike, Transaction } from "../ckb";
|
|
2
|
+
import { Hex, HexLike } from "../hex";
|
|
3
|
+
import { Num, NumLike } from "../num";
|
|
2
4
|
export type OutputsValidator = "passthrough" | "well_known_scripts_only";
|
|
3
5
|
export type TransactionStatus = "pending" | "proposed" | "committed" | "unknown" | "rejected";
|
|
4
6
|
export type ClientTransactionResponse = {
|
|
5
7
|
transaction: Transaction;
|
|
6
8
|
status: TransactionStatus;
|
|
9
|
+
blockNumber: Num;
|
|
10
|
+
};
|
|
11
|
+
export type ClientIndexerSearchKeyLike = {
|
|
12
|
+
script: ScriptLike;
|
|
13
|
+
scriptType: "lock" | "type";
|
|
14
|
+
scriptSearchMode?: "prefix" | "exact" | "partial";
|
|
15
|
+
filter?: {
|
|
16
|
+
script?: ScriptLike;
|
|
17
|
+
scriptLenRange?: [NumLike, NumLike];
|
|
18
|
+
outputData?: HexLike;
|
|
19
|
+
outputDataSearchMode?: "prefix" | "exact" | "partial";
|
|
20
|
+
outputDataLenRange?: [NumLike, NumLike];
|
|
21
|
+
outputCapacityRange?: [NumLike, NumLike];
|
|
22
|
+
blockRange?: [NumLike, NumLike];
|
|
23
|
+
};
|
|
24
|
+
withData?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare class ClientIndexerSearchKey {
|
|
27
|
+
script: Script;
|
|
28
|
+
scriptType: "lock" | "type";
|
|
29
|
+
scriptSearchMode: "prefix" | "exact" | "partial" | undefined;
|
|
30
|
+
filter: {
|
|
31
|
+
script?: Script;
|
|
32
|
+
scriptLenRange?: [Num, Num];
|
|
33
|
+
outputData?: Hex;
|
|
34
|
+
outputDataSearchMode?: "prefix" | "exact" | "partial";
|
|
35
|
+
outputDataLenRange?: [Num, Num];
|
|
36
|
+
outputCapacityRange?: [Num, Num];
|
|
37
|
+
blockRange?: [Num, Num];
|
|
38
|
+
} | undefined;
|
|
39
|
+
withData: boolean | undefined;
|
|
40
|
+
constructor(script: Script, scriptType: "lock" | "type", scriptSearchMode: "prefix" | "exact" | "partial" | undefined, filter: {
|
|
41
|
+
script?: Script;
|
|
42
|
+
scriptLenRange?: [Num, Num];
|
|
43
|
+
outputData?: Hex;
|
|
44
|
+
outputDataSearchMode?: "prefix" | "exact" | "partial";
|
|
45
|
+
outputDataLenRange?: [Num, Num];
|
|
46
|
+
outputCapacityRange?: [Num, Num];
|
|
47
|
+
blockRange?: [Num, Num];
|
|
48
|
+
} | undefined, withData: boolean | undefined);
|
|
49
|
+
static from(keyLike: ClientIndexerSearchKeyLike): ClientIndexerSearchKey;
|
|
50
|
+
}
|
|
51
|
+
export type ClientFindCellsResponse = {
|
|
52
|
+
lastCursor: string;
|
|
53
|
+
cells: Cell[];
|
|
7
54
|
};
|
|
8
55
|
//# sourceMappingURL=clientTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientTypes.d.ts","sourceRoot":"","sources":["../../src/client/clientTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"clientTypes.d.ts","sourceRoot":"","sources":["../../src/client/clientTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,QAAQ,CAAC;AAG/C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,yBAAyB,CAAC;AAEzE,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,CAAC;AACf,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE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AE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,EAC5D,MAAM,EACT;QACE,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC5B,UAAU,CAAC,EAAE,GAAG,CAAC;QACjB,oBAAoB,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;QACtD,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAChC,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACjC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;KACzB,GACD,SAAS,EACN,QAAQ,EAAE,OAAO,GAAG,SAAS;IAGtC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,0BAA0B,GAAG,sBAAsB;CAoBzE;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC"}
|
|
@@ -1,2 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientIndexerSearchKey = void 0;
|
|
4
|
+
const ckb_1 = require("../ckb");
|
|
5
|
+
const hex_1 = require("../hex");
|
|
6
|
+
const num_1 = require("../num");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
function rangeFrom([a, b]) {
|
|
9
|
+
return [(0, num_1.numFrom)(a), (0, num_1.numFrom)(b)];
|
|
10
|
+
}
|
|
11
|
+
class ClientIndexerSearchKey {
|
|
12
|
+
constructor(script, scriptType, scriptSearchMode, filter, withData) {
|
|
13
|
+
this.script = script;
|
|
14
|
+
this.scriptType = scriptType;
|
|
15
|
+
this.scriptSearchMode = scriptSearchMode;
|
|
16
|
+
this.filter = filter;
|
|
17
|
+
this.withData = withData;
|
|
18
|
+
}
|
|
19
|
+
static from(keyLike) {
|
|
20
|
+
return new ClientIndexerSearchKey(ckb_1.Script.from(keyLike.script), keyLike.scriptType, keyLike.scriptSearchMode, (0, utils_1.apply)((filter) => ({
|
|
21
|
+
script: (0, utils_1.apply)(ckb_1.Script.from, filter.script),
|
|
22
|
+
scriptLenRange: (0, utils_1.apply)(rangeFrom, filter.scriptLenRange),
|
|
23
|
+
outputData: (0, utils_1.apply)(hex_1.hexFrom, filter.outputData),
|
|
24
|
+
outputDataSearchMode: filter.outputDataSearchMode,
|
|
25
|
+
outputDataLenRange: (0, utils_1.apply)(rangeFrom, filter.outputDataLenRange),
|
|
26
|
+
outputCapacityRange: (0, utils_1.apply)(rangeFrom, filter.outputCapacityRange),
|
|
27
|
+
blockRange: (0, utils_1.apply)(rangeFrom, filter.blockRange),
|
|
28
|
+
}), keyLike.filter), keyLike.withData);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.ClientIndexerSearchKey = ClientIndexerSearchKey;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TransactionLike } from "../../ckb";
|
|
2
2
|
import { Hex, HexLike } from "../../hex";
|
|
3
|
+
import { Num, NumLike } from "../../num";
|
|
3
4
|
import { Client } from "../client";
|
|
4
|
-
import { ClientTransactionResponse, OutputsValidator } from "../clientTypes";
|
|
5
|
+
import { ClientFindCellsResponse, ClientIndexerSearchKeyLike, ClientTransactionResponse, OutputsValidator } from "../clientTypes";
|
|
5
6
|
import { JsonRpcPayload } from "./advanced";
|
|
6
7
|
/**
|
|
7
8
|
* An abstract class implementing JSON-RPC client functionality for a specific URL and timeout.
|
|
@@ -38,6 +39,23 @@ export declare abstract class ClientJsonRpc extends Client {
|
|
|
38
39
|
* @returns The transaction with status.
|
|
39
40
|
*/
|
|
40
41
|
getTransaction: (txHash: HexLike) => Promise<ClientTransactionResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* find cells from node.
|
|
44
|
+
*
|
|
45
|
+
* @param key - The search key of cells.
|
|
46
|
+
* @param order - The order of cells.
|
|
47
|
+
* @param limit - The max return size of cells.
|
|
48
|
+
* @param after - Pagination parameter.
|
|
49
|
+
* @returns The found cells.
|
|
50
|
+
*/
|
|
51
|
+
findCellsPaged: (key: ClientIndexerSearchKeyLike, order?: "asc" | "desc", limit?: NumLike, after?: string) => Promise<ClientFindCellsResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* get cells capacity from node.
|
|
54
|
+
*
|
|
55
|
+
* @param key - The search key of cells.
|
|
56
|
+
* @returns The sum of cells capacity.
|
|
57
|
+
*/
|
|
58
|
+
getCellsCapacity: (key: ClientIndexerSearchKeyLike) => Promise<Num>;
|
|
41
59
|
/**
|
|
42
60
|
* Builds a sender function for a JSON-RPC method.
|
|
43
61
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/jsonRpc/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/jsonRpc/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAqB,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAuB,MAAM,YAAY,CAAC;AA0BjE;;;GAGG;AAEH,8BAAsB,aAAc,SAAQ,MAAM;IAS9C,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAT1B;;;;;OAKG;gBAGgB,GAAG,EAAE,MAAM,EACX,OAAO,SAAQ;IAKlC;;;;OAIG;IAEH,MAAM;IAIN;;;;;;OAMG;IAEH,eAAe,gBAKA,eAAe,cAChB,gBAAgB,GAAG,SAAS,KACrC,QAAQ,GAAG,CAAC,CAAC;IAElB;;;;;OAKG;IAEH,cAAc,WAIA,OAAO,KAAK,QAAQ,yBAAyB,CAAC,CAAC;IAE7D;;;;;;;;OAQG;IAEH,cAAc,QASP,0BAA0B,UACvB,KAAK,GAAG,MAAM,UACd,OAAO,UACP,MAAM,KACX,QAAQ,uBAAuB,CAAC,CAAC;IAEtC;;;;;OAKG;IAEH,gBAAgB,QAIL,0BAA0B,KAAK,QAAQ,GAAG,CAAC,CAAC;IAEvD;;;;;;;OAOG;IAEH,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC,EAAE,EACrD,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,OAAO,YAEd,OAAO,EAAE;IAkBjC;;;;;;;OAOG;IAEG,IAAI,CAAC,OAAO,EAAE,cAAc;IA4BlC;;;;;;OAMG;IAEH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,cAAc;CAQpE"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ClientJsonRpc = void 0;
|
|
7
7
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
8
8
|
const hex_1 = require("../../hex");
|
|
9
|
+
const num_1 = require("../../num");
|
|
9
10
|
const client_1 = require("../client");
|
|
10
11
|
const advanced_1 = require("./advanced");
|
|
11
12
|
/**
|
|
@@ -57,6 +58,27 @@ class ClientJsonRpc extends client_1.Client {
|
|
|
57
58
|
* @returns The transaction with status.
|
|
58
59
|
*/
|
|
59
60
|
this.getTransaction = this.buildSender("get_transaction", [hex_1.hexFrom], advanced_1.JsonRpcTransformers.transactionResponseTo);
|
|
61
|
+
/**
|
|
62
|
+
* find cells from node.
|
|
63
|
+
*
|
|
64
|
+
* @param key - The search key of cells.
|
|
65
|
+
* @param order - The order of cells.
|
|
66
|
+
* @param limit - The max return size of cells.
|
|
67
|
+
* @param after - Pagination parameter.
|
|
68
|
+
* @returns The found cells.
|
|
69
|
+
*/
|
|
70
|
+
this.findCellsPaged = this.buildSender("get_cells", [
|
|
71
|
+
advanced_1.JsonRpcTransformers.indexerSearchKeyFrom,
|
|
72
|
+
(order) => order ?? "asc",
|
|
73
|
+
(limit) => (0, num_1.numToHex)(limit ?? 10),
|
|
74
|
+
], advanced_1.JsonRpcTransformers.findCellsResponseTo);
|
|
75
|
+
/**
|
|
76
|
+
* get cells capacity from node.
|
|
77
|
+
*
|
|
78
|
+
* @param key - The search key of cells.
|
|
79
|
+
* @returns The sum of cells capacity.
|
|
80
|
+
*/
|
|
81
|
+
this.getCellsCapacity = this.buildSender("get_cells_capacity", [advanced_1.JsonRpcTransformers.indexerSearchKeyFrom], ({ capacity }) => (0, num_1.numFrom)(capacity));
|
|
60
82
|
}
|
|
61
83
|
/**
|
|
62
84
|
* Returns the URL of the JSON-RPC server.
|
|
@@ -76,7 +98,9 @@ class ClientJsonRpc extends client_1.Client {
|
|
|
76
98
|
*/
|
|
77
99
|
buildSender(rpcMethod, inTransformers, outTransformer) {
|
|
78
100
|
return async (...req) => {
|
|
79
|
-
const payload = ClientJsonRpc.buildPayload(rpcMethod, await Promise.all(req
|
|
101
|
+
const payload = ClientJsonRpc.buildPayload(rpcMethod, await Promise.all(req
|
|
102
|
+
.concat(Array.from(new Array(Math.max(inTransformers.length - req.length, 0))))
|
|
103
|
+
.map((v, i) => transform(v, inTransformers[i]))));
|
|
80
104
|
return transform(await this.send(payload), outTransformer);
|
|
81
105
|
};
|
|
82
106
|
}
|
|
@@ -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,EACP,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,eAAe,EAGhB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,OAAO,EAAqB,MAAM,WAAW,CAAC;AAEvD,OAAO,EACL,uBAAuB,EAEvB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,uBAAuB,EACvB,eAAe,EACf,aAAa,EACb,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,qBAAa,mBAAmB;IAC9B,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,eAAe;IAG5D,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,eAAe,GAA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