utxo-lib 1.0.9 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/README.md +19 -16
  2. package/dist/src/address.d.ts.map +1 -1
  3. package/dist/src/address.js +11 -1
  4. package/dist/src/addressFormat.d.ts +1 -1
  5. package/dist/src/addressFormat.d.ts.map +1 -1
  6. package/dist/src/addressFormat.js +1 -1
  7. package/dist/src/bitgo/Musig2.d.ts +115 -17
  8. package/dist/src/bitgo/Musig2.d.ts.map +1 -1
  9. package/dist/src/bitgo/Musig2.js +283 -100
  10. package/dist/src/bitgo/PsbtUtil.d.ts +59 -0
  11. package/dist/src/bitgo/PsbtUtil.d.ts.map +1 -0
  12. package/dist/src/bitgo/PsbtUtil.js +91 -0
  13. package/dist/src/bitgo/UtxoPsbt.d.ts +180 -47
  14. package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
  15. package/dist/src/bitgo/UtxoPsbt.js +651 -107
  16. package/dist/src/bitgo/bitcoincash/address.js +2 -2
  17. package/dist/src/bitgo/index.d.ts +11 -0
  18. package/dist/src/bitgo/index.d.ts.map +1 -1
  19. package/dist/src/bitgo/index.js +6 -2
  20. package/dist/src/bitgo/legacysafe/index.d.ts +15 -0
  21. package/dist/src/bitgo/legacysafe/index.d.ts.map +1 -0
  22. package/dist/src/bitgo/legacysafe/index.js +61 -0
  23. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts +10 -0
  24. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts.map +1 -0
  25. package/dist/src/bitgo/litecoin/LitecoinPsbt.js +17 -0
  26. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +16 -0
  27. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +1 -0
  28. package/dist/src/bitgo/litecoin/LitecoinTransaction.js +46 -0
  29. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts +10 -0
  30. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts.map +1 -0
  31. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.js +15 -0
  32. package/dist/src/bitgo/litecoin/index.d.ts +4 -0
  33. package/dist/src/bitgo/litecoin/index.d.ts.map +1 -0
  34. package/dist/src/bitgo/litecoin/index.js +16 -0
  35. package/dist/src/bitgo/outputScripts.d.ts +3 -1
  36. package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
  37. package/dist/src/bitgo/outputScripts.js +18 -10
  38. package/dist/src/bitgo/parseInput.d.ts +49 -20
  39. package/dist/src/bitgo/parseInput.d.ts.map +1 -1
  40. package/dist/src/bitgo/parseInput.js +109 -25
  41. package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +1 -1
  42. package/dist/src/bitgo/psbt/fromHalfSigned.js +9 -6
  43. package/dist/src/bitgo/signature.d.ts +3 -3
  44. package/dist/src/bitgo/signature.d.ts.map +1 -1
  45. package/dist/src/bitgo/signature.js +48 -16
  46. package/dist/src/bitgo/transaction.d.ts +18 -3
  47. package/dist/src/bitgo/transaction.d.ts.map +1 -1
  48. package/dist/src/bitgo/transaction.js +28 -15
  49. package/dist/src/bitgo/types.d.ts +2 -0
  50. package/dist/src/bitgo/types.d.ts.map +1 -1
  51. package/dist/src/bitgo/types.js +1 -1
  52. package/dist/src/bitgo/wallet/Psbt.d.ts +104 -12
  53. package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
  54. package/dist/src/bitgo/wallet/Psbt.js +285 -70
  55. package/dist/src/bitgo/wallet/Unspent.d.ts +28 -0
  56. package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
  57. package/dist/src/bitgo/wallet/Unspent.js +172 -68
  58. package/dist/src/bitgo/wallet/WalletOutput.d.ts +17 -1
  59. package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +1 -1
  60. package/dist/src/bitgo/wallet/WalletOutput.js +64 -23
  61. package/dist/src/bitgo/wallet/chains.d.ts +2 -2
  62. package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
  63. package/dist/src/bitgo/wallet/chains.js +1 -1
  64. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +0 -1
  65. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
  66. package/dist/src/bitgo/zcash/ZcashPsbt.js +6 -14
  67. package/dist/src/musig.d.ts +0 -1
  68. package/dist/src/musig.d.ts.map +1 -1
  69. package/dist/src/musig.js +15 -29
  70. package/dist/src/networks.d.ts +1 -2
  71. package/dist/src/networks.d.ts.map +1 -1
  72. package/dist/src/networks.js +22 -29
  73. package/dist/src/noble_ecc.d.ts.map +1 -1
  74. package/dist/src/noble_ecc.js +7 -3
  75. package/dist/src/payments/p2tr.d.ts.map +1 -1
  76. package/dist/src/payments/p2tr.js +15 -9
  77. package/dist/src/taproot.d.ts +16 -0
  78. package/dist/src/taproot.d.ts.map +1 -1
  79. package/dist/src/taproot.js +44 -2
  80. package/dist/src/testutil/index.d.ts +2 -0
  81. package/dist/src/testutil/index.d.ts.map +1 -1
  82. package/dist/src/testutil/index.js +3 -1
  83. package/dist/src/testutil/keys.d.ts +3 -0
  84. package/dist/src/testutil/keys.d.ts.map +1 -1
  85. package/dist/src/testutil/keys.js +17 -2
  86. package/dist/src/testutil/mock.d.ts +1 -1
  87. package/dist/src/testutil/mock.d.ts.map +1 -1
  88. package/dist/src/testutil/mock.js +12 -4
  89. package/dist/src/testutil/psbt.d.ts +89 -0
  90. package/dist/src/testutil/psbt.d.ts.map +1 -0
  91. package/dist/src/testutil/psbt.js +150 -0
  92. package/dist/src/testutil/transaction.d.ts +70 -0
  93. package/dist/src/testutil/transaction.d.ts.map +1 -0
  94. package/dist/src/testutil/transaction.js +107 -0
  95. package/package.json +6 -6
@@ -35,8 +35,6 @@ const coins = {
35
35
  ZEC: 'zec',
36
36
  DASH: 'dash',
37
37
  DOGE: 'doge',
38
- // #9286F8 PECUNIA CHANGES
39
- BBC: 'bbc',
40
38
  };
41
39
  function getDefaultBip32Mainnet() {
42
40
  return {
@@ -210,7 +208,7 @@ exports.networks = {
210
208
  wif: 0xef,
211
209
  coin: coins.BCHA,
212
210
  cashAddr: {
213
- prefix: 'ecashtest',
211
+ prefix: 'ectest',
214
212
  pubKeyHash: 0x00,
215
213
  scriptHash: 0x08,
216
214
  },
@@ -253,18 +251,6 @@ exports.networks = {
253
251
  wif: 0xef,
254
252
  coin: coins.ZEC,
255
253
  },
256
- // #9286F8 PECUNIA CHANGES
257
- bbc: {
258
- messagePrefix: '\x19DarkCoin Signed Message:\n',
259
- bip32: {
260
- public: 0x0488ade3,
261
- private: 0x0488b21e,
262
- },
263
- pubKeyHash: 0x19,
264
- scriptHash: 0x66,
265
- wif: 0xcd,
266
- coin: coins.BBC,
267
- },
268
254
  };
269
255
  /**
270
256
  * @returns {Network[]} all known networks as array
@@ -287,29 +273,36 @@ exports.getNetworkName = getNetworkName;
287
273
  * @returns {Object} the mainnet corresponding to a testnet
288
274
  */
289
275
  function getMainnet(network) {
290
- switch (network.forkChain) {
291
- case 'bitcoin':
276
+ switch (network) {
277
+ case exports.networks.bitcoin:
278
+ case exports.networks.testnet:
292
279
  return exports.networks.bitcoin;
293
- case 'bitcoincash':
280
+ case exports.networks.bitcoincash:
281
+ case exports.networks.bitcoincashTestnet:
294
282
  return exports.networks.bitcoincash;
295
- case 'bitcoingold':
283
+ case exports.networks.bitcoingold:
284
+ case exports.networks.bitcoingoldTestnet:
296
285
  return exports.networks.bitcoingold;
297
- case 'bitcoinsv':
286
+ case exports.networks.bitcoinsv:
287
+ case exports.networks.bitcoinsvTestnet:
298
288
  return exports.networks.bitcoinsv;
299
- case 'dash':
289
+ case exports.networks.dash:
290
+ case exports.networks.dashTest:
300
291
  return exports.networks.dash;
301
- case 'ecash':
292
+ case exports.networks.ecash:
293
+ case exports.networks.ecashTest:
302
294
  return exports.networks.ecash;
303
- case 'litecoin':
295
+ case exports.networks.litecoin:
296
+ case exports.networks.litecoinTest:
304
297
  return exports.networks.litecoin;
305
- case 'zcash':
298
+ case exports.networks.zcash:
299
+ case exports.networks.zcashTest:
306
300
  return exports.networks.zcash;
307
- case 'dogecoin':
301
+ case exports.networks.dogecoin:
302
+ case exports.networks.dogecoinTest:
308
303
  return exports.networks.dogecoin;
309
- // #9286F8 PECUNIA CHANGES
310
- default:
311
- return exports.networks.bitcoin;
312
304
  }
305
+ throw new TypeError(`invalid network`);
313
306
  }
314
307
  exports.getMainnet = getMainnet;
315
308
  /**
@@ -455,4 +448,4 @@ function supportsTaproot(network) {
455
448
  return getMainnet(network) === exports.networks.bitcoin;
456
449
  }
457
450
  exports.supportsTaproot = supportsTaproot;
458
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29ya3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbmV0d29ya3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7Ozs7RUFlRTs7O0FBRUY7O0dBRUc7QUFDSCxNQUFNLEtBQUssR0FBRztJQUNaOzs7O1NBSUs7SUFDTCxHQUFHLEVBQUUsS0FBSztJQUNWLElBQUksRUFBRSxNQUFNO0lBQ1osR0FBRyxFQUFFLEtBQUs7SUFDVixHQUFHLEVBQUUsS0FBSztJQUNWLEdBQUcsRUFBRSxLQUFLO0lBQ1YsR0FBRyxFQUFFLEtBQUs7SUFDVixHQUFHLEVBQUUsS0FBSztJQUNWLElBQUksRUFBRSxNQUFNO0lBQ1osSUFBSSxFQUFFLE1BQU07SUFDWiwwQkFBMEI7SUFDMUIsR0FBRyxFQUFFLEtBQUs7Q0FDRixDQUFDO0FBK0NYLFNBQVMsc0JBQXNCO0lBQzdCLE9BQU87UUFDTCxnQkFBZ0I7UUFDaEIsTUFBTSxFQUFFLFVBQVU7UUFDbEIsZ0JBQWdCO1FBQ2hCLE9BQU8sRUFBRSxVQUFVO0tBQ3BCLENBQUM7QUFDSixDQUFDO0FBRUQsU0FBUyxzQkFBc0I7SUFDN0IsT0FBTztRQU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UAAU,mCAAqB,OAAO;uBAIrE,UAAU,KAAK,UAAU,aAAa,UAAU,KAAG,OAAO;CAG9E,CAAC;AAkEF,QAAA,MAAM,MAAM,EAAE,SAA8B,CAAC;AAC7C,QAAA,MAAM,KAAK,EAAE,QAA4B,CAAC;AAC1C,QAAA,MAAM,KAAK,EAAE,KAA4B,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC"}
@@ -7,7 +7,7 @@ const ecpair_1 = require("ecpair");
7
7
  const necc = require("@noble/secp256k1");
8
8
  const bip32_1 = require("bip32");
9
9
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
- // @ts-ignore base_crypto is exported as a subPath export, ignoring since compiler complains about importing like this
10
+ // @ts-ignore base_crypto is exported as a subPath export, ignoring since compiler complains about importing like this // #9286F8 Fixing import in react-native
11
11
  const baseCrypto = require("./base_crypto");
12
12
  const musig_1 = require("./musig");
13
13
  necc.utils.sha256Sync = (...messages) => {
@@ -41,7 +41,11 @@ function isPoint(p, xOnly) {
41
41
  }
42
42
  }
43
43
  function toBigInt(b) {
44
- return Buffer.from(b).readBigUint64BE();
44
+ const buff = Buffer.from(b);
45
+ if (buff.length !== 32) {
46
+ throw new Error('Invalid size ${buff.length}');
47
+ }
48
+ return BigInt(`0x${buff.toString('hex')}`);
45
49
  }
46
50
  const ecc = {
47
51
  isPoint: (p) => isPoint(p, false),
@@ -165,4 +169,4 @@ const bip32 = bip32_1.BIP32Factory(ecc);
165
169
  exports.bip32 = bip32;
166
170
  const musig = musig_1.MuSigFactory(crypto);
167
171
  exports.musig = musig;
168
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9ibGVfZWNjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25vYmxlX2VjYy50cy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iJdfQ==
@@ -1 +1 @@
1
- {"version":3,"file":"p2tr.d.ts","sourceRoot":"","sources":["../../../src/payments/p2tr.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqB,OAAO,EAAE,WAAW,EAAQ,MAAM,eAAe,CAAC;AAgC9E,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAwU5D"}
1
+ {"version":3,"file":"p2tr.d.ts","sourceRoot":"","sources":["../../../src/payments/p2tr.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqB,OAAO,EAAE,WAAW,EAAQ,MAAM,eAAe,CAAC;AAiC9E,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CA+U5D"}
@@ -119,7 +119,7 @@ function p2tr(a, opts) {
119
119
  else if (a.pubkeys && a.pubkeys.length > 1) {
120
120
  // multiple pubkeys
121
121
  if (isPlainPubkeys(a.pubkeys)) {
122
- return Buffer.from(noble_ecc_1.musig.getXOnlyPubkey(noble_ecc_1.musig.keyAgg(noble_ecc_1.musig.keySort(a.pubkeys))));
122
+ return Buffer.from(noble_ecc_1.musig.getXOnlyPubkey(noble_ecc_1.musig.keyAgg(a.pubkeys)));
123
123
  }
124
124
  return Buffer.from(taproot.aggregateMuSigPubkeys(ecc, a.pubkeys));
125
125
  }
@@ -136,13 +136,9 @@ function p2tr(a, opts) {
136
136
  return H;
137
137
  }
138
138
  });
139
- const _taprootPubkey = bitcoinjs_lib_1.lazy.value(() => {
139
+ bitcoinjs_lib_1.lazy.prop(o, 'taptreeRoot', () => {
140
140
  const parsedControlBlock = _parsedControlBlock();
141
141
  const parsedWitness = _parsedWitness();
142
- // Refuse to create an unspendable key
143
- if (!a.pubkey && !(a.pubkeys && a.pubkeys.length) && !a.redeems && !parsedControlBlock) {
144
- return;
145
- }
146
142
  let taptreeRoot;
147
143
  // Prefer to get the root via the control block because not all redeems may
148
144
  // be available
@@ -159,6 +155,14 @@ function p2tr(a, opts) {
159
155
  }
160
156
  if (!taptreeRoot && _taprootPaths())
161
157
  taptreeRoot = _taprootPaths()?.root;
158
+ return taptreeRoot;
159
+ });
160
+ const _taprootPubkey = bitcoinjs_lib_1.lazy.value(() => {
161
+ const taptreeRoot = o.taptreeRoot;
162
+ // Refuse to create an unspendable key
163
+ if (!a.pubkey && !(a.pubkeys && a.pubkeys.length) && !a.redeems && !taptreeRoot) {
164
+ return;
165
+ }
162
166
  return taproot.tapTweakPubkey(ecc, o?.internalPubkey, taptreeRoot);
163
167
  });
164
168
  bitcoinjs_lib_1.lazy.prop(o, 'tapTree', () => {
@@ -283,12 +287,14 @@ function p2tr(a, opts) {
283
287
  if (a.address && _outputPubkey && !_outputPubkey()?.equals(_address()?.data)) {
284
288
  throw new TypeError('mismatch between address & output');
285
289
  }
286
- if (taprootPubkey && _outputPubkey && !_outputPubkey()?.equals(taprootPubkey.xOnlyPubkey)) {
290
+ // Wrapping `taprootPubkey.xOnlyPubkey` in Buffer because of a peculiar issue in the frontend
291
+ // where a polyfill for Buffer is used. Refer: https://bitgoinc.atlassian.net/browse/BG-61420
292
+ if (taprootPubkey && _outputPubkey && !_outputPubkey()?.equals(Buffer.from(taprootPubkey.xOnlyPubkey))) {
287
293
  throw new TypeError('mismatch between output and taproot pubkey');
288
294
  }
289
295
  }
290
296
  if (a.address) {
291
- if (taprootPubkey && !_address()?.data.equals(taprootPubkey.xOnlyPubkey)) {
297
+ if (taprootPubkey && !_address()?.data.equals(Buffer.from(taprootPubkey.xOnlyPubkey))) {
292
298
  throw new TypeError('mismatch between address and taproot pubkey');
293
299
  }
294
300
  }
@@ -341,4 +347,4 @@ function p2tr(a, opts) {
341
347
  return Object.assign(o, a);
342
348
  }
343
349
  exports.p2tr = p2tr;
344
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicDJ0ci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY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G9jayAmJiAhYS5jb250cm9sQmxvY2suZXF1YWxzKHBhcnNlZFdpdG5lc3MuY29udHJvbEJsb2NrKSkge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdjb250cm9sIGJsb2NrIG1pc21hdGNoJyk7XG4gICAgICB9XG5cbiAgICAgIGlmIChhLmFubmV4ICYmIHBhcnNlZFdpdG5lc3MuYW5uZXggJiYgIWEuYW5uZXguZXF1YWxzKHBhcnNlZFdpdG5lc3MuYW5uZXgpKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ2FubmV4IG1pc21hdGNoJyk7XG4gICAgICB9XG5cbiAgICAgIGlmIChjaG9zZW5SZWRlZW0gJiYgY2hvc2VuUmVkZWVtLm91dHB1dCAmJiAhY2hvc2VuUmVkZWVtLm91dHB1dC5lcXVhbHMocGFyc2VkV2l0bmVzcy50YXBzY3JpcHQpKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ3RhcHNjcmlwdCBtaXNtYXRjaCcpO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBPYmplY3QuYXNzaWduKG8sIGEpO1xufVxuIl19
@@ -44,6 +44,7 @@ export declare function hashTapLeaf(script: Buffer, leafVersion?: number): Buffe
44
44
  * @returns the tagged tapbranch hash
45
45
  */
46
46
  export declare function hashTapBranch(child1: Buffer, child2: Buffer): Buffer;
47
+ export declare function calculateTapTweak(pubkey: Uint8Array, taptreeRoot?: Uint8Array): Uint8Array;
47
48
  /**
48
49
  * Tweaks a privkey, using the tagged hash of its pubkey, and (optionally) a taptree root
49
50
  * @param ecc Elliptic curve implementation
@@ -138,4 +139,19 @@ export declare function getTapleafHash(ecc: TinySecp256k1Interface, controlBlock
138
139
  */
139
140
  export declare function getTaptreeRoot(ecc: TinySecp256k1Interface, controlBlock: Buffer | ControlBlock, tapscript: Buffer, tapleafHash?: Buffer): Buffer;
140
141
  export declare function getTweakedOutputKey(payment: bpayments.Payment): Buffer;
142
+ /**
143
+ * @returns output script for either script path input controlBlock
144
+ * & leafScript OR key path input internalPubKey & taptreeRoot
145
+ */
146
+ export declare function createTaprootOutputScript(p2trArgs: {
147
+ internalPubKey: Buffer;
148
+ taptreeRoot: Buffer;
149
+ } | {
150
+ controlBlock: Buffer;
151
+ leafScript: Buffer;
152
+ }): Buffer;
153
+ /**
154
+ * @returns x-only taproot output key (tapOutputKey)
155
+ */
156
+ export declare function getTaprootOutputKey(outputScript: Buffer | (number | Buffer)[]): Buffer;
141
157
  //# sourceMappingURL=taproot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"taproot.d.ts","sourceRoot":"","sources":["../../src/taproot.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,IAAI,WAAW,EAA0B,MAAM,2BAA2B,CAAC;AAG3F,OAAO,EAAwC,QAAQ,IAAI,SAAS,EAAE,MAAM,eAAe,CAAC;AAG5F;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAkB,CAAC;AACnD,eAAO,MAAM,yBAAyB,MAAO,CAAC;AAE9C,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACrC,kBAAkB,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,wBAAwB,GAAG,IAAI,CAAC;IACtF,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;IACzE,aAAa,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAC/D,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAC1D,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAChE,aAAa,CAAC,CAAC,E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