xpi-ts 0.2.22 → 0.2.24

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 (172) hide show
  1. package/dist/cjs/lib/bitcore/crypto/point.js +2 -2
  2. package/dist/cjs/lib/bitcore/index.js +162 -162
  3. package/dist/esm/lib/bitcore/crypto/point.js +2 -2
  4. package/dist/esm/lib/bitcore/index.js +42 -42
  5. package/dist/types/index.d.ts +5 -0
  6. package/dist/types/index.d.ts.map +1 -1
  7. package/dist/types/lib/bitcore/address.d.ts +116 -0
  8. package/dist/types/lib/bitcore/address.d.ts.map +1 -1
  9. package/dist/types/lib/bitcore/block/block.d.ts +214 -0
  10. package/dist/types/lib/bitcore/block/block.d.ts.map +1 -1
  11. package/dist/types/lib/bitcore/block/blockheader.d.ts +220 -0
  12. package/dist/types/lib/bitcore/block/blockheader.d.ts.map +1 -1
  13. package/dist/types/lib/bitcore/block/merkleblock.d.ts +206 -0
  14. package/dist/types/lib/bitcore/block/merkleblock.d.ts.map +1 -1
  15. package/dist/types/lib/bitcore/crypto/bn.d.ts +224 -0
  16. package/dist/types/lib/bitcore/crypto/bn.d.ts.map +1 -1
  17. package/dist/types/lib/bitcore/crypto/ecdsa.d.ts +122 -0
  18. package/dist/types/lib/bitcore/crypto/ecdsa.d.ts.map +1 -1
  19. package/dist/types/lib/bitcore/crypto/hash.d.ts +56 -0
  20. package/dist/types/lib/bitcore/crypto/hash.d.ts.map +1 -1
  21. package/dist/types/lib/bitcore/crypto/index.d.ts +4 -0
  22. package/dist/types/lib/bitcore/crypto/index.d.ts.map +1 -1
  23. package/dist/types/lib/bitcore/crypto/musig2.d.ts +282 -0
  24. package/dist/types/lib/bitcore/crypto/musig2.d.ts.map +1 -1
  25. package/dist/types/lib/bitcore/crypto/point.d.ts +87 -0
  26. package/dist/types/lib/bitcore/crypto/point.d.ts.map +1 -1
  27. package/dist/types/lib/bitcore/crypto/random.d.ts +48 -0
  28. package/dist/types/lib/bitcore/crypto/random.d.ts.map +1 -1
  29. package/dist/types/lib/bitcore/crypto/schnorr.d.ts +203 -0
  30. package/dist/types/lib/bitcore/crypto/schnorr.d.ts.map +1 -1
  31. package/dist/types/lib/bitcore/crypto/signature.d.ts +452 -0
  32. package/dist/types/lib/bitcore/crypto/signature.d.ts.map +1 -1
  33. package/dist/types/lib/bitcore/crypto/sigtype.d.ts +46 -0
  34. package/dist/types/lib/bitcore/crypto/sigtype.d.ts.map +1 -1
  35. package/dist/types/lib/bitcore/encoding/base58.d.ts +68 -0
  36. package/dist/types/lib/bitcore/encoding/base58.d.ts.map +1 -1
  37. package/dist/types/lib/bitcore/encoding/base58check.d.ts +58 -0
  38. package/dist/types/lib/bitcore/encoding/base58check.d.ts.map +1 -1
  39. package/dist/types/lib/bitcore/encoding/bufferreader.d.ts +112 -0
  40. package/dist/types/lib/bitcore/encoding/bufferreader.d.ts.map +1 -1
  41. package/dist/types/lib/bitcore/encoding/bufferwriter.d.ts +144 -0
  42. package/dist/types/lib/bitcore/encoding/bufferwriter.d.ts.map +1 -1
  43. package/dist/types/lib/bitcore/encoding/varint.d.ts +86 -0
  44. package/dist/types/lib/bitcore/encoding/varint.d.ts.map +1 -1
  45. package/dist/types/lib/bitcore/errors.d.ts +4 -0
  46. package/dist/types/lib/bitcore/errors.d.ts.map +1 -1
  47. package/dist/types/lib/bitcore/hdprivatekey.d.ts +59 -0
  48. package/dist/types/lib/bitcore/hdprivatekey.d.ts.map +1 -1
  49. package/dist/types/lib/bitcore/hdpublickey.d.ts +145 -0
  50. package/dist/types/lib/bitcore/hdpublickey.d.ts.map +1 -1
  51. package/dist/types/lib/bitcore/index.d.ts +58 -54
  52. package/dist/types/lib/bitcore/index.d.ts.map +1 -1
  53. package/dist/types/lib/bitcore/message.d.ts +63 -0
  54. package/dist/types/lib/bitcore/message.d.ts.map +1 -1
  55. package/dist/types/lib/bitcore/mnemonic/errors.d.ts +4 -0
  56. package/dist/types/lib/bitcore/mnemonic/errors.d.ts.map +1 -1
  57. package/dist/types/lib/bitcore/mnemonic/index.d.ts +4 -0
  58. package/dist/types/lib/bitcore/mnemonic/index.d.ts.map +1 -1
  59. package/dist/types/lib/bitcore/mnemonic/mnemonic.d.ts +106 -0
  60. package/dist/types/lib/bitcore/mnemonic/mnemonic.d.ts.map +1 -1
  61. package/dist/types/lib/bitcore/mnemonic/pbkdf2.d.ts +13 -0
  62. package/dist/types/lib/bitcore/mnemonic/pbkdf2.d.ts.map +1 -1
  63. package/dist/types/lib/bitcore/mnemonic/words/english.d.ts +4 -0
  64. package/dist/types/lib/bitcore/mnemonic/words/english.d.ts.map +1 -1
  65. package/dist/types/lib/bitcore/mnemonic/words/french.d.ts +5 -0
  66. package/dist/types/lib/bitcore/mnemonic/words/french.d.ts.map +1 -1
  67. package/dist/types/lib/bitcore/mnemonic/words/index.d.ts +4 -0
  68. package/dist/types/lib/bitcore/mnemonic/words/index.d.ts.map +1 -1
  69. package/dist/types/lib/bitcore/musig2/index.d.ts +14 -0
  70. package/dist/types/lib/bitcore/musig2/index.d.ts.map +1 -1
  71. package/dist/types/lib/bitcore/musig2/session.d.ts +254 -0
  72. package/dist/types/lib/bitcore/musig2/session.d.ts.map +1 -1
  73. package/dist/types/lib/bitcore/musig2/signer.d.ts +212 -0
  74. package/dist/types/lib/bitcore/musig2/signer.d.ts.map +1 -1
  75. package/dist/types/lib/bitcore/networks.d.ts +17 -0
  76. package/dist/types/lib/bitcore/networks.d.ts.map +1 -1
  77. package/dist/types/lib/bitcore/opcode.d.ts +151 -0
  78. package/dist/types/lib/bitcore/opcode.d.ts.map +1 -1
  79. package/dist/types/lib/bitcore/privatekey.d.ts +80 -0
  80. package/dist/types/lib/bitcore/privatekey.d.ts.map +1 -1
  81. package/dist/types/lib/bitcore/publickey.d.ts +195 -0
  82. package/dist/types/lib/bitcore/publickey.d.ts.map +1 -1
  83. package/dist/types/lib/bitcore/script/chunk.d.ts +51 -0
  84. package/dist/types/lib/bitcore/script/chunk.d.ts.map +1 -1
  85. package/dist/types/lib/bitcore/script/interpreter/condition-stack.d.ts +60 -0
  86. package/dist/types/lib/bitcore/script/interpreter/condition-stack.d.ts.map +1 -1
  87. package/dist/types/lib/bitcore/script/interpreter/index.d.ts +23 -0
  88. package/dist/types/lib/bitcore/script/interpreter/index.d.ts.map +1 -1
  89. package/dist/types/lib/bitcore/script/interpreter/interpreter.d.ts +86 -0
  90. package/dist/types/lib/bitcore/script/interpreter/interpreter.d.ts.map +1 -1
  91. package/dist/types/lib/bitcore/script/interpreter/script-num.d.ts +115 -0
  92. package/dist/types/lib/bitcore/script/interpreter/script-num.d.ts.map +1 -1
  93. package/dist/types/lib/bitcore/script/interpreter/types.d.ts +119 -0
  94. package/dist/types/lib/bitcore/script/interpreter/types.d.ts.map +1 -1
  95. package/dist/types/lib/bitcore/script/taproot.d.ts +297 -0
  96. package/dist/types/lib/bitcore/script/taproot.d.ts.map +1 -1
  97. package/dist/types/lib/bitcore/script.d.ts +510 -0
  98. package/dist/types/lib/bitcore/script.d.ts.map +1 -1
  99. package/dist/types/lib/bitcore/taproot/musig2.d.ts +153 -0
  100. package/dist/types/lib/bitcore/taproot/musig2.d.ts.map +1 -1
  101. package/dist/types/lib/bitcore/transaction/input/multisig.d.ts +8 -0
  102. package/dist/types/lib/bitcore/transaction/input/multisig.d.ts.map +1 -1
  103. package/dist/types/lib/bitcore/transaction/input/multisigscripthash.d.ts +8 -0
  104. package/dist/types/lib/bitcore/transaction/input/multisigscripthash.d.ts.map +1 -1
  105. package/dist/types/lib/bitcore/transaction/input/publickey.d.ts +8 -0
  106. package/dist/types/lib/bitcore/transaction/input/publickey.d.ts.map +1 -1
  107. package/dist/types/lib/bitcore/transaction/input/publickeyhash.d.ts +14 -0
  108. package/dist/types/lib/bitcore/transaction/input/publickeyhash.d.ts.map +1 -1
  109. package/dist/types/lib/bitcore/transaction/input/taproot.d.ts +22 -0
  110. package/dist/types/lib/bitcore/transaction/input/taproot.d.ts.map +1 -1
  111. package/dist/types/lib/bitcore/transaction/input.d.ts +418 -0
  112. package/dist/types/lib/bitcore/transaction/input.d.ts.map +1 -1
  113. package/dist/types/lib/bitcore/transaction/outpoint.d.ts +110 -0
  114. package/dist/types/lib/bitcore/transaction/outpoint.d.ts.map +1 -1
  115. package/dist/types/lib/bitcore/transaction/output.d.ts +83 -0
  116. package/dist/types/lib/bitcore/transaction/output.d.ts.map +1 -1
  117. package/dist/types/lib/bitcore/transaction/sighash.d.ts +69 -0
  118. package/dist/types/lib/bitcore/transaction/sighash.d.ts.map +1 -1
  119. package/dist/types/lib/bitcore/transaction/signature.d.ts +98 -0
  120. package/dist/types/lib/bitcore/transaction/signature.d.ts.map +1 -1
  121. package/dist/types/lib/bitcore/transaction/transaction.d.ts +379 -0
  122. package/dist/types/lib/bitcore/transaction/transaction.d.ts.map +1 -1
  123. package/dist/types/lib/bitcore/transaction/unspentoutput.d.ts +61 -0
  124. package/dist/types/lib/bitcore/transaction/unspentoutput.d.ts.map +1 -1
  125. package/dist/types/lib/bitcore/unit.d.ts +140 -0
  126. package/dist/types/lib/bitcore/unit.d.ts.map +1 -1
  127. package/dist/types/lib/bitcore/uri.d.ts +34 -0
  128. package/dist/types/lib/bitcore/uri.d.ts.map +1 -1
  129. package/dist/types/lib/bitcore/util/base32.d.ts +55 -0
  130. package/dist/types/lib/bitcore/util/base32.d.ts.map +1 -1
  131. package/dist/types/lib/bitcore/util/bits.d.ts +76 -0
  132. package/dist/types/lib/bitcore/util/bits.d.ts.map +1 -1
  133. package/dist/types/lib/bitcore/util/buffer.d.ts +135 -0
  134. package/dist/types/lib/bitcore/util/buffer.d.ts.map +1 -1
  135. package/dist/types/lib/bitcore/util/convertBits.d.ts +15 -0
  136. package/dist/types/lib/bitcore/util/convertBits.d.ts.map +1 -1
  137. package/dist/types/lib/bitcore/util/js.d.ts +19 -0
  138. package/dist/types/lib/bitcore/util/js.d.ts.map +1 -1
  139. package/dist/types/lib/bitcore/util/merkle.d.ts +85 -0
  140. package/dist/types/lib/bitcore/util/merkle.d.ts.map +1 -1
  141. package/dist/types/lib/bitcore/util/preconditions.d.ts +29 -0
  142. package/dist/types/lib/bitcore/util/preconditions.d.ts.map +1 -1
  143. package/dist/types/lib/bitcore/util.d.ts +7 -0
  144. package/dist/types/lib/bitcore/util.d.ts.map +1 -1
  145. package/dist/types/lib/bitcore/xaddress.d.ts +117 -0
  146. package/dist/types/lib/bitcore/xaddress.d.ts.map +1 -1
  147. package/dist/types/lib/lokad.d.ts +292 -0
  148. package/dist/types/lib/lokad.d.ts.map +1 -1
  149. package/dist/types/lib/nft.d.ts +434 -0
  150. package/dist/types/lib/nft.d.ts.map +1 -1
  151. package/dist/types/lib/rank/api.d.ts +13 -0
  152. package/dist/types/lib/rank/api.d.ts.map +1 -1
  153. package/dist/types/lib/rank/index.d.ts +153 -0
  154. package/dist/types/lib/rank/index.d.ts.map +1 -1
  155. package/dist/types/lib/rank/opcode.d.ts +6 -2
  156. package/dist/types/lib/rank/opcode.d.ts.map +1 -1
  157. package/dist/types/lib/rank/script.d.ts +10 -0
  158. package/dist/types/lib/rank/script.d.ts.map +1 -1
  159. package/dist/types/lib/rank/transaction.d.ts +11 -0
  160. package/dist/types/lib/rank/transaction.d.ts.map +1 -1
  161. package/dist/types/lib/rpc.d.ts +176 -0
  162. package/dist/types/lib/rpc.d.ts.map +1 -1
  163. package/dist/types/utils/constants.d.ts +27 -0
  164. package/dist/types/utils/constants.d.ts.map +1 -1
  165. package/dist/types/utils/env.d.ts +15 -0
  166. package/dist/types/utils/env.d.ts.map +1 -1
  167. package/dist/types/utils/string.d.ts +57 -0
  168. package/dist/types/utils/string.d.ts.map +1 -1
  169. package/dist/types/utils/wallet.d.ts +43 -1
  170. package/dist/types/utils/wallet.d.ts.map +1 -1
  171. package/package.json +1 -1
  172. package/tsconfig.types.json +2 -1
@@ -1,3 +1,31 @@
1
+ /**
2
+ * Copyright 2025 The Lotusia Stewardship
3
+ * Github: https://github.com/LotusiaStewardship
4
+ * License: MIT
5
+ */
6
+ /**
7
+ * MuSig2 Signer - High-Level Wrapper for Common MuSig2 Operations
8
+ *
9
+ * This class provides a simplified, developer-friendly API for common MuSig2 workflows,
10
+ * hiding the complexity of the underlying cryptographic operations while maintaining
11
+ * full control when needed.
12
+ *
13
+ * Features:
14
+ * - Simplified signing workflow (2 methods: prepare + sign)
15
+ * - Automatic message hashing (ensures 32-byte messages for Lotus Schnorr)
16
+ * - Both direct and session-based signing modes
17
+ * - Taproot integration helpers
18
+ * - Built-in validation and error handling
19
+ * - Transaction signing utilities
20
+ *
21
+ * Common Use Cases:
22
+ * 1. Simple message signing (2-of-2, 3-of-3, etc.)
23
+ * 2. Taproot transaction signing with MuSig2
24
+ * 3. Coordinated multi-party signing sessions
25
+ * 4. Batch signing operations
26
+ *
27
+ * @module MuSig2Signer
28
+ */
1
29
  import { PrivateKey } from '../privatekey.js';
2
30
  import { PublicKey } from '../publickey.js';
3
31
  import { Signature } from '../crypto/signature.js';
@@ -10,53 +38,237 @@ import { type MuSig2TaprootKeyResult } from '../taproot/musig2.js';
10
38
  import { Transaction } from '../transaction/transaction.js';
11
39
  import { BN } from '../crypto/bn.js';
12
40
  import type { Buffer } from 'buffer/';
41
+ /**
42
+ * Configuration for creating a MuSig2 signer
43
+ */
13
44
  export interface MuSig2SignerConfig {
45
+ /** All signers' public keys (in order - must be consistent!) */
14
46
  signers: PublicKey[];
47
+ /** This signer's private key */
15
48
  myPrivateKey: PrivateKey;
49
+ /** Optional: Extra randomness for nonce generation */
16
50
  extraInput?: Buffer;
17
51
  }
52
+ /**
53
+ * Result of preparing a MuSig2 signing session
54
+ */
18
55
  export interface MuSig2PrepareResult {
56
+ /** Key aggregation context */
19
57
  keyAggContext: MuSig2KeyAggContext;
58
+ /** This signer's public nonces (share with other signers) */
20
59
  myPublicNonces: [Point, Point];
60
+ /** Secret nonces (KEEP PRIVATE! Only store temporarily) */
21
61
  mySecretNonces: [BN, BN];
62
+ /** This signer's index in the signers array */
22
63
  myIndex: number;
64
+ /** Session identifier (for tracking) */
23
65
  sessionId?: string;
24
66
  }
67
+ /**
68
+ * Result of completing MuSig2 signing
69
+ */
25
70
  export interface MuSig2SignResult {
71
+ /** Final aggregated signature */
26
72
  signature: Signature;
73
+ /** Aggregated public key */
27
74
  aggregatedPubKey: PublicKey;
75
+ /** Whether this signer created the final signature (or received it) */
28
76
  isAggregator: boolean;
29
77
  }
78
+ /**
79
+ * Taproot-specific signing result
80
+ */
30
81
  export interface MuSig2TaprootSignResult extends MuSig2SignResult {
82
+ /** Taproot commitment (tweaked aggregated key) */
31
83
  commitment: PublicKey;
84
+ /** Taproot script */
32
85
  script: Script;
86
+ /** Taproot address */
33
87
  address: Address;
34
88
  }
89
+ /**
90
+ * High-level MuSig2 Signer
91
+ *
92
+ * Simplifies common MuSig2 operations for developers.
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * // Simple 2-of-2 signing
97
+ * const signer = new MuSig2Signer({
98
+ * signers: [alice.publicKey, bob.publicKey],
99
+ * myPrivateKey: alice,
100
+ * })
101
+ *
102
+ * // Prepare (round 1)
103
+ * const prepare = await signer.prepare(message)
104
+ * // Share prepare.myPublicNonces with Bob
105
+ *
106
+ * // After receiving Bob's nonces
107
+ * const signature = await signer.sign(
108
+ * prepare,
109
+ * [prepare.myPublicNonces, bobNonces], // All nonces
110
+ * message,
111
+ * [bobPartialSig], // Collected partial signatures (excluding mine)
112
+ * )
113
+ * ```
114
+ */
35
115
  export declare class MuSig2Signer {
36
116
  private config;
37
117
  private sessionManager?;
118
+ /**
119
+ * Create a new MuSig2 signer
120
+ *
121
+ * @param config - Signer configuration
122
+ */
38
123
  constructor(config: MuSig2SignerConfig);
124
+ /**
125
+ * Prepare for signing (Round 1: Generate nonces)
126
+ *
127
+ * This is the first step in MuSig2 signing. Each signer calls this method
128
+ * and shares their public nonces with all other signers.
129
+ *
130
+ * 🔒 PRODUCTION SECURITY: This method automatically adds 32 bytes of random
131
+ * entropy to nonce generation (unless extraInput is explicitly provided in config).
132
+ * This provides defense-in-depth on top of RFC6979 deterministic generation.
133
+ *
134
+ * @param message - Message to sign (will be hashed to 32 bytes if needed)
135
+ * @param useSession - If true, use session manager for state tracking
136
+ * @returns Preparation result with public nonces to share
137
+ */
39
138
  prepare(message: Buffer | string, useSession?: boolean): MuSig2PrepareResult;
139
+ /**
140
+ * Sign a message (Round 2: Create partial signature)
141
+ *
142
+ * After all signers have shared their public nonces, each signer calls
143
+ * this method to create their partial signature.
144
+ *
145
+ * @param prepare - Result from prepare() method
146
+ * @param allPublicNonces - All signers' public nonces (in signer order!)
147
+ * @param message - Same message used in prepare()
148
+ * @returns Partial signature to share with other signers
149
+ */
40
150
  createPartialSignature(prepare: MuSig2PrepareResult, allPublicNonces: Array<[Point, Point]>, message: Buffer | string): BN;
151
+ /**
152
+ * Verify a partial signature from another signer
153
+ *
154
+ * Before aggregating, verify all received partial signatures to detect
155
+ * malicious or invalid signatures.
156
+ *
157
+ * @param partialSig - Partial signature to verify
158
+ * @param publicNonce - Signer's public nonce
159
+ * @param publicKey - Signer's public key
160
+ * @param signerIndex - Index of the signer
161
+ * @param prepare - Result from prepare() method
162
+ * @param allPublicNonces - All public nonces (for aggregation)
163
+ * @param message - Message being signed
164
+ * @returns true if partial signature is valid
165
+ */
41
166
  verifyPartialSignature(partialSig: BN, publicNonce: [Point, Point], publicKey: PublicKey, signerIndex: number, prepare: MuSig2PrepareResult, allPublicNonces: Array<[Point, Point]>, message: Buffer | string): boolean;
167
+ /**
168
+ * Complete signing by aggregating all partial signatures
169
+ *
170
+ * After collecting all partial signatures (including your own), call this
171
+ * method to produce the final signature.
172
+ *
173
+ * @param prepare - Result from prepare() method
174
+ * @param allPublicNonces - All signers' public nonces (in order)
175
+ * @param message - Message being signed
176
+ * @param allPartialSigs - All partial signatures (in signer order!)
177
+ * @returns Final aggregated signature
178
+ */
42
179
  sign(prepare: MuSig2PrepareResult, allPublicNonces: Array<[Point, Point]>, message: Buffer | string, allPartialSigs: BN[]): MuSig2SignResult;
180
+ /**
181
+ * Prepare for Taproot MuSig2 signing
182
+ *
183
+ * Creates a MuSig2 aggregated key and applies Taproot tweaking.
184
+ * Use this when creating Taproot outputs that will be spent via MuSig2.
185
+ *
186
+ * @param state - Optional 32-byte state data (e.g., NFT metadata hash)
187
+ * @returns Taproot-specific preparation result
188
+ */
43
189
  prepareTaproot(): MuSig2TaprootKeyResult & {
44
190
  keyAggContext: MuSig2KeyAggContext;
45
191
  };
192
+ /**
193
+ * Sign a Taproot transaction input using MuSig2
194
+ *
195
+ * Creates a partial signature for spending a Taproot output via MuSig2 key path.
196
+ *
197
+ * @param prepare - Result from prepareTaproot()
198
+ * @param allPublicNonces - All signers' public nonces
199
+ * @param transaction - Transaction being signed
200
+ * @param inputIndex - Index of the input to sign
201
+ * @param amount - Amount of the output being spent
202
+ * @param sighashType - Signature hash type (default: SIGHASH_ALL | SIGHASH_LOTUS)
203
+ * @returns Partial signature for Taproot spending
204
+ */
46
205
  signTaprootInput(prepare: MuSig2TaprootKeyResult & {
47
206
  keyAggContext: MuSig2KeyAggContext;
48
207
  }, allPublicNonces: Array<[Point, Point]>, transaction: Transaction, inputIndex: number, amount: number, sighashType?: number): BN;
208
+ /**
209
+ * Complete Taproot transaction signing
210
+ *
211
+ * Aggregates all partial signatures for a Taproot MuSig2 spend.
212
+ *
213
+ * @param prepare - Result from prepareTaproot()
214
+ * @param allPublicNonces - All signers' public nonces
215
+ * @param allPartialSigs - All partial signatures (in signer order)
216
+ * @param transaction - Transaction being signed
217
+ * @param inputIndex - Index of input being signed
218
+ * @param amount - Amount being spent
219
+ * @param sighashType - Signature hash type
220
+ * @returns Final signature for Taproot input
221
+ */
49
222
  completeTaprootSigning(prepare: MuSig2TaprootKeyResult & {
50
223
  keyAggContext: MuSig2KeyAggContext;
51
224
  }, allPublicNonces: Array<[Point, Point]>, allPartialSigs: BN[], transaction: Transaction, inputIndex: number, amount: number, sighashType?: number): Signature;
225
+ /**
226
+ * Create a session-based signer (for coordinated signing)
227
+ *
228
+ * Returns a session manager and session for advanced use cases where you
229
+ * need fine-grained control over the signing process.
230
+ *
231
+ * @param message - Message to sign
232
+ * @param metadata - Optional session metadata
233
+ * @returns Session manager and initialized session
234
+ */
52
235
  createSession(message: Buffer | string, metadata?: Record<string, unknown>): {
53
236
  manager: MuSigSessionManager;
54
237
  session: MuSigSession;
55
238
  };
239
+ /**
240
+ * Get this signer's public key
241
+ */
56
242
  get myPublicKey(): PublicKey;
243
+ /**
244
+ * Get all signers' public keys
245
+ */
57
246
  get allSigners(): PublicKey[];
247
+ /**
248
+ * Get this signer's index (based on lexicographically sorted keys)
249
+ */
58
250
  get myIndex(): number;
251
+ /**
252
+ * Normalize message to 32 bytes (required for Lotus Schnorr)
253
+ *
254
+ * If message is a string or not exactly 32 bytes, hash it to 32 bytes.
255
+ */
59
256
  private _normalizeMessage;
60
257
  }
258
+ /**
259
+ * Helper function to create a MuSig2 signer quickly
260
+ *
261
+ * @param signers - All signers' public keys
262
+ * @param myPrivateKey - This signer's private key
263
+ * @returns New MuSig2Signer instance
264
+ *
265
+ * @example
266
+ * ```typescript
267
+ * const signer = createMuSig2Signer(
268
+ * [alice.publicKey, bob.publicKey],
269
+ * alice
270
+ * )
271
+ * ```
272
+ */
61
273
  export declare function createMuSig2Signer(signers: PublicKey[], myPrivateKey: PrivateKey): MuSig2Signer;
62
274
  //# sourceMappingURL=signer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../../../lib/bitcore/musig2/signer.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE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cAAc,EAAE,EAAE,EAAE,EACpB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,GACnB,SAAS;IA4BZ;;;;;;;;;OASG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC;QACD,OAAO,EAAE,mBAAmB,CAAA;QAC5B,OAAO,EAAE,YAAY,CAAA;KACtB;IAmBD;;OAEG;IACH,IAAI,WAAW,IAAI,SAAS,CAE3B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,SAAS,EAAE,CAE5B;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAWpB;IAID;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;CAc1B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,EAAE,EACpB,YAAY,EAAE,UAAU,GACvB,YAAY,CAEd"}
@@ -1,18 +1,35 @@
1
1
  import type { Buffer } from 'buffer/';
2
+ /**
3
+ * Configuration options for defining a blockchain network.
4
+ */
2
5
  export interface NetworkConfig {
6
+ /** The canonical name of the network (e.g., 'livenet', 'testnet'). */
3
7
  name: NetworkName;
8
+ /** An alternative or friendly name for the network (e.g., 'mainnet', 'regtest'). */
4
9
  alias: string;
10
+ /** Prefix for P2PKH (Pay-to-Public-Key-Hash/legacy address) encoding. */
5
11
  pubkeyhash: number;
12
+ /** Prefix for WIF (Wallet Import Format) private key encoding. */
6
13
  privatekey: number;
14
+ /** Prefix for P2SH (Pay-to-Script-Hash) address encoding. */
7
15
  scripthash: number;
16
+ /** Prefix for Bech32 (CashAddr/XAddress) encoding. */
8
17
  bech32prefix?: string;
18
+ /** Prefix for extended public key (xpub) in BIP32 serialization. */
9
19
  xpubkey: number;
20
+ /** Prefix for extended private key (xpriv) in BIP32 serialization. */
10
21
  xprivkey: number;
22
+ /** Magic bytes used to identify the network in peer-to-peer messages. */
11
23
  networkMagic: Buffer;
24
+ /** Default port for peer-to-peer connections on this network. */
12
25
  port: number;
26
+ /** Array of DNS seeds for peer discovery on the network. */
13
27
  dnsSeeds: string[];
28
+ /** Optional human-readable prefix for addresses (e.g., in CashAddr/XAddress format). */
14
29
  prefix?: string;
30
+ /** Optional array of numeric values derived from the prefix, used for address formatting. */
15
31
  prefixArray?: number[];
32
+ /** Optional network identifier used in address encoding (e.g., '_' for mainnet). */
16
33
  networkbyte?: string;
17
34
  }
18
35
  export declare class Network {
@@ -1 +1 @@
1
- {"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../../lib/bitcore/networks.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAqBrC,MAAM,WAAW,aAAa;IAE5B,IAAI,EAAE,WAAW,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IAEb,UAAU,EAAE,MAAM,CAAA;IAElB,UAAU,EAAE,MAAM,CAAA;IAElB,UAAU,EAAE,MAAM,CAAA;IAElB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,OAAO,EAAE,MAAM,CAAA;IAEf,QAAQ,EAAE,MAAM,CAAA;IAEhB,YAAY,EAAE,MAAM,CAAA;IAEpB,IAAI,EAAE,MAAM,CAAA;IAEZ,QAAQ,EAAE,MAAM,EAAE,CAAA;IAElB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IAEtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,qBAAa,OAAO;IAClB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,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CAAA;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;gBAEjB,MAAM,EAAE,aAAa;IAgBjC,QAAQ,IAAI,WAAW;CAGxB;AAGD,eAAO,MAAM,OAAO,SAclB,CAAA;AAEF,eAAO,MAAM,OAAO,SAclB,CAAA;AAEF,eAAO,MAAM,OAAO,SAclB,CAAA;AAEF,eAAO,MAAM,QAAQ,WAA8B,CAAA;AACnD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,CAAA;AAatD,eAAO,MAAM,cAAc,SAAU,CAAA;AAErC,wBAAgB,GAAG,CACjB,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GACvB,OAAO,GAAG,SAAS,CAwBrB;AAED,wBAAgB,GAAG,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAchD;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAY7C;AAGD,eAAO,MAAM,QAAQ;;;;;;;;;CASpB,CAAA;AAGD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA"}
@@ -1,133 +1,284 @@
1
+ /**
2
+ * Opcode implementation for Lotus
3
+ * Migrated from bitcore-lib-xpi with ESM support
4
+ */
1
5
  import type { Buffer } from 'buffer/';
2
6
  export interface OpcodeData {
3
7
  num: number;
4
8
  }
9
+ /**
10
+ * Opcode class for Lotus script operations
11
+ * Represents a single opcode in the Lotus scripting language
12
+ * Migrated from bitcore-lib-xpi with ESM support
13
+ */
5
14
  export declare class Opcode {
15
+ /** The numeric value of this opcode */
6
16
  readonly num: number;
17
+ /**
18
+ * Create a new Opcode instance
19
+ * @param num - The opcode number or name string (e.g., 'OP_DUP')
20
+ * @throws {Error} If the opcode name is unknown
21
+ * @throws {TypeError} If num is not a number or string
22
+ */
7
23
  constructor(num: number | string);
24
+ /**
25
+ * Create an Opcode from a buffer
26
+ * @param buf - Buffer containing the opcode byte
27
+ * @returns A new Opcode instance
28
+ * @throws {Error} If buf is not a Buffer or is empty
29
+ */
8
30
  static fromBuffer(buf: Buffer): Opcode;
31
+ /**
32
+ * Convert the opcode to a buffer
33
+ * @returns A single-byte buffer containing the opcode number
34
+ */
9
35
  toBuffer(): Buffer;
36
+ /**
37
+ * Convert the opcode to a string representation
38
+ * @returns The opcode number as a string
39
+ */
10
40
  toString(): string;
41
+ /** Push empty vector onto stack */
11
42
  static readonly OP_0 = 0;
43
+ /** Alias for OP_0 */
12
44
  static readonly OP_FALSE = 0;
45
+ /** Next byte contains number of bytes to push onto stack */
13
46
  static readonly OP_PUSHDATA1 = 76;
47
+ /** Next two bytes contain number of bytes to push onto stack */
14
48
  static readonly OP_PUSHDATA2 = 77;
49
+ /** Next four bytes contain number of bytes to push onto stack */
15
50
  static readonly OP_PUSHDATA4 = 78;
51
+ /** Push -1 onto stack */
16
52
  static readonly OP_1NEGATE = 79;
53
+ /** Reserved (invalid opcode) */
17
54
  static readonly OP_RESERVED = 80;
55
+ /** Push value 1 onto stack */
18
56
  static readonly OP_1 = 81;
57
+ /** Alias for OP_1 */
19
58
  static readonly OP_TRUE = 81;
59
+ /** Push value 2 onto stack */
20
60
  static readonly OP_2 = 82;
61
+ /** Push value 3 onto stack */
21
62
  static readonly OP_3 = 83;
63
+ /** Push value 4 onto stack */
22
64
  static readonly OP_4 = 84;
65
+ /** Push value 5 onto stack */
23
66
  static readonly OP_5 = 85;
67
+ /** Push value 6 onto stack */
24
68
  static readonly OP_6 = 86;
69
+ /** Push value 7 onto stack */
25
70
  static readonly OP_7 = 87;
71
+ /** Push value 8 onto stack */
26
72
  static readonly OP_8 = 88;
73
+ /** Push value 9 onto stack */
27
74
  static readonly OP_9 = 89;
75
+ /** Push value 10 onto stack */
28
76
  static readonly OP_10 = 90;
77
+ /** Push value 11 onto stack */
29
78
  static readonly OP_11 = 91;
79
+ /** Push value 12 onto stack */
30
80
  static readonly OP_12 = 92;
81
+ /** Push value 13 onto stack */
31
82
  static readonly OP_13 = 93;
83
+ /** Push value 14 onto stack */
32
84
  static readonly OP_14 = 94;
85
+ /** Push value 15 onto stack */
33
86
  static readonly OP_15 = 95;
87
+ /** Push value 16 onto stack */
34
88
  static readonly OP_16 = 96;
89
+ /** Do nothing */
35
90
  static readonly OP_NOP = 97;
91
+ /** Marker for advanced script types (Lotus Taproot) */
36
92
  static readonly OP_SCRIPTTYPE = 98;
93
+ /** Version byte for scripts (deprecated in BCH/Lotus) */
37
94
  static readonly OP_VER = 98;
95
+ /** If next value is true, execute following statements */
38
96
  static readonly OP_IF = 99;
97
+ /** If next value is false, execute following statements */
39
98
  static readonly OP_NOTIF = 100;
99
+ /** Execute statements only if version byte is true (unassigned) */
40
100
  static readonly OP_VERIF = 101;
101
+ /** Execute statements only if version byte is false (unassigned) */
41
102
  static readonly OP_VERNOTIF = 102;
103
+ /** Else branch in conditional execution */
42
104
  static readonly OP_ELSE = 103;
105
+ /** End of conditional execution block */
43
106
  static readonly OP_ENDIF = 104;
107
+ /** Mark transaction invalid if top stack value is false */
44
108
  static readonly OP_VERIFY = 105;
109
+ /** Mark transaction as invalid/unspendable */
45
110
  static readonly OP_RETURN = 106;
111
+ /** Move top stack value to alt stack */
46
112
  static readonly OP_TOALTSTACK = 107;
113
+ /** Move top alt stack value to main stack */
47
114
  static readonly OP_FROMALTSTACK = 108;
115
+ /** Drop top two stack values */
48
116
  static readonly OP_2DROP = 109;
117
+ /** Duplicate top two stack values */
49
118
  static readonly OP_2DUP = 110;
119
+ /** Duplicate top three stack values */
50
120
  static readonly OP_3DUP = 111;
121
+ /** Copy 3rd and 4th values to top of stack */
51
122
  static readonly OP_2OVER = 112;
123
+ /** Move fifth and sixth values to top of stack */
52
124
  static readonly OP_2ROT = 113;
125
+ /** Swap top two pairs of values */
53
126
  static readonly OP_2SWAP = 114;
127
+ /** Duplicate if top of stack is not 0 */
54
128
  static readonly OP_IFDUP = 115;
129
+ /** Push stack depth onto stack */
55
130
  static readonly OP_DEPTH = 116;
131
+ /** Drop top value from stack */
56
132
  static readonly OP_DROP = 117;
133
+ /** Duplicate top stack value */
57
134
  static readonly OP_DUP = 118;
135
+ /** Remove second-to-top stack value */
58
136
  static readonly OP_NIP = 119;
137
+ /** Copy second-to-top value to top */
59
138
  static readonly OP_OVER = 120;
139
+ /** Copy stack value at index to top */
60
140
  static readonly OP_PICK = 121;
141
+ /** Move stack value at index to top */
61
142
  static readonly OP_ROLL = 122;
143
+ /** Rotate top three stack values */
62
144
  static readonly OP_ROT = 123;
145
+ /** Swap top two stack values */
63
146
  static readonly OP_SWAP = 124;
147
+ /** Duplicate second-to-top value to top */
64
148
  static readonly OP_TUCK = 125;
149
+ /** Concatenate two byte arrays */
65
150
  static readonly OP_CAT = 126;
151
+ /** Split byte array at position */
66
152
  static readonly OP_SPLIT = 127;
153
+ /** Convert number to binary with specific size */
67
154
  static readonly OP_NUM2BIN = 128;
155
+ /** Convert binary to number */
68
156
  static readonly OP_BIN2NUM = 129;
157
+ /** Push size of top item onto stack */
69
158
  static readonly OP_SIZE = 130;
159
+ /** Bitwise NOT */
70
160
  static readonly OP_INVERT = 131;
161
+ /** Bitwise AND */
71
162
  static readonly OP_AND = 132;
163
+ /** Bitwise OR */
72
164
  static readonly OP_OR = 133;
165
+ /** Bitwise XOR */
73
166
  static readonly OP_XOR = 134;
167
+ /** Test for equality */
74
168
  static readonly OP_EQUAL = 135;
169
+ /** Test for equality and verify */
75
170
  static readonly OP_EQUALVERIFY = 136;
171
+ /** Reserved (invalid opcode) */
76
172
  static readonly OP_RESERVED1 = 137;
173
+ /** Reserved (invalid opcode) */
77
174
  static readonly OP_RESERVED2 = 138;
175
+ /** Add 1 to top value */
78
176
  static readonly OP_1ADD = 139;
177
+ /** Subtract 1 from top value */
79
178
  static readonly OP_1SUB = 140;
179
+ /** Multiply by 2 */
80
180
  static readonly OP_2MUL = 141;
181
+ /** Divide by 2 */
81
182
  static readonly OP_2DIV = 142;
183
+ /** Negate number */
82
184
  static readonly OP_NEGATE = 143;
185
+ /** Absolute value */
83
186
  static readonly OP_ABS = 144;
187
+ /** Boolean NOT */
84
188
  static readonly OP_NOT = 145;
189
+ /** Return 1 if top value is not 0, else 0 */
85
190
  static readonly OP_0NOTEQUAL = 146;
191
+ /** Add two top stack values */
86
192
  static readonly OP_ADD = 147;
193
+ /** Subtract two top stack values */
87
194
  static readonly OP_SUB = 148;
195
+ /** Multiply two top stack values */
88
196
  static readonly OP_MUL = 149;
197
+ /** Divide top value by next value */
89
198
  static readonly OP_DIV = 150;
199
+ /** Modulo (remainder) */
90
200
  static readonly OP_MOD = 151;
201
+ /** Left shift */
91
202
  static readonly OP_LSHIFT = 152;
203
+ /** Right shift */
92
204
  static readonly OP_RSHIFT = 153;
205
+ /** Boolean AND */
93
206
  static readonly OP_BOOLAND = 154;
207
+ /** Boolean OR */
94
208
  static readonly OP_BOOLOR = 155;
209
+ /** Numeric equality */
95
210
  static readonly OP_NUMEQUAL = 156;
211
+ /** Numeric equality and verify */
96
212
  static readonly OP_NUMEQUALVERIFY = 157;
213
+ /** Numeric inequality */
97
214
  static readonly OP_NUMNOTEQUAL = 158;
215
+ /** Less than */
98
216
  static readonly OP_LESSTHAN = 159;
217
+ /** Greater than */
99
218
  static readonly OP_GREATERTHAN = 160;
219
+ /** Less than or equal */
100
220
  static readonly OP_LESSTHANOREQUAL = 161;
221
+ /** Greater than or equal */
101
222
  static readonly OP_GREATERTHANOREQUAL = 162;
223
+ /** Minimum of two numbers */
102
224
  static readonly OP_MIN = 163;
225
+ /** Maximum of two numbers */
103
226
  static readonly OP_MAX = 164;
227
+ /** Check if a value is within a specified range */
104
228
  static readonly OP_WITHIN = 165;
229
+ /** RIPEMD-160 hash */
105
230
  static readonly OP_RIPEMD160 = 166;
231
+ /** SHA-1 hash */
106
232
  static readonly OP_SHA1 = 167;
233
+ /** SHA-256 hash */
107
234
  static readonly OP_SHA256 = 168;
235
+ /** RIPEMD-160(SHA-256(x)) hash */
108
236
  static readonly OP_HASH160 = 169;
237
+ /** SHA-256(SHA-256(x)) hash */
109
238
  static readonly OP_HASH256 = 170;
239
+ /** Code separator for signature hashing */
110
240
  static readonly OP_CODESEPARATOR = 171;
241
+ /** Check ECDSA signature */
111
242
  static readonly OP_CHECKSIG = 172;
243
+ /** Check ECDSA signature and verify */
112
244
  static readonly OP_CHECKSIGVERIFY = 173;
245
+ /** Check multisignature (M-of-N) */
113
246
  static readonly OP_CHECKMULTISIG = 174;
247
+ /** Check multisignature (M-of-N) and verify */
114
248
  static readonly OP_CHECKMULTISIGVERIFY = 175;
249
+ /** No operation (NOP) */
115
250
  static readonly OP_NOP1 = 176;
251
+ /** Check locktime and set spendable height */
116
252
  static readonly OP_CHECKLOCKTIMEVERIFY = 177;
253
+ /** Alias for OP_CHECKLOCKTIMEVERIFY (NOP2) */
117
254
  static readonly OP_NOP2 = 177;
255
+ /** Check relative locktime and set spendable sequence */
118
256
  static readonly OP_CHECKSEQUENCEVERIFY = 178;
257
+ /** Alias for OP_CHECKSEQUENCEVERIFY (NOP3) */
119
258
  static readonly OP_NOP3 = 178;
259
+ /** No operation (NOP4) */
120
260
  static readonly OP_NOP4 = 179;
261
+ /** No operation (NOP5) */
121
262
  static readonly OP_NOP5 = 180;
263
+ /** No operation (NOP6) */
122
264
  static readonly OP_NOP6 = 181;
265
+ /** No operation (NOP7) */
123
266
  static readonly OP_NOP7 = 182;
267
+ /** No operation (NOP8) */
124
268
  static readonly OP_NOP8 = 183;
269
+ /** No operation (NOP9) */
125
270
  static readonly OP_NOP9 = 184;
271
+ /** No operation (NOP10) */
126
272
  static readonly OP_NOP10 = 185;
273
+ /** Check Schnorr or ECDSA signature against arbitrary message */
127
274
  static readonly OP_CHECKDATASIG = 186;
275
+ /** Check Schnorr or ECDSA signature against message and verify */
128
276
  static readonly OP_CHECKDATASIGVERIFY = 187;
277
+ /** Reverse bytes of top stack item */
129
278
  static readonly OP_REVERSEBYTES = 188;
279
+ /** Multiply by power of 2 */
130
280
  static readonly OP_MULPOW2 = 189;
281
+ /** Raw left bit shift */
131
282
  static readonly OP_RAWLEFTBITSHIFT = 190;
132
283
  static readonly map: {
133
284
  readonly OP_0: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"opcode.d.ts","sourceRoot":"","sources":["../../../../lib/bitcore/opcode.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAA;CACZ;AAOD,qBAAa,MAAM;IAEjB,QAAQ,CAAC,GAAG,EAAG,MAAM,CAAA;gBAQT,GAAG,EAAE,MAAM,GAAG,MAAM;IAoBhC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAUtC,QAAQ,IAAI,MAAM;IAQlB,QAAQ,IAAI,MAAM;IAOlB,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAI;IAExB,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAI;IAE5B,MAAM,CAAC,QAAQ,CAAC,YAAY,MAAK;IAEjC,MAAM,CAAC,QAAQ,CAAC,YAAY,MAAK;IAEjC,MAAM,CAAC,QAAQ,CAAC,YAAY,MAAK;IAEjC,MAAM,CAAC,QAAQ,CAAC,UAAU,MAAK;IAE/B,MAAM,CAAC,QAAQ,CAAC,WAAW,MAAK;IAEhC,MAAM,CAAC,QAAQ,CAAC,IAAI,MAAK;IAEzB,MAAM,CAAC,QAAQ,CAAC,OAAO,MAAK;IAE5B,MAAM,CAAC,QAAQ,CAAC,IAAI,MAAK;IAEzB,MAAM,CAAC,QAAQ,CAAC,IAAI,MAAK;IAEzB,MAAM,CAAC,QAAQ,CAAC,IAAI,MAAK;IAEzB,MAAM,CAAC,QAAQ,CAAC,IAAI,MAAK;IAEzB,MAAM,CAAC,QAAQ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