@ckb-ccc/core 0.0.5-alpha.1 → 0.0.5-alpha.10

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 (229) hide show
  1. package/dist/address/index.d.ts +1 -1
  2. package/dist/address/index.d.ts.map +1 -1
  3. package/dist/address/index.js +4 -4
  4. package/dist/ckb/transaction.d.ts +2 -2
  5. package/dist/ckb/transaction.d.ts.map +1 -1
  6. package/dist/ckb/transaction.js +2 -3
  7. package/dist/client/client.d.ts +2 -2
  8. package/dist/client/client.d.ts.map +1 -1
  9. package/dist/client/client.js +2 -1
  10. package/dist/client/clientPublicMainnet.d.ts +1 -1
  11. package/dist/client/clientPublicMainnet.d.ts.map +1 -1
  12. package/dist/client/clientPublicMainnet.js +1 -1
  13. package/dist/client/clientPublicTestnet.d.ts +1 -1
  14. package/dist/client/clientPublicTestnet.d.ts.map +1 -1
  15. package/dist/client/clientPublicTestnet.js +1 -1
  16. package/dist/client/jsonRpc/index.d.ts +3 -3
  17. package/dist/client/jsonRpc/index.d.ts.map +1 -1
  18. package/dist/client/jsonRpc/index.js +4 -4
  19. package/dist/signer/btc/index.d.ts +1 -0
  20. package/dist/signer/btc/index.d.ts.map +1 -1
  21. package/dist/signer/btc/index.js +1 -0
  22. package/dist/signer/btc/signerBtc.d.ts +9 -1
  23. package/dist/signer/btc/signerBtc.d.ts.map +1 -1
  24. package/dist/signer/btc/signerBtc.js +19 -3
  25. package/dist/signer/btc/signerBtcPublicKeyReadonly.d.ts +0 -6
  26. package/dist/signer/btc/signerBtcPublicKeyReadonly.d.ts.map +1 -1
  27. package/dist/signer/btc/signerBtcPublicKeyReadonly.js +0 -8
  28. package/dist/signer/btc/verify.d.ts +3 -0
  29. package/dist/signer/btc/verify.d.ts.map +1 -0
  30. package/dist/signer/btc/verify.js +6 -0
  31. package/dist/signer/ckb/index.d.ts +1 -0
  32. package/dist/signer/ckb/index.d.ts.map +1 -1
  33. package/dist/signer/ckb/index.js +1 -0
  34. package/dist/signer/ckb/signerCkbScriptReadonly.d.ts +3 -7
  35. package/dist/signer/ckb/signerCkbScriptReadonly.d.ts.map +1 -1
  36. package/dist/signer/ckb/signerCkbScriptReadonly.js +8 -10
  37. package/dist/signer/ckb/verifyJoyId.d.ts +3 -0
  38. package/dist/signer/ckb/verifyJoyId.d.ts.map +1 -0
  39. package/dist/signer/ckb/verifyJoyId.js +12 -0
  40. package/dist/signer/dummy/alwaysError.d.ts +9 -0
  41. package/dist/signer/dummy/alwaysError.d.ts.map +1 -0
  42. package/dist/signer/dummy/alwaysError.js +10 -0
  43. package/dist/signer/dummy/dummy.d.ts +12 -0
  44. package/dist/signer/dummy/dummy.d.ts.map +1 -0
  45. package/dist/signer/dummy/dummy.js +19 -0
  46. package/dist/signer/dummy/index.d.ts +4 -0
  47. package/dist/signer/dummy/index.d.ts.map +1 -0
  48. package/dist/signer/dummy/index.js +3 -0
  49. package/dist/signer/dummy/openLink.d.ts +9 -0
  50. package/dist/signer/dummy/openLink.d.ts.map +1 -0
  51. package/dist/signer/dummy/openLink.js +10 -0
  52. package/dist/signer/evm/index.d.ts +1 -0
  53. package/dist/signer/evm/index.d.ts.map +1 -1
  54. package/dist/signer/evm/index.js +1 -0
  55. package/dist/signer/evm/signerEvm.d.ts +3 -1
  56. package/dist/signer/evm/signerEvm.d.ts.map +1 -1
  57. package/dist/signer/evm/signerEvm.js +10 -4
  58. package/dist/signer/evm/signerEvmAddressReadonly.d.ts +0 -6
  59. package/dist/signer/evm/signerEvmAddressReadonly.d.ts.map +1 -1
  60. package/dist/signer/evm/signerEvmAddressReadonly.js +0 -8
  61. package/dist/signer/evm/verify.d.ts +3 -0
  62. package/dist/signer/evm/verify.d.ts.map +1 -0
  63. package/dist/signer/evm/verify.js +6 -0
  64. package/dist/signer/index.d.ts +1 -0
  65. package/dist/signer/index.d.ts.map +1 -1
  66. package/dist/signer/index.js +1 -0
  67. package/{dist.commonjs/signer/signer.d.ts → dist/signer/signer/index.d.ts} +69 -25
  68. package/dist/signer/signer/index.d.ts.map +1 -0
  69. package/dist/signer/{signer.js → signer/index.js} +101 -16
  70. package/dist/utils/index.d.ts +60 -0
  71. package/dist/utils/index.d.ts.map +1 -1
  72. package/dist/utils/index.js +20 -0
  73. package/dist.commonjs/address/address.advanced.d.ts +29 -24
  74. package/dist.commonjs/address/address.advanced.js +114 -92
  75. package/dist.commonjs/address/advanced.d.ts +1 -1
  76. package/dist.commonjs/address/advanced.js +30 -14
  77. package/dist.commonjs/address/index.d.ts +51 -44
  78. package/dist.commonjs/address/index.d.ts.map +1 -1
  79. package/dist.commonjs/address/index.js +87 -68
  80. package/dist.commonjs/advanced.d.ts +1 -1
  81. package/dist.commonjs/advanced.js +47 -22
  82. package/dist.commonjs/advancedBarrel.d.ts +1 -1
  83. package/dist.commonjs/advancedBarrel.js +30 -14
  84. package/dist.commonjs/barrel.d.ts +1 -1
  85. package/dist.commonjs/barrel.js +30 -14
  86. package/dist.commonjs/bytes/advanced.d.ts +11 -2
  87. package/dist.commonjs/bytes/index.d.ts +9 -3
  88. package/dist.commonjs/bytes/index.js +28 -26
  89. package/dist.commonjs/ckb/advanced.d.ts +1 -1
  90. package/dist.commonjs/ckb/advanced.js +47 -22
  91. package/dist.commonjs/ckb/index.d.ts +1 -1
  92. package/dist.commonjs/ckb/index.js +30 -14
  93. package/dist.commonjs/ckb/molecule.advanced/generated.d.ts +420 -260
  94. package/dist.commonjs/ckb/molecule.advanced/generated.js +1536 -1332
  95. package/dist.commonjs/ckb/molecule.advanced/index.d.ts +3 -3
  96. package/dist.commonjs/ckb/molecule.advanced/index.js +34 -18
  97. package/dist.commonjs/ckb/script.advanced.d.ts +1 -1
  98. package/dist.commonjs/ckb/script.advanced.js +12 -9
  99. package/dist.commonjs/ckb/script.d.ts +76 -76
  100. package/dist.commonjs/ckb/script.js +166 -126
  101. package/dist.commonjs/ckb/transaction.advanced.d.ts +1 -1
  102. package/dist.commonjs/ckb/transaction.advanced.js +4 -4
  103. package/dist.commonjs/ckb/transaction.d.ts +570 -532
  104. package/dist.commonjs/ckb/transaction.d.ts.map +1 -1
  105. package/dist.commonjs/ckb/transaction.js +839 -723
  106. package/dist.commonjs/client/advanced.d.ts +1 -1
  107. package/dist.commonjs/client/advanced.js +30 -14
  108. package/dist.commonjs/client/client.d.ts +52 -21
  109. package/dist.commonjs/client/client.d.ts.map +1 -1
  110. package/dist.commonjs/client/client.js +67 -57
  111. package/dist.commonjs/client/clientPublicMainnet.advanced.d.ts +5 -2
  112. package/dist.commonjs/client/clientPublicMainnet.advanced.js +30 -24
  113. package/dist.commonjs/client/clientPublicMainnet.d.ts +6 -4
  114. package/dist.commonjs/client/clientPublicMainnet.d.ts.map +1 -1
  115. package/dist.commonjs/client/clientPublicMainnet.js +9 -9
  116. package/dist.commonjs/client/clientPublicTestnet.advanced.d.ts +5 -2
  117. package/dist.commonjs/client/clientPublicTestnet.advanced.js +30 -24
  118. package/dist.commonjs/client/clientPublicTestnet.d.ts +6 -4
  119. package/dist.commonjs/client/clientPublicTestnet.d.ts.map +1 -1
  120. package/dist.commonjs/client/clientPublicTestnet.js +9 -9
  121. package/dist.commonjs/client/clientTypes.d.ts +51 -36
  122. package/dist.commonjs/client/clientTypes.js +34 -19
  123. package/dist.commonjs/client/index.d.ts +1 -1
  124. package/dist.commonjs/client/index.js +30 -14
  125. package/dist.commonjs/client/jsonRpc/advanced.d.ts +1 -1
  126. package/dist.commonjs/client/jsonRpc/advanced.js +30 -14
  127. package/dist.commonjs/client/jsonRpc/index.d.ts +92 -75
  128. package/dist.commonjs/client/jsonRpc/index.d.ts.map +1 -1
  129. package/dist.commonjs/client/jsonRpc/index.js +135 -108
  130. package/dist.commonjs/client/jsonRpc/transformers.d.ts +78 -38
  131. package/dist.commonjs/client/jsonRpc/transformers.js +175 -150
  132. package/dist.commonjs/client/jsonRpc/types.d.ts +38 -38
  133. package/dist.commonjs/fixedPoint/index.d.ts +9 -3
  134. package/dist.commonjs/fixedPoint/index.js +26 -20
  135. package/dist.commonjs/fixedPoint/index.test.d.ts +1 -1
  136. package/dist.commonjs/fixedPoint/index.test.js +42 -36
  137. package/dist.commonjs/hasher/advanced.d.ts +1 -1
  138. package/dist.commonjs/hasher/index.d.ts +36 -36
  139. package/dist.commonjs/hasher/index.js +52 -45
  140. package/dist.commonjs/hex/index.d.ts +1 -1
  141. package/dist.commonjs/hex/index.js +1 -1
  142. package/dist.commonjs/index.d.ts +1 -1
  143. package/dist.commonjs/index.js +47 -22
  144. package/dist.commonjs/num/index.d.ts +1 -1
  145. package/dist.commonjs/num/index.js +30 -19
  146. package/dist.commonjs/signer/btc/index.d.ts +2 -1
  147. package/dist.commonjs/signer/btc/index.d.ts.map +1 -1
  148. package/dist.commonjs/signer/btc/index.js +31 -14
  149. package/dist.commonjs/signer/btc/signerBtc.d.ts +48 -40
  150. package/dist.commonjs/signer/btc/signerBtc.d.ts.map +1 -1
  151. package/dist.commonjs/signer/btc/signerBtc.js +85 -49
  152. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.d.ts +45 -51
  153. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.d.ts.map +1 -1
  154. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.js +52 -60
  155. package/dist.commonjs/signer/btc/verify.d.ts +7 -0
  156. package/dist.commonjs/signer/btc/verify.d.ts.map +1 -0
  157. package/dist.commonjs/signer/btc/verify.js +13 -0
  158. package/dist.commonjs/signer/ckb/index.d.ts +2 -1
  159. package/dist.commonjs/signer/ckb/index.d.ts.map +1 -1
  160. package/dist.commonjs/signer/ckb/index.js +31 -14
  161. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.d.ts +46 -50
  162. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.d.ts.map +1 -1
  163. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.js +56 -58
  164. package/dist.commonjs/signer/ckb/verifyJoyId.d.ts +7 -0
  165. package/dist.commonjs/signer/ckb/verifyJoyId.d.ts.map +1 -0
  166. package/dist.commonjs/signer/ckb/verifyJoyId.js +19 -0
  167. package/dist.commonjs/signer/dummy/alwaysError.d.ts +9 -0
  168. package/dist.commonjs/signer/dummy/alwaysError.d.ts.map +1 -0
  169. package/dist.commonjs/signer/dummy/alwaysError.js +14 -0
  170. package/dist.commonjs/signer/dummy/dummy.d.ts +12 -0
  171. package/dist.commonjs/signer/dummy/dummy.d.ts.map +1 -0
  172. package/dist.commonjs/signer/dummy/dummy.js +23 -0
  173. package/dist.commonjs/signer/dummy/index.d.ts +4 -0
  174. package/dist.commonjs/signer/dummy/index.d.ts.map +1 -0
  175. package/dist.commonjs/signer/dummy/index.js +35 -0
  176. package/dist.commonjs/signer/dummy/openLink.d.ts +9 -0
  177. package/dist.commonjs/signer/dummy/openLink.d.ts.map +1 -0
  178. package/dist.commonjs/signer/dummy/openLink.js +14 -0
  179. package/dist.commonjs/signer/evm/index.d.ts +2 -1
  180. package/dist.commonjs/signer/evm/index.d.ts.map +1 -1
  181. package/dist.commonjs/signer/evm/index.js +31 -14
  182. package/dist.commonjs/signer/evm/signerEvm.d.ts +43 -37
  183. package/dist.commonjs/signer/evm/signerEvm.d.ts.map +1 -1
  184. package/dist.commonjs/signer/evm/signerEvm.js +101 -63
  185. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.d.ts +37 -43
  186. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.d.ts.map +1 -1
  187. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.js +42 -50
  188. package/dist.commonjs/signer/evm/verify.d.ts +7 -0
  189. package/dist.commonjs/signer/evm/verify.d.ts.map +1 -0
  190. package/dist.commonjs/signer/evm/verify.js +15 -0
  191. package/dist.commonjs/signer/index.d.ts +2 -1
  192. package/dist.commonjs/signer/index.d.ts.map +1 -1
  193. package/dist.commonjs/signer/index.js +31 -14
  194. package/dist.commonjs/signer/signer/index.d.ts +190 -0
  195. package/dist.commonjs/signer/signer/index.d.ts.map +1 -0
  196. package/dist.commonjs/signer/signer/index.js +234 -0
  197. package/dist.commonjs/utils/index.d.ts +94 -6
  198. package/dist.commonjs/utils/index.d.ts.map +1 -1
  199. package/dist.commonjs/utils/index.js +33 -5
  200. package/package.json +6 -3
  201. package/src/address/index.ts +4 -7
  202. package/src/ckb/transaction.ts +4 -5
  203. package/src/client/client.ts +7 -6
  204. package/src/client/clientPublicMainnet.ts +1 -1
  205. package/src/client/clientPublicTestnet.ts +1 -1
  206. package/src/client/jsonRpc/index.ts +3 -3
  207. package/src/signer/btc/index.ts +1 -0
  208. package/src/signer/btc/signerBtc.ts +22 -7
  209. package/src/signer/btc/signerBtcPublicKeyReadonly.ts +0 -9
  210. package/src/signer/btc/verify.ts +14 -0
  211. package/src/signer/ckb/index.ts +1 -0
  212. package/src/signer/ckb/signerCkbScriptReadonly.ts +10 -11
  213. package/src/signer/ckb/verifyJoyId.ts +20 -0
  214. package/src/signer/dummy/alwaysError.ts +17 -0
  215. package/src/signer/dummy/dummy.ts +28 -0
  216. package/src/signer/dummy/index.ts +3 -0
  217. package/src/signer/dummy/openLink.ts +17 -0
  218. package/src/signer/evm/index.ts +1 -0
  219. package/src/signer/evm/signerEvm.ts +16 -10
  220. package/src/signer/evm/signerEvmAddressReadonly.ts +0 -9
  221. package/src/signer/evm/verify.ts +16 -0
  222. package/src/signer/index.ts +1 -0
  223. package/src/signer/{signer.ts → signer/index.ts} +135 -25
  224. package/src/utils/index.ts +108 -0
  225. package/dist/signer/signer.d.ts +0 -140
  226. package/dist/signer/signer.d.ts.map +0 -1
  227. package/dist.commonjs/signer/signer.d.ts.map +0 -1
  228. package/dist.commonjs/signer/signer.js +0 -125
  229. package/dist.commonjs/tsconfig.commonjs.tsbuildinfo +0 -1
@@ -7,76 +7,114 @@ const ckb_1 = require("../../ckb");
7
7
  const client_1 = require("../../client");
8
8
  const hex_1 = require("../../hex");
9
9
  const num_1 = require("../../num");
10
+ const utils_1 = require("../../utils");
10
11
  const signer_1 = require("../signer");
11
12
  /**
12
13
  * An abstract class extending Signer for Ethereum Virtual Machine (EVM) based signing operations.
13
14
  * This class provides methods to get EVM account, internal address, and signing transactions.
14
15
  */
15
16
  class SignerEvm extends signer_1.Signer {
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
- async getInternalAddress() {
22
- return this.getEvmAccount();
17
+ get type() {
18
+ return signer_1.SignerType.EVM;
19
+ }
20
+ get signType() {
21
+ return signer_1.SignerSignType.EvmPersonal;
22
+ }
23
+ /**
24
+ * Gets the internal address, which is the EVM account in this case.
25
+ *
26
+ * @returns A promise that resolves to a string representing the internal address.
27
+ */
28
+ async getInternalAddress() {
29
+ return this.getEvmAccount();
30
+ }
31
+ /**
32
+ * Gets an array of Address objects representing the known script addresses for the signer.
33
+ *
34
+ * @returns A promise that resolves to an array of Address objects.
35
+ */
36
+ async getAddressObjs() {
37
+ const account = await this.getEvmAccount();
38
+ return [
39
+ await this._getOmniLockEvmAddressObj(account),
40
+ await this._getOmniLockOldEvmAddressObj(account),
41
+ ];
42
+ }
43
+ async _getOmniLockEvmAddressObj(account) {
44
+ return address_1.Address.fromKnownScript(
45
+ client_1.KnownScript.OmniLock,
46
+ (0, hex_1.hexFrom)([0x12, ...(0, bytes_1.bytesFrom)(account), 0x00]),
47
+ this.client,
48
+ );
49
+ }
50
+ async _getOmniLockOldEvmAddressObj(account) {
51
+ return address_1.Address.fromKnownScript(
52
+ client_1.KnownScript.OmniLock,
53
+ (0, hex_1.hexFrom)([0x1, ...(0, bytes_1.bytesFrom)(account), 0x00]),
54
+ this.client,
55
+ );
56
+ }
57
+ /**
58
+ * prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
59
+ *
60
+ * @param txLike - The transaction to prepare, represented as a TransactionLike object.
61
+ * @returns A promise that resolves to the prepared Transaction object.
62
+ */
63
+ async prepareTransaction(txLike) {
64
+ return (0, utils_1.reduceAsync)(
65
+ await this.getAddressObjs(),
66
+ (tx, { script }) => tx.prepareSighashAllWitness(script, 85, this.client),
67
+ ckb_1.Transaction.from(txLike),
68
+ );
69
+ }
70
+ /**
71
+ * Signs a transaction without modifying it.
72
+ *
73
+ * @param txLike - The transaction to sign, represented as a TransactionLike object.
74
+ * @returns A promise that resolves to a signed Transaction object.
75
+ */
76
+ async signOnlyTransaction(txLike) {
77
+ let tx = ckb_1.Transaction.from(txLike);
78
+ const account = await this.getEvmAccount();
79
+ const { script: evmScript } = await this._getOmniLockEvmAddressObj(account);
80
+ const { script: oldEvmScript } =
81
+ await this._getOmniLockOldEvmAddressObj(account);
82
+ tx = await this._signOmniLockScriptForTransaction(
83
+ tx,
84
+ evmScript,
85
+ (hash) => `CKB transaction: ${hash}`,
86
+ );
87
+ tx = await this._signOmniLockScriptForTransaction(
88
+ tx,
89
+ oldEvmScript,
90
+ (hash) => (0, bytes_1.bytesFrom)(hash),
91
+ );
92
+ return tx;
93
+ }
94
+ async _signOmniLockScriptForTransaction(tx, script, messageTransformer) {
95
+ const info = await tx.getSignHashInfo(script, this.client);
96
+ if (!info) {
97
+ return tx;
23
98
  }
24
- /**
25
- * Gets an array of Address objects representing the known script addresses for the signer.
26
- *
27
- * @returns A promise that resolves to an array of Address objects.
28
- */
29
- async getAddressObjs() {
30
- const account = await this.getEvmAccount();
31
- return [
32
- await this._getOmniLockEvmAddressObj(account),
33
- await this._getOmniLockOldEvmAddressObj(account),
34
- ];
35
- }
36
- async _getOmniLockEvmAddressObj(account) {
37
- return address_1.Address.fromKnownScript(client_1.KnownScript.OmniLock, (0, hex_1.hexFrom)([0x12, ...(0, bytes_1.bytesFrom)(account), 0x00]), this.client);
38
- }
39
- async _getOmniLockOldEvmAddressObj(account) {
40
- return address_1.Address.fromKnownScript(client_1.KnownScript.OmniLock, (0, hex_1.hexFrom)([0x1, ...(0, bytes_1.bytesFrom)(account), 0x00]), this.client);
41
- }
42
- /**
43
- * prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
44
- *
45
- * @param txLike - The transaction to prepare, represented as a TransactionLike object.
46
- * @returns A promise that resolves to the prepared Transaction object.
47
- */
48
- async prepareTransaction(txLike) {
49
- const addresses = await this.getAddressObjs();
50
- return addresses.reduce((txPromise, { script }) => txPromise.then((tx) => tx.prepareSighashAllWitness(script, 85, this.client)), Promise.resolve(ckb_1.Transaction.from(txLike)));
51
- }
52
- /**
53
- * Signs a transaction without modifying it.
54
- *
55
- * @param txLike - The transaction to sign, represented as a TransactionLike object.
56
- * @returns A promise that resolves to a signed Transaction object.
57
- */
58
- async signOnlyTransaction(txLike) {
59
- let tx = ckb_1.Transaction.from(txLike);
60
- const account = await this.getEvmAccount();
61
- const { script: evmScript } = await this._getOmniLockEvmAddressObj(account);
62
- const { script: oldEvmScript } = await this._getOmniLockOldEvmAddressObj(account);
63
- tx = await this._signOmniLockScriptForTransaction(tx, evmScript, (hash) => `CKB transaction: ${hash}`);
64
- tx = await this._signOmniLockScriptForTransaction(tx, oldEvmScript, (hash) => (0, bytes_1.bytesFrom)(hash));
65
- return tx;
66
- }
67
- async _signOmniLockScriptForTransaction(tx, script, messageTransformer) {
68
- const info = await tx.getSignHashInfo(script, this.client);
69
- if (!info) {
70
- return tx;
71
- }
72
- const signature = (0, bytes_1.bytesFrom)(await this.signMessage(messageTransformer(info.message)));
73
- if (signature[signature.length - 1] >= 27) {
74
- signature[signature.length - 1] -= 27;
75
- }
76
- const witness = ckb_1.WitnessArgs.fromBytes(tx.witnesses[info.position]);
77
- 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));
78
- tx.witnesses[info.position] = (0, hex_1.hexFrom)(witness.toBytes());
79
- return tx;
99
+ const signature = (0, bytes_1.bytesFrom)(
100
+ await this.signMessageRaw(messageTransformer(info.message)),
101
+ );
102
+ if (signature[signature.length - 1] >= 27) {
103
+ signature[signature.length - 1] -= 27;
80
104
  }
105
+ const witness = ckb_1.WitnessArgs.fromBytes(tx.witnesses[info.position]);
106
+ witness.lock = (0, hex_1.hexFrom)(
107
+ (0, bytes_1.bytesConcat)(
108
+ (0, num_1.numToBytes)(5 * 4 + signature.length, 4),
109
+ (0, num_1.numToBytes)(4 * 4, 4),
110
+ (0, num_1.numToBytes)(5 * 4 + signature.length, 4),
111
+ (0, num_1.numToBytes)(5 * 4 + signature.length, 4),
112
+ (0, num_1.numToBytes)(signature.length, 4),
113
+ signature,
114
+ ),
115
+ );
116
+ tx.witnesses[info.position] = (0, hex_1.hexFrom)(witness.toBytes());
117
+ return tx;
118
+ }
81
119
  }
82
120
  exports.SignerEvm = SignerEvm;
@@ -6,47 +6,41 @@ import { SignerEvm } from "./signerEvm";
6
6
  * This class does not support signing operations.
7
7
  */
8
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>;
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
+ * Connects to the client. This implementation does nothing as the class is read-only.
19
+ *
20
+ * @returns A promise that resolves when the connection is complete.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * await signer.connect();
25
+ * ```
26
+ */
27
+ connect(): Promise<void>;
28
+ /**
29
+ * Check if the signer is connected.
30
+ *
31
+ * @returns A promise that resolves the connection status.
32
+ */
33
+ isConnected(): Promise<boolean>;
34
+ /**
35
+ * Gets the EVM account associated with the signer.
36
+ *
37
+ * @returns A promise that resolves to a string representing the EVM account.
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const account = await signer.getEvmAccount(); // Outputs the EVM account
42
+ * ```
43
+ */
44
+ getEvmAccount(): Promise<string>;
51
45
  }
52
- //# sourceMappingURL=signerEvmAddressReadonly.d.ts.map
46
+ //# sourceMappingURL=signerEvmAddressReadonly.d.ts.map
@@ -1 +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"}
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;;;;;;;;;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"}
@@ -8,55 +8,47 @@ const signerEvm_1 = require("./signerEvm");
8
8
  * This class does not support signing operations.
9
9
  */
10
10
  class SignerEvmAddressReadonly extends signerEvm_1.SignerEvm {
11
- /**
12
- * Creates an instance of SignerEvmAddressReadonly.
13
- *
14
- * @param client - The client instance used for communication.
15
- * @param address - The EVM address associated with the signer.
16
- */
17
- constructor(client, address) {
18
- super(client);
19
- this.address = (0, hex_1.hexFrom)(address);
20
- }
21
- /**
22
- * Construct a new signer with the client replaced.
23
- *
24
- * @returns A promise that resolves the new Signer.
25
- */
26
- async replaceClient(client) {
27
- return new SignerEvmAddressReadonly(client, this.address);
28
- }
29
- /**
30
- * Connects to the client. This implementation does nothing as the class is read-only.
31
- *
32
- * @returns A promise that resolves when the connection is complete.
33
- *
34
- * @example
35
- * ```typescript
36
- * await signer.connect();
37
- * ```
38
- */
39
- async connect() { }
40
- /**
41
- * Check if the signer is connected.
42
- *
43
- * @returns A promise that resolves the connection status.
44
- */
45
- async isConnected() {
46
- return true;
47
- }
48
- /**
49
- * Gets the EVM account associated with the signer.
50
- *
51
- * @returns A promise that resolves to a string representing the EVM account.
52
- *
53
- * @example
54
- * ```typescript
55
- * const account = await signer.getEvmAccount(); // Outputs the EVM account
56
- * ```
57
- */
58
- async getEvmAccount() {
59
- return this.address;
60
- }
11
+ /**
12
+ * Creates an instance of SignerEvmAddressReadonly.
13
+ *
14
+ * @param client - The client instance used for communication.
15
+ * @param address - The EVM address associated with the signer.
16
+ */
17
+ constructor(client, address) {
18
+ super(client);
19
+ this.address = (0, hex_1.hexFrom)(address);
20
+ }
21
+ /**
22
+ * Connects to the client. This implementation does nothing as the class is read-only.
23
+ *
24
+ * @returns A promise that resolves when the connection is complete.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * await signer.connect();
29
+ * ```
30
+ */
31
+ async connect() {}
32
+ /**
33
+ * Check if the signer is connected.
34
+ *
35
+ * @returns A promise that resolves the connection status.
36
+ */
37
+ async isConnected() {
38
+ return true;
39
+ }
40
+ /**
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
+ async getEvmAccount() {
51
+ return this.address;
52
+ }
61
53
  }
62
54
  exports.SignerEvmAddressReadonly = SignerEvmAddressReadonly;
@@ -0,0 +1,7 @@
1
+ import { BytesLike } from "../../bytes";
2
+ export declare function verifyMessageEvmPersonal(
3
+ message: string | BytesLike,
4
+ signature: string,
5
+ address: string,
6
+ ): boolean;
7
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/signer/evm/verify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAa,MAAM,aAAa,CAAC;AAEnD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAQT"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verifyMessageEvmPersonal = void 0;
4
+ const ethers_1 = require("ethers");
5
+ const bytes_1 = require("../../bytes");
6
+ function verifyMessageEvmPersonal(message, signature, address) {
7
+ return (
8
+ address.toLowerCase() ===
9
+ (0, ethers_1.verifyMessage)(
10
+ typeof message === "string" ? message : (0, bytes_1.bytesFrom)(message),
11
+ signature,
12
+ ).toLowerCase()
13
+ );
14
+ }
15
+ exports.verifyMessageEvmPersonal = verifyMessageEvmPersonal;
@@ -1,5 +1,6 @@
1
1
  export * from "./btc";
2
2
  export * from "./ckb";
3
+ export * from "./dummy";
3
4
  export * from "./evm";
4
5
  export * from "./signer";
5
- //# sourceMappingURL=index.d.ts.map
6
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
@@ -1,20 +1,37 @@
1
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
- };
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (
9
+ !desc ||
10
+ ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
11
+ ) {
12
+ desc = {
13
+ enumerable: true,
14
+ get: function () {
15
+ return m[k];
16
+ },
17
+ };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }
21
+ : function (o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ });
25
+ var __exportStar =
26
+ (this && this.__exportStar) ||
27
+ function (m, exports) {
28
+ for (var p in m)
29
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
30
+ __createBinding(exports, m, p);
31
+ };
16
32
  Object.defineProperty(exports, "__esModule", { value: true });
17
33
  __exportStar(require("./btc"), exports);
18
34
  __exportStar(require("./ckb"), exports);
35
+ __exportStar(require("./dummy"), exports);
19
36
  __exportStar(require("./evm"), exports);
20
37
  __exportStar(require("./signer"), exports);
@@ -0,0 +1,190 @@
1
+ import { Address } from "../../address";
2
+ import { BytesLike } from "../../bytes";
3
+ import { Transaction, TransactionLike } from "../../ckb";
4
+ import { Client } from "../../client";
5
+ import { Hex } from "../../hex";
6
+ import { Num } from "../../num";
7
+ export declare enum SignerSignType {
8
+ Unknown = "Unknown",
9
+ BtcEcdsa = "BtcEcdsa",
10
+ EvmPersonal = "EvmPersonal",
11
+ JoyId = "JoyId",
12
+ }
13
+ /**
14
+ * An enumeration of signer display types in wallet.
15
+ */
16
+ export declare enum SignerType {
17
+ EVM = "EVM",
18
+ BTC = "BTC",
19
+ CKB = "CKB",
20
+ }
21
+ export declare class Signature {
22
+ signature: string;
23
+ identity: string;
24
+ signType: SignerSignType;
25
+ constructor(signature: string, identity: string, signType: SignerSignType);
26
+ }
27
+ /**
28
+ * An abstract class representing a generic signer.
29
+ * This class provides methods to connect, get addresses, and sign transactions.
30
+ */
31
+ export declare abstract class Signer {
32
+ protected client_: Client;
33
+ constructor(client_: Client);
34
+ abstract get type(): SignerType;
35
+ abstract get signType(): SignerSignType;
36
+ get client(): Client;
37
+ static verifyMessage(
38
+ message: string | BytesLike,
39
+ signature: Signature,
40
+ ): Promise<boolean>;
41
+ /**
42
+ * Replace the current client.
43
+ */
44
+ replaceClient(client: Client): Promise<void>;
45
+ /**
46
+ * Connects to the signer.
47
+ *
48
+ * @returns A promise that resolves when the connection is complete.
49
+ */
50
+ abstract connect(): Promise<void>;
51
+ /**
52
+ * Disconnects to the signer.
53
+ *
54
+ * @returns A promise that resolves when disconnected.
55
+ */
56
+ disconnect(): Promise<void>;
57
+ /**
58
+ * Check if the signer is connected.
59
+ *
60
+ * @returns A promise that resolves the connection status.
61
+ */
62
+ abstract isConnected(): Promise<boolean>;
63
+ /**
64
+ * Gets the internal address associated with the signer.
65
+ *
66
+ * @returns A promise that resolves to a string representing the internal address.
67
+ */
68
+ abstract getInternalAddress(): Promise<string>;
69
+ /**
70
+ * Gets the identity for verifying signature, usually it's address
71
+ *
72
+ * @returns A promise that resolves to a string representing the identity
73
+ */
74
+ getIdentity(): Promise<string>;
75
+ /**
76
+ * Gets an array of Address objects associated with the signer.
77
+ *
78
+ * @returns A promise that resolves to an array of Address objects.
79
+ */
80
+ abstract getAddressObjs(): Promise<Address[]>;
81
+ /**
82
+ * Gets the recommended Address object for the signer.
83
+ *
84
+ * @param _preference - Optional preference parameter.
85
+ * @returns A promise that resolves to the recommended Address object.
86
+ */
87
+ getRecommendedAddressObj(_preference?: unknown): Promise<Address>;
88
+ /**
89
+ * Gets the recommended address for the signer as a string.
90
+ *
91
+ * @param preference - Optional preference parameter.
92
+ * @returns A promise that resolves to the recommended address as a string.
93
+ */
94
+ getRecommendedAddress(preference?: unknown): Promise<string>;
95
+ /**
96
+ * Gets an array of addresses associated with the signer as strings.
97
+ *
98
+ * @returns A promise that resolves to an array of addresses as strings.
99
+ */
100
+ getAddresses(): Promise<string[]>;
101
+ /**
102
+ * Gets balance of all addresses
103
+ *
104
+ * @returns A promise that resolves to the balance
105
+ */
106
+ getBalance(): Promise<Num>;
107
+ /**
108
+ * Signs a message.
109
+ *
110
+ * @param _ - The message to sign, as a string or BytesLike object.
111
+ * @returns A promise that resolves to the signature info.
112
+ * @throws Will throw an error if not implemented.
113
+ */
114
+ signMessage(message: string | BytesLike): Promise<Signature>;
115
+ /**
116
+ * Signs a message and returns signature only. This method is not implemented and should be overridden by subclasses.
117
+ *
118
+ * @param _ - The message to sign, as a string or BytesLike object.
119
+ * @returns A promise that resolves to the signature as a string.
120
+ * @throws Will throw an error if not implemented.
121
+ */
122
+ signMessageRaw(_: string | BytesLike): Promise<string>;
123
+ /**
124
+ * Verify a signature.
125
+ *
126
+ * @param _ - The original message.
127
+ * @param _ - The signature to verify.
128
+ * @returns A promise that resolves to the verification result.
129
+ * @throws Will throw an error if not implemented.
130
+ */
131
+ verifyMessage(
132
+ message: string | BytesLike,
133
+ signature: string | Signature,
134
+ ): Promise<boolean>;
135
+ /**
136
+ * Verify a string signature. This method is not implemented and should be overridden by subclasses.
137
+ *
138
+ * @param _0 - The original message.
139
+ * @param _1 - The signature to verify.
140
+ * @returns A promise that resolves to the verification result.
141
+ * @throws Will throw an error if not implemented.
142
+ */
143
+ verifyMessageRaw(_0: string | BytesLike, _1: string): Promise<boolean>;
144
+ /**
145
+ * Sends a transaction after signing it.
146
+ *
147
+ * @param tx - The transaction to send, represented as a TransactionLike object.
148
+ * @returns A promise that resolves to the transaction hash as a Hex string.
149
+ */
150
+ sendTransaction(tx: TransactionLike): Promise<Hex>;
151
+ /**
152
+ * Signs a transaction.
153
+ *
154
+ * @param tx - The transaction to sign, represented as a TransactionLike object.
155
+ * @returns A promise that resolves to the signed Transaction object.
156
+ */
157
+ signTransaction(tx: TransactionLike): Promise<Transaction>;
158
+ /**
159
+ * prepare a transaction before signing. This method is not implemented and should be overridden by subclasses.
160
+ *
161
+ * @param _ - The transaction to prepare, represented as a TransactionLike object.
162
+ * @returns A promise that resolves to the prepared Transaction object.
163
+ * @throws Will throw an error if not implemented.
164
+ */
165
+ prepareTransaction(_: TransactionLike): Promise<Transaction>;
166
+ /**
167
+ * Signs a transaction without preparing information for it. This method is not implemented and should be overridden by subclasses.
168
+ *
169
+ * @param _ - The transaction to sign, represented as a TransactionLike object.
170
+ * @returns A promise that resolves to the signed Transaction object.
171
+ * @throws Will throw an error if not implemented.
172
+ */
173
+ signOnlyTransaction(_: TransactionLike): Promise<Transaction>;
174
+ }
175
+ /**
176
+ * A class representing information about a signer, including its type and the signer instance.
177
+ */
178
+ export declare class SignerInfo {
179
+ name: string;
180
+ signer: Signer;
181
+ constructor(name: string, signer: Signer);
182
+ }
183
+ /**
184
+ * Represents a wallet with a name, icon, and an array of signer information.
185
+ */
186
+ export type Wallet = {
187
+ name: string;
188
+ icon: string;
189
+ };
190
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/signer/signer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAKhC,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,oBAAY,UAAU;IACpB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAED,qBAAa,SAAS;IAEX,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,cAAc;gBAFxB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,cAAc;CAElC;AAED;;;GAGG;AACH,8BAAsB,MAAM;IACd,SAAS,CAAC,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;IAErC,QAAQ,KAAK,IAAI,IAAI,UAAU,CAAC;IAChC,QAAQ,KAAK,QAAQ,IAAI,cAAc,CAAC;IAExC,IAAI,MAAM,IAAI,MAAM,CAEnB;WAEY,aAAa,CACxB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC;IAyBnB;;OAEG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAEjC;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAExC;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAE9C;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAIpC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAE7C;;;;;OAKG;IACG,wBAAwB,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvE;;;;;OAKG;IACG,qBAAqB,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlE;;;;OAIG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAMvC;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;IAMhC;;;;;;OAMG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAQlE;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAItD;;;;;;;OAOG;IACG,aAAa,CACjB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,OAAO,CAAC,OAAO,CAAC;IAenB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItE;;;;;OAKG;IACG,eAAe,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC;IAIxD;;;;;OAKG;IACG,eAAe,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IAKhE;;;;;;OAMG;IACH,kBAAkB,CAAC,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IAI5D;;;;;;OAMG;IACH,mBAAmB,CAAC,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CAG9D;AAED;;GAEG;AACH,qBAAa,UAAU;IAEZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;gBADd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM;CAExB;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}