utxo-lib 1.0.9 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) 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 +92 -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 +673 -113
  16. package/dist/src/bitgo/UtxoTransaction.js +2 -2
  17. package/dist/src/bitgo/bitcoincash/address.js +2 -2
  18. package/dist/src/bitgo/index.d.ts +11 -0
  19. package/dist/src/bitgo/index.d.ts.map +1 -1
  20. package/dist/src/bitgo/index.js +6 -2
  21. package/dist/src/bitgo/legacysafe/index.d.ts +15 -0
  22. package/dist/src/bitgo/legacysafe/index.d.ts.map +1 -0
  23. package/dist/src/bitgo/legacysafe/index.js +61 -0
  24. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts +10 -0
  25. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts.map +1 -0
  26. package/dist/src/bitgo/litecoin/LitecoinPsbt.js +17 -0
  27. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +16 -0
  28. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +1 -0
  29. package/dist/src/bitgo/litecoin/LitecoinTransaction.js +46 -0
  30. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts +10 -0
  31. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts.map +1 -0
  32. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.js +15 -0
  33. package/dist/src/bitgo/litecoin/index.d.ts +4 -0
  34. package/dist/src/bitgo/litecoin/index.d.ts.map +1 -0
  35. package/dist/src/bitgo/litecoin/index.js +16 -0
  36. package/dist/src/bitgo/outputScripts.d.ts +3 -1
  37. package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
  38. package/dist/src/bitgo/outputScripts.js +20 -12
  39. package/dist/src/bitgo/parseInput.d.ts +49 -20
  40. package/dist/src/bitgo/parseInput.d.ts.map +1 -1
  41. package/dist/src/bitgo/parseInput.js +110 -26
  42. package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +1 -1
  43. package/dist/src/bitgo/psbt/fromHalfSigned.js +9 -6
  44. package/dist/src/bitgo/psbt/scriptTypes.js +3 -3
  45. package/dist/src/bitgo/signature.d.ts +3 -3
  46. package/dist/src/bitgo/signature.d.ts.map +1 -1
  47. package/dist/src/bitgo/signature.js +48 -16
  48. package/dist/src/bitgo/transaction.d.ts +18 -3
  49. package/dist/src/bitgo/transaction.d.ts.map +1 -1
  50. package/dist/src/bitgo/transaction.js +28 -15
  51. package/dist/src/bitgo/types.d.ts +2 -0
  52. package/dist/src/bitgo/types.d.ts.map +1 -1
  53. package/dist/src/bitgo/types.js +1 -1
  54. package/dist/src/bitgo/wallet/Psbt.d.ts +104 -12
  55. package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
  56. package/dist/src/bitgo/wallet/Psbt.js +288 -70
  57. package/dist/src/bitgo/wallet/Unspent.d.ts +28 -0
  58. package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
  59. package/dist/src/bitgo/wallet/Unspent.js +173 -68
  60. package/dist/src/bitgo/wallet/WalletOutput.d.ts +17 -1
  61. package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +1 -1
  62. package/dist/src/bitgo/wallet/WalletOutput.js +64 -23
  63. package/dist/src/bitgo/wallet/chains.d.ts +2 -2
  64. package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
  65. package/dist/src/bitgo/wallet/chains.js +1 -1
  66. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +0 -1
  67. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
  68. package/dist/src/bitgo/zcash/ZcashPsbt.js +8 -15
  69. package/dist/src/bitgo/zcash/ZcashTransaction.js +2 -2
  70. package/dist/src/musig.d.ts +0 -1
  71. package/dist/src/musig.d.ts.map +1 -1
  72. package/dist/src/musig.js +15 -29
  73. package/dist/src/networks.d.ts +1 -2
  74. package/dist/src/networks.d.ts.map +1 -1
  75. package/dist/src/networks.js +22 -29
  76. package/dist/src/noble_ecc.d.ts +1 -1
  77. package/dist/src/noble_ecc.d.ts.map +1 -1
  78. package/dist/src/noble_ecc.js +9 -5
  79. package/dist/src/payments/p2tr.d.ts.map +1 -1
  80. package/dist/src/payments/p2tr.js +25 -15
  81. package/dist/src/payments/p2tr_ns.js +3 -2
  82. package/dist/src/taproot.d.ts +16 -0
  83. package/dist/src/taproot.d.ts.map +1 -1
  84. package/dist/src/taproot.js +46 -3
  85. package/dist/src/testutil/index.d.ts +2 -0
  86. package/dist/src/testutil/index.d.ts.map +1 -1
  87. package/dist/src/testutil/index.js +3 -1
  88. package/dist/src/testutil/keys.d.ts +3 -0
  89. package/dist/src/testutil/keys.d.ts.map +1 -1
  90. package/dist/src/testutil/keys.js +17 -2
  91. package/dist/src/testutil/mock.d.ts +1 -1
  92. package/dist/src/testutil/mock.d.ts.map +1 -1
  93. package/dist/src/testutil/mock.js +12 -4
  94. package/dist/src/testutil/psbt.d.ts +89 -0
  95. package/dist/src/testutil/psbt.d.ts.map +1 -0
  96. package/dist/src/testutil/psbt.js +150 -0
  97. package/dist/src/testutil/transaction.d.ts +70 -0
  98. package/dist/src/testutil/transaction.d.ts.map +1 -0
  99. package/dist/src/testutil/transaction.js +107 -0
  100. package/dist/src/transaction_builder.js +2 -2
  101. package/package.json +7 -6
package/dist/src/musig.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /*! musig-js - MIT License (c) 2022 Brandon Black */
2
+ /* ! musig-js - MIT License (c) 2022 Brandon Black */
3
3
  // https://github.com/ElementsProject/secp256k1-zkp/blob/master/doc/musig-spec.mediawiki
4
4
  // Roughly based on the secp256k1-zkp implementation
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -84,8 +84,9 @@ function MuSigFactory(ecc) {
84
84
  else {
85
85
  ({ publicKeyHash, secondPublicKey } = keyAggCache);
86
86
  }
87
- if (secondPublicKey === undefined || compare33b(publicKey, secondPublicKey) !== 0)
87
+ if (secondPublicKey === undefined || compare33b(publicKey, secondPublicKey) !== 0) {
88
88
  coefficient = ecc.taggedHash(TAGS.keyagg_coef, publicKeyHash, publicKey);
89
+ }
89
90
  coefCache.set(publicKey, coefficient);
90
91
  return coefficient;
91
92
  }
@@ -142,10 +143,7 @@ function MuSigFactory(ecc) {
142
143
  }
143
144
  function nonceAgg(publicNonces) {
144
145
  checkArgs({ publicNonces });
145
- const aggNonces = [
146
- publicNonces[0].subarray(0, 33),
147
- publicNonces[0].subarray(33),
148
- ];
146
+ const aggNonces = [publicNonces[0].subarray(0, 33), publicNonces[0].subarray(33)];
149
147
  for (let i = 1; i < publicNonces.length; i++) {
150
148
  if (aggNonces[0] !== null)
151
149
  aggNonces[0] = ecc.pointAdd(aggNonces[0], publicNonces[i].subarray(0, 33), false);
@@ -227,10 +225,7 @@ function MuSigFactory(ecc) {
227
225
  throw new Error('Invalid secret key, no corresponding public key');
228
226
  if (compare33b(publicKey, secretNonce.subarray(64)) !== 0)
229
227
  throw new Error('Secret nonce pubkey mismatch');
230
- const secretNonces = [
231
- secretNonce.subarray(0, 32),
232
- secretNonce.subarray(32, 64),
233
- ];
228
+ const secretNonces = [secretNonce.subarray(0, 32), secretNonce.subarray(32, 64)];
234
229
  const sig = partialSignInner({
235
230
  secretKey,
236
231
  publicKey,
@@ -238,10 +233,7 @@ function MuSigFactory(ecc) {
238
233
  sessionKey,
239
234
  });
240
235
  if (verify) {
241
- const publicNonces = [
242
- publicNonce.subarray(0, 33),
243
- publicNonce.subarray(33),
244
- ];
236
+ const publicNonces = [publicNonce.subarray(0, 33), publicNonce.subarray(33)];
245
237
  const valid = partialVerifyInner({
246
238
  sig,
247
239
  publicKey,
@@ -305,13 +297,7 @@ function MuSigFactory(ecc) {
305
297
  const scalarArgs = ['tweak', 'sig', 'sigs', 'tacc', 'gacc'];
306
298
  const otherArgs32b = ['xOnlyPublicKey', 'rand', 'sessionId'];
307
299
  const args32b = ['secretKey', ...scalarArgs, ...otherArgs32b];
308
- const pubNonceArgs = [
309
- 'publicNonce',
310
- 'publicNonces',
311
- 'aggNonce',
312
- 'aggOtherNonce',
313
- 'finalNonce',
314
- ];
300
+ const pubNonceArgs = ['publicNonce', 'publicNonces', 'aggNonce', 'aggOtherNonce', 'finalNonce'];
315
301
  const otherArgs = ['aggPublicKey', 'secretNonce'];
316
302
  const argLengths = new Map();
317
303
  args32b.forEach((a) => argLengths.set(a, 32));
@@ -336,14 +322,16 @@ function MuSigFactory(ecc) {
336
322
  throw new TypeError(`Invalid secretKey`);
337
323
  }
338
324
  else if (name === 'secretNonce') {
339
- for (let i = 0; i < 64; i += 32)
325
+ for (let i = 0; i < 64; i += 32) {
340
326
  if (!ecc.isSecret(value.subarray(i, i + 32)))
341
327
  throw new TypeError(`Invalid secretNonce`);
328
+ }
342
329
  }
343
330
  else if (scalarNames.has(name)) {
344
- for (let i = 0; i < value.length; i += 32)
331
+ for (let i = 0; i < value.length; i += 32) {
345
332
  if (!ecc.isScalar(value.subarray(i, i + 32)))
346
333
  throw new TypeError(`Invalid ${name}`);
334
+ }
347
335
  }
348
336
  // No need for a public key x-to-curve check. They're liftX'd for use any way.
349
337
  }
@@ -371,8 +359,9 @@ function MuSigFactory(ecc) {
371
359
  return tweaks.reduce((c, tweak) => addTweak(c, tweak), ctx);
372
360
  },
373
361
  nonceGen: ({ sessionId = makeSessionId(), secretKey, publicKey, xOnlyPublicKey, msg, extraInput, }) => {
374
- if (extraInput !== undefined && extraInput.length > Math.pow(2, 32) - 1)
362
+ if (extraInput !== undefined && extraInput.length > Math.pow(2, 32) - 1) {
375
363
  throw new TypeError('extraInput is limited to 2^32-1 bytes');
364
+ }
376
365
  // No need to check msg, its max size is larger than JS typed array limit
377
366
  checkArgs({ sessionId, secretKey, publicKey, xOnlyPublicKey });
378
367
  let rand;
@@ -430,10 +419,7 @@ function MuSigFactory(ecc) {
430
419
  partialSign,
431
420
  partialVerify: ({ sig, publicKey, publicNonce, sessionKey, }) => {
432
421
  checkArgs({ sig, publicKey, publicNonce });
433
- const publicNonces = [
434
- publicNonce.subarray(0, 33),
435
- publicNonce.subarray(33),
436
- ];
422
+ const publicNonces = [publicNonce.subarray(0, 33), publicNonce.subarray(33)];
437
423
  const valid = partialVerifyInner({
438
424
  sig,
439
425
  publicKey,
@@ -458,4 +444,4 @@ function MuSigFactory(ecc) {
458
444
  };
459
445
  }
460
446
  exports.MuSigFactory = MuSigFactory;
461
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVzaWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbXVzaWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9EQUFvRDtBQUNwRCx3RkFBd0Y7QUFDeEYsb0RBQW9EOzs7QUE0YnBELE1BQU0sSUFBSSxHQUFHO0lBQ1gsU0FBUyxFQUFFLG1CQUFtQjtJQUM5QixXQUFXLEVBQUUsYUFBYTtJQUMxQixXQUFXLEVBQUUsb0JBQW9CO0lBQ2pDLFNBQVMsRUFBRSxXQUFXO0lBQ3RCLFdBQVcsRUFBRSxhQUFhO0lBQzFCLHlCQUF5QixFQUFFLDJCQUEyQjtJQUN0RCxlQUFlLEVBQUUsaUJBQWlCO0NBQzFCLENBQUM7QUFFWDs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XVxuICAgICk6IFNlc3Npb25LZXkgPT4ge1xuICAgICAgY2hlY2tBcmdzKHsgYWdnTm9uY2UgfSk7XG4gICAgICBjb25zdCBjdHggPSBrZXlBZ2cocHVibGljS2V5cywgLi4udHdlYWtzKTtcbiAgICAgIHJldHVybiBzdGFydFNpZ25pbmdTZXNzaW9uSW5uZXIoYWdnTm9uY2UsIG1zZywgcHVibGljS2V5cywgY3R4KTtcbiAgICB9LFxuXG4gICAgcGFydGlhbFNpZ24sXG5cbiAgICBwYXJ0aWFsVmVyaWZ5OiAoe1xuICAgICAgc2lnLFxuICAgICAgcHVibGljS2V5LFxuICAgICAgcHVibGljTm9uY2UsXG4gICAgICBzZXNzaW9uS2V5LFxuICAgIH06IHtcbiAgICAgIHNpZzogVWludDhBcnJheTtcbiAgICAgIHB1YmxpY0tleTogVWludDhBcnJheTtcbiAgICAgIHB1YmxpY05vbmNlOiBVaW50OEFycmF5O1xuICAgICAgc2Vzc2lvbktleTogU2Vzc2lvbktleTtcbiAgICB9KTogYm9vbGVhbiA9PiB7XG4gICAgICBjaGVja0FyZ3MoeyBzaWcsIHB1YmxpY0tleSwgcHVibGljTm9uY2UgfSk7XG5cbiAgICAgIGNvbnN0IHB1YmxpY05vbmNlczogW1VpbnQ4QXJyYXksIFVpbnQ4QXJyYXldID0gW1xuICAgICAgICBwdWJsaWNOb25jZS5zdWJhcnJheSgwLCAzMyksXG4gICAgICAgIHB1YmxpY05vbmNlLnN1YmFycmF5KDMzKSxcbiAgICAgIF07XG5cbiAgICAgIGNvbnN0IHZhbGlkID0gcGFydGlhbFZlcmlmeUlubmVyKHtcbiAgICAgICAgc2lnLFxuICAgICAgICBwdWJsaWNLZXksXG4gICAgICAgIHB1YmxpY05vbmNlcyxcbiAgICAgICAgc2Vzc2lvbktleSxcbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIHZhbGlkO1xuICAgIH0sXG5cbiAgICBzaWduQWdnOiAoc2lnczogVWludDhBcnJheVtdLCBzZXNzaW9u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ldyBVaW50OEFycmF5KDQpO1xuICAgICAgbmV3IERhdGFWaWV3KGVMZW5ndGguYnVmZmVyKS5zZXRVaW50MzIoMCwgZXh0cmFJbnB1dC5sZW5ndGgpO1xuXG4gICAgICBjb25zdCBzZWNyZXROb25jZSA9IG5ldyBVaW50OEFycmF5KDk3KTtcbiAgICAgIGNvbnN0IHB1YmxpY05vbmNlID0gbmV3IFVpbnQ4QXJyYXkoNjYpO1xuICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCAyOyBpKyspIHtcbiAgICAgICAgY29uc3Qga0ggPSBlY2MudGFnZ2VkSGFzaChcbiAgICAgICAgICBUQUdTLm11c2lnX25vbmNlLFxuICAgICAgICAgIHJhbmQsXG4gICAgICAgICAgVWludDhBcnJheS5vZihwdWJsaWNLZXkubGVuZ3RoKSxcbiAgICAgICAgICBwdWJsaWNLZXksXG4gICAgICAgICAgVWludDhBcnJheS5vZih4T25seVB1YmxpY0tleS5sZW5ndGgpLFxuICAgICAgICAgIHhPbmx5UHVibGljS2V5LFxuICAgICAgICAgIC4uLm1QcmVmaXhlZCxcbiAgICAgICAgICBlTGVuZ3RoLFxuICAgICAgICAgIGV4dHJhSW5wdXQsXG4gICAgICAgICAgVWludDhBcnJheS5vZihpKVxuICAgICAgICApO1xuICAgICAgICBjb25zdCBrID0gZWNjLnNjYWxhck1vZChrSCk7XG4gICAgICAgIGlmIChjb21wYXJlMzJiKFNDQUxBUl8wLCBrKSA9PT0gMCkgdGhyb3cgbmV3IEVycm9yKCcwIHNlY3JldCBub25jZScpO1xuICAgICAgICBjb25zdCBwdWIgPSBlY2MuZ2V0UHVibGljS2V5KGssIHRydWUpO1xuICAgICAgICBpZiAocHViID09PSBudWxsKSB0aHJvdyBuZXcgRXJyb3IoJ1NlY3JldCBub25jZSBoYXMgbm8gY29ycmVzcG9uZGluZyBwdWJsaWMgbm9uY2UnKTtcblxuICAgICAgICBzZWNyZXROb25jZS5zZXQoaywgaSAqIDMyKTtcbiAgICAgICAg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HNlc3Npb25LZXkpO1xuICAgICAgbGV0IHNQYXJ0OiBVaW50OEFycmF5ID0gZWNjLnNjYWxhck11bHRpcGx5KGNoYWxsZW5nZSwgdGFjYyk7XG4gICAgICBpZiAoIWVjYy5oYXNFdmVuWShhZ2dQdWJsaWNLZXkpKSB7XG4gICAgICAgIHNQYXJ0ID0gZWNjLnNjYWxhck5lZ2F0ZShzUGFydCk7XG4gICAgICB9XG4gICAgICBjb25zdCBhZ2dTID0gc2lncy5yZWR1Y2UoKGEsIGIpID0+IGVjYy5zY2FsYXJBZGQoYSwgYiksIHNQYXJ0KTtcbiAgICAgIGNvbnN0IHNpZyA9IG5ldyBVaW50OEFycmF5KDY0KTtcbiAgICAgIHNpZy5zZXQoZWNjLnBvaW50WChmaW5hbE5vbmNlKSwgMCk7XG4gICAgICBzaWcuc2V0KGFnZ1MsIDMyKTtcbiAgICAgIHJldHVybiBzaWc7XG4gICAgfSxcbiAgfTtcbn1cbiJdfQ==
@@ -1,4 +1,4 @@
1
- export declare type NetworkName = 'bitcoin' | 'testnet' | 'bitcoincash' | 'bitcoincashTestnet' | 'ecash' | 'ecashTest' | 'bitcoingold' | 'bitcoingoldTestnet' | 'bitcoinsv' | 'bitcoinsvTestnet' | 'dash' | 'dashTest' | 'dogecoin' | 'dogecoinTest' | 'litecoin' | 'litecoinTest' | 'zcash' | 'zcashTest' | 'bbc';
1
+ export declare type NetworkName = 'bitcoin' | 'testnet' | 'bitcoincash' | 'bitcoincashTestnet' | 'ecash' | 'ecashTest' | 'bitcoingold' | 'bitcoingoldTestnet' | 'bitcoinsv' | 'bitcoinsvTestnet' | 'dash' | 'dashTest' | 'dogecoin' | 'dogecoinTest' | 'litecoin' | 'litecoinTest' | 'zcash' | 'zcashTest';
2
2
  export declare type Network = {
3
3
  messagePrefix: string;
4
4
  pubKeyHash: number;
@@ -19,7 +19,6 @@ export declare type Network = {
19
19
  * @deprecated
20
20
  */
21
21
  coin: string;
22
- forkChain?: string;
23
22
  };
24
23
  export declare const networks: Record<NetworkName, Network>;
25
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../src/networks.ts"],"names":[],"mappings":"AAuCA,oBAAY,WAAW,GACnB,SAAS,GACT,SAAS,GACT,aAAa,GACb,oBAAoB,GACpB,OAAO,GACP,WAAW,GACX,aAAa,GACb,oBAAoB,GACpB,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,UAAU,GACV,UAAU,GACV,cAAc,GACd,UAAU,GACV,cAAc,GACd,OAAO,GACP,WAAW,GAEX,KAAK,CAAC;AAEV,oBAAY,OAAO,GAAG;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAoBF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CA2NjD,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,EAAE,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAIxE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAgCpD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,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