@ckb-ccc/core 0.0.2-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.
Files changed (117) hide show
  1. package/dist/address/address.d.ts +8 -0
  2. package/dist/address/address.d.ts.map +1 -0
  3. package/dist/address/address.js +6 -0
  4. package/dist/address/addressKnownScript.d.ts +13 -0
  5. package/dist/address/addressKnownScript.d.ts.map +1 -0
  6. package/dist/address/addressKnownScript.js +27 -0
  7. package/dist/address/addressPlain.d.ts +12 -0
  8. package/dist/address/addressPlain.d.ts.map +1 -0
  9. package/dist/address/addressPlain.js +23 -0
  10. package/dist/address/advanced.d.ts +31 -0
  11. package/dist/address/advanced.d.ts.map +1 -0
  12. package/dist/address/advanced.js +63 -0
  13. package/dist/address/converter.d.ts +8 -0
  14. package/dist/address/converter.d.ts.map +1 -0
  15. package/dist/address/converter.js +65 -0
  16. package/dist/address/index.d.ts +6 -0
  17. package/dist/address/index.d.ts.map +1 -0
  18. package/dist/address/index.js +34 -0
  19. package/dist/barrel.d.ts +8 -0
  20. package/dist/barrel.d.ts.map +1 -0
  21. package/dist/barrel.js +23 -0
  22. package/dist/bundle.d.ts +9 -0
  23. package/dist/bundle.d.ts.map +1 -0
  24. package/dist/bundle.js +25 -0
  25. package/dist/ckb/index.d.ts +2 -0
  26. package/dist/ckb/index.d.ts.map +1 -0
  27. package/dist/ckb/index.js +17 -0
  28. package/dist/ckb/viewerCkbAddress.d.ts +14 -0
  29. package/dist/ckb/viewerCkbAddress.d.ts.map +1 -0
  30. package/dist/ckb/viewerCkbAddress.js +28 -0
  31. package/dist/client/client.d.ts +13 -0
  32. package/dist/client/client.d.ts.map +1 -0
  33. package/dist/client/client.js +14 -0
  34. package/dist/client/clientPublicMainnet.advanced.d.ts +4 -0
  35. package/dist/client/clientPublicMainnet.advanced.d.ts.map +1 -0
  36. package/dist/client/clientPublicMainnet.advanced.js +26 -0
  37. package/dist/client/clientPublicMainnet.d.ts +7 -0
  38. package/dist/client/clientPublicMainnet.d.ts.map +1 -0
  39. package/dist/client/clientPublicMainnet.js +14 -0
  40. package/dist/client/clientPublicTestnet.advanced.d.ts +4 -0
  41. package/dist/client/clientPublicTestnet.advanced.d.ts.map +1 -0
  42. package/dist/client/clientPublicTestnet.advanced.js +26 -0
  43. package/dist/client/clientPublicTestnet.d.ts +7 -0
  44. package/dist/client/clientPublicTestnet.d.ts.map +1 -0
  45. package/dist/client/clientPublicTestnet.js +14 -0
  46. package/dist/client/index.d.ts +8 -0
  47. package/dist/client/index.d.ts.map +1 -0
  48. package/dist/client/index.js +38 -0
  49. package/dist/codec/bytes.d.ts +4 -0
  50. package/dist/codec/bytes.d.ts.map +1 -0
  51. package/dist/codec/bytes.js +29 -0
  52. package/dist/codec/hashType.d.ts +4 -0
  53. package/dist/codec/hashType.d.ts.map +1 -0
  54. package/dist/codec/hashType.js +13 -0
  55. package/dist/codec/index.d.ts +4 -0
  56. package/dist/codec/index.d.ts.map +1 -0
  57. package/dist/codec/index.js +19 -0
  58. package/dist/codec/script.d.ts +4 -0
  59. package/dist/codec/script.d.ts.map +1 -0
  60. package/dist/codec/script.js +22 -0
  61. package/dist/index.d.ts +3 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +31 -0
  64. package/dist/signer.d.ts +9 -0
  65. package/dist/signer.d.ts.map +1 -0
  66. package/dist/signer.js +12 -0
  67. package/dist/tsconfig.tsbuildinfo +1 -0
  68. package/dist/types/cell.d.ts +5 -0
  69. package/dist/types/cell.d.ts.map +1 -0
  70. package/dist/types/cell.js +8 -0
  71. package/dist/types/ckb.advanced.d.ts +4 -0
  72. package/dist/types/ckb.advanced.d.ts.map +1 -0
  73. package/dist/types/ckb.advanced.js +15 -0
  74. package/dist/types/ckb.d.ts +16 -0
  75. package/dist/types/ckb.d.ts.map +1 -0
  76. package/dist/types/ckb.js +36 -0
  77. package/dist/types/index.d.ts +9 -0
  78. package/dist/types/index.d.ts.map +1 -0
  79. package/dist/types/index.js +37 -0
  80. package/dist/types/lumos.d.ts +90 -0
  81. package/dist/types/lumos.d.ts.map +1 -0
  82. package/dist/types/lumos.js +2 -0
  83. package/dist/types/primitive.d.ts +3 -0
  84. package/dist/types/primitive.d.ts.map +1 -0
  85. package/dist/types/primitive.js +2 -0
  86. package/dist/viewer.d.ts +9 -0
  87. package/dist/viewer.d.ts.map +1 -0
  88. package/dist/viewer.js +6 -0
  89. package/package.json +35 -0
  90. package/src/address/address.ts +9 -0
  91. package/src/address/addressKnownScript.ts +31 -0
  92. package/src/address/addressPlain.ts +27 -0
  93. package/src/address/advanced.ts +74 -0
  94. package/src/address/converter.ts +93 -0
  95. package/src/address/index.ts +5 -0
  96. package/src/barrel.ts +7 -0
  97. package/src/ckb/index.ts +1 -0
  98. package/src/ckb/viewerCkbAddress.ts +34 -0
  99. package/src/client/client.ts +14 -0
  100. package/src/client/clientPublicMainnet.advanced.ts +30 -0
  101. package/src/client/clientPublicMainnet.ts +13 -0
  102. package/src/client/clientPublicTestnet.advanced.ts +30 -0
  103. package/src/client/clientPublicTestnet.ts +13 -0
  104. package/src/client/index.ts +10 -0
  105. package/src/codec/bytes.ts +30 -0
  106. package/src/codec/hashType.ts +10 -0
  107. package/src/codec/index.ts +3 -0
  108. package/src/codec/script.ts +21 -0
  109. package/src/index.ts +2 -0
  110. package/src/signer.ts +20 -0
  111. package/src/types/cell.ts +5 -0
  112. package/src/types/ckb.advanced.ts +14 -0
  113. package/src/types/ckb.ts +47 -0
  114. package/src/types/index.ts +9 -0
  115. package/src/types/lumos.ts +101 -0
  116. package/src/types/primitive.ts +2 -0
  117. package/src/viewer.ts +14 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientPublicTestnet.d.ts","sourceRoot":"","sources":["../../src/client/clientPublicTestnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG/C,qBAAa,mBAAoB,SAAQ,MAAM;IACvC,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAInC,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAGzE"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientPublicTestnet = void 0;
4
+ const client_1 = require("./client");
5
+ const clientPublicTestnet_advanced_1 = require("./clientPublicTestnet.advanced");
6
+ class ClientPublicTestnet extends client_1.Client {
7
+ async getAddressPrefix() {
8
+ return "ckt";
9
+ }
10
+ async getKnownScript(script) {
11
+ return clientPublicTestnet_advanced_1.TESTNET_SCRIPTS[script];
12
+ }
13
+ }
14
+ exports.ClientPublicTestnet = ClientPublicTestnet;
@@ -0,0 +1,8 @@
1
+ export * from "./client";
2
+ export * from "./clientPublicMainnet";
3
+ export * from "./clientPublicTestnet";
4
+ export declare const AdvancedClient: {
5
+ TESTNET_SCRIPTS: Record<import("./client").KnownScript, Omit<import("../types").Script, "args">>;
6
+ MAINNET_SCRIPTS: Record<import("./client").KnownScript, Omit<import("../types").Script, "args">>;
7
+ };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,cAAc,uBAAuB,CAAC;AAEtC,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,cAAc;;;CAG1B,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AdvancedClient = void 0;
30
+ __exportStar(require("./client"), exports);
31
+ const clientPublicMainnetAdvanced = __importStar(require("./clientPublicMainnet.advanced"));
32
+ __exportStar(require("./clientPublicMainnet"), exports);
33
+ const clientPublicTestnetAdvanced = __importStar(require("./clientPublicTestnet.advanced"));
34
+ __exportStar(require("./clientPublicTestnet"), exports);
35
+ exports.AdvancedClient = {
36
+ ...clientPublicMainnetAdvanced,
37
+ ...clientPublicTestnetAdvanced,
38
+ };
@@ -0,0 +1,4 @@
1
+ import { BytesLike, HexString } from "../types";
2
+ export declare function toBytes(bytes: BytesLike | string): Uint8Array;
3
+ export declare function toHex(bytes: BytesLike | string): HexString;
4
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/codec/bytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGhD,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAsB7D;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAE1D"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toHex = exports.toBytes = void 0;
4
+ const buffer_1 = require("buffer");
5
+ function toBytes(bytes) {
6
+ if (bytes instanceof Uint8Array) {
7
+ return bytes;
8
+ }
9
+ if (Array.isArray(bytes)) {
10
+ if (bytes.some((v) => v < 0 || 0xff < v)) {
11
+ throw new Error(`Invalid bytes ${bytes}`);
12
+ }
13
+ return new Uint8Array(bytes);
14
+ }
15
+ if (bytes.length % 2 !== 0) {
16
+ throw new Error(`Invalid bytes with odd length ${bytes}`);
17
+ }
18
+ const strData = bytes.startsWith("0x") ? bytes.slice(2) : bytes;
19
+ const data = buffer_1.Buffer.from(strData, "hex");
20
+ if (data.length * 2 !== strData.length) {
21
+ throw new Error(`Invalid bytes ${bytes}`);
22
+ }
23
+ return data;
24
+ }
25
+ exports.toBytes = toBytes;
26
+ function toHex(bytes) {
27
+ return `0x${new buffer_1.Buffer(toBytes(bytes)).toString("hex")}`;
28
+ }
29
+ exports.toHex = toHex;
@@ -0,0 +1,4 @@
1
+ import { BytesLike, HashType } from "../types";
2
+ export declare function encodeHashType(hashType: HashType): Uint8Array;
3
+ export declare function decodeHashType(bytes: BytesLike): HashType;
4
+ //# sourceMappingURL=hashType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hashType.d.ts","sourceRoot":"","sources":["../../src/codec/hashType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAiC,MAAM,UAAU,CAAC;AAG9E,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAE7D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAEzD"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeHashType = exports.encodeHashType = void 0;
4
+ const types_1 = require("../types");
5
+ const bytes_1 = require("./bytes");
6
+ function encodeHashType(hashType) {
7
+ return (0, bytes_1.toBytes)([(0, types_1.parseHashType)(hashType)]);
8
+ }
9
+ exports.encodeHashType = encodeHashType;
10
+ function decodeHashType(bytes) {
11
+ return (0, types_1.formatHashType)((0, bytes_1.toBytes)(bytes)[0]);
12
+ }
13
+ exports.decodeHashType = decodeHashType;
@@ -0,0 +1,4 @@
1
+ export * from "./bytes";
2
+ export * from "./hashType";
3
+ export * from "./script";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codec/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./bytes"), exports);
18
+ __exportStar(require("./hashType"), exports);
19
+ __exportStar(require("./script"), exports);
@@ -0,0 +1,4 @@
1
+ import { BytesLike, Script } from "../types";
2
+ export declare function encodeScript(script: Script): Uint8Array;
3
+ export declare function decodeScript(bytes: BytesLike): Script;
4
+ //# sourceMappingURL=script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../src/codec/script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAMvD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAQrD"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeScript = exports.encodeScript = void 0;
4
+ const bytes_1 = require("./bytes");
5
+ const hashType_1 = require("./hashType");
6
+ function encodeScript(script) {
7
+ return (0, bytes_1.toBytes)([
8
+ ...(0, bytes_1.toBytes)(script.codeHash),
9
+ ...(0, hashType_1.encodeHashType)(script.hashType),
10
+ ...(0, bytes_1.toBytes)(script.args),
11
+ ]);
12
+ }
13
+ exports.encodeScript = encodeScript;
14
+ function decodeScript(bytes) {
15
+ const formattedBytes = (0, bytes_1.toBytes)(bytes);
16
+ return {
17
+ codeHash: (0, bytes_1.toHex)(formattedBytes.slice(0, 32)),
18
+ hashType: (0, hashType_1.decodeHashType)(formattedBytes.slice(32, 33)),
19
+ args: (0, bytes_1.toHex)(formattedBytes.slice(33)),
20
+ };
21
+ }
22
+ exports.decodeScript = decodeScript;
@@ -0,0 +1,3 @@
1
+ export * from "./barrel";
2
+ export * as ccc from "./barrel";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ccc = void 0;
30
+ __exportStar(require("./barrel"), exports);
31
+ exports.ccc = __importStar(require("./barrel"));
@@ -0,0 +1,9 @@
1
+ import { TransactionSkeletonType } from "./types/lumos";
2
+ import { Viewer } from "./viewer";
3
+ import { BytesLike, HexString } from "./types";
4
+ export declare abstract class Signer extends Viewer {
5
+ abstract signMessage(message: string | BytesLike): Promise<HexString>;
6
+ signLumosTransaction(tx: TransactionSkeletonType): Promise<TransactionSkeletonType>;
7
+ abstract signOnlyLumosTransaction(tx: TransactionSkeletonType): Promise<TransactionSkeletonType>;
8
+ }
9
+ //# sourceMappingURL=signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,8BAAsB,MAAO,SAAQ,MAAM;IACzC,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAGrE,oBAAoB,CAClB,EAAE,EAAE,uBAAuB,GAC1B,OAAO,CAAC,uBAAuB,CAAC;IAMnC,QAAQ,CAAC,wBAAwB,CAC/B,EAAE,EAAE,uBAAuB,GAC1B,OAAO,CAAC,uBAAuB,CAAC;CACpC"}
package/dist/signer.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Signer = void 0;
4
+ const viewer_1 = require("./viewer");
5
+ class Signer extends viewer_1.Viewer {
6
+ // Will be deprecated in the future
7
+ signLumosTransaction(tx) {
8
+ const completedTx = this.completeLumosTransaction(tx);
9
+ return this.signOnlyLumosTransaction(tx);
10
+ }
11
+ }
12
+ exports.Signer = Signer;
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.full.d.ts","../src/types/cell.ts","../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.d.ts","../src/codec/bytes.ts","../src/codec/hashType.ts","../src/codec/script.ts","../src/codec/index.ts","../src/types/primitive.ts","../src/types/ckb.ts","../src/types/ckb.advanced.ts","../../../node_modules/.pnpm/immutable@5.0.0-beta.5/node_modules/immutable/dist/immutable.d.ts","../src/types/lumos.ts","../src/types/index.ts","../src/client/client.ts","../src/client/clientPublicMainnet.advanced.ts","../src/client/clientPublicMainnet.ts","../src/client/clientPublicTestnet.advanced.ts","../src/client/clientPublicTestnet.ts","../src/client/index.ts","../src/address/address.ts","../../../node_modules/.pnpm/bech32@2.0.0/node_modules/bech32/dist/index.d.ts","../src/address/advanced.ts","../src/address/addressKnownScript.ts","../src/address/converter.ts","../src/address/addressPlain.ts","../src/address/index.ts","../src/viewer.ts","../src/ckb/viewerCkbAddress.ts","../src/ckb/index.ts","../src/signer.ts","../src/barrel.ts","../src/index.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"87d693a4920d794a73384b3c779cadcb8548ac6945aa7a925832fe2418c9527a","affectsGlobalScope":true,"impliedFormat":1},{"version":"76f838d5d49b65de83bc345c04aa54c62a3cfdb72a477dc0c0fce89a30596c30","affectsGlobalScope":true,"impliedFormat":1},{"version":"73e370058f82add1fdbc78ef3d1aab110108f2d5d9c857cb55d3361982347ace","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true,"impliedFormat":1},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"1305d1e76ca44e30fb8b2b8075fa522b83f60c0bcf5d4326a9d2cf79b53724f8","impliedFormat":1},{"version":"e0c296540d525fe112e3ebb4e03bb3858181189577878973d074198583a46dae","signature":"b0c320ca9c892914eafd8499c5758f995641660b8d5734db002e4ed6c46563e8","impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"c059e8c68b61cec64f03df3de325fbbbb845151bf65371897602ab3d951a5733","signature":"c78f0bc1c9a71cfc39b91277529e548173cbcb42e2b746e4c57c83cad9c288bc","impliedFormat":1},{"version":"a03965b35498b73190c23df2c67d8ef000ed765b6e941216fdf472050b26abe3","signature":"ba3e209285d4bdb8663e8b92173c02626321836182ec2856c110f7008035c386","impliedFormat":1},{"version":"97e270044e5439d412d070d1dfb8f92e43cde60ce3eafa0bc9bbef33764d0f69","signature":"56651204fef65428dcc8569d09b767be32c195fe0ac3e7c42ac93face7dc9b00","impliedFormat":1},{"version":"5afeab73394252216500a32c6198cd20c1b695505b80afd3b623a079057796cd","impliedFormat":1},{"version":"5e4eb6721992e4846fa0791c6cb58688d820718ed8614af98c442c7c32b3e163","impliedFormat":1},{"version":"07030e2bec1b6e6b7c98d60208d1053954cb8af89c6454e2b2f8b2874aa3b7b4","signature":"cd1d935a7a32405b62c5b0acbd673988d029fa81c0763566a728040856ef08cb","impliedFormat":1},{"version":"2f282e87cfdbfd66a3ed26a8ed82abfc74178e5215cedb33bad53c5fe8809abd","signature":"e72fb2a60051a47fd28c27de963f23c71fa56b689109ea59a53160231a05210b","impliedFormat":1},{"version":"ff1d45eb07566876bd6ea7127aa07d16d773f694be32068a5b32462d287da686","impliedFormat":1},{"version":"0b42cdf3e945c26845ae76b2f6523d266503b3cbde3042c28e5ebe182228cc82","signature":"68f3d0dcb0bff49e342a61f4c14e4956ee4723e6e963e2dcc9a0e78c212f4e37","impliedFormat":1},{"version":"d96e59a5716a77bebbcfdd37cad7c3d5aeb780b9af7dca356207888444ecc6ab","signature":"3d8b68283344dc4c1920a178430a9e0e9ae6144f516a46c3331e7ec0f97f8345","impliedFormat":1},{"version":"543a4445b4bea65e71509d47604e038c350aaf6d5e2ccf45809edc87719840f9","signature":"932f5661437685a19970f2f2ff0176a0bd5bc2eb4755869f32e595ca9c756bd7","impliedFormat":1},{"version":"eeb52851735434588793e310834c3fde6f214122b7efa55ef78e7f258843f395","signature":"5f81feef31f916b30d310a191f061a018af87b9fc1366fb3bae89e635aca30f2","impliedFormat":1},{"version":"1af651837628293039eb95004f58c40ffc9c271f17710aa4c40d49a76ea84b5b","signature":"e6e9bbd46f5f8cc487cc70d2ebe5ce776567b510d77c0b2c37b2390e7b4a7580","impliedFormat":1},{"version":"e4b0b2319c1a1c000ca0e6a3bb7a48078b7bece71bce5cca9cc570a1a94d3a67","signature":"c25cfe7c83804e0ed8fb7c9d9d18b0f2fab44e0785633b03617f0567ebb7813e","impliedFormat":1},{"version":"3b041239aa64c12665361760c91ca5d95fdb4958cdd63d37f5e06013cace061d","signature":"b1622eb4d37ed3a41410fcd857156c5c2e44efb2ab1464f8c53b3b3146a45c96","impliedFormat":1},{"version":"f53098dede7a4a53df5cf78c73891a2fc7a1e3cf9dbc293da06d3e1c5429e23d","signature":"d8b0d54a7bd31fe23f36f275f55edaa3804d3c5baa57c0f1cb2b79d304a31d74","impliedFormat":1},{"version":"be013f6d3ac5c94d8f161a0a232fe37bc97093332d0fa5abed0c961a53b1aa05","signature":"b2aa2633e72218797012d1285565f436cc0d867c2651f9eb23acc06839561f46","impliedFormat":1},{"version":"a7a74b55a74b69119990ec09675e3f7c484cea5e7fc21639d7aafe26225b118f","impliedFormat":1},{"version":"affb78f3fee9d44c3737d2c59d4c1a21398385b479b59b025b98fcc4906fdceb","signature":"1d34e1833165e1f228333d2f1a5912efc94d2f13d81e9604b0e7d81840062b6f","impliedFormat":1},{"version":"77ab33e05bdc0002e61e2f955f02dcc370728728320680cd4579df77a4ff75a9","signature":"076985fb2dcb891591ea82df905b0c87201c7ff58672f833f79d5a2ad35d75e7","impliedFormat":1},{"version":"ac7ee6bb0420606469c8014c938649a93d3208168c95208ccde898da66e7478b","signature":"f3e271f0949d9e33a800d0548a617fb36199acce99c76ef9955efda5888b63e6","impliedFormat":1},{"version":"64cffe91948b1021ba4d2cbf40e373b70c71cf2c28fb5433b38790981c7663c9","signature":"898d6a25f454e80f37d965bf8ef740298812f18aeb001f70f8960f7ca994d856","impliedFormat":1},{"version":"2c7e4ab7d3d00fb1bb931dfaef92e5a0db5f00c0b3e0710ff2810d4fd3bd1d0d","impliedFormat":1},{"version":"575c4e4a02b72c6e606145cd08e58757b63f864f5e88e4c92956e864c0516355","signature":"f08bc2c16f321a5672b25f564a7e1d06ea061ea43e6455d515835c4c2a8e310b","impliedFormat":1},{"version":"06d09f6b9fcc1f6f7d9c3f95d2674522a8796d82f420ae8c19eabe4a1e5665c2","signature":"f104fc367b51a3ad99666a049716f82fccca55ce275890404ecb053476d42d2d","impliedFormat":1},{"version":"04dc2193565b32881958c135bd834495b4f2fb96896a1a40ef929dee65717926","impliedFormat":1},{"version":"eb250b32384cc0a5e327b52e9b8c856f4f0f5d26682206ac6168c8bc7110bc0c","signature":"c018425be929754e0903ba39269cae454e92e1d4289d71c44d02e7ef268aece2","impliedFormat":1},{"version":"d56394f18f55e1a2ef9d2912f7662b926fd85a495950f16925dbc81795ef113d","impliedFormat":1},{"version":"34a6717466a1369a08a578682d4d62ea37604c354cda8e540785ce0967104dd3","signature":"7fc7486ca8b60e82c304c9221f3750e20b001e0f9f96735b19637f8baa053195","impliedFormat":1}],"root":[51,[53,59],[61,69],[71,81]],"options":{"alwaysStrict":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"importHelpers":false,"module":100,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"outDir":"./","strict":true,"strictBindCallApply":true,"strictNullChecks":true,"target":7},"fileIdsList":[[62,68],[62,68,69,73],[56,62,68,70],[56,62,68,69,70,71,72,74],[69,71,72,73,74],[56,62,68,75,76,78,79],[77],[61,62,68,75,76],[62],[62,63],[62,63,64],[62,63,66],[63,64,65,66,67],[52,62],[53,62],[53,54,55],[53,54,62],[80],[61,62,76],[58],[56,57,59],[51,57,58,59,61],[60],[61,68],[62,68,69],[68],[62,68,69,74],[61,62,68,76],[62,63,65,67],[57],[51,57,58,61]],"referencedMap":[[69,1],[72,2],[74,2],[71,3],[73,4],[75,5],[80,6],[78,7],[77,8],[63,9],[64,10],[65,11],[66,10],[67,12],[68,13],[53,14],[54,15],[56,16],[55,17],[81,18],[79,19],[59,20],[58,21],[62,22],[61,23],[76,24]],"exportedModulesMap":[[69,1],[72,25],[74,25],[71,26],[73,27],[75,5],[80,6],[78,7],[77,28],[63,9],[64,10],[65,10],[66,10],[67,10],[68,29],[53,9],[54,9],[56,16],[55,9],[81,18],[79,19],[59,20],[58,30],[62,31],[61,23],[76,24]],"semanticDiagnosticsPerFile":[70,52,60,48,49,10,8,9,14,13,2,15,16,17,18,19,20,21,22,3,23,4,24,28,25,26,27,29,30,31,5,32,33,34,35,6,39,36,37,38,40,7,41,50,46,47,42,43,44,45,1,12,11,69,72,74,71,73,75,80,78,77,63,64,65,66,67,68,53,54,56,55,81,79,51,59,58,62,61,57,76]},"version":"5.4.5"}
@@ -0,0 +1,5 @@
1
+ export declare class Cell {
2
+ constructor();
3
+ static from(): void;
4
+ }
5
+ //# sourceMappingURL=cell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../src/types/cell.ts"],"names":[],"mappings":"AAAA,qBAAa,IAAI;;IAGf,MAAM,CAAC,IAAI;CACZ"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Cell = void 0;
4
+ class Cell {
5
+ constructor() { }
6
+ static from() { }
7
+ }
8
+ exports.Cell = Cell;
@@ -0,0 +1,4 @@
1
+ import { HashType } from "./ckb";
2
+ export declare const HASHTYPE_TO_NUM: Record<HashType, number>;
3
+ export declare const NUM_TO_HASHTYPE: Record<number, HashType>;
4
+ //# sourceMappingURL=ckb.advanced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ckb.advanced.d.ts","sourceRoot":"","sources":["../../src/types/ckb.advanced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAKpD,CAAC;AACF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAKpD,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NUM_TO_HASHTYPE = exports.HASHTYPE_TO_NUM = void 0;
4
+ exports.HASHTYPE_TO_NUM = {
5
+ type: 0x01,
6
+ data: 0x00,
7
+ data1: 0x02,
8
+ data2: 0x04,
9
+ };
10
+ exports.NUM_TO_HASHTYPE = {
11
+ 0x01: "type",
12
+ 0x00: "data",
13
+ 0x02: "data1",
14
+ 0x04: "data2",
15
+ };
@@ -0,0 +1,16 @@
1
+ import { BytesLike, HexString } from "./primitive";
2
+ export type HashType = "type" | "data" | "data1" | "data2";
3
+ export declare function parseHashType(hashType: HashType): number;
4
+ export declare function formatHashType(hashType: number): HashType;
5
+ export declare class Script {
6
+ readonly codeHash: HexString;
7
+ readonly hashType: HashType;
8
+ readonly args: HexString;
9
+ constructor(codeHash: HexString, hashType: HashType, args: HexString);
10
+ static from({ codeHash, hashType, args, }: {
11
+ codeHash: BytesLike;
12
+ hashType: string;
13
+ args: BytesLike;
14
+ }): Script;
15
+ }
16
+ //# sourceMappingURL=ckb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ckb.d.ts","sourceRoot":"","sources":["../../src/types/ckb.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAC3D,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,UAQ/C;AACD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAQzD;AAED,qBAAa,MAAM;aAEC,QAAQ,EAAE,SAAS;aACnB,QAAQ,EAAE,QAAQ;aAClB,IAAI,EAAE,SAAS;gBAFf,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,SAAS;IAGjC,MAAM,CAAC,IAAI,CAAC,EACV,QAAQ,EACR,QAAQ,EACR,IAAI,GACL,EAAE;QACD,QAAQ,EAAE,SAAS,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC;KACjB,GAAG,MAAM;CAOX"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Script = exports.formatHashType = exports.parseHashType = void 0;
4
+ const codec_1 = require("../codec");
5
+ const ckb_advanced_1 = require("./ckb.advanced");
6
+ function parseHashType(hashType) {
7
+ const val = ckb_advanced_1.HASHTYPE_TO_NUM[hashType];
8
+ if (val === undefined) {
9
+ throw new Error(`Invalid hash type ${hashType}`);
10
+ }
11
+ return val;
12
+ }
13
+ exports.parseHashType = parseHashType;
14
+ function formatHashType(hashType) {
15
+ const val = ckb_advanced_1.NUM_TO_HASHTYPE[hashType];
16
+ if (val === undefined) {
17
+ throw new Error(`Invalid hash type ${hashType}`);
18
+ }
19
+ return val;
20
+ }
21
+ exports.formatHashType = formatHashType;
22
+ class Script {
23
+ constructor(codeHash, hashType, args) {
24
+ this.codeHash = codeHash;
25
+ this.hashType = hashType;
26
+ this.args = args;
27
+ }
28
+ static from({ codeHash, hashType, args, }) {
29
+ return {
30
+ codeHash: (0, codec_1.toHex)(codeHash),
31
+ hashType: hashType,
32
+ args: (0, codec_1.toHex)(args),
33
+ };
34
+ }
35
+ }
36
+ exports.Script = Script;
@@ -0,0 +1,9 @@
1
+ export * from "./cell";
2
+ export * from "./ckb";
3
+ export * as lumos from "./lumos";
4
+ export * from "./primitive";
5
+ export declare const AdvancedType: {
6
+ HASHTYPE_TO_NUM: Record<import("./ckb").HashType, number>;
7
+ NUM_TO_HASHTYPE: Record<number, import("./ckb").HashType>;
8
+ };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AAEvB,cAAc,OAAO,CAAC;AACtB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,aAAa,CAAC;AAE5B,eAAO,MAAM,YAAY;;;CAExB,CAAA"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AdvancedType = exports.lumos = void 0;
30
+ __exportStar(require("./cell"), exports);
31
+ const ckbAdvanced = __importStar(require("./ckb.advanced"));
32
+ __exportStar(require("./ckb"), exports);
33
+ exports.lumos = __importStar(require("./lumos"));
34
+ __exportStar(require("./primitive"), exports);
35
+ exports.AdvancedType = {
36
+ ...ckbAdvanced,
37
+ };
@@ -0,0 +1,90 @@
1
+ import { List, Map as ImmutableMap, Record } from "immutable";
2
+ export type HexString = string;
3
+ export type Hexadecimal = string;
4
+ export type Hash = HexString;
5
+ export type HexNumber = Hexadecimal;
6
+ export type PackedSince = string;
7
+ export type PackedDao = string;
8
+ export type Address = string;
9
+ export type HexadecimalRange = [Hexadecimal, Hexadecimal];
10
+ export type HashType = "type" | "data" | "data1" | "data2";
11
+ export interface Script {
12
+ codeHash: Hash;
13
+ hashType: HashType;
14
+ args: HexString;
15
+ }
16
+ export interface OutPoint {
17
+ txHash: Hash;
18
+ index: HexNumber;
19
+ }
20
+ export type DepType = "depGroup" | "code";
21
+ export interface CellDep {
22
+ outPoint: OutPoint;
23
+ depType: DepType;
24
+ }
25
+ export interface Cell {
26
+ cellOutput: {
27
+ capacity: HexNumber;
28
+ lock: Script;
29
+ type?: Script;
30
+ };
31
+ data: HexString;
32
+ outPoint?: OutPoint;
33
+ blockHash?: Hash;
34
+ blockNumber?: HexNumber;
35
+ txIndex?: HexNumber;
36
+ }
37
+ export type SearchMode = "exact" | "prefix";
38
+ export type DataWithSearchMode = {
39
+ searchMode: SearchMode;
40
+ data: HexString;
41
+ };
42
+ export interface ScriptWrapper {
43
+ script: Script;
44
+ searchMode?: SearchMode;
45
+ ioType?: "input" | "output" | "both";
46
+ argsLen?: number | "any";
47
+ }
48
+ export interface QueryOptions {
49
+ lock?: Script | ScriptWrapper;
50
+ type?: Script | ScriptWrapper | "empty";
51
+ data?: string | "any" | DataWithSearchMode;
52
+ /** `lock` script args length */
53
+ argsLen?: number | "any";
54
+ /** `fromBlock` itself is included in range query. */
55
+ fromBlock?: Hexadecimal;
56
+ /** `toBlock` itself is included in range query. */
57
+ toBlock?: Hexadecimal;
58
+ skip?: number;
59
+ order?: "asc" | "desc";
60
+ }
61
+ export interface CellCollectorResults {
62
+ [Symbol.asyncIterator](): AsyncIterator<Cell>;
63
+ }
64
+ export interface CellCollector {
65
+ collect(): CellCollectorResults;
66
+ }
67
+ export interface CellProvider {
68
+ uri?: string;
69
+ collector(queryOptions: QueryOptions): CellCollector;
70
+ }
71
+ export interface TransactionSkeletonInterface {
72
+ cellProvider: CellProvider | null;
73
+ cellDeps: List<CellDep>;
74
+ headerDeps: List<Hash>;
75
+ inputs: List<Cell>;
76
+ outputs: List<Cell>;
77
+ witnesses: List<HexString>;
78
+ fixedEntries: List<{
79
+ field: string;
80
+ index: number;
81
+ }>;
82
+ signingEntries: List<{
83
+ type: string;
84
+ index: number;
85
+ message: string;
86
+ }>;
87
+ inputSinces: ImmutableMap<number, PackedSince>;
88
+ }
89
+ export type TransactionSkeletonType = Record<TransactionSkeletonInterface> & Readonly<TransactionSkeletonInterface>;
90
+ //# sourceMappingURL=lumos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lumos.d.ts","sourceRoot":"","sources":["../../src/types/lumos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,YAAY,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE9D,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,IAAI,GAAG,SAAS,CAAC;AAC7B,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AACpC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAE1D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAC3D,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,IAAI,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,IAAI,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAC1C,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,IAAI;IACnB,UAAU,EAAE;QACV,QAAQ,EAAE,SAAS,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC;IAExC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,kBAAkB,CAAC;IAE3C,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,qDAAqD;IACrD,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,mDAAmD;IACnD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,IAAI,oBAAoB,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,YAAY,EAAE,YAAY,GAAG,aAAa,CAAC;CACtD;AAED,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3B,YAAY,EAAE,IAAI,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD,cAAc,EAAE,IAAI,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,WAAW,EAAE,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAChD;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,4BAA4B,CAAC,GACxE,QAAQ,CAAC,4BAA4B,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export type HexString = `0x${string}`;
2
+ export type BytesLike = HexString | Uint8Array | number[];
3
+ //# sourceMappingURL=primitive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive.d.ts","sourceRoot":"","sources":["../../src/types/primitive.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,KAAK,MAAM,EAAE,CAAC;AACtC,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { TransactionSkeletonType } from "./types/lumos";
2
+ import { Client } from "./client";
3
+ export declare abstract class Viewer {
4
+ abstract getClient(): Promise<Client>;
5
+ abstract getRecommendedAddress(preference?: unknown): Promise<string>;
6
+ abstract getAddresses(): Promise<string[]>;
7
+ abstract completeLumosTransaction(tx: TransactionSkeletonType): Promise<TransactionSkeletonType>;
8
+ }
9
+ //# sourceMappingURL=viewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewer.d.ts","sourceRoot":"","sources":["../src/viewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,8BAAsB,MAAM;IAC1B,QAAQ,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAErC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IACrE,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAG1C,QAAQ,CAAC,wBAAwB,CAC/B,EAAE,EAAE,uBAAuB,GAC1B,OAAO,CAAC,uBAAuB,CAAC;CACpC"}
package/dist/viewer.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Viewer = void 0;
4
+ class Viewer {
5
+ }
6
+ exports.Viewer = Viewer;