@ckb-ccc/core 0.0.4-alpha.8 → 0.0.4

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 (165) hide show
  1. package/dist/signer/btc/signerBtcPublicKeyReadonly.d.ts +12 -0
  2. package/dist/signer/btc/signerBtcPublicKeyReadonly.d.ts.map +1 -1
  3. package/dist/signer/btc/signerBtcPublicKeyReadonly.js +16 -0
  4. package/dist/signer/ckb/signerCkbScriptReadonly.d.ts +12 -0
  5. package/dist/signer/ckb/signerCkbScriptReadonly.d.ts.map +1 -1
  6. package/dist/signer/ckb/signerCkbScriptReadonly.js +16 -0
  7. package/dist/signer/evm/signerEvm.d.ts +5 -1
  8. package/dist/signer/evm/signerEvm.d.ts.map +1 -1
  9. package/dist/signer/evm/signerEvm.js +20 -6
  10. package/dist/signer/evm/signerEvmAddressReadonly.d.ts +13 -1
  11. package/dist/signer/evm/signerEvmAddressReadonly.d.ts.map +1 -1
  12. package/dist/signer/evm/signerEvmAddressReadonly.js +16 -0
  13. package/dist/signer/helpers.d.ts.map +1 -1
  14. package/dist/signer/helpers.js +3 -2
  15. package/dist/signer/signer.d.ts +16 -4
  16. package/dist/signer/signer.d.ts.map +1 -1
  17. package/dist/signer/signer.js +5 -2
  18. package/dist.commonjs/address/address.advanced.d.ts +65 -0
  19. package/dist.commonjs/address/address.advanced.d.ts.map +1 -0
  20. package/dist.commonjs/address/address.advanced.js +149 -0
  21. package/dist.commonjs/address/advanced.d.ts +2 -0
  22. package/dist.commonjs/address/advanced.d.ts.map +1 -0
  23. package/dist.commonjs/address/advanced.js +17 -0
  24. package/dist.commonjs/address/index.d.ts +54 -0
  25. package/dist.commonjs/address/index.d.ts.map +1 -0
  26. package/dist.commonjs/address/index.js +84 -0
  27. package/dist.commonjs/advanced.d.ts +3 -0
  28. package/dist.commonjs/advanced.d.ts.map +1 -0
  29. package/dist.commonjs/advanced.js +31 -0
  30. package/dist.commonjs/advancedBarrel.d.ts +5 -0
  31. package/dist.commonjs/advancedBarrel.d.ts.map +1 -0
  32. package/dist.commonjs/advancedBarrel.js +20 -0
  33. package/dist.commonjs/barrel.d.ts +11 -0
  34. package/dist.commonjs/barrel.d.ts.map +1 -0
  35. package/dist.commonjs/barrel.js +26 -0
  36. package/dist.commonjs/bytes/advanced.d.ts +5 -0
  37. package/dist.commonjs/bytes/advanced.d.ts.map +1 -0
  38. package/dist.commonjs/bytes/advanced.js +2 -0
  39. package/dist.commonjs/bytes/index.d.ts +64 -0
  40. package/dist.commonjs/bytes/index.d.ts.map +1 -0
  41. package/dist.commonjs/bytes/index.js +97 -0
  42. package/dist.commonjs/ckb/advanced.d.ts +4 -0
  43. package/dist.commonjs/ckb/advanced.d.ts.map +1 -0
  44. package/dist.commonjs/ckb/advanced.js +32 -0
  45. package/dist.commonjs/ckb/index.d.ts +3 -0
  46. package/dist.commonjs/ckb/index.d.ts.map +1 -0
  47. package/dist.commonjs/ckb/index.js +18 -0
  48. package/dist.commonjs/ckb/molecule.advanced/generated.d.ts +355 -0
  49. package/dist.commonjs/ckb/molecule.advanced/generated.d.ts.map +1 -0
  50. package/dist.commonjs/ckb/molecule.advanced/generated.js +1536 -0
  51. package/dist.commonjs/ckb/molecule.advanced/index.d.ts +6 -0
  52. package/dist.commonjs/ckb/molecule.advanced/index.d.ts.map +1 -0
  53. package/dist.commonjs/ckb/molecule.advanced/index.js +25 -0
  54. package/dist.commonjs/ckb/script.advanced.d.ts +5 -0
  55. package/dist.commonjs/ckb/script.advanced.d.ts.map +1 -0
  56. package/dist.commonjs/ckb/script.advanced.js +16 -0
  57. package/dist.commonjs/ckb/script.d.ts +126 -0
  58. package/dist.commonjs/ckb/script.d.ts.map +1 -0
  59. package/dist.commonjs/ckb/script.js +188 -0
  60. package/dist.commonjs/ckb/transaction.advanced.d.ts +5 -0
  61. package/dist.commonjs/ckb/transaction.advanced.d.ts.map +1 -0
  62. package/dist.commonjs/ckb/transaction.advanced.js +12 -0
  63. package/dist.commonjs/ckb/transaction.d.ts +533 -0
  64. package/dist.commonjs/ckb/transaction.d.ts.map +1 -0
  65. package/dist.commonjs/ckb/transaction.js +665 -0
  66. package/dist.commonjs/client/advanced.d.ts +4 -0
  67. package/dist.commonjs/client/advanced.d.ts.map +1 -0
  68. package/dist.commonjs/client/advanced.js +19 -0
  69. package/dist.commonjs/client/client.d.ts +19 -0
  70. package/dist.commonjs/client/client.d.ts.map +1 -0
  71. package/dist.commonjs/client/client.js +30 -0
  72. package/dist.commonjs/client/clientPublicMainnet.advanced.d.ts +4 -0
  73. package/dist.commonjs/client/clientPublicMainnet.advanced.d.ts.map +1 -0
  74. package/dist.commonjs/client/clientPublicMainnet.advanced.js +26 -0
  75. package/dist.commonjs/client/clientPublicMainnet.d.ts +9 -0
  76. package/dist.commonjs/client/clientPublicMainnet.d.ts.map +1 -0
  77. package/dist.commonjs/client/clientPublicMainnet.js +17 -0
  78. package/dist.commonjs/client/clientPublicTestnet.advanced.d.ts +4 -0
  79. package/dist.commonjs/client/clientPublicTestnet.advanced.d.ts.map +1 -0
  80. package/dist.commonjs/client/clientPublicTestnet.advanced.js +26 -0
  81. package/dist.commonjs/client/clientPublicTestnet.d.ts +9 -0
  82. package/dist.commonjs/client/clientPublicTestnet.d.ts.map +1 -0
  83. package/dist.commonjs/client/clientPublicTestnet.js +17 -0
  84. package/dist.commonjs/client/clientTypes.d.ts +8 -0
  85. package/dist.commonjs/client/clientTypes.d.ts.map +1 -0
  86. package/dist.commonjs/client/clientTypes.js +2 -0
  87. package/dist.commonjs/client/index.d.ts +6 -0
  88. package/dist.commonjs/client/index.d.ts.map +1 -0
  89. package/dist.commonjs/client/index.js +21 -0
  90. package/dist.commonjs/client/jsonRpc/advanced.d.ts +3 -0
  91. package/dist.commonjs/client/jsonRpc/advanced.d.ts.map +1 -0
  92. package/dist.commonjs/client/jsonRpc/advanced.js +18 -0
  93. package/dist.commonjs/client/jsonRpc/index.d.ts +68 -0
  94. package/dist.commonjs/client/jsonRpc/index.d.ts.map +1 -0
  95. package/dist.commonjs/client/jsonRpc/index.js +128 -0
  96. package/dist.commonjs/client/jsonRpc/transformers.d.ts +28 -0
  97. package/dist.commonjs/client/jsonRpc/transformers.d.ts.map +1 -0
  98. package/dist.commonjs/client/jsonRpc/transformers.js +126 -0
  99. package/dist.commonjs/client/jsonRpc/types.d.ts +41 -0
  100. package/dist.commonjs/client/jsonRpc/types.d.ts.map +1 -0
  101. package/dist.commonjs/client/jsonRpc/types.js +2 -0
  102. package/dist.commonjs/fixedPoint/index.d.ts +49 -0
  103. package/dist.commonjs/fixedPoint/index.d.ts.map +1 -0
  104. package/dist.commonjs/fixedPoint/index.js +65 -0
  105. package/dist.commonjs/hasher/advanced.d.ts +2 -0
  106. package/dist.commonjs/hasher/advanced.d.ts.map +1 -0
  107. package/dist.commonjs/hasher/advanced.js +4 -0
  108. package/dist.commonjs/hasher/index.d.ts +52 -0
  109. package/dist.commonjs/hasher/index.d.ts.map +1 -0
  110. package/dist.commonjs/hasher/index.js +68 -0
  111. package/dist.commonjs/hex/index.d.ts +24 -0
  112. package/dist.commonjs/hex/index.d.ts.map +1 -0
  113. package/dist.commonjs/hex/index.js +20 -0
  114. package/dist.commonjs/index.d.ts +3 -0
  115. package/dist.commonjs/index.d.ts.map +1 -0
  116. package/dist.commonjs/index.js +31 -0
  117. package/dist.commonjs/num/index.d.ts +112 -0
  118. package/dist.commonjs/num/index.d.ts.map +1 -0
  119. package/dist.commonjs/num/index.js +139 -0
  120. package/dist.commonjs/signer/btc/index.d.ts +3 -0
  121. package/dist.commonjs/signer/btc/index.d.ts.map +1 -0
  122. package/dist.commonjs/signer/btc/index.js +18 -0
  123. package/dist.commonjs/signer/btc/signerBtc.d.ts +50 -0
  124. package/dist.commonjs/signer/btc/signerBtc.d.ts.map +1 -0
  125. package/dist.commonjs/signer/btc/signerBtc.js +71 -0
  126. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.d.ts +60 -0
  127. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.d.ts.map +1 -0
  128. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.js +72 -0
  129. package/dist.commonjs/signer/ckb/index.d.ts +2 -0
  130. package/dist.commonjs/signer/ckb/index.d.ts.map +1 -0
  131. package/dist.commonjs/signer/ckb/index.js +17 -0
  132. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.d.ts +59 -0
  133. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.d.ts.map +1 -0
  134. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.js +71 -0
  135. package/dist.commonjs/signer/evm/index.d.ts +3 -0
  136. package/dist.commonjs/signer/evm/index.d.ts.map +1 -0
  137. package/dist.commonjs/signer/evm/index.js +18 -0
  138. package/dist.commonjs/signer/evm/signerEvm.d.ts +46 -0
  139. package/dist.commonjs/signer/evm/signerEvm.d.ts.map +1 -0
  140. package/dist.commonjs/signer/evm/signerEvm.js +83 -0
  141. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.d.ts +52 -0
  142. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.d.ts.map +1 -0
  143. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.js +62 -0
  144. package/dist.commonjs/signer/helpers.d.ts +40 -0
  145. package/dist.commonjs/signer/helpers.d.ts.map +1 -0
  146. package/dist.commonjs/signer/helpers.js +96 -0
  147. package/dist.commonjs/signer/index.d.ts +6 -0
  148. package/dist.commonjs/signer/index.d.ts.map +1 -0
  149. package/dist.commonjs/signer/index.js +21 -0
  150. package/dist.commonjs/signer/signer.d.ts +125 -0
  151. package/dist.commonjs/signer/signer.d.ts.map +1 -0
  152. package/dist.commonjs/signer/signer.js +109 -0
  153. package/dist.commonjs/tsconfig.commonjs.tsbuildinfo +1 -0
  154. package/dist.commonjs/utils/index.d.ts +7 -0
  155. package/dist.commonjs/utils/index.d.ts.map +1 -0
  156. package/dist.commonjs/utils/index.js +10 -0
  157. package/package.json +20 -7
  158. package/src/signer/btc/signerBtcPublicKeyReadonly.ts +18 -0
  159. package/src/signer/ckb/signerCkbScriptReadonly.ts +18 -0
  160. package/src/signer/evm/signerEvm.ts +55 -12
  161. package/src/signer/evm/signerEvmAddressReadonly.ts +19 -1
  162. package/src/signer/helpers.ts +5 -3
  163. package/src/signer/signer.ts +20 -3
  164. package/tsconfig.base.json +21 -0
  165. package/tsconfig.commonjs.json +8 -0
@@ -0,0 +1,18 @@
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("./signerBtc"), exports);
18
+ __exportStar(require("./signerBtcPublicKeyReadonly"), exports);
@@ -0,0 +1,50 @@
1
+ import { Address } from "../../address";
2
+ import { Transaction, TransactionLike } from "../../ckb";
3
+ import { HexLike } from "../../hex";
4
+ import { Signer } from "../signer";
5
+ /**
6
+ * An abstract class extending the Signer class for Bitcoin-like signing operations.
7
+ * This class provides methods to get Bitcoin account, public key, and internal address,
8
+ * as well as signing transactions.
9
+ */
10
+ export declare abstract class SignerBtc extends Signer {
11
+ /**
12
+ * Gets the Bitcoin account associated with the signer.
13
+ *
14
+ * @returns A promise that resolves to a string representing the Bitcoin account.
15
+ */
16
+ abstract getBtcAccount(): Promise<string>;
17
+ /**
18
+ * Gets the Bitcoin public key associated with the signer.
19
+ *
20
+ * @returns A promise that resolves to a HexLike value representing the Bitcoin public key.
21
+ */
22
+ abstract getBtcPublicKey(): Promise<HexLike>;
23
+ /**
24
+ * Gets the internal address, which is the Bitcoin account in this case.
25
+ *
26
+ * @returns A promise that resolves to a string representing the internal address.
27
+ */
28
+ getInternalAddress(): Promise<string>;
29
+ /**
30
+ * Gets an array of Address objects representing the known script addresses for the signer.
31
+ *
32
+ * @returns A promise that resolves to an array of Address objects.
33
+ */
34
+ getAddressObjs(): Promise<Address[]>;
35
+ /**
36
+ * prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
37
+ *
38
+ * @param txLike - The transaction to prepare, represented as a TransactionLike object.
39
+ * @returns A promise that resolves to the prepared Transaction object.
40
+ */
41
+ prepareTransaction(txLike: TransactionLike): Promise<Transaction>;
42
+ /**
43
+ * Signs a transaction without modifying it.
44
+ *
45
+ * @param txLike - The transaction to sign, represented as a TransactionLike object.
46
+ * @returns A promise that resolves to a signed Transaction object.
47
+ */
48
+ signOnlyTransaction(txLike: TransactionLike): Promise<Transaction>;
49
+ }
50
+ //# sourceMappingURL=signerBtc.d.ts.map
@@ -0,0 +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;AAG7C,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;IAKvE;;;;;OAKG;IACG,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CAgCzE"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignerBtc = void 0;
4
+ const ripemd160_1 = require("@noble/hashes/ripemd160");
5
+ const sha256_1 = require("@noble/hashes/sha256");
6
+ const address_1 = require("../../address");
7
+ const bytes_1 = require("../../bytes");
8
+ const ckb_1 = require("../../ckb");
9
+ const client_1 = require("../../client");
10
+ const hex_1 = require("../../hex");
11
+ const num_1 = require("../../num");
12
+ const helpers_1 = require("../helpers");
13
+ const signer_1 = require("../signer");
14
+ /**
15
+ * An abstract class extending the Signer class for Bitcoin-like signing operations.
16
+ * This class provides methods to get Bitcoin account, public key, and internal address,
17
+ * as well as signing transactions.
18
+ */
19
+ class SignerBtc extends signer_1.Signer {
20
+ /**
21
+ * Gets the internal address, which is the Bitcoin account in this case.
22
+ *
23
+ * @returns A promise that resolves to a string representing the internal address.
24
+ */
25
+ async getInternalAddress() {
26
+ return this.getBtcAccount();
27
+ }
28
+ /**
29
+ * Gets an array of Address objects representing the known script addresses for the signer.
30
+ *
31
+ * @returns A promise that resolves to an array of Address objects.
32
+ */
33
+ async getAddressObjs() {
34
+ const publicKey = await this.getBtcPublicKey();
35
+ const hash = (0, ripemd160_1.ripemd160)((0, sha256_1.sha256)((0, bytes_1.bytesFrom)(publicKey)));
36
+ return [
37
+ await address_1.Address.fromKnownScript(client_1.KnownScript.OmniLock, (0, hex_1.hexFrom)([0x04, ...hash, 0x00]), this.client),
38
+ ];
39
+ }
40
+ /**
41
+ * prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
42
+ *
43
+ * @param txLike - The transaction to prepare, represented as a TransactionLike object.
44
+ * @returns A promise that resolves to the prepared Transaction object.
45
+ */
46
+ async prepareTransaction(txLike) {
47
+ const { script } = await this.getRecommendedAddressObj();
48
+ return (0, helpers_1.prepareSighashAllWitness)(txLike, script, 85, this.client);
49
+ }
50
+ /**
51
+ * Signs a transaction without modifying it.
52
+ *
53
+ * @param txLike - The transaction to sign, represented as a TransactionLike object.
54
+ * @returns A promise that resolves to a signed Transaction object.
55
+ */
56
+ async signOnlyTransaction(txLike) {
57
+ const tx = ckb_1.Transaction.from(txLike);
58
+ const { script } = await this.getRecommendedAddressObj();
59
+ const info = await (0, helpers_1.getSignHashInfo)(tx, script, this.client);
60
+ if (!info) {
61
+ return tx;
62
+ }
63
+ const signature = (0, bytes_1.bytesFrom)(await this.signMessage(`CKB (Bitcoin Layer) transaction: ${info.message}`), "base64");
64
+ signature[0] = 31 + ((signature[0] - 27) % 4);
65
+ const witness = ckb_1.WitnessArgs.fromBytes(tx.witnesses[info.position]);
66
+ witness.lock = (0, hex_1.hexFrom)((0, bytes_1.bytesConcat)((0, num_1.numToBytes)(5 * 4 + signature.length, 4), (0, num_1.numToBytes)(4 * 4, 4), (0, num_1.numToBytes)(5 * 4 + signature.length, 4), (0, num_1.numToBytes)(5 * 4 + signature.length, 4), (0, num_1.numToBytes)(signature.length, 4), signature));
67
+ tx.witnesses[info.position] = (0, hex_1.hexFrom)(witness.toBytes());
68
+ return tx;
69
+ }
70
+ }
71
+ exports.SignerBtc = SignerBtc;
@@ -0,0 +1,60 @@
1
+ import { Client } from "../../client";
2
+ import { Hex, HexLike } from "../../hex";
3
+ import { SignerBtc } from "./signerBtc";
4
+ /**
5
+ * A class extending SignerBtc that provides read-only access to a Bitcoin public key and account.
6
+ * This class does not support signing operations.
7
+ */
8
+ export declare class SignerBtcPublicKeyReadonly extends SignerBtc {
9
+ private readonly account;
10
+ private readonly publicKey;
11
+ /**
12
+ * Creates an instance of SignerBtcPublicKeyReadonly.
13
+ *
14
+ * @param client - The client instance used for communication.
15
+ * @param account - The Bitcoin account associated with the signer.
16
+ * @param publicKey - The public key associated with the signer.
17
+ */
18
+ constructor(client: Client, account: string, publicKey: HexLike);
19
+ /**
20
+ * Construct a new signer with the client replaced.
21
+ *
22
+ * @returns A promise that resolves the new Signer.
23
+ */
24
+ replaceClient(client: Client): Promise<SignerBtcPublicKeyReadonly>;
25
+ /**
26
+ * Connects to the client. This implementation does nothing as the class is read-only.
27
+ *
28
+ * @returns A promise that resolves when the connection is complete.
29
+ */
30
+ connect(): Promise<void>;
31
+ /**
32
+ * Check if the signer is connected.
33
+ *
34
+ * @returns A promise that resolves the connection status.
35
+ */
36
+ isConnected(): Promise<boolean>;
37
+ /**
38
+ * Gets the Bitcoin account associated with the signer.
39
+ *
40
+ * @returns A promise that resolves to a string representing the Bitcoin account.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const account = await signer.getBtcAccount(); // Outputs the Bitcoin account
45
+ * ```
46
+ */
47
+ getBtcAccount(): Promise<string>;
48
+ /**
49
+ * Gets the Bitcoin public key associated with the signer.
50
+ *
51
+ * @returns A promise that resolves to a Hex string representing the Bitcoin public key.
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * const publicKey = await signer.getBtcPublicKey(); // Outputs the Bitcoin public key
56
+ * ```
57
+ */
58
+ getBtcPublicKey(): Promise<Hex>;
59
+ }
60
+ //# sourceMappingURL=signerBtcPublicKeyReadonly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signerBtcPublicKeyReadonly.d.ts","sourceRoot":"","sources":["../../../src/signer/btc/signerBtcPublicKeyReadonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,SAAS;IAYrD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAX1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAM;IAEhC;;;;;;OAMG;gBAED,MAAM,EAAE,MAAM,EACG,OAAO,EAAE,MAAM,EAChC,SAAS,EAAE,OAAO;IAOpB;;;;OAIG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAIxE;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC;;;;;;;;;OASG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAItC;;;;;;;;;OASG;IACG,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC;CAGtC"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignerBtcPublicKeyReadonly = void 0;
4
+ const hex_1 = require("../../hex");
5
+ const signerBtc_1 = require("./signerBtc");
6
+ /**
7
+ * A class extending SignerBtc that provides read-only access to a Bitcoin public key and account.
8
+ * This class does not support signing operations.
9
+ */
10
+ class SignerBtcPublicKeyReadonly extends signerBtc_1.SignerBtc {
11
+ /**
12
+ * Creates an instance of SignerBtcPublicKeyReadonly.
13
+ *
14
+ * @param client - The client instance used for communication.
15
+ * @param account - The Bitcoin account associated with the signer.
16
+ * @param publicKey - The public key associated with the signer.
17
+ */
18
+ constructor(client, account, publicKey) {
19
+ super(client);
20
+ this.account = account;
21
+ this.publicKey = (0, hex_1.hexFrom)(publicKey);
22
+ }
23
+ /**
24
+ * Construct a new signer with the client replaced.
25
+ *
26
+ * @returns A promise that resolves the new Signer.
27
+ */
28
+ async replaceClient(client) {
29
+ return new SignerBtcPublicKeyReadonly(client, this.account, this.publicKey);
30
+ }
31
+ /**
32
+ * Connects to the client. This implementation does nothing as the class is read-only.
33
+ *
34
+ * @returns A promise that resolves when the connection is complete.
35
+ */
36
+ async connect() { }
37
+ /**
38
+ * Check if the signer is connected.
39
+ *
40
+ * @returns A promise that resolves the connection status.
41
+ */
42
+ async isConnected() {
43
+ return true;
44
+ }
45
+ /**
46
+ * Gets the Bitcoin account associated with the signer.
47
+ *
48
+ * @returns A promise that resolves to a string representing the Bitcoin account.
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const account = await signer.getBtcAccount(); // Outputs the Bitcoin account
53
+ * ```
54
+ */
55
+ async getBtcAccount() {
56
+ return this.account;
57
+ }
58
+ /**
59
+ * Gets the Bitcoin public key associated with the signer.
60
+ *
61
+ * @returns A promise that resolves to a Hex string representing the Bitcoin public key.
62
+ *
63
+ * @example
64
+ * ```typescript
65
+ * const publicKey = await signer.getBtcPublicKey(); // Outputs the Bitcoin public key
66
+ * ```
67
+ */
68
+ async getBtcPublicKey() {
69
+ return this.publicKey;
70
+ }
71
+ }
72
+ exports.SignerBtcPublicKeyReadonly = SignerBtcPublicKeyReadonly;
@@ -0,0 +1,2 @@
1
+ export * from "./signerCkbScriptReadonly";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/signer/ckb/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,17 @@
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("./signerCkbScriptReadonly"), exports);
@@ -0,0 +1,59 @@
1
+ import { Address } from "../../address";
2
+ import { ScriptLike } from "../../ckb";
3
+ import { Client } from "../../client";
4
+ import { Signer } from "../signer";
5
+ /**
6
+ * A class extending Signer that provides read-only access to a CKB script.
7
+ * This class does not support signing operations.
8
+ */
9
+ export declare class SignerCkbScriptReadonly extends Signer {
10
+ private readonly script;
11
+ /**
12
+ * Creates an instance of SignerCkbScriptReadonly.
13
+ *
14
+ * @param client - The client instance used for communication.
15
+ * @param script - The script associated with the signer.
16
+ */
17
+ constructor(client: Client, script: ScriptLike);
18
+ /**
19
+ * Construct a new signer with the client replaced.
20
+ *
21
+ * @returns A promise that resolves the new Signer.
22
+ */
23
+ replaceClient(client: Client): Promise<SignerCkbScriptReadonly>;
24
+ /**
25
+ * Connects to the client. This implementation does nothing as the class is read-only.
26
+ *
27
+ * @returns A promise that resolves when the connection is complete.
28
+ */
29
+ connect(): Promise<void>;
30
+ /**
31
+ * Check if the signer is connected.
32
+ *
33
+ * @returns A promise that resolves the connection status.
34
+ */
35
+ isConnected(): Promise<boolean>;
36
+ /**
37
+ * Gets the internal address for the script.
38
+ *
39
+ * @returns A promise that resolves to a string representing the internal address.
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const internalAddress = await signer.getInternalAddress(); // Outputs the internal address
44
+ * ```
45
+ */
46
+ getInternalAddress(): Promise<string>;
47
+ /**
48
+ * Gets an array of Address objects representing the script address.
49
+ *
50
+ * @returns A promise that resolves to an array of Address objects.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * const addressObjs = await signer.getAddressObjs(); // Outputs the array of Address objects
55
+ * ```
56
+ */
57
+ getAddressObjs(): Promise<Address[]>;
58
+ }
59
+ //# sourceMappingURL=signerCkbScriptReadonly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signerCkbScriptReadonly.d.ts","sourceRoot":"","sources":["../../../src/signer/ckb/signerCkbScriptReadonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAU,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,MAAM;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;;;;OAKG;gBACS,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;IAM9C;;;;OAIG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIrE;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC;;;;;;;;;OASG;IACG,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C;;;;;;;;;OASG;IAEG,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAG3C"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignerCkbScriptReadonly = void 0;
4
+ const address_1 = require("../../address");
5
+ const ckb_1 = require("../../ckb");
6
+ const signer_1 = require("../signer");
7
+ /**
8
+ * A class extending Signer that provides read-only access to a CKB script.
9
+ * This class does not support signing operations.
10
+ */
11
+ class SignerCkbScriptReadonly extends signer_1.Signer {
12
+ /**
13
+ * Creates an instance of SignerCkbScriptReadonly.
14
+ *
15
+ * @param client - The client instance used for communication.
16
+ * @param script - The script associated with the signer.
17
+ */
18
+ constructor(client, script) {
19
+ super(client);
20
+ this.script = ckb_1.Script.from(script);
21
+ }
22
+ /**
23
+ * Construct a new signer with the client replaced.
24
+ *
25
+ * @returns A promise that resolves the new Signer.
26
+ */
27
+ async replaceClient(client) {
28
+ return new SignerCkbScriptReadonly(client, this.script);
29
+ }
30
+ /**
31
+ * Connects to the client. This implementation does nothing as the class is read-only.
32
+ *
33
+ * @returns A promise that resolves when the connection is complete.
34
+ */
35
+ async connect() { }
36
+ /**
37
+ * Check if the signer is connected.
38
+ *
39
+ * @returns A promise that resolves the connection status.
40
+ */
41
+ async isConnected() {
42
+ return true;
43
+ }
44
+ /**
45
+ * Gets the internal address for the script.
46
+ *
47
+ * @returns A promise that resolves to a string representing the internal address.
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * const internalAddress = await signer.getInternalAddress(); // Outputs the internal address
52
+ * ```
53
+ */
54
+ async getInternalAddress() {
55
+ return this.getRecommendedAddress();
56
+ }
57
+ /**
58
+ * Gets an array of Address objects representing the script address.
59
+ *
60
+ * @returns A promise that resolves to an array of Address objects.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * const addressObjs = await signer.getAddressObjs(); // Outputs the array of Address objects
65
+ * ```
66
+ */
67
+ async getAddressObjs() {
68
+ return [await address_1.Address.fromScript(this.script, this.client)];
69
+ }
70
+ }
71
+ exports.SignerCkbScriptReadonly = SignerCkbScriptReadonly;
@@ -0,0 +1,3 @@
1
+ export * from "./signerEvm";
2
+ export * from "./signerEvmAddressReadonly";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/signer/evm/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,18 @@
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("./signerEvm"), exports);
18
+ __exportStar(require("./signerEvmAddressReadonly"), exports);
@@ -0,0 +1,46 @@
1
+ import { Address } from "../../address";
2
+ import { BytesLike } from "../../bytes";
3
+ import { Script, Transaction, TransactionLike } from "../../ckb";
4
+ import { Signer } from "../signer";
5
+ /**
6
+ * An abstract class extending Signer for Ethereum Virtual Machine (EVM) based signing operations.
7
+ * This class provides methods to get EVM account, internal address, and signing transactions.
8
+ */
9
+ export declare abstract class SignerEvm extends Signer {
10
+ /**
11
+ * Gets the EVM account associated with the signer.
12
+ *
13
+ * @returns A promise that resolves to a string representing the EVM account.
14
+ */
15
+ abstract getEvmAccount(): Promise<string>;
16
+ /**
17
+ * Gets the internal address, which is the EVM account in this case.
18
+ *
19
+ * @returns A promise that resolves to a string representing the internal address.
20
+ */
21
+ getInternalAddress(): Promise<string>;
22
+ /**
23
+ * Gets an array of Address objects representing the known script addresses for the signer.
24
+ *
25
+ * @returns A promise that resolves to an array of Address objects.
26
+ */
27
+ getAddressObjs(): Promise<Address[]>;
28
+ _getOmniLockEvmAddressObj(account: string): Promise<Address>;
29
+ _getOmniLockOldEvmAddressObj(account: string): Promise<Address>;
30
+ /**
31
+ * prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
32
+ *
33
+ * @param txLike - The transaction to prepare, represented as a TransactionLike object.
34
+ * @returns A promise that resolves to the prepared Transaction object.
35
+ */
36
+ prepareTransaction(txLike: TransactionLike): Promise<Transaction>;
37
+ /**
38
+ * Signs a transaction without modifying it.
39
+ *
40
+ * @param txLike - The transaction to sign, represented as a TransactionLike object.
41
+ * @returns A promise that resolves to a signed Transaction object.
42
+ */
43
+ signOnlyTransaction(txLike: TransactionLike): Promise<Transaction>;
44
+ _signOmniLockScriptForTransaction(tx: Transaction, script: Script, messageTransformer: (hash: string) => BytesLike): Promise<Transaction>;
45
+ }
46
+ //# sourceMappingURL=signerEvm.d.ts.map
@@ -0,0 +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;AAK9E,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"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignerEvm = void 0;
4
+ const address_1 = require("../../address");
5
+ const bytes_1 = require("../../bytes");
6
+ const ckb_1 = require("../../ckb");
7
+ const client_1 = require("../../client");
8
+ const hex_1 = require("../../hex");
9
+ const num_1 = require("../../num");
10
+ const helpers_1 = require("../helpers");
11
+ const signer_1 = require("../signer");
12
+ /**
13
+ * An abstract class extending Signer for Ethereum Virtual Machine (EVM) based signing operations.
14
+ * This class provides methods to get EVM account, internal address, and signing transactions.
15
+ */
16
+ class SignerEvm extends signer_1.Signer {
17
+ /**
18
+ * Gets the internal address, which is the EVM account in this case.
19
+ *
20
+ * @returns A promise that resolves to a string representing the internal address.
21
+ */
22
+ async getInternalAddress() {
23
+ return this.getEvmAccount();
24
+ }
25
+ /**
26
+ * Gets an array of Address objects representing the known script addresses for the signer.
27
+ *
28
+ * @returns A promise that resolves to an array of Address objects.
29
+ */
30
+ async getAddressObjs() {
31
+ const account = await this.getEvmAccount();
32
+ return [
33
+ await this._getOmniLockEvmAddressObj(account),
34
+ await this._getOmniLockOldEvmAddressObj(account),
35
+ ];
36
+ }
37
+ async _getOmniLockEvmAddressObj(account) {
38
+ return address_1.Address.fromKnownScript(client_1.KnownScript.OmniLock, (0, hex_1.hexFrom)([0x12, ...(0, bytes_1.bytesFrom)(account), 0x00]), this.client);
39
+ }
40
+ async _getOmniLockOldEvmAddressObj(account) {
41
+ return address_1.Address.fromKnownScript(client_1.KnownScript.OmniLock, (0, hex_1.hexFrom)([0x1, ...(0, bytes_1.bytesFrom)(account), 0x00]), this.client);
42
+ }
43
+ /**
44
+ * prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
45
+ *
46
+ * @param txLike - The transaction to prepare, represented as a TransactionLike object.
47
+ * @returns A promise that resolves to the prepared Transaction object.
48
+ */
49
+ async prepareTransaction(txLike) {
50
+ const addresses = await this.getAddressObjs();
51
+ return addresses.reduce((txPromise, { script }) => txPromise.then((tx) => (0, helpers_1.prepareSighashAllWitness)(tx, script, 85, this.client)), Promise.resolve(ckb_1.Transaction.from(txLike)));
52
+ }
53
+ /**
54
+ * Signs a transaction without modifying it.
55
+ *
56
+ * @param txLike - The transaction to sign, represented as a TransactionLike object.
57
+ * @returns A promise that resolves to a signed Transaction object.
58
+ */
59
+ async signOnlyTransaction(txLike) {
60
+ let tx = ckb_1.Transaction.from(txLike);
61
+ const account = await this.getEvmAccount();
62
+ const { script: evmScript } = await this._getOmniLockEvmAddressObj(account);
63
+ const { script: oldEvmScript } = await this._getOmniLockOldEvmAddressObj(account);
64
+ tx = await this._signOmniLockScriptForTransaction(tx, evmScript, (hash) => `CKB transaction: ${hash}`);
65
+ tx = await this._signOmniLockScriptForTransaction(tx, oldEvmScript, (hash) => (0, bytes_1.bytesFrom)(hash));
66
+ return tx;
67
+ }
68
+ async _signOmniLockScriptForTransaction(tx, script, messageTransformer) {
69
+ const info = await (0, helpers_1.getSignHashInfo)(tx, script, this.client);
70
+ if (!info) {
71
+ return tx;
72
+ }
73
+ const signature = (0, bytes_1.bytesFrom)(await this.signMessage(messageTransformer(info.message)));
74
+ if (signature[signature.length - 1] >= 27) {
75
+ signature[signature.length - 1] -= 27;
76
+ }
77
+ const witness = ckb_1.WitnessArgs.fromBytes(tx.witnesses[info.position]);
78
+ witness.lock = (0, hex_1.hexFrom)((0, bytes_1.bytesConcat)((0, num_1.numToBytes)(5 * 4 + signature.length, 4), (0, num_1.numToBytes)(4 * 4, 4), (0, num_1.numToBytes)(5 * 4 + signature.length, 4), (0, num_1.numToBytes)(5 * 4 + signature.length, 4), (0, num_1.numToBytes)(signature.length, 4), signature));
79
+ tx.witnesses[info.position] = (0, hex_1.hexFrom)(witness.toBytes());
80
+ return tx;
81
+ }
82
+ }
83
+ exports.SignerEvm = SignerEvm;
@@ -0,0 +1,52 @@
1
+ import { Client } from "../../client";
2
+ import { HexLike } from "../../hex";
3
+ import { SignerEvm } from "./signerEvm";
4
+ /**
5
+ * A class extending SignerEvm that provides read-only access to an EVM address.
6
+ * This class does not support signing operations.
7
+ */
8
+ export declare class SignerEvmAddressReadonly extends SignerEvm {
9
+ private readonly address;
10
+ /**
11
+ * Creates an instance of SignerEvmAddressReadonly.
12
+ *
13
+ * @param client - The client instance used for communication.
14
+ * @param address - The EVM address associated with the signer.
15
+ */
16
+ constructor(client: Client, address: HexLike);
17
+ /**
18
+ * Construct a new signer with the client replaced.
19
+ *
20
+ * @returns A promise that resolves the new Signer.
21
+ */
22
+ replaceClient(client: Client): Promise<SignerEvmAddressReadonly>;
23
+ /**
24
+ * Connects to the client. This implementation does nothing as the class is read-only.
25
+ *
26
+ * @returns A promise that resolves when the connection is complete.
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * await signer.connect();
31
+ * ```
32
+ */
33
+ connect(): Promise<void>;
34
+ /**
35
+ * Check if the signer is connected.
36
+ *
37
+ * @returns A promise that resolves the connection status.
38
+ */
39
+ isConnected(): Promise<boolean>;
40
+ /**
41
+ * Gets the EVM account associated with the signer.
42
+ *
43
+ * @returns A promise that resolves to a string representing the EVM account.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const account = await signer.getEvmAccount(); // Outputs the EVM account
48
+ * ```
49
+ */
50
+ getEvmAccount(): Promise<string>;
51
+ }
52
+ //# sourceMappingURL=signerEvmAddressReadonly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signerEvmAddressReadonly.d.ts","sourceRoot":"","sources":["../../../src/signer/evm/signerEvmAddressReadonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAO,OAAO,EAAW,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAM;IAE9B;;;;;OAKG;gBACS,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAM5C;;;;OAIG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAItE;;;;;;;;;OASG;IAEG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC;;;;;;;;;OASG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;CAGvC"}